結果
問題 | No.514 宝探し3 |
ユーザー |
![]() |
提出日時 | 2017-05-05 23:17:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 515 bytes |
コンパイル時間 | 1,628 ms |
コンパイル使用メモリ | 167,460 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 5.00 |
最終ジャッジ日時 | 2024-07-16 13:24:42 |
合計ジャッジ時間 | 5,277 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 12 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int q(int x, int y) {cout << x << " " << y << endl;cout.flush();int res;cin >> res;return res;}int main() {cin.tie(0);ios::sync_with_stdio(false);int ans[2];for(int k = 0; k < 2; k++) {int a[2] = { 0, 0 };int r1 = q(a[0], a[1]);a[k] = 1e9;int r2 = q(a[0], a[1]);int d = abs(r1 - r2);if(r1 < r2) {ans[k] = (1e9 - d) / 2;}else {ans[k] = 1e9 - (1e9 - d) / 2;}}assert(q(ans[0], ans[1]));}