結果
問題 | No.513 宝探し2 |
ユーザー |
![]() |
提出日時 | 2017-05-05 22:45:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,391 bytes |
コンパイル時間 | 1,587 ms |
コンパイル使用メモリ | 166,036 KB |
実行使用メモリ | 39,888 KB |
最終ジャッジ日時 | 2024-07-17 00:59:08 |
合計ジャッジ時間 | 7,958 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 11 |
ソースコード
// clang-format off#include <bits/stdc++.h>#define int long long int#define main signed main()#define bye return 0#define loop(i, a, n) for (int i = (a); i < (n); i++)#define rep(i, n) loop(i, 0, n)#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)#define all(v) (v).begin(), (v).end()#define prec(n) fixed << setprecision(n)#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl#define clr(x, a) memset(x, a, sizeof(x))#define sum(v) accumulate(all(v), 0)#define stlice(from, to) substr(from, (to) - (from) + 1)#define odd(n) ((n) % 2)#define even(n) (!odd(n))#define INF 1000000000#define MOD 1000000007#define pb push_back#define mp make_pair#define mt make_tuple#define fi first#define se second#define vi vector<int>#define vb vector<bool>#define vc vector<char>using namespace std;// clang-format onmain {int x1 = 0, x2 = 100000, y1 = 0, y2 = 100000;while (true) {int t, s;cout << x1 << ' ' << y1 << endl;cin >> t;cout << x2 << ' ' << y2 << endl;cin >> s;if (t == 0) {cout << x1 << ' ' << y1 << endl;bye;}if (s == 0) {cout << x2 << ' ' << y2 << endl;bye;}if (t <= s) {x2 = x1 + (x2 - x1) / 2;y2 = y1 + (y2 - y1) / 2;} else {x1 = x1 + (x2 - x1) / 2;y1 = y1 + (y2 - y1) / 2;}}bye;}