QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#81681 | #4918. 染色 | Pure_Furies | 35 | 1442ms | 214624kb | C++14 | 3.9kb | 2023-02-25 22:02:59 | 2023-02-25 22:03:01 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long
priority_queue<int,vector<int>,greater<int> >p[1048576],q[1048576];
int mn[1048576],sm[1048576];
ull lzy[1048576],dat[1048576];
void pushdown(int k,int t,int l,int r){
if(mn[k]>=t)
lzy[k<<1]+=lzy[k],dat[k<<1]+=(r-l+1>>1)*lzy[k],
lzy[k<<1|1]+=lzy[k],dat[k<<1|1]+=(r-l+1>>1)*lzy[k];
else{
if(mn[k]==mn[k<<1])lzy[k<<1]+=lzy[k],dat[k<<1]+=sm[k<<1]*lzy[k];
if(mn[k]==mn[k<<1|1])lzy[k<<1|1]+=lzy[k],dat[k<<1|1]+=sm[k<<1|1]*lzy[k];
}lzy[k]=0;
}
void pushup(int k,int l,int r){
if(k<524288){
mn[k]=min(mn[k<<1],mn[k<<1|1]);sm[k]=0;
if(mn[k]==mn[k<<1])sm[k]+=sm[k<<1];
if(mn[k]==mn[k<<1|1])sm[k]+=sm[k<<1|1];
}else mn[k]=mn[0];
if(mn[k]>=p[k].top())
mn[k]=p[k].top(),
sm[k]=r-l+1;
}
void ins(int l,int r,int _l,int _r,int k,int w,int t){
if(l>_r||r<_l)return;
if(l<=_l&&_r<=r)
p[k].push(w);
else{
t=min(t,p[k].top());
pushdown(k,t,_l,_r);
ins(l,r,_l,_l+_r>>1,k<<1,w,t);
ins(l,r,_l+_r+1>>1,_r,k<<1|1,w,t);
}pushup(k,_l,_r);
}
void era(int l,int r,int _l,int _r,int k,int w,int t){
if(l>_r||r<_l)return;
if(l<=_l&&_r<=r){
q[k].push(w);
while(p[k].top()==q[k].top())p[k].pop(),q[k].pop();
}else{
t=min(t,p[k].top());
pushdown(k,t,_l,_r);
era(l,r,_l,_l+_r>>1,k<<1,w,t);
era(l,r,_l+_r+1>>1,_r,k<<1|1,w,t);
}
pushup(k,_l,_r);
}
int Query(int l,int r,int _l,int _r,int k){
if(l>_r||r<_l)return mn[0];
if(l<=_l&&_r<=r)return mn[k];
return min(min(Query(l,r,_l,_l+_r>>1,k<<1),Query(l,r,_l+_r+1>>1,_r,k<<1|1)),p[k].top());
}
void add(int l,int r,int _l,int _r,int k,ull v,int t,int tt){
if(l>_r||r<_l)return;
tt=min(tt,p[k].top());
if(l<=_l&&_r<=r){
if(min(mn[k],tt)==t){
lzy[k]+=v;
if(mn[k]>=tt)dat[k]+=v*(_r-_l+1);
else dat[k]+=v*sm[k];
}return;
}pushdown(k,tt,_l,_r);
add(l,r,_l,_l+_r>>1,k<<1,v,t,tt);
add(l,r,_l+_r+1>>1,_r,k<<1|1,v,t,tt);
dat[k]=dat[k<<1]+dat[k<<1|1];
}
ull query(int l,int r,int _l,int _r,int k,int t){
if(l>_r||r<_l)return 0;
if(l<=_l&&_r<=r)return dat[k];
t=min(t,p[k].top());
pushdown(k,t,_l,_r);
return query(l,r,_l,_l+_r>>1,k<<1,t)+query(l,r,_l+_r+1>>1,_r,k<<1|1,t);
}
int n,m;
set<pair<int,int> >st[150003];
int main(){
ios::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
cin>>n>>m;
memset(mn,31,sizeof(mn));
for(int i=0;i<1048576;i++)
p[i].push(min(m,150000)),
q[i].push(min(m,150000)+1);
for(int i=0;i<min(m,150000);i++)
ins(0,n-1,0,524287,1,i,m),
st[i].insert({-1,-1}),
st[i].insert({0,n}),
st[i].insert({n+1,n+1});
for(int T=0;T<m;T++){
int tp,l,r,i;
cin>>tp>>l>>r;
if(tp==1){
cin>>i;i--;l--;
while(1){
auto it=st[i].lower_bound({l,-1});
int L=(*it).first,R=(*it).second;
if(L<r){
st[i].erase(it);
era(L,R-1,0,524287,1,i,m);
if(L<l)
st[i].insert({L,l}),
ins(L,l-1,0,524287,1,i,m);
if(r<R)
st[i].insert({r,R}),
ins(r,R-1,0,524287,1,i,m);
continue;
}it--;
L=(*it).first;R=(*it).second;
if(l<R){
st[i].erase(it);
era(L,R-1,0,524287,1,i,m);
if(L<l)
st[i].insert({L,l}),
ins(L,l-1,0,524287,1,i,m);
if(r<R)
st[i].insert({r,R}),
ins(r,R-1,0,524287,1,i,m);
continue;
}break;
}
}
if(tp==2){
cin>>i;i--;l--;
while(1){
auto it=st[i].lower_bound({l,-1});
int L=(*it).first,R=(*it).second;
if(L<=r){
r=max(r,R);
st[i].erase(it);
era(L,R-1,0,524287,1,i,m);
continue;
}it--;
L=(*it).first;R=(*it).second;
if(l<=R){
l=min(l,L);r=max(r,R);
st[i].erase(it);
era(L,R-1,0,524287,1,i,m);
continue;
}break;
}ins(l,r-1,0,524287,1,i,m);
st[i].insert({l,r});
}
if(tp==3){
ull v;l--;r--;cin>>v;
add(l,r,0,524287,1,v,Query(l,r,0,524287,1),m);
}
if(tp==4){
l--;r--;
cout<<query(l,r,0,524287,1,m)<<'\n';
}
}
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 10
Accepted
time: 96ms
memory: 145964kb
input:
1000 1000 3 722 914 2141556875752121755 3 323 347 6433743606947304931 2 142 206 439 2 117 840 195 2 127 502 56 3 168 707 15142638115094015116 4 190 257 2 88 976 475 1 319 867 351 1 682 889 409 2 406 446 196 3 28 35 4899387534800369959 2 291 546 150 1 528 617 128 1 58 122 251 2 381 400 276 4 510 958 ...
output:
15128467772367689008 17361914246216994339 5483226026482017320 3033562207293358603 2081407883485577238 7431958406282818646 4664359672511637691 8517692808398202534 17884251128335023776 3389445997760709607 15161173652136060523 17246899135664170339 16659472119973467421 5618344994614112283 92650283427734...
result:
ok 288 tokens
Test #2:
score: -10
Wrong Answer
time: 130ms
memory: 145936kb
input:
1000 1000 1 538 681 44 2 112 540 10 1 160 191 28 1 276 867 1 4 118 419 4 62 209 1 575 884 37 1 783 895 45 4 342 410 2 545 870 16 1 273 501 11 3 258 352 13270291835335737625 3 490 514 5208698592597571883 2 629 865 43 3 966 981 14431353048791951405 1 290 809 16 4 468 843 1 607 875 26 2 177 521 6 4 176...
output:
0 0 0 1090256298972435763 147836376791542005 2987455658418197192 17393388322162025577 0 15463425577465259729 5603739312727078592 9162759280430770517 5734982725161877299 17209386033616770563 4838930779004365643 849737692109005723 6426101344117061130 5419322161439603233 5062725202245147693 71096115354...
result:
wrong answer 244th words differ - expected: '17630819569762552611', found: '4445173108908538357'
Subtask #2:
score: 15
Accepted
Test #11:
score: 15
Accepted
time: 1003ms
memory: 182952kb
input:
300000 300000 1 237576 237663 1 3 16150 16208 9270412155482010138 2 175648 175692 1 4 190836 190849 4 199010 199097 1 73976 298801 1 3 89902 89939 6418828085116455990 3 55415 55461 12238963685511262676 3 119825 119875 8146944792877919309 3 135103 135158 218634681842812119 3 127261 127352 13291431184...
output:
0 0 0 0 0 0 12272376591028786218 0 0 0 0 0 0 0 0 0 0 0 0 0 0 954290611784159519 0 3778617232493240005 8956067326602310519 7373452729428553855 16938285947326957203 0 0 14783754218831034862 7601682967357904165 0 0 0 0 0 0 11584905325916393312 0 0 4657169178464751085 17170356428308894805 0 0 0 0 148107...
result:
ok 74906 tokens
Test #12:
score: 0
Accepted
time: 1001ms
memory: 182812kb
input:
300000 300000 3 51867 51899 1302529772508711959 1 163791 163805 1 1 176666 176684 1 2 127516 127575 1 4 31898 31983 3 151469 151497 15873092426332082486 3 206515 206568 14236701547576343621 4 238241 238324 3 61219 262809 1734847965363776922 2 220344 220393 1 2 98688 148993 1 4 55989 56049 3 298350 2...
output:
0 0 0 10681306550146550313 6652613657187526474 11475494508458717824 811486215804201182 1622972431608402364 0 15901103964711581888 3357820396972179286 4094176851202742427 5379446566603537422 16250215233565986824 15431111627897858304 0 16250215233565986824 4917765691823749552 0 0 10297212258427286974 ...
result:
ok 74943 tokens
Test #13:
score: 0
Accepted
time: 1108ms
memory: 182892kb
input:
300000 300000 4 86816 86819 1 226565 246677 1 3 251963 251987 4817512795078102720 3 17122 202813 12262635941537918815 4 101129 101139 4 171789 171859 2 44072 166207 1 3 171011 171050 9516143677767859845 3 222046 222082 7458232785251868808 4 52499 166730 3 222551 222640 2035040917841558853 1 242195 2...
output:
0 5761786840950245653 3650180384843309913 13470892551030562504 16546298263213309450 3861341030454003487 15279334389549148006 5972947486560939227 0 11734734327511184880 0 10784511422263063797 16229557294797269089 3861341030454003487 10256609808236329862 15173754066743801219 0 1804317071900187272 5936...
result:
ok 74976 tokens
Test #14:
score: 0
Accepted
time: 1036ms
memory: 182980kb
input:
300000 300000 2 224303 224374 1 3 5249 5288 16547079035307299489 1 249405 249440 1 1 244932 244988 1 1 89040 89114 1 2 114166 114194 1 4 110077 110172 1 141920 141970 1 3 205203 205243 1118749945144490180 2 127281 127373 1 3 173359 173363 11110846146456890394 3 283255 283303 3242183420586937197 3 12...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2204476432060505976 0 0 0 0 0 0 0 0 0 6246016557504766932 3429185560983009296 0 0 0 0 0 0 0 0 8450492989565272908 0 0 0 244941825784500664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10672427856181146758 0 0 14782553786312832860 0 0 0 2449418257845006640 0 0...
result:
ok 74803 tokens
Test #15:
score: 0
Accepted
time: 965ms
memory: 183024kb
input:
300000 300000 1 220731 220734 1 3 219129 219133 1441661622928400529 4 297901 297906 3 226862 226869 2997910990656207321 2 154071 154073 1 1 239514 239523 1 2 264617 264626 1 1 66677 66680 1 2 108520 108527 1 2 493 498 1 3 93536 93536 1729223806369067100 1 99697 99702 1 1 98817 98817 1 2 268169 26817...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8523192685433180568 8523192685433180568 1420532114238863428 8523192685433180568 0 0 9943724799672043996 0 11364256913910907424 0 8523192685433180568 5682128456955453712 9943724799672043996 14205321142388634280 2841064228477726856 ...
result:
ok 74996 tokens
Test #16:
score: 0
Accepted
time: 1191ms
memory: 183012kb
input:
300000 300000 3 242005 245455 17402857150844839475 1 195499 202760 1 3 86348 87652 16350042050962992455 2 67513 70549 1 2 17581 20392 1 1 180566 187399 1 2 132424 136215 1 4 201 7568 4 29035 34787 4 159930 167082 4 117096 126668 3 115807 124052 6966836812432990399 4 24003 25402 3 16679 17045 1443793...
output:
0 0 0 0 0 0 0 0 0 0 1069304592552696348 0 0 0 0 0 18416266141863826215 0 0 0 3291332335248161760 0 355153960082695408 2339117343903337888 0 0 8313068146843994614 0 0 1842567308665326891 0 8807430591712594964 2810662510187183646 0 0 11269033645696727616 11110474990560302869 4659943295138724138 573269...
result:
ok 75196 tokens
Test #17:
score: 0
Accepted
time: 1196ms
memory: 182916kb
input:
300000 300000 2 129524 130230 1 3 97829 98681 14177044200280537874 1 117004 117036 1 3 75080 75625 7953158225766026866 3 222342 223044 592691174623108465 4 297810 298422 4 182525 182999 4 107197 107449 4 26126 26883 3 292284 292507 2229113056122186954 2 80055 80745 1 1 9570 10222 1 2 171443 171566 1...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6310142178115801295 0 0 0 0 0 0 0 0 0 14347829830854147244 0 0 0 0 0 0 0 0 3944750402169235976 0 0 14757788959901029185 1019326869378140182 0 0 0 0 10461260111479654801 0 0 16943243282109390662 0 0 0 7444098211629495683 16417881432838763511 10033696365246380464 15743721...
result:
ok 74887 tokens
Test #18:
score: 0
Accepted
time: 1113ms
memory: 182924kb
input:
300000 300000 3 60899 273136 17900506015963226324 2 255340 262254 1 1 47804 166274 1 2 228603 279002 1 1 229031 276929 1 4 136197 298489 3 162024 257244 7401373630232006099 1 215974 227652 1 3 119149 204343 7745371782660146547 1 152630 214299 1 3 96818 230022 73641545834168695 1 216242 238152 1 4 84...
output:
18154335184155868016 4395498840986882932 6677517497004993358 9589498140629496089 7527637927391730952 7561535112473928655 10721089906023321737 14674898849238760964 7537937300108454874 2088977973872526664 12681955574796639580 865433786514001673 6128943734780039177 6057697509332298715 66303342836821411...
result:
ok 74979 tokens
Test #19:
score: 0
Accepted
time: 975ms
memory: 182768kb
input:
290000 290000 4 133423 133423 1 114519 114520 1 2 184800 184802 1 2 138774 138775 1 4 157293 157294 3 81666 81668 13806851267434892022 2 116280 116281 1 1 163245 163247 1 3 289833 289835 244401869236287882 3 135164 135164 8097051466237243604 1 113225 113226 1 4 43898 43900 4 289121 289121 2 133889 1...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 72459 tokens
Test #20:
score: 0
Accepted
time: 976ms
memory: 182660kb
input:
290000 290000 4 130502 130504 2 15321 15322 1 3 275364 275364 4162744751939177223 4 99544 99545 4 100620 100621 3 193438 193439 13148803698890728003 2 125274 125275 1 2 241880 241882 1 3 168292 168292 2833035078327940594 3 27814 27816 10620786078931893277 4 136822 136823 3 56337 56338 74789752446323...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15159374354299362052 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 72567 tokens
Subtask #3:
score: 0
Wrong Answer
Dependency #2:
100%
Accepted
Test #21:
score: 0
Wrong Answer
time: 1442ms
memory: 182932kb
input:
300000 300000 3 19765 150566 5167493634543664094 2 118662 201848 4 4 127772 255639 1 363 249365 3 3 11598 175102 16530837351901358978 4 36444 234550 2 60767 191641 3 3 76143 190023 11283165360234648940 4 151255 257891 3 69394 97478 6131272952305682140 1 45277 77429 3 2 6151 122134 2 4 48165 93810 4 ...
output:
10556488787335954570 18212772968701168848 11437199959288606460 8399299997760384588 11718115706414345024 10430039748605185716 10791380095122215184 15944361710687625976 16135961443839657432 4434563019586156035 8749535087882211887 14176305221399051252 13418003553475512102 1702668605387454355 8261145120...
result:
wrong answer 35th words differ - expected: '17195564649549599964', found: '1990172453632865718'
Subtask #4:
score: 20
Accepted
Test #31:
score: 20
Accepted
time: 1060ms
memory: 186140kb
input:
300000 300000 1 85444 86076 59 1 41150 41411 71 1 278698 279414 45 1 238445 239202 56 1 29965 29984 49 1 282953 283272 37 1 34668 35653 86 2 198587 198744 28 1 270855 271611 58 1 2130 2965 773 1 161601 162298 937 1 50299 50435 36 1 100759 101198 64 1 120208 120543 84 1 295293 295732 34 1 112185 1129...
output:
0 0 16968625150574630951 16605993861994422737 14436884090003254733 0 3880767775473082445 6112413713545582398 0 17289176072916758003 0 0 0 10364128737969177934 0 0 995880312728861482 0 0 0 0 0 10433996744029883784 13368567004097850084 0 3861451384001627672 0 2134685396643390371 2335938625343203079 0 ...
result:
ok 100167 tokens
Test #32:
score: 0
Accepted
time: 920ms
memory: 185228kb
input:
300000 300000 1 217891 287415 280 1 109091 109094 215 1 178397 178458 11 1 34114 34117 48 1 86577 86662 99 1 81392 81461 159 1 5842 5937 85 1 32285 32339 53 1 212941 212995 466 1 42038 42113 787 1 19627 19711 96 1 161983 266619 78 1 49816 222058 93 1 231964 231978 38 1 98426 98500 66 1 139172 139260...
output:
0 11692764325642035757 0 0 0 0 0 0 0 0 10626360660502640041 8974861558116311577 0 0 0 0 6828833927995630395 7675918871528237837 0 15346587511766135393 13255392782493978413 11587532788939849077 0 0 0 6764302870047383583 0 0 7400870183243479412 0 8589365144244158638 3886731025017654354 253988962743422...
result:
ok 100093 tokens
Test #33:
score: 0
Accepted
time: 934ms
memory: 185252kb
input:
300000 300000 1 160271 160305 121 2 136868 136903 52 1 25761 183215 150 1 201646 201657 75 1 178637 178641 161 1 108624 108682 194 1 21955 90478 111 1 62044 62108 103 1 18137 18150 60 2 137444 137488 63 1 169356 169437 369 1 226170 226241 21 2 250536 250571 111 1 64083 64158 265 1 179107 179148 53 1...
output:
0 0 0 10146344313931218962 18059154134718308159 0 0 5482480617044727472 4903722043315669325 8795894026302189205 1504263091099301790 0 4566381908445435572 6966530244481722998 0 0 0 8601406932323617126 0 4231971134025119261 17835338178033113319 0 0 0 0 0 0 0 0 6727335030369532119 0 1158681340578803909...
result:
ok 99470 tokens
Test #34:
score: 0
Accepted
time: 1021ms
memory: 185800kb
input:
300000 300000 2 129741 129786 43 1 133731 133801 159 1 58344 83861 214 1 61033 61091 33 1 183553 183563 156 1 199271 199279 192 1 34576 34596 906 1 72891 80120 176 1 167427 167508 124 1 2964 3023 284 1 98570 98659 146 1 231952 232023 138 1 151151 151160 94 2 5131 5209 203 1 2869 2883 104 2 199205 19...
output:
0 0 4796201084925266965 0 0 0 13883685076285902517 0 0 9431529117273573445 4766573235145348929 1611897968597913432 0 0 0 2586063526252030814 0 0 16001876878405472178 17135272297629565994 0 17056443865906628232 0 4745294572652909898 8998783936939614344 7580363282108800106 0 16013946451858032933 0 477...
result:
ok 50062 tokens
Test #35:
score: 0
Accepted
time: 900ms
memory: 184700kb
input:
300000 300000 2 85463 85536 76 1 1319 173260 147 1 217533 217619 256 1 10109 10176 289 1 55109 209902 262 1 81267 132527 169 1 23758 23766 393 2 271064 271083 283 1 78575 78665 257 1 198478 198506 327 1 130300 130393 669 1 86358 86366 198 1 13014 149678 56 1 39667 39738 27 2 61722 61803 172 2 12005 ...
output:
0 0 0 0 0 211139834562940132 0 0 0 0 9937788562274929249 9903884816325715188 0 0 2249898283594756228 4847122793324524440 13389982050708360868 0 0 0 17832939713973779542 10881562150273498962 17502970485710981903 8002363826031321384 7290681287509116914 0 4376837037219638409 3099055170068370790 0 18423...
result:
ok 125092 tokens
Test #36:
score: 0
Accepted
time: 1167ms
memory: 209568kb
input:
300000 300000 1 1 600 1 1 1 598 2 1 1 596 3 1 1 594 4 1 1 592 5 1 1 590 6 1 1 588 7 1 1 586 8 1 1 584 9 1 1 582 10 1 1 580 11 1 1 578 12 1 1 576 13 1 1 574 14 1 1 572 15 1 1 570 16 1 1 568 17 1 1 566 18 1 1 564 19 1 1 562 20 1 1 560 21 1 1 558 22 1 1 556 23 1 1 554 24 1 1 552 25 1 1 550 26 1 1 548 2...
output:
0 0 0 0 0 0 2506763004086301860 17427921690879692440 0 0 0 0 0 0 0 0 0 0 0 0 12529173451446836357 0 0 8317424068741879477 0 0 0 15375344820100899566 0 0 0 0 0 0 0 0 0 0 0 6979511664378963244 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12078704023826942654 11918039685634475866 0 0 0 0...
result:
ok 75393 tokens
Test #37:
score: 0
Accepted
time: 1221ms
memory: 209588kb
input:
300000 300000 1 1 600 1 1 1 598 2 1 1 596 3 1 1 594 4 1 1 592 5 1 1 590 6 1 1 588 7 1 1 586 8 1 1 584 9 1 1 582 10 1 1 580 11 1 1 578 12 1 1 576 13 1 1 574 14 1 1 572 15 1 1 570 16 1 1 568 17 1 1 566 18 1 1 564 19 1 1 562 20 1 1 560 21 1 1 558 22 1 1 556 23 1 1 554 24 1 1 552 25 1 1 550 26 1 1 548 2...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 5202743784850168886 0 0 4603927467884415342 0 4603927467884415342 9749533581125811360 2088840978649544692 0 18322607265021990624 0 0 9711321466745280504 4603927467884415342 2496249307634847047 0 0 0 0 0 0 0 0 0 0 0 0 5227856238668259348 47582809777024974 1200026012580389334...
result:
ok 75238 tokens
Test #38:
score: 0
Accepted
time: 878ms
memory: 214624kb
input:
300000 300000 1 1 300000 1 1 2 299999 2 1 3 299998 3 1 4 299997 4 1 5 299996 5 1 6 299995 6 1 7 299994 7 1 8 299993 8 1 9 299992 9 1 10 299991 10 1 11 299990 11 1 12 299989 12 1 13 299988 13 1 14 299987 14 1 15 299986 15 1 16 299985 16 1 17 299984 17 1 18 299983 18 1 19 299982 19 1 20 299981 20 1 21...
output:
0 0 0 0 10718922111423336564 10718922111423336564 0 0 0 10718922111423336564 10718922111423336564 0 0 9146817304949717077 13409051668444632193 2348108605912789755 0 0 9506780142003357434 0 0 9857982858752846941 13200643887683725279 0 0 0 0 7505599624584684325 0 5415306418116098549 0 1066421420982755...
result:
ok 75210 tokens
Test #39:
score: 0
Accepted
time: 858ms
memory: 191224kb
input:
300000 300000 1 1 1500 1 1 1 1500 2 1 1 1500 3 1 1 1500 4 1 1 1500 5 1 1 1500 6 1 1 1500 7 1 1 1500 8 1 1 1500 9 1 1 1500 10 1 1 1500 11 1 1 1500 12 1 1 1500 13 1 1 1500 14 1 1 1500 15 1 1 1500 16 1 1 1500 17 1 1 1500 18 1 1 1500 19 1 1 1500 20 1 1 1500 21 1 1 1500 22 1 1 1500 23 1 1 1500 24 1 1 150...
output:
0 0 0 0 8267058594554803676 0 0 0 0 0 0 9795094952976301450 0 0 0 0 0 0 9478972841234857817 0 2336196861175781959 0 0 0 0 0 0 0 0 7132376017696382137 0 0 3089475321960576786 7596711484866781532 0 13604716112274572028 15610753335934999776 832524808219417262 0 0 0 0 0 0 0 0 0 0 0 4306695857416496340 1...
result:
ok 91846 tokens
Test #40:
score: 0
Accepted
time: 715ms
memory: 187308kb
input:
300000 300000 1 1 1500 1 1 1 1500 2 1 1 1500 3 1 1 1500 4 1 1 1500 5 1 1 1500 6 1 1 1500 7 1 1 1500 8 1 1 1500 9 1 1 1500 10 1 1 1500 11 1 1 1500 12 1 1 1500 13 1 1 1500 14 1 1 1500 15 1 1 1500 16 1 1 1500 17 1 1 1500 18 1 1 1500 19 1 1 1500 20 1 1 1500 21 1 1 1500 22 1 1 1500 23 1 1 1500 24 1 1 150...
output:
0 0 0 0 0 0 0 9251420100719027419 0 10437522002891643988 4472746676660461079 9253100888169842044 0 0 0 0 0 0 0 8566814495386720956 607008573332703067 0 14745303428233523745 0 6374585044919482064 0 10054674375899920618 1944753074502624222 2146697673259820164 0 0 0 0 0 0 0 0 0 0 0 0 0 1422096915848735...
result:
ok 90955 tokens
Subtask #5:
score: 0
Skipped
Dependency #1:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%