結果
問題 |
No.513 宝探し2
|
ユーザー |
![]() |
提出日時 | 2017-05-06 00:00:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,006 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 55,932 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2024-07-16 13:30:05 |
合計ジャッジ時間 | 3,856 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 12 |
ソースコード
#include <iostream> using namespace std; int main(void){ int x=50000; int y=50000; int d1,d2,d3,d4; cout << x << y << endl; cin >> d1; if(d1==0) return 0; x = x+d1; cout << x << y << endl; cin >> d2; if(d2==0) return 0; if(d2<(2*d1)){ x = x-(d2/2); y = y+(d2/2); cout << x << y << endl; cin >> d3; if(d3==0) return 0; if(d3<d2){ x = x+(d3/2); y = y-(d3/2); cout << x << y << endl; cin >> d4; if(d4==0) return 0; } else{ y = y-d2; cout << x << y << endl; cin >> d4; if(d4==0) return 0; } } else{ x = 50000-d1; y = 50000; cout << x << y << endl; cin >> d2; if(d2==0) return 0; x = x+(d2/2); y = y+(d2/2); cout << x << y << endl; cin >> d3; if(d3==0) return 0; x = x-(d3/2); y = y-(d3/2); cout << x << y << endl; cin >> d4; if(d4==0) return 0; y = y-d2; cout << x << y << endl; cin >> d4; if(d4==0) return 0; } }