QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#188243 | #4915. 海胆 | hos_lyric# | 35 | 67ms | 102532kb | C++14 | 4.0kb | 2023-09-25 17:15:37 | 2024-07-04 02:09:12 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
int root(vector<int> &uf, int u) {
return (uf[u] < 0) ? u : (uf[u] = root(uf, uf[u]));
}
bool connect(vector<int> &uf, int u, int v) {
u = root(uf, u);
v = root(uf, v);
if (u == v) return false;
if (uf[u] > uf[v]) swap(u, v);
uf[u] += uf[v];
uf[v] = u;
return true;
}
int N, Q;
vector<int> A, B;
vector<int> L, R;
vector<vector<int>> G;
namespace brute {
vector<int> par, on;
bool dfs(int l, int r, int u, int p, int pi) {
par[u] = p;
for (const int i : G[u]) if (l <= i && i < r) if (pi != i) {
const int v = A[i] ^ B[i] ^ u;
if (par[v] != -2) {
for (int w = u; ; w = par[w]) {
on[w] = 1;
if (w == v) break;
}
return true;
} else {
if (dfs(l, r, v, u, i)) return true;
}
}
return false;
}
int f[5010][5010];
vector<Int> run() {
memset(f, 0, sizeof(f));
for (int l = 0; l < N; ++l) {
int n = 0;
vector<int> deg(N, 0);
vector<int> uf(N, -1);
int cnt = 0;
for (int i = l; i < N; ++i) {
if (!deg[A[i]]++) ++n;
if (!deg[B[i]]++) ++n;
if (!connect(uf, A[i], B[i])) {
if (++cnt == 1) {
par.assign(N, -2);
on.assign(N, 0);
const bool res = dfs(l, i + 1, A[i], -1, -1);
assert(res);
for (int u = 0; u < N; ++u) if (!on[u] && deg[u] >= 3) {
goto failed;
}
// cerr<<"l = "<<l<<", i = "<<i<<endl;
} else {
goto failed;
}
}
if (cnt) {
if (!on[A[i]] && deg[A[i]] >= 3) goto failed;
if (!on[B[i]] && deg[B[i]] >= 3) goto failed;
if (n == (i + 1) - l) {
// [l, i+1)
// cerr<<" ["<<l<<", "<<i+1<<")"<<endl;
++f[l + 1][(i + 1) + 1];
}
}
}
failed:{}
}
for (int l = 0; l <= N + 1; ++l) for (int r = 0; r <= N + 1; ++r) f[l + 1][r] += f[l][r];
for (int l = 0; l <= N + 1; ++l) for (int r = 0; r <= N + 1; ++r) f[l][r + 1] += f[l][r];
vector<Int> ans(Q, 0);
for (int q = 0; q < Q; ++q) {
ans[q] += f[L[q]][L[q]];
ans[q] -= f[L[q]][R[q] + 1];
ans[q] -= f[R[q] + 1][L[q]];
ans[q] += f[R[q] + 1][R[q] + 1];
}
return ans;
}
} // brute
int main() {
for (; ~scanf("%d", &N); ) {
A.resize(N);
B.resize(N);
for (int i = 0; i < N; ++i) {
scanf("%d%d", &A[i], &B[i]);
--A[i];
--B[i];
}
scanf("%d", &Q);
L.resize(Q);
R.resize(Q);
for (int q = 0; q < Q; ++q) {
scanf("%d%d", &L[q], &R[q]);
--L[q];
}
G.assign(N, {});
for (int i = 0; i < N; ++i) {
G[A[i]].push_back(i);
G[B[i]].push_back(i);
}
const auto ans = brute::run();
for (int q = 0; q < Q; ++q) {
printf("%lld\n", ans[q]);
}
}
return 0;
}
詳細信息
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 3ms
memory: 101872kb
input:
10 1 3 3 4 1 2 5 2 5 6 2 6 3 4 2 9 2 1 3 1 5 1 10 9 10 3 10 1 7 4 9
output:
4 0 3 3 1
result:
ok 5 number(s): "4 0 3 3 1"
Test #2:
score: 0
Accepted
time: 4ms
memory: 101908kb
input:
97 4 1 1 2 6 7 1 3 7 6 3 1 4 5 1 2 3 5 3 2 29 2 31 94 8 80 32 8 46 8 8 31 31 29 32 29 12 32 2 1 1 3 7 2 6 8 3 2 3 2 3 4 5 1 2 3 3 2 4 1 4 8 5 3 1 2 2 1 4 9 1 3 2 4 6 5 62 9 7 27 27 64 88 27 88 64 27 9 6 9 2 3 8 5 5 7 8 4 5 4 1 2 3 2 10 5 2 1 1 2 2 5 2 1 2 1 5 3 9 2 1 3 3 2 1 3 3 5 3 4 2 4 4 6 3 1 2 ...
output:
87 0 10 19 9 1 47 1 12 16 0 64 13 15 54 54 40 4 0 52 35 35 15 0 4 68 61 31 63 35 13 29 44 21 27 2 13 50 0 48 35 73 1 42 35 42 68 48 8 3 44 40 27 52 54 24 3 0 20 21 14 35 2 9 22 70 5 39 16 0 55 43 14 22 20 47 55 48 22 31 25 4 42 0 26 21 51 42 35 27 24 34 44 8 51 36
result:
ok 96 numbers
Test #3:
score: 0
Accepted
time: 4ms
memory: 101924kb
input:
99 4 3 8 9 1 2 28 21 21 28 72 40 85 80 99 75 73 47 42 47 42 73 47 27 3 5 3 2 65 22 2 3 75 35 76 55 85 81 95 63 75 35 30 58 61 69 68 87 56 21 23 97 53 47 40 47 54 91 39 32 32 54 47 91 96 61 15 60 96 43 60 96 96 60 99 60 34 87 68 56 29 16 37 77 83 2 71 70 96 89 37 30 26 8 45 88 68 27 46 57 51 57 8 27 ...
output:
19 4 2 3 13 8 5 13 0 4 2 13 19 0 4 8 5 6 1 2 3 3 15 3 15 2 2 7 0 11 0 5 4 16 2 11 12 0 15 15 11 0 8 10 2 2 4 2 5 7 8 3 3 0 12 14 11 11 6 2 14 5 0 1 12 8 2 0 8 4 11 4 14 5 13 11 7 2 14 2 4 14 5 6 12 3 3 1 14 2 8 12 0 5 13
result:
ok 95 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 101796kb
input:
99 4 7 4 5 5 3 1 2 1 2 4 3 4 2 1 2 10 5 4 7 5 2 8 7 38 62 52 8 80 98 21 19 94 7 80 49 21 79 94 49 21 7 80 79 3 1 4 7 6 3 35 95 41 94 95 41 94 35 98 35 3 1 2 5 2 1 2 1 3 2 1 2 10 9 3 7 1 3 4 3 9 7 4 7 1 2 3 4 3 1 2 7 1 4 10 8 2 1 3 8 5 1 4 2 4 3 3 2 7 9 5 7 3 1 4 5 2 3 6 5 1 2 1 7 4 3 3 6 2 3 3 1 8 4...
output:
73 21 65 22 21 2 54 8 4 47 30 39 4 0 18 14 1 40 0 27 4 2 0 15 0 60 40 0 0 4 8 11 49 46 1 12 32 5 1 33 24 0 6 16 7 3 5 0 0 13 49 34 8 12 32 55 0 22 39 59 0 31 60 21 25 2 9 59 23 9 31 17 16 0 17 52 59 42 23 45 0 62 63 3 5 0 38 19 40 32 10 53 8 1 8 0 8 13
result:
ok 98 numbers
Test #5:
score: 0
Accepted
time: 0ms
memory: 101840kb
input:
100 5 6 3 5 1 6 1 4 6 5 9 6 2 4 7 2 1 2 78 17 68 78 68 17 16 17 5 1 2 3 4 1 98 54 97 20 62 98 81 62 20 95 95 81 97 98 2 1 2 7 8 5 3 6 5 1 2 7 8 7 2 6 4 8 1 3 1 3 2 1 4 1 1 2 87 29 51 38 87 51 51 87 28 87 71 12 71 12 3 1 1 2 2 4 2 4 3 1 38 59 15 38 15 74 74 59 81 59 2 6 9 5 94 65 59 14 59 18 18 65 14...
output:
68 36 18 30 43 17 2 33 13 16 33 0 8 24 37 19 21 0 2 49 0 24 42 23 36 28 0 56 13 30 0 29 19 5 0 20 3 12 9 4 38 30 38 40 9 0 6 25 33 19 26 4 38 37 21 12 48 17 40 6 12 2 33 22 28 53 63 28 0 36 26 19 25 3 64 13 2 0 2 28 2 17 11 2 34 30 29 40 4 14 22 38 5 26 52 22 2 42 42 15
result:
ok 100 numbers
Test #6:
score: 0
Accepted
time: 8ms
memory: 101816kb
input:
100 6 3 2 1 2 8 1 10 1 3 2 1 1 3 1 2 4 2 3 5 5 1 8 18 18 29 18 29 6 5 3 6 4 2 2 1 4 3 10 2 3 1 3 2 2 3 31 91 1 4 42 31 91 67 42 67 21 67 67 73 2 1 7 8 3 1 1 5 2 1 3 2 4 3 3 5 9 3 65 44 87 44 2 8 1 6 33 44 2 4 3 9 1 3 6 7 5 8 16 44 16 65 44 86 16 44 73 5 18 73 18 44 5 16 16 30 57 16 64 73 18 59 2 1 8...
output:
60 4 21 49 0 14 16 0 0 17 38 51 0 38 2 1 5 32 27 5 33 2 21 8 34 19 0 60 3 1 37 28 6 54 1 0 24 9 0 45 22 18 36 56 30 16 1 4 2 4 12 19 27 0 31 53 0 10 14 0 2 26 0 0 2 29 26 41 5 2 19 20 14 4 20 10 30 58 18 1 11 32 0 26 2 0 0 23 0 0 0 28 37 9 0 20 18 6 45 41
result:
ok 100 numbers
Subtask #2:
score: 15
Accepted
Dependency #1:
100%
Accepted
Test #7:
score: 15
Accepted
time: 3ms
memory: 101844kb
input:
498 1 2 185 374 112 96 1 5 1 2 32 63 151 32 436 196 242 2 269 186 288 277 109 165 360 493 394 414 29 435 21 436 310 98 29 317 397 32 400 485 394 248 471 288 438 40 109 394 284 268 112 75 493 437 176 493 432 185 259 286 391 485 242 155 227 256 1 397 423 155 149 310 471 308 331 358 269 436 242 149 244...
output:
308 49 120 148 8 171 2 142 45 118 127 123 0 176 49 49 50 59 75 44 1 20 146 132 308 176 176 0 43 294 176 109 127 235 59 13 20 127 114 176 39 19 156 0 45 0 42 176 256 71 20 159 0 186 105 50 120 128 99 171 33 133 36 177 154 136 142 192 178 3 287 181 49 137 0 13 90 0 165 239 0 22 0 86 159 215 1 0 68 132...
result:
ok 498 numbers
Test #8:
score: 0
Accepted
time: 4ms
memory: 101912kb
input:
500 3 6 2 3 2 1 1 8 5 7 7 8 3 9 1 2 2 1 1 3 1 2 3 1 3 1 2 1 1 4 9 7 7 8 5 1 1 2 2 6 6 3 1 2 2 1 1 3 6 2 3 4 7 5 5 3 1 2 8 5 5 10 1 2 1 8 5 6 7 4 3 1 1 3 1 2 1 3 1 2 2 3 1 2 4 10 5 4 2 1 2 1 333 94 57 487 28 57 161 20 259 244 31 397 124 435 358 111 401 191 70 161 499 70 499 373 308 400 172 17 400 358...
output:
480 102 134 203 45 8 167 134 84 104 196 85 94 94 94 249 179 181 65 40 219 40 10 0 465 0 105 29 151 190 435 30 29 334 0 377 0 105 0 29 195 224 2 167 224 0 84 218 65 16 224 105 17 65 195 105 137 36 174 176 181 68 196 0 81 95 14 65 134 55 190 19 13 0 367 134 55 45 0 40 10 16 30 0 94 66 29 331 20 65 65 ...
result:
ok 500 numbers
Test #9:
score: 0
Accepted
time: 8ms
memory: 101956kb
input:
500 3 5 387 191 212 238 449 389 58 137 58 137 418 214 315 412 455 204 232 36 3 238 140 242 242 140 484 304 164 314 35 121 464 79 257 492 451 185 22 288 209 383 3 455 295 314 499 397 393 418 205 127 58 418 23 418 455 263 110 335 314 18 464 368 397 299 58 356 464 121 85 58 451 391 397 129 397 314 451 ...
output:
319 185 74 26 50 118 127 92 26 54 50 92 82 93 177 94 24 0 63 95 3 24 221 129 128 0 180 50 50 0 0 145 0 246 0 121 0 0 93 143 220 121 157 0 59 97 50 23 249 95 23 0 47 24 119 124 218 50 1 21 79 3 30 128 50 86 27 24 249 142 69 30 84 94 41 122 108 0 97 48 15 180 92 47 26 1 29 143 180 26 95 29 1 25 24 24 ...
result:
ok 500 numbers
Test #10:
score: 0
Accepted
time: 3ms
memory: 102132kb
input:
500 7 3 2 6 3 1 1 2 1 2 10 3 2 3 3 1 4 3 9 1 1 4 8 3 3 1 1 5 6 8 2 1 2 3 3 2 3 2 4 6 3 7 2 1 4 6 1 2 1 7 3 4 4 2 2 1 120 79 3 2 5 4 374 449 22 193 354 234 1 2 2 1 363 449 193 308 193 418 271 453 193 20 54 256 467 245 43 256 54 43 120 272 421 216 193 336 193 251 296 193 301 453 427 421 120 377 449 48...
output:
594 4 0 20 52 592 64 61 413 0 127 5 13 51 69 477 48 59 61 9 130 9 54 73 48 68 141 13 60 0 141 147 21 52 57 0 13 0 65 133 109 0 64 71 20 7 440 425 61 86 9 562 0 89 40 57 474 1 64 3 61 64 60 10 13 0 455 487 13 54 66 477 40 412 9 413 65 478 13 23 8 74 0 84 65 413 123 57 321 72 72 23 0 64 23 9 3 453 155...
result:
ok 500 numbers
Test #11:
score: 0
Accepted
time: 0ms
memory: 101872kb
input:
500 1 2 5 3 1 2 2 1 1 3 5 7 6 7 1 4 8 3 2 4 5 6 1 2 6 3 1 9 2 4 2 4 1 2 2 1 4 1 2 3 1 6 2 1 9 7 1 2 6 3 4 1 1 2 1 3 4 3 2 1 1 6 2 1 5 2 4 1 3 4 4 3 7 8 10 3 3 4 2 1 6 1 4 2 7 8 2 1 2 5 6 5 3 4 1 2 7 4 1 2 9 4 1 4 3 1 1 3 1 3 8 3 1 3 2 1 1 2 3 2 2 3 1 3 1 2 2 1 111 159 111 159 3 2 3 2 2 6 4 3 1 6 10 ...
output:
768 505 108 8 643 107 60 34 320 46 718 664 97 2 105 0 3 24 165 483 572 26 726 517 57 531 565 49 25 627 34 29 548 208 629 511 486 4 530 665 24 33 10 79 25 706 654 644 146 4 127 72 524 21 90 538 647 621 51 5 20 203 54 522 602 15 51 683 622 650 113 186 651 550 103 11 50 547 190 43 93 72 510 85 77 13 71...
result:
ok 500 numbers
Subtask #3:
score: 15
Accepted
Dependency #2:
100%
Accepted
Test #12:
score: 15
Accepted
time: 59ms
memory: 102248kb
input:
4996 1 10 2 3 5 6 4 2 6 1 5 2 2 1 3 1 4 2 4 3 4 3 1 7 1 3 1 2 2 1 4 3 6 5 3 6 3 1 3 2 1 5 2 6 1 2 9 1 7 3 3 2 2 3 3 1 9 3 4 3 4 5 6 5 1 3 4 3 7 2 1 2 1 2 6 2 2 1 6 4 3 2 7 2 1 2 1 3 5 1 1 6 7 2 6 2 1 8 2 1 7 4 4 1 2 1 3 4 2 5 8 1 8 5 5 3 2 1 3 6 1 4 1 3 1 2 1 5 7 2 7 4 1 4 4 3 1 3 4 7 6 1 4 2 5 6 9 ...
output:
5990 188 3230 1916 0 189 3683 5361 5603 0 1915 930 188 5302 1916 1 2532 5475 1915 213 18 48 220 3481 1933 1891 0 1690 931 18 1934 170 1702 221 0 3682 214 5280 4 5412 1879 1916 5027 170 1933 1 4505 1003 1701 18 1 5545 2103 0 1916 1933 3326 188 2784 3485 0 2532 612 1698 1702 1934 18 0 1 1891 3522 0 21...
result:
ok 4996 numbers
Test #13:
score: 0
Accepted
time: 67ms
memory: 102192kb
input:
5000 6 7 4 10 2 3 3 2 2 1 1 3 4 5 1 2 4 2 1 2 1 2 2 3 2 9 4 1 1 2 2 1 5 1 3 6 1 3 1 3 2 3 3 2 5 4 1 5 2 1 2 3 1 8 1 2 2 4 1 2 6 9 1 3 3 2 2 3 8 2 5 2 2 3 2 1 4 1 146 4036 3203 2822 2892 694 1131 3233 3525 332 1221 756 1229 1536 2178 694 694 2350 2343 3589 1603 4810 2613 1336 4810 694 1336 964 2343 2...
output:
6803 177 2658 1812 557 5319 2745 795 4340 2516 5276 1780 126 1042 1123 1666 3697 1482 2625 4000 939 3205 5060 4398 1396 1229 2245 1381 3672 1806 2762 4291 491 1536 758 4 1297 1311 1238 3468 1703 672 2080 1229 2102 638 483 3257 3290 152 2435 4395 3604 1688 17 2035 529 2630 3070 2598 516 1138 3356 585...
result:
ok 5000 numbers
Test #14:
score: 0
Accepted
time: 60ms
memory: 102272kb
input:
5000 1 6 3 1 4 7 4 2 1 3 2 1 4 2 1 6 2 3 5 1 1 2 1 4 1 3 1 2 9 6 1 2 1 7 6 5 4 3 6 1 2 1 6 2 8 1 2 3 6 4 3 2 3 1 4 1 6 3 3 1 2 1 3 1 4 5 2 3 9 8 2 3 3 1 2 1 3 2 4 8 1 5 2 1 1 2 2 9 7 3 10 6 5 2 1 7 2 1 1 2 2 1 3 1 8 2 3 6 3 8 1 3 1 6 7 3 6 10 5 1 6 1 6 7 3 4 3 1 5 8 7 5 2 6 2 4 2 3 1 2 3 1 5 4 1 3 3...
output:
12605 9835 8732 5742 10572 31 914 879 1118 1092 11911 10888 7832 15 977 10837 9835 8735 11584 9473 0 561 6380 6864 1862 7986 9968 11168 6380 11230 9678 10691 413 992 9 1661 1136 2066 9835 1355 3775 10317 2010 10725 1299 1366 0 3833 3146 6879 11435 3 11617 10469 9832 11849 2041 11090 8732 4165 11259 ...
result:
ok 5000 numbers
Test #15:
score: 0
Accepted
time: 63ms
memory: 102496kb
input:
5000 1 3 1 3 5 2 2 1 3 1 1 3 3 4 4 1 2 1 5 7 3 5 10 5 3 2 2 5 1 3 2 3 7 2 3 5 3 2 3 1 3 1 1 3 3 5 1 5 2 4 3 2 3 1 3 6 1 3 1 2 2 1 2 1 1 2 7 4 3 2 8 4 1 8 1 2 3 5 4 3 2 1 5 1 3 1 5 3 1 2 2 1 7 4 3 5 1 2 1 2 5 4 3 5 1 3 1 3 2 3 3 4 5 7 5 3 5 6 6 5 7 2 2 6 1 3 5 1 2169 2173 3017 3079 3431 2217 2029 221...
output:
9253 1207 5979 844 7864 1678 5183 5565 2115 5531 1124 4383 5771 5458 1661 1 1164 2056 1220 2544 565 7704 2256 5105 9075 3327 613 2380 3328 64 1807 1630 222 6579 4560 5391 848 3627 690 868 7425 512 0 2420 1 3083 2502 2368 4972 5699 4255 668 13 4360 811 7262 443 6919 6166 223 5508 4590 4867 1365 5582 ...
result:
ok 5000 numbers
Test #16:
score: 0
Accepted
time: 64ms
memory: 102532kb
input:
5000 1 6 6 8 1 3 3 7 5 7 1 2 1 5 2 8 7 5 7 3 2 4 6 2 1 2 5 3 1 2 10 6 2 3 5 2 8 1 6 1 1 7 1 5 2 4 3 2 6 1 2 4 2 7 1 2 2 1 2 5 1 2 1 6 2 1 2 3 5 1 3 7 5 2 9 4 4 5 1698 2236 2166 3865 2236 2166 1526 1530 2166 1439 10 6 5 6 2 1 8 6 1530 1439 1439 4499 1439 2166 2 6 4 1 2 1 4 2 1 5 2 7 4 8 3 7 2 1 6 2 1...
output:
31787 14922 0 15031 28287 28459 27154 27082 362 275 8292 224 673 206 27679 27755 31139 15862 27358 0 27082 4507 27637 0 3301 388 31102 28115 27358 30 27082 3073 27637 12899 27366 27999 118 27639 137 601 30632 276 14250 29067 0 27639 673 16535 7458 179 31245 27785 26 31314 7 27358 0 23002 477 616 276...
result:
ok 5000 numbers
Subtask #4:
score: 0
Runtime Error
Dependency #3:
100%
Accepted
Test #17:
score: 0
Runtime Error
input:
50000 4 1 6 7 2 1 2 3 6 3 4 5 6 1 3 7 3 2 1 2 2 3 1 2 2 1 2 4 7 6 1 3 1 3 1 4 4 7 5 1 2 1 2 1 3 1 2 3 4 5 1 4 5 8 4 2 4 3 4 6 5 1 4 5 8 6 4 7 5 4 1 6 4 8 8 3 4 6 2 4 2 4 6 1 8 6 2 1 2 1 6 3 4 1 1 2 1 6 3 4 4 5 9 2 8 2 8 7 4 5 5 4 9 7 5 1 1 4 1 5 9 3 4 1 2 4 1 2 1 5 9 3 2 1 3 2 2 1 1 3 3 5 3 1 4 2 7 ...
output:
result:
Subtask #5:
score: 0
Time Limit Exceeded
Test #22:
score: 0
Time Limit Exceeded
input:
1000000 1 2 1 4 2 1 3 6 6 5 1 3 10 5 2 4 9 6 3 2 1 2 5 1 4 3 1 3 1 4 2 9 6 4 1 2 1 2 1 2 3 4 3 4 7 5 1 2 1 2 2 1 7 8 1 2 5 4 1 3 2 1 4 2 1 4 1 4 4 2 1 3 1 3 7 4 3 4 3 2 2 1 1 2 1 2 2 5 10 6 2 3 2 5 7 2 5 4 4 5 5 7 2 1 8 5 2 1 2 1 1 3 4 6 3 1 2 5 4 8 6 3 1 4 1 2 1 3 9 8 6 5 3 4 3 2 1 3 4 2 1 6 2 1 1 ...
output:
result:
Subtask #6:
score: 0
Time Limit Exceeded
Test #27:
score: 0
Time Limit Exceeded
input:
1000000 194603 719066 675018 226509 79442 45350 917512 353429 61308 216895 411878 891116 152492 299355 285259 500703 362450 305858 809620 298590 353068 307896 594296 243696 962716 546635 865529 461074 454115 255260 569303 319052 266164 139614 575510 107514 840723 802795 583117 41941 891173 661899 94...
output:
result:
Subtask #7:
score: 0
Skipped
Dependency #4:
0%