QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#36954 | #9020. 测测你的半平面修改查询 | Qingyu | 40 | 2000ms | 48900kb | C++23 | 3.4kb | 2022-06-29 13:53:16 | 2022-06-29 13:53:22 |
Judging History
answer
#include "hpmq.h"
#include<bits/stdc++.h>
#define F(i,l,r) for(int i=l;i<r;++i)
typedef long long i64;
const int N=500007;
struct Line{
//ax+by<c
int a,b,c;//|a|,|b|<=1000; b!=0; |c|<=1000000
};
struct Pos{
int x,y;
Data d;
}ps[N];
int dim=0;
double A,B;
struct Node{
Node *c[2];
Operation t;
Data d;
int x0,x1,y0,y1,S;
void dn(){
if(t.empty())return;
c[0]->apply(t);
c[1]->apply(t);
t.clr();
}
void up(){
d.add(c[0]->d,c[1]->d);
}
void apply(const Operation &t0){
t0.apply(t);
t0.apply(d);
}
void init(const Pos &p){
x0=x1=p.x;
y0=y1=p.y;
d=p.d;
t.clr();
S=0;
}
void init(Node *c0,Node *c1){
c[0]=c0;
c[1]=c1;
t.clr();
up();
x0=std::min(c0->x0,c1->x0);
x1=std::max(c0->x1,c1->x1);
y0=std::min(c0->y0,c1->y0);
y1=std::max(c0->y1,c1->y1);
S=0;
}
int op(const Line &l){
if(std::min(l.a*x0,l.a*x1)+std::min(l.b*y0,l.b*y1)>=l.c)return 0;
if(std::max(l.a*x0,l.a*x1)+std::max(l.b*y0,l.b*y1)<=l.c)return S=2;
int S0=c[0]->op(l);
int S1=c[1]->op(l);
if(S0==2&&S1==2){
c[0]->S=c[1]->S=0;
return S=2;
}
if(S0|S1)return S=1;
return S=0;
}
void op(const Operation &o,Data &ans){
if(!S)return;
if(S==2){
ans.add_eq(d);
apply(o);
S=0;
return;
}
dn();
c[0]->op(o,ans);
c[1]->op(o,ans);
up();
S=0;
}
bool operator<(const Node&w)const{
#ifdef D4
return (x0-w.x0)*A+(y0-w.y0)*B<0;
#else
#ifdef SEG
return (y0<w.y0);
#else
//return dim?(x0+y0<w.x0+w.y0):(y0-x0<w.y0-w.x0);
return dim?(x0<w.x0):(y0<w.y0);
#endif
#endif
}
}ns[N*2],*rt,*np;
std::mt19937 mt(time(0));
Node* build(Node*l,Node*r){
if(r-l==1)return l;
double a0=mt()/4294967296.*2*acos(-1);
A=cos(a0);
B=sin(a0);
//A=mt()%2001-1000;
//B=mt()%2001-1000;
Node*m=l+(r-l)/2;
std::nth_element(l,m,r);
#ifdef D4
if(r-l>=4){
Node *m1=l+(m-l)/2,*m2=0,*m2x=m+(r-m)/2;
double L=0,R=acos(-1);
while(R-L>1e-12){
double M=L+(R-L)/2;
A=cos(a0+M);
B=sin(a0+M);
std::nth_element(l,m1,m);
Node *m2a=std::lower_bound(m,r,m1[-1]);
Node *m2b=std::lower_bound(m2a,r,*m1);
//if(r-l>=1000)fprintf(stderr,"%g: %d %d %d\n",M,int(m2a-m),int(m2b-m2a),int(r-m2b));
if(m2b<m2x)L=M,m2=m2b;
else if(m2a>m2x)R=M,m2=m2a;
else{
std::nth_element(m2a,m2x,m2b);
m2=m2x;
break;
}
}
//if(r-l>=1000)fprintf(stderr,"[%d %d %d %d]\n",m1-l,m-m1,m2-m,r-m2);
Node *w1,*w2,*w;
if(m<m2&&m2<r&&std::abs(m2-m2x)<=2){
w1=np++;
w1->init(build(l,m1),build(m1,m));
w2=np++;
w2->init(build(m,m2),build(m2,r));
w=np++;
w->init(w1,w2);
return w;
}
}
#endif
dim^=1;
Node *c0=build(l,m);
Node *c1=build(m,r);
dim^=1;
Node *w=np++;
w->init(c0,c1);
return w;
}
int t;
void cal(int n){
if(n<4){
t+=n;
return;
}
t+=4;
int n1=n/2,n2=n-n1;
cal(n1-n1/2);
cal(n2/2);
cal(n2-n2/2);
}
void solve(
const int n,
const int m,
const int *x,
const int *y,
const Data *d,
const int *a,
const int *b,
const int *c,
const Operation *o){
np=ns+n;
F(i,0,n)ps[i]=Pos{x[i],y[i],d[i]};
F(i,0,n){
ns[i].init(ps[i]);
}
rt=build(ns,ns+n);
//cal(n);
//fprintf(stderr,">>> %lld\n",1ll*q*t);
F(i,0,m){
Line ln=Line{a[i],b[i],c[i]};
Operation t=o[i];
Data ans;
ans.clr();
rt->op(ln);
rt->op(t,ans);
ans.print();
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 38ms
memory: 14536kb
input:
20000 5245 -9733 6 2898 -2273 6 -3025 13598 7 -2111 542 3 -913 -1516 6 -1525 -1050 2 17646 4583 6 -2101 -1295 10 -635 1367 4 -2828 1004 6 -1497 -2603 5 -3415 -3290 7 3995 -6478 2 -2093 -203 6 2748 181 9 -9456 206 6 -15645 14633 9 -4783 555 3 -4383 425 5 -20919 36410 1 1921 -405 1 3934 8809 4 -1303 -...
output:
2349460 1184568235
result:
ok The answer is correct.
Test #2:
score: 0
Accepted
time: 49ms
memory: 18364kb
input:
20000 686 -1046 4 694 850 10 -830 -8542 1 -795 1008 7 12881 -3183 1 961 -394 1 -1031 -259 2 8442 -2883 7 -14 -1204 1 1121 418 1 1102 -453 9 -574 -827 5 4775 -1978 7 1006 2061 5 3575 1146 7 -546 -934 6 1037 -159 1 -965 -304 2 -878 -573 5 345 1893 6 -1080 5502 3 -294 1155 10 1789 -2 5 217 1179 6 911 -...
output:
2752430 1565105122
result:
ok The answer is correct.
Test #3:
score: 0
Accepted
time: 38ms
memory: 16576kb
input:
20000 11122 -11638 4 -1740 -5825 9 -3944 2250 8 1964 983 2 -4102 2439 2 11896 -2032 4 -6247 -3805 8 -875 -2529 10 81 4894 5 -2103 -227 7 1819 2958 2 2822 5467 2 5556 -8941 6 11961 7486 6 -1291 -2731 2 20342 -1088 1 194 3036 10 -6729 5391 1 1164 1694 10 -34776 -45966 3 622 -2586 6 1607 -4155 6 -22275...
output:
2365631 3203875655
result:
ok The answer is correct.
Test #4:
score: 0
Accepted
time: 29ms
memory: 16656kb
input:
20000 438860 -73910 1 228935 75600 4 -961920 188700 8 660015 655330 6 -18922 196153 2 -855750 819770 5 40151 -175778 4 145568 92246 3 512816 147766 2 207512 182989 9 134174 31956 10 178622 -186978 6 -343680 100680 6 115980 305670 8 -174382 307699 9 478417 373980 2 -201400 -102780 5 -71050 -612550 3 ...
output:
1982294 2618948775
result:
ok The answer is correct.
Test #5:
score: 0
Accepted
time: 28ms
memory: 14608kb
input:
20000 398519 123762 8 -571339 -86531 4 -241091 447702 5 -96819 557807 1 124523 -180638 10 420494 -575313 5 -589407 278420 8 -805008 -160484 7 -231491 -328375 1 283671 -132403 8 285203 612859 7 -354672 -47543 4 624976 40852 7 -386647 -33515 9 -122556 389227 8 535015 -282411 5 -16618 -949802 10 -74675...
output:
1610302 2246548101
result:
ok The answer is correct.
Test #6:
score: 0
Accepted
time: 34ms
memory: 14580kb
input:
20000 6889 -29721 8 -1036 12027 6 10547 -290 8 -10371 -677 8 -3756 898 3 4874 -2930 5 -7515 6173 8 12336 1374 10 174220 -173020 8 4985 -1557 10 3230 10378 8 -9111 -4121 10 10509 -534 8 -11098 -2764 6 -44859 -51666 4 188 -13280 2 -8390 5440 5 -5333 -11150 2 3908 -17979 1 -7398 -17442 9 16424 3525 5 2...
output:
2373901 389229703
result:
ok The answer is correct.
Test #7:
score: 0
Accepted
time: 41ms
memory: 18500kb
input:
20000 1633 259 5 579 -1029 1 498 1139 7 171 474 6 675 -85 8 371 -52 9 -2073 2829 8 -5 -1111 10 -795 195 9 -11 144 8 -238 41 1 405 614 3 128 410 10 -324 -1193 8 -4317 7438 2 -236 300 5 420 -629 2 509 637 4 -436 228 5 -246 581 2 189 1385 2 1363 1816 5 553 -344 6 -148 -108 1 190 450 5 659 -1115 4 202 -...
output:
2115019 2817220556
result:
ok The answer is correct.
Test #8:
score: 0
Accepted
time: 142ms
memory: 14492kb
input:
20000 0 -1 2 0 7 1 -998285 499142 9 209116 418238 2 91751 -183498 5 -4 -2 8 -2 -2 7 5 -1 2 -1 -3 1 -5 6 9 -34226 68447 8 -810116 -405054 1 80050 -160092 1 1 -2 7 1 -5 10 0 4 4 -7 -1 1 3 1 9 -1 7 2 2 -2 1 -123822 247644 10 -3 -2 4 -5 -4 7 -6 8 8 157702 -315413 9 2 -1 5 -4 0 10 3 0 10 -205546 -411093 ...
output:
10914899 905897730
result:
ok The answer is correct.
Test #9:
score: 0
Accepted
time: 40ms
memory: 14532kb
input:
20000 -478255 358690 10 -1 2 7 306414 -153207 2 -1 3 5 -313442 -313441 5 204483 -102240 10 -2 -2 6 -851493 -425749 3 -53735 161214 5 302522 -453784 6 -303898 -151948 2 5 -3 6 -55683 83527 10 -302149 453227 7 -104583 -104585 8 -115225 172834 5 2 0 2 108784 81588 3 14 5 6 146710 97808 8 73175 48782 1 ...
output:
2622391 1748878069
result:
ok The answer is correct.
Test #10:
score: 0
Accepted
time: 99ms
memory: 16684kb
input:
20000 -999566 -999553 7 -998415 -998413 9 -999637 -999642 4 -999533 -999541 6 -999217 -999213 9 -998699 -998689 6 -998866 -998859 3 -999344 -999343 2 -999057 -999048 1 -999927 -999932 6 -999270 -999270 9 -999063 -999065 9 -998815 -998804 4 -998534 -998545 7 -999423 -999431 10 -999510 -999503 1 -9991...
output:
6352208 795812623
result:
ok The answer is correct.
Test #11:
score: 0
Accepted
time: 103ms
memory: 14580kb
input:
20000 -999587 -999588 8 -998343 -998350 6 -999715 -999715 4 -999162 -999156 2 -998649 -998641 4 -998063 -998061 10 -997911 -997919 5 -998540 -998541 10 -998798 -998786 6 -998314 -998318 10 -998657 -998657 6 -998880 -998870 4 -998577 -998568 2 -998593 -998593 5 -999079 -999084 2 -997241 -997245 6 -99...
output:
6217003 1011088017
result:
ok The answer is correct.
Subtask #2:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #12:
score: 0
Wrong Answer
time: 39ms
memory: 14692kb
input:
20000 2641 1830 6 -2037 -206 1 -6986 489 3 -3427 3874 9 -810 -5729 8 -48 -797 3 3035 1378 1 9159 -7860 2 -3123 -7198 6 2024 -417 4 3348 -7912 7 1093 1896 1 2878 2836 1 906 1826 3 -1728 2809 10 -12842 5268 7 2552 -225 8 20452 22770 5 2793 2016 10 -1624 592 4 -1838 6563 7 -4113 2448 4 4533 -2058 8 121...
output:
2349361 2203490789
result:
wrong answer Too many operations.
Subtask #3:
score: 5
Accepted
Test #23:
score: 5
Accepted
time: 84ms
memory: 47892kb
input:
200000 -1014 -2657 4 -441 -2850 9 -860 3331 8 6027 -6526 6 144250 69365 6 -2855 -3780 9 1460 2333 6 -644 1051 10 -4535 -3692 1 3573 -175 4 232 2495 5 -3996 2251 7 6945 -17184 8 -9520 1403 1 2112 1387 8 -1205 1496 8 2673 605 10 -2820 -973 3 558 -846 2 -17020 -11100 7 868 2321 8 -580 -758 6 1785 -1253...
output:
931717 1475663463
result:
ok The answer is correct.
Test #24:
score: 0
Accepted
time: 93ms
memory: 45016kb
input:
200000 31593 29215 4 3175 -2692 10 1876 792 7 3241 797 5 -4043 12516 9 -1807 971 7 1397 -993 10 367 1284 7 175 -1027 3 -571 2811 4 -2337 978 10 -7393 40407 8 1008 -1394 6 700 -745 4 220 1192 1 3314 119 8 1049 177 1 -848 2561 8 -3393 486 1 1037 242 5 -2506 4006 10 1088 -1076 3 3576 392 3 -5294 -7256 ...
output:
1081879 1700331537
result:
ok The answer is correct.
Test #25:
score: 0
Accepted
time: 94ms
memory: 46816kb
input:
200000 7482 10251 7 -674 -3115 8 -12482 29166 2 3410 5181 6 2023 -111 9 -3389 1076 6 -665 -4545 2 -128926 179024 5 -36372 22327 3 20097 2525 9 846 7500 3 2292 -9338 1 -1763 -1802 8 1416 -1420 7 129787 17300 10 1767 977 1 -5978 -1291 2 36388 8452 9 -4025 770 2 7456 4224 8 2213 -3648 5 9902 -22535 6 -...
output:
939420 4285388758
result:
ok The answer is correct.
Test #26:
score: 0
Accepted
time: 93ms
memory: 47604kb
input:
200000 696558 56906 5 -299486 80870 8 172464 -271336 7 -178465 42958 1 135682 42372 9 45648 -189508 5 242480 101920 6 441790 191460 3 57110 14232 8 72596 499038 7 -160421 165248 6 -101042 136546 10 79616 -210804 4 74530 140360 2 -273490 111650 2 52294 163321 5 44880 247930 6 -219946 -13062 8 -205985...
output:
771825 4007150453
result:
ok The answer is correct.
Test #27:
score: 0
Accepted
time: 90ms
memory: 47772kb
input:
200000 -181659 -392133 2 682822 -165783 3 -150583 -330974 4 86298 299407 6 532528 214452 2 -45743 -35689 2 -53974 459595 1 193386 91173 6 -156137 671316 1 114443 -76044 4 331684 -611676 8 -388788 466140 3 224209 650199 3 -39516 640868 2 36464 650059 3 -34812 490820 3 38927 -69366 7 348395 -451516 3 ...
output:
664027 395174535
result:
ok The answer is correct.
Test #28:
score: 0
Accepted
time: 98ms
memory: 46688kb
input:
200000 2484 8786 7 -3420 -27610 8 -1367 4564 7 -9111 -4121 6 4283 -4065 6 6253 -5375 3 3310 -5763 8 4760 -8098 7 -6381 5886 1 -11724 -3846 2 5087 -3417 2 -7779 7240 4 -861 -14238 4 6165 -4350 9 -4997 489 5 -5960 -12091 5 -1031 -9170 10 1365 21322 9 -3752 -6737 1 -513980 -601268 6 -23185 18459 3 8536...
output:
944562 1650421457
result:
ok The answer is correct.
Test #29:
score: 0
Accepted
time: 93ms
memory: 46524kb
input:
200000 1537 1501 8 -117 -126 1 685 235 9 546 256 6 944 -347 3 624 890 3 362 2015 5 -2439 -200 2 -843 -630 1 149 356 9 -885 -688 3 -1851 2126 2 404 -934 8 290 -1574 3 311 -66 1 -1225 780 9 -36 624 3 260 -548 3 498 -152 2 72 -916 2 -395 -13 2 29 640 6 617 11 7 -423 -282 7 -734 -685 3 433 911 10 86 199...
output:
838598 3400699918
result:
ok The answer is correct.
Test #30:
score: 0
Accepted
time: 258ms
memory: 48288kb
input:
200000 2 3 2 -2 2 7 1 5 1 -3 2 6 2 0 5 37797 -75592 6 2 2 2 2 1 4 -6 -5 10 -356480 178236 7 197841 395680 9 -1 0 10 183874 367748 7 -309466 154735 10 0 1 10 5 3 3 388611 194301 2 1 -2 3 -4 1 4 0 0 2 127035 -254066 4 -44451 88897 1 -1 2 2 1 -3 4 53370 -106742 2 -3 1 2 642925 -321465 2 5 -4 5 151369 -...
output:
10161190 2696913447
result:
ok The answer is correct.
Test #31:
score: 0
Accepted
time: 92ms
memory: 48184kb
input:
200000 15 -25 8 8 0 2 -3 0 10 344864 114958 4 -774946 387474 1 2 1 10 822507 411257 10 -1 0 4 -148954 -446867 5 -2 -4 5 -584095 292048 6 0 0 6 -118521 -237039 1 -3 1 5 -2 0 10 211814 211815 10 -45540 -22767 8 -205809 205813 3 3 3 3 982179 -245547 3 19708 39407 3 -6 -7 7 -635704 317849 8 171184 17118...
output:
1706873 4028719501
result:
ok The answer is correct.
Test #32:
score: 0
Accepted
time: 153ms
memory: 47724kb
input:
200000 -999668 -999663 3 -999726 -999720 2 -999899 -999894 8 -999970 -999961 10 -999787 -999787 5 -999723 -999717 10 -999739 -999736 2 -999678 -999671 9 -999932 -999938 7 -999691 -999680 7 -999827 -999827 3 -999768 -999768 6 -999963 -999963 5 -999756 -999751 7 -999813 -999804 4 -999760 -999755 3 -99...
output:
4212868 4149368756
result:
ok The answer is correct.
Test #33:
score: 0
Accepted
time: 153ms
memory: 48112kb
input:
200000 -999927 -999923 4 -999825 -999829 9 -999994 -999984 8 -999833 -999833 2 -999943 -999938 2 -999689 -999687 7 -999922 -999916 2 -999736 -999720 1 -999845 -999859 4 -999854 -999858 3 -999871 -999876 7 -999775 -999782 7 -999667 -999671 9 -999830 -999823 5 -999832 -999830 10 -999785 -999781 5 -999...
output:
4129055 2525605831
result:
ok The answer is correct.
Subtask #4:
score: 0
Wrong Answer
Dependency #3:
100%
Accepted
Test #34:
score: 15
Accepted
time: 88ms
memory: 47736kb
input:
200000 -1674 -832 7 -3834 -6457 5 -139143 -294548 1 7100 -8777 3 1687 -1816 7 3267 -3450 5 -7284 -2796 5 -2341 -1343 9 1509 -567 5 -715 -3898 7 -82 818 9 7398 -18124 4 1405 3516 9 815 1567 5 6627 3543 7 7767 15939 3 -1029 -99 2 42 931 1 2135 -1482 1 -2848 -1015 2 3665 1813 2 -2091 -1908 9 49 1263 9 ...
output:
916402 3288359239
result:
ok The answer is correct.
Test #35:
score: 0
Accepted
time: 99ms
memory: 46480kb
input:
200000 1931 1008 4 17736 -10372 5 1045 -415 7 -123 1022 2 -1103 -347 9 -857 -564 9 -892 -494 9 915 2536 1 930 734 4 -1021 1166 6 392 -1141 8 -947 460 2 942 -402 1 3274 -5902 2 669 -918 2 864 509 7 1056 367 7 -376 1062 9 6608 4986 4 -1089 -182 10 -2068 -1153 5 -1067 -1556 5 292 1095 7 -3729 436 6 281...
output:
1085240 3492291470
result:
ok The answer is correct.
Test #36:
score: 0
Accepted
time: 82ms
memory: 47812kb
input:
200000 -5621 9153 7 3127 -6722 6 118 1381 2 -2020 -704 2 2982 8143 5 648 -4953 2 -7951 -4988 3 553 1933 2 2341 11191 8 -6780 -8753 5 -254 6531 7 3147 -1065 5 -16628 -1069 8 1950 -539 6 98179 -26114 5 -1999 -1062 5 -14596 14346 4 -1265 -151 7 7967 -6181 8 -1013 1118 10 -1946 3960 10 -1721 -3000 4 -22...
output:
913587 1868830709
result:
ok The answer is correct.
Test #37:
score: 0
Accepted
time: 102ms
memory: 47744kb
input:
200000 -525325 665225 10 -262512 198085 9 -209457 193860 2 690080 -456008 8 -186746 -2766 1 -30004 169133 2 -64912 72465 1 -167600 371130 4 -93629 -159267 6 22257 107525 7 -19655 99940 10 -168790 -31741 2 -26062 -121367 9 16547 -128110 9 -113505 46055 1 -720677 -163328 9 329444 -122273 9 194032 1313...
output:
779606 2250220609
result:
ok The answer is correct.
Test #38:
score: 0
Accepted
time: 94ms
memory: 48900kb
input:
200000 817531 147545 2 -921621 44948 4 -89498 82295 3 46093 939349 8 322801 -380412 7 278926 454245 4 -209620 -3238 2 325161 305649 8 404511 -360449 10 -612653 -207622 9 -474893 -220870 4 472828 -322112 6 -54213 179580 6 -642401 -245004 4 -32156 -67735 4 -92357 -464176 1 -205042 -505877 1 -41734 408...
output:
667458 2368005640
result:
ok The answer is correct.
Test #39:
score: 0
Accepted
time: 94ms
memory: 47900kb
input:
200000 16891 -2286 1 -160264 -95389 4 -1560 -10082 9 -9125 8639 9 11881 28972 8 -9111 -4121 1 -56469 -24696 8 -5137 -48142 6 9417 -15399 4 46300 -36803 7 31772 -3958 3 3410 8932 2 11762 -2723 4 -3043 7127 5 9876 2097 9 -3257 -1325 5 -8390 5440 5 -6103 -12869 6 -14805 -84 10 3200 -17468 7 -2606 -1665...
output:
932752 358490033
result:
ok The answer is correct.
Test #40:
score: 0
Accepted
time: 74ms
memory: 44952kb
input:
200000 1097 -115 5 -1013 1381 8 -1842 2090 3 1527 -3651 1 -1836 -719 6 -275 -215 8 -36 -765 8 226 -24 9 1719 -2181 4 5358 -8811 6 -605 1807 6 -1561 303 2 977 462 9 -1238 -178 6 -671 95 8 -1051 40 2 -1492 -1882 10 -2299 -76 2 245 -402 1 3567 8845 2 -78 1059 8 1291 5078 5 -106 -415 2 454 503 2 332 -58...
output:
829872 1659682910
result:
ok The answer is correct.
Test #41:
score: -15
Wrong Answer
time: 267ms
memory: 48016kb
input:
200000 0 3 2 2 2 6 -2 0 5 -1 -1 9 0 -2 8 15197 30399 10 111350 -222692 4 793088 396543 3 0 0 9 5 0 10 -8 0 5 1 1 4 7 -1 1 2 -5 1 11542 -23092 6 0 1 6 -6 0 5 -1 1 1 8 9 6 -4 0 7 -18257 -9133 10 95376 -190749 9 -215244 430499 9 -1 4 4 -6 3 6 -5 6 6 2 0 3 -676042 -338020 6 -732236 -366119 3 248616 4972...
output:
10788984 1275547843
result:
wrong answer Too many operations.
Subtask #5:
score: 20
Accepted
Test #45:
score: 20
Accepted
time: 275ms
memory: 22900kb
input:
65536 -128 -128 6 -128 -127 3 -128 -126 3 -128 -125 2 -128 -124 8 -128 -123 8 -128 -122 6 -128 -121 3 -128 -120 10 -128 -119 2 -128 -118 6 -128 -117 9 -128 -116 7 -128 -115 1 -128 -114 8 -128 -113 3 -128 -112 4 -128 -111 6 -128 -110 9 -128 -109 10 -128 -108 6 -128 -107 7 -128 -106 9 -128 -105 3 -128...
output:
21946051 1531224321
result:
ok The answer is correct.
Test #46:
score: 0
Accepted
time: 284ms
memory: 24900kb
input:
65536 -128 -128 1 -128 -127 7 -128 -126 4 -128 -125 9 -128 -124 3 -128 -123 6 -128 -122 8 -128 -121 10 -128 -120 3 -128 -119 6 -128 -118 10 -128 -117 8 -128 -116 10 -128 -115 3 -128 -114 6 -128 -113 8 -128 -112 9 -128 -111 6 -128 -110 2 -128 -109 8 -128 -108 4 -128 -107 9 -128 -106 8 -128 -105 4 -12...
output:
21859924 272259564
result:
ok The answer is correct.
Test #47:
score: 0
Accepted
time: 307ms
memory: 24996kb
input:
65536 -128 -128 10 -128 -127 7 -128 -126 5 -128 -125 7 -128 -124 10 -128 -123 4 -128 -122 10 -128 -121 10 -128 -120 1 -128 -119 5 -128 -118 9 -128 -117 8 -128 -116 6 -128 -115 7 -128 -114 3 -128 -113 2 -128 -112 10 -128 -111 3 -128 -110 4 -128 -109 6 -128 -108 9 -128 -107 1 -128 -106 8 -128 -105 1 -...
output:
33140231 3364760732
result:
ok The answer is correct.
Test #48:
score: 0
Accepted
time: 305ms
memory: 25028kb
input:
65536 -128 -128 6 -128 -127 10 -128 -126 8 -128 -125 3 -128 -124 6 -128 -123 1 -128 -122 9 -128 -121 3 -128 -120 4 -128 -119 1 -128 -118 6 -128 -117 4 -128 -116 4 -128 -115 1 -128 -114 10 -128 -113 3 -128 -112 8 -128 -111 10 -128 -110 10 -128 -109 2 -128 -108 3 -128 -107 8 -128 -106 9 -128 -105 10 -...
output:
32843972 4169494042
result:
ok The answer is correct.
Subtask #6:
score: 10
Accepted
Test #49:
score: 10
Accepted
time: 83ms
memory: 47804kb
input:
200000 0 0 9 0 2 7 0 4 1 0 6 4 0 8 2 0 10 2 0 12 5 0 14 10 0 16 7 0 18 4 0 20 4 0 22 9 0 24 8 0 26 4 0 28 8 0 30 5 0 32 4 0 34 9 0 36 3 0 38 7 0 40 4 0 42 10 0 44 4 0 46 6 0 48 3 0 50 7 0 52 9 0 54 7 0 56 8 0 58 8 0 60 4 0 62 10 0 64 2 0 66 4 0 68 4 0 70 1 0 72 1 0 74 6 0 76 1 0 78 4 0 80 3 0 82 7 0...
output:
2655642 4243564198
result:
ok The answer is correct.
Test #50:
score: 0
Accepted
time: 92ms
memory: 46776kb
input:
200000 0 0 6 0 2 7 0 4 10 0 6 6 0 8 2 0 10 4 0 12 5 0 14 10 0 16 4 0 18 7 0 20 7 0 22 4 0 24 10 0 26 9 0 28 6 0 30 4 0 32 7 0 34 1 0 36 6 0 38 1 0 40 5 0 42 7 0 44 10 0 46 4 0 48 4 0 50 7 0 52 2 0 54 1 0 56 10 0 58 5 0 60 4 0 62 3 0 64 6 0 66 6 0 68 8 0 70 2 0 72 3 0 74 3 0 76 4 0 78 6 0 80 4 0 82 5...
output:
2645206 912738561
result:
ok The answer is correct.
Subtask #7:
score: 0
Time Limit Exceeded
Test #51:
score: 15
Accepted
time: 1637ms
memory: 47496kb
input:
200000 -1099 1879 7 1402 -488 8 -9770 8838 3 -177 -1714 9 2929 1099 9 4906 385 1 1606 5775 10 -2824 3929 10 997 2113 8 2897 -1592 4 -1679 8134 10 1988 405 4 -124 -112 5 -7851 12185 10 -2048 -1963 10 140 -2168 4 16857 -9907 4 -2719 10 8 1383 -648 9 2161 -464 9 1917 -1321 3 607 -2034 10 -22 1839 6 -30...
output:
82168213 437286793
result:
ok The answer is correct.
Test #52:
score: 0
Accepted
time: 2000ms
memory: 47120kb
input:
200000 2025 -365 3 192 -989 2 -166 986 7 431 1549 5 -602 -1645 6 207 -1023 9 534 984 3 676 9091 4 745 918 1 -425 -924 6 3527 3958 8 701 -837 2 -1064 120 8 780 -633 9 924 -404 6 176 -1493 1 -408 -1293 7 392 1194 8 -1 -1026 9 985 203 2 565 -1105 5 1360 1222 4 -963 952 1 -797 -683 4 -1080 80 4 -4334 -2...
output:
99138959 3822459693
result:
ok The answer is correct.
Test #53:
score: 0
Accepted
time: 1642ms
memory: 47660kb
input:
200000 13552 17504 10 55022 32719 9 6200 166 9 12945 -1599 6 -84 -9370 9 2272 2045 6 -5507 -1106 3 9922 1421 4 -2123 2097 8 -15985 -4727 5 68779 -145950 8 -1932 -629 1 -7917 -25879 3 1848 -1192 1 -15989 1931 9 -1523 -272 9 -941 -355 10 5327 2204 8 1169 2819 5 2275 -3422 6 1573 6913 7 -2201 2090 2 -1...
output:
83520559 1580906305
result:
ok The answer is correct.
Test #54:
score: 0
Accepted
time: 1324ms
memory: 48212kb
input:
200000 -205372 172615 10 -690170 811630 3 -216463 18700 9 73848 -298405 1 -71530 147610 3 176918 781471 9 -100671 171512 1 -11926 265100 3 -614730 66630 2 61240 202757 2 -337080 -79740 6 -419510 -150360 10 -129851 -37571 2 187124 138280 1 126131 21563 3 669380 409740 10 255945 75077 9 293388 375650 ...
output:
66829419 1845091104
result:
ok The answer is correct.
Test #55:
score: 0
Accepted
time: 1095ms
memory: 47296kb
input:
200000 194822 -179435 9 386353 -539172 9 -100033 707090 2 494305 -104675 1 -523519 -167035 3 500211 46289 5 -196739 175627 2 919254 40944 6 -42219 286015 5 -669209 43270 3 127642 -791700 5 161655 -790679 8 -8599 -385866 2 -624868 60224 7 521623 -115619 1 474285 30937 2 -693024 13527 3 -267228 602102...
output:
53948700 2560856979
result:
ok The answer is correct.
Test #56:
score: 0
Accepted
time: 1608ms
memory: 48024kb
input:
200000 3692 11527 3 -32458 -10378 1 -17330 7507 9 -107818 143665 2 3291 9114 9 -9838 -11390 6 -19483 17278 3 12060 -7189 8 -7646 17117 6 -15485 98577 1 2836 9589 10 -3321 3174 4 6306 13767 3 1262 -11963 5 -5522 7968 8 -5298 3701 7 2898 -2701 7 5765 -22534 8 1484 7721 4 -7098 1566 7 6285 -12209 7 247...
output:
83255668 3638350941
result:
ok The answer is correct.
Test #57:
score: 0
Accepted
time: 1469ms
memory: 47808kb
input:
200000 -3488 -1565 7 -1553 -1626 2 822 200 9 -763 654 4 -41 -291 6 52 -605 5 -243 790 10 352 217 5 -373 -666 4 -364 130 5 -2978 -530 6 316 194 8 -401 -329 7 1159 495 4 -2148 -230 10 -1014 -373 10 259 -35 8 -169 739 8 -136 -850 2 288 256 3 58 -626 6 209 -376 2 4155 5267 9 2036 -96 7 351 -595 2 -2869 ...
output:
73690276 1647858833
result:
ok The answer is correct.
Test #58:
score: -15
Time Limit Exceeded
input:
200000 0 -4 7 0 1 6 0 -5 1 -2 0 6 2 5 4 5 -4 2 -3 2 5 -5 -5 4 363613 -181805 9 1 -2 5 0 8 6 0 -1 2 135010 -270022 4 139063 278128 5 8 7 2 2 0 3 -2 1 4 -4 0 1 1 0 4 57860 115714 7 -3 0 9 -166245 332500 6 7 5 10 159017 318038 7 0 0 5 -2 2 9 -60896 121803 10 -341683 -170838 1 3 -3 7 -4 -4 3 0 4 2 0 -3 ...
output:
result:
Subtask #8:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%