Submission #51887735
Source Code Expand
Copy
// static toptree 解 O((N + Q) log N)#include "joitour.h"#include <algorithm>#include <cassert>#include <vector>using namespace std;/*頂点 0 を根とする根付き木で考える.上の boundary vertex を u, 下の boundary vertex を v とする.頂点属性を辺属性に変換するため,頂点の情報を,その頂点から上に伸びる辺に載せる.(ダミーの頂点を頂点 0 の上に作る)したがって,各 cluster は F[u] が分からないものとして情報を集めることになる.各 cluster が持つ情報:f_v : F[v]c_012: cluster 内の 0 - 1 - 2 パスの個数c_01u: cluster 内の 0 - 1 - u パスの個数c_u12: cluster 内の u - 1 - 2 パスの個数c_0u2: cluster 内の 0 - u - 2 パスの個数c_01v: cluster 内の 0 - 1 - v パス (v が 1 を担当しても良い) の個数c_v12: cluster 内の v - 1 - 2 パス (v が 1 を担当しても良い) の個数c_0uv: cluster 内の 0 - u - v パスの個数
// static toptree 解 O((N + Q) log N) #include "joitour.h" #include <algorithm> #include <cassert> #include <vector> using namespace std; /* 頂点 0 を根とする根付き木で考える. 上の boundary vertex を u, 下の boundary vertex を v とする. 頂点属性を辺属性に変換するため,頂点の情報を,その頂点から上に伸びる辺に載せる.(ダミーの頂点を頂点 0 の上に作る) したがって,各 cluster は F[u] が分からないものとして情報を集めることになる. 各 cluster が持つ情報: f_v : F[v] c_012: cluster 内の 0 - 1 - 2 パスの個数 c_01u: cluster 内の 0 - 1 - u パスの個数 c_u12: cluster 内の u - 1 - 2 パスの個数 c_0u2: cluster 内の 0 - u - 2 パスの個数 c_01v: cluster 内の 0 - 1 - v パス (v が 1 を担当しても良い) の個数 c_v12: cluster 内の v - 1 - 2 パス (v が 1 を担当しても良い) の個数 c_0uv: cluster 内の 0 - u - v パスの個数 c_u1v: cluster 内の u - 1 - v パス (v が 1 を担当しても良い) の個数 c_vu2: cluster 内の v - u - 2 パスの個数 c_0 : cluster 内の 0 の個数 c_2 : cluster 内の 2 の個数 */ struct T { long long f_v, c_012, c_01u, c_u12, c_0u2, c_01v, c_v12, c_0uv, c_u1v, c_vu2, c_0, c_2; }; #pragma GCC diagnostic ignored "-Wmissing-field-initializers" T one(int f) { T x = {f}; if (f == 0) x.c_0++; if (f == 1) x.c_u1v++; if (f == 2) x.c_2++; return x; } T rake(const T& a, const T& b) { // a.u == b.u である 2 つの cluster をマージ return T{ a.f_v, a.c_012 + b.c_012 + a.c_01u * b.c_2 + a.c_0 * b.c_u12 + b.c_0 * a.c_u12 + b.c_01u * a.c_2, a.c_01u + b.c_01u, a.c_u12 + b.c_u12, a.c_0u2 + b.c_0u2 + a.c_0 * b.c_2 + b.c_0 * a.c_2, a.c_01v + b.c_01u + b.c_0 * a.c_u1v, a.c_v12 + b.c_u12 + a.c_u1v * b.c_2, a.c_0uv + b.c_0, a.c_u1v, a.c_vu2 + b.c_2, a.c_0 + b.c_0, a.c_2 + b.c_2}; } T compress(const T& a, const T& b) { // a.v == b.u である 2 つの cluster をマージ return T{ b.f_v, a.c_012 + b.c_012 + a.c_01v * b.c_2 + a.c_0 * b.c_u12 + b.c_0 * a.c_v12 + b.c_01u * a.c_2 + b.c_0u2 * (a.f_v == 1), a.c_01u + b.c_01u + b.c_0 * a.c_u1v, a.c_u12 + b.c_u12 + a.c_u1v * b.c_2, a.c_0u2 + a.c_0uv * b.c_2 + b.c_0 * a.c_vu2, a.c_01v + b.c_01v + a.c_0 * b.c_u1v + b.c_0uv * (a.f_v == 1), a.c_v12 + b.c_v12 + b.c_u1v * a.c_2 + (a.f_v == 1) * b.c_vu2, a.c_0uv, a.c_u1v + b.c_u1v, a.c_vu2, a.c_0 + b.c_0, a.c_2 + b.c_2}; } vector<T> D; vector<int> P, L, R, T; void update(int i) { D[i] = (T[i] ? compress : rake)(D[L[i]], D[R[i]]); } void init(int N, vector<int> F, vector<int> U, vector<int> V, int Q) { vector g(N, vector<int>{}); for (int i = 0; i < N - 1; i++) { int u = U[i], v = V[i]; g[u].push_back(v); g[v].push_back(u); } // static toptree の構築 P.resize(N); L.resize(N); R.resize(N); T.resize(N); for (int f : F) D.push_back(one(f)); vector<int> sz(N, 1); // 部分木の大きさ { // heavy path の構築 auto dfs = [&](auto dfs, int i) -> void { for (int j : g[i]) { erase(g[j], i); dfs(dfs, j); sz[i] += sz[j]; } if (size(g[i])) { iter_swap(ranges::max_element(g[i], {}, [&](int i) { return sz[i]; }), begin(g[i])); } }; dfs(dfs, 0); } // data[i] と data[j] を rake/compress して新しいノードを作る auto op_D = [&](int i, int j, int t) -> int { const int K = size(D); T.push_back(t); L.push_back(i); R.push_back(j); P.push_back(0); D.emplace_back(); P[i] = K; P[j] = K; return K; }; auto merge_dfs = [&](auto merge_dfs, const vector<pair<int, int>>& a, int t) -> pair<int, int> { // 頂点数の合計が半分になるように分割して再帰的に rake/compress if (size(a) == 1) return a[0]; int sum_s = 0; for (auto [i, s] : a) sum_s += s; vector<pair<int, int>> b, c; for (auto [i, s] : a) { (sum_s > s ? b : c).emplace_back(i, s); sum_s -= s * 2; } auto [i, si] = merge_dfs(merge_dfs, b, t); auto [j, sj] = merge_dfs(merge_dfs, c, t); return {op_D(i, j, t), si + sj}; }; auto collect_r = [&](auto collect_r, auto collect_c, int i) -> pair<int, int> { // 頂点 i から下に出るすべての辺を heavy 方向へ rake vector<pair<int, int>> childs; childs.emplace_back(g[i][0], 1); for (int j = 1; j < size(g[i]); j++) childs.push_back(collect_c(collect_r, collect_c, g[i][j])); return merge_dfs(merge_dfs, childs, 0); }; auto collect_c = [&](auto collect_r, auto collect_c, int i) -> pair<int, int> { // par[i] -> i 辺とその先の heavy path を compress vector<pair<int, int>> path = {{i, 1}}; while (size(g[i])) { path.push_back(collect_r(collect_r, collect_c, i)); i = g[i][0]; } return merge_dfs(merge_dfs, path, 1); }; collect_c(collect_r, collect_c, 0); assert(size(D) == N * 2 - 1); // 木に沿って計算 for (int i = N; i < size(D); i++) update(i); } void change(int X, int Y) { D[X] = one(Y); while (P[X]) update(X = P[X]); } long long num_tours() { return D.back().c_012; }
Submission Info
Submission Time | |
---|---|
Task | H - JOI ツアー (JOI Tour) |
User | tatyam |
Language | C++ 23 (gcc 12.2) |
Score | 100 |
Code Size | 5890 Byte |
Status | AC |
Exec Time | 484 ms |
Memory | 90972 KB |
Compile Error
In file included from /usr/include/c++/12/cassert:44, from Main.cpp:4: Main.cpp: In function ‘void init(int, std::vector<int>, std::vector<int>, std::vector<int>, int)’: Main.cpp:155:20: warning: comparison of integer expressions of different signedness: ‘std::vector<T>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 155 | assert(size(D) == N * 2 - 1); | ~~~~~~~~^~~~~~~~~~~~ Main.cpp:158:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<T>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 158 | for (int i = N; i < size(D); i++) update(i); | ~~^~~~~~~~~ Main.cpp:78:67: warning: unused parameter ‘Q’ [-Wunused-parameter] 78 | void init(int N, vector<int> F, vector<int> U, vector<int> V, int Q) { | ~~~~^ Main.cpp: In instantiation of ‘init(int, std::vector<int>, std::vector<int>, std::vector<int>, int)::<lambda(auto:18, auto:19, int)> [with auto:18 = init(int, std::vector<int>, std::vector<int>, std::vector<int>, int)::<lambda(auto:18, auto:19, int)>; auto:19 = init(int, std::vector<int>, std::vector<int>, std::vector<int>, int)::<lambda(auto:20, auto:21, int)>]’: Main.cpp:149:37: required from ‘init(int, std::vector<int>, std::vector<int>, std::vector<int>, int)::<lambda(auto:20, auto:21, int)> [with auto:20 = init(int, std::vector<int>, std::vector<int>, std::vector<int>, int)::<lambda(auto:18, auto:19, int)>; auto:21 = init(int, std::vector<int>, std::vector<int>, std::vector<int>, int)::<lambda(auto:20, auto:21, int)>]’ Main.cpp:154:14: required from here Main.cpp:141:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 141 | for (int j = 1; j < size(g[i]); j++) childs.push_back(collect_c(collect_r, collect_c, g[i][j])); | ~~^~~~~~~~~~~~
Judge Result
Set Name | Sample | Subtask1 | Subtask2 | Subtask3 | Subtask4 | Subtask5 | Subtask6 | Subtask7 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 6 / 6 | 8 / 8 | 6 / 6 | 16 / 16 | 16 / 16 | 34 / 34 | 14 / 14 | ||||||||||||||||
Status |
|
|
|
|
|
|
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt |
Subtask1 | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 41-01.txt, 41-02.txt, 41-03.txt, 41-04.txt, 41-05.txt, 51-01.txt, 51-02.txt, 51-03.txt, 51-04.txt, 51-05.txt, sample-01.txt, sample-02.txt, sample-03.txt, 03-16.txt, 03-17.txt, 03-19.txt, 03-18.txt |
Subtask2 | 02-01.txt, 02-02.txt, 02-03.txt, 42-01.txt, 52-01.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 41-01.txt, 41-02.txt, 41-03.txt, 41-04.txt, 41-05.txt, 51-01.txt, 51-02.txt, 51-03.txt, 51-04.txt, 51-05.txt, sample-01.txt, sample-02.txt, sample-03.txt, 03-16.txt, 03-17.txt, 03-19.txt, 03-18.txt |
Subtask3 | 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt, 03-07.txt, 03-08.txt, 03-09.txt, 03-10.txt, 03-11.txt, 03-12.txt, 03-13.txt, 03-14.txt, 03-15.txt, 03-16.txt, 03-17.txt, 03-18.txt, 03-19.txt, 03-20.txt, 03-21.txt, 03-22.txt, 03-23.txt, 03-24.txt, 03-25.txt, 03-26.txt, 03-27.txt, 43-01.txt, 43-02.txt, 43-03.txt, 43-04.txt, 53-01.txt, 53-02.txt, 53-03.txt, 53-04.txt, sample-01.txt |
Subtask4 | 41-01.txt, 41-02.txt, 41-03.txt, 41-04.txt, 41-05.txt, 42-01.txt, 43-01.txt, 43-02.txt, 43-03.txt, 43-04.txt, 46-01.txt, 46-02.txt, 46-03.txt, 46-04.txt, 46-05.txt, 46-06.txt, 47-01.txt, 47-02.txt, 47-03.txt, 47-04.txt, 47-05.txt, 47-06.txt, sample-01.txt, sample-02.txt |
Subtask5 | 51-01.txt, 51-02.txt, 51-03.txt, 51-04.txt, 51-05.txt, 52-01.txt, 53-01.txt, 53-02.txt, 53-03.txt, 53-04.txt, 56-01.txt, 56-02.txt, 56-03.txt, 56-04.txt, 56-05.txt, 56-06.txt, 57-01.txt, 57-02.txt, 57-03.txt, 57-04.txt, 57-05.txt, 57-06.txt, sample-03.txt |
Subtask6 | 06-01.txt, 06-02.txt, 06-03.txt, 06-04.txt, 06-05.txt, 06-06.txt, 06-07.txt, 06-08.txt, 06-09.txt, 06-10.txt, 06-11.txt, 06-12.txt, 06-13.txt, 06-14.txt, 06-15.txt, 06-16.txt, 06-17.txt, 06-18.txt, 06-19.txt, 06-20.txt, 06-21.txt, 06-22.txt, 06-23.txt, 06-24.txt, 06-25.txt, 06-26.txt, 06-27.txt, 06-28.txt, 06-29.txt, 06-30.txt, 06-31.txt, 06-32.txt, 46-01.txt, 46-02.txt, 46-03.txt, 46-04.txt, 46-05.txt, 46-06.txt, 56-01.txt, 56-02.txt, 56-03.txt, 56-04.txt, 56-05.txt, 56-06.txt, 02-01.txt, 02-02.txt, 02-03.txt, 42-01.txt, 52-01.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 41-01.txt, 41-02.txt, 41-03.txt, 41-04.txt, 41-05.txt, 51-01.txt, 51-02.txt, 51-03.txt, 51-04.txt, 51-05.txt, sample-01.txt, sample-02.txt, sample-03.txt, 03-16.txt, 03-17.txt, 03-19.txt, 03-18.txt |
Subtask7 | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 02-01.txt, 02-02.txt, 02-03.txt, 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt, 03-07.txt, 03-08.txt, 03-09.txt, 03-10.txt, 03-11.txt, 03-12.txt, 03-13.txt, 03-14.txt, 03-15.txt, 03-16.txt, 03-17.txt, 03-18.txt, 03-19.txt, 03-20.txt, 03-21.txt, 03-22.txt, 03-23.txt, 03-24.txt, 03-25.txt, 03-26.txt, 03-27.txt, 06-01.txt, 06-02.txt, 06-03.txt, 06-04.txt, 06-05.txt, 06-06.txt, 06-07.txt, 06-08.txt, 06-09.txt, 06-10.txt, 06-11.txt, 06-12.txt, 06-13.txt, 06-14.txt, 06-15.txt, 06-16.txt, 06-17.txt, 06-18.txt, 06-19.txt, 06-20.txt, 06-21.txt, 06-22.txt, 06-23.txt, 06-24.txt, 06-25.txt, 06-26.txt, 06-27.txt, 06-28.txt, 06-29.txt, 06-30.txt, 06-31.txt, 06-32.txt, 07-01.txt, 07-02.txt, 07-03.txt, 07-04.txt, 07-05.txt, 07-06.txt, 07-07.txt, 07-08.txt, 07-09.txt, 07-10.txt, 07-11.txt, 07-12.txt, 07-13.txt, 07-14.txt, 07-15.txt, 07-16.txt, 07-17.txt, 07-18.txt, 07-19.txt, 07-20.txt, 07-21.txt, 07-22.txt, 07-23.txt, 07-24.txt, 07-25.txt, 07-26.txt, 07-27.txt, 07-28.txt, 07-29.txt, 07-30.txt, 07-31.txt, 07-32.txt, 41-01.txt, 41-02.txt, 41-03.txt, 41-04.txt, 41-05.txt, 42-01.txt, 43-01.txt, 43-02.txt, 43-03.txt, 43-04.txt, 46-01.txt, 46-02.txt, 46-03.txt, 46-04.txt, 46-05.txt, 46-06.txt, 47-01.txt, 47-02.txt, 47-03.txt, 47-04.txt, 47-05.txt, 47-06.txt, 51-01.txt, 51-02.txt, 51-03.txt, 51-04.txt, 51-05.txt, 52-01.txt, 53-01.txt, 53-02.txt, 53-03.txt, 53-04.txt, 56-01.txt, 56-02.txt, 56-03.txt, 56-04.txt, 56-05.txt, 56-06.txt, 57-01.txt, 57-02.txt, 57-03.txt, 57-04.txt, 57-05.txt, 57-06.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 3 ms | 3708 KB |
01-02.txt | AC | 2 ms | 3732 KB |
01-03.txt | AC | 2 ms | 3732 KB |
01-04.txt | AC | 2 ms | 3808 KB |
01-05.txt | AC | 2 ms | 3592 KB |
01-06.txt | AC | 3 ms | 3596 KB |
01-07.txt | AC | 3 ms | 3688 KB |
02-01.txt | AC | 10 ms | 3780 KB |
02-02.txt | AC | 10 ms | 3924 KB |
02-03.txt | AC | 9 ms | 3888 KB |
03-01.txt | AC | 255 ms | 83008 KB |
03-02.txt | AC | 252 ms | 82724 KB |
03-03.txt | AC | 251 ms | 80388 KB |
03-04.txt | AC | 256 ms | 83500 KB |
03-05.txt | AC | 173 ms | 73264 KB |
03-06.txt | AC | 170 ms | 73288 KB |
03-07.txt | AC | 231 ms | 73184 KB |
03-08.txt | AC | 231 ms | 73328 KB |
03-09.txt | AC | 230 ms | 73336 KB |
03-10.txt | AC | 231 ms | 73824 KB |
03-11.txt | AC | 237 ms | 77320 KB |
03-12.txt | AC | 235 ms | 77420 KB |
03-13.txt | AC | 237 ms | 77104 KB |
03-14.txt | AC | 244 ms | 76848 KB |
03-15.txt | AC | 254 ms | 87124 KB |
03-16.txt | AC | 2 ms | 3840 KB |
03-17.txt | AC | 2 ms | 3680 KB |
03-18.txt | AC | 2 ms | 3920 KB |
03-19.txt | AC | 2 ms | 3812 KB |
03-20.txt | AC | 236 ms | 73432 KB |
03-21.txt | AC | 235 ms | 73328 KB |
03-22.txt | AC | 236 ms | 73456 KB |
03-23.txt | AC | 236 ms | 73336 KB |
03-24.txt | AC | 216 ms | 79216 KB |
03-25.txt | AC | 213 ms | 79224 KB |
03-26.txt | AC | 213 ms | 79168 KB |
03-27.txt | AC | 211 ms | 79276 KB |
06-01.txt | AC | 214 ms | 40180 KB |
06-02.txt | AC | 217 ms | 41724 KB |
06-03.txt | AC | 225 ms | 41800 KB |
06-04.txt | AC | 222 ms | 42420 KB |
06-05.txt | AC | 223 ms | 42588 KB |
06-06.txt | AC | 222 ms | 41500 KB |
06-07.txt | AC | 196 ms | 37388 KB |
06-08.txt | AC | 195 ms | 37384 KB |
06-09.txt | AC | 218 ms | 37396 KB |
06-10.txt | AC | 218 ms | 37320 KB |
06-11.txt | AC | 220 ms | 37392 KB |
06-12.txt | AC | 217 ms | 37696 KB |
06-13.txt | AC | 211 ms | 39236 KB |
06-14.txt | AC | 216 ms | 38780 KB |
06-15.txt | AC | 217 ms | 39056 KB |
06-16.txt | AC | 215 ms | 39280 KB |
06-17.txt | AC | 215 ms | 38932 KB |
06-18.txt | AC | 216 ms | 39508 KB |
06-19.txt | AC | 217 ms | 42096 KB |
06-20.txt | AC | 216 ms | 44308 KB |
06-21.txt | AC | 224 ms | 41848 KB |
06-22.txt | AC | 207 ms | 37488 KB |
06-23.txt | AC | 219 ms | 37520 KB |
06-24.txt | AC | 216 ms | 37504 KB |
06-25.txt | AC | 220 ms | 37444 KB |
06-26.txt | AC | 218 ms | 37392 KB |
06-27.txt | AC | 218 ms | 37480 KB |
06-28.txt | AC | 197 ms | 40392 KB |
06-29.txt | AC | 205 ms | 40316 KB |
06-30.txt | AC | 203 ms | 40348 KB |
06-31.txt | AC | 203 ms | 40440 KB |
06-32.txt | AC | 203 ms | 40336 KB |
07-01.txt | AC | 465 ms | 82252 KB |
07-02.txt | AC | 455 ms | 83196 KB |
07-03.txt | AC | 474 ms | 81900 KB |
07-04.txt | AC | 474 ms | 80916 KB |
07-05.txt | AC | 480 ms | 83736 KB |
07-06.txt | AC | 477 ms | 83496 KB |
07-07.txt | AC | 407 ms | 73712 KB |
07-08.txt | AC | 405 ms | 73620 KB |
07-09.txt | AC | 466 ms | 73580 KB |
07-10.txt | AC | 468 ms | 73720 KB |
07-11.txt | AC | 464 ms | 73712 KB |
07-12.txt | AC | 461 ms | 74168 KB |
07-13.txt | AC | 438 ms | 77424 KB |
07-14.txt | AC | 473 ms | 77036 KB |
07-15.txt | AC | 458 ms | 77036 KB |
07-16.txt | AC | 462 ms | 76724 KB |
07-17.txt | AC | 456 ms | 77176 KB |
07-18.txt | AC | 459 ms | 77808 KB |
07-19.txt | AC | 456 ms | 82936 KB |
07-20.txt | AC | 457 ms | 87000 KB |
07-21.txt | AC | 484 ms | 90352 KB |
07-22.txt | AC | 437 ms | 73708 KB |
07-23.txt | AC | 462 ms | 73776 KB |
07-24.txt | AC | 463 ms | 73816 KB |
07-25.txt | AC | 467 ms | 73852 KB |
07-26.txt | AC | 471 ms | 73796 KB |
07-27.txt | AC | 464 ms | 73736 KB |
07-28.txt | AC | 405 ms | 79596 KB |
07-29.txt | AC | 432 ms | 79644 KB |
07-30.txt | AC | 419 ms | 79668 KB |
07-31.txt | AC | 423 ms | 79628 KB |
07-32.txt | AC | 422 ms | 79576 KB |
41-01.txt | AC | 2 ms | 3704 KB |
41-02.txt | AC | 2 ms | 3944 KB |
41-03.txt | AC | 2 ms | 3920 KB |
41-04.txt | AC | 2 ms | 3920 KB |
41-05.txt | AC | 3 ms | 3752 KB |
42-01.txt | AC | 9 ms | 3744 KB |
43-01.txt | AC | 185 ms | 90596 KB |
43-02.txt | AC | 184 ms | 90484 KB |
43-03.txt | AC | 188 ms | 90580 KB |
43-04.txt | AC | 187 ms | 90556 KB |
46-01.txt | AC | 192 ms | 46040 KB |
46-02.txt | AC | 189 ms | 46032 KB |
46-03.txt | AC | 199 ms | 45972 KB |
46-04.txt | AC | 196 ms | 45968 KB |
46-05.txt | AC | 197 ms | 46012 KB |
46-06.txt | AC | 198 ms | 46036 KB |
47-01.txt | AC | 390 ms | 90928 KB |
47-02.txt | AC | 393 ms | 90920 KB |
47-03.txt | AC | 405 ms | 90964 KB |
47-04.txt | AC | 403 ms | 90972 KB |
47-05.txt | AC | 409 ms | 90916 KB |
47-06.txt | AC | 405 ms | 90900 KB |
51-01.txt | AC | 2 ms | 3684 KB |
51-02.txt | AC | 2 ms | 3876 KB |
51-03.txt | AC | 3 ms | 3592 KB |
51-04.txt | AC | 2 ms | 3944 KB |
51-05.txt | AC | 3 ms | 3712 KB |
52-01.txt | AC | 9 ms | 3860 KB |
53-01.txt | AC | 168 ms | 73240 KB |
53-02.txt | AC | 166 ms | 73224 KB |
53-03.txt | AC | 170 ms | 73208 KB |
53-04.txt | AC | 169 ms | 73268 KB |
56-01.txt | AC | 181 ms | 37608 KB |
56-02.txt | AC | 193 ms | 37404 KB |
56-03.txt | AC | 194 ms | 37400 KB |
56-04.txt | AC | 192 ms | 37304 KB |
56-05.txt | AC | 194 ms | 37352 KB |
56-06.txt | AC | 195 ms | 37336 KB |
57-01.txt | AC | 371 ms | 73624 KB |
57-02.txt | AC | 405 ms | 73664 KB |
57-03.txt | AC | 401 ms | 73712 KB |
57-04.txt | AC | 396 ms | 73648 KB |
57-05.txt | AC | 402 ms | 73640 KB |
57-06.txt | AC | 400 ms | 73616 KB |
sample-01.txt | AC | 2 ms | 3588 KB |
sample-02.txt | AC | 2 ms | 3592 KB |
sample-03.txt | AC | 2 ms | 3836 KB |