| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 117195 | tjd229 | Cup of Jamshid (IOI17_cup) | C++14 | 3 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"
const int s = -1e9;
std::vector<int> find_cup() {
	int x = s, y = s;
	int diff = ask_shahrasb(x, y);
	int common = 0;
	int b = 1;
	int px = 0, py = 0;
	for (int i = 0; i < 31; ++i,b+=b) {
		int d = ask_shahrasb(x + b, y);
		if (diff&b) {
			if (diff -b==d) px += b;
			else py += b;
		}
		else if (diff + b == d) common += b;
	}
	x += px + common;
	y += py + common;
	return{x,y};
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
