結果
問題 |
No.514 宝探し3
|
ユーザー |
![]() |
提出日時 | 2024-09-30 01:47:05 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 456 bytes |
コンパイル時間 | 1,060 ms |
コンパイル使用メモリ | 91,232 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 2.75 |
最終ジャッジ日時 | 2024-09-30 01:47:08 |
合計ジャッジ時間 | 2,072 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> using namespace std; using ll = long long; ll ask(ll x,ll y){ cout<<x<<" "<<y<<endl; ll d; cin>>d; if(d==0) exit(0); return d; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll k = ask(0,0); ll kk = ask(1000000000ll,0); // x + y = k // 100000 - x + y = kk kk -= 1000000000ll; ll y = (k+kk) / 2; ll x = k - y; ask(x,y); }