QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#183371 | #5375. Search | Lynkcat | 30 | 981ms | 101664kb | C++20 | 3.6kb | 2023-09-19 14:22:15 | 2023-09-19 14:22:15 |
Judging History
answer
#include <bits/stdc++.h>
#include "search.h"
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
#define sz(x) ((int)((x).size()))
// #define int ll
using namespace std;
namespace query
{
const int N=2005;
int f[N][N];
int n;
int bnd[N],pos[N];
int mx,my;
mt19937_64 rnd(time(0));
void geta(int k,int x,int y)
{
if (!x) return;
int l=pos[k]+1,r=bnd[k];
while (l<=r)
{
int mid=l+(r-l)/2;
mid=l;
if (ask1(mid,k,x,y)=="<")
{
pos[k]=mid;
l=mid+1;
} else r=mid-1;
}
}
void getb(int k,int x,int y)
{
int l=pos[k]+1,r=bnd[k];
while (l<=r)
{
int mid=l+(r-l)/2;
mid=r;
if (ask1(mid,k,x,y)=="<")
{
l=mid+1;
} else
{
bnd[k]=mid-1;
r=mid-1;
}
}
}
inline int calc(int x,int y)
{
return max((f[x][y]-1),(f[n][n]-f[x-1][n]-f[n][y-1]+f[x-1][y-1]-1));
}
int solve()
{
bool bl=1;
for (int i=1;i<=n;i++)
if (pos[i]==bnd[i]) bl&=1;
else bl=0;
int tot=0;
poly g;
for (int i=1;i<=n;i++)
{
tot+=bnd[i]-pos[i];
if (bnd[i]!=pos[i]) g.push_back(i);
}
if (bl) return 1;
int sm=tot;
int od=rnd()%sm;
sm=0;
int cx=0,cy=0;
for (int i=1;i<=n;i++)
{
for (int j=1;j<=n;j++)
{
f[i][j]=0;
}
}
for (int j=1;j<=n;j++)
for (int i=pos[j]+1;i<=bnd[j];i++) f[i][j]=1;
for (int i=1;i<=n;i++)
for (int j=1;j<=n;j++)
f[i][j]+=f[i-1][j]+f[i][j-1]-f[i-1][j-1];
int Tot=0;
vector<pa>all;
for (int j=1;j<=n;j++)
for (int i=pos[j]+1;i<=bnd[j];i++)
if (calc(i,j)*2<=tot) all.push_back(mp(i,j));
int ooo=rnd()%all.size();
cx=all[ooo].fi,cy=all[ooo].se;
// if (tot>0)
// {
// for (auto u:g)
// {
// sm+=bnd[u]-pos[u];
// if (od<sm)
// {
// cx=bnd[u]-(sm-od)+1;
// cy=u;
// break;
// }
// }
// }
if (ask2(cx,cy)=="<")
{
pos[cy]=cx;
for (int i=n;i>=1;i--)
{
if (i<n)
pos[i]=max(pos[i],pos[i+1]);
if (i!=cy)
geta(i,cx,cy);
}
} else
{
bnd[cy]=cx-1;
for (int i=1;i<=n;i++)
{
if (i>1)
bnd[i]=min(bnd[i],bnd[i-1]);
if (i!=cy)
getb(i,cx,cy);
}
}
return 0;
}
int main(int nn)
{
n=nn;
mx=n,my=n;
if (ask2(n,n)=="<")
{
return n*n;
}
poly g;
for (int i=1;i<=n;i++)
g.push_back(i),bnd[i]=n;
while (!solve());
int ans=0;
for (int i=1;i<=n;i++) ans+=pos[i];
return ans;
}
}
詳細信息
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 1ms
memory: 7892kb
input:
6 3 384 45 837639677
output:
1 18 5
result:
points 1.0 correct, ask1 called 18 time(s), ask2 called 5 time(s)
Test #2:
score: 10
Accepted
time: 1ms
memory: 5836kb
input:
8 59 512 45 439876779
output:
1 20 5
result:
points 1.0 correct, ask1 called 20 time(s), ask2 called 5 time(s)
Test #3:
score: 10
Accepted
time: 1ms
memory: 5836kb
input:
9 27 576 45 777817090
output:
1 66 10
result:
points 1.0 correct, ask1 called 66 time(s), ask2 called 10 time(s)
Test #4:
score: 10
Accepted
time: 1ms
memory: 5824kb
input:
7 14 448 45 42081112
output:
1 26 9
result:
points 1.0 correct, ask1 called 26 time(s), ask2 called 9 time(s)
Test #5:
score: 10
Accepted
time: 1ms
memory: 5868kb
input:
6 14 384 45 380054191
output:
1 13 7
result:
points 1.0 correct, ask1 called 13 time(s), ask2 called 7 time(s)
Test #6:
score: 10
Accepted
time: 0ms
memory: 5860kb
input:
9 13 576 45 718060038
output:
1 41 8
result:
points 1.0 correct, ask1 called 41 time(s), ask2 called 8 time(s)
Test #7:
score: 10
Accepted
time: 1ms
memory: 5884kb
input:
9 16 576 45 1056065885
output:
1 64 10
result:
points 1.0 correct, ask1 called 64 time(s), ask2 called 10 time(s)
Test #8:
score: 10
Accepted
time: 1ms
memory: 7780kb
input:
7 41 448 45 320297139
output:
1 26 6
result:
points 1.0 correct, ask1 called 26 time(s), ask2 called 6 time(s)
Test #9:
score: 10
Accepted
time: 1ms
memory: 5844kb
input:
7 33 448 45 658302986
output:
1 36 7
result:
points 1.0 correct, ask1 called 36 time(s), ask2 called 7 time(s)
Test #10:
score: 10
Accepted
time: 0ms
memory: 5876kb
input:
7 30 448 45 996276065
output:
1 61 13
result:
points 1.0 correct, ask1 called 61 time(s), ask2 called 13 time(s)
Test #11:
score: 10
Accepted
time: 1ms
memory: 5760kb
input:
7 37 448 45 598480398
output:
1 21 7
result:
points 1.0 correct, ask1 called 21 time(s), ask2 called 7 time(s)
Test #12:
score: 10
Accepted
time: 1ms
memory: 7980kb
input:
10 27 640 45 936486245
output:
1 54 7
result:
points 1.0 correct, ask1 called 54 time(s), ask2 called 7 time(s)
Test #13:
score: 10
Accepted
time: 1ms
memory: 5832kb
input:
8 22 512 45 200750268
output:
1 41 10
result:
points 1.0 correct, ask1 called 41 time(s), ask2 called 10 time(s)
Test #14:
score: 10
Accepted
time: 1ms
memory: 5856kb
input:
10 41 640 45 538723346
output:
1 51 8
result:
points 1.0 correct, ask1 called 51 time(s), ask2 called 8 time(s)
Test #15:
score: 10
Accepted
time: 0ms
memory: 5808kb
input:
6 35 384 45 876729193
output:
1 18 6
result:
points 1.0 correct, ask1 called 18 time(s), ask2 called 6 time(s)
Test #16:
score: 10
Accepted
time: 1ms
memory: 5856kb
input:
10 98 640 45 140960448
output:
1 72 12
result:
points 1.0 correct, ask1 called 72 time(s), ask2 called 12 time(s)
Test #17:
score: 10
Accepted
time: 1ms
memory: 5928kb
input:
8 36 512 45 478966295
output:
1 30 6
result:
points 1.0 correct, ask1 called 30 time(s), ask2 called 6 time(s)
Test #18:
score: 10
Accepted
time: 1ms
memory: 5828kb
input:
8 9 512 45 81170628
output:
1 61 9
result:
points 1.0 correct, ask1 called 61 time(s), ask2 called 9 time(s)
Test #19:
score: 10
Accepted
time: 3ms
memory: 5840kb
input:
6 20 384 45 419176475
output:
1 17 7
result:
points 1.0 correct, ask1 called 17 time(s), ask2 called 7 time(s)
Test #20:
score: 10
Accepted
time: 1ms
memory: 5820kb
input:
6 23 384 45 757149553
output:
1 27 8
result:
points 1.0 correct, ask1 called 27 time(s), ask2 called 8 time(s)
Subtask #2:
score: 20
Acceptable Answer
Test #21:
score: 90
Accepted
time: 702ms
memory: 100032kb
input:
1998 997469 511488 45 691176210
output:
1 28628 19
result:
points 1.0 correct, ask1 called 28628 time(s), ask2 called 19 time(s)
Test #22:
score: 90
Accepted
time: 789ms
memory: 100544kb
input:
1997 250682 511232 45 1029182057
output:
1 28377 29
result:
points 1.0 correct, ask1 called 28377 time(s), ask2 called 29 time(s)
Test #23:
score: 90
Accepted
time: 747ms
memory: 101288kb
input:
2000 1742216 512000 45 293413312
output:
1 41166 28
result:
points 1.0 correct, ask1 called 41166 time(s), ask2 called 28 time(s)
Test #24:
score: 90
Accepted
time: 680ms
memory: 100236kb
input:
1996 2394420 510976 45 631419158
output:
1 25984 21
result:
points 1.0 correct, ask1 called 25984 time(s), ask2 called 21 time(s)
Test #25:
score: 90
Accepted
time: 743ms
memory: 100412kb
input:
1998 3398507 511488 45 969425005
output:
1 21294 30
result:
points 1.0 correct, ask1 called 21294 time(s), ask2 called 30 time(s)
Test #26:
score: 90
Accepted
time: 891ms
memory: 100296kb
input:
1998 574252 511488 45 571662106
output:
1 42021 30
result:
points 1.0 correct, ask1 called 42021 time(s), ask2 called 30 time(s)
Test #27:
score: 90
Accepted
time: 687ms
memory: 100408kb
input:
1996 1162097 510976 45 909635185
output:
1 20212 23
result:
points 1.0 correct, ask1 called 20212 time(s), ask2 called 23 time(s)
Test #28:
score: 90
Accepted
time: 689ms
memory: 101320kb
input:
1999 1287929 511744 45 173899208
output:
1 29916 25
result:
points 1.0 correct, ask1 called 29916 time(s), ask2 called 25 time(s)
Test #29:
score: 20
Acceptable Answer
time: 907ms
memory: 100664kb
input:
1996 513076 510976 45 511839519
output:
1 45646 40
result:
points 0.22222222220 correct, ask1 called 45646 time(s), ask2 called 40 time(s)
Test #30:
score: 65
Acceptable Answer
time: 827ms
memory: 100628kb
input:
1999 2359752 511744 45 849845365
output:
1 35897 35
result:
points 0.72222222220 correct, ask1 called 35897 time(s), ask2 called 35 time(s)
Test #31:
score: 90
Accepted
time: 764ms
memory: 99624kb
input:
1996 1905307 510976 45 114109388
output:
1 20473 31
result:
points 1.0 correct, ask1 called 20473 time(s), ask2 called 31 time(s)
Test #32:
score: 90
Accepted
time: 655ms
memory: 100556kb
input:
1999 3464342 511744 45 452082467
output:
1 23056 21
result:
points 1.0 correct, ask1 called 23056 time(s), ask2 called 21 time(s)
Test #33:
score: 90
Accepted
time: 741ms
memory: 99876kb
input:
1997 3041161 511232 45 790088314
output:
1 34664 30
result:
points 1.0 correct, ask1 called 34664 time(s), ask2 called 30 time(s)
Test #34:
score: 90
Accepted
time: 794ms
memory: 100832kb
input:
1999 605699 511744 45 54319568
output:
1 35574 28
result:
points 1.0 correct, ask1 called 35574 time(s), ask2 called 28 time(s)
Test #35:
score: 90
Accepted
time: 825ms
memory: 99588kb
input:
2000 3411048 512000 45 392325415
output:
1 42713 33
result:
points 1.0 correct, ask1 called 42713 time(s), ask2 called 33 time(s)
Test #36:
score: 90
Accepted
time: 707ms
memory: 99416kb
input:
1999 1677521 511744 45 730331262
output:
1 25947 28
result:
points 1.0 correct, ask1 called 25947 time(s), ask2 called 28 time(s)
Test #37:
score: 65
Acceptable Answer
time: 813ms
memory: 101032kb
input:
1997 1645949 511232 45 1068271572
output:
1 33543 35
result:
points 0.72222222220 correct, ask1 called 33543 time(s), ask2 called 35 time(s)
Test #38:
score: 90
Accepted
time: 735ms
memory: 99792kb
input:
2000 1395508 512000 45 670508674
output:
1 30724 24
result:
points 1.0 correct, ask1 called 30724 time(s), ask2 called 24 time(s)
Test #39:
score: 90
Accepted
time: 813ms
memory: 100460kb
input:
2000 1045422 512000 45 1008514521
output:
1 42331 29
result:
points 1.0 correct, ask1 called 42331 time(s), ask2 called 29 time(s)
Test #40:
score: 90
Accepted
time: 751ms
memory: 100020kb
input:
2000 2404123 512000 45 272745775
output:
1 30320 30
result:
points 1.0 correct, ask1 called 30320 time(s), ask2 called 30 time(s)
Test #41:
score: 20
Acceptable Answer
time: 981ms
memory: 101320kb
input:
1998 2301912 511488 45 610751622
output:
1 53999 42
result:
points 0.22222222220 correct, ask1 called 53999 time(s), ask2 called 42 time(s)
Test #42:
score: 90
Accepted
time: 813ms
memory: 101664kb
input:
2000 3412738 512000 45 948757469
output:
1 35969 32
result:
points 1.0 correct, ask1 called 35969 time(s), ask2 called 32 time(s)
Test #43:
score: 90
Accepted
time: 736ms
memory: 99832kb
input:
1998 3469663 511488 45 212988724
output:
1 30395 29
result:
points 1.0 correct, ask1 called 30395 time(s), ask2 called 29 time(s)
Test #44:
score: 20
Acceptable Answer
time: 900ms
memory: 100796kb
input:
1996 3617351 510976 45 550961802
output:
1 41715 40
result:
points 0.22222222220 correct, ask1 called 41715 time(s), ask2 called 40 time(s)
Test #45:
score: 90
Accepted
time: 805ms
memory: 101032kb
input:
1998 710945 511488 45 888934881
output:
1 36635 28
result:
points 1.0 correct, ask1 called 36635 time(s), ask2 called 28 time(s)
Test #46:
score: 90
Accepted
time: 683ms
memory: 99788kb
input:
1999 2333740 511744 45 153198904
output:
1 27317 29
result:
points 1.0 correct, ask1 called 27317 time(s), ask2 called 29 time(s)
Test #47:
score: 90
Accepted
time: 767ms
memory: 99796kb
input:
1998 1878695 511488 45 491171982
output:
1 32133 32
result:
points 1.0 correct, ask1 called 32133 time(s), ask2 called 32 time(s)
Test #48:
score: 90
Accepted
time: 739ms
memory: 101088kb
input:
1997 3590574 511232 45 93441852
output:
1 28667 28
result:
points 1.0 correct, ask1 called 28667 time(s), ask2 called 28 time(s)
Test #49:
score: 65
Acceptable Answer
time: 843ms
memory: 99832kb
input:
1996 1801543 510976 45 431414931
output:
1 42418 35
result:
points 0.72222222220 correct, ask1 called 42418 time(s), ask2 called 35 time(s)
Test #50:
score: 90
Accepted
time: 749ms
memory: 101060kb
input:
1999 3672188 511744 45 769420777
output:
1 39338 30
result:
points 1.0 correct, ask1 called 39338 time(s), ask2 called 30 time(s)
Test #51:
score: 90
Accepted
time: 789ms
memory: 100944kb
input:
1997 1535960 383424 38 726700757
output:
1 44210 30
result:
points 1.0 correct, ask1 called 44210 time(s), ask2 called 30 time(s)
Test #52:
score: 90
Accepted
time: 698ms
memory: 100876kb
input:
1999 3382611 383808 38 1064673836
output:
1 28035 26
result:
points 1.0 correct, ask1 called 28035 time(s), ask2 called 26 time(s)
Test #53:
score: 90
Accepted
time: 852ms
memory: 100808kb
input:
1999 2544646 383808 38 328937859
output:
1 41875 33
result:
points 1.0 correct, ask1 called 41875 time(s), ask2 called 33 time(s)
Test #54:
score: 90
Accepted
time: 773ms
memory: 99552kb
input:
2000 3759384 384000 38 666910937
output:
1 34810 28
result:
points 1.0 correct, ask1 called 34810 time(s), ask2 called 28 time(s)
Test #55:
score: 90
Accepted
time: 835ms
memory: 100508kb
input:
2000 767997 384000 38 269148039
output:
1 46211 33
result:
points 1.0 correct, ask1 called 46211 time(s), ask2 called 33 time(s)
Test #56:
score: 90
Accepted
time: 699ms
memory: 99824kb
input:
1997 1437146 383424 38 607153886
output:
1 34579 25
result:
points 1.0 correct, ask1 called 34579 time(s), ask2 called 25 time(s)
Test #57:
score: 90
Accepted
time: 826ms
memory: 99412kb
input:
2000 1776612 384000 38 945159732
output:
1 40555 33
result:
points 1.0 correct, ask1 called 40555 time(s), ask2 called 33 time(s)
Test #58:
score: 40
Acceptable Answer
time: 882ms
memory: 100720kb
input:
1998 2265321 383616 38 209358219
output:
1 46841 38
result:
points 0.44444444440 correct, ask1 called 46841 time(s), ask2 called 38 time(s)
Test #59:
score: 90
Accepted
time: 670ms
memory: 100336kb
input:
1997 1854922 383424 38 547364066
output:
1 28980 23
result:
points 1.0 correct, ask1 called 28980 time(s), ask2 called 23 time(s)
Test #60:
score: 65
Acceptable Answer
time: 820ms
memory: 100176kb
input:
1998 3465840 383616 38 885337145
output:
1 34425 35
result:
points 0.72222222220 correct, ask1 called 34425 time(s), ask2 called 35 time(s)
Test #61:
score: 90
Accepted
time: 698ms
memory: 100620kb
input:
2000 2052285 384000 38 149601167
output:
1 30760 24
result:
points 1.0 correct, ask1 called 30760 time(s), ask2 called 24 time(s)
Test #62:
score: 90
Accepted
time: 790ms
memory: 100552kb
input:
1998 674354 383616 38 487574246
output:
1 34024 31
result:
points 1.0 correct, ask1 called 34024 time(s), ask2 called 31 time(s)
Test #63:
score: 90
Accepted
time: 697ms
memory: 99468kb
input:
1996 3620340 383232 38 825580093
output:
1 35393 29
result:
points 1.0 correct, ask1 called 35393 time(s), ask2 called 29 time(s)
Test #64:
score: 20
Acceptable Answer
time: 852ms
memory: 100452kb
input:
1998 1874872 383616 38 89844115
output:
1 43903 40
result:
points 0.22222222220 correct, ask1 called 43903 time(s), ask2 called 40 time(s)
Test #65:
score: 90
Accepted
time: 812ms
memory: 100460kb
input:
1996 995786 383232 38 427817194
output:
1 41196 34
result:
points 1.0 correct, ask1 called 41196 time(s), ask2 called 34 time(s)
Test #66:
score: 90
Accepted
time: 720ms
memory: 99896kb
input:
1996 2420784 383232 38 30021528
output:
1 30824 26
result:
points 1.0 correct, ask1 called 30824 time(s), ask2 called 26 time(s)
Test #67:
score: 90
Accepted
time: 759ms
memory: 100408kb
input:
1999 3356599 383808 38 368027374
output:
1 41408 26
result:
points 1.0 correct, ask1 called 41408 time(s), ask2 called 26 time(s)
Test #68:
score: 90
Accepted
time: 727ms
memory: 100428kb
input:
1999 2485867 383808 38 706033221
output:
1 26252 25
result:
points 1.0 correct, ask1 called 26252 time(s), ask2 called 25 time(s)
Test #69:
score: 90
Accepted
time: 680ms
memory: 101300kb
input:
1997 2470380 383424 38 1044006300
output:
1 22361 26
result:
points 1.0 correct, ask1 called 22361 time(s), ask2 called 26 time(s)
Test #70:
score: 90
Accepted
time: 686ms
memory: 99316kb
input:
1996 1188460 383232 38 308270323
output:
1 29063 24
result:
points 1.0 correct, ask1 called 29063 time(s), ask2 called 24 time(s)
Test #71:
score: 90
Accepted
time: 730ms
memory: 99824kb
input:
1997 2799645 383424 38 646243401
output:
1 38500 28
result:
points 1.0 correct, ask1 called 38500 time(s), ask2 called 28 time(s)
Test #72:
score: 90
Accepted
time: 778ms
memory: 99776kb
input:
1999 699046 383808 38 984249248
output:
1 36920 33
result:
points 1.0 correct, ask1 called 36920 time(s), ask2 called 33 time(s)
Test #73:
score: 90
Accepted
time: 752ms
memory: 100476kb
input:
1999 3857083 383808 38 248447735
output:
1 29148 34
result:
points 1.0 correct, ask1 called 29148 time(s), ask2 called 34 time(s)
Test #74:
score: 90
Accepted
time: 704ms
memory: 100936kb
input:
2000 1079818 384000 38 586453581
output:
1 30464 25
result:
points 1.0 correct, ask1 called 30464 time(s), ask2 called 25 time(s)
Test #75:
score: 90
Accepted
time: 806ms
memory: 100544kb
input:
1997 1404432 383424 38 924459428
output:
1 38471 31
result:
points 1.0 correct, ask1 called 38471 time(s), ask2 called 31 time(s)
Test #76:
score: 90
Accepted
time: 880ms
memory: 100952kb
input:
1997 2700831 383424 38 526696530
output:
1 36015 30
result:
points 1.0 correct, ask1 called 36015 time(s), ask2 called 30 time(s)
Test #77:
score: 40
Acceptable Answer
time: 861ms
memory: 100220kb
input:
2000 3097047 384000 38 864669608
output:
1 38381 37
result:
points 0.44444444440 correct, ask1 called 38381 time(s), ask2 called 37 time(s)
Test #78:
score: 90
Accepted
time: 674ms
memory: 100972kb
input:
1998 3569764 383616 38 128933631
output:
1 29479 19
result:
points 1.0 correct, ask1 called 29479 time(s), ask2 called 19 time(s)
Test #79:
score: 90
Accepted
time: 712ms
memory: 100664kb
input:
1998 2103877 383616 38 466906710
output:
1 28843 24
result:
points 1.0 correct, ask1 called 28843 time(s), ask2 called 24 time(s)
Test #80:
score: 90
Accepted
time: 850ms
memory: 101168kb
input:
1998 778278 383616 38 804912557
output:
1 40483 28
result:
points 1.0 correct, ask1 called 40483 time(s), ask2 called 28 time(s)
Test #81:
score: 90
Accepted
time: 686ms
memory: 100092kb
input:
2000 2961353 256000 36 853017067
output:
1 27466 27
result:
points 1.0 correct, ask1 called 27466 time(s), ask2 called 27 time(s)
Test #82:
score: 90
Accepted
time: 720ms
memory: 101016kb
input:
1996 2578498 255488 36 117281089
output:
1 32414 25
result:
points 1.0 correct, ask1 called 32414 time(s), ask2 called 25 time(s)
Test #83:
score: 90
Accepted
time: 727ms
memory: 100688kb
input:
1996 3937961 255488 36 793260015
output:
1 22526 27
result:
points 1.0 correct, ask1 called 22526 time(s), ask2 called 27 time(s)
Test #84:
score: 90
Accepted
time: 714ms
memory: 99920kb
input:
1998 2345897 255744 36 57491270
output:
1 29779 29
result:
points 1.0 correct, ask1 called 29779 time(s), ask2 called 29 time(s)
Test #85:
score: 90
Accepted
time: 798ms
memory: 100184kb
input:
1996 1378943 255488 36 395497116
output:
1 35707 34
result:
points 1.0 correct, ask1 called 35707 time(s), ask2 called 34 time(s)
Test #86:
score: 90
Accepted
time: 781ms
memory: 99968kb
input:
1999 2734233 255872 36 733502963
output:
1 40615 34
result:
points 1.0 correct, ask1 called 40615 time(s), ask2 called 34 time(s)
Test #87:
score: 90
Accepted
time: 748ms
memory: 99932kb
input:
1999 1863500 255872 36 1071476042
output:
1 28986 31
result:
points 1.0 correct, ask1 called 28986 time(s), ask2 called 31 time(s)
Test #88:
score: 90
Accepted
time: 788ms
memory: 99448kb
input:
1999 3838824 255872 36 335740064
output:
1 36815 34
result:
points 1.0 correct, ask1 called 36815 time(s), ask2 called 34 time(s)
Test #89:
score: 90
Accepted
time: 697ms
memory: 100528kb
input:
1996 146619 255488 36 673680375
output:
1 30081 24
result:
points 1.0 correct, ask1 called 30081 time(s), ask2 called 24 time(s)
Test #90:
score: 90
Accepted
time: 779ms
memory: 100352kb
input:
1997 2897460 255616 36 1011686222
output:
1 30394 28
result:
points 1.0 correct, ask1 called 30394 time(s), ask2 called 28 time(s)
Test #91:
score: 90
Accepted
time: 785ms
memory: 100576kb
input:
2000 3588803 256000 36 275917477
output:
1 41769 31
result:
points 1.0 correct, ask1 called 41769 time(s), ask2 called 31 time(s)
Test #92:
score: 40
Acceptable Answer
time: 822ms
memory: 99536kb
input:
1999 2052003 255872 36 613923323
output:
1 27340 37
result:
points 0.44444444440 correct, ask1 called 27340 time(s), ask2 called 37 time(s)
Test #93:
score: 90
Accepted
time: 771ms
memory: 100076kb
input:
2000 597416 256000 36 951929170
output:
1 33439 30
result:
points 1.0 correct, ask1 called 33439 time(s), ask2 called 30 time(s)
Test #94:
score: 65
Acceptable Answer
time: 899ms
memory: 99640kb
input:
1997 502346 255616 36 216160425
output:
1 38370 36
result:
points 0.72222222220 correct, ask1 called 38370 time(s), ask2 called 36 time(s)
Test #95:
score: 90
Accepted
time: 727ms
memory: 101284kb
input:
1998 1639752 255744 36 892139350
output:
1 28091 25
result:
points 1.0 correct, ask1 called 28091 time(s), ask2 called 25 time(s)
Test #96:
score: 65
Acceptable Answer
time: 833ms
memory: 100584kb
input:
2000 2614645 256000 36 156370605
output:
1 44083 36
result:
points 0.72222222220 correct, ask1 called 44083 time(s), ask2 called 36 time(s)
Test #97:
score: 90
Accepted
time: 765ms
memory: 99912kb
input:
1998 2807503 255744 36 494343684
output:
1 33804 24
result:
points 1.0 correct, ask1 called 33804 time(s), ask2 called 24 time(s)
Test #98:
score: 90
Accepted
time: 792ms
memory: 101424kb
input:
2000 3623260 256000 36 832349530
output:
1 34278 30
result:
points 1.0 correct, ask1 called 34278 time(s), ask2 called 30 time(s)
Test #99:
score: 90
Accepted
time: 641ms
memory: 100612kb
input:
1998 16016 255744 36 96613553
output:
1 18603 19
result:
points 1.0 correct, ask1 called 18603 time(s), ask2 called 19 time(s)
Test #100:
score: 90
Accepted
time: 667ms
memory: 100172kb
input:
1996 499201 255488 36 434586632
output:
1 22679 26
result:
points 1.0 correct, ask1 called 22679 time(s), ask2 called 26 time(s)
Test #101:
score: 90
Accepted
time: 839ms
memory: 99768kb
input:
1996 2183083 255488 36 772592479
output:
1 43865 28
result:
points 1.0 correct, ask1 called 43865 time(s), ask2 called 28 time(s)
Test #102:
score: 90
Accepted
time: 820ms
memory: 99480kb
input:
1996 1924199 255488 36 36823733
output:
1 37796 28
result:
points 1.0 correct, ask1 called 37796 time(s), ask2 called 28 time(s)
Test #103:
score: 90
Accepted
time: 685ms
memory: 100972kb
input:
1998 2417054 255744 36 374829580
output:
1 26237 24
result:
points 1.0 correct, ask1 called 26237 time(s), ask2 called 24 time(s)
Test #104:
score: 90
Accepted
time: 865ms
memory: 101176kb
input:
1999 966756 255872 36 712769891
output:
1 39995 28
result:
points 1.0 correct, ask1 called 39995 time(s), ask2 called 28 time(s)
Test #105:
score: 90
Accepted
time: 784ms
memory: 101040kb
input:
1997 271949 255616 36 1050775738
output:
1 28576 28
result:
points 1.0 correct, ask1 called 28576 time(s), ask2 called 28 time(s)
Test #106:
score: 90
Accepted
time: 787ms
memory: 100476kb
input:
1996 2634642 255488 36 315039760
output:
1 31325 31
result:
points 1.0 correct, ask1 called 31325 time(s), ask2 called 31 time(s)
Test #107:
score: 65
Acceptable Answer
time: 828ms
memory: 101352kb
input:
1997 1601116 255616 36 653012839
output:
1 40776 36
result:
points 0.72222222220 correct, ask1 called 40776 time(s), ask2 called 36 time(s)
Test #108:
score: 20
Acceptable Answer
time: 853ms
memory: 99636kb
input:
1999 1155259 255872 36 255249940
output:
1 41308 39
result:
points 0.22222222220 correct, ask1 called 41308 time(s), ask2 called 39 time(s)
Test #109:
score: 90
Accepted
time: 760ms
memory: 100588kb
input:
1999 284526 255872 36 593255787
output:
1 33375 27
result:
points 1.0 correct, ask1 called 33375 time(s), ask2 called 27 time(s)
Test #110:
score: 90
Accepted
time: 763ms
memory: 100324kb
input:
1997 173135 255616 36 931228866
output:
1 37655 34
result:
points 1.0 correct, ask1 called 37655 time(s), ask2 called 34 time(s)
Test #111:
score: 90
Accepted
time: 703ms
memory: 100460kb
input:
1996 2189413 127744 34 618447205
output:
1 28619 28
result:
points 1.0 correct, ask1 called 28619 time(s), ask2 called 28 time(s)
Test #112:
score: 90
Accepted
time: 719ms
memory: 100784kb
input:
1999 3781216 127936 34 956453051
output:
1 27901 27
result:
points 1.0 correct, ask1 called 27901 time(s), ask2 called 27 time(s)
Test #113:
score: 90
Accepted
time: 804ms
memory: 100592kb
input:
1996 3614412 127744 34 220684306
output:
1 40128 30
result:
points 1.0 correct, ask1 called 40128 time(s), ask2 called 30 time(s)
Test #114:
score: 90
Accepted
time: 729ms
memory: 101584kb
input:
1999 889805 127936 34 558690153
output:
1 32941 31
result:
points 1.0 correct, ask1 called 32941 time(s), ask2 called 31 time(s)
Test #115:
score: 90
Accepted
time: 816ms
memory: 100292kb
input:
1996 989857 127744 34 896663231
output:
1 36477 34
result:
points 1.0 correct, ask1 called 36477 time(s), ask2 called 34 time(s)
Test #116:
score: 90
Accepted
time: 661ms
memory: 99648kb
input:
1997 1962823 127808 34 498867565
output:
1 23952 26
result:
points 1.0 correct, ask1 called 23952 time(s), ask2 called 26 time(s)
Test #117:
score: 90
Accepted
time: 729ms
memory: 100696kb
input:
1999 3098986 127936 34 836873412
output:
1 36911 29
result:
points 1.0 correct, ask1 called 36911 time(s), ask2 called 29 time(s)
Test #118:
score: 90
Accepted
time: 812ms
memory: 101148kb
input:
2000 1712383 128000 34 101137434
output:
1 39523 32
result:
points 1.0 correct, ask1 called 39523 time(s), ask2 called 32 time(s)
Test #119:
score: 90
Accepted
time: 797ms
memory: 101276kb
input:
1997 1413465 127808 34 439110513
output:
1 37080 28
result:
points 1.0 correct, ask1 called 37080 time(s), ask2 called 28 time(s)
Test #120:
score: 90
Accepted
time: 668ms
memory: 100644kb
input:
1997 567610 127808 34 777116360
output:
1 23201 27
result:
points 1.0 correct, ask1 called 23201 time(s), ask2 called 27 time(s)
Test #121:
score: 90
Accepted
time: 690ms
memory: 100040kb
input:
1998 2586018 127872 34 41347615
output:
1 37912 27
result:
points 1.0 correct, ask1 called 37912 time(s), ask2 called 27 time(s)
Test #122:
score: 20
Acceptable Answer
time: 886ms
memory: 99608kb
input:
2000 3696844 128000 34 379353461
output:
1 45362 41
result:
points 0.22222222220 correct, ask1 called 45362 time(s), ask2 called 41 time(s)
Test #123:
score: 90
Accepted
time: 815ms
memory: 101360kb
input:
2000 3346757 128000 34 717293772
output:
1 44046 30
result:
points 1.0 correct, ask1 called 44046 time(s), ask2 called 30 time(s)
Test #124:
score: 90
Accepted
time: 782ms
memory: 100720kb
input:
2000 738225 128000 34 1055299619
output:
1 38557 31
result:
points 1.0 correct, ask1 called 38557 time(s), ask2 called 31 time(s)
Test #125:
score: 90
Accepted
time: 612ms
memory: 99684kb
input:
1998 995051 127872 34 319563641
output:
1 17304 17
result:
points 1.0 correct, ask1 called 17304 time(s), ask2 called 17 time(s)
Test #126:
score: 90
Accepted
time: 706ms
memory: 100676kb
input:
1996 1342439 127744 34 657536720
output:
1 27026 31
result:
points 1.0 correct, ask1 called 27026 time(s), ask2 called 31 time(s)
Test #127:
score: 40
Acceptable Answer
time: 795ms
memory: 99684kb
input:
1998 2195569 127872 34 995542567
output:
1 28274 37
result:
points 0.44444444440 correct, ask1 called 28274 time(s), ask2 called 37 time(s)
Test #128:
score: 90
Accepted
time: 763ms
memory: 99476kb
input:
1998 3396088 127872 34 597779668
output:
1 38146 32
result:
points 1.0 correct, ask1 called 38146 time(s), ask2 called 32 time(s)
Test #129:
score: 90
Accepted
time: 666ms
memory: 101164kb
input:
1996 2085649 127744 34 935752747
output:
1 26653 22
result:
points 1.0 correct, ask1 called 26653 time(s), ask2 called 22 time(s)
Test #130:
score: 90
Accepted
time: 766ms
memory: 100120kb
input:
1999 3989063 127936 34 199984002
output:
1 33864 28
result:
points 1.0 correct, ask1 called 33864 time(s), ask2 called 28 time(s)
Test #131:
score: 90
Accepted
time: 742ms
memory: 99904kb
input:
1996 3477880 127744 34 537989849
output:
1 30616 29
result:
points 1.0 correct, ask1 called 30616 time(s), ask2 called 29 time(s)
Test #132:
score: 90
Accepted
time: 757ms
memory: 100724kb
input:
1999 1064883 127936 34 875962927
output:
1 33550 32
result:
points 1.0 correct, ask1 called 33550 time(s), ask2 called 32 time(s)
Test #133:
score: 90
Accepted
time: 675ms
memory: 100828kb
input:
1999 194151 127936 34 140226950
output:
1 29681 29
result:
points 1.0 correct, ask1 called 29681 time(s), ask2 called 29 time(s)
Test #134:
score: 90
Accepted
time: 750ms
memory: 100024kb
input:
1999 2202242 127936 34 478200029
output:
1 33381 25
result:
points 1.0 correct, ask1 called 33381 time(s), ask2 called 25 time(s)
Test #135:
score: 40
Acceptable Answer
time: 913ms
memory: 100740kb
input:
1997 1962877 127808 34 816205876
output:
1 58131 37
result:
points 0.44444444440 correct, ask1 called 58131 time(s), ask2 called 37 time(s)
Test #136:
score: 90
Accepted
time: 648ms
memory: 101144kb
input:
1997 1084254 127808 34 80437130
output:
1 18973 24
result:
points 1.0 correct, ask1 called 18973 time(s), ask2 called 24 time(s)
Test #137:
score: 90
Accepted
time: 672ms
memory: 100432kb
input:
2000 1991435 128000 34 418442977
output:
1 20155 23
result:
points 1.0 correct, ask1 called 20155 time(s), ask2 called 23 time(s)
Test #138:
score: 65
Acceptable Answer
time: 854ms
memory: 100616kb
input:
1999 382653 127936 34 756448824
output:
1 41938 36
result:
points 0.72222222220 correct, ask1 called 41938 time(s), ask2 called 36 time(s)
Test #139:
score: 90
Accepted
time: 664ms
memory: 100392kb
input:
2000 3032817 128000 34 20647310
output:
1 29654 19
result:
points 1.0 correct, ask1 called 29654 time(s), ask2 called 19 time(s)
Test #140:
score: 65
Acceptable Answer
time: 823ms
memory: 99876kb
input:
1997 1864063 127808 34 696626236
output:
1 38282 36
result:
points 0.72222222220 correct, ask1 called 38282 time(s), ask2 called 36 time(s)