QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#223946 | #5471. Interactive Number Guessing | ivaziva | WA | 0ms | 3716kb | C++14 | 449b | 2023-10-22 22:26:52 | 2023-10-22 22:26:53 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long l=0;
long long r=1000000000000000000-1;
long long rez=-1;
while (l<=r)
{
long long mid=(l+r)/2;
cout<<"query "<<mid<<endl;
long long sum; cin>>sum;
if (sum==9*18)
{
rez=mid;
r=mid-1;
}
else l=mid+1;
}
cout<<"answer "<<1000000000000000000-1-rez;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3716kb
input:
10 17 25 29 40 41 46 53 61 56 67 86 100 98 97 92 103 104 96 105 105 92 108 111 122 132 119 121 122 132 123 137 126 125 133 128 126 125 124 133 137 144 143 142 133 142 137 144 147 144 156 144 3 14 15 11 9 12 5 6
output:
query 499999999999999999 query 749999999999999999 query 874999999999999999 query 937499999999999999 query 968749999999999999 query 984374999999999999 query 992187499999999999 query 996093749999999999 query 998046874999999999 query 999023437499999999 query 999511718749999999 query 999755859374999999 ...
result:
wrong answer invalid guess range in query_count=60: 1000000000000000000