# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
230184 | AngusRitossa | Cup of Jamshid (IOI17_cup) | C++14 | 5 ms | 384 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"
#include <bits/stdc++.h>
using namespace std;
vector<int> find_cup() {
int val = -1e9;
int xdiff = 0;
int res = ask_shahrasb(val, val);
for (int i = 0; i < 31; i++) {
int r = ask_shahrasb(val+(1 << i), val);
if (r == (res^(1 << i))) xdiff |= (1 << i);
}
int ydiff = res^xdiff;
int x = val+xdiff, y = val+ydiff;
return { x, y };
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |