結果
問題 |
No.513 宝探し2
|
ユーザー |
|
提出日時 | 2017-06-22 19:46:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 626 bytes |
コンパイル時間 | 904 ms |
コンパイル使用メモリ | 73,864 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 83.58 |
最終ジャッジ日時 | 2024-07-16 13:53:39 |
合計ジャッジ時間 | 3,243 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 10 |
ソースコード
#include<cstdio> #include <iostream> #include<algorithm> #include<string> #include<queue> #include<vector> #include<functional> #include<cmath> #include<map> #include<stack> #include<set> #include<numeric> using namespace std; typedef long long ll; typedef pair<int, int> Pr; int x = 100000; int y = 100000; int dy = 50000; int dx = 50000; int pre_d = 10000000; int main() { for (int i = 0; i < 100; i++) { cout << x << " " << y << endl; int d; cin >> d; if (d == 0)return 0; if (pre_d > d) { x -= dx; y -= dy; dx /= 2; dy /= 2; } else { x += dx; y += dy; } pre_d = d; } return 0; }