QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#491702 | #4205. Art Collections | kimmoqt# | 100 ✓ | 1426ms | 4104kb | C++20 | 1.3kb | 2024-07-25 21:08:45 | 2024-07-25 21:08:45 |
Judging History
answer
#include "art.h"
//
// --- Sample implementation for the task art ---
//
// To compile this program with the sample grader, place:
// art.h art_sample.cpp sample_grader.cpp
// in a single folder, then open the terminal in this directory (right-click onto an empty spot in the directory,
// left click on "Open in terminal") and enter e.g.:
// g++ -std=c++17 art_sample.cpp sample_grader.cpp
// in this folder. This will create a file a.out in the current directory which you can execute from the terminal
// as ./a.out
// See task statement or sample_grader.cpp for the input specification
//
#include <bits/stdc++.h>
using namespace std;
int ask(deque<int> dq) {
vector<int> v;
for(auto x:dq) v.push_back(x);
return publish(v);
}
void solve(int N) {
vector<int> P(N);
deque<int> dq;
for(int i=1;i<=N;i++) dq.push_back(i);
int x=ask(dq);
while(dq.back()!=1) {
int b=dq.back();
dq.pop_back();
dq.push_front(b);
int y=ask(dq);
int p=y-x;
int q=N-1;
int z=(p+q)/2;
P[z]=b;
x=y;
}
for(int i=0;i<N;i++)
if(!P[i]) P[i]=1;
answer(P);
}
详细
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 0ms
memory: 3772kb
input:
6 15 10 7 6 7 10
output:
942318468 6 1 2 3 4 5 6 942318468 6 6 1 2 3 4 5 942318468 6 5 6 1 2 3 4 942318468 6 4 5 6 1 2 3 942318468 6 3 4 5 6 1 2 942318468 6 2 3 4 5 6 1 539883183 6 6 5 4 3 2 1
result:
ok correct
Test #2:
score: 5
Accepted
time: 1ms
memory: 4020kb
input:
6 9 12 11 6 3 4
output:
942318468 6 1 2 3 4 5 6 942318468 6 6 1 2 3 4 5 942318468 6 5 6 1 2 3 4 942318468 6 4 5 6 1 2 3 942318468 6 3 4 5 6 1 2 942318468 6 2 3 4 5 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #3:
score: 5
Accepted
time: 0ms
memory: 4028kb
input:
6 9 12 11 6 3 4
output:
942318468 6 1 2 3 4 5 6 942318468 6 6 1 2 3 4 5 942318468 6 5 6 1 2 3 4 942318468 6 4 5 6 1 2 3 942318468 6 3 4 5 6 1 2 942318468 6 2 3 4 5 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #4:
score: 5
Accepted
time: 1ms
memory: 3788kb
input:
6 9 12 11 6 3 4
output:
942318468 6 1 2 3 4 5 6 942318468 6 6 1 2 3 4 5 942318468 6 5 6 1 2 3 4 942318468 6 4 5 6 1 2 3 942318468 6 3 4 5 6 1 2 942318468 6 2 3 4 5 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #5:
score: 5
Accepted
time: 1ms
memory: 3848kb
input:
3 1 1 3
output:
942318468 3 1 2 3 942318468 3 3 1 2 942318468 3 2 3 1 539883183 3 1 3 2
result:
ok correct
Test #6:
score: 5
Accepted
time: 0ms
memory: 3796kb
input:
6 0 5 8 9 8 5
output:
942318468 6 1 2 3 4 5 6 942318468 6 6 1 2 3 4 5 942318468 6 5 6 1 2 3 4 942318468 6 4 5 6 1 2 3 942318468 6 3 4 5 6 1 2 942318468 6 2 3 4 5 6 1 539883183 6 1 2 3 4 5 6
result:
ok correct
Test #7:
score: 5
Accepted
time: 1ms
memory: 3796kb
input:
6 9 12 11 6 3 4
output:
942318468 6 1 2 3 4 5 6 942318468 6 6 1 2 3 4 5 942318468 6 5 6 1 2 3 4 942318468 6 4 5 6 1 2 3 942318468 6 3 4 5 6 1 2 942318468 6 2 3 4 5 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Subtask #2:
score: 15
Accepted
Test #8:
score: 15
Accepted
time: 1ms
memory: 3724kb
input:
40 394 417 378 407 374 381 358 333 316 315 326 353 368 393 398 399 434 405 384 379 368 405 398 419 450 413 452 449 422 439 442 423 408 377 396 405 370 383 374 407
output:
942318468 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 942318468 40 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 942318468 40 39 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
result:
ok correct
Test #9:
score: 15
Accepted
time: 1ms
memory: 3724kb
input:
40 394 417 378 407 374 381 358 333 316 315 326 353 368 393 398 399 434 405 384 379 368 405 398 419 450 413 452 449 422 439 442 423 408 377 396 405 370 383 374 407
output:
942318468 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 942318468 40 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 942318468 40 39 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
result:
ok correct
Test #10:
score: 15
Accepted
time: 0ms
memory: 4072kb
input:
40 394 417 378 407 374 381 358 333 316 315 326 353 368 393 398 399 434 405 384 379 368 405 398 419 450 413 452 449 422 439 442 423 408 377 396 405 370 383 374 407
output:
942318468 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 942318468 40 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 942318468 40 39 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
result:
ok correct
Test #11:
score: 15
Accepted
time: 1ms
memory: 3772kb
input:
40 394 417 378 407 374 381 358 333 316 315 326 353 368 393 398 399 434 405 384 379 368 405 398 419 450 413 452 449 422 439 442 423 408 377 396 405 370 383 374 407
output:
942318468 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 942318468 40 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 942318468 40 39 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
result:
ok correct
Test #12:
score: 15
Accepted
time: 0ms
memory: 3868kb
input:
40 780 741 704 669 636 605 576 549 524 501 480 461 444 429 416 405 396 389 384 381 380 381 384 389 396 405 416 429 444 461 480 501 524 549 576 605 636 669 704 741
output:
942318468 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 942318468 40 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 942318468 40 39 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
result:
ok correct
Test #13:
score: 15
Accepted
time: 1ms
memory: 4056kb
input:
40 0 39 76 111 144 175 204 231 256 279 300 319 336 351 364 375 384 391 396 399 400 399 396 391 384 375 364 351 336 319 300 279 256 231 204 175 144 111 76 39
output:
942318468 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 942318468 40 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 942318468 40 39 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
result:
ok correct
Subtask #3:
score: 15
Accepted
Test #14:
score: 15
Accepted
time: 5ms
memory: 3792kb
input:
250 31125 30876 30629 30384 30141 29900 29661 29424 29189 28956 28725 28496 28269 28044 27821 27600 27381 27164 26949 26736 26525 26316 26109 25904 25701 25500 25301 25104 24909 24716 24525 24336 24149 23964 23781 23600 23421 23244 23069 22896 22725 22556 22389 22224 22061 21900 21741 21584 21429 21...
output:
942318468 250 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #15:
score: 15
Accepted
time: 4ms
memory: 4024kb
input:
250 15389 15632 15557 15776 15863 15842 15621 15804 16011 16156 16293 16202 16279 16430 16577 16532 16575 16360 16377 16480 16547 16764 16917 17012 17127 17066 16877 16710 16599 16492 16567 16368 16351 16160 16371 16594 16535 16382 16147 16004 15997 15872 15903 15956 15953 15712 15847 15774 16021 15...
output:
942318468 250 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #16:
score: 15
Accepted
time: 5ms
memory: 3780kb
input:
250 0 249 496 741 984 1225 1464 1701 1936 2169 2400 2629 2856 3081 3304 3525 3744 3961 4176 4389 4600 4809 5016 5221 5424 5625 5824 6021 6216 6409 6600 6789 6976 7161 7344 7525 7704 7881 8056 8229 8400 8569 8736 8901 9064 9225 9384 9541 9696 9849 10000 10149 10296 10441 10584 10725 10864 11001 11136...
output:
942318468 250 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #17:
score: 15
Accepted
time: 4ms
memory: 4032kb
input:
250 15389 15632 15557 15776 15863 15842 15621 15804 16011 16156 16293 16202 16279 16430 16577 16532 16575 16360 16377 16480 16547 16764 16917 17012 17127 17066 16877 16710 16599 16492 16567 16368 16351 16160 16371 16594 16535 16382 16147 16004 15997 15872 15903 15956 15953 15712 15847 15774 16021 15...
output:
942318468 250 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #18:
score: 15
Accepted
time: 0ms
memory: 3728kb
input:
250 15389 15632 15557 15776 15863 15842 15621 15804 16011 16156 16293 16202 16279 16430 16577 16532 16575 16360 16377 16480 16547 16764 16917 17012 17127 17066 16877 16710 16599 16492 16567 16368 16351 16160 16371 16594 16535 16382 16147 16004 15997 15872 15903 15956 15953 15712 15847 15774 16021 15...
output:
942318468 250 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #19:
score: 15
Accepted
time: 4ms
memory: 4060kb
input:
250 15389 15632 15557 15776 15863 15842 15621 15804 16011 16156 16293 16202 16279 16430 16577 16532 16575 16360 16377 16480 16547 16764 16917 17012 17127 17066 16877 16710 16599 16492 16567 16368 16351 16160 16371 16594 16535 16382 16147 16004 15997 15872 15903 15956 15953 15712 15847 15774 16021 15...
output:
942318468 250 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Subtask #4:
score: 15
Accepted
Test #20:
score: 15
Accepted
time: 5ms
memory: 3864kb
input:
444 48125 47714 48089 47756 47673 47336 47643 47828 47967 47970 48363 48172 47879 48106 48435 48212 48235 48544 48337 48246 48123 47882 47631 47766 48155 48282 48501 48658 48277 48272 48029 47708 48119 48540 48741 48302 48653 48386 48687 48486 48467 48902 48683 48534 48593 48924 49079 49496 49147 49...
output:
942318468 444 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #21:
score: 15
Accepted
time: 11ms
memory: 3780kb
input:
444 0 443 884 1323 1760 2195 2628 3059 3488 3915 4340 4763 5184 5603 6020 6435 6848 7259 7668 8075 8480 8883 9284 9683 10080 10475 10868 11259 11648 12035 12420 12803 13184 13563 13940 14315 14688 15059 15428 15795 16160 16523 16884 17243 17600 17955 18308 18659 19008 19355 19700 20043 20384 20723 2...
output:
942318468 444 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #22:
score: 15
Accepted
time: 6ms
memory: 3876kb
input:
444 48125 47714 48089 47756 47673 47336 47643 47828 47967 47970 48363 48172 47879 48106 48435 48212 48235 48544 48337 48246 48123 47882 47631 47766 48155 48282 48501 48658 48277 48272 48029 47708 48119 48540 48741 48302 48653 48386 48687 48486 48467 48902 48683 48534 48593 48924 49079 49496 49147 49...
output:
942318468 444 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #23:
score: 15
Accepted
time: 12ms
memory: 3812kb
input:
444 48125 47714 48089 47756 47673 47336 47643 47828 47967 47970 48363 48172 47879 48106 48435 48212 48235 48544 48337 48246 48123 47882 47631 47766 48155 48282 48501 48658 48277 48272 48029 47708 48119 48540 48741 48302 48653 48386 48687 48486 48467 48902 48683 48534 48593 48924 49079 49496 49147 49...
output:
942318468 444 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #24:
score: 15
Accepted
time: 7ms
memory: 3780kb
input:
444 98346 97903 97462 97023 96586 96151 95718 95287 94858 94431 94006 93583 93162 92743 92326 91911 91498 91087 90678 90271 89866 89463 89062 88663 88266 87871 87478 87087 86698 86311 85926 85543 85162 84783 84406 84031 83658 83287 82918 82551 82186 81823 81462 81103 80746 80391 80038 79687 79338 78...
output:
942318468 444 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Test #25:
score: 15
Accepted
time: 12ms
memory: 3780kb
input:
444 48125 47714 48089 47756 47673 47336 47643 47828 47967 47970 48363 48172 47879 48106 48435 48212 48235 48544 48337 48246 48123 47882 47631 47766 48155 48282 48501 48658 48277 48272 48029 47708 48119 48540 48741 48302 48653 48386 48687 48486 48467 48902 48683 48534 48593 48924 49079 49496 49147 49...
output:
942318468 444 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
result:
ok correct
Subtask #5:
score: 20
Accepted
Test #26:
score: 20
Accepted
time: 309ms
memory: 3868kb
input:
2000 984031 985424 986237 985650 984353 984254 985301 987052 988825 987990 987889 988242 987235 988452 987005 987554 988343 989584 988885 990818 992369 991144 989931 987948 989385 989342 990053 991982 991841 990096 991429 989734 988645 989122 989511 988936 987517 987710 989537 988366 990019 991320 9...
output:
942318468 2000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #27:
score: 20
Accepted
time: 313ms
memory: 3836kb
input:
2000 984031 985424 986237 985650 984353 984254 985301 987052 988825 987990 987889 988242 987235 988452 987005 987554 988343 989584 988885 990818 992369 991144 989931 987948 989385 989342 990053 991982 991841 990096 991429 989734 988645 989122 989511 988936 987517 987710 989537 988366 990019 991320 9...
output:
942318468 2000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #28:
score: 20
Accepted
time: 287ms
memory: 3844kb
input:
2000 0 1999 3996 5991 7984 9975 11964 13951 15936 17919 19900 21879 23856 25831 27804 29775 31744 33711 35676 37639 39600 41559 43516 45471 47424 49375 51324 53271 55216 57159 59100 61039 62976 64911 66844 68775 70704 72631 74556 76479 78400 80319 82236 84151 86064 87975 89884 91791 93696 95599 9750...
output:
942318468 2000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #29:
score: 20
Accepted
time: 293ms
memory: 4104kb
input:
2000 1999000 1997001 1995004 1993009 1991016 1989025 1987036 1985049 1983064 1981081 1979100 1977121 1975144 1973169 1971196 1969225 1967256 1965289 1963324 1961361 1959400 1957441 1955484 1953529 1951576 1949625 1947676 1945729 1943784 1941841 1939900 1937961 1936024 1934089 1932156 1930225 1928296...
output:
942318468 2000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #30:
score: 20
Accepted
time: 231ms
memory: 3824kb
input:
2000 984031 985424 986237 985650 984353 984254 985301 987052 988825 987990 987889 988242 987235 988452 987005 987554 988343 989584 988885 990818 992369 991144 989931 987948 989385 989342 990053 991982 991841 990096 991429 989734 988645 989122 989511 988936 987517 987710 989537 988366 990019 991320 9...
output:
942318468 2000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #31:
score: 20
Accepted
time: 319ms
memory: 3828kb
input:
2000 984031 985424 986237 985650 984353 984254 985301 987052 988825 987990 987889 988242 987235 988452 987005 987554 988343 989584 988885 990818 992369 991144 989931 987948 989385 989342 990053 991982 991841 990096 991429 989734 988645 989122 989511 988936 987517 987710 989537 988366 990019 991320 9...
output:
942318468 2000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Subtask #6:
score: 30
Accepted
Test #32:
score: 30
Accepted
time: 1275ms
memory: 3892kb
input:
4000 3954555 3957010 3956835 3956314 3953175 3953354 3956729 3953814 3952565 3956202 3952745 3950536 3949429 3951108 3952179 3952120 3949909 3946588 3945377 3947064 3943823 3943710 3943727 3942896 3942173 3940800 3938285 3941652 3942769 3940398 3943655 3945018 3947385 3945016 3943021 3942812 3941541...
output:
942318468 4000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #33:
score: 30
Accepted
time: 1384ms
memory: 3896kb
input:
4000 0 3999 7996 11991 15984 19975 23964 27951 31936 35919 39900 43879 47856 51831 55804 59775 63744 67711 71676 75639 79600 83559 87516 91471 95424 99375 103324 107271 111216 115159 119100 123039 126976 130911 134844 138775 142704 146631 150556 154479 158400 162319 166236 170151 174064 177975 18188...
output:
942318468 4000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #34:
score: 30
Accepted
time: 1374ms
memory: 3824kb
input:
4000 3954555 3957010 3956835 3956314 3953175 3953354 3956729 3953814 3952565 3956202 3952745 3950536 3949429 3951108 3952179 3952120 3949909 3946588 3945377 3947064 3943823 3943710 3943727 3942896 3942173 3940800 3938285 3941652 3942769 3940398 3943655 3945018 3947385 3945016 3943021 3942812 3941541...
output:
942318468 4000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #35:
score: 30
Accepted
time: 1341ms
memory: 3892kb
input:
4000 7998000 7994001 7990004 7986009 7982016 7978025 7974036 7970049 7966064 7962081 7958100 7954121 7950144 7946169 7942196 7938225 7934256 7930289 7926324 7922361 7918400 7914441 7910484 7906529 7902576 7898625 7894676 7890729 7886784 7882841 7878900 7874961 7871024 7867089 7863156 7859225 7855296...
output:
942318468 4000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #36:
score: 30
Accepted
time: 1298ms
memory: 3868kb
input:
4000 3954555 3957010 3956835 3956314 3953175 3953354 3956729 3953814 3952565 3956202 3952745 3950536 3949429 3951108 3952179 3952120 3949909 3946588 3945377 3947064 3943823 3943710 3943727 3942896 3942173 3940800 3938285 3941652 3942769 3940398 3943655 3945018 3947385 3945016 3943021 3942812 3941541...
output:
942318468 4000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct
Test #37:
score: 30
Accepted
time: 1426ms
memory: 3868kb
input:
4000 3954555 3957010 3956835 3956314 3953175 3953354 3956729 3953814 3952565 3956202 3952745 3950536 3949429 3951108 3952179 3952120 3949909 3946588 3945377 3947064 3943823 3943710 3943727 3942896 3942173 3940800 3938285 3941652 3942769 3940398 3943655 3945018 3947385 3945016 3943021 3942812 3941541...
output:
942318468 4000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
result:
ok correct