結果
| 問題 | No.513 宝探し2 |
| コンテスト | |
| ユーザー |
misora192
|
| 提出日時 | 2020-07-24 21:44:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 2,000 ms |
| コード長 | 387 bytes |
| 記録 | |
| コンパイル時間 | 1,656 ms |
| コンパイル使用メモリ | 165,584 KB |
| 実行使用メモリ | 25,476 KB |
| 平均クエリ数 | 2.83 |
| 最終ジャッジ日時 | 2024-07-17 02:50:02 |
| 合計ジャッジ時間 | 3,148 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=(0);i<(n);i++)
using namespace std;
typedef long long ll;
int ask(int x, int y){
cout << x << " " << y << endl;
int ret;
cin >> ret;
if(ret == 0) exit(0);
return ret;
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int a = ask(0, 0);
int b = ask(0, 1e7);
int x = (a + b - 1e7) / 2;
int y = a - x;
ask(x, y);
}
misora192