QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#685875 | #8814. Almost Convex 2 | Crysfly | AC ✓ | 617ms | 5076kb | C++14 | 5.7kb | 2024-10-28 21:44:51 | 2024-10-28 21:44:52 |
Judging History
answer
// what is matter? never mind.
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
//#define int long long
#define SZ(x) ((int)((x).size()))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
return f?-x:x;
}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
typedef double db;
const db eps=1e-8,pi=3.14159265358979323846;
int sgn(int x){return x<0?-1:x>0;}
int cmp(int a,int b){return sgn(a-b);}
struct P{
int x,y,id;
P(int x=0,int y=0):x(x),y(y){}
P&operator +=(P o){return x+=o.x,y+=o.y,*this;}
P&operator -=(P o){return x-=o.x,y-=o.y,*this;}
P&operator *=(int o){return x*=o,y*=o,*this;}
P&operator /=(int o){return x/=o,y/=o,*this;}
friend P operator +(P a,P b){return a+=b;}
friend P operator -(P a,P b){return a-=b;}
friend P operator *(P a,int b){return a*=b;}
friend P operator /(P a,int b){return a/=b;}
friend bool operator <(P a,P b){return fabs(a.x-b.x)<eps?a.y<b.y:a.x<b.x;}
friend bool operator ==(P a,P b){return cmp(a.x,b.x)==0 && cmp(a.y,b.y)==0;}
friend bool operator !=(P a,P b){return !(a==b);}
friend int operator %(P a,P b){return a.x*b.x+a.y*b.y;} // dot
friend int operator *(P a,P b){return a.x*b.y-a.y*b.x;} // cross
P rot90(){return P(-y,x);}
db ang(){return atan2(y,x);}
db len(){return sqrt(x*x+y*y);}
int len2(){return x*x+y*y;}
int half(){return sgn(y)==1||(sgn(y)==0&&sgn(x)>=0);}
// P unit(){return ((*this))/len();}
void read(){cin>>x>>y;}
void out(){cout<<"("<<x<<","<<y<<")"<<endl;}
};
bool cmp_dir(P a,P b){
if(a.half()!=b.half())return a.half()<b.half();
return sgn(a*b)>0;
}
db dis(P a,P b){return (a-b).len();}
int cross(P a,P b,P c){
// (a->b)*(a->c)
return (b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x);
}
int cmp3(P a,P b,P c){
return sgn(cross(a,b,c));
}
vector<P>convex(vector<P>a){
int n=a.size(),m=0; if(n<=1)return a;
sort(a.begin(),a.end());
vector<P>st(n*2); int tp=0;
For(i,0,n-1){
while(tp>1 && cmp3(st[tp-2],st[tp-1],a[i])<=0)--tp;
st[tp++]=a[i];
}
int t=tp;
Rep(i,n-2,0){
while(tp>t && cmp3(st[tp-2],st[tp-1],a[i])<=0)--tp;
st[tp++]=a[i];
}
st.resize(tp-1);
return st;
}
bool in_tri(P a,P b,P c,P p){
if(cmp3(a,b,c)<0) swap(b,c);
return cmp3(a,b,p)>0 && cmp3(b,c,p)>0 && cmp3(c,a,p)>0;
}
#define maxn 505
#define inf 0x3f3f3f3f
int n,m1,m2;
P p[maxn];
vector<P>h,in;
bool vis[maxn];
int cnt[maxn][maxn];
int get(int i,int j,int x){
if(!in_tri(p[1],p[i],p[j],p[x])) return 0;
if(cmp3(p[1],p[i],p[j])>0) return 1;
return -1;
}
bool chk(int i,int j,int k){
if(cmp3(p[i],p[j],p[k])<0) swap(j,k);
// int cc=0;
// For(x,1,n) if(x!=i&&x!=j&&x!=k && in_tri(p[i],p[j],p[k],p[x])) ++cc;
int res=cnt[i][j]+cnt[j][k]+cnt[k][i];
res-=get(i,j,k)+get(j,k,i)+get(k,i,j);
// cout<<"cc: "<<i<<" "<<j<<" "<<k<<"\n";
// p[i].out(),p[j].out(),p[k].out();
// cout<<cc<<" "<<res<<"\n";
// cout<<"CNT "<<cnt[i][j]<<" "<<cnt[j][k]<<" "<<cnt[k][i]<<"\n";
// if(cc!=res) exit(0);
return res!=0;
}
ll res;
bool hav[maxn][maxn];
bool col[maxn];
int sum[maxn];
bool isseg_s(P p1,P p2,P q1,P q2){
return cmp3(p1,p2,q1)*cmp3(p1,p2,q2)<0 && cmp3(q1,q2,p1)*cmp3(q1,q2,p2)<0;
}
signed main()
{
n=read();
For(i,1,n) p[i].x=read(),p[i].y=read();
sort(p+1,p+n+1);
For(i,1,n) p[i].id=i,h.pb(p[i]);
h=convex(h);
for(auto it:h) vis[it.id]=1;
For(i,1,n) if(!vis[i]) in.pb(p[i]);
For(i,2,n) For(j,i+1,n) {
For(k,2,n) if(k!=i && k!=j) cnt[i][j]+=in_tri(p[1],p[i],p[j],p[k]);
cnt[j][i]=cnt[i][j];
if(cmp3(p[1],p[i],p[j])>0) cnt[j][i]=-cnt[j][i];
else cnt[i][j]=-cnt[i][j];
}
m1=h.size();
m2=in.size();
res=1;
For(i,0,m1-1){
For(j,0,m2-1){
hav[i][j]=chk(h[i].id,h[(i+1)%m1].id,in[j].id);
if(!hav[i][j]) ++res;
}
}
// cout<<"cut1 "<<res<<"\n";
// cout<<"sz "<<m1<<" "<<m2<<"\n";
int now2=0;
For(i,0,m1-1){
For(j,0,m2-1) if(!hav[i][j]) {
int u=h[i].id,v=h[(i+1)%m1].id,w=in[j].id;
For(k,0,m2-1) if(j!=k) {
// if((!chk(u,w,in[k].id))) cout<<"add "<<u<<" "<<w<<" "<<in[k].id<<"\n";
// if((!chk(v,w,in[k].id))) cout<<"add "<<v<<" "<<w<<" "<<in[k].id<<"\n";
for(auto x:{u,v}){
if(!chk(x,w,in[k].id) && !isseg_s(p[x^u^v],p[w],p[x],in[k])){
++res;
if(!in_tri(p[u],p[v],in[k],p[w])) ++now2;//cout<<"Add2 "<<u<<" "<<v<<" "<<in[k].id<<" "<<w<<"\n";
}
}
}
}
}
// cout<<"now2 "<<now2<<"\n";
res-=now2/2;
// cout<<"cut2 "<<res<<"\n";
For(i,0,m1-1){
sum[i]=0;
For(j,0,m2-1) if(!hav[i][j]) ++sum[i];
res+=sum[i]*(sum[i]-1)/2;
}
For(i,0,m1-1) For(j,i+1,m1-1) res+=sum[i]*sum[j];
// cout<<"res "<<res<<"\n";
For(i,0,m2-1){
int ss=0;
For(j,0,m1-1) if(!hav[j][i]) ++ss;
res-=ss*(ss-1)/2;
}
For(i,0,m2-1)
For(j,0,m2-1) if(i!=j) {
int now=0;
For(k,0,m1-1) {
col[k]=cmp3(in[i],in[j],h[k])>0;
}
For(k,0,m1-1){
if(col[k]==1) now+=(!hav[k][j]);
}
// cout<<"i,j "<<i<<" "<<j<<"\n";
// For(k,0,m1-1) cout<<col[k]<<" "; cout<<" col\n";
For(k,0,m1-1) if(col[k] && !col[(k+m1-1)%m1]) {
while(col[k]) {
if(!hav[k][i]) res-=now;//cout<<"sub "<<k<<" "<<now<<"\n";
now-=(!hav[k][j]);
k=(k+1)%m1;
}
break;
}
}
cout<<res;
return 0;
}
/*
5
0 0
2 1
3 1
3 3
4 0
9
0 2
1 0
1 3
2 1
2 5
3 0
3 3
4 2
5 5
*/
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3580kb
input:
7 0 2 1 0 1 3 2 5 3 0 3 3 4 2
output:
26
result:
ok 1 number(s): "26"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
5 4 0 0 0 2 1 3 3 3 1
output:
13
result:
ok 1 number(s): "13"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
3 0 0 3 0 0 3
output:
1
result:
ok 1 number(s): "1"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
6 0 0 3 0 3 2 0 2 1 1 2 1
output:
20
result:
ok 1 number(s): "20"
Test #5:
score: 0
Accepted
time: 1ms
memory: 3636kb
input:
4 0 0 0 3 3 0 3 3
output:
1
result:
ok 1 number(s): "1"
Test #6:
score: 0
Accepted
time: 182ms
memory: 4600kb
input:
500 -5276 -1176 3417 -883 -6586 -1581 4425 7450 -7896 -3039 -6316 2357 5464 2109 -3428 -6184 -1477 -1383 -5288 -969 -5528 -4316 -508 -364 -7424 -4848 -1073 -9882 4320 -862 -4720 -2569 560 -5594 -4492 -7290 3629 9120 3112 5970 -2587 -4693 7147 -6919 -935 8748 2664 4405 -6865 -3149 8844 -4641 -3706 -9...
output:
50930
result:
ok 1 number(s): "50930"
Test #7:
score: 0
Accepted
time: 176ms
memory: 4812kb
input:
500 8598 4438 6327 -913 -4037 -1025 7337 -4117 -3092 1011 378 -7033 -8724 4431 -4868 5150 911 529 5509 -1362 1086 -7919 9778 1261 -3832 3610 -3470 7906 -8559 5595 -8075 2232 -4577 -9072 -4482 -6029 8463 -1196 7884 -316 -9376 1920 6846 -8409 2715 -7335 -4977 -4130 9147 1621 -8337 1592 4062 -6829 208 ...
output:
16737
result:
ok 1 number(s): "16737"
Test #8:
score: 0
Accepted
time: 182ms
memory: 4852kb
input:
500 9007 265 2201 5042 5284 -119 5263 2146 9479 -2911 -6239 -4536 2430 978 5311 9052 3692 -754 -2856 -7654 3911 -2955 -4557 6411 -8410 5578 -1429 -8277 -4974 -6226 7160 -2990 -1285 7944 -7144 -6104 -632 -5051 -5904 -3302 -2994 6223 -4918 -773 -2706 -5848 8741 4050 -4544 -3399 -3329 5833 9436 6073 91...
output:
78511
result:
ok 1 number(s): "78511"
Test #9:
score: 0
Accepted
time: 183ms
memory: 4656kb
input:
500 3986 -2058 8393 -5560 -9323 -8268 -7531 8178 -8691 8818 -9752 -1098 8298 -9389 5224 -3089 -5027 2759 -7845 -4577 -7195 6292 8610 4357 -3948 9888 -6300 8917 -7351 2477 1514 -7484 -8936 -5060 -9687 -2927 4009 1765 7666 -4956 1790 -8694 6446 2739 6425 3415 4940 -7749 -2186 1776 3011 -1438 7967 -330...
output:
16065
result:
ok 1 number(s): "16065"
Test #10:
score: 0
Accepted
time: 174ms
memory: 4652kb
input:
500 -374 -6853 8340 3978 2984 9235 7388 7881 9251 -114 9415 -4001 -4986 -9491 4528 -6929 -6788 -3585 4280 -9908 -762 242 2141 -6162 -6597 -1198 -7204 -9704 9557 3683 -2219 -2905 5487 -254 8407 -9416 -2740 -3414 4907 -7751 2333 -1087 -7493 -989 1742 4989 2200 -5320 2136 5551 8421 -4805 -2601 3272 332...
output:
44326
result:
ok 1 number(s): "44326"
Test #11:
score: 0
Accepted
time: 166ms
memory: 4528kb
input:
500 593 4401 -8062 3551 1693 -5367 1067 3359 9605 3156 -406 9613 7086 -4924 -604 -6096 -8304 4829 3056 108 -1251 -8599 -6915 -9995 -1362 -9650 -2693 3354 7446 -7474 -8427 8752 2577 9247 -7860 -8455 -4310 8633 3811 2165 6056 -1335 2385 1666 6845 5528 1344 -7649 9146 8372 -7986 -9293 6077 -4673 1922 4...
output:
6406
result:
ok 1 number(s): "6406"
Test #12:
score: 0
Accepted
time: 132ms
memory: 4640kb
input:
500 3099 -3613 -1110 -8776 -931 -8597 1801 -5174 1445 -5583 7743 2043 1472 -5625 6639 694 -376 -7771 4728 -1624 410 -6958 1388 -5725 -149 -7532 4549 -1874 -4 -7433 2847 -3912 891 -6365 590 -6606 1967 -5042 841 -6287 6004 -57 1223 -5935 -833 -8406 -245 -7679 2117 -4778 7743 2032 1729 -5281 5351 -903 ...
output:
197
result:
ok 1 number(s): "197"
Test #13:
score: 0
Accepted
time: 147ms
memory: 4584kb
input:
500 3885 -2913 1167 -5191 73 -8538 2621 -6999 2629 -4437 4959 -465 5623 1751 2643 -1832 1572 -5699 5553 1666 -356 -7904 4749 1822 2349 -6442 3379 -3102 1872 -5412 4961 662 2083 -5685 2096 -6485 4689 -3385 -152 -8592 4433 -1322 3523 -514 4347 580 2503 -4166 -1955 -9807 5591 2896 1192 -6199 5292 160 1...
output:
451
result:
ok 1 number(s): "451"
Test #14:
score: 0
Accepted
time: 151ms
memory: 4580kb
input:
500 4703 -3537 1504 -3821 -6015 649 4331 -4832 -2506 -5255 -6347 -3940 -4134 -3950 -5031 -323 -1641 617 -6416 -5181 -2286 -1047 -3477 -273 1775 -687 -813 -4349 -3080 -5598 -6060 901 4932 -4387 -4701 -5113 -1337 -838 5338 -2177 -5528 1270 2423 -1917 6564 -4480 -3694 851 -5534 -2471 -7040 -1041 -4287 ...
output:
730
result:
ok 1 number(s): "730"
Test #15:
score: 0
Accepted
time: 157ms
memory: 4644kb
input:
500 7026 -796 4816 4861 1394 -296 3528 2969 -7882 1392 -2804 86 -8313 1917 -3064 2479 -247 328 5800 -2136 -1094 -1286 1714 4399 8420 45 -9768 2140 -4357 3676 4346 513 763 -1562 1316 -123 5566 -2472 5627 1144 4377 -2051 1573 -162 -663 2326 2110 -2341 -2981 1763 2642 4347 8728 -232 -250 212 109 3528 -...
output:
1726
result:
ok 1 number(s): "1726"
Test #16:
score: 0
Accepted
time: 162ms
memory: 4864kb
input:
500 1086 -1637 -3054 -5073 3413 -1260 2652 8263 4541 7480 6877 -2262 6482 -1053 4566 -7032 6441 -1846 -4005 5395 5054 294 1954 -3228 -3558 -7090 -733 3598 -2688 9631 -5591 6213 4930 133 -6289 700 -1281 2957 -1931 -1860 -5175 -215 4871 480 5815 1130 2616 7270 -4469 6242 -1606 -4570 -1527 -1512 714 -5...
output:
1636
result:
ok 1 number(s): "1636"
Test #17:
score: 0
Accepted
time: 161ms
memory: 4836kb
input:
500 -4098 -5374 -273 -4345 -7714 -2543 -402 1781 1181 5600 -649 3470 -1834 -4783 -2827 2132 -3728 7158 -3292 5244 -7017 2471 -4170 -217 -4474 2150 -5548 1110 -5063 622 -5113 -6841 -1441 6356 -788 -8869 -3838 -6330 -4971 -6124 -7171 -2830 -7899 3421 -6812 5019 -2875 -8133 -3935 -6568 -1384 -4839 -463...
output:
1933
result:
ok 1 number(s): "1933"
Test #18:
score: 0
Accepted
time: 161ms
memory: 4652kb
input:
500 5829 -5559 1076 5350 1990 -4981 -2819 -1092 -4399 5522 8764 1647 4772 2032 3146 1776 8143 2299 -223 5894 2371 2677 2740 3811 -3681 6540 -4825 4497 1978 -3706 -2779 740 2883 4579 -4622 5659 7763 -1843 6219 467 5671 6080 191 2107 2030 2805 3747 -2114 1349 -5959 3881 4128 -2357 7747 5407 246 7058 8...
output:
10400
result:
ok 1 number(s): "10400"
Test #19:
score: 0
Accepted
time: 168ms
memory: 4584kb
input:
500 -5173 -1176 -4789 -5208 2087 -1307 2704 -3725 7437 319 -2616 5262 6845 -3304 5133 6452 3848 -5212 -7629 1435 1479 8120 -4794 4679 5907 3805 -6280 4522 8428 2486 -503 -1004 2162 -1654 -3573 -5852 4746 6698 2899 -118 4079 -5989 5219 6150 7610 1938 -7783 6278 -5038 2860 -4036 -3160 3276 -2885 109 -...
output:
10280
result:
ok 1 number(s): "10280"
Test #20:
score: 0
Accepted
time: 198ms
memory: 4644kb
input:
500 8 -5246 694 8347 4118 3545 6792 1200 -3866 -6495 -8630 5051 -6449 -5279 2467 1866 1528 3393 -8591 -1037 1442 3832 5564 -3687 3308 1896 -3160 2854 4810 5992 -2438 3712 4084 5843 2705 -7533 7966 602 1665 3345 3186 6666 -7663 3140 4927 4851 -6383 4284 2883 291 -1034 4380 -182 5228 -5679 -4017 985 2...
output:
427502
result:
ok 1 number(s): "427502"
Test #21:
score: 0
Accepted
time: 280ms
memory: 4696kb
input:
500 5790 6369 1448 -2220 -2691 -2098 8076 -1871 -7502 -6611 -286 -634 -5341 8453 -2105 -7513 4099 -4617 3598 -9330 5146 -602 3656 4636 6972 -1194 -5992 2205 -2894 -54 415 -3218 -3409 -36 1710 -6872 -1794 4844 -6866 -3165 -8430 326 7198 4957 2300 -2335 -7551 -4571 -4848 5341 8967 -396 960 7519 -7936 ...
output:
6558120
result:
ok 1 number(s): "6558120"
Test #22:
score: 0
Accepted
time: 411ms
memory: 4616kb
input:
500 1650 6396 -4766 661 5485 6474 231 8703 5812 2395 -1881 1465 -763 6309 418 6570 -9101 4142 550 -3523 -1784 1415 8626 461 -1897 9818 -5646 4750 2918 -5138 -7614 -1329 412 -3756 -3631 5417 7508 -2565 -8542 -1891 6981 -548 7216 6922 -7081 -917 -2930 -8413 7728 -214 -4050 -9142 -3745 6810 -6587 -7523...
output:
41111989
result:
ok 1 number(s): "41111989"
Test #23:
score: 0
Accepted
time: 427ms
memory: 4696kb
input:
500 4233 -2968 -3593 18 -6952 4332 5289 -2664 3900 -526 8086 899 -2588 -6121 -6464 5582 4411 -7115 -7007 -4819 1902 7713 6670 4708 -4719 6558 -6040 -2017 -3610 -4053 6639 1352 -4412 3711 -4272 -6201 -566 933 -2132 5555 -3981 -9173 2141 54 -5905 -79 5822 -1044 -7216 -2517 -1772 -2807 120 1180 5224 -5...
output:
56798917
result:
ok 1 number(s): "56798917"
Test #24:
score: 0
Accepted
time: 461ms
memory: 4700kb
input:
500 4351 -9003 2846 -499 -1387 -7848 -7803 3501 544 9985 653 2540 -5093 2046 -8170 3715 -1887 2567 6824 -4794 3750 5882 8015 -1956 -3768 -9262 -4471 8944 -1882 -5236 5987 6714 3302 9438 -4325 4989 8641 -5032 3387 -3242 -4787 8779 -3379 2478 -283 1300 5048 4378 -5998 3258 334 -3886 1211 -6815 -3289 -...
output:
74242452
result:
ok 1 number(s): "74242452"
Test #25:
score: 0
Accepted
time: 541ms
memory: 4712kb
input:
500 -9839 -1787 5667 -5494 5285 -6654 -8847 -4660 -6300 7765 2921 -3123 -1970 -1939 3778 1548 -9995 303 -209 -9997 6811 -5330 -3206 -8035 5087 -2521 -5589 685 -2570 9663 -2823 -4346 2087 490 -5185 -4365 5786 8155 5453 -2898 -5876 8091 -6821 884 6750 7378 -9578 2871 9845 -1752 -6458 -7634 -1564 2344 ...
output:
152148437
result:
ok 1 number(s): "152148437"
Test #26:
score: 0
Accepted
time: 570ms
memory: 4676kb
input:
500 -7843 -6203 -1386 -736 5538 -8326 -2103 9776 2093 -4839 -3473 -6212 4860 -8739 9943 1062 -9908 -1350 -8562 -5166 -657 4014 -9955 -942 -1682 27 941 -7099 -7448 -3866 -56 -4173 9909 -1340 661 -1337 -7497 6616 2797 -492 -1461 6516 4563 -3726 6381 2441 -4651 -6599 4248 9052 4730 -6533 460 -4598 1825...
output:
261555619
result:
ok 1 number(s): "261555619"
Test #27:
score: 0
Accepted
time: 602ms
memory: 4740kb
input:
500 -2445 -9696 5705 -1504 1816 1588 -1492 -9888 -750 9971 7340 4613 -6647 -4696 -930 9956 -6841 7293 -9888 1489 -1793 831 2200 3653 4127 -2400 4378 -8990 5413 4408 4945 5042 -7715 2763 2229 9748 -7765 -6300 -9498 3125 6139 -2779 6139 -214 -4931 -6381 3456 -6086 2690 -5091 -9784 -2065 -6753 -7375 -4...
output:
316426364
result:
ok 1 number(s): "316426364"
Test #28:
score: 0
Accepted
time: 590ms
memory: 4744kb
input:
500 -6916 385 -5887 -8083 8008 5989 -3167 -2641 -5443 -8388 -7840 68 -2040 -6986 1470 1621 -8270 -5620 -6819 7313 356 7215 5283 8490 -2406 5911 -9687 -2481 -3696 -9291 -6565 -3451 -4462 -5876 -6290 3936 -6697 -7426 6539 -7565 -100 -9999 4236 -3598 5676 -8232 7248 4688 2459 9692 7987 -6016 4481 -5005...
output:
328903825
result:
ok 1 number(s): "328903825"
Test #29:
score: 0
Accepted
time: 617ms
memory: 4708kb
input:
500 9427 -3334 2114 4451 1938 6150 5942 227 1057 -5956 74 8950 7061 7081 -1107 6614 8453 5342 7655 -6433 -6192 7852 1188 -5866 -2906 9568 -6170 -7869 8349 -5503 2223 767 -4538 1001 -8984 -4390 2939 2841 4724 -4632 -899 -5579 -2514 -9678 -3640 -9313 5707 -4090 -1584 -196 5119 8590 8626 5057 -5026 -23...
output:
371458734
result:
ok 1 number(s): "371458734"
Test #30:
score: 0
Accepted
time: 601ms
memory: 4992kb
input:
500 9384 -3454 -9253 3790 -3378 -9412 -3554 -1531 -1803 -3243 8240 2692 -8841 4671 6934 -7205 -9917 1284 -329 -6920 1940 -6068 6522 -7579 -5129 -3732 -6185 53 -9999 -35 -7371 3679 1231 -9923 -3933 -408 -5776 1971 -1207 4214 -5112 -6291 -2500 1857 -1813 -8176 7696 2767 -478 5671 8392 -5437 -9984 -564...
output:
418771898
result:
ok 1 number(s): "418771898"
Test #31:
score: 0
Accepted
time: 600ms
memory: 4772kb
input:
500 -9752 -2208 2697 5707 -3758 9266 -2859 7174 -1085 1473 -2608 2792 -8107 -5853 -6415 -5345 4846 -8747 -9123 4094 5546 -2020 -3600 -1564 9799 -1991 -2423 444 9476 3193 7626 3607 -6932 -925 9206 -3904 -6149 2801 -3182 1288 -9979 642 -6422 5239 3355 9420 1746 -9846 4349 -5444 9963 851 1986 9800 920 ...
output:
441328354
result:
ok 1 number(s): "441328354"
Test #32:
score: 0
Accepted
time: 585ms
memory: 4956kb
input:
500 -1868 2471 9692 -2460 -4664 2764 -152 9998 -1634 -3625 8912 648 8652 -83 -8182 -22 -4078 6172 -4909 -1808 -8425 -286 -6363 4564 9977 664 1243 9922 2546 2188 -9758 -2184 3338 9426 9832 1822 -1055 9944 -3293 1989 -3649 -6231 -1724 -4305 2631 9647 9989 463 -2980 -9545 6779 2323 -9966 -816 -1817 860...
output:
431003425
result:
ok 1 number(s): "431003425"
Test #33:
score: 0
Accepted
time: 614ms
memory: 4992kb
input:
500 -5896 2535 325 -2793 9368 3497 8522 5230 9642 -2650 9952 970 1160 -5985 1815 -992 7634 -946 7464 -1714 -2566 -9664 2118 9772 4594 -8882 -9965 829 1192 5469 -5762 4244 -9871 1596 1048 -5639 -4061 -7445 277 -9996 5411 -5218 3031 -1044 1376 -4980 -4467 -4529 7946 6071 -8404 5419 9951 980 6180 -7861...
output:
416102606
result:
ok 1 number(s): "416102606"
Test #34:
score: 0
Accepted
time: 587ms
memory: 4960kb
input:
500 -3522 1014 2112 9774 -4444 -2165 8181 -5750 -519 9986 793 4528 9891 1472 1510 3067 745 9972 1250 -195 -9874 1581 782 9969 8425 212 -1955 9806 -8081 -493 9562 2924 -7735 6337 6294 -7770 -8565 -5160 7053 -5399 -6883 -7254 974 -9952 9996 -254 -2378 -3064 27 7051 -8339 3233 2534 9673 -227 9997 -4032...
output:
438962590
result:
ok 1 number(s): "438962590"
Test #35:
score: 0
Accepted
time: 586ms
memory: 4708kb
input:
500 -4992 2453 7563 1598 3217 -9468 7688 6394 5207 8537 -3798 5897 9654 2607 -9626 2707 4244 -1786 -5870 -8095 6637 7479 3065 9518 -7884 6151 -9853 1707 6151 5008 -1898 -9818 -5296 -5609 -2147 9766 9251 -3795 6178 7862 5325 2249 -3569 -9341 7460 2644 5417 3316 -5553 6299 2324 -6063 -3680 4701 1360 -...
output:
435128933
result:
ok 1 number(s): "435128933"
Test #36:
score: 0
Accepted
time: 578ms
memory: 4928kb
input:
500 9616 -2742 -9245 3809 6401 -7682 8985 -4388 2980 9545 858 2625 3172 -2723 5704 -1425 -4809 1436 9016 4324 1150 7263 -6426 -7661 484 678 -5303 -8477 -8517 5239 -3338 5754 2121 1497 261 -9996 -2821 3074 9298 -3679 2605 -9654 -1155 -2458 -3725 2982 -6159 7877 9391 3435 -4185 3034 1396 3105 1568 987...
output:
424980067
result:
ok 1 number(s): "424980067"
Test #37:
score: 0
Accepted
time: 579ms
memory: 4768kb
input:
500 5502 5203 -2103 8400 5402 -8415 -4641 -848 5018 5222 -6476 7619 -3650 3484 975 7976 -1124 -876 -9768 -2141 6822 4554 -3371 9414 523 7434 8219 5695 1865 9824 -1537 9881 4632 -3991 -8681 -16 5939 -6269 9608 -2770 -1892 -1691 7284 6851 -490 -1840 1002 9949 4071 4516 -8943 -4473 495 3429 -9943 1064 ...
output:
440277703
result:
ok 1 number(s): "440277703"
Test #38:
score: 0
Accepted
time: 595ms
memory: 4708kb
input:
500 -2311 878 5765 8170 -1838 -660 -4134 5096 -4235 -963 -3371 -226 9676 -2522 6066 4981 -8529 5220 4387 -8985 -4717 8817 -9321 -3621 -4112 7804 390 -2156 -8831 -4691 7644 6446 5096 -8603 9579 -2869 -2106 5532 -5277 8494 671 3252 674 -1826 -6911 -4375 9922 1240 -6572 -7536 3760 -2149 3165 4573 -2942...
output:
495281335
result:
ok 1 number(s): "495281335"
Test #39:
score: 0
Accepted
time: 562ms
memory: 4776kb
input:
500 9831 -1826 4686 1786 -9036 -4281 9972 -746 -5525 -8334 4465 -5543 7884 -1760 3109 207 -9668 2555 -9046 4260 -4978 -5708 -6681 -2969 -6391 -7690 2929 7894 4195 4080 4271 4463 -189 -1015 2011 -8449 3076 -4696 -7298 -6836 4010 -9160 -7986 6018 6297 7768 9999 110 1652 -9862 -3678 -7957 -9843 -1760 -...
output:
478398780
result:
ok 1 number(s): "478398780"
Test #40:
score: 0
Accepted
time: 557ms
memory: 4728kb
input:
500 5078 7067 -1956 3797 -3184 7558 3468 -7486 1033 -4987 3769 -1837 -5234 6935 -484 -9988 -7745 6324 1791 7956 -3347 9423 -6098 -7925 -9413 3373 9942 -1068 2668 9637 3903 -2999 -575 -9983 8212 -5705 -442 9990 -1963 1248 8042 -5942 2909 3478 9327 3606 -9946 1036 9219 3872 -4953 -8686 1711 9852 -6508...
output:
511374326
result:
ok 1 number(s): "511374326"
Test #41:
score: 0
Accepted
time: 540ms
memory: 4948kb
input:
500 -2582 -626 641 9979 -5435 8393 5499 -837 9984 560 -9978 -649 -6178 7862 7968 -6042 7489 6626 -2423 506 754 -9971 -5784 -2506 9653 -2611 8957 4444 9831 -1828 -1647 -9863 1315 -3955 6515 7586 3628 -2021 3656 9307 7089 4751 360 742 -7324 -4269 -6814 4587 -1025 -8694 -7566 6537 -9893 1452 278 5405 -...
output:
510160461
result:
ok 1 number(s): "510160461"
Test #42:
score: 0
Accepted
time: 534ms
memory: 4820kb
input:
500 6138 7894 -9670 -2546 1659 -9861 -9629 -2698 9975 695 -6806 -7326 1627 4889 -8597 -5107 4312 9022 9410 3382 9559 2933 -4147 2361 8387 494 -8013 5982 -1772 9841 -9781 -2078 -4841 4039 5524 8335 -7475 6641 8268 5623 1135 93 7786 -964 -9737 2274 -3537 -9353 -688 8950 -872 9961 676 -9977 -4570 963 -...
output:
532448447
result:
ok 1 number(s): "532448447"
Test #43:
score: 0
Accepted
time: 503ms
memory: 4784kb
input:
500 4565 -8897 128 -7984 8982 4394 4392 -2291 8615 -224 -90 -8466 -832 9965 7085 7056 -4611 -8873 -4477 -1390 9677 2518 7610 6486 906 -9958 9330 -3598 9729 2308 817 -8307 -9883 -1520 7521 -6590 -9874 -1580 -3989 -7355 -6760 7368 -7199 5401 779 9969 -1034 697 968 -4108 9637 -2668 -3486 -9372 7913 279...
output:
528729956
result:
ok 1 number(s): "528729956"
Test #44:
score: 0
Accepted
time: 476ms
memory: 4680kb
input:
500 9923 1231 -9769 2133 -3631 9317 8737 4863 -9903 1386 -2551 9669 9792 2027 9238 3826 -3401 9403 -4628 8864 -2696 -7983 7393 6733 5665 -2784 9929 1184 5639 8257 -9105 4132 2020 5719 1184 7138 -8281 5604 -1744 -9846 -6612 7501 -7291 6843 -2497 -4550 -1157 9932 3952 3192 -6919 7219 -9623 -2716 -4643...
output:
533920329
result:
ok 1 number(s): "533920329"
Test #45:
score: 0
Accepted
time: 478ms
memory: 4736kb
input:
500 5144 8575 2116 845 -9598 2803 -4485 -987 -1654 -6781 -5800 -2633 132 9999 4224 -4230 2881 9575 -6854 7280 3419 9397 8630 -5051 -1237 -6500 -2523 9676 9254 -3788 -479 2020 -3546 -5613 2488 2262 9562 -2924 46 -9999 -1547 8634 6309 -1161 2368 3424 -8853 4648 3222 -9466 -3688 -9294 8488 -5286 4367 -...
output:
560685588
result:
ok 1 number(s): "560685588"
Test #46:
score: 0
Accepted
time: 469ms
memory: 4812kb
input:
500 -1688 -9856 2712 1749 5300 8479 3370 5198 7512 6599 -9953 -964 -2438 -9698 9999 -95 1764 9843 -3019 9533 -5357 -5335 -8929 -4501 -8169 -5767 -9999 -93 720 -1367 5865 -8098 -9970 766 -8158 5782 8718 -4898 -3057 307 1381 2187 7990 6012 4552 -8903 3875 -5734 -6674 -5535 -5327 8462 4192 -9078 7527 -...
output:
556660141
result:
ok 1 number(s): "556660141"
Test #47:
score: 0
Accepted
time: 463ms
memory: 5004kb
input:
500 5239 8517 7222 -3927 -1704 -9853 8520 -5234 3213 8200 -9639 -2660 3874 5080 -9688 2477 9904 1380 278 -4610 9775 -2106 2647 -3031 9614 2751 7693 2612 9717 2358 -3020 4050 -1357 9907 7952 -71 -6019 7985 7516 6595 3222 -1137 8080 -3057 8436 5368 6691 5566 -9967 803 6256 -2263 -723 -1134 -4027 9153 ...
output:
545494105
result:
ok 1 number(s): "545494105"
Test #48:
score: 0
Accepted
time: 459ms
memory: 5000kb
input:
500 7708 -6369 9948 -1010 -7043 -4707 -7941 6077 -6957 1428 9304 -3663 2197 -8162 -9965 827 1726 -1396 -9712 -2380 2673 9636 9423 -3346 -5759 8174 1399 9901 -6665 -7455 7083 -7058 1614 8548 4366 -8996 -265 -7381 -5017 -5512 9954 954 -5597 4770 7177 -4997 -494 9987 8092 -5875 6045 769 -758 5964 9788 ...
output:
550724958
result:
ok 1 number(s): "550724958"
Test #49:
score: 0
Accepted
time: 455ms
memory: 4808kb
input:
500 7204 -2585 -5144 -8575 -6826 2338 9045 4263 -5879 -8088 4738 8806 9252 -3793 3107 -9504 -9142 -4052 -7043 -7098 -9978 -658 -8302 -5573 8300 -5577 5275 -5158 9936 -1126 -585 -9982 -4352 -9003 7371 -6757 2876 1289 -8617 -5073 8887 4583 2759 -9611 -9023 -4309 -3766 7019 -8809 4732 4958 2996 7554 -6...
output:
550656532
result:
ok 1 number(s): "550656532"
Test #50:
score: 0
Accepted
time: 454ms
memory: 4808kb
input:
500 4008 -1300 6976 -7164 9998 -189 -9111 -4121 9141 -4053 -9944 -1048 6565 -7543 2238 9746 -9572 -2893 9699 2433 -8586 -5124 7012 -7129 -8201 5721 -3208 -5115 9997 -239 -4463 2589 8208 5711 2240 -1582 5486 8360 9281 -3723 2022 2829 -9010 4337 8210 2051 -6745 188 1337 9910 8703 -4924 -320 9994 -9914...
output:
550965946
result:
ok 1 number(s): "550965946"
Test #51:
score: 0
Accepted
time: 446ms
memory: 4744kb
input:
500 -2936 9559 -1756 -9844 -1540 3288 -6545 2829 -8557 5173 3653 -9308 1936 9810 -2344 -9721 7859 6183 -6794 7337 1118 -9937 -7213 1322 6966 1477 7923 6100 8436 59 -6861 -7274 9716 2366 3746 -9271 -3917 -2524 1607 9869 3011 5861 -4648 1591 -7563 -6542 -9372 3487 -3799 7936 -9993 -371 -1312 3313 -982...
output:
542964099
result:
ok 1 number(s): "542964099"
Test #52:
score: 0
Accepted
time: 459ms
memory: 4756kb
input:
500 -477 9988 191 -9998 -1643 -311 8807 4736 -8235 -2715 2030 6529 -2641 -9644 -9721 -2341 4799 -8773 9151 4032 -9758 -2183 2871 -9578 8065 -1857 2976 9546 9420 3353 -668 9977 -1305 9914 1586 -861 4315 -962 -3638 4068 -8752 -4836 5032 -123 8854 -4647 4305 -5197 -6398 7685 9702 -2420 -1146 9934 1882 ...
output:
556011858
result:
ok 1 number(s): "556011858"
Test #53:
score: 0
Accepted
time: 447ms
memory: 4800kb
input:
500 6944 -7195 9969 780 -1585 8706 4438 -4735 7328 -3872 2916 789 4026 5297 5400 -6335 8563 -5163 9951 -983 -5371 -8435 9178 3968 377 -8955 -7110 4453 677 -511 -7030 1840 -3133 -9496 1717 9851 7678 6406 -2122 -9772 1239 9922 -7702 6377 -5533 -8329 -7431 6691 -5116 5032 -3629 -6803 4012 9159 -8495 52...
output:
546596952
result:
ok 1 number(s): "546596952"
Test #54:
score: 0
Accepted
time: 455ms
memory: 4748kb
input:
500 1877 2421 -8927 4504 -6603 7509 9893 1456 -2516 2203 -5442 8389 -9998 190 -9987 -493 8058 5921 1725 9849 -9588 2840 4513 -1067 -8083 -1821 -9983 -570 -9597 2807 -5989 6147 2382 -2388 2611 -9653 1101 -6632 2702 -831 3321 7424 -3392 -4417 8859 4638 6459 7634 53 -1313 -3184 -9479 -7900 6129 -6908 -...
output:
542136581
result:
ok 1 number(s): "542136581"
Test #55:
score: 0
Accepted
time: 444ms
memory: 5004kb
input:
500 9873 1586 7721 -6354 -9230 -3847 4092 9124 9991 -422 -9882 1528 7848 -6196 8784 -4777 9614 2748 9368 3496 2831 -9590 -2931 -9560 -4188 -9080 7171 6969 -4586 -8886 -9081 4186 4479 -2349 9823 -1870 -8944 -4472 6509 -7591 -5246 8513 -3645 9311 6267 -1350 9677 -2517 -6328 7742 -5153 8569 8920 -4519 ...
output:
546419666
result:
ok 1 number(s): "546419666"
Test #56:
score: 0
Accepted
time: 449ms
memory: 4808kb
input:
500 -5697 5710 8578 5139 -6840 7294 432 -9990 9764 -2159 718 3193 -6168 -7870 6682 -7439 1815 -9833 -7410 4711 4700 813 195 5058 -398 -3287 9189 -3943 9699 -2433 9137 4061 662 -9978 -9107 4129 -4930 8700 -2791 7714 4835 7310 -9852 1710 -1633 -9865 8837 4678 5165 -1416 3916 9201 7540 -6567 3585 9335 ...
output:
543492084
result:
ok 1 number(s): "543492084"
Test #57:
score: 0
Accepted
time: 438ms
memory: 5012kb
input:
500 -165 9998 -1855 -5988 8164 -5774 -1713 -9852 5669 -8237 -4626 7583 -766 9970 4239 -4728 7710 -6368 -9983 -570 -8196 1294 -8239 -2872 8061 177 5481 -5049 -9999 -46 -4174 9086 5941 5382 -1163 4869 6987 7153 112 9999 -7930 808 -9737 -2275 -694 -9975 4488 -3656 4203 -6290 -6734 -7392 3044 -2243 9928...
output:
531286848
result:
ok 1 number(s): "531286848"
Test #58:
score: 0
Accepted
time: 446ms
memory: 4808kb
input:
500 -2592 -9658 2519 -9677 -9963 -851 -429 -9990 -66 -9999 -482 -4060 7917 6108 -6912 -7226 5599 -1596 -8001 5998 6708 7415 -2327 843 -5867 -8097 -2788 5784 -7027 -7114 -278 -419 -3485 9372 9293 -3691 -8034 -5953 6680 -7441 -8145 5801 -9605 -2781 -7504 -1709 -9927 1202 7118 -222 -9930 -1173 1579 -69...
output:
550660075
result:
ok 1 number(s): "550660075"
Test #59:
score: 0
Accepted
time: 406ms
memory: 4820kb
input:
500 6658 -7460 7792 -6266 -4389 -8984 9451 3265 1965 -9804 9937 1119 -1267 9919 -4923 -4735 5159 -8566 6037 -7971 -3645 943 9054 4245 -2921 7728 -1718 -5218 9908 1348 -7143 6997 7890 -6142 9671 -2542 -4692 8830 -3775 2122 2871 4945 -9454 3256 -7186 -6953 3391 6338 -4265 -9044 -7532 -6577 -2642 9644 ...
output:
519898940
result:
ok 1 number(s): "519898940"
Test #60:
score: 0
Accepted
time: 389ms
memory: 4820kb
input:
500 -9987 505 3619 -3578 9061 -4230 -7482 -6633 7944 -6073 -9268 -3754 3670 -6516 3443 2118 -2031 -1434 -9178 3968 4034 9150 8446 5353 9503 3112 9932 -1160 4723 4566 4716 -8818 9654 -2607 1295 -6065 6119 2931 -8585 -5128 -3958 -7121 7702 6377 8538 5205 7839 -6208 3633 9316 -7849 -6195 -8871 4614 -92...
output:
514129107
result:
ok 1 number(s): "514129107"
Test #61:
score: 0
Accepted
time: 368ms
memory: 5020kb
input:
500 -4719 8816 -3804 -9247 4438 1909 -1521 9883 1329 9911 8081 -5890 -2190 -4097 9582 2858 45 -6393 8326 5538 6940 -7198 1673 -5308 -6612 676 9620 2728 8763 4816 -2890 -9573 1514 -9884 -1006 -4185 8972 4415 9496 -3132 9926 -1207 -8972 4415 -4686 -8833 7778 6284 -3069 9517 1149 -9933 1132 -9935 -7111...
output:
488380633
result:
ok 1 number(s): "488380633"
Test #62:
score: 0
Accepted
time: 336ms
memory: 4864kb
input:
500 -3229 5142 2388 9710 7093 1537 -9611 2759 -3047 9524 8233 5675 6191 -2847 -9512 -3082 4061 5066 -9894 -1447 5422 8402 7159 6981 9992 -398 -5730 -8195 -2449 4536 -298 -9995 8081 5889 8253 -5645 -4291 -9032 -1679 7595 8789 4769 -4953 8687 9882 -1527 2968 -9549 -3077 -3668 2690 -9631 -5562 -8310 -1...
output:
462914564
result:
ok 1 number(s): "462914564"
Test #63:
score: 0
Accepted
time: 317ms
memory: 4828kb
input:
500 7678 -6406 -7470 -6647 -9532 3022 4620 -8868 8604 5095 8572 5149 -121 -9999 1157 -933 -9012 4332 4750 8799 7595 -6504 3648 7779 1727 5627 -7876 6160 -8929 -4501 -2950 -9554 -7338 -6792 7936 -6083 7133 -7008 3320 -9432 9645 2639 -7524 6586 2701 -9628 -8983 -4393 2318 -9727 5640 -8257 4896 -8719 8...
output:
430836514
result:
ok 1 number(s): "430836514"
Test #64:
score: 0
Accepted
time: 286ms
memory: 5036kb
input:
500 7308 -6825 9999 62 -9847 -1737 5316 8469 -6423 1302 -9634 -2678 -9280 -3723 -5897 -4516 6161 7876 5725 4973 -24 -9999 9618 -2734 9697 2442 1473 6247 -5181 -8553 1198 -9927 5275 -8495 -6398 7684 -4946 8690 -7994 6006 9039 -4275 -7665 6421 201 -9997 8918 -4522 3850 9229 -8991 -4375 5830 -8124 -222...
output:
388145325
result:
ok 1 number(s): "388145325"
Test #65:
score: 0
Accepted
time: 254ms
memory: 4712kb
input:
500 7613 6483 5690 -8223 4115 -9113 1821 4515 -5579 8298 -5765 8170 9754 2201 8991 -4375 -2065 1794 -8185 -5744 -4719 1916 -2880 7507 7686 2149 2928 -2738 -1640 3262 -9755 -2197 -2306 -9730 9540 -2996 3416 9398 -3751 2879 9996 255 -4 -1294 -4435 3856 -5460 8377 4144 9100 -3470 -9378 3003 5099 -9985 ...
output:
343980310
result:
ok 1 number(s): "343980310"
Test #66:
score: 0
Accepted
time: 227ms
memory: 5012kb
input:
500 8834 4685 -8188 5739 -7983 -6022 1019 9947 9919 1264 8286 -5598 -5183 -8551 606 4465 2517 -9677 -921 -9957 9107 -4130 6908 7230 2068 -9783 9636 -2672 -8602 -5098 -7604 6493 5914 8063 -9042 -4269 -9999 -62 1891 9819 7061 -7080 9998 -148 7261 -6875 -5070 -1681 -9798 1995 2092 -9778 -3118 9501 9224...
output:
296593177
result:
ok 1 number(s): "296593177"
Test #67:
score: 0
Accepted
time: 166ms
memory: 4836kb
input:
500 6527 -7575 9451 3267 -9643 2645 6380 -2667 1447 9894 4278 9038 -8261 5634 -69 9999 9998 181 -9474 3197 -9593 2822 2045 -9788 3311 9435 2026 9792 -4026 9153 -654 9978 7898 -6132 6284 -7778 -83 -9999 3536 9353 -2801 5967 2188 -9757 -7811 6244 9451 -3265 8877 4603 5612 8276 -9936 -1123 9251 3795 72...
output:
151979702
result:
ok 1 number(s): "151979702"
Test #68:
score: 0
Accepted
time: 122ms
memory: 4872kb
input:
500 3706 2931 7068 -7073 3236 -9461 5266 8500 1955 -9806 -2525 -9675 8498 -5269 4669 -8842 -9996 -255 -9984 -557 7584 6517 9105 -4133 8229 -5680 -8447 -5352 -9132 -4073 8333 5527 9143 4050 -6372 7706 -1156 -5374 -3459 9382 -8580 5136 -7366 -6762 9082 4183 4437 8961 -9311 -3645 -2551 9669 905 -9958 7...
output:
30101351
result:
ok 1 number(s): "30101351"
Test #69:
score: 0
Accepted
time: 117ms
memory: 5076kb
input:
500 -9570 -2898 -8791 4765 -8389 5441 -5555 8314 -6948 7191 6056 7957 4996 8662 -9923 1231 -6539 7565 4370 8994 -8612 -5081 6421 -7665 5686 8225 3757 -5756 7768 -6296 7584 6517 9525 -3042 -7747 6322 -3225 -9465 -15 -8920 -9999 62 9999 -105 -3585 -9335 9836 1803 -5308 8474 9979 -642 2420 -9702 9396 3...
output:
7708610
result:
ok 1 number(s): "7708610"
Test #70:
score: 0
Accepted
time: 115ms
memory: 4888kb
input:
500 7846 -6199 -9916 -1289 -8487 -5287 -5960 8029 -7290 6844 -9885 1507 -9085 4178 5162 8564 5800 8145 -2620 -9650 -3006 -9537 -9045 -4263 4831 -8755 -8265 -5628 9564 -2919 -4819 8762 -3737 9275 -9608 2771 -7822 -6229 9225 -3858 4199 -9075 -4654 -8850 -7141 -7000 9203 -3911 -9762 -2164 3111 9503 963...
output:
6212553
result:
ok 1 number(s): "6212553"
Test #71:
score: 0
Accepted
time: 114ms
memory: 4860kb
input:
500 9680 2506 2188 -9757 -4442 8959 -7005 7135 5955 -8032 -2850 -9585 4179 -9084 -1658 9861 6981 7159 1281 -9917 9956 928 -9682 2499 -9977 -675 -4876 8730 9692 -2461 9857 -1684 9760 2176 -1053 -9944 1785 -9839 -9203 3910 -1468 -9891 4523 -8918 2640 -9644 4979 -8672 3366 9416 9720 2347 4552 -8903 858...
output:
4895407
result:
ok 1 number(s): "4895407"
Test #72:
score: 0
Accepted
time: 113ms
memory: 4764kb
input:
500 -92 -9999 9950 995 -3344 -9424 8988 -4383 -9835 1807 7524 6586 -2750 -9614 -2667 9637 -9795 -2009 -7329 6802 -9973 -732 9853 1703 -3076 -9515 9635 2675 -9883 -1521 -2533 -9673 8406 -5415 -8773 -4797 -2404 -9706 9980 620 -5052 -8629 -9482 3176 -3914 9201 8519 -5236 5586 -8293 -1941 9809 -2065 978...
output:
1773535
result:
ok 1 number(s): "1773535"
Test #73:
score: 0
Accepted
time: 112ms
memory: 4876kb
input:
500 712 9974 -9863 -1644 -6386 7694 7913 -6113 -167 9998 5934 8048 8893 -4572 4943 8692 -6262 -7795 8968 4422 -9877 1559 -2517 9677 2604 -9654 6796 7335 9879 -1549 -1807 -9835 -9825 1862 5756 -8177 -9229 3848 -8968 -4423 5691 8222 -8729 4877 4410 8974 -9970 -773 9780 -2081 8687 4952 7123 -7017 -65 9...
output:
184988
result:
ok 1 number(s): "184988"
Test #74:
score: 0
Accepted
time: 108ms
memory: 4812kb
input:
500 -3145 -9492 -9999 -110 3551 -9348 -6729 -7396 8825 -4703 9229 3848 -9979 643 9652 2613 3647 -9310 6123 -7905 8353 5497 -9996 273 -3626 9319 3517 9360 -2104 -9775 -3566 -9342 -6881 7255 9705 -2408 -9936 -1121 -4860 8739 -7556 6549 -9649 -2623 -9640 2658 -3796 9251 5567 8306 -5030 -8642 8611 5083 ...
output:
500
result:
ok 1 number(s): "500"
Test #75:
score: 0
Accepted
time: 111ms
memory: 4672kb
input:
500 9978 651 -695 -9975 -8213 -5703 -2163 9763 -9975 692 -6399 -7684 -9103 -4138 4769 8789 8588 -5122 3430 9393 -8285 -5599 1567 -9876 3692 9293 1806 -9835 5877 8090 4086 9126 -8116 -5841 3056 -9521 -5386 -8425 1769 9842 2266 -9739 9728 2316 -9702 2420 -9903 1385 -6848 7286 9145 4045 2163 9763 -4537...
output:
1
result:
ok 1 number(s): "1"
Extra Test:
score: 0
Extra Test Passed