| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 47478 | sampriti | Cup of Jamshid (IOI17_cup) | C++17 | 3 ms | 376 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cup.h"
#include <algorithm>
using namespace std;
vector<int> find_cup() {
  int diff = ask_shahrasb(5e8, 5e8);
  int ans = 0;
  for(int i = 0; i <= 28; i++) {
    if(ask_shahrasb(5e8 + (1 << i), 5e8) != (diff ^ (1 << i))) {
      ans += 1 << i;
    }
  }
  int x_1 = 5e8 - ans;
  int y_1 = 5e8 - (ans ^ diff);
  ans += 1 << 29;
  int x_2 = 5e8 - ans;
  int y_2 = 5e8 - (ans ^ diff);
  int test_x = -100, test_y = -100 + (1 << 29); // some random numbers
  if((abs(test_x - x_1) ^ abs(test_y - y_1)) == ask_shahrasb(test_x, test_y)) {
    return {x_1, y_1};
  }
  else {
    return {x_2, y_2};
  }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
