結果
問題 |
No.514 宝探し3
|
ユーザー |
![]() |
提出日時 | 2024-09-30 01:46:10 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 836 ms |
コンパイル使用メモリ | 91,276 KB |
実行使用メモリ | 25,460 KB |
平均クエリ数 | 2.75 |
最終ジャッジ日時 | 2024-09-30 01:46:14 |
合計ジャッジ時間 | 3,540 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 10 |
ソースコード
#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(1000000000,0); // x + y = k // 100000 - x + y = kk ll y = (k+kk) / 2; ll x = k - y; ask(x,y); }