QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#495907 | #4205. Art Collections | bachbeo2007 | 100 ✓ | 1461ms | 4084kb | C++23 | 1.1kb | 2024-07-28 00:28:12 | 2024-07-28 00:28:13 |
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;
void solve(int N) {
vector<int> ord(N),num(N);
iota(ord.begin(),ord.end(),1);
iota(num.begin(),num.end(),1);
vector<int> p(N,0);
int cc=publish(ord);
for(int i=1;i<N;i++){
ord.erase(ord.begin()+i-1);
ord.push_back(i);
int d=(cc+N-i-publish(ord))/2;
ord.pop_back();
ord.insert(ord.begin()+i-1,i);
p[num[d]-1]=i;num.erase(num.begin()+d);
}
for(int i=0;i<N;i++) if(!p[i]) p[i]=N;
answer(p);
}
详细
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 3772kb
input:
6 15 10 11 12 13 14
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 3 4 5 6 1 942318468 6 1 3 4 5 6 2 942318468 6 1 2 4 5 6 3 942318468 6 1 2 3 5 6 4 942318468 6 1 2 3 4 6 5 539883183 6 6 5 4 3 2 1
result:
ok correct
Test #2:
score: 5
Accepted
time: 1ms
memory: 3772kb
input:
6 9 4 7 10 11 10
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 3 4 5 6 1 942318468 6 1 3 4 5 6 2 942318468 6 1 2 4 5 6 3 942318468 6 1 2 3 5 6 4 942318468 6 1 2 3 4 6 5 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #3:
score: 5
Accepted
time: 0ms
memory: 3720kb
input:
6 9 4 7 10 11 10
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 3 4 5 6 1 942318468 6 1 3 4 5 6 2 942318468 6 1 2 4 5 6 3 942318468 6 1 2 3 5 6 4 942318468 6 1 2 3 4 6 5 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #4:
score: 5
Accepted
time: 1ms
memory: 3792kb
input:
6 9 4 7 10 11 10
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 3 4 5 6 1 942318468 6 1 3 4 5 6 2 942318468 6 1 2 4 5 6 3 942318468 6 1 2 3 5 6 4 942318468 6 1 2 3 4 6 5 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #5:
score: 5
Accepted
time: 0ms
memory: 4072kb
input:
3 1 3 0
output:
942318468 3 1 2 3 942318468 3 2 3 1 942318468 3 1 3 2 539883183 3 1 3 2
result:
ok correct
Test #6:
score: 5
Accepted
time: 1ms
memory: 3792kb
input:
6 0 5 4 3 2 1
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 3 4 5 6 1 942318468 6 1 3 4 5 6 2 942318468 6 1 2 4 5 6 3 942318468 6 1 2 3 5 6 4 942318468 6 1 2 3 4 6 5 539883183 6 1 2 3 4 5 6
result:
ok correct
Test #7:
score: 5
Accepted
time: 1ms
memory: 4056kb
input:
6 9 4 7 10 11 10
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 3 4 5 6 1 942318468 6 1 3 4 5 6 2 942318468 6 1 2 4 5 6 3 942318468 6 1 2 3 5 6 4 942318468 6 1 2 3 4 6 5 539883183 6 4 3 5 2 6 1
result:
ok correct
Subtask #2:
score: 15
Accepted
Test #8:
score: 15
Accepted
time: 1ms
memory: 3792kb
input:
40 394 407 362 403 382 425 386 379 420 405 408 393 384 413 398 369 416 375 384 399 374 399 398 401 406 379 396 395 386 389 386 389 392 393 396 395 394 395 392 395
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 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 1 942318468 40 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
result:
ok correct
Test #9:
score: 15
Accepted
time: 1ms
memory: 3800kb
input:
40 394 407 362 403 382 425 386 379 420 405 408 393 384 413 398 369 416 375 384 399 374 399 398 401 406 379 396 395 386 389 386 389 392 393 396 395 394 395 392 395
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 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 1 942318468 40 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
result:
ok correct
Test #10:
score: 15
Accepted
time: 1ms
memory: 3800kb
input:
40 394 407 362 403 382 425 386 379 420 405 408 393 384 413 398 369 416 375 384 399 374 399 398 401 406 379 396 395 386 389 386 389 392 393 396 395 394 395 392 395
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 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 1 942318468 40 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
result:
ok correct
Test #11:
score: 15
Accepted
time: 1ms
memory: 3724kb
input:
40 394 407 362 403 382 425 386 379 420 405 408 393 384 413 398 369 416 375 384 399 374 399 398 401 406 379 396 395 386 389 386 389 392 393 396 395 394 395 392 395
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 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 1 942318468 40 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
result:
ok correct
Test #12:
score: 15
Accepted
time: 1ms
memory: 3792kb
input:
40 780 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779
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 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 1 942318468 40 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
result:
ok correct
Test #13:
score: 15
Accepted
time: 1ms
memory: 3852kb
input:
40 0 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
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 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 1 942318468 40 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
result:
ok correct
Subtask #3:
score: 15
Accepted
Test #14:
score: 15
Accepted
time: 4ms
memory: 3804kb
input:
250 31125 30876 30877 30878 30879 30880 30881 30882 30883 30884 30885 30886 30887 30888 30889 30890 30891 30892 30893 30894 30895 30896 30897 30898 30899 30900 30901 30902 30903 30904 30905 30906 30907 30908 30909 30910 30911 30912 30913 30914 30915 30916 30917 30918 30919 30920 30921 30922 30923 30...
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: 0ms
memory: 3772kb
input:
250 15389 15490 15535 15406 15473 15332 15297 15396 15385 15438 15455 15586 15573 15614 15297 15552 15621 15240 15537 15396 15263 15292 15377 15502 15607 15304 15579 15224 15519 15520 15407 15170 15341 15258 15441 15374 15335 15598 15337 15198 15405 15550 15213 15304 15585 15298 15541 15360 15389 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: 4ms
memory: 3868kb
input:
250 0 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 17...
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: 3796kb
input:
250 15389 15490 15535 15406 15473 15332 15297 15396 15385 15438 15455 15586 15573 15614 15297 15552 15621 15240 15537 15396 15263 15292 15377 15502 15607 15304 15579 15224 15519 15520 15407 15170 15341 15258 15441 15374 15335 15598 15337 15198 15405 15550 15213 15304 15585 15298 15541 15360 15389 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: 4ms
memory: 3804kb
input:
250 15389 15490 15535 15406 15473 15332 15297 15396 15385 15438 15455 15586 15573 15614 15297 15552 15621 15240 15537 15396 15263 15292 15377 15502 15607 15304 15579 15224 15519 15520 15407 15170 15341 15258 15441 15374 15335 15598 15337 15198 15405 15550 15213 15304 15585 15298 15541 15360 15389 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: 4072kb
input:
250 15389 15490 15535 15406 15473 15332 15297 15396 15385 15438 15455 15586 15573 15614 15297 15552 15621 15240 15537 15396 15263 15292 15377 15502 15607 15304 15579 15224 15519 15520 15407 15170 15341 15258 15441 15374 15335 15598 15337 15198 15405 15550 15213 15304 15585 15298 15541 15360 15389 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: 11ms
memory: 3844kb
input:
444 48125 47894 48465 47944 47949 48256 48221 48320 47865 48364 48381 48516 48503 48544 47853 47818 48551 48158 47793 48316 48179 47852 48295 48428 48537 48222 48509 48138 47713 48446 47743 48052 48255 47988 47827 48286 47751 48528 47903 48100 47821 47974 48111 47728 48515 48196 48469 47858 48299 48...
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: 7ms
memory: 3796kb
input:
444 0 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 426 425 424 423 422 421 420 419 418 417 416 415 414 413 412 411 410 409 408 407 406 405 404 403 402 401 400 399 398 397 396 395 394 393 392 391 390 389 388 387 386 385 384 383 382 381 380 379 378 377 376 375 374 373 372 371 37...
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: 11ms
memory: 3792kb
input:
444 48125 47894 48465 47944 47949 48256 48221 48320 47865 48364 48381 48516 48503 48544 47853 47818 48551 48158 47793 48316 48179 47852 48295 48428 48537 48222 48509 48138 47713 48446 47743 48052 48255 47988 47827 48286 47751 48528 47903 48100 47821 47974 48111 47728 48515 48196 48469 47858 48299 48...
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: 11ms
memory: 4024kb
input:
444 48125 47894 48465 47944 47949 48256 48221 48320 47865 48364 48381 48516 48503 48544 47853 47818 48551 48158 47793 48316 48179 47852 48295 48428 48537 48222 48509 48138 47713 48446 47743 48052 48255 47988 47827 48286 47751 48528 47903 48100 47821 47974 48111 47728 48515 48196 48469 47858 48299 48...
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: 10ms
memory: 3772kb
input:
444 98346 97903 97904 97905 97906 97907 97908 97909 97910 97911 97912 97913 97914 97915 97916 97917 97918 97919 97920 97921 97922 97923 97924 97925 97926 97927 97928 97929 97930 97931 97932 97933 97934 97935 97936 97937 97938 97939 97940 97941 97942 97943 97944 97945 97946 97947 97948 97949 97950 97...
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: 11ms
memory: 3732kb
input:
444 48125 47894 48465 47944 47949 48256 48221 48320 47865 48364 48381 48516 48503 48544 47853 47818 48551 48158 47793 48316 48179 47852 48295 48428 48537 48222 48509 48138 47713 48446 47743 48052 48255 47988 47827 48286 47751 48528 47903 48100 47821 47974 48111 47728 48515 48196 48469 47858 48299 48...
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: 266ms
memory: 3800kb
input:
2000 984031 983364 984747 984400 983481 984772 984027 983690 985313 984998 982075 985978 983213 984120 982847 985256 986013 983892 984063 985074 983689 984388 983631 982534 985999 984228 985035 985570 982587 985126 985109 982432 983305 985414 984893 982690 984741 983588 982289 984712 985227 982382 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: 299ms
memory: 4052kb
input:
2000 984031 983364 984747 984400 983481 984772 984027 983690 985313 984998 982075 985978 983213 984120 982847 985256 986013 983892 984063 985074 983689 984388 983631 982534 985999 984228 985035 985570 982587 985126 985109 982432 983305 985414 984893 982690 984741 983588 982289 984712 985227 982382 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: 3824kb
input:
2000 0 1999 1998 1997 1996 1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1949 1948 1947 1946 1945 1944 1943 1942 194...
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: 234ms
memory: 3828kb
input:
2000 1999000 1997001 1997002 1997003 1997004 1997005 1997006 1997007 1997008 1997009 1997010 1997011 1997012 1997013 1997014 1997015 1997016 1997017 1997018 1997019 1997020 1997021 1997022 1997023 1997024 1997025 1997026 1997027 1997028 1997029 1997030 1997031 1997032 1997033 1997034 1997035 1997036...
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: 307ms
memory: 3828kb
input:
2000 984031 983364 984747 984400 983481 984772 984027 983690 985313 984998 982075 985978 983213 984120 982847 985256 986013 983892 984063 985074 983689 984388 983631 982534 985999 984228 985035 985570 982587 985126 985109 982432 983305 985414 984893 982690 984741 983588 982289 984712 985227 982382 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: 246ms
memory: 3884kb
input:
2000 984031 983364 984747 984400 983481 984772 984027 983690 985313 984998 982075 985978 983213 984120 982847 985256 986013 983892 984063 985074 983689 984388 983631 982534 985999 984228 985035 985570 982587 985126 985109 982432 983305 985414 984893 982690 984741 983588 982289 984712 985227 982382 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: 1381ms
memory: 3852kb
input:
4000 3954555 3955888 3950653 3952838 3956001 3957296 3950627 3951632 3954197 3957520 3954589 3951072 3955725 3951160 3955357 3952108 3958537 3956402 3956575 3957592 3951169 3953112 3951113 3954426 3950749 3956738 3957551 3958090 3955087 3957642 3952623 3954928 3955803 3957934 3950853 3955186 3954453...
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: 1377ms
memory: 4084kb
input:
4000 0 3999 3998 3997 3996 3995 3994 3993 3992 3991 3990 3989 3988 3987 3986 3985 3984 3983 3982 3981 3980 3979 3978 3977 3976 3975 3974 3973 3972 3971 3970 3969 3968 3967 3966 3965 3964 3963 3962 3961 3960 3959 3958 3957 3956 3955 3954 3953 3952 3951 3950 3949 3948 3947 3946 3945 3944 3943 3942 394...
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: 1461ms
memory: 3824kb
input:
4000 3954555 3955888 3950653 3952838 3956001 3957296 3950627 3951632 3954197 3957520 3954589 3951072 3955725 3951160 3955357 3952108 3958537 3956402 3956575 3957592 3951169 3953112 3951113 3954426 3950749 3956738 3957551 3958090 3955087 3957642 3952623 3954928 3955803 3957934 3950853 3955186 3954453...
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: 1444ms
memory: 3860kb
input:
4000 7998000 7994001 7994002 7994003 7994004 7994005 7994006 7994007 7994008 7994009 7994010 7994011 7994012 7994013 7994014 7994015 7994016 7994017 7994018 7994019 7994020 7994021 7994022 7994023 7994024 7994025 7994026 7994027 7994028 7994029 7994030 7994031 7994032 7994033 7994034 7994035 7994036...
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: 1243ms
memory: 3856kb
input:
4000 3954555 3955888 3950653 3952838 3956001 3957296 3950627 3951632 3954197 3957520 3954589 3951072 3955725 3951160 3955357 3952108 3958537 3956402 3956575 3957592 3951169 3953112 3951113 3954426 3950749 3956738 3957551 3958090 3955087 3957642 3952623 3954928 3955803 3957934 3950853 3955186 3954453...
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: 1195ms
memory: 3828kb
input:
4000 3954555 3955888 3950653 3952838 3956001 3957296 3950627 3951632 3954197 3957520 3954589 3951072 3955725 3951160 3955357 3952108 3958537 3956402 3956575 3957592 3951169 3953112 3951113 3954426 3950749 3956738 3957551 3958090 3955087 3957642 3952623 3954928 3955803 3957934 3950853 3955186 3954453...
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