QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#295951 | #6339. Cookies | A_programmer | 100 ✓ | 47ms | 210308kb | C++20 | 2.1kb | 2024-01-01 18:57:36 | 2024-01-01 18:57:38 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int maxn = 15005;
bitset<maxn> dp[300005];
priority_queue<pii> pq;
vector<int> v, res[maxn];
int a[maxn], b[maxn], id[maxn], pre[300005], tmp[maxn], sum[maxn], c[maxn], cnt;
bool cmp(int x, int y) { return a[x] < a[y]; }
bool cmp2(int x, int y) { return x > y; }
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int n, m, S = 0;
cin >> n;
for (int i = 1; i <= n; i++) cin >> a[i], S += a[i], id[i] = i;
sort(id + 1, id + n + 1, cmp);
int lst = 0, nw = 0;
for (int i = 1; i <= n; i++)
{
for (int j = lst + 1; j <= a[id[i]]; j++) sum[j] = nw + (n - i + 1) * j;
nw += a[id[i]];
lst = a[id[i]];
}
for (int j = lst + 1; j <= S; j++) sum[j] = nw;
cin >> m;
for (int i = 1; i <= m; i++) cin >> b[i];
dp[++cnt][S] = 1;
tmp[0] = 1;
for (int i = m; i; i--)
{
v.clear();
for (int j = 0; j <= S / b[i]; j++)
{
cnt++;
v.emplace_back(cnt);
pre[cnt] = tmp[j];
if (tmp[j]) dp[cnt] = dp[tmp[j]];
tmp[j] = cnt;
}
for (int j = 0; j < S / b[i]; j++) dp[v[j + 1]] |= (dp[v[j]] >> b[i]);
for (int j = 0; j <= S / b[i]; j++) dp[v[j]] = (dp[v[j]] >> (S - sum[j])) << (S - sum[j]);
}
int ans = -1, pos;
for (int i = 0; i < v.size(); i++)
if (dp[v[i]][0])
{
ans = i;
pos = v[i];
break;
}
if (ans == -1)
{
cout << "-1";
return 0;
}
cout << ans << "\n";
int x = pos, y = 0, ddd = ans;
for (int i = 1; i <= m; i++)
{
if (!x) break;
while (x && dp[x - 1][y + b[i]])
{
c[ddd--] = b[i];
x--;
y += b[i];
}
x = pre[x];
}
for (int i = 1; i <= ans; i++) pq.push(make_pair(c[i], i));
for (int i = 1; i <= n; i++)
{
v.clear();
for (int j = 1; j <= a[id[i]]; j++)
v.emplace_back(pq.top().second), pq.pop();
for (int j = 0; j < a[id[i]]; j++)
res[v[j]].emplace_back(id[i]), c[v[j]]--, pq.push(make_pair(c[v[j]], v[j]));
}
for (int i = 1; i <= ans; i++)
{
cout << res[i].size() << " ";
for (int x : res[i]) cout << x << " ";
cout << "\n";
}
return 0;
}
详细
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 0ms
memory: 3744kb
input:
1 1 1 1
output:
1 1 1
result:
ok good!
Test #2:
score: 0
Accepted
time: 1ms
memory: 3792kb
input:
2 1 1 1 1
output:
2 1 2 1 1
result:
ok good!
Test #3:
score: 0
Accepted
time: 1ms
memory: 4016kb
input:
2 1 1 1 2
output:
1 2 1 2
result:
ok good!
Test #4:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
2 1 1 2 1 2
output:
1 2 1 2
result:
ok good!
Test #5:
score: 0
Accepted
time: 1ms
memory: 3856kb
input:
4 1 1 1 1 2 2 3
output:
2 2 2 4 2 1 3
result:
ok good!
Test #6:
score: 0
Accepted
time: 1ms
memory: 3824kb
input:
8 1 1 1 1 1 1 1 1 3 1 4 5
output:
2 4 2 4 6 8 4 1 3 5 7
result:
ok good!
Test #7:
score: 0
Accepted
time: 1ms
memory: 4972kb
input:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
500 1 158 1 159 1 160 1 161 1 162 1 163 1 164 1 165 1 166 1 167 1 168 1 169 1 170 1 171 1 1 1 173 1 174 1 175 1 176 1 177 1 178 1 179 1 180 1 181 1 182 1 183 1 184 1 185 1 186 1 187 1 172 1 127 1 128 1 129 1 130 1 131 1 132 1 133 1 134 1 135 1 136 1 137 1 13...
result:
ok good!
Test #8:
score: 0
Accepted
time: 1ms
memory: 3876kb
input:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
1 500 329 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 345 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 360 375 374 373 372 371 370 369 368 367 366 365 364 363 362 361 313 359 358 357 356 355 354 353 352 351 350 349 348 347 346 266 281 280 279 278 277 276 275 274 273 27...
result:
ok good!
Test #9:
score: 0
Accepted
time: 0ms
memory: 10824kb
input:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
2 499 329 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 345 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 360 375 374 373 372 371 370 369 368 367 366 365 364 363 362 361 313 359 358 357 356 355 354 353 352 351 350 349 348 347 346 266 281 280 279 278 277 276 275 274 273 27...
result:
ok good!
Test #10:
score: 0
Accepted
time: 1ms
memory: 4784kb
input:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
-1
result:
ok no solution
Test #11:
score: 0
Accepted
time: 0ms
memory: 7228kb
input:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
11 46 336 326 316 369 359 349 275 264 253 304 293 454 459 448 500 489 478 404 393 382 433 251 411 88 77 66 118 107 96 22 11 62 51 40 217 206 195 247 236 225 151 140 129 180 169 158 46 337 327 317 370 313 350 276 265 254 305 294 283 460 449 485 490 479 405 394 383 434 423 412 89 78 67 119 108 97 23 ...
result:
ok good!
Test #12:
score: 0
Accepted
time: 0ms
memory: 4744kb
input:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
250 2 408 158 2 409 159 2 410 160 2 411 161 2 412 162 2 413 163 2 414 164 2 415 165 2 416 166 2 417 167 2 418 168 2 419 169 2 420 170 2 421 171 2 251 1 2 423 173 2 424 174 2 425 175 2 426 176 2 427 177 2 428 178 2 429 179 2 430 180 2 431 181 2 432 182 2 433 183 2 434 184 2...
result:
ok good!
Test #13:
score: 0
Accepted
time: 1ms
memory: 5012kb
input:
484 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
22 22 313 352 269 247 285 445 484 462 394 417 395 71 110 27 5 43 203 242 220 152 175 153 22 314 353 270 248 286 446 470 463 380 418 396 72 111 28 6 44 204 228 221 138 176 154 22 315 354 271 249 287 447 425 464 381 419 397 73 112 29 7 45 205 183 222 139 177 155 22 316 355 272 250 364 448 426 465 3...
result:
ok good!
Test #14:
score: 0
Accepted
time: 0ms
memory: 4924kb
input:
495 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
55 9 349 372 487 432 68 13 205 151 157 9 350 295 488 433 69 14 206 152 158 9 351 296 489 418 70 15 207 153 159 9 352 297 490 373 71 32 208 154 160 9 353 298 491 374 72 17 209 155 161 9 354 299 492 375 73 18 210 140 162 9 355 300 493 376 74 19 211 218 163 9 310 301 494 377 75 20 212 219 164 9...
result:
ok good!
Test #15:
score: 0
Accepted
time: 1ms
memory: 5180kb
input:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
4 125 342 338 334 330 326 322 318 314 373 369 365 361 357 353 349 266 278 274 270 282 262 258 254 312 308 304 300 296 292 288 284 468 464 460 456 452 448 444 440 499 495 491 487 483 479 475 471 404 400 396 392 388 384 380 422 434 430 426 251 418 414 410 94 90 86 82 78 74 70 66 125 121 117 113 109 10...
result:
ok good!
Test #16:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
499 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
27 21 323 364 279 257 375 461 438 478 392 431 408 74 114 28 5 44 204 239 150 185 158 21 324 365 280 258 297 462 439 479 393 432 409 75 115 29 6 45 205 240 151 186 159 21 325 366 265 259 298 463 440 480 394 433 410 76 116 30 7 46 206 241 152 187 160 21 326 367 345 260 299 464 441 481 395 434 411 7...
result:
ok good!
Test #17:
score: 0
Accepted
time: 1ms
memory: 4828kb
input:
499 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
19 27 327 372 354 273 255 299 453 451 496 478 397 379 423 94 75 119 100 18 61 42 210 191 188 153 134 177 158 27 344 373 355 274 256 300 282 452 497 479 398 380 424 79 76 120 101 19 62 43 211 192 235 154 135 178 159 27 329 374 356 275 257 301 283 469 498 480 399 381 425 407 77 121 102 20 47 44 212 ...
result:
ok good!
Test #18:
score: 0
Accepted
time: 1ms
memory: 3988kb
input:
499 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
7 88 341 337 333 329 325 321 317 313 372 368 364 360 356 352 348 265 277 273 269 281 261 257 253 310 304 298 292 286 468 462 456 450 444 438 495 489 483 477 471 402 396 406 384 378 434 428 422 416 410 93 87 81 75 69 110 120 114 108 102 96 27 21 15 9 3 59 53 126 41 35 215 208 201 194 249 242 235 228 ...
result:
ok good!
Test #19:
score: 0
Accepted
time: 1ms
memory: 3980kb
input:
499 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
4 243 328 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 344 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 359 374 373 372 371 370 369 368 367 366 365 364 363 362 361 360 312 358 357 356 355 354 353 352 351 350 349 348 347 346 345 265 280 279 278 277 276 275 274 273 272 27...
result:
ok good!
Test #20:
score: 0
Accepted
time: 2ms
memory: 4952kb
input:
499 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
2 488 328 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 344 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 359 374 373 372 371 370 369 368 367 366 365 364 363 362 361 360 312 358 357 356 355 354 353 352 351 350 349 348 347 346 345 265 280 279 278 277 276 275 274 273 272 27...
result:
ok good!
Test #21:
score: 0
Accepted
time: 0ms
memory: 6928kb
input:
499 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
-1
result:
ok no solution
Test #22:
score: 0
Accepted
time: 0ms
memory: 6468kb
input:
499 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
-1
result:
ok no solution
Test #23:
score: 0
Accepted
time: 2ms
memory: 5040kb
input:
493 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
17 477 324 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 340 323 322 321 320 319 318 317 316 315 314 313 312 311 310 355 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 309 354 353 352 351 350 349 348 347 346 345 344 343 342 341 262 277 276 275 274 273 272 271 270 269 268 2...
result:
ok good!
Test #24:
score: 0
Accepted
time: 0ms
memory: 4960kb
input:
493 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
17 477 324 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 340 323 322 321 320 319 318 317 316 315 314 313 312 311 310 355 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 309 354 353 352 351 350 349 348 347 346 345 344 343 342 341 262 277 276 275 274 273 272 271 270 269 268 2...
result:
ok good!
Test #25:
score: 0
Accepted
time: 1ms
memory: 4140kb
input:
493 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
17 237 324 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 340 323 322 321 320 319 318 317 316 315 314 313 312 311 310 355 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 309 354 353 352 351 350 349 348 347 346 345 344 343 342 341 262 277 276 275 274 273 272 271 270 269 268 2...
result:
ok good!
Test #26:
score: 0
Accepted
time: 1ms
memory: 4228kb
input:
493 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
17 237 324 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 340 323 322 321 320 319 318 317 316 315 314 313 312 311 310 355 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 309 354 353 352 351 350 349 348 347 346 345 344 343 342 341 262 277 276 275 274 273 272 271 270 269 268 2...
result:
ok good!
Test #27:
score: 0
Accepted
time: 1ms
memory: 4540kb
input:
493 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
17 237 324 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 340 323 322 321 320 319 318 317 316 315 314 313 312 311 310 355 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 309 354 353 352 351 350 349 348 347 346 345 344 343 342 341 262 277 276 275 274 273 272 271 270 269 268 2...
result:
ok good!
Subtask #2:
score: 7
Accepted
Test #28:
score: 7
Accepted
time: 1ms
memory: 3824kb
input:
1 15 1 1
output:
15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
result:
ok good!
Test #29:
score: 0
Accepted
time: 2ms
memory: 4800kb
input:
1 500 1 1
output:
500 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
result:
ok good!
Test #30:
score: 0
Accepted
time: 0ms
memory: 9652kb
input:
1 3000 1 1
output:
3000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok good!
Test #31:
score: 0
Accepted
time: 11ms
memory: 31980kb
input:
1 15000 1 1
output:
15000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok good!
Test #32:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
2 2 1 1 1
output:
3 1 1 1 1 1 2
result:
ok good!
Test #33:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
2 1 2 1 2
output:
-1
result:
ok no solution
Test #34:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
3 1 2 3 1 2
output:
3 2 2 3 2 2 3 2 1 3
result:
ok good!
Test #35:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
3 3 2 1 1 3
output:
-1
result:
ok no solution
Test #36:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
3 2 2 2 1 2
output:
3 2 2 3 2 1 3 2 1 2
result:
ok good!
Test #37:
score: 0
Accepted
time: 1ms
memory: 3912kb
input:
15 50 49 48 47 46 45 44 43 42 41 40 2 1 1 1 1 10
output:
50 10 10 9 8 7 6 5 4 3 2 1 10 10 9 8 7 6 5 4 3 2 1 10 10 9 8 7 6 5 4 3 2 1 10 10 9 8 7 6 5 4 3 2 1 10 10 9 8 7 6 5 4 3 2 1 10 11 9 8 7 6 5 4 3 2 1 10 11 9 8 7 6 5 4 3 2 1 10 11 9 8 7 6 5 4 3 2 1 10 11 9 8 7 6 5 4 3 2 1 10 11 9 8 7 6 5 4 3 2 1 10 11 9 8 7 6 5 4 3 2 1 10 11 9 8 7 6 5 4 3 2 ...
result:
ok good!
Test #38:
score: 0
Accepted
time: 1ms
memory: 4076kb
input:
15 51 49 48 47 46 45 44 43 42 41 40 1 1 1 1 1 10
output:
-1
result:
ok no solution
Test #39:
score: 0
Accepted
time: 4ms
memory: 10944kb
input:
10 430 3078 390 349 3750 906 377 3374 1795 551 1 4
output:
3750 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5 4 9 2 8 5...
result:
ok good!
Test #40:
score: 0
Accepted
time: 4ms
memory: 13508kb
input:
500 4 99 56 16 7 39 5 8 3 18 15 30 19 27 46 47 24 55 1 7 21 1 13 5 53 32 12 98 12 121 3 118 25 15 8 32 29 7 13 3 29 94 22 4 12 37 15 52 14 9 59 22 3 16 9 77 5 17 41 22 16 6 3 32 33 34 18 1 28 4 72 4 3 40 21 13 22 16 42 77 2 16 1 1 10 11 3 34 21 28 4 173 24 57 17 9 20 116 21 72 17 165 28 30 6 13 86 1...
output:
5000 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 238 3 187 176 ...
result:
ok good!
Test #41:
score: 0
Accepted
time: 3ms
memory: 4340kb
input:
500 30 23 12 48 4 11 119 12 15 24 33 9 22 46 42 7 18 49 9 1 43 3 4 43 31 11 4 7 33 30 13 5 36 3 20 2 40 37 7 1 8 43 34 12 2 37 99 38 59 36 24 18 68 23 9 24 33 1 13 10 12 2 7 7 1 5 73 7 7 32 2 13 7 49 41 20 160 69 11 61 25 35 15 22 32 66 47 45 34 14 12 7 9 43 4 42 2 24 29 16 11 6 5 5 8 11 42 3 48 20 ...
output:
200 75 490 210 429 487 91 301 162 194 240 415 76 314 271 98 500 132 179 113 292 445 390 266 466 440 82 376 38 48 37 411 15 112 21 413 206 87 400 492 494 124 165 457 361 298 381 126 267 127 458 226 53 163 78 305 391 303 433 484 223 144 233 449 197 335 265 264 447 195 435 7 336 297 77 284 496 75 490 ...
result:
ok good!
Test #42:
score: 0
Accepted
time: 2ms
memory: 4232kb
input:
500 6 60 24 11 17 58 8 42 30 60 38 34 54 23 5 12 32 6 35 11 60 42 35 60 25 60 37 40 5 22 24 26 17 17 60 21 7 29 13 7 56 12 8 16 8 20 11 60 12 60 32 56 30 55 12 23 26 60 60 6 18 60 60 21 21 16 28 23 60 9 16 4 8 5 20 4 60 59 39 20 8 27 8 7 6 8 10 30 18 15 60 60 41 48 17 24 17 60 10 42 6 13 22 21 14 18...
output:
60 250 231 60 227 219 40 73 173 472 333 449 20 262 123 141 42 488 370 39 105 268 399 224 207 118 322 332 34 494 110 435 436 374 89 493 328 204 401 80 461 36 417 291 194 186 254 68 340 14 140 96 31 174 235 424 309 236 32 150 240 327 275 276 469 157 315 287 484 156 440 38 482 381 402 9 326 310 244 323...
result:
ok good!
Test #43:
score: 0
Accepted
time: 2ms
memory: 4124kb
input:
122 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 ...
output:
122 121 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 93 76 75 74 73 72 71 70 69 68 67 66 65 64 63 108 122 121 120 119 118 117 116 115 114 113 112 111 110 109 62 107 106 105 104 103 102 101 100 99 98 97 96 95 94 16 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 32 15 14 13 12 11 10 9 8 7 6 5 4 3 2 47 6...
result:
ok good!
Test #44:
score: 0
Accepted
time: 1ms
memory: 4012kb
input:
498 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
3 332 343 342 340 339 337 336 334 333 331 330 344 327 325 324 322 321 319 318 316 315 313 359 373 372 370 369 367 366 364 363 361 360 358 357 355 354 352 351 349 348 346 345 280 279 277 276 274 273 271 270 268 267 281 264 262 261 259 258 256 255 253 252 296 311 309 308 306 305 303 302 300 299 297 37...
result:
ok good!
Subtask #3:
score: 12
Accepted
Test #45:
score: 12
Accepted
time: 0ms
memory: 3900kb
input:
2 7 8 2 1 2
output:
8 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 1 2
result:
ok good!
Test #46:
score: 0
Accepted
time: 1ms
memory: 3884kb
input:
3 5 4 6 2 2 3
output:
6 3 2 1 3 3 2 1 3 3 2 1 3 2 1 3 2 1 3 2 2 3
result:
ok good!
Test #47:
score: 0
Accepted
time: 1ms
memory: 3916kb
input:
3 4 2 9 3 1 2 3
output:
9 3 2 1 3 3 2 1 3 2 1 3 2 1 3 1 3 1 3 1 3 1 3 1 3
result:
ok good!
Test #48:
score: 0
Accepted
time: 1ms
memory: 3812kb
input:
4 3 5 4 3 2 3 4
output:
5 3 4 3 2 3 4 3 2 3 1 3 2 3 1 3 2 3 1 4 2
result:
ok good!
Test #49:
score: 0
Accepted
time: 1ms
memory: 5592kb
input:
4 1 4 5 5 3 1 3 4
output:
5 3 2 3 4 3 2 3 4 3 2 3 4 3 2 3 4 3 1 3 4
result:
ok good!
Test #50:
score: 0
Accepted
time: 1ms
memory: 5524kb
input:
4 3 3 6 3 3 2 3 4
output:
6 4 1 2 4 3 3 1 4 3 2 4 3 2 2 3 2 2 3 2 1 3
result:
ok good!
Test #51:
score: 0
Accepted
time: 0ms
memory: 5476kb
input:
5 4 3 3 3 1 3 2 4 5
output:
4 4 2 3 4 1 4 2 3 4 1 4 5 2 4 1 2 3 1
result:
ok good!
Test #52:
score: 0
Accepted
time: 1ms
memory: 5488kb
input:
5 4 3 3 3 2 3 3 4 5
output:
4 5 5 2 3 4 1 4 5 3 4 1 3 2 4 1 3 2 3 1
result:
ok good!
Test #53:
score: 0
Accepted
time: 1ms
memory: 5528kb
input:
5 4 4 4 2 1 3 2 4 5
output:
5 5 5 4 1 2 3 4 4 1 2 3 2 2 3 2 1 3 2 1 2
result:
ok good!
Test #54:
score: 0
Accepted
time: 1ms
memory: 5644kb
input:
5 3 3 3 3 3 3 1 2 4
output:
5 4 1 2 4 5 4 1 2 3 5 4 1 2 3 5 2 3 4 1 4
result:
ok good!
Test #55:
score: 0
Accepted
time: 1ms
memory: 5580kb
input:
6 3 3 3 2 2 2 3 2 4 6
output:
-1
result:
ok no solution
Test #56:
score: 0
Accepted
time: 1ms
memory: 5584kb
input:
6 3 3 3 2 2 2 3 2 5 6
output:
3 5 5 6 1 2 3 5 4 6 1 2 3 5 4 5 1 2 3
result:
ok good!
Test #57:
score: 0
Accepted
time: 1ms
memory: 5532kb
input:
6 4 4 3 2 1 1 3 1 3 5
output:
5 5 6 4 3 1 2 5 5 4 3 1 2 3 3 1 2 1 2 1 1
result:
ok good!
Test #58:
score: 0
Accepted
time: 1ms
memory: 5480kb
input:
6 7 2 2 2 1 1 5 2 3 4 5 6
output:
7 3 5 4 1 2 4 1 2 3 1 2 3 1 2 2 1 2 2 1 2 6 1
result:
ok good!
Test #59:
score: 0
Accepted
time: 1ms
memory: 5644kb
input:
7 3 3 3 2 2 1 1 3 1 4 6
output:
4 6 6 7 5 1 2 3 4 4 1 2 3 4 4 5 1 3 1 2
result:
ok good!
Test #60:
score: 0
Accepted
time: 1ms
memory: 5544kb
input:
7 4 4 3 1 1 1 1 3 1 4 6
output:
6 4 6 3 1 2 4 5 3 1 2 4 4 7 3 2 1 2 1 1 1 1
result:
ok good!
Test #61:
score: 0
Accepted
time: 1ms
memory: 5696kb
input:
8 2 2 2 2 2 2 2 1 6 1 2 3 4 6 7
output:
3 7 1 2 3 4 5 6 7 7 8 1 2 3 4 5 7 1 6
result:
ok good!
Test #62:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
8 3 3 3 2 1 1 1 1 4 4 6 7 8
output:
3 7 5 6 7 4 1 2 3 4 4 1 2 3 4 8 1 2 3
result:
ok good!
Test #63:
score: 0
Accepted
time: 0ms
memory: 5532kb
input:
8 4 3 3 1 1 1 1 1 4 1 6 7 8
output:
8 8 4 5 6 7 8 2 3 1 1 1 1 1 1 1 1 3 1 3 1 2 1 2
result:
ok good!
Test #64:
score: 0
Accepted
time: 1ms
memory: 5524kb
input:
9 4 3 2 1 1 1 1 1 1 4 3 4 5 7
output:
4 5 4 6 3 2 1 4 5 9 2 1 3 8 2 1 3 7 3 1
result:
ok good!
Test #65:
score: 0
Accepted
time: 1ms
memory: 5648kb
input:
12 3 2 1 1 1 1 1 1 1 1 1 1 9 1 4 5 6 7 8 9 10 11
output:
3 10 3 4 5 6 7 8 10 12 2 1 4 9 11 2 1 1 1
result:
ok good!
Test #66:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
14 2 1 1 1 1 1 1 1 1 1 1 1 1 1 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
output:
2 14 2 3 4 5 6 7 8 9 10 11 12 13 14 1 1 1
result:
ok good!
Test #67:
score: 0
Accepted
time: 1ms
memory: 5580kb
input:
4 2 2 2 1 2 1 4
output:
4 4 4 1 2 3 1 3 1 2 1 1
result:
ok good!
Subtask #4:
score: 45
Accepted
Dependency #1:
100%
Accepted
Dependency #3:
100%
Accepted
Test #68:
score: 45
Accepted
time: 1ms
memory: 5732kb
input:
150 24 12 11 10 9 9 9 9 9 8 8 7 7 7 7 7 6 6 6 6 6 6 6 5 5 5 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
25 68 121 130 129 128 127 126 125 124 123 122 150 120 119 118 117 116 115 114 113 112 132 131 149 148 147 146 145 144 143 142 140 141 133 134 135 136 137 138 139 94 93 92 91 90 89 88 87 86 85 84 77 101 52 62 68 38 47 24 29 35 19 16 13 9 7 4 2 1 18 77 102 52 61 68 38 46 24 29 35 19 16 13 9 7 4 2 1 ...
result:
ok good!
Test #69:
score: 0
Accepted
time: 1ms
memory: 5636kb
input:
200 9 9 9 8 8 8 7 7 6 6 6 6 6 6 6 6 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
10 106 146 148 150 152 154 156 158 160 162 136 128 131 134 137 140 143 183 186 189 192 195 198 182 167 170 174 177 180 113 110 108 105 103 116 118 121 123 126 100 74 76 79 81 84 87 98 96 93 91 88 57 56 54 52 50 48 46 45 60 71 70 68 66 65 63 61 27 28 30 31 32 33 35 37 38 39 41 42 43 44 19 17 18 20 21...
result:
ok good!
Test #70:
score: 0
Accepted
time: 0ms
memory: 5700kb
input:
250 8 7 7 7 7 6 6 6 6 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
9 221 173 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 157 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 142 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 189 143 144 145 146 147 148 149 150 151 152 153 154 155 156 236 221 222 223 224 225 226 227 228 229 23...
result:
ok good!
Test #71:
score: 0
Accepted
time: 0ms
memory: 5748kb
input:
300 8 6 6 5 5 5 5 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
9 203 197 206 205 204 203 202 201 200 199 198 207 196 195 194 193 192 191 190 189 216 225 224 223 222 221 220 219 218 217 188 215 214 213 212 211 210 209 208 160 169 168 167 166 165 164 163 162 161 170 159 158 157 156 155 154 153 152 179 187 186 185 184 183 182 181 180 226 178 177 176 175 174 173 17...
result:
ok good!
Test #72:
score: 0
Accepted
time: 1ms
memory: 5552kb
input:
300 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
6 202 197 206 205 204 203 202 201 200 199 198 207 196 195 194 193 192 191 190 189 216 225 224 223 222 221 220 219 218 217 188 215 214 213 212 211 210 209 208 160 169 168 167 165 163 161 159 157 155 153 179 186 184 182 180 178 176 174 172 272 280 278 276 274 282 270 268 266 264 300 298 296 294 292 29...
result:
ok good!
Test #73:
score: 0
Accepted
time: 1ms
memory: 5904kb
input:
350 5 5 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
6 229 231 241 240 239 238 237 236 235 234 233 232 242 230 229 228 227 226 225 224 223 222 221 253 263 262 261 260 259 258 257 256 255 254 220 252 251 250 249 248 247 246 245 244 243 187 197 196 195 194 193 192 191 190 189 188 198 186 185 184 183 182 181 180 179 178 177 209 219 217 215 213 211 264 20...
result:
ok good!
Test #74:
score: 0
Accepted
time: 1ms
memory: 5544kb
input:
70 51 39 26 24 21 18 16 15 15 12 11 10 10 9 9 9 8 8 7 7 7 7 7 7 6 6 6 6 6 6 6 5 5 5 5 5 5 5 4 4 4 4 4 4 3 3 3 3 3 3 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 14 1 14 15 17 26 27 34 35 41 44 48 58 62 65
output:
56 15 69 46 39 32 26 23 16 12 10 7 5 4 3 2 1 15 70 46 39 32 26 23 17 12 10 7 5 4 3 2 1 14 45 39 32 26 23 17 12 10 7 5 4 3 2 1 14 45 39 32 27 23 17 12 10 8 6 4 3 2 1 14 45 40 33 27 21 17 12 10 8 6 4 3 2 1 14 47 40 33 27 21 17 12 10 8 6 4 3 2 1 14 47 40 33 27 21 17 12 10 8 6 4 3 2 1 14 47 40 33...
result:
ok good!
Test #75:
score: 0
Accepted
time: 1ms
memory: 5628kb
input:
70 22 22 20 19 18 15 14 13 13 13 12 12 12 12 12 12 11 11 10 9 9 9 9 9 9 9 8 8 8 8 8 7 6 6 6 6 6 5 5 5 5 5 5 5 4 4 3 3 3 3 3 3 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 9 1 3 7 9 16 17 62 68 69
output:
24 68 70 69 68 67 66 65 63 61 54 53 55 56 58 59 57 60 47 48 49 50 51 52 46 45 44 43 42 41 40 39 38 36 37 35 34 33 32 28 27 29 30 31 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 8 9 7 6 5 4 3 1 2 62 64 62 54 53 55 56 58 59 57 60 47 48 49 50 51 52 46 45 44 43 42 41 40 39 38 36 37 35 34 33 32 28...
result:
ok good!
Test #76:
score: 0
Accepted
time: 0ms
memory: 6604kb
input:
40 61 55 33 31 28 26 26 23 21 20 18 15 13 11 11 10 9 9 8 8 7 7 7 6 4 4 4 4 3 3 2 2 2 2 2 1 1 1 1 1 9 1 12 18 20 24 29 30 32 40
output:
79 20 40 39 37 31 32 33 34 35 23 18 14 11 9 8 6 5 4 3 2 1 18 38 36 31 32 33 34 21 18 14 11 9 8 6 5 4 3 2 1 12 21 18 14 11 9 8 6 5 4 3 2 1 12 21 18 14 11 10 8 6 5 4 3 2 1 12 21 18 14 12 10 8 6 5 4 3 2 1 12 21 18 14 12 10 8 6 5 4 3 2 1 12 21 18 15 12 10 8 6 5 4 3 2 1 12 21 18 15 12 10 8 7 5 4 3...
result:
ok good!
Test #77:
score: 0
Accepted
time: 1ms
memory: 5912kb
input:
127 64 32 32 16 16 16 16 8 8 8 8 8 8 8 8 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 2 4 8 16 32 64
output:
64 64 94 91 88 85 82 79 76 73 70 67 112 125 122 119 116 113 110 107 104 101 98 39 46 45 43 42 40 63 37 36 34 33 48 61 57 55 52 50 24 16 18 19 20 21 23 26 27 28 30 25 12 8 9 10 11 13 15 7 6 5 4 3 2 1 64 95 92 89 86 83 96 77 74 71 68 65 126 123 120 117 114 111 108 105 102 99 39 47 45 44 42 41 63 38 3...
result:
ok good!
Test #78:
score: 0
Accepted
time: 1ms
memory: 6008kb
input:
10 31 67 31 15 21 37 53 96 81 68 4 1 2 8 10
output:
115 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 1 3 6 7 2 10 9 8 8 5 3 6 7 2 10 9 8 8 5 3 6 7 2 10 9 8 8 5 3 6 7 2 10 9 8 8 5 3 6 7 2 10 9 8 8 5 3 6 7 2 10 9 8 8 5 3 6 7 2 10 9...
result:
ok good!
Test #79:
score: 0
Accepted
time: 1ms
memory: 5592kb
input:
40 24 20 23 12 7 11 20 16 1 4 2 21 12 13 7 17 5 15 4 24 17 8 13 8 15 9 16 21 12 7 3 16 6 5 21 8 11 12 11 23 5 8 12 13 27 29
output:
24 29 10 34 30 15 22 26 39 6 13 4 29 14 23 18 25 8 27 32 16 21 2 7 28 35 12 3 40 20 1 29 10 34 30 15 22 26 39 6 13 4 29 14 23 18 25 8 27 32 16 21 2 7 28 35 12 3 40 20 1 29 10 34 30 15 22 26 39 37 13 4 29 14 23 18 25 8 27 32 16 21 2 7 28 35 12 3 40 20 1 29 31 34 33 15 22 36 39 37 13 4 29 38 23 18 ...
result:
ok good!
Test #80:
score: 0
Accepted
time: 1ms
memory: 6168kb
input:
40 2 18 20 17 18 15 12 4 6 12 13 20 2 15 22 20 21 8 8 1 3 9 22 16 5 8 12 11 8 16 4 19 14 13 13 16 24 21 1 11 14 1 4 5 8 10 13 14 21 23 24 32 33 34 36
output:
24 36 20 1 13 21 25 9 26 19 18 22 40 28 10 7 27 35 11 34 33 14 6 36 24 30 4 5 2 32 12 3 16 17 38 23 15 37 36 39 1 13 21 8 9 26 19 18 22 40 28 10 7 27 35 11 34 33 14 6 36 24 30 4 5 2 32 12 3 16 17 38 23 15 37 32 8 9 29 19 18 22 40 28 10 7 27 35 11 34 33 14 6 36 24 30 4 5 2 32 12 3 16 17 38 23 15 37...
result:
ok good!
Test #81:
score: 0
Accepted
time: 0ms
memory: 5680kb
input:
130 5 1 7 5 7 6 4 2 4 2 7 1 5 1 1 7 4 3 3 4 3 5 1 5 5 2 1 6 5 2 7 2 1 2 3 1 1 6 1 5 3 2 1 5 7 6 5 2 5 3 5 4 2 3 1 3 2 4 6 6 1 3 4 7 6 2 7 1 7 7 5 7 2 3 1 2 2 4 4 1 3 4 7 3 7 3 6 1 1 3 3 6 5 7 4 1 4 5 3 3 5 4 4 6 1 3 2 6 4 7 3 4 2 6 1 2 7 7 7 6 5 6 7 5 2 2 2 2 7 2 7 26 43 55 69 82 116 125
output:
7 116 2 37 36 39 33 43 55 27 61 68 23 75 80 88 89 14 115 105 12 96 15 116 130 128 127 42 126 125 48 53 76 57 113 66 107 73 77 8 26 30 10 35 62 74 19 111 18 84 90 91 100 54 50 41 109 78 20 102 103 95 112 9 7 63 17 58 82 13 47 93 1 98 101 40 121 124 4 25 24 51 29 22 71 59 65 38 114 120 122 108 104 6 4...
result:
ok good!
Test #82:
score: 0
Accepted
time: 0ms
memory: 6496kb
input:
130 5 4 7 2 1 6 4 3 4 4 4 3 7 4 5 1 2 1 6 1 7 4 6 4 2 4 2 7 1 3 1 7 1 3 1 2 6 4 7 3 6 5 3 2 6 3 1 7 2 1 1 6 7 6 1 3 4 5 7 1 3 1 5 7 6 3 4 6 1 5 1 5 5 6 3 1 7 6 7 2 5 6 4 7 3 7 4 2 5 2 6 4 1 2 4 1 7 4 4 6 2 5 5 3 4 6 1 2 3 2 2 3 6 1 7 4 1 2 5 4 3 5 5 3 5 2 2 3 5 5 45 1 4 5 6 15 18 20 23 28 31 32 33 3...
output:
7 128 50 20 107 29 31 33 96 47 93 35 51 55 60 62 76 71 69 18 114 117 49 118 90 94 44 88 126 101 36 4 80 27 25 17 111 110 108 127 43 8 128 124 56 85 66 61 75 112 109 46 12 40 30 121 104 34 83 105 116 2 99 98 87 95 92 120 67 38 7 57 26 9 10 24 11 14 22 119 42 102 103 15 70 122 123 125 1 129 130 63 81 ...
result:
ok good!
Test #83:
score: 0
Accepted
time: 0ms
memory: 5668kb
input:
130 2 6 1 6 1 4 5 4 3 4 4 7 6 3 6 1 2 7 4 5 1 5 4 2 6 3 6 3 1 1 2 7 2 5 6 1 5 1 6 3 7 4 4 6 6 1 7 1 1 3 2 7 3 6 1 7 2 5 5 1 5 1 1 4 6 2 4 5 1 2 6 2 1 6 4 2 6 4 5 6 5 4 1 5 6 6 1 2 1 6 2 1 6 1 2 6 4 3 1 4 6 3 7 7 7 3 3 5 1 6 2 7 6 6 6 2 4 3 3 7 4 6 3 7 3 2 3 4 1 3 9 2 3 4 6 8 9 10 16 17
output:
30 17 57 31 125 100 19 64 61 81 122 113 45 74 86 12 41 103 112 17 76 31 125 121 19 64 61 81 101 13 54 39 85 90 41 103 112 17 76 24 125 121 82 64 61 81 101 13 54 39 85 90 41 103 112 17 63 24 123 121 82 43 61 81 101 13 54 39 85 90 18 103 112 17 62 95 123 121 82 43 61 7 101 13 54 39 85 90 18 103 11...
result:
ok good!
Test #84:
score: 0
Accepted
time: 2ms
memory: 6796kb
input:
70 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 5 5 5 5 5 5 5 5 5 5 5 5 20 1 2 3 4 6 7 8 9 10 13 21 24 30 31 33 40 45 46 54 70
output:
9 70 70 59 60 61 62 63 64 65 66 67 68 69 54 50 51 52 53 55 56 57 58 45 44 46 47 48 49 36 43 42 41 40 39 38 37 10 18 17 16 15 14 13 12 11 19 9 8 7 6 5 4 3 2 27 35 34 33 32 31 30 29 28 1 26 25 24 23 22 21 20 70 70 59 60 61 62 63 64 65 66 67 68 69 54 50 51 52 53 55 56 57 58 45 44 46 47 48 49 36 43 42 ...
result:
ok good!
Test #85:
score: 0
Accepted
time: 2ms
memory: 7800kb
input:
90 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 6 6 6 6 6 6 6 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 20 1 2 3 6 7 8 9 10 13 20 24 30 32 46 53 63 68 69 70 79
output:
8 79 89 67 68 70 72 73 74 76 77 79 81 82 83 85 86 87 78 59 62 58 57 56 55 54 53 60 61 63 64 65 66 46 52 51 49 48 45 44 42 41 40 38 36 34 35 37 17 2 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 79 89 69 68 70 71 73 74 75 77 79 80 82 83 84 86 87 88 59 62 58 57 ...
result:
ok good!
Test #86:
score: 0
Accepted
time: 2ms
memory: 6796kb
input:
120 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 6 6 6 6 6 6 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 20 1 2 3 4 5 9 10 14 15 19 25 28 30 33 36 77 78 99 108 116
output:
9 108 120 119 118 117 116 115 114 113 84 93 85 86 87 88 89 90 92 91 83 82 81 80 79 78 77 76 75 95 112 111 110 108 106 104 101 99 97 96 62 63 64 66 67 68 70 71 72 74 61 60 58 57 56 45 46 47 48 49 50 52 53 54 55 51 40 38 39 41 42 43 44 37 36 35 34 33 32 31 28 29 30 15 2 3 4 5 6 7 8 9 10 11 12 13 14 16...
result:
ok good!
Test #87:
score: 0
Accepted
time: 0ms
memory: 7688kb
input:
200 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 ...
output:
5 123 167 163 159 155 151 147 143 171 197 193 189 184 174 178 182 119 117 115 113 111 109 107 105 103 131 139 137 135 133 121 129 127 125 123 100 98 96 94 81 77 80 78 76 75 73 72 71 83 92 91 89 88 87 82 85 84 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2 35 10 1 3 4 5 6 7 8 9 18 11 12 13 14 15 1...
result:
ok good!
Test #88:
score: 0
Accepted
time: 2ms
memory: 6508kb
input:
250 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
4 147 159 162 165 168 171 174 177 180 183 186 142 129 132 135 138 141 144 147 150 153 156 222 225 228 231 234 237 240 243 246 249 190 193 196 199 202 126 208 211 214 217 125 119 122 96 97 94 93 91 90 88 87 85 84 82 81 79 78 116 115 113 112 110 109 106 105 103 102 100 99 67 66 65 63 62 61 60 59 58 64...
result:
ok good!
Test #89:
score: 0
Accepted
time: 2ms
memory: 6488kb
input:
300 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
5 218 197 206 205 204 203 202 201 200 199 198 207 196 195 194 193 192 191 190 189 216 225 224 223 222 221 220 219 218 217 188 215 214 213 212 211 210 209 208 160 169 168 167 166 165 164 163 162 161 170 159 158 156 154 152 187 185 183 181 226 177 175 173 171 281 279 277 275 273 271 269 267 265 291 29...
result:
ok good!
Test #90:
score: 0
Accepted
time: 2ms
memory: 7832kb
input:
100 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 49 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 76 77 78 79 80 81 82 83 84 85 ...
output:
18 100 63 75 74 73 72 71 70 69 68 67 66 65 64 76 62 61 60 59 58 57 56 55 54 53 52 88 100 99 98 97 96 95 94 93 92 91 90 89 51 87 86 85 84 83 82 81 80 79 78 77 13 25 24 23 22 21 20 19 18 17 16 15 14 26 12 11 10 9 8 7 6 5 4 3 2 38 50 49 48 47 46 45 44 43 42 41 40 39 1 37 36 35 34 33 32 31 30 29 28 27 ...
result:
ok good!
Test #91:
score: 0
Accepted
time: 3ms
memory: 8192kb
input:
446 55 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
55 14 294 307 306 305 304 249 417 363 84 15 30 198 142 1 9 250 418 350 71 86 31 199 143 1 9 251 405 420 365 87 32 200 144 1 9 238 253 421 366 88 33 201 145 1 9 309 254 422 367 89 34 202 146 1 9 310 255 423 368 90 35 203 147 1 9 311 256 424 369 91 36 204 148 1 9 312 257 425 370 92 37 205 149 1...
result:
ok good!
Test #92:
score: 0
Accepted
time: 0ms
memory: 7536kb
input:
470 31 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
31 470 310 324 323 322 321 320 319 318 317 316 315 314 313 312 311 325 309 308 307 306 305 304 303 302 301 300 299 298 297 296 339 353 352 351 350 349 348 347 346 345 344 343 342 341 340 295 338 337 336 335 334 333 332 331 330 329 328 327 326 251 265 264 263 262 261 260 259 258 257 256 255 254 253 2...
result:
ok good!
Test #93:
score: 0
Accepted
time: 0ms
memory: 7796kb
input:
31 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 15 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31
output:
35 24 27 24 23 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 24 27 24 23 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 24 27 25 23 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 24 27 25 23 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 24 27 25 23 21 20 19 18 17 16...
result:
ok good!
Test #94:
score: 0
Accepted
time: 1ms
memory: 6016kb
input:
100 1 14 14 8 2 2 5 16 7 1 4 7 7 2 7 2 1 1 4 5 2 14 9 3 7 1 11 4 7 4 2 8 17 1 7 1 7 2 11 3 3 2 1 7 1 9 1 7 3 3 4 2 1 10 1 1 1 3 8 7 1 1 1 2 4 1 3 16 5 9 3 3 1 3 2 3 7 11 1 3 1 11 13 4 1 3 1 17 1 2 1 16 11 4 9 5 6 4 1 2 7 1 2 4 8 16 32 64
output:
18 64 34 73 53 99 87 5 90 64 21 16 86 80 76 50 74 41 40 67 94 98 65 84 19 28 30 69 7 20 96 97 35 37 44 13 15 29 48 9 25 77 60 12 32 4 59 23 95 46 70 54 82 78 27 39 93 83 2 3 22 68 92 8 33 88 64 26 63 1 18 89 5 6 64 14 16 86 80 24 50 74 72 40 67 94 51 65 84 19 11 30 69 7 20 96 97 35 37 44 13 15 29 4...
result:
ok good!
Test #95:
score: 0
Accepted
time: 0ms
memory: 6476kb
input:
350 3 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 3 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 2 1 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 3 1 1 1 1 2 1 1 1 1 2 2 1 1 1 2 2 1 2 1 1 1 2 2 1 1 5 1 1 2 1 3 1 1 1 1 1 1 2 1 3 1 1 1 2 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 3 2 1 1 3 1 ...
output:
7 256 199 210 209 208 207 204 202 201 200 213 198 197 196 195 193 192 191 190 223 238 237 236 234 232 229 228 225 189 222 220 219 218 217 216 215 155 164 163 162 161 160 159 158 156 165 154 153 152 150 148 146 145 142 176 188 186 185 183 182 181 178 177 239 175 171 170 169 168 167 166 309 318 317 31...
result:
ok good!
Subtask #5:
score: 15
Accepted
Dependency #4:
100%
Accepted
Test #96:
score: 15
Accepted
time: 3ms
memory: 12584kb
input:
27 12 148 141 10 98 1 82 103 145 60 190 102 181 147 152 185 24 134 179 127 141 38 169 93 132 157 49 6 1 5 7 13 17 26
output:
190 26 4 1 17 22 27 10 7 24 5 12 8 20 25 18 21 3 9 14 2 15 26 23 19 13 16 11 26 4 1 17 22 27 10 7 24 5 12 8 20 25 18 21 3 9 14 2 15 26 23 19 13 16 11 26 4 1 17 22 27 10 7 24 5 12 8 20 25 18 21 3 9 14 2 15 26 23 19 13 16 11 26 4 1 17 22 27 10 7 24 5 12 8 20 25 18 21 3 9 14 2 15 26 23 19 13 16 11 ...
result:
ok good!
Test #97:
score: 0
Accepted
time: 2ms
memory: 6232kb
input:
160 35 20 9 34 11 22 2 17 18 37 32 27 4 22 26 15 32 19 22 29 8 30 7 10 23 33 11 18 24 18 29 34 17 35 26 12 28 6 27 19 37 34 8 7 33 32 18 13 24 13 26 34 6 3 37 9 10 6 16 34 19 8 30 8 14 14 32 3 35 18 12 20 1 19 25 30 19 6 2 16 15 24 34 6 31 7 22 29 11 14 14 23 7 25 32 14 9 11 21 31 37 31 2 19 31 4 13...
output:
37 122 113 54 152 155 53 78 58 44 86 135 21 43 111 123 56 3 24 136 157 57 98 89 27 133 5 160 71 36 128 48 50 107 65 66 90 91 96 124 129 145 153 109 114 139 16 141 120 154 156 33 130 30 28 9 18 40 104 61 108 72 2 147 121 99 19 14 6 115 25 92 29 159 127 49 75 94 125 149 51 35 15 138 39 12 158 37 20 31...
result:
ok good!
Test #98:
score: 0
Accepted
time: 3ms
memory: 7636kb
input:
600 5 6 6 1 7 4 1 2 8 3 4 4 8 6 4 9 6 2 2 8 8 6 6 1 3 2 3 2 5 5 1 7 8 8 3 6 6 3 2 7 6 4 9 6 7 8 2 4 5 8 9 6 1 1 5 5 1 4 3 3 4 5 6 6 8 4 8 8 3 5 6 2 8 1 3 3 7 7 3 1 2 4 8 8 5 5 5 5 9 5 9 1 6 5 1 6 4 1 4 6 7 6 5 4 6 8 4 5 5 3 9 9 7 6 5 3 3 5 8 5 6 5 4 8 4 1 2 5 1 7 5 3 9 3 4 8 6 9 4 9 5 7 9 7 5 3 9 4 ...
output:
9 532 314 54 53 275 311 208 312 313 129 126 475 545 200 477 80 513 529 74 464 548 280 465 224 547 466 422 455 277 522 218 468 518 57 308 162 532 177 350 98 176 497 489 356 574 163 95 252 7 92 494 4 600 586 510 578 31 186 339 236 451 150 151 24 349 588 228 531 229 530 460 248 443 190 491 167 165 164 ...
result:
ok good!
Test #99:
score: 0
Accepted
time: 12ms
memory: 20908kb
input:
400 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 14 14 14 13 13 13 13 13 13 13 12 12 12 12 12 12...
output:
15 338 329 331 332 334 336 337 339 328 342 344 346 347 349 351 352 305 307 308 310 312 313 315 317 318 320 322 323 325 327 388 378 380 381 383 385 386 354 390 391 393 395 396 398 375 376 355 357 358 360 362 363 364 373 372 370 368 367 259 260 261 263 264 265 266 268 269 270 271 273 258 257 256 254 2...
result:
ok good!
Test #100:
score: 0
Accepted
time: 0ms
memory: 19504kb
input:
750 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ...
output:
8 513 727 724 721 750 715 712 709 729 747 744 741 731 734 737 545 547 548 550 551 554 556 559 543 540 538 535 533 531 564 586 584 581 579 576 574 571 569 566 563 486 499 496 494 491 489 501 484 481 479 476 474 515 528 525 523 520 518 530 513 510 508 505 503 677 675 672 670 667 665 662 660 657 655 65...
result:
ok good!
Test #101:
score: 0
Accepted
time: 8ms
memory: 35240kb
input:
460 13 13 13 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12...
output:
24 460 302 316 315 314 313 312 311 310 309 308 307 306 305 304 303 317 301 300 299 298 297 296 295 294 293 292 291 290 289 331 345 344 343 342 341 340 339 338 337 336 335 334 333 332 288 330 329 328 327 326 325 324 323 322 321 320 319 318 245 259 258 257 256 255 254 253 252 251 250 249 248 247 246 2...
result:
ok good!
Test #102:
score: 0
Accepted
time: 8ms
memory: 37348kb
input:
2751 250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
250 12 2033 1423 2576 2654 2388 360 94 215 1324 715 924 1 12 1978 1422 2575 2653 2387 359 93 214 1323 714 923 1 12 2031 1421 2574 2652 2397 358 92 213 1311 713 922 1 12 2030 1420 2573 2651 2342 357 91 212 1321 712 921 1 12 2029 1430 2572 2650 2341 388 90 211 1320 711 920 1 12 2028 1461 2571 264...
result:
ok good!
Test #103:
score: 0
Accepted
time: 7ms
memory: 31508kb
input:
2924 77 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
77 2924 1954 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1942 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1931 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1965 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 2000 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 19...
result:
ok good!
Test #104:
score: 0
Accepted
time: 3ms
memory: 25696kb
input:
76 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 39 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 57 58 59 60 61 62 63 64 65 ...
output:
76 57 68 65 62 59 57 55 54 52 51 49 48 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 57 68 65 62 59 57 55 54 52 51 49 48 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15...
result:
ok good!
Test #105:
score: 0
Accepted
time: 9ms
memory: 16352kb
input:
1500 1 2 2 2 1 1 1 2 1 2 1 1 1 1 1 3 1 2 2 1 1 1 4 1 1 2 2 3 4 2 2 4 4 1 1 1 1 2 2 1 1 2 2 1 1 1 1 2 2 1 1 1 2 4 1 3 3 1 1 1 3 1 1 1 1 2 2 1 2 1 3 1 1 1 4 2 2 1 1 1 1 1 1 2 2 2 6 4 1 1 1 2 2 2 3 1 3 1 4 3 1 1 1 2 1 1 1 2 1 1 1 2 2 1 4 2 2 3 3 7 3 2 1 2 1 3 3 1 3 5 1 2 5 2 3 4 1 3 3 1 1 2 1 2 1 1 3 1...
output:
11 1024 805 807 811 815 822 826 828 833 838 840 843 845 849 857 866 780 747 750 754 763 769 773 778 781 784 788 790 792 797 800 980 955 958 960 964 968 970 974 981 983 986 989 991 998 1002 907 876 881 885 889 894 902 906 908 912 915 921 931 934 939 604 572 576 581 586 589 595 601 570 606 608 610 613...
result:
ok good!
Test #106:
score: 0
Accepted
time: 4ms
memory: 15096kb
input:
2400 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 3 1 2 1 1 2 1 1 1 4 2 1 1 1 2 1 1 3 1 1 1 1 1 1 1 3 3 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 2 3 1 1 2 1 1 1 3 1 1 1 1 3 2 1 3 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 3 2 2 2 1 1 1 3 1 1 1 1 1 1 4 2 3...
output:
9 2048 1519 1510 1511 1512 1513 1514 1515 1516 1517 1509 1520 1521 1522 1523 1525 1526 1527 1499 1490 1491 1492 1493 1495 1496 1497 1498 1528 1501 1502 1504 1505 1506 1507 1508 1558 1547 1548 1549 1550 1551 1553 1554 1557 1546 1559 1560 1562 1563 1564 1565 1566 1538 1529 1530 1532 1533 1534 1535 153...
result:
ok good!
Subtask #6:
score: 15
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Test #107:
score: 15
Accepted
time: 11ms
memory: 44276kb
input:
40 153 344 238 669 595 304 297 265 438 678 232 354 377 249 297 629 693 559 65 283 407 198 128 290 443 371 667 289 86 601 429 231 266 624 474 12 319 436 364 646 7 1 8 9 12 21 27 28
output:
693 28 22 11 14 33 20 24 15 6 2 12 39 13 21 31 38 9 25 35 18 5 30 34 16 40 27 4 10 17 28 22 11 14 33 20 24 15 6 2 12 39 13 21 31 38 9 25 35 18 5 30 34 16 40 27 4 10 17 28 22 11 14 33 20 24 15 6 2 12 39 13 21 31 38 9 25 35 18 5 30 34 16 40 27 4 10 17 28 22 11 14 33 20 24 15 6 2 12 39 13 21 31 38 9...
result:
ok good!
Test #108:
score: 0
Accepted
time: 0ms
memory: 9992kb
input:
420 51 4 68 8 19 9 42 34 39 31 62 47 46 32 55 42 31 28 37 21 36 44 8 13 56 30 15 4 23 17 56 42 38 25 26 5 39 16 38 46 55 26 23 34 27 36 60 55 35 38 69 31 49 21 28 42 27 21 57 12 47 52 56 10 32 6 33 64 20 44 15 50 45 25 53 30 59 43 47 43 45 36 62 57 16 7 20 17 49 11 18 42 28 24 48 13 45 40 28 19 6 38...
output:
70 331 307 221 374 251 154 23 388 357 149 135 334 278 340 384 153 24 137 249 27 297 71 193 250 208 38 88 181 252 394 234 350 386 91 100 364 140 245 254 69 361 390 151 224 230 20 54 225 311 228 201 279 29 43 260 328 94 216 312 391 34 306 74 198 358 129 205 206 299 121 419 396 42 372 57 398 298 351 45...
result:
ok good!
Test #109:
score: 0
Accepted
time: 2ms
memory: 5876kb
input:
3500 4 4 7 4 7 1 6 6 7 1 1 6 1 4 3 2 4 1 5 3 8 1 4 1 3 6 2 7 7 2 3 2 8 2 3 4 1 2 2 4 6 8 1 2 8 7 7 4 4 1 3 5 1 6 7 2 3 4 3 1 7 8 1 6 7 4 5 1 2 2 7 6 5 1 3 1 4 5 5 8 5 6 5 6 1 7 2 1 1 6 3 1 1 2 7 6 8 7 1 7 4 6 8 2 4 5 3 1 6 1 8 4 4 5 3 2 2 2 3 3 2 2 4 2 8 3 6 7 3 2 1 1 2 7 3 5 8 5 1 1 4 6 5 7 1 2 2 2...
output:
8 3221 2143 2720 3192 457 459 1681 2727 462 2141 2728 3194 1089 2145 2147 2738 1080 2743 2286 3174 3172 1113 1668 1122 1121 1669 3205 3204 2710 3201 439 480 2137 2139 443 1108 445 446 1105 3197 1888 3134 1040 514 2766 1035 519 3141 2770 1027 1026 511 3133 2278 2158 529 2159 2791 2273 535 3125 2282 1...
result:
ok good!
Test #110:
score: 0
Accepted
time: 11ms
memory: 70904kb
input:
700 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 69 68 67 66 65 64 64 63 62 61 60 59 59 58 57 56 56 55 54 54 53 52 52 51 51 50 49 49 48 48 47 47 46 46 45...
output:
103 494 663 675 674 673 672 671 670 669 668 667 666 665 664 700 662 661 660 659 658 657 656 655 654 653 652 651 677 676 699 698 697 696 695 694 693 692 691 690 689 687 688 678 679 680 681 682 683 684 685 686 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 578 619 ...
result:
ok good!
Test #111:
score: 0
Accepted
time: 16ms
memory: 73896kb
input:
6250 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5...
output:
6 4137 4364 4362 4360 4358 4356 4354 4352 4350 4348 4346 4344 4376 4385 4383 4381 4379 4377 4375 4373 4371 4369 4367 4309 4318 4316 4314 4312 4310 4308 4306 4304 4302 4300 4331 4340 4338 4336 4334 4332 4330 4328 4326 4324 4322 4442 4452 4450 4448 4446 4444 4454 4440 4438 4436 4434 4432 4475 4473 447...
result:
ok good!
Test #112:
score: 0
Accepted
time: 44ms
memory: 201220kb
input:
2000 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 1...
output:
28 2000 1329 1344 1343 1342 1341 1340 1339 1338 1337 1336 1335 1334 1333 1332 1331 1330 1345 1328 1327 1326 1325 1324 1323 1322 1321 1320 1319 1318 1317 1316 1315 1314 1360 1375 1374 1373 1372 1371 1370 1369 1368 1367 1366 1365 1364 1363 1362 1361 1313 1359 1358 1357 1356 1355 1354 1353 1352 1351 13...
result:
ok good!
Test #113:
score: 0
Accepted
time: 47ms
memory: 210308kb
input:
13930 1071 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
1071 20 9292 9279 9280 9281 9282 9283 10231 7724 7925 12424 10938 12009 1925 2995 1509 6008 6209 3837 4653 1 14 10081 7723 7924 12423 10937 12008 1924 3008 1508 6007 6208 3850 4652 1 14 10080 7722 7923 12462 10936 12007 1923 3047 1507 6006 6207 3849 4651 1 14 10079 7721 7922 12421 10935 12006 192...
result:
ok good!
Test #114:
score: 0
Accepted
time: 20ms
memory: 162852kb
input:
14828 173 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
173 14828 9891 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9876 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9862 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9905 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 ...
result:
ok good!
Test #115:
score: 0
Accepted
time: 25ms
memory: 131672kb
input:
172 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 9...
output:
172 129 160 154 150 147 144 141 138 136 133 131 129 127 125 124 122 120 119 117 116 114 113 111 110 108 107 106 104 103 102 101 100 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 ...
result:
ok good!
Test #116:
score: 0
Accepted
time: 11ms
memory: 60276kb
input:
5000 3 3 3 2 1 2 1 2 1 1 6 8 1 2 1 1 3 3 1 2 7 2 1 2 4 1 3 5 3 5 3 2 7 2 7 2 1 5 1 1 1 3 7 1 2 4 1 1 2 1 6 1 1 4 2 1 4 1 3 3 5 1 3 3 6 10 9 1 1 1 3 6 6 1 1 3 2 3 8 2 4 4 12 3 3 6 3 2 4 7 4 1 5 1 7 1 4 4 15 5 2 6 6 2 10 5 3 3 7 1 1 1 1 1 1 1 2 2 1 3 2 1 6 1 5 3 2 1 1 3 4 7 2 2 1 3 2 3 5 1 2 7 3 1 1 1...
output:
22 4096 1671 1673 4405 1677 1670 4402 1688 1690 1658 1648 1650 1654 1657 1659 1661 3195 1669 4390 3186 4385 1737 4391 4380 4379 1750 1646 1711 4393 3778 4396 1699 1697 1695 4437 3223 3221 1568 4438 1574 1577 3216 1583 4460 3233 1527 4453 1584 3763 1546 4448 3203 3208 4418 3770 1630 1632 3202 3201 37...
result:
ok good!
Test #117:
score: 0
Accepted
time: 15ms
memory: 59332kb
input:
11000 1 2 1 1 1 1 1 2 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 2 2 1 1 3 1 3 1 1 2 2 1 1 1 1 2 1 2 1 1 1 2 1 1 1 1 4 1 1 1 3 2 1 2 1 1 3 1 1 1 1 1 1 1 1 1 1 1 3 2 1 2 2 1 1 2 2 2 2 1 1 1 1 1 2 4 1 2 1 1 1 2 1 1 1 1 1 1 3 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 2 ...
output:
9 8192 6772 6760 6761 6763 6764 6765 6767 6768 6770 6771 6759 6773 6774 6775 6776 6777 6778 6779 6780 6749 6734 6735 6736 6740 6744 6745 6746 6747 6782 6750 6751 6752 6754 6755 6756 6757 6758 6816 6806 6807 6808 6809 6810 6811 6813 6814 6805 6817 6818 6820 6821 6822 6823 6824 6825 6795 6783 6785 678...
result:
ok good!
Extra Test:
score: 0
Extra Test Passed