# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
126033 | claudy | Cup of Jamshid (IOI17_cup) | C++14 | 3 ms | 376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
# include "cup.h"
# include "bits/stdc++.h"
using namespace std;
# define ask ask_shahrasb
vector<int> find_cup() {
vector<int>ans(2);
int orig = ask(0,0);
int signx,signy;
if(ask((1 << 29),0) & (1 << 29)) signx = -1;
else signx = 1;
if(ask(0,(1 << 29)) & (1 << 29)) signy = -1;
else signy = 1;
int x = 0;
for(int i = 0;i < 29;i++)
{
if((orig ^ ask((1 << i) * -signx,0)) != (1 << i)) x += (1 << i);
}
int y = orig ^ x;
x *= signx;
y *= signy;
ans[0] = x;
ans[1] = y;
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |