QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#429639 | #8179. 2D Parentheses | maojun | AC ✓ | 420ms | 57220kb | C++20 | 2.3kb | 2024-06-02 18:43:31 | 2024-06-02 18:43:32 |
Judging History
answer
#include<bits/stdc++.h>
#define mt make_tuple
using namespace std;
typedef unsigned long long ull;
const int N=4e5+5;
int n,x[N],y[N];
struct node{
int x,y,p;node(){}
node(int x,int y,int p):x(x),y(y),p(p){}
bool operator<(const node&b)const{return x^b.x?x<b.x:y<b.y;}
}a[N];
struct Q{
int p,l,r,o;ull k;Q(){}
Q(int p,int l,int r,int o,ull k):p(p),l(l),r(r),o(o),k(k){}
bool operator<(const Q&b)const{
if(p^b.p)return p<b.p;
if(o^b.o)return o>b.o;
return o^(r-l>b.r-b.l);
}
}q[N];
const int S=N<<2;
ull val[S],tag[S];bool ok[S];
#define ls p<<1
#define rs p<<1|1
#define mid (l+r>>1)
#define Ls ls,l,mid
#define Rs rs,mid+1,r
#define all 1,1,V
inline void pu(int p){val[p]=val[ls];ok[p]=ok[ls]&&ok[rs]&&val[ls]==val[rs];}
inline void chg(int p,ull k){val[p]^=k;tag[p]^=k;}
inline void pd(int p){if(tag[p]){chg(ls,tag[p]);chg(rs,tag[p]);tag[p]=0;}}
void upd(int p,int l,int r,int L,int R,ull k){if(L<=l&&r<=R)return chg(p,k);pd(p);if(L<=mid)upd(Ls,L,R,k);if(R>mid)upd(Rs,L,R,k);pu(p);}
ull lst;
bool qry(int p,int l,int r,int L,int R){if(L<=l&&r<=R){!~lst&&(lst=val[p]);return ok[p]&&lst==val[p];}pd(p);return L>mid?qry(Rs,L,R):R<=mid?qry(Ls,L,R):qry(Ls,L,R)&&qry(Rs,L,R);}
mt19937_64 rnd(time(NULL));
int V=0,d[N];
int ans[N];
inline bool solve(){
scanf("%d",&n);
for(int i=1;i<=n+n;i++){scanf("%d%d",&x[i],&y[i]);a[i]=node(x[i],y[i],i);}
sort(a+1,a+n+n+1,[&](const node&a,const node&b){return mt(a.y,a.p<=n,a.x)<mt(b.y,b.p<=n,b.x);});
set<node>s;
for(int i=1;i<=n+n;i++)
if(a[i].p<=n)s.insert(a[i]);
else{
if(s.empty())return false;
auto it=s.lower_bound(node(a[i].x-1,a[i].y,a[i].p));
if(it==s.begin())return false;
ans[(--it)->p]=a[i].p;s.erase(it);
}
int m=0;
for(int i=1;i<=n;i++){
ull w=rnd();int j=ans[i];
q[++m]=Q(x[i],y[i],y[j]-1,0,w);
q[++m]=Q(x[j],y[i],y[j]-1,1,w);
d[++V]=y[i];d[++V]=y[j]-1;
}
sort(d+1,d+V+1);V=unique(d+1,d+V+1)-d-1;
sort(q+1,q+m+1);
auto gn=[&](int x){return lower_bound(d+1,d+V+1,x)-d;};
memset(ok,1,sizeof ok);
for(int i=1;i<=m;i++){
int l=gn(q[i].l),r=gn(q[i].r);
lst=-1;if(!qry(all,l,r))return false;
upd(all,l,r,q[i].k);
}
return true;
}
int main(){
if(solve()){
puts("Yes");
for(int i=1;i<=n;i++)printf("%d\n",ans[i]-n);
}else puts("No");
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 16184kb
input:
3 0 0 2 -2 1 1 2 2 3 1 2 3
output:
Yes 3 2 1
result:
ok answer is YES, 3 tokens
Test #2:
score: 0
Accepted
time: 2ms
memory: 16004kb
input:
2 1 0 0 1 2 3 3 2
output:
No
result:
ok answer is NO
Test #3:
score: 0
Accepted
time: 0ms
memory: 9804kb
input:
1 1 1 0 0
output:
No
result:
ok answer is NO
Test #4:
score: 0
Accepted
time: 392ms
memory: 36812kb
input:
199996 94702923 895749121 -830347683 823853414 -638337012 -528381915 774504965 -903560893 465975432 931026841 47062323 901390864 539345338 830099354 278774201 896803047 -445303873 568413124 80473317 828648317 804283391 -307873779 543648687 893783688 814084625 -664894626 169476937 -999435847 -8232728...
output:
Yes 21701 88398 59327 146960 29196 103293 198434 198023 157367 48765 157321 148908 80650 112519 196489 172199 173973 5551 141927 136548 134111 182366 59175 165032 163355 57765 5843 31857 130090 185365 76890 97333 133685 142517 167272 4006 171963 1988 107334 183071 65560 70618 199137 151179 183975 10...
result:
ok answer is YES, 199996 tokens
Test #5:
score: 0
Accepted
time: 387ms
memory: 36936kb
input:
199989 -185038489 939943355 404432727 -854751373 554853823 193640691 301504969 -998071590 274900356 938454158 -432464517 285421885 405518801 -987371480 571222708 909692099 -759427030 -999520045 869336666 847296633 -622724138 -999895334 -54035108 -876650516 453457981 -842759465 892363710 -794270574 1...
output:
Yes 29051 42308 37337 84855 166499 109338 34862 199409 32310 182823 20620 177599 116234 29219 168881 98498 20908 64603 145113 95741 106479 41666 136146 57568 153800 159627 73275 187439 74915 2272 25123 152755 131852 155786 59824 193752 26923 55748 13026 132594 87769 26528 189799 148030 136086 143680...
result:
ok answer is YES, 199989 tokens
Test #6:
score: 0
Accepted
time: 389ms
memory: 35168kb
input:
199991 -900159443 -671207779 -114175529 -885513466 -57386301 392144414 623068349 -990207451 -466916252 -379159070 -390577839 868367620 -142964637 -583431492 -288979694 -899596387 -357113786 867092775 833205097 992058046 -885274285 951889875 -406261261 872434960 -99080436 889619788 -37516399 -2293017...
output:
Yes 3275 63270 93912 127141 22479 165152 198171 26948 80966 36189 160851 192441 14819 41768 118467 117142 19608 136232 104951 109409 47223 99091 151706 110331 54762 66016 16120 166582 89823 77684 49744 74404 47622 182252 83554 97967 190281 111679 20281 17322 79190 103090 116209 40445 137659 13013 24...
result:
ok answer is YES, 199991 tokens
Test #7:
score: 0
Accepted
time: 397ms
memory: 34920kb
input:
199987 -46649274 139363612 803504473 -487067218 -231304341 961630672 807256898 -256192650 -473216529 -412520640 387331113 961360032 -718008950 -1000000000 156200839 95571209 981893716 -29439313 -470730442 -783533869 799296462 104576693 -553698761 -906790634 807374303 -24023479 309903544 968199523 32...
output:
Yes 108253 39856 69761 52978 95487 52526 165960 5834 154779 176120 98055 116863 185474 199758 158834 7618 59391 94556 148087 135584 103212 46150 11774 57061 193721 73508 53857 107232 28635 11110 92043 112059 176064 91995 182180 157770 164760 94634 170392 57167 64585 147769 177684 141597 196364 5163 ...
result:
ok answer is YES, 199987 tokens
Test #8:
score: 0
Accepted
time: 378ms
memory: 34964kb
input:
199998 520404957 315206955 589123511 -430859516 376860728 -987316121 614664700 -301663049 978007244 -969619964 636107820 259251657 137671843 -958442271 549117430 -935982467 341044573 -957188402 920491566 768041266 584917074 -822386658 170473403 -165076605 528955497 239159653 608627148 -761435336 294...
output:
Yes 82347 108348 69489 26272 38797 5634 171949 36739 168135 91411 33031 55676 52141 104041 168253 25828 64027 133931 106943 41392 145594 100287 149043 92143 168786 81236 24112 157854 150937 77525 2953 98374 15882 5118 86665 187254 96225 44878 26976 116891 140926 67595 136505 12406 158887 133562 1802...
result:
ok answer is YES, 199998 tokens
Test #9:
score: 0
Accepted
time: 195ms
memory: 44816kb
input:
199993 -751151977 -533994506 -927773836 -32372872 56850331 -243441225 327514682 -361038889 247003430 -838950588 -981662694 -566754857 -57613101 -102410474 857750386 -993733474 184906291 -664905204 -479853877 -891755682 851112690 -967524478 -597827988 -230528151 -782058930 -309016717 684473363 -93368...
output:
No
result:
ok answer is NO
Test #10:
score: 0
Accepted
time: 202ms
memory: 32744kb
input:
199995 -88045160 -754166053 537999118 -600975136 507992830 -518080636 39365554 -358691055 -758317392 512499723 881007532 -962828746 -572412035 175565135 968490041 -994664833 709978672 -804735716 -303634784 -694082713 -59130173 -558086683 134566179 -468537576 -559886570 -13279147 956873077 -987380660...
output:
No
result:
ok answer is NO
Test #11:
score: 0
Accepted
time: 210ms
memory: 34236kb
input:
199995 751877273 -902803580 -438283469 -133229905 -457924536 -954675359 838836144 -929871820 -239512796 222101817 563268330 -660190100 556870083 -946184789 -985201972 66353356 -216346975 -313862155 559918674 -947158712 192980719 -961438929 -811651008 -161707407 284585611 -661800796 -414734311 360692...
output:
No
result:
ok answer is NO
Test #12:
score: 0
Accepted
time: 199ms
memory: 42372kb
input:
199992 467672870 -996993001 241650219 -493925971 849648842 -892593087 -326147502 -692396432 -866805696 -775049492 -380985862 -92370469 -362825862 -317436226 830242906 -846790011 -40608016 -941933328 144908937 -471622120 -396018063 -236727104 47294885 -81681580 698568506 -862960919 447264189 -5301740...
output:
No
result:
ok answer is NO
Test #13:
score: 0
Accepted
time: 170ms
memory: 27636kb
input:
199991 109672170 573860547 546933098 -90570193 928277586 970298066 987599431 968626012 920336525 353233135 454572949 967884727 421362358 995209255 598417779 969960580 106017730 762424678 543974354 -684869086 121816039 648191189 380803651 636788977 -956413035 -999893957 473169616 349122663 406717571 ...
output:
No
result:
ok answer is NO
Test #14:
score: 0
Accepted
time: 159ms
memory: 26096kb
input:
200000 12292352 -455065141 -390181101 -783347162 156602165 802988410 743295114 -667798048 375893047 -358589847 115224102 -483640155 979452678 -186641379 -774888997 600180205 226761733 665391746 993091639 -152845106 -954202769 -389817917 668939766 -197604121 657174588 -454213306 -657711838 122038041 ...
output:
No
result:
ok answer is NO
Test #15:
score: 0
Accepted
time: 374ms
memory: 55700kb
input:
199997 -999879824 -999879824 -999985274 -999985274 -999905148 -999905148 -999992386 -999992387 -999859308 -999859309 -999871546 -999871546 -999805065 -999805065 -999975361 -999975361 -999862311 -999862312 -999801098 -999801098 -999979435 -999979436 -999843402 -999843402 -999949497 -999949496 -999921...
output:
Yes 106277 155047 5259 13342 13281 15642 84131 172847 53049 43993 110374 24134 69229 82585 137484 87547 22101 194260 112249 78479 57485 118277 93747 49494 79728 32881 180798 114485 105611 133291 92516 2059 40150 191984 108774 151002 106618 25201 196204 157334 118866 41981 73562 38499 193789 191176 6...
result:
ok answer is YES, 199997 tokens
Test #16:
score: 0
Accepted
time: 374ms
memory: 56912kb
input:
199981 -999868018 -999868018 -999964060 -999964060 -999895225 -999895226 -999868368 -999868368 -999839616 -999839615 -999873455 -999873455 -999859804 -999859803 -999861087 -999861087 -999940826 -999940826 -999906591 -999906590 -999855890 -999855890 -999978359 -999978359 -999821571 -999821570 -999943...
output:
Yes 97200 167575 94367 147836 84642 186962 186483 97271 60515 10785 92661 159707 122996 89145 61642 185036 111235 182354 172420 180889 137780 196273 68284 68008 195923 134210 136528 70464 52625 101192 146980 109825 77820 168411 163267 26971 163506 38993 174992 166277 126904 98713 175260 187079 11642...
result:
ok answer is YES, 199981 tokens
Test #17:
score: 0
Accepted
time: 375ms
memory: 57044kb
input:
199982 -999912098 -999912098 -999829986 -999829985 -999940273 -999940272 -999970088 -999970089 -999809633 -999809632 -999888323 -999888323 -999904094 -999904095 -999923920 -999923920 -999931411 -999931412 -999880937 -999880936 -999883720 -999883721 -999982089 -999982090 -999820997 -999820998 -999931...
output:
Yes 149529 161836 176627 121589 167251 152322 135802 154990 159242 70441 56257 40831 101222 145107 14227 62671 115393 153960 76112 38412 48671 10743 75279 170041 56890 95495 122455 127520 105472 148556 67955 8183 133209 126551 159409 90942 77523 78648 127222 110208 44715 178187 166612 70744 47447 19...
result:
ok answer is YES, 199982 tokens
Test #18:
score: 0
Accepted
time: 276ms
memory: 54860kb
input:
199998 -999887284 -999887283 -999915363 -999915362 -999823075 -999823075 -999863682 -999863681 -999859733 -999859734 -999956745 -999956744 -999997944 -999997944 -999847489 -999847488 -999857822 -999857823 -999852823 -999852823 -999839707 -999839708 -999930996 -999930996 -999975227 -999975227 -999825...
output:
No
result:
ok answer is NO
Test #19:
score: 0
Accepted
time: 290ms
memory: 56876kb
input:
199994 -999912996 -999912997 -999836568 -999836567 -999883073 -999883074 -999996147 -999996146 -999825382 -999825381 -999985933 -999985934 -999982238 -999982239 -999869626 -999869625 -999975304 -999975303 -999823144 -999823144 -999969948 -999969947 -999904042 -999904041 -999933436 -999933436 -999803...
output:
No
result:
ok answer is NO
Test #20:
score: 0
Accepted
time: 286ms
memory: 57220kb
input:
199992 -999972333 -999972334 -999891982 -999891983 -999882809 -999882810 -999822804 -999822803 -999967743 -999967744 -999983993 -999983993 -999863753 -999863752 -999884515 -999884514 -999888863 -999888863 -999885971 -999885971 -999984941 -999984941 -999913751 -999913752 -999960346 -999960347 -999921...
output:
No
result:
ok answer is NO
Test #21:
score: 0
Accepted
time: 286ms
memory: 42636kb
input:
199997 -122202317 112267336 778900868 -580844804 613370701 -764480327 935405236 -986111739 707512416 -854652106 -946807516 -924919586 -284367953 -995688300 488682605 -640251254 360488164 -8716950 447222586 -622186429 486121949 -335591140 60499929 578932647 467103249 -651090790 935758219 -461652795 3...
output:
No
result:
ok answer is NO
Test #22:
score: 0
Accepted
time: 267ms
memory: 42376kb
input:
199983 -561079724 818030313 223496748 263930967 -920520777 944819218 -781859731 955980363 230356676 996890160 -653304277 999787369 -574413094 997581938 -670597993 840688725 -996811195 887239661 -931872992 -771635999 -206187418 868462755 -324784222 868831033 490889005 976071729 -798799305 -994557939 ...
output:
No
result:
ok answer is NO
Test #23:
score: 0
Accepted
time: 278ms
memory: 43544kb
input:
199991 522585641 -54228408 -612804158 -931880027 835863190 -746008723 917559328 -26673058 977631684 -579078012 958896264 269727428 612182590 970041243 995860183 -558049114 -994388586 -917944975 463835784 844964192 979790893 -819275646 998649245 -567734525 922097604 947459660 -90489889 868756734 -401...
output:
No
result:
ok answer is NO
Test #24:
score: 0
Accepted
time: 301ms
memory: 43588kb
input:
199997 108546236 744538874 623931335 503758282 -856923870 -342916607 -452521388 853267479 737136515 803101336 660251162 577444293 -88043309 711307234 -957687754 -304875237 -975000984 342903552 815991558 580088695 516821560 47309582 645428571 528996479 -8631341 569902320 471896506 999228112 -83557659...
output:
No
result:
ok answer is NO
Test #25:
score: 0
Accepted
time: 319ms
memory: 45552kb
input:
199996 214657871 545155159 -471738265 977059933 -501095668 -581526840 -638594572 781399506 838465777 -497260622 -434327766 324377615 -974334969 289339756 579268895 259485230 -323777384 988668418 -855653709 -649586884 575625801 517530062 -356437053 -584077742 -484872296 765519230 22206394 -150520145 ...
output:
No
result:
ok answer is NO
Test #26:
score: 0
Accepted
time: 316ms
memory: 43696kb
input:
199999 -240535554 -421679319 -905108512 -666141640 -785476573 572798433 -480315216 557644077 -791990949 577248627 -668916644 -769003399 -792952592 277657199 -483495235 401600554 -460111143 616819036 -484228813 -10463553 766448353 -119248395 -819970967 517340196 -812374957 176095128 -501090445 560006...
output:
No
result:
ok answer is NO
Test #27:
score: 0
Accepted
time: 275ms
memory: 42632kb
input:
199983 285977540 173196492 298548966 -251290389 663308404 -990904385 756457595 -610453503 674233594 840974367 -498786605 12416452 689544559 410905146 284321165 798265091 723349957 966591281 314432591 515506476 -190130061 751931774 -559034473 556339727 -351312909 838898016 671848157 4735980 -36595390...
output:
No
result:
ok answer is NO
Test #28:
score: 0
Accepted
time: 283ms
memory: 42812kb
input:
199984 -959855371 -818870493 -123282478 663876651 -312140223 914573245 482986644 -120794704 -64433900 570914266 501188284 868115836 34562422 -783803611 -999934795 -847206388 449343953 -974997125 640873305 844780868 485363353 -401173442 -994693059 956497981 -305896401 673992930 896445402 855257050 -8...
output:
No
result:
ok answer is NO
Test #29:
score: 0
Accepted
time: 298ms
memory: 42272kb
input:
199996 -710297231 -67252811 660274228 -966168471 -517587609 972236052 -28264863 827168353 698303481 -729518958 299171738 737207859 469561736 -424219433 -53990414 482302048 -216349319 453150193 921888974 817456585 -249120614 -512339175 881572452 -758480801 -534809663 315589169 562155731 -953793109 41...
output:
No
result:
ok answer is NO
Test #30:
score: 0
Accepted
time: 293ms
memory: 43148kb
input:
199997 445138762 -764924751 -634174836 828818277 323216434 -987224178 -544532317 -972166146 220666257 288994311 482102583 -760857134 687316608 -882283221 455653971 -141665400 380321891 -714992598 213763734 -994631917 858026749 -372231009 -986536843 869182637 -662185088 146138759 548063315 -899329834...
output:
No
result:
ok answer is NO
Test #31:
score: 0
Accepted
time: 417ms
memory: 42580kb
input:
199986 -174079749 406470350 -408579701 793912954 543768137 201792724 612755956 999458891 -188959089 67735263 975259516 791601588 923076002 903429433 431867238 -976737245 -797428984 945306640 -852025595 885927943 988012598 242441053 -803506806 980653354 -819157433 640802684 -664321750 11623162 -80013...
output:
Yes 74773 150219 111026 9351 187868 17101 144507 180618 163606 78600 51220 42323 5951 177288 123418 134317 173253 117232 136332 115960 23080 96578 167115 94546 48837 23397 193309 198670 104232 112713 157013 17626 127413 167738 139488 11216 654 108825 22251 162789 131309 108781 152449 64764 70718 136...
result:
ok answer is YES, 199986 tokens
Test #32:
score: 0
Accepted
time: 402ms
memory: 43052kb
input:
199998 -858940803 251938581 279370072 -412817037 533551670 258352856 342961484 -837168082 258040344 972861107 -556765903 -545264561 -413313948 550511314 -490944815 -720410329 -458579275 -674365103 554981826 989642595 553328586 989245279 85332614 -578390093 -570309876 -649965976 75376784 602447666 94...
output:
Yes 2162 84930 87550 20573 94377 95609 168976 189204 133937 21414 35022 29058 113581 108675 5970 140373 181753 29132 4678 115605 73050 135832 51493 15299 181038 46241 127347 75291 86069 107793 20710 39998 188866 19086 26103 64824 187121 192239 176094 82129 19279 154156 8716 3569 12664 159201 33802 1...
result:
ok answer is YES, 199998 tokens
Test #33:
score: 0
Accepted
time: 420ms
memory: 43112kb
input:
199987 99114629 -495117820 -564888674 -110875462 200158897 999446969 -567636033 961856504 -7105343 -492305619 -822247718 970295870 -580128063 205648658 -288072736 -455001434 -860407225 -558674 -142278000 -19280721 -482196067 -571405190 176191034 -714353141 -316693780 -203341449 -672673379 992919271 ...
output:
Yes 146974 37777 191945 190700 85332 158259 134566 164370 143685 79768 21952 174717 12643 154700 43458 170166 127286 155885 61766 36422 101916 108048 125642 7758 110352 45062 164146 14360 9515 169885 17189 123928 26142 65576 76529 146820 105728 182450 93702 74019 59877 127236 77055 8580 104710 10408...
result:
ok answer is YES, 199987 tokens
Test #34:
score: 0
Accepted
time: 201ms
memory: 33940kb
input:
199983 3605389 -613952971 -368768117 -477886553 -979036987 -470111371 548756796 -2098487 -993177466 -55158028 -567445122 -619800908 -721709890 -951202302 -60197362 -514649419 -886863792 -494264519 -942456597 240291569 398472655 -537883605 -218625530 -234793429 536313784 -837505922 -452821576 -955281...
output:
No
result:
ok answer is NO
Test #35:
score: 0
Accepted
time: 408ms
memory: 42048kb
input:
199988 991372473 -320895397 -886391648 352640312 -857899909 -69672626 -691831225 730169322 893713619 -888577379 -610700838 650006278 -711443106 200445631 -560612933 829491515 -802643950 37399784 -631059268 660786538 -941299615 -958482129 -28323457 665531929 987340480 -376609610 -807603178 -316672349...
output:
Yes 98688 23390 141614 90202 18283 83021 65905 121756 118471 121097 58201 102483 91592 25921 188057 81384 31952 173106 108825 153448 81594 142299 184279 112410 23859 34587 167090 13023 1829 78345 139290 67419 38805 1294 133862 67727 194048 18221 95486 183024 135369 129369 161472 187941 79823 37641 1...
result:
ok answer is YES, 199988 tokens
Test #36:
score: 0
Accepted
time: 200ms
memory: 37988kb
input:
199985 -495905301 375825908 -152834589 -724299433 -719689010 -717971761 -445639716 -50394625 -994278928 240819441 -853944476 -395397377 106777507 94422963 -294099735 -622684833 -558183124 -957731855 -765770064 -939280458 -732966286 -577149783 -376163132 -235838560 -22636327 -875580929 -506662402 535...
output:
No
result:
ok answer is NO
Test #37:
score: 0
Accepted
time: 395ms
memory: 42568kb
input:
199980 -846568982 639889189 -860385779 641967902 -769124646 435209733 -944032065 657644575 467447656 506044679 -953394397 -702182132 -814230888 699429332 -937499421 -706326705 -922796610 -707498154 -698475244 503961622 861456873 282336349 -65681847 512388280 -824751434 -745390131 -856178154 59592436...
output:
Yes 29428 72670 152224 139936 83457 159774 34555 136199 132080 78099 84841 33202 159526 180058 105885 190027 15716 153239 121448 145550 110738 94671 40710 132494 99488 193189 97240 77359 68260 184089 25270 132510 110453 159914 52996 198655 103959 171570 37527 103666 79280 118585 152240 67606 89987 9...
result:
ok answer is YES, 199980 tokens
Test #38:
score: 0
Accepted
time: 405ms
memory: 42004kb
input:
199987 -212627750 762474223 -978807864 -707197530 -429288609 -672888351 -50709284 984196659 -389884268 -506064324 292101107 911088242 -564002420 94007577 -329886194 642956954 -267199874 -789030921 -147907327 -602738640 -584224805 984652033 266029964 711690910 -8136474 -659106736 871755099 -880069437...
output:
Yes 169097 70030 77804 16624 6057 31817 145468 130965 71871 133841 8341 130324 164076 76417 42154 179642 65100 140946 102116 180586 54788 42917 189120 170787 70526 158270 177767 189029 186451 58335 45502 59882 76701 46326 83663 138375 51022 166686 15397 192473 3294 107608 148281 6791 167373 185880 1...
result:
ok answer is YES, 199987 tokens
Test #39:
score: 0
Accepted
time: 400ms
memory: 42548kb
input:
199998 -912431270 787508047 -65328032 -746612957 677889473 -408641974 -626092717 105363888 -820950394 947452270 671121822 -409927986 -29759573 -312639535 -878478577 439299592 -805052320 837103114 -930483104 912655265 128400308 991033612 -15181893 -646105103 853434431 941371332 145889139 829986057 -6...
output:
Yes 139730 162021 105181 193404 168217 48521 167657 178464 68471 74919 158970 72536 92580 171660 62100 100271 155534 50959 28444 16943 3590 110102 23583 136136 188563 115086 77406 166680 168247 158673 18462 169456 92613 25850 133413 80143 98653 45597 153988 61308 48626 106194 62840 188205 131188 792...
result:
ok answer is YES, 199998 tokens
Test #40:
score: 0
Accepted
time: 209ms
memory: 32328kb
input:
199991 -219180865 718948145 -854681666 596616273 -272016142 449599653 -769799541 -260367812 -301653907 368430376 520478522 -591804930 757240512 220616358 -287994465 373860202 59747711 -957997001 -41793369 -119345446 -330389092 142176820 292159509 -689839457 -135796897 -523300769 79438073 449864621 -...
output:
No
result:
ok answer is NO
Test #41:
score: 0
Accepted
time: 83ms
memory: 14676kb
input:
199996 731534200 -538156087 -162363056 282660684 -246490336 820031634 -415448366 -868431962 -883400375 -927796030 -55495629 -990011350 90740118 -979607905 -519800608 405701832 379002485 -100813173 -169698639 564263383 295972014 25391460 -679763037 -99720432 -113777908 -582695377 -267531037 -78497922...
output:
No
result:
ok answer is NO
Test #42:
score: 0
Accepted
time: 77ms
memory: 17840kb
input:
199988 645343281 830448215 507610891 72690299 417219079 -759449585 579243160 250052508 -138618468 271765303 -341027382 -400182064 370521439 -785748903 -92100381 547404304 572750540 -272400380 208653900 246149340 -993856034 634092831 582891646 -691980573 -773374959 394675239 -663598126 17089838 -1504...
output:
No
result:
ok answer is NO
Test #43:
score: 0
Accepted
time: 396ms
memory: 42432kb
input:
199990 -214078228 223962003 209669478 -140383930 -592700000 367965965 972721080 981349426 -202297081 658946710 -998291066 102598970 33312629 -208724571 -962490302 -210920752 -454725680 231633837 -221656268 -24715717 -802970999 -292876178 -714564318 78133909 -969192541 10790003 765191364 -536898849 -...
output:
Yes 27881 64903 29377 141086 22932 190034 132400 118065 117985 143754 123098 179527 80048 56286 166718 123319 103500 44731 61001 11428 61259 167097 73015 14572 140077 19585 43765 146383 104202 90376 153630 115788 177974 134935 70722 3974 184810 189321 9686 184652 41707 78477 141216 60378 34761 13098...
result:
ok answer is YES, 199990 tokens
Test #44:
score: 0
Accepted
time: 392ms
memory: 42832kb
input:
199992 -448929241 519407600 -787665758 472889934 280079414 480637250 451053767 -622345939 -954766905 545806860 -346223252 519900126 -127501716 458989271 -23222462 -408155380 -419412263 459847476 -514654995 979138832 -727065606 -877934424 951512596 -496290252 170475446 214676312 -436278334 520054680 ...
output:
Yes 129495 101666 42524 95260 72858 1234 83078 11414 47716 29963 169846 149339 180257 135837 49673 61504 144334 146083 6898 29818 564 101046 35298 85144 156325 126319 81009 170181 14747 1794 65151 58734 96906 105289 126259 58242 143105 197357 11188 122473 4501 95199 124651 1167 80106 181833 120561 1...
result:
ok answer is YES, 199992 tokens
Test #45:
score: 0
Accepted
time: 417ms
memory: 42736kb
input:
199991 -238665747 184159342 -799306961 291550128 -986343795 -139678817 -766808648 -922912234 -863147843 578154141 -863750409 542787225 521834577 -922551260 -658872761 -887753663 389068595 102960543 240806798 407033476 -423921281 17054201 -122986854 191876257 -286569529 -841841502 605901057 -44492636...
output:
Yes 57482 118123 113210 94377 23048 87632 185914 141601 26499 182537 191892 189779 155331 86757 155377 61804 98415 16100 147701 92390 57518 183558 173960 154236 132883 67682 135612 57326 188908 74494 91546 175095 174893 106354 89247 139415 197868 165710 142382 62811 178628 172775 176240 92266 101669...
result:
ok answer is YES, 199991 tokens
Test #46:
score: 0
Accepted
time: 196ms
memory: 34628kb
input:
199981 -276710947 -824441954 -739694118 -86526943 -557701425 -644097342 -828085641 -714639350 -276340092 -46005502 520133871 -825253105 232706036 -757447696 185463296 524410593 103781066 -906385667 -501509856 -98079114 -280352083 761532312 -434416975 207455332 -968790352 48767137 157565839 -32277609...
output:
No
result:
ok answer is NO
Test #47:
score: 0
Accepted
time: 417ms
memory: 42776kb
input:
199985 203753155 -20400794 -76834127 890015578 -306541781 859621136 -690653145 -610238441 987238985 -409704354 999919679 701688080 445636546 194518336 402625781 274333647 184515164 -768808032 981564990 -814613811 -718365727 150719970 967780264 -80815026 -634621978 607260582 273033589 -28506383 -8937...
output:
Yes 127286 47153 183510 6085 60956 148077 30122 48423 127828 151233 3996 111203 185379 43740 34897 181177 161738 8867 51926 175155 128064 32273 118564 141869 108249 199252 114640 193649 6935 104655 27134 10163 151336 185262 50759 65145 199591 28068 140443 127291 157089 72840 96642 196829 29605 60579...
result:
ok answer is YES, 199985 tokens
Test #48:
score: 0
Accepted
time: 82ms
memory: 15184kb
input:
199994 -233235034 955526840 1951648 -606876170 -94410062 -973765006 -600053803 -292102651 -336369038 169568450 589230737 745894387 -569471250 647097090 254472612 -870249617 816159421 311700923 -395776692 -259517563 -310243802 -826149892 -928843554 365569388 -271724892 -486161572 999603086 698198191 ...
output:
No
result:
ok answer is NO
Test #49:
score: 0
Accepted
time: 206ms
memory: 38168kb
input:
199983 -864492835 529944511 -633148112 -656628658 -652864111 374654272 -681792943 -683029666 170969913 -899532980 -451554563 -606159083 684591339 -831949799 -762102360 -580545597 -409146753 -589429466 -537152046 -253091240 -616905794 -597016952 -771351106 -593641555 -695503792 -227333395 -504087825 ...
output:
No
result:
ok answer is NO
Test #50:
score: 0
Accepted
time: 401ms
memory: 44208kb
input:
199988 755772687 -715384156 246465398 507495807 897898791 -886720281 846772737 -978708870 915767418 -964339642 857726012 -913681266 -891377702 -529696484 -995642185 -982261702 864734034 -960261041 -987187817 292319285 996558208 -528593756 821512798 -846987006 406262639 28223808 450579064 -165365299 ...
output:
Yes 28209 56005 129782 63526 6887 57640 145369 193987 118312 66469 119975 85566 165466 145091 121008 136695 170473 69938 99800 35809 19075 46846 119359 826 131460 36260 23327 89420 3497 164852 92589 129002 183014 18954 95329 133125 167243 73762 34487 22645 13428 33506 12090 74814 187277 71342 12087 ...
result:
ok answer is YES, 199988 tokens
Test #51:
score: 0
Accepted
time: 51ms
memory: 22228kb
input:
33770 335767725 -885716496 220567145 446478768 -716358715 268936836 908665717 -989764466 10676106 754396725 151436415 474300337 -9086887 754682535 -486714018 918159966 27124440 960589801 -822567728 690701847 974583583 326253739 -17281905 879433735 962270807 320393403 946819116 644074382 -260239931 1...
output:
Yes 1514 19449 30048 4519 12060 14974 21468 15972 30947 9496 7546 14998 23029 30021 33155 17203 23836 20262 29387 25052 15990 26773 1253 29759 27338 17466 3887 12418 5266 33393 32629 19266 395 19308 11060 8856 17349 3689 17584 27297 32023 13048 11969 2677 28911 2716 31834 31640 3483 32876 7257 7003 ...
result:
ok answer is YES, 33770 tokens
Test #52:
score: 0
Accepted
time: 63ms
memory: 21544kb
input:
36245 -510907052 -520462252 -907294107 -549360135 982752212 -982689381 342826997 1677170 855848641 -757446446 -751171317 -547290470 159632349 -757226521 -394346212 368619637 748989070 378684473 451008376 -224597017 474328483 926405475 94433562 -701084612 183844347 -169644182 -906582515 -559415212 71...
output:
Yes 23595 24857 10262 23290 11559 15320 20674 444 9142 4507 30567 20024 11650 11265 11738 28413 1709 26057 18531 28811 11304 6763 34887 17787 34015 31414 11058 16180 10538 14973 17785 4025 13789 3880 28766 7539 12426 331 18075 36056 24110 16130 22276 5611 8816 35950 5740 22451 14843 16847 13846 2115...
result:
ok answer is YES, 36245 tokens
Test #53:
score: 0
Accepted
time: 80ms
memory: 26108kb
input:
49872 961407002 -168039964 406213385 -970750069 979535588 -372306186 137990281 -459069518 972325704 -438959798 102605016 -126268155 -475253205 -767666727 -495802676 561036091 56944638 913287338 53924968 -204082854 951602280 -616183780 -304843928 -68878889 41978903 963373055 988334606 -91608909 98353...
output:
Yes 32359 37512 46506 13913 19570 11289 29067 11531 27091 15923 11764 15499 43606 35406 20132 30776 14870 13891 26868 33486 29369 49673 2144 26022 7879 40976 35879 2626 26723 1295 24102 25083 38088 40497 9740 35864 1509 35131 45485 24903 24317 1260 20603 30332 22486 43957 16853 12323 17033 14122 133...
result:
ok answer is YES, 49872 tokens
Test #54:
score: 0
Accepted
time: 90ms
memory: 21456kb
input:
53541 -939576750 594746436 746526379 -559871493 -627702417 -287500319 -477641476 -968459356 421221738 -907611668 -843920777 722624762 -231567728 839722484 997196224 -844838303 166533515 -933859382 825079759 -769853897 -639924583 338094232 -831081168 -766438244 -699852331 -345401421 -645350085 356364...
output:
Yes 30289 17946 26070 41531 45461 15934 13268 11256 13551 47701 14870 38943 47484 16327 13629 33258 30627 48311 41205 13599 11680 18628 7131 11799 33295 36601 17864 40016 25012 4254 25776 19705 10064 12639 42344 1703 42795 25984 2056 47790 25295 2590 51263 34388 31044 27028 26428 13632 35178 39139 4...
result:
ok answer is YES, 53541 tokens
Test #55:
score: 0
Accepted
time: 56ms
memory: 20288kb
input:
34858 28773722 -333892002 86004339 389738708 615611133 958525584 -740578229 86791672 659745978 962141305 -824728106 627294380 -714220397 921326545 -575379625 692378811 481591745 568044142 -904674377 503728218 762067798 684495481 -292253202 -347214590 125117970 444366041 613210486 975514562 -98673969...
output:
Yes 31575 24439 29784 31129 16115 23556 21202 7153 7615 24614 30883 26549 7707 30498 8410 33221 17297 2927 10343 27767 3270 15673 32251 15844 4214 18924 10384 20636 4122 19584 22789 25983 19448 23411 16566 10797 19814 12162 8595 2139 30723 27243 25462 34823 23502 26702 2997 17859 24270 14972 21085 2...
result:
ok answer is YES, 34858 tokens
Test #56:
score: 0
Accepted
time: 81ms
memory: 23072kb
input:
48870 -557184918 -502300312 -388679291 -989480330 -701059294 -657825922 -384644762 -973496196 -709469232 764568316 -73459289 -829825460 -436150860 -519810731 15877461 -968592281 -610760214 36411712 251300403 956574139 -297022953 -253420605 -423026471 -178566641 -344559112 154616378 -696204794 -98568...
output:
Yes 35721 48749 7725 41054 8574 38830 954 32667 24873 11420 26237 37521 43488 33782 32356 41720 38282 35202 15457 48709 17108 43067 23617 36578 18990 26406 34844 19316 41021 14006 16426 23545 11166 42732 19169 45458 23813 10441 13353 30731 7624 12153 28879 19155 3870 45114 2125 47673 31094 25402 226...
result:
ok answer is YES, 48870 tokens
Test #57:
score: 0
Accepted
time: 91ms
memory: 21228kb
input:
54255 676764653 850708923 801111409 -172325559 -137224308 -840690204 696719425 40628865 917912411 839496587 -199760817 -818401866 368262939 138660753 890708108 119237864 326377534 102510480 669311787 101392046 725611284 100500737 727341626 -10366444 58888036 204514618 -536382022 706353699 649581820 ...
output:
Yes 15866 12039 50315 11961 35941 26773 28402 43522 36538 36428 36127 16877 47593 39211 6122 37167 4143 7097 17510 47916 37007 35363 22711 23308 35906 28481 18897 29283 26868 47476 1075 31489 23131 30730 15610 34809 23918 13619 15204 35415 3068 1194 20032 27365 22606 45018 40980 18282 34685 1128 264...
result:
ok answer is YES, 54255 tokens
Test #58:
score: 0
Accepted
time: 57ms
memory: 22460kb
input:
33328 977087764 -740194438 869269881 537950116 347939525 538675254 88603782 -271060739 373633167 -976217364 -723090763 -957317310 20459452 63354056 -903428638 57421289 387529530 257107610 583446479 -41660147 386109523 65429964 261083997 809760028 677232272 -40001917 981493736 -665323470 455093466 54...
output:
Yes 11865 22126 24184 4714 30955 1242 18873 31902 23214 24522 19598 6203 27961 8458 17735 21644 15353 20704 1148 32344 20607 16781 2997 7510 8042 370 20857 33096 7962 3843 15837 29564 19469 19318 14004 25965 24752 22700 9920 4959 5817 13247 5161 1892 28182 3266 24800 16446 20838 3336 15155 10219 749...
result:
ok answer is YES, 33328 tokens
Test #59:
score: 0
Accepted
time: 87ms
memory: 20136kb
input:
52543 993406364 988229988 -143700098 -920011686 -169098917 575806670 740676973 -796983027 -772301977 -265774623 -947131663 75451222 900595696 302936967 972714603 630971039 -366744290 -608654319 808855530 -664519296 735344859 365710835 775922040 526206043 872700605 -572562812 893581427 489897504 9061...
output:
Yes 34122 20856 19913 16407 8281 2438 27378 52378 19793 7028 50150 32643 36822 50952 7309 24872 43817 47807 15586 40546 13984 50783 31002 24426 1035 34000 41473 32958 28173 31688 45268 46868 46499 30095 10283 8904 45184 5659 5017 49471 19461 12295 16580 2441 13499 29826 35007 20238 8825 34818 20645 ...
result:
ok answer is YES, 52543 tokens
Test #60:
score: 0
Accepted
time: 88ms
memory: 23884kb
input:
54019 279274312 68342451 -293248103 -925010055 -726375858 -959979832 788307849 171052449 906503689 -454542726 -989377555 571993746 528314613 705722748 -999124155 109768249 863381866 167674803 -428114496 -3200567 -991091819 960279708 -992685408 94032545 -85592486 80426588 -998182141 -81910210 -137512...
output:
Yes 17922 19535 27551 7833 17988 12850 19052 2686 26894 44848 23727 36380 44160 32725 9298 51353 39079 47463 23693 31265 53966 37548 37051 9079 37579 32758 3943 45615 115 12345 459 25870 23411 33687 39358 30819 10457 27356 17296 41700 14904 33274 53916 41611 12633 39335 40039 26352 28236 41844 52835...
result:
ok answer is YES, 54019 tokens
Test #61:
score: 0
Accepted
time: 57ms
memory: 21628kb
input:
33265 991330158 -724920375 660197961 -591557779 811945529 946745745 964564316 -399757145 730148633 933201818 -543461153 -994546076 756240067 924080506 575359177 -723641246 984760218 -596266247 -394989576 -334231327 982732795 -423216186 940973418 -992470691 474244441 -838628968 971341712 -609867435 9...
output:
Yes 6481 11999 33159 6923 23386 14259 12670 9072 1262 9803 22501 23076 4807 9442 31973 10340 20184 8640 5672 1231 17493 1266 23614 3606 9008 16023 27326 28339 11970 11576 14141 18294 12318 16237 4387 17549 9424 2046 7353 3156 24533 694 25520 9728 15791 28678 1719 5338 17722 2541 18906 14423 32448 13...
result:
ok answer is YES, 33265 tokens
Test #62:
score: 0
Accepted
time: 85ms
memory: 22352kb
input:
50453 725450640 -975209352 -350827155 -20599585 -959204716 -423513720 -937742020 286001245 -834885671 -801738641 664940589 -750864860 923122171 -657088035 -959721518 -423122177 -977807124 -44171316 -389731753 -150756557 -921253387 -423387699 -682327966 -580880741 -935954946 -603613292 -974609431 -80...
output:
Yes 30753 20748 7915 11422 39823 19089 26055 34104 10116 18155 35461 31472 25167 6209 30611 49201 45327 24995 19815 31020 24119 18407 25249 9478 3612 42272 23605 29228 12087 32878 10856 25437 44314 44759 28456 12560 18035 49494 47123 10114 26851 17897 33294 24056 24174 47523 43145 30188 34735 46073 ...
result:
ok answer is YES, 50453 tokens
Test #63:
score: 0
Accepted
time: 18ms
memory: 12068kb
input:
39615 982474406 683819669 -144325014 -901512435 -886847468 -484156430 -749394998 -861469223 384360675 413109095 931732058 -473680116 -316009167 184696992 826326432 -588213638 95398381 80844882 147222740 -47474866 124454772 149502161 -323472702 -199011258 132643210 316525779 -787512479 -632591022 -15...
output:
No
result:
ok answer is NO
Test #64:
score: 0
Accepted
time: 20ms
memory: 10416kb
input:
47473 307986285 527384040 797948229 -788109981 -599119786 -936421183 999790439 -887160197 -691062305 -730278704 -687844047 -962080531 -85429212 573260234 -754497631 -62051850 645102676 -128393986 -383000288 -719112989 686733885 -953422614 -736406640 -525763062 -546264825 -927649038 -661560133 -94800...
output:
No
result:
ok answer is NO
Test #65:
score: 0
Accepted
time: 13ms
memory: 14088kb
input:
34531 -654031080 -462158309 691821381 238430200 -983560810 -847767536 981382549 -444926028 216881915 -941737968 614834291 298909086 410980411 22523757 -416118165 24881412 -741855552 88799553 326740647 -402099153 994553038 -638129184 483792509 -999279193 -821249624 991161087 -742957461 185849000 4762...
output:
No
result:
ok answer is NO
Test #66:
score: 0
Accepted
time: 19ms
memory: 12720kb
input:
45251 984954130 890520429 -999890627 -250025882 -97121883 388751502 -880078788 143313474 -958717753 -313605969 -918986994 -594244032 983912642 -822459508 -966436668 39251351 -370791819 905339758 22028876 -365944835 -664225860 504464953 -880455134 444604878 -967585699 -65554566 975371775 -631315393 -...
output:
No
result:
ok answer is NO
Test #67:
score: 0
Accepted
time: 16ms
memory: 12080kb
input:
44534 -450832098 -522726726 522157386 985192837 -410372071 -488518743 -230478296 -496569061 510913182 964950985 -997886086 -218369548 219367413 -759157367 -813057510 175856977 -439529270 446554844 -637743099 464796585 46124311 -213940100 -948249324 -715170469 936948603 941862543 -203632915 831134722...
output:
No
result:
ok answer is NO
Test #68:
score: 0
Accepted
time: 16ms
memory: 12132kb
input:
47978 -628636117 -74811801 451010257 839661972 -423279564 -201567336 -824800042 -235124657 -713558595 349389686 -832118414 809793486 -634996969 -131932043 -710107928 -200649804 -949543404 -326979672 -769497979 -318319515 664077218 -859484349 -330208473 -438828798 615659682 669681381 -629961441 33402...
output:
No
result:
ok answer is NO
Test #69:
score: 0
Accepted
time: 26ms
memory: 12516kb
input:
57430 -508580548 -611707237 -593575973 -979847801 622519751 892285463 994194602 261068627 978965514 937342811 992918337 -545247207 823671292 911192584 -486593016 -11306679 595630650 937010060 641663683 282034918 992419696 -570614094 -164668875 -642640157 822351495 900873533 688013875 905139699 -1768...
output:
No
result:
ok answer is NO
Test #70:
score: 0
Accepted
time: 2ms
memory: 16384kb
input:
1 -495913038 -299159101 863403011 713906638
output:
Yes 1
result:
ok answer is YES, 1 tokens
Test #71:
score: 0
Accepted
time: 1ms
memory: 11884kb
input:
2 225854961 -378814986 780488683 -764850274 682529381 137498502 523340959 192196507
output:
No
result:
ok answer is NO
Test #72:
score: 0
Accepted
time: 1ms
memory: 9904kb
input:
3 -411449733 -446991292 -235772706 780484307 -657613362 713901643 -40357102 17160763 892104718 714162785 682598055 7331086
output:
No
result:
ok answer is NO
Test #73:
score: 0
Accepted
time: 1ms
memory: 10148kb
input:
4 -253798347 304873911 842387158 -195435053 124265500 -690879716 -343854247 -110402016 312607276 932229715 326476247 -359110903 -754308798 -957933455 971051415 334323684
output:
No
result:
ok answer is NO
Test #74:
score: 0
Accepted
time: 0ms
memory: 11844kb
input:
5 -294917411 -462540518 799403381 891531403 787399607 -925820579 -800799933 744332739 -427757322 -656529690 -735449002 146171474 -535966929 -797125595 -411958185 437465118 -675901691 155190446 151529546 -778959379
output:
No
result:
ok answer is NO
Extra Test:
score: 0
Extra Test Passed