結果
問題 | No.2962 Sum Bomb Bomber |
ユーザー |
![]() |
提出日時 | 2024-11-16 15:55:53 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,416 bytes |
コンパイル時間 | 5,489 ms |
コンパイル使用メモリ | 307,892 KB |
実行使用メモリ | 25,580 KB |
平均クエリ数 | 183.09 |
最終ジャッジ日時 | 2024-11-16 15:56:17 |
合計ジャッジ時間 | 14,496 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 61 WA * 3 |
ソースコード
#include <bits/stdc++.h>using namespace std;using namespace chrono;#if __has_include(<atcoder/all>)#include <atcoder/all>using namespace atcoder;#endifint main(){int64_t n;cin >> n;int64_t x = [&]{int64_t l = -100000000, r = 100000000;while (2 < abs(l - r)){int64_t ml = (2 * l + r) / 3;int64_t mr = (l + 2 * r) / 3;int64_t dl, dr;cout << 1 << ' ' << ml << ' ' << 0 << endl;cin >> dl;cout << 1 << ' ' << mr << ' ' << 0 << endl;cin >> dr;if (dl < dr){r = mr;}else{l = ml;}}return l + 1;}();int64_t y = [&]{int64_t l = -100000000, r = 100000000;while (2 < abs(l - r)){int64_t ml = (2 * l + r) / 3;int64_t mr = (l + 2 * r) / 3;int64_t dl, dr;cout << 1 << ' ' << 0 << ' ' << ml << endl;cin >> dl;cout << 1 << ' ' << 0 << ' ' << mr << endl;cin >> dr;if (dl < dr){r = mr;}else{l = ml;}}return l + 1;}();cout << 2 << ' ' << x << ' ' << y << endl;return 0;}