結果
| 問題 |
No.2962 Sum Bomb Bomber
|
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2024-11-16 15:58:20 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,780 bytes |
| コンパイル時間 | 5,336 ms |
| コンパイル使用メモリ | 308,144 KB |
| 実行使用メモリ | 25,448 KB |
| 平均クエリ数 | 187.09 |
| 最終ジャッジ日時 | 2024-11-16 15:58:57 |
| 合計ジャッジ時間 | 14,972 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 62 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
int 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;
}();
int64_t tmp = (1LL << 60);
for (int64_t nx : {x, x + 1})
{
for (int64_t ny : {y, y + 1})
{
cout << 1 << ' ' << nx << ' ' << ny << endl;
int64_t d;
cin >> d;
if (d < tmp)
{
x = nx;
y = ny;
tmp = d;
}
}
}
cout << 2 << ' ' << x << ' ' << y << endl;
return 0;
}
ldsyb