QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#100477 | #5556. Diabolic Doofenshmirtz | PetroTarnavskyi# | WA | 2ms | 3364kb | C++17 | 675b | 2023-04-26 15:25:00 | 2023-04-26 15:25:01 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FOR(i, a, b) for (int i = (a); i<(b); ++i)
#define RFOR(i, b, a) for (int i = (b)-1; i>=(a); --i)
#define MP make_pair
#define PB push_back
#define F first
#define S second
typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
int main()
{
//ios::sync_with_stdio(false);
cin.tie(0);
LL l = 0, r = 1e12 + 47;
while (r - l > 1) {
LL m = (l + r) / 2;
cout << "? " << m << endl;
LL x;
cin >> x;
if (x == m) {
l = m;
}
else {
r = m;
}
}
cout << "! " << r << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3364kb
input:
13
output:
? 500000000023 ? 250000000011
result:
wrong answer Integer 250000000011 violates the range [500000000024, 1000000000000000001]