Submission #464049

# Submission time Handle Problem Language Result Execution time Memory
464049 2021-08-12T10:07:29 Z amunduzbaev Cup of Jamshid (IOI17_cup) C++14
0 / 100
1 ms 204 KB
#include "bits/stdc++.h"
#include "cup.h"
#ifndef EVAL
#include "grader.cpp"
#endif

using namespace std;

int ask(int x, int y){
	return ask_shahrasb(x, y);
}

vector<int> find_cup(){
	int x = -5e8, y = -5e8;
	int r = ask(x, y), a = 0;
	//~ cout<<r<<" ";
	for(int i=0;i<30;i++){
		int rx = ask(x + (1ll << i), y);
		if(rx == (r ^ (1ll << i))) a |= (1 << i);
	}
	int b = r ^ a;
	//~ cout<<a<<" "<<b<<"\n";
	return {x + a, y + b};
}

/*

1
500000000 500000000

1
0 0

*/
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB wrong cup location