QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#140290 | #4611. 简单数据结构 | myee | 100 ✓ | 751ms | 204928kb | C++11 | 3.0kb | 2023-08-15 16:59:32 | 2023-08-15 16:59:33 |
Judging History
answer
// 那就是希望。
// 即便需要取模,也是光明。
#include <algorithm>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
typedef long long llt;
typedef unsigned uint;typedef unsigned long long ullt;
typedef bool bol;typedef char chr;typedef void voi;
typedef double dbl;
template<typename T>bol _max(T&a,T b){return(a<b)?a=b,true:false;}
template<typename T>bol _min(T&a,T b){return(b<a)?a=b,true:false;}
template<typename T>T lowbit(T n){return n&-n;}
template<typename T>T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<typename T>T lcm(T a,T b){return(a!=0||b!=0)?a/gcd(a,b)*b:(T)0;}
template<typename T>T exgcd(T a,T b,T&x,T&y){if(b!=0){T ans=exgcd(b,a%b,y,x);y-=a/b*x;return ans;}else return y=0,x=1,a;}
template<typename T>T power(T base,T index,T mod)
{
T ans=1%mod;
while(index)
{
if(index&1)ans=ans*base%mod;
base=base*base%mod,index>>=1;
}
return ans;
}
uint End[1000005],To[21000005],Last[21000005],tp;
uint Val[400005],At[1000005],bgn,end,v,lim;
uint Cnt[23][1000005],CntMain[23],Ans[1000005];
voi clear(){
while((1u<<lim)<v)lim++;
for(uint i=1;i<=v;i++)At[i]=-1,Cnt[0][i]=1,End[i]=-1;
CntMain[0]=1,bgn=end=2e5;
for(uint i=1;i<=v;i++)for(uint j=i<<1;j<=v;j+=i)Last[tp]=End[j],To[tp]=i,End[j]=tp++;
}
voi push_front(uint x){
for(uint j=2*x;j<=v;j+=x)if(~At[j])Cnt[Ans[j]][x]++;
Ans[x]=lim;while(!Cnt[Ans[x]][x])Ans[x]--;
CntMain[++Ans[x]]++,Val[At[x]=--bgn]=x;
}
voi push_back(uint x){
CntMain[Ans[x]=1]++;
for(uint e=End[x],s;~e;e=Last[e])if(~At[s=To[e]]){
Cnt[1][s]++;
auto&v=Ans[s];
if(Cnt[v][s]){
for(uint e2=End[s],t;~e2;e2=Last[e2])
if(~At[t=To[e2]]&&At[t]<At[s])Cnt[v][t]--,Cnt[v+1][t]++;
CntMain[v]--,CntMain[++v]++;
}
}
Val[At[x]=end++]=x;
}
voi pop_front(){
uint x=Val[bgn++];At[x]=-1;CntMain[Ans[x]]--;Ans[x]=0;
for(uint i=1;i<=lim;i++)Cnt[i][x]=0;
}
voi pop_back(){
uint x=Val[--end];At[x]=-1;CntMain[Ans[x]]--;Ans[x]=0;
for(uint e=End[x],s;~e;e=Last[e])if(~At[s=To[e]]){
Cnt[1][s]--;
auto&v=Ans[s];
if(!Cnt[v-1][s]){
for(uint e2=End[s],t;~e2;e2=Last[e2])
if(~At[t=To[e2]]&&At[t]<At[s])Cnt[v][t]--,Cnt[v-1][t]++;
CntMain[v]--,CntMain[--v]++;
}
}
}
voi print(){
uint ans=lim;while(ans&&!CntMain[ans])ans--;
printf("%u %u\n",ans,CntMain[ans]);
}
int main()
{
#ifdef MYEE
freopen("QAQ.in","r",stdin);
#endif
uint n,q;scanf("%u%u%u",&n,&v,&q);clear();
for(uint i=0,x;i<n;i++)scanf("%u",&x),push_back(x);
print();
while(q--){
uint op;
scanf("%u",&op);
if(op&2){
op==2?pop_front():pop_back();
}
else{
uint v;scanf("%u",&v);
op==0?push_front(v):push_back(v);
}
print();
}
return 0;
}
// 那就是希望。
// 即便需要取模,也是光明。
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 5
Accepted
time: 0ms
memory: 30316kb
input:
7 1000 28 17 68 51 2 102 204 612 3 2 0 17 1 612 3 3 3 3 3 3 1 68 1 51 1 2 1 102 1 204 1 612 2 2 2 2 2 2 0 204 0 102 0 2 0 51 0 68 0 17
output:
5 1 4 1 3 2 4 1 5 1 4 1 3 1 2 1 2 1 2 1 1 1 2 1 2 1 2 1 3 1 4 1 5 1 4 2 4 2 4 1 3 1 2 1 1 1 2 1 3 1 4 1 4 2 4 2 5 1
result:
ok 58 numbers
Test #2:
score: 5
Accepted
time: 0ms
memory: 11884kb
input:
100 100 100 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 ...
output:
7 1 6 2 6 1 5 3 5 2 5 1 4 6 4 5 4 4 4 3 4 2 4 1 3 13 3 12 3 11 3 10 3 9 3 8 3 7 3 6 3 5 3 4 3 3 3 2 3 1 2 25 2 24 2 23 2 22 2 21 2 20 2 19 2 18 2 17 2 16 2 16 2 16 2 16 2 16 2 16 2 16 2 17 2 17 2 17 2 18 2 18 2 18 2 18 2 18 2 18 2 21 2 22 2 22 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 ...
result:
ok 202 numbers
Test #3:
score: 5
Accepted
time: 3ms
memory: 13964kb
input:
100 100 100 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 ...
output:
7 1 6 2 6 1 5 3 5 2 5 1 4 6 4 5 4 4 4 3 4 2 4 1 3 13 3 12 3 12 3 12 3 12 3 11 4 1 4 1 4 2 4 3 4 3 4 4 4 5 4 6 4 7 4 7 4 7 4 8 4 9 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 4 6 4 6 4 6 4 6 4 5 4 5 4 5 4 ...
result:
ok 202 numbers
Test #4:
score: 5
Accepted
time: 0ms
memory: 36632kb
input:
1000 10000 1000 7 16 18 26 38 40 59 83 97 100 105 112 135 144 151 156 174 176 181 186 191 202 216 217 225 229 230 242 247 267 273 293 306 317 322 323 350 362 366 374 388 404 409 413 425 426 428 441 447 452 469 493 506 523 541 566 568 573 588 597 606 608 610 612 619 633 640 654 664 668 676 680 683 69...
output:
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 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 4 4 4 4 4 4 4 4 4 4 4 4 ...
result:
ok 2002 numbers
Test #5:
score: 5
Accepted
time: 0ms
memory: 22748kb
input:
1000 10000 1000 1 3160 5 7 8 1015 11 12 13 16 17 18 19 20 21 22 3132 24 26 27 28 912 35 36 37 38 84 4956 42 43 46 47 48 50 51 52 53 56 57 5016 61 62 64 65 66 67 68 69 70 71 798 73 74 75 76 77 78 79 80 81 82 83 40 85 6900 87 90 91 93 94 95 98 3996 100 102 10 105 111 112 6360 2262 620 117 118 119 1632...
output:
10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 10 1 ...
result:
ok 2002 numbers
Test #6:
score: 5
Accepted
time: 0ms
memory: 16016kb
input:
1000 1000 10000 1 2 433 4 5 6 7 8 9 10 11 314 13 14 15 643 17 18 19 20 21 262 23 869 25 26 27 28 29 30 31 32 33 555 113 36 37 38 39 40 41 42 43 44 45 46 47 48 49 376 51 52 53 54 55 349 57 58 59 101 61 62 63 217 65 66 67 68 69 70 71 72 73 74 75 76 77 949 568 80 81 82 83 849 85 86 87 909 89 956 91 321...
output:
9 1 8 2 8 1 8 1 8 1 7 6 7 5 7 4 7 4 7 3 7 2 7 2 7 2 7 1 7 1 6 7 6 7 6 7 6 6 6 5 6 4 6 4 6 4 6 4 6 4 6 4 6 3 6 2 6 2 6 2 6 1 5 16 5 16 5 15 5 15 5 15 5 14 5 13 5 12 5 11 5 10 5 9 5 9 5 8 5 8 5 8 5 8 5 8 5 8 5 7 5 7 5 7 5 6 5 6 5 5 5 4 5 4 5 3 5 3 5 2 5 2 5 2 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 ...
result:
ok 20002 numbers
Test #7:
score: 5
Accepted
time: 191ms
memory: 129296kb
input:
100000 1000000 0 270858 58537 658714 922055 300789 370299 156311 532442 53991 325372 177203 878477 117389 264705 902971 157515 802747 856387 857775 186540 583237 289116 50520 913243 163573 537483 923844 873294 358149 628380 278425 676698 734101 993259 106821 532949 831677 745483 569208 903027 75240 ...
output:
5 3
result:
ok 2 number(s): "5 3"
Test #8:
score: 5
Accepted
time: 102ms
memory: 32320kb
input:
100000 200000 100000 107268 65229 101274 76655 151250 92981 92400 73913 67456 6801 61379 85220 72378 167656 62344 59178 55084 5587 37588 154787 80391 115940 23063 179494 3871 154411 109548 38291 87557 163397 139283 93872 14389 126435 10520 199314 100815 59063 136697 76105 108460 143288 94807 63895 3...
output:
9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 ...
result:
ok 200002 numbers
Test #9:
score: 5
Accepted
time: 356ms
memory: 130224kb
input:
100000 1000000 100000 380222 775995 415792 922591 935784 601930 261548 688182 281316 128470 251326 717162 735567 926565 719327 323808 587518 920702 252970 786805 433449 329505 450410 635462 113881 425097 548282 783287 518087 344712 169082 412616 629714 599360 820895 573749 678008 92940 754684 451946...
output:
6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 ...
result:
ok 200002 numbers
Test #10:
score: 5
Accepted
time: 258ms
memory: 204928kb
input:
100000 1000000 99999 375436 825247 241563 760994 484506 434581 928833 186728 172046 902973 872939 58052 424695 682278 784908 608750 611772 963353 18221 407569 708397 699735 379885 290279 947208 786769 311991 948275 633762 293344 468560 56727 126499 728734 315757 114740 184993 732445 784095 814669 64...
output:
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 5 5 ...
result:
ok 200000 numbers
Test #11:
score: 5
Accepted
time: 339ms
memory: 125944kb
input:
100000 1000000 99999 453211 571086 508264 628468 894058 914967 196880 528199 119257 108267 742423 574656 561761 96550 158644 75855 374319 815608 632530 849300 201396 342720 633776 185772 436072 196421 775946 571786 864646 973424 504782 356629 40046 17904 456982 440127 956132 684204 467466 81860 2854...
output:
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 5 5 ...
result:
ok 200000 numbers
Test #12:
score: 5
Accepted
time: 266ms
memory: 126340kb
input:
100000 1000000 99999 4 13 18 26 35 63 84 87 92 129 130 146 158 163 178 183 194 200 205 206 212 215 216 227 232 256 270 272 281 286 320 331 333 342 345 347 358 360 363 365 377 388 413 418 420 425 428 436 448 453 456 458 459 469 471 476 486 506 508 517 525 526 527 544 552 566 572 573 589 591 596 601 6...
output:
9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 ...
result:
ok 200000 numbers
Test #13:
score: 5
Accepted
time: 271ms
memory: 132344kb
input:
100000 1000000 100000 7 14 15 23 34 38 42 81 96 101 108 119 134 148 155 156 163 164 174 225 228 231 234 249 265 273 296 300 312 316 326 329 331 337 341 342 354 356 361 362 411 449 451 459 481 487 493 514 527 528 531 532 537 541 542 544 556 593 596 605 617 649 654 670 673 677 709 713 718 740 742 750 ...
output:
8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 8 2 ...
result:
ok 200002 numbers
Test #14:
score: 5
Accepted
time: 559ms
memory: 195028kb
input:
100000 1000000 99999 775278 3 4 6 12 15 17 18 25 30 31 36 316572 42 43 45 163340 48 53 55 56 59 63 65 66 67 69 75 76 77 70020 243750 81 83 198948 87 88 94 98 14719 103 106 109 651060 123 130 134 135 286296 25217 139 143 146 147 149 152 155 156 157 159 162 163 164 114684 177 180 455763 187 188 191 19...
output:
13 1 13 1 12 2 12 1 11 2 11 1 11 1 11 1 10 11 10 10 10 10 10 9 10 8 10 8 10 8 10 8 10 8 10 8 10 8 10 7 10 7 10 7 10 7 10 7 10 7 10 7 10 6 10 6 10 6 10 6 10 6 10 6 10 6 10 5 10 4 10 4 10 4 10 4 11 1 11 2 11 2 11 2 11 2 11 2 11 2 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11 3 11...
result:
ok 200000 numbers
Test #15:
score: 5
Accepted
time: 621ms
memory: 185684kb
input:
100000 1000000 99999 3 5 6 7 8 9 12 14 950700 16 17 18 22 23 25 27 34 584800 40 41 43 665112 46 47 48 104615 60 63 64 65 19638 83 89 90 94 95 402105 79557 106 109 113 115 121 125 128 130 134 135 137 138 145 146 147 151 289114 153 154 156 157 160 162 883584 14416 165 60609 171 172 174 175 181 186 187...
output:
14 1 13 4 13 4 13 3 13 2 13 1 12 4 12 3 12 3 12 3 12 2 12 2 12 2 12 2 12 2 12 2 12 1 12 1 12 1 12 1 12 1 12 1 12 1 12 1 12 1 12 1 12 1 12 1 11 2 11 1 11 1 11 1 11 1 11 1 11 1 11 1 11 1 11 1 12 1 12 1 12 2 12 2 12 2 12 2 12 3 12 3 12 4 12 4 12 4 12 4 12 4 12 4 12 4 12 4 12 4 12 4 12 4 12 5 12 5 12 5 ...
result:
ok 200000 numbers
Test #16:
score: 5
Accepted
time: 374ms
memory: 130684kb
input:
100000 1000000 99999 2 9 10 13 14 16 603 19 79948 21 22 28 31 33 37 39 62322 41 45 46 370962 320139 58 62 63 64 44994 71 75 210298 77 79 82 83 90 92 93 96 99 103 106 108 111 114 125 128 131 132 133 134 137 140 39214 142 160524 147 151 427042 159 163 164 205942 166 169 174 179 26637 184 187 191 193 1...
output:
13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 13 1 ...
result:
ok 200000 numbers
Test #17:
score: 5
Accepted
time: 274ms
memory: 151292kb
input:
100000 1000000 99999 7 19 41 59 65 66 82 83 87 108 109 122 127 128 135 143 152 153 165 169 224 226 232 233 255 265 269 271 284 290 295 298 301 304 306 320 321 341 342 357 360 364 373 374 389 402 437 443 456 471 480 491 492 500 504 511 512 528 530 566 568 572 584 585 589 592 611 637 651 653 661 666 6...
output:
9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 ...
result:
ok 200000 numbers
Test #18:
score: 5
Accepted
time: 751ms
memory: 174920kb
input:
100000 1000000 99999 1 145548 3 77558 92268 171270 7 513520 9 10 11 12 13 276520 21755 16 17 18 195546 20 731120 287625 23 24 25 26 27 28 29 89856 31 32 33 39208 35 36 367416 29241 108580 40 41 57036 43 44 45 46 47 48 49 50 9285 52 53 54 55 56 57 58 1815 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 ...
output:
18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 ...
result:
ok 200000 numbers
Test #19:
score: 5
Accepted
time: 613ms
memory: 185472kb
input:
100000 1000000 99999 33507 2 3 21050 5 6 7 8 9 10 11 12 13 14 15 16 17 83079 19 20 21 22 108300 24 25 26 55986 28 437346 30 31 32 33 34 35 4328 37 38 39 40 122220 42 43 44 24310 214455 47 48 49 50 51 52 53 43904 55 56 57 58 880824 60 61 284145 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 247342 79 4...
output:
18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 18 2 ...
result:
ok 200000 numbers
Test #20:
score: 5
Accepted
time: 622ms
memory: 180160kb
input:
100000 1000000 99999 1 2 3 4 5 6 7 10726 9 10 11 12 13 14 15 16 17 18 281550 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 90420 53 427050 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 88264 83 84 148876 86 87 88 89...
output:
18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 18 1 ...
result:
ok 200000 numbers
Extra Test:
score: 0
Extra Test Passed