# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
905285 | rainboy | Cup of Jamshid (IOI17_cup) | C++17 | 1 ms | 348 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cup.h"
using namespace std;
typedef vector<int> vi;
const int X = 1000000000, L = 30;
vi find_cup() {
int d = ask_shahrasb(-X, -X), x = -X;
for (int l = 0; l < L; l++)
if ((ask_shahrasb(-X + (1 << l), -X) ^ d) == (1 << l))
x += (1 << l);
if (x < -X / 2)
x += 1 << L;
int y = (d ^ x + X) - X;
return { x, y };
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |