QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#761432 | #9043. Geometry Task | jdyt11 | AC ✓ | 408ms | 13928kb | C++23 | 2.1kb | 2024-11-18 22:53:39 | 2024-11-18 22:53:41 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define ll long long
#define inf 0x3f3f3f3f
#define ull unsigned long long
#define pll pair<ll,ll>
#define ls d*2
#define rs d*2+1
#define mid (l+r)/2
#define lowbit(x) (x&(-x))
//#define endl "\n"
#define all(x) x.begin(),x.end()
#define int long long
//mt19937 seed;
//uniform_int_distribution<int>num(0,2e9);
const int N=1e6+10;
const int M=33;
int n;
int c[N];
pair<int,int>temp[N];
vector<pair<int,int>>dy,xy;
vector<int>dd;
int tr[N];
bool check(int x){
for(int i=1;i<=n+1;i++)tr[i]=0;
int ans=dd.end()-lower_bound(all(dd),x);
for(int i=0;i<xy.size();i++){
int t=(x-xy[i].second)/xy[i].first-((x-xy[i].second)%xy[i].first&&(x-xy[i].second)>0?1:0);
int pos=upper_bound(c+1,c+n+1,t)-c;
pos--;
if(pos>xy.size())pos=xy.size();
if(pos==0)continue;
tr[pos]++;
}
for(int i=0;i<dy.size();i++){
int t=(x-dy[i].second)/dy[i].first+((x-dy[i].second)%dy[i].first&&x-dy[i].second>0?1:0);
int pos=lower_bound(c+1,c+1+n,t)-c;
if(pos<=n-dy.size())pos=n-dy.size()+1;
if(pos==n+1)continue;
tr[pos]++;
}
for(int i=1;i<=xy.size();i++){
tr[i]+=tr[i-1];
tr[i]=min(tr[i],i);
}
for(int i=n;i>n-dy.size();i--){
tr[i]+=tr[i+1];
tr[i]=min(tr[i],n-i+1);
}
//cout<<x<<": "<<ans<<" "<<tr[xy.size()]<<" "<<tr[n-dy.size()+1]<<endl;
return ans+tr[xy.size()]+tr[n-dy.size()+1]>=(n+1)/2;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int _=1;cin>>_;
while(_--){
cin>>n;
for(int i=1;i<=n;i++)cin>>temp[i].first;
for(int i=1;i<=n;i++)cin>>temp[i].second;
for(int i=1;i<=n;i++)cin>>c[i];
sort(c+1,c+1+n);
for(int i=1;i<=n;i++){
if(temp[i].first>0)dy.push_back(temp[i]);
else if(temp[i].first==0)dd.push_back(temp[i].second);
else xy.push_back(temp[i]);
}
sort(all(dd));
int l=-2e18,r=2e18;
while(l+1<r){
if(check(mid))l=mid;
else r=mid;
}
if(check(r))cout<<r<<endl;
else cout<<l<<endl;
dd.clear();
dy.clear();
xy.clear();
}
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 7624kb
input:
3 5 0 5 -2 1 2 9 -4 0 10 5 -4 -1 4 -2 4 10 -6 3 1 0 6 -2 -4 3 0 10 22 65 11 1 -34 -1 -39 -28 25 24 10 9 1 -2 -5 8 -7 -10 -7 -7 1 101 48763 651
output:
9 25 114514
result:
ok 3 number(s): "9 25 114514"
Test #2:
score: 0
Accepted
time: 167ms
memory: 8524kb
input:
5 28308 -999999995 -999999997 -1000000000 -999999998 1000000000 0 999999997 999999995 999999998 -999999997 999999997 999999999 999999996 999999997 -999999995 0 -999999997 999999998 999999997 -999999997 999999997 999999995 1000000000 -1000000000 999999997 -999999999 999999998 0 -999999997 -999999997 ...
output:
999999997000000000 999999998000000000 999999997000000000 999999997000000000 999999997000000000
result:
ok 5 number(s): "999999997000000000 99999999800...997000000000 999999997000000000"
Test #3:
score: 0
Accepted
time: 184ms
memory: 11672kb
input:
1 100000 -999999995 999999996 -999999996 999999995 -999999999 -1000000000 -999999996 -1000000000 -999999996 -999999995 0 1000000000 999999999 -999999998 999999995 999999999 0 0 0 -1000000000 999999996 -1000000000 1000000000 999999997 999999998 999999998 -1000000000 -999999999 1000000000 -999999996 9...
output:
999999997000000000
result:
ok 1 number(s): "999999997000000000"
Test #4:
score: 0
Accepted
time: 107ms
memory: 7696kb
input:
100000 1 -24 -24 -24 1 -24 -23 -24 1 -24 -22 -24 1 -24 -21 -24 1 -24 -20 -24 1 -24 -19 -24 1 -24 -18 -24 1 -24 -17 -24 1 -24 -16 -24 1 -24 -15 -24 1 -24 -14 -24 1 -24 -13 -24 1 -24 -12 -24 1 -24 -11 -24 1 -24 -10 -24 1 -24 -9 -24 1 -24 -8 -24 1 -24 -7 -24 1 -24 -6 -24 1 -24 -5 -24 1 -24 -4 -24 1 -24...
output:
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 ...
result:
ok 100000 numbers
Test #5:
score: 0
Accepted
time: 67ms
memory: 7636kb
input:
58824 1 7 16 17 1 7 17 17 1 7 18 17 1 7 19 17 1 7 20 17 1 7 21 17 1 7 22 17 1 7 23 17 1 7 24 17 1 8 -24 17 1 8 -23 17 1 8 -22 17 1 8 -21 17 1 8 -20 17 1 8 -19 17 1 8 -18 17 1 8 -17 17 1 8 -16 17 1 8 -15 17 1 8 -14 17 1 8 -13 17 1 8 -12 17 1 8 -11 17 1 8 -10 17 1 8 -9 17 1 8 -8 17 1 8 -7 17 1 8 -6 17...
output:
135 136 137 138 139 140 141 142 143 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 ...
result:
ok 58824 numbers
Test #6:
score: 0
Accepted
time: 76ms
memory: 7760kb
input:
50000 2 -2 0 -4 -4 0 -3 2 -2 0 -4 -3 0 -3 2 0 -2 -2 -4 0 -3 2 0 -2 -1 -4 0 -3 2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 5 6 2 2 2 3 4 5 6 7 8 2 3 4 5 6 7 8 9 10 4 5 6 7 8 9 10 11 12 3 4 5 6 3 3 3 3 3 3 3 4 5 3 3 3 3 3 3 3 3 4 3 3 3 3 3 3 4 5 6 3 3 3 3 4 5 6 7 8 3 3 4 5 ...
result:
ok 50000 numbers
Test #8:
score: 0
Accepted
time: 55ms
memory: 7736kb
input:
36090 2 -2 1 2 0 3 3 2 1 -2 1 2 3 3 2 1 -2 2 2 3 3 2 -2 1 2 3 3 3 2 -2 1 2 4 3 3 2 2 -2 -4 2 3 3 2 -2 2 2 -3 3 3 2 2 -2 -2 2 3 3 2 -2 2 2 -1 3 3 2 -2 2 2 0 3 3 2 -2 2 2 1 3 3 2 2 -2 2 2 3 3 2 -2 2 2 3 3 3 2 2 -2 4 2 3 3 2 -2 3 2 -4 3 3 2 3 -2 -3 2 3 3 2 3 -2 -2 2 3 3 2 3 -2 -1 2 3 3 2 -2 3 2 0 3 3 2...
output:
3 4 5 6 7 2 3 4 5 6 7 8 9 10 5 6 7 8 9 10 11 12 13 8 9 10 11 12 13 14 15 16 -3 -2 -3 -3 -3 -3 -3 -2 -1 0 1 -3 -3 -2 -1 0 1 2 3 4 -1 0 1 2 3 4 5 6 7 2 3 4 5 6 7 8 9 10 5 6 7 8 9 10 11 12 13 8 9 10 11 12 13 14 15 16 -2 -2 -2 -2 -2 -2 -2 -1 0 1 -2 -2 -2 -1 0 1 2 3 4 -1 0 1 2 3 4 5 6 7 2 3 4 5 6 7 8 9 1...
result:
ok 36090 numbers
Test #9:
score: 0
Accepted
time: 62ms
memory: 7696kb
input:
33333 3 -1 0 1 -2 -1 -1 0 -2 0 3 0 1 -1 -1 0 -2 0 0 -2 3 0 1 -1 -1 1 -2 0 -2 0 3 1 -1 0 2 -2 -1 -2 0 0 3 -1 2 0 -2 -2 -1 0 0 -2 3 0 -1 2 -1 -2 -1 -2 0 0 3 0 -1 2 -1 -2 0 0 -2 0 3 -1 2 0 -2 1 -1 0 0 -2 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1 0 1 1 0 0 0 0 0 0 1 0 0 6 1 1 0 1 -1 1 0 0 1 1 1 0 0 0 0 1 0 0 6 1 1 0 1 -1 1 0 0 1 1 1 1 0 0 0 1 0 0 6 1 -1 1 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 6 1 1 -1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 0 6 1 1 1 -1 1 1 -1 -...
output:
1 1 1 1 1 1 1 -1 0 0 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 1 0 1 1 -1 0 0 0 1 1 -1 -1 -1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 -1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 -1 0 0 0 1 1 0...
result:
ok 15505 numbers
Test #18:
score: 0
Accepted
time: 63ms
memory: 7764kb
input:
22328 1 -1000000000 -1000000000000000000 -1000000000 1 -1000000000 0 -1000000000 1 -1000000000 1000000000000000000 -1000000000 1 0 -1000000000000000000 -1000000000 1 0 0 -1000000000 1 0 1000000000000000000 -1000000000 1 1000000000 -1000000000000000000 -1000000000 1 1000000000 0 -1000000000 1 1000000...
output:
0 1000000000000000000 2000000000000000000 -1000000000000000000 0 1000000000000000000 -2000000000000000000 -1000000000000000000 0 -1000000000000000000 0 1000000000000000000 -1000000000000000000 0 1000000000000000000 -1000000000000000000 0 1000000000000000000 -2000000000000000000 -1000000000000000000 ...
result:
ok 22328 numbers
Test #19:
score: 0
Accepted
time: 42ms
memory: 7708kb
input:
19011 5 1000000000 -1000000000 -1000000000 -1000000000 -1000000000 0 -1000000000000000000 1000000000000000000 1000000000000000000 -1000000000000000000 0 -1000000000 0 0 0 5 -1000000000 -1000000000 1000000000 -1000000000 -1000000000 -1000000000000000000 -1000000000000000000 1000000000000000000 100000...
output:
0 1000000000000000000 -1000000000000000000 0 0 -1000000000000000000 0 0 0 0 0 0 0 1000000000000000000 0 0 1000000000000000000 -1000000000000000000 0 0 0 0 1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000...
result:
ok 19011 numbers
Test #20:
score: 0
Accepted
time: 47ms
memory: 7720kb
input:
16666 6 0 -1000000000 1000000000 0 1000000000 1000000000 1000000000000000000 0 1000000000000000000 -1000000000000000000 1000000000000000000 1000000000000000000 -1000000000 -1000000000 -1000000000 0 -1000000000 -1000000000 6 1000000000 1000000000 1000000000 0 -1000000000 1000000000 -10000000000000000...
output:
1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 0 0 -1000000000000000000 0 0 0 -1000000000000000000 0 0 0 0 0 0 0 0 0 1000000000000000000 0 0 1000000000000000000 0 0 0 0 0 0 1000000000000000000 1000000000000000000 1000000000000000000 1000000000...
result:
ok 16666 numbers
Test #21:
score: 0
Accepted
time: 63ms
memory: 7708kb
input:
16666 6 -1000000000 0 -1000000000 0 -1000000000 0 0 1000000000000000000 -1000000000000000000 1000000000000000000 0 0 -1000000000 0 1000000000 0 -1000000000 -1000000000 6 -1000000000 -1000000000 1000000000 0 -1000000000 0 -1000000000000000000 0 -1000000000000000000 1000000000000000000 0 0 -1000000000...
output:
1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 0 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 100000000000000000...
result:
ok 16666 numbers
Test #22:
score: 0
Accepted
time: 65ms
memory: 7704kb
input:
16666 6 0 0 1000000000 0 -1000000000 -1000000000 1000000000000000000 0 0 1000000000000000000 1000000000000000000 1000000000000000000 0 -1000000000 -1000000000 1000000000 0 1000000000 6 -1000000000 0 -1000000000 0 0 1000000000 1000000000000000000 0 1000000000000000000 1000000000000000000 100000000000...
output:
1000000000000000000 2000000000000000000 1000000000000000000 1000000000000000000 2000000000000000000 1000000000000000000 2000000000000000000 2000000000000000000 0 1000000000000000000 2000000000000000000 1000000000000000000 2000000000000000000 2000000000000000000 1000000000000000000 200000000000000000...
result:
ok 16666 numbers
Test #23:
score: 0
Accepted
time: 57ms
memory: 7696kb
input:
16666 6 0 -1000000000 -1000000000 -1000000000 1000000000 1000000000 0 -1000000000000000000 1000000000000000000 1000000000000000000 -1000000000000000000 0 1000000000 0 1000000000 1000000000 0 -1000000000 6 -1000000000 0 -1000000000 1000000000 1000000000 -1000000000 1000000000000000000 0 1000000000000...
output:
1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 2000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 2000000000000000000 ...
result:
ok 16666 numbers
Test #24:
score: 0
Accepted
time: 47ms
memory: 7696kb
input:
12480 6 1000000000 -1000000000 1000000000 1000000000 1000000000 1000000000 0 1000000000000000000 0 0 0 0 0 1000000000 0 1000000000 0 0 6 1000000000 1000000000 -1000000000 1000000000 1000000000 1000000000 0 0 1000000000000000000 0 1000000000000000000 0 0 0 1000000000 0 1000000000 0 6 1000000000 10000...
output:
1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -1000000000000000000 -10000000000...
result:
ok 12480 numbers
Test #25:
score: 0
Accepted
time: 91ms
memory: 7720kb
input:
10000 31 487178931 -946334317 -12867738 117466701 -962178861 161006691 -867514019 201541068 -148787890 6646795 425198287 -701942490 -125302054 -348523263 -548441535 988004525 -71196231 544628197 -1671571 434416401 693180731 16969612 -548045325 264501657 365655416 789382057 -393626413 -642720594 -917...
output:
611615411193969377 712400003483235629 105281962399863608 64345007851803289 308893224509712936 410392501706095944 -79727867977169663 48902937828504794 378265997917022824 374757289085202123 631402580249847446 919168992180850214 480734781016194566 924004005870224326 167903575007923494 64974228422907482...
result:
ok 10000 numbers
Test #26:
score: 0
Accepted
time: 64ms
memory: 7764kb
input:
10000 11 49 46 -77 15 -28 -33 -6 -4 31 59 -70 -54 39 -47 3 20 -17 -47 19 -39 -96 -15 40 45 -40 -70 -41 -27 67 23 -25 -20 48 5 32 -33 81 79 -60 91 -80 80 47 -33 -12 74 10 -10 -65 4 -69 -35 -67 -94 -79 39 -60 -15 -77 -44 -53 61 9 91 -40 -56 28 33 12 -28 -90 68 -8 -78 28 -94 84 89 85 -40 -9 -2 43 66 -7...
output:
2293 890 4967 2962 3861 1858 4560 1715 4384 4326 2531 2452 1850 4960 705 -85 1231 2957 5314 300 3878 1913 3888 6125 4649 5860 3715 3363 6574 1875 2820 20 3570 3978 4345 2362 3805 6187 2542 3209 1725 1993 2526 1195 2154 4371 4006 1305 2467 3249 5362 5066 7784 2973 2366 -92 1634 1835 3161 4246 233 715...
result:
ok 10000 numbers
Test #27:
score: 0
Accepted
time: 109ms
memory: 7744kb
input:
1000 14 122853911 546524567 -417545002 -923929439 -87827133 -379266897 887060264 -916737644 272533386 -792728851 -934229527 191480467 -825716102 -216073454 -284469137278916067 -394568812283767571 -211504225738134658 -609975469587653761 -974696325225698536 929952262027345101 -703965703178568242 -4924...
output:
214890565648327123 427257921545915622 529528454831503843 533690855648415362 508782188384199872 499295745755397777 370153293020166428 514067003062789326 384980833468495916 302503419873235720 442338161704526755 380658406099391760 339994044548476689 1011163363317227872 269811010743937037 58939857738462...
result:
ok 1000 numbers
Test #28:
score: 0
Accepted
time: 85ms
memory: 7664kb
input:
1000 33 -81 -30 60 -41 -82 57 39 53 42 84 -88 82 94 52 -67 -86 -71 59 -62 46 -67 55 -53 15 88 70 91 -57 -94 -23 5 -29 -65 100 61 -11 -7 31 -65 35 -100 -35 -13 6 -75 -46 24 -9 -60 -71 -69 -26 93 61 -59 15 29 35 69 16 100 -63 -78 -39 -77 -87 -63 -22 53 -60 -54 -84 -1 -17 -66 -54 87 -34 -66 -94 70 96 7...
output:
5221 3993 1564 7162 4634 5009 4938 5283 4701 5151 3275 3739 4050 4929 4738 4757 5303 4224 4673 5110 2494 3890 3682 4880 4885 4608 5212 3967 4521 3933 3811 3892 3100 4984 4446 3816 2868 3898 4237 4518 4775 4622 3677 763 4896 4131 4798 4746 2037 4743 4141 4665 4309 4382 3012 3760 4512 4232 3573 4173 3...
result:
ok 1000 numbers
Test #29:
score: 0
Accepted
time: 193ms
memory: 7880kb
input:
100 2459 -173518229 17777201 -341286758 -77446519 984985089 -953739162 -287999123 686905328 276701808 -365146751 493678167 -744899653 -376796867 308415148 803684293 -30178321 178469081 897260262 41255088 724054338 -855393296 408656183 148234590 39374046 565331789 59881245 -362492201 42847346 3912904...
output:
506807957653420571 301709084876434057 571802750359755982 447278527369737223 516907651240098350 467404372776419227 418195823283088831 464271309591194226 514427912506620330 489013167585652326 495028424314471364 500261148051415081 410936874170647961 504083963277888655 514755347695986583 587726833224753...
result:
ok 100 numbers
Test #30:
score: 0
Accepted
time: 111ms
memory: 7888kb
input:
100 142 -58 -94 -35 -93 -93 75 98 61 50 63 -82 60 51 -17 52 -9 -98 -93 15 41 -35 10 -96 62 69 -2 -2 -26 -91 -81 92 -82 90 -23 24 21 21 -96 13 -5 37 17 -58 55 -18 31 -65 -81 86 43 54 9 39 -52 -18 -21 -14 88 78 99 60 -69 -93 69 -84 -82 15 94 -41 -72 -100 -38 54 96 45 -77 47 -9 -11 -91 17 -60 18 51 86 ...
output:
4886 5056 4845 4637 4694 4937 4575 5092 4739 4958 4579 4871 4814 4568 5046 4799 4761 4719 4653 2583 132 4694 4990 3920 5164 5043 4975 5124 4635 4644 5000 4763 4893 4935 3422 4903 4744 4920 4840 5019 4308 5243 4873 4851 4841 4466 3817 5003 4824 4817 5191 4881 4582 4929 4748 3270 4906 5074 5147 4932 4...
result:
ok 100 numbers
Test #31:
score: 0
Accepted
time: 315ms
memory: 8492kb
input:
10 13717 -843064213 354876239 987477520 -486447773 109789243 175178271 -443716346 -803758564 3843018 -485580584 -823274915 -552925128 453445729 -205181294 -856868645 -502540486 725703967 -396077761 292460049 520755018 -204457787 -784190504 36797564 -785190707 127407360 -677531993 -397543588 -5370363...
output:
501804734189255258 458012792758788413 489782510667222605 496537062365096408 498338935585149699 511324620628736661 506825618709728587 499762014722669705 506195866459480464 455038746861372337
result:
ok 10 numbers
Test #32:
score: 0
Accepted
time: 141ms
memory: 10216kb
input:
10 12817 -81 -65 73 81 -85 -86 30 -91 -54 2 95 -59 70 33 24 -76 -33 -5 -31 -29 -23 29 -45 91 39 -15 47 66 -2 84 -21 -65 -17 36 -65 5 19 -16 16 -17 -81 -49 -86 61 -12 -9 -76 19 95 -89 -51 -62 -40 -23 23 100 45 -66 -100 81 -75 98 47 5 98 100 -52 -72 -7 -78 -52 79 77 7 -100 27 -17 80 15 -58 18 72 -3 -2...
output:
4964 4990 5019 5006 4980 5050 5068 4814 4966 4952
result:
ok 10 numbers
Test #33:
score: 0
Accepted
time: 157ms
memory: 13136kb
input:
1 100000 88 67 -46 8 -59 55 -83 -31 -74 63 23 18 48 -21 31 -73 -100 6 -46 -86 -3 -21 -17 -80 -62 -17 -88 18 71 -24 49 -87 -39 8 -31 -40 17 40 -23 -39 31 88 -41 42 -89 -42 -39 81 -1 22 69 27 66 -85 47 89 -61 86 87 -57 3 -46 -6 8 26 -59 -74 -32 69 -49 -88 -1 11 -37 26 59 10 8 46 51 60 40 50 -94 53 -51...
output:
5014
result:
ok 1 number(s): "5014"
Test #34:
score: 0
Accepted
time: 242ms
memory: 13248kb
input:
1 100000 -5107 -6986 -3842 -4749 6372 5143 5246 9112 9544 -8886 8818 -3967 9535 -1478 7230 1423 4104 2678 2831 8396 1318 -1477 -7146 -4788 -8570 8300 -5163 -1624 -8266 7153 3796 -5410 6591 6551 1516 7411 6193 2508 1698 -7792 6714 -4007 -5514 7936 6856 7259 6390 8391 -6611 5630 5659 575 9485 -5587 -5...
output:
50023311
result:
ok 1 number(s): "50023311"
Test #35:
score: 0
Accepted
time: 289ms
memory: 13092kb
input:
1 100000 782818 323483 914340 -547060 -756503 -557923 -43371 -167790 -556470 970894 -524702 -630933 -114394 102216 -148862 278747 19666 -508227 700668 -530784 356236 -537135 -792325 -819496 -530662 -610655 538439 -713118 -562263 -815500 -505621 -415938 -86383 -34304 363304 -802378 713938 -641861 -24...
output:
499069496442
result:
ok 1 number(s): "499069496442"
Test #36:
score: 0
Accepted
time: 396ms
memory: 13664kb
input:
1 100000 -708453221 -321511443 871832390 -740269234 -943406887 972147432 -601970913 -94236319 201351990 -689358171 -859948923 -707909998 -459295821 -444316639 -640189227 725879792 686209527 160926647 203806426 -525839399 -692518707 -442296220 -758308035 -819729899 935990550 890977224 121186466 -2326...
output:
503141296574963776
result:
ok 1 number(s): "503141296574963776"
Test #37:
score: 0
Accepted
time: 100ms
memory: 7656kb
input:
1000 100 -602673896 56587188 516063012 -96107551 -518840414 288224701 867989426 526553640 -740194013 -266333805 -529854362 931873830 52311746 -134632046 -92331395 -545899620 627784574 916402123 15778709 -180085717 -10956372 946217869 -415303411 882525233 -569184725 -398201491 457678678 607703852 928...
output:
546148214531614620 482897627236039473 542777585778635420 496846643149501201 501169178846431371 661622487068222774 521065250844016597 430382728493921130 369381816263602189 662845002992845272 631794218042386565 596587404922050278 479302010308225937 628714643799436134 370709631661505391 446707526375238...
result:
ok 1000 numbers
Test #38:
score: 0
Accepted
time: 142ms
memory: 7820kb
input:
100 1000 237020441 -188761793 -51222795 555046347 -523875649 244173913 578250857 99143062 869021812 928817933 561036785 645267705 -904877256 93918179 27906279 1624668 -530080950 -892944997 -825951425 709036836 -972596355 358277409 631374970 -98881076 -923796038 300906829 780603246 -986162734 4547938...
output:
521140015377797928 536946490846174005 507887893761290135 472621945121040280 515546419770211085 497110307428163337 497154906331502335 485229955923960227 492213447236816678 561223919418736906 501980651136348837 549101474066257176 592552649101152427 474753657070885178 460183269685934055 547855333894349...
result:
ok 100 numbers
Test #39:
score: 0
Accepted
time: 89ms
memory: 7664kb
input:
2173 46 -6716251 -87492464 -203802304 -520766289 -537449976 -359738711 -636356699 -487982718 -73631036 -581991563 237981063 5605325 -78519476 -104362096 -710181938 87407400 -487453413 762287911 -71813538 -532363372 166684346 570753790 -939289778 315108033 -829465833 664480466 -503393956 -453340190 1...
output:
518445548248263588 633893356743210219 421160124970007392 421392370234639052 569525588284989864 611223450755156844 406066025318454752 605705517576433028 223428663974141394 343411522401058655 182419247606878832 499764266323007498 461616892859045247 441793667192880957 250282626854151603 499885141202125...
result:
ok 2173 numbers
Test #40:
score: 0
Accepted
time: 118ms
memory: 7652kb
input:
316 316 91559276 -733800271 -489852219 391891725 -425650340 -993338444 414300048 -119904774 -307467961 287568307 -15977197 117871477 -282225279 669148994 -284255757 896101804 199057556 -778379657 726384384 850456561 350285614 -481304576 156262326 718021014 241665508 912721934 154981222 -797119650 81...
output:
553719140560541304 553981537900324296 443085768679420630 487875893191533581 481901662878407813 617533231426269926 529347026877679662 519043716340973263 566614504398567836 509664204281876247 459745263910478707 574292778511243081 463370267981562177 504416889108523597 416251146193370862 497163236427799...
result:
ok 316 numbers
Test #41:
score: 0
Accepted
time: 215ms
memory: 7720kb
input:
46 2154 502932971 -699940527 935049066 -808407382 639621701 63132300 826943786 -418464482 28217254 -586571815 289637348 -219770594 -415416167 15322910 -567246332 614011985 -666933305 -835498736 -817610361 379846563 -558038425 -321299273 492769769 118978979 -200150754 -882700515 -903626646 -715919893...
output:
557565959988757249 467952430915010452 490318699548842424 557371457196649811 472210097712594737 471761956819307415 497038366455934412 504118029183725840 481370482724226616 505928191913932096 495066949004680221 513328546125126196 514694990943474807 513046637868080308 540151057848350377 459493310547930...
result:
ok 46 numbers
Test #42:
score: 0
Accepted
time: 95ms
memory: 7716kb
input:
10000 16 597061284 365037105 224159090 777143763 349134265 751656326 270167271 530085212 279993565 270606458 113884796 964220287 936224345 994091587 123116543 361314820 -953012730339856743 642075026972827133 -648051219050113803 -997063295667786081 429790979304921268 -862844882310607349 -811518246872...
output:
751914651348208478 826220684441784387 -109840245053309991 433583769966558366 213717120728879371 227461313135965814 806159881665827982 363292629928269772 -597828779672139069 143788958142023248 786075336725035136 -477219840171332106 357390322873065599 -301522058206403624 526497862733346686 15544520840...
result:
ok 10000 numbers
Test #43:
score: 0
Accepted
time: 74ms
memory: 7708kb
input:
10000 22 862 385 432 634 250 399 93 283 384 871 39 183 330 948 284 257 485 826 99 136 958 165 8290 -157883 53106 -412598 -408650558417037312 -331266 38985 -408650558417174845 -209934 -408650558417075741 -408650558417048623 -408650558417149450 -408650558417178262 -408650558417180950 -30910 -408650558...
output:
56562 56562 747116156363328626 56562 57156 56562 56562 56562 577970248560925529 816817439942857739 127620 56562 889751078277707142 320983062169353289 56562 794176985809316859 373642117612647110 527628824896952692 64370 64370 138022742000156632 829764608312039993 56562 56562 56562 56562 56562 4179127...
result:
ok 10000 numbers
Test #44:
score: 0
Accepted
time: 86ms
memory: 7632kb
input:
10000 23 567153991 9902712 624583880 132878821 38260366 162289030 300648314 164770701 8999850 465336293 691952972 548787348 48470731 465044758 953575625 479669160 719003433 737966214 475137705 82008943 591998943 17353826 545855139 -6377769478534778 -990931594706944559 -34006560126698519 -99791622647...
output:
12345678987654321 12345678987654321 324780858128773681 12345678987654321 470695595821835247 890919040008407205 671447123690019974 740630386753870436 134430673981621394 450064350013039272 206012575343661153 23573129310163916 12345678987654321 264924606429689525 57332667989134686 88505296189396879 986...
result:
ok 10000 numbers
Test #45:
score: 0
Accepted
time: 109ms
memory: 7740kb
input:
1000 55 -493616478 -431695174 -187678421 -955796310 -422181192 -132879484 -175732889 -88092463 -22561503 -868911437 -861175331 -117632683 -440743764 -58370035 -889789700 -248605849 -72423332 -675415044 -93593626 -854691661 -330087204 -103215158 -359332451 -362604006 -405734387 -852807476 -972661574 ...
output:
9589259982027148 -755457850103325348 -227920223223190456 287838512599740461 -20311975425235324 762165033313106463 -26110480236566223 341775208954894661 335263651879650241 341499011279563360 854179598621238024 934552163232225311 73835813210969305 -9108188065355857 821337024965694973 66839108931677450...
result:
ok 1000 numbers
Test #46:
score: 0
Accepted
time: 90ms
memory: 7704kb
input:
1000 25 -807 -167 -681 -110 -895 -561 -591 -693 -926 -83 -314 -762 -828 -946 -721 -65 -477 -93 -803 -569 -986 -280 -230 -53 -385 -293233 -41202 -580324 -28059 -393154 -553210 -112428 -182620 -29939 39044 -199265 -559471 -628093 -363537 -375116 10859 -206196 24300 -294589 -122137 -768075 -77669 -1458...
output:
132167 237049 239537 213838 197567 96536 207963 65196 219401 254983 234805 128774 209610 219605 110450 236465 61741 127919 247372 129662 224360 83443 121238 135125 247883 199614 187734 -5775 184866 70799 192299 201283 71619 138834 146455 200718 123784 94537 189584 179594 179553 216780 120327 147149 ...
result:
ok 1000 numbers
Test #47:
score: 0
Accepted
time: 197ms
memory: 9912kb
input:
100 326 -193575465 -739190630 -54075535 -412791148 -682464495 -32072134 -171970082 -440373688 -680929264 -966586907 -257501947 -317743866 -431504640 -161593297 -804104579 -794177864 -383700390 -718240429 -558070803 -464835365 -22134616 -284297503 -523311341 -898263543 -352576187 -480781991 -87612838...
output:
-54124044043209123 901569735075017131 247083420817069231 968643817658079064 701044190293888315 519397302499288654 343037589466295199 834105526697559965 774552489355790375 -710481327938711781 -354615424521881549 783667358571128168 -192429784016023807 396417104401929842 -148177313628148385 10042900355...
result:
ok 100 numbers
Test #48:
score: 0
Accepted
time: 190ms
memory: 7820kb
input:
100 1111 -347606976 -561778075 -743186403 -219587172 -774030955 -905441550 -107959101 -38596886 -472533245 -821559372 -634258462 -709964613 -878486666 -693938588 -863957648 -66218720 -93993420 -726732730 -970829280 -215376676 -683726056 -146565846 -813336345 -29389654 -318817553 -443442566 -81004598...
output:
140127473016002694 179223419228104380 977310060362507079 864197532 154009137868267354 35872214766614937 406072914952944796 4223289390752532 674811441586822473 469690960343485175 356308256061175032 39367466166495028 554116024781074191 4442253961332132 6075365771343948 453719202605262884 7650410931915...
result:
ok 100 numbers
Test #49:
score: 0
Accepted
time: 315ms
memory: 10596kb
input:
10 20538 -460462919 -68879581 -241688403 -330671196 -203798630 -323672956 -910498949 -294276449 -676919579 -713490769 -981195611 -963144484 -466313381 -351468221 -734282409 -810832379 -817678307 -162035661 -907061802 -214250799 -455933371 -181398456 -464125306 -101089782 -202638816 -418769621 -64565...
output:
834999004850992519 975945917089456355 -274891217103977472 961961428975738154 932533502121743283 -148141206163173769 719726528689541808 814266902744319068 985005346520261019 906653414613368837
result:
ok 10 numbers
Test #50:
score: 0
Accepted
time: 229ms
memory: 10632kb
input:
10 24940 -72209 -35769 -17307 -113 -51310 -54347 -25977 -19189 -68081 -77343 -81335 -29825 -83031 -26464 -49073 -51833 -72393 -24826 -36195 -87971 -28755 -15007 -50308 -25661 -46222 -86231 -35697 -32855 -19604 -84779 -92343 -34262 -15956 -58683 -82119 -52627 -7415 -33075 -42939 -67203 -83817 -26092 ...
output:
7125085014 -5624403504 -3058207973 2867395854 367892432 8003274468 7616327893 1516954834 8830616082 8934496139
result:
ok 10 numbers
Test #51:
score: 0
Accepted
time: 177ms
memory: 8636kb
input:
10 4783 607 100 503 910 773 475 455 74 802 700 412 61 389 993 142 798 396 80 845 801 68 34 469 120 857 885 766 899 540 771 435 1 729 221 954 412 119 399 733 194 609 654 114 277 903 221 695 624 20 645 836 180 91 820 941 557 374 495 838 743 663 479 133 961 60 241 989 374 588 83 603 139 284 179 770 530...
output:
163160 153093 109775 216305 186003 154336 205881 230333 200973 195485
result:
ok 10 numbers
Test #52:
score: 0
Accepted
time: 205ms
memory: 13928kb
input:
1 100000 147 727 768 788 965 616 734 242 149 998 716 785 493 587 417 628 13 737 218 130 22 864 78 41 976 832 649 730 437 976 20 59 843 240 845 145 943 875 276 576 371 81 379 88 897 382 807 761 386 258 221 485 72 473 84 164 378 792 228 956 380 589 256 46 302 612 874 82 694 976 604 398 513 144 742 817...
output:
113494
result:
ok 1 number(s): "113494"
Test #53:
score: 0
Accepted
time: 408ms
memory: 13628kb
input:
1 100000 -200333939 -530268594 -462701965 -765126054 -411686114 -461555595 -46767410 -292718121 -298284780 -795175622 -774577564 -208978639 -719705465 -667313312 -928685415 -886243895 -109093830 -538600019 -156291930 -780232614 -432893432 -438972515 -959280688 -357290959 -43592192 -526552332 -480314...
output:
378699546278904712
result:
ok 1 number(s): "378699546278904712"
Test #54:
score: 0
Accepted
time: 282ms
memory: 13428kb
input:
1 100000 -50288 -64275 -11506 -65040 -37733 -86020 -22760 -16296 -42456 -48012 -72266 -95224 -63502 -699 -95775 -45075 -3926 -69403 -149 -53336 -78381 -63706 -80917 -79793 -25778 -92 -75553 -59650 -60453 -52425 -91080 -91956 -60441 -10687 -96450 -82085 -27313 -70176 -53874 -93605 -7066 -40117 -15094...
output:
1859324506
result:
ok 1 number(s): "1859324506"
Test #55:
score: 0
Accepted
time: 132ms
memory: 11700kb
input:
1 100000 -99 -68 -32 0 -76 -22 -90 0 -57 -89 -34 -47 -64 0 -79 -69 -34 -38 -32 -55 -70 -54 -61 -48 -44 -52 -93 -51 0 -29 -93 -7 0 -12 -51 -12 -70 -27 -30 0 0 -9 -89 -57 -21 -7 -44 0 -28 -85 -74 -21 -61 0 -55 -45 -1 -29 -7 -1 -50 -18 -9 0 0 -8 0 -20 -55 0 0 -23 -21 0 -94 -6 -93 -86 -55 -43 -56 -60 -6...
output:
34567
result:
ok 1 number(s): "34567"
Test #56:
score: 0
Accepted
time: 399ms
memory: 11832kb
input:
1 100000 387985049 166472305 591094024 947270298 61527416 423671701 318803867 889886681 709100443 612201583 275402604 716154879 2185441 170121583 51171462 833777446 323529213 498916058 174829292 324827278 548500288 390826280 40247891 366708253 362592907 124656580 962270893 386119049 201349580 284253...
output:
712074215548977626
result:
ok 1 number(s): "712074215548977626"
Test #57:
score: 0
Accepted
time: 96ms
memory: 7656kb
input:
1000 100 747645855 865255568 762088660 4367332 212673913 344682626 728218482 549018693 376521162 761828813 614635084 721659074 195119694 368780146 293359683 332921304 89894011 250449380 935072120 45402057 735959945 692937999 46611252 207014630 75933750 933198931 965891105 903715912 355539413 2212006...
output:
505509983652283856 -354150910537295812 481798827953049196 182652118294629474 -390234996030679313 -671767835913737598 848624006918405013 705944848457956971 311373009266116046 287895177111733249 674644809583689802 621680394111882493 109582026950317360 371829900882212639 -21611913921977450 888047018868...
result:
ok 1000 numbers
Test #58:
score: 0
Accepted
time: 154ms
memory: 7688kb
input:
100 1000 -47740 -69518 -26260 -52340 -84971 -73553 -32734 -34321 -13105 -1320 -9361 -76587 -13248 -67719 -14100 -91474 -56043 -6501 -77724 -92036 -63687 -61506 -62487 -93108 -75296 -96211 -3215 -16961 -3953 -70309 -29708 -46516 -37340 -48711 -88652 -58513 -87070 -22041 -33391 -53031 -83456 -3365 -70...
output:
123456789 123579964 564854961863006406 425717813379992680 123456789 123456789 434061659831876454 123456789 123456789 475397042751290648 826321600595802791 263366767476926752 123456789 123456789 123456789 29143409810729359 304157528399635052 969030863714552216 407252620736062756 686180816343991852 12...
result:
ok 100 numbers
Test #59:
score: 0
Accepted
time: 88ms
memory: 7716kb
input:
2173 46 -566369009 -705467866 -559677129 -394303229 -498464136 -178548532 -366816356 -268542771 -342723137 -195186961 -810829209 -900430447 -104357012 -224772080 -739495672 -856148695 -873195922 -940246249 -728008532 -552125509 -462701861 -782397704 -234249310 -722091426 -491888088 -212267774 -98730...
output:
848880910575821000 774375701118970588 668634771298300115 665079920986833414 462058271960914107 853047468270721652 153916209747669579 287962822333690610 754806233972058393 -362587459541153426 -458731082804977734 -510050991058163188 -201650166382791670 -771995860988877599 -452836683139979063 -39846466...
result:
ok 2173 numbers
Test #60:
score: 0
Accepted
time: 103ms
memory: 7716kb
input:
316 316 -93558 -9656 -40276 -59976 -87069 -98705 -48023 -11343 -99929 -72815 -87018 -87821 -56595 -1634 -61295 -2644 -3053 -92347 -81966 -57260 -18511 -29703 -5413 -58474 -64004 -3837 -23516 -6203 -33471 -40732 -59814 -41013 -55072 -77365 -58563 -94495 -52539 -14143 -53145 -15489 -37185 -43844 -8170...
output:
2087895416 2098015606 1971912744 1265541533 2037402259 1641491140 2378508837 1542538211 2345872887 1300755341 1475943674 2403647870 1254402172 2015399095 1924651383 1262449799 882471885 2109405719 1208568175 1253826441 1852292336 1423603302 1921497184 1980912520 1764722516 1566182454 2075778388 1590...
result:
ok 316 numbers
Test #61:
score: 0
Accepted
time: 224ms
memory: 7780kb
input:
46 2154 -218062941 -7889453 -78579667 -834295878 -619568775 -85808902 -672676596 -876802556 -548839356 -797428014 -13580687 -868990400 -540165873 -98762682 -644269724 -816574101 -92098014 -734561894 -171373425 -83710603 -185049924 -779841438 -269199796 -580319424 -948305237 -667637929 -266971004 -23...
output:
-317430992270764413 321158071411997714 -23891991359159067 -49880670441457328 886219334734003812 541251025208475417 1086471652212607945 305478939105627134 -107281543105148761 365457786088408252 581779878003717339 955606181347387276 949894108262939520 -2451961113692991 728399559648839814 -614857198233...
result:
ok 46 numbers
Test #62:
score: 0
Accepted
time: 140ms
memory: 7816kb
input:
50 169 -1000000000 999999998 -999999996 -1000000000 -999999998 -999999996 -999999997 999999998 999999999 999999998 0 999999997 -999999998 999999996 -999999999 999999997 -999999997 -999999997 -999999996 -1000000000 -999999998 -999999997 1000000000 999999997 -999999998 999999999 -999999999 999999996 -...
output:
999999999000000000 2 999999999000000000 999999996000000000 999999997000000000 999999998000000000 999999997000000000 999999998000000000 999999997000000000 999999997000000000 999999996000000000 999999997000000000 999999999000000000 999999997000000000 999999998000000000 999999997000000000 1999999994999...
result:
ok 50 numbers
Test #63:
score: 0
Accepted
time: 167ms
memory: 10464kb
input:
10 2971 -999999995 -999999995 1000000000 -999999998 0 1000000000 999999995 -1000000000 -999999999 999999996 -999999997 -999999997 999999999 999999995 999999998 -999999995 999999997 -999999997 -1000000000 -999999999 999999999 999999995 999999997 999999995 -999999995 -999999995 1000000000 -999999995 -...
output:
999999997000000000 999999997000000000 999999997000000000 999999997000000000 999999997000000000 999999999000000000 999999998000000000 999999998000000000 999999997000000000 999999999000000000
result:
ok 10 numbers
Extra Test:
score: 0
Extra Test Passed