QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#209939 | #4205. Art Collections | HossamHero7# | 100 ✓ | 1345ms | 4180kb | C++14 | 608b | 2023-10-10 20:10:12 | 2024-07-04 02:18:21 |
Judging History
answer
#include <bits/stdc++.h>
#include "art.h"
//#include "grader.cpp"
using namespace std;
typedef long long ll;
#define endl '\n'
void solve(int n){
vector<int> v(n);
iota(v.begin(),v.end(),1);
ll def = publish(v);
vector<int> tmp = v;
vector<int> front(n);
for(int i=0;i<n;i++){
int x = v[i];
v.erase(v.begin()+i);
v.insert(v.begin(),x);
int b = i == 0 ? def : publish(v);
front[i] = def-b;
v = tmp;
}
vector<int> ans;
for(int i=0;i<n;i++) ans.insert(ans.begin()+(i-front[i])/2,v[i]);
answer(ans);
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 3800kb
input:
6 15 14 13 12 11 10
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 1 3 4 5 6 942318468 6 3 1 2 4 5 6 942318468 6 4 1 2 3 5 6 942318468 6 5 1 2 3 4 6 942318468 6 6 1 2 3 4 5 539883183 6 6 5 4 3 2 1
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 3808kb
input:
6 9 8 7 6 9 12
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 1 3 4 5 6 942318468 6 3 1 2 4 5 6 942318468 6 4 1 2 3 5 6 942318468 6 5 1 2 3 4 6 942318468 6 6 1 2 3 4 5 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
6 9 8 7 6 9 12
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 1 3 4 5 6 942318468 6 3 1 2 4 5 6 942318468 6 4 1 2 3 5 6 942318468 6 5 1 2 3 4 6 942318468 6 6 1 2 3 4 5 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 4084kb
input:
6 9 8 7 6 9 12
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 1 3 4 5 6 942318468 6 3 1 2 4 5 6 942318468 6 4 1 2 3 5 6 942318468 6 5 1 2 3 4 6 942318468 6 6 1 2 3 4 5 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #5:
score: 0
Accepted
time: 1ms
memory: 3788kb
input:
3 1 2 1
output:
942318468 3 1 2 3 942318468 3 2 1 3 942318468 3 3 1 2 539883183 3 1 3 2
result:
ok correct
Test #6:
score: 0
Accepted
time: 1ms
memory: 3848kb
input:
6 0 1 2 3 4 5
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 1 3 4 5 6 942318468 6 3 1 2 4 5 6 942318468 6 4 1 2 3 5 6 942318468 6 5 1 2 3 4 6 942318468 6 6 1 2 3 4 5 539883183 6 1 2 3 4 5 6
result:
ok correct
Test #7:
score: 0
Accepted
time: 1ms
memory: 3812kb
input:
6 9 8 7 6 9 12
output:
942318468 6 1 2 3 4 5 6 942318468 6 2 1 3 4 5 6 942318468 6 3 1 2 4 5 6 942318468 6 4 1 2 3 5 6 942318468 6 5 1 2 3 4 6 942318468 6 6 1 2 3 4 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: 4088kb
input:
40 394 395 394 395 390 395 398 389 390 389 396 401 386 395 408 379 406 405 392 411 388 393 380 377 414 397 400 411 404 413 400 391 376 371 372 401 362 421 356 417
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 1 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 3 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
result:
ok correct
Test #9:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
40 394 395 394 395 390 395 398 389 390 389 396 401 386 395 408 379 406 405 392 411 388 393 380 377 414 397 400 411 404 413 400 391 376 371 372 401 362 421 356 417
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 1 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 3 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
result:
ok correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
40 394 395 394 395 390 395 398 389 390 389 396 401 386 395 408 379 406 405 392 411 388 393 380 377 414 397 400 411 404 413 400 391 376 371 372 401 362 421 356 417
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 1 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 3 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
result:
ok correct
Test #11:
score: 0
Accepted
time: 1ms
memory: 4084kb
input:
40 394 395 394 395 390 395 398 389 390 389 396 401 386 395 408 379 406 405 392 411 388 393 380 377 414 397 400 411 404 413 400 391 376 371 372 401 362 421 356 417
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 1 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 3 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
result:
ok correct
Test #12:
score: 0
Accepted
time: 1ms
memory: 3856kb
input:
40 780 779 778 777 776 775 774 773 772 771 770 769 768 767 766 765 764 763 762 761 760 759 758 757 756 755 754 753 752 751 750 749 748 747 746 745 744 743 742 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 2 1 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 3 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
result:
ok correct
Test #13:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
40 0 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
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 1 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 3 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
result:
ok correct
Subtask #3:
score: 15
Accepted
Test #14:
score: 15
Accepted
time: 4ms
memory: 4056kb
input:
250 31125 31124 31123 31122 31121 31120 31119 31118 31117 31116 31115 31114 31113 31112 31111 31110 31109 31108 31107 31106 31105 31104 31103 31102 31101 31100 31099 31098 31097 31096 31095 31094 31093 31092 31091 31090 31089 31088 31087 31086 31085 31084 31083 31082 31081 31080 31079 31078 31077 31...
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: 0
Accepted
time: 5ms
memory: 3872kb
input:
250 15389 15388 15391 15390 15393 15394 15391 15392 15387 15386 15379 15380 15377 15402 15381 15374 15405 15382 15397 15406 15405 15398 15381 15368 15405 15370 15415 15380 15379 15394 15419 15404 15415 15386 15401 15406 15355 15406 15425 15386 15363 15426 15415 15354 15419 15362 15401 15394 15359 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: 0
Accepted
time: 5ms
memory: 3880kb
input:
250 0 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 99 100 10...
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: 0
Accepted
time: 5ms
memory: 4056kb
input:
250 15389 15388 15391 15390 15393 15394 15391 15392 15387 15386 15379 15380 15377 15402 15381 15374 15405 15382 15397 15406 15405 15398 15381 15368 15405 15370 15415 15380 15379 15394 15419 15404 15415 15386 15401 15406 15355 15406 15425 15386 15363 15426 15415 15354 15419 15362 15401 15394 15359 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: 0
Accepted
time: 4ms
memory: 3768kb
input:
250 15389 15388 15391 15390 15393 15394 15391 15392 15387 15386 15379 15380 15377 15402 15381 15374 15405 15382 15397 15406 15405 15398 15381 15368 15405 15370 15415 15380 15379 15394 15419 15404 15415 15386 15401 15406 15355 15406 15425 15386 15363 15426 15415 15354 15419 15362 15401 15394 15359 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: 0
Accepted
time: 5ms
memory: 3800kb
input:
250 15389 15388 15391 15390 15393 15394 15391 15392 15387 15386 15379 15380 15377 15402 15381 15374 15405 15382 15397 15406 15405 15398 15381 15368 15405 15370 15415 15380 15379 15394 15419 15404 15415 15386 15401 15406 15355 15406 15425 15386 15363 15426 15415 15354 15419 15362 15401 15394 15359 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: 3808kb
input:
444 48125 48124 48125 48124 48123 48124 48121 48132 48119 48118 48115 48116 48113 48138 48139 48110 48129 48142 48123 48128 48141 48122 48113 48104 48129 48106 48135 48152 48111 48152 48135 48124 48137 48152 48119 48156 48091 48144 48133 48156 48137 48130 48165 48090 48123 48096 48155 48110 48093 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: 0
Accepted
time: 11ms
memory: 3796kb
input:
444 0 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 99 100 10...
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: 0
Accepted
time: 3ms
memory: 4092kb
input:
444 48125 48124 48125 48124 48123 48124 48121 48132 48119 48118 48115 48116 48113 48138 48139 48110 48129 48142 48123 48128 48141 48122 48113 48104 48129 48106 48135 48152 48111 48152 48135 48124 48137 48152 48119 48156 48091 48144 48133 48156 48137 48130 48165 48090 48123 48096 48155 48110 48093 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: 0
Accepted
time: 11ms
memory: 3768kb
input:
444 48125 48124 48125 48124 48123 48124 48121 48132 48119 48118 48115 48116 48113 48138 48139 48110 48129 48142 48123 48128 48141 48122 48113 48104 48129 48106 48135 48152 48111 48152 48135 48124 48137 48152 48119 48156 48091 48144 48133 48156 48137 48130 48165 48090 48123 48096 48155 48110 48093 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: 0
Accepted
time: 11ms
memory: 3800kb
input:
444 98346 98345 98344 98343 98342 98341 98340 98339 98338 98337 98336 98335 98334 98333 98332 98331 98330 98329 98328 98327 98326 98325 98324 98323 98322 98321 98320 98319 98318 98317 98316 98315 98314 98313 98312 98311 98310 98309 98308 98307 98306 98305 98304 98303 98302 98301 98300 98299 98298 98...
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: 0
Accepted
time: 11ms
memory: 3788kb
input:
444 48125 48124 48125 48124 48123 48124 48121 48132 48119 48118 48115 48116 48113 48138 48139 48110 48129 48142 48123 48128 48141 48122 48113 48104 48129 48106 48135 48152 48111 48152 48135 48124 48137 48152 48119 48156 48091 48144 48133 48156 48137 48130 48165 48090 48123 48096 48155 48110 48093 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: 316ms
memory: 4128kb
input:
2000 984031 984030 984031 984032 984027 984032 984033 984024 984025 984040 984021 984040 984031 984042 984021 984016 984035 984032 984021 984040 984029 984042 984051 984010 984029 984018 984011 984054 984015 984016 984059 984050 984007 984022 984057 984026 984047 984066 984025 984006 984067 984026 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: 0
Accepted
time: 290ms
memory: 3876kb
input:
2000 984031 984030 984031 984032 984027 984032 984033 984024 984025 984040 984021 984040 984031 984042 984021 984016 984035 984032 984021 984040 984029 984042 984051 984010 984029 984018 984011 984054 984015 984016 984059 984050 984007 984022 984057 984026 984047 984066 984025 984006 984067 984026 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: 0
Accepted
time: 294ms
memory: 3880kb
input:
2000 0 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 99 100 1...
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: 0
Accepted
time: 310ms
memory: 4140kb
input:
2000 1999000 1998999 1998998 1998997 1998996 1998995 1998994 1998993 1998992 1998991 1998990 1998989 1998988 1998987 1998986 1998985 1998984 1998983 1998982 1998981 1998980 1998979 1998978 1998977 1998976 1998975 1998974 1998973 1998972 1998971 1998970 1998969 1998968 1998967 1998966 1998965 1998964...
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: 0
Accepted
time: 298ms
memory: 3852kb
input:
2000 984031 984030 984031 984032 984027 984032 984033 984024 984025 984040 984021 984040 984031 984042 984021 984016 984035 984032 984021 984040 984029 984042 984051 984010 984029 984018 984011 984054 984015 984016 984059 984050 984007 984022 984057 984026 984047 984066 984025 984006 984067 984026 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: 0
Accepted
time: 289ms
memory: 3880kb
input:
2000 984031 984030 984031 984032 984027 984032 984033 984024 984025 984040 984021 984040 984031 984042 984021 984016 984035 984032 984021 984040 984029 984042 984051 984010 984029 984018 984011 984054 984015 984016 984059 984050 984007 984022 984057 984026 984047 984066 984025 984006 984067 984026 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: 1221ms
memory: 4180kb
input:
4000 3954555 3954556 3954555 3954552 3954551 3954560 3954557 3954554 3954547 3954554 3954561 3954552 3954561 3954552 3954559 3954540 3954545 3954544 3954539 3954566 3954559 3954570 3954555 3954574 3954539 3954534 3954531 3954554 3954531 3954566 3954555 3954548 3954527 3954582 3954553 3954560 3954571...
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: 0
Accepted
time: 1298ms
memory: 3884kb
input:
4000 0 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 99 100 1...
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: 0
Accepted
time: 1220ms
memory: 3892kb
input:
4000 3954555 3954556 3954555 3954552 3954551 3954560 3954557 3954554 3954547 3954554 3954561 3954552 3954561 3954552 3954559 3954540 3954545 3954544 3954539 3954566 3954559 3954570 3954555 3954574 3954539 3954534 3954531 3954554 3954531 3954566 3954555 3954548 3954527 3954582 3954553 3954560 3954571...
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: 0
Accepted
time: 1345ms
memory: 3884kb
input:
4000 7998000 7997999 7997998 7997997 7997996 7997995 7997994 7997993 7997992 7997991 7997990 7997989 7997988 7997987 7997986 7997985 7997984 7997983 7997982 7997981 7997980 7997979 7997978 7997977 7997976 7997975 7997974 7997973 7997972 7997971 7997970 7997969 7997968 7997967 7997966 7997965 7997964...
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: 0
Accepted
time: 1156ms
memory: 3896kb
input:
4000 3954555 3954556 3954555 3954552 3954551 3954560 3954557 3954554 3954547 3954554 3954561 3954552 3954561 3954552 3954559 3954540 3954545 3954544 3954539 3954566 3954559 3954570 3954555 3954574 3954539 3954534 3954531 3954554 3954531 3954566 3954555 3954548 3954527 3954582 3954553 3954560 3954571...
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: 0
Accepted
time: 1310ms
memory: 3884kb
input:
4000 3954555 3954556 3954555 3954552 3954551 3954560 3954557 3954554 3954547 3954554 3954561 3954552 3954561 3954552 3954559 3954540 3954545 3954544 3954539 3954566 3954559 3954570 3954555 3954574 3954539 3954534 3954531 3954554 3954531 3954566 3954555 3954548 3954527 3954582 3954553 3954560 3954571...
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