結果
問題 | No.514 宝探し3 |
ユーザー | 👑 jupiro |
提出日時 | 2020-07-11 05:25:23 |
言語 | C++17 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 1,305 bytes |
コンパイル時間 | 1,142 ms |
コンパイル使用メモリ | 125,704 KB |
実行使用メモリ | 24,168 KB |
平均クエリ数 | 2.75 |
最終ジャッジ日時 | 2023-09-24 03:51:06 |
合計ジャッジ時間 | 2,282 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
24,048 KB |
testcase_01 | AC | 21 ms
24,168 KB |
testcase_02 | AC | 21 ms
23,376 KB |
testcase_03 | AC | 20 ms
23,352 KB |
testcase_04 | AC | 22 ms
24,000 KB |
testcase_05 | AC | 20 ms
24,048 KB |
testcase_06 | AC | 20 ms
23,628 KB |
testcase_07 | AC | 19 ms
23,352 KB |
testcase_08 | AC | 21 ms
23,520 KB |
testcase_09 | AC | 23 ms
23,364 KB |
testcase_10 | AC | 20 ms
23,376 KB |
testcase_11 | AC | 20 ms
23,376 KB |
ソースコード
#include <cstdio> #include <iostream> #include <string> #include <sstream> #include <stack> #include <algorithm> #include <cmath> #include <queue> #include <map> #include <set> #include <cstdlib> #include <bitset> #include <tuple> #include <assert.h> #include <deque> #include <bitset> #include <iomanip> #include <limits> #include <chrono> #include <random> #include <array> #include <unordered_map> #include <functional> #include <complex> #include <numeric> template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } constexpr long long MAX = 5100000; constexpr long long INF = 1LL << 60; constexpr int inf = 1000000007; constexpr long long mod = 1000000007LL; //constexpr long long mod = 998244353LL; const long double PI = acos((long double)(-1)); using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; ll ask(ll x, ll y) { cout << x << " " << y << endl; ll res; cin >> res; if (res == 0) exit(0); return res; } int main() { /* cin.tie(nullptr); ios::sync_with_stdio(false); */ int n = inf - 7; int l1 = ask(0, 0); int l2 = ask(0, l1); ask(l2 / 2, l1 - l2 / 2); return 0; }