結果
問題 | No.246 質問と回答 |
ユーザー |
![]() |
提出日時 | 2025-02-07 00:56:03 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 3,691 ms |
コンパイル使用メモリ | 272,936 KB |
実行使用メモリ | 25,996 KB |
平均クエリ数 | 30.90 |
最終ジャッジ日時 | 2025-02-07 00:56:11 |
合計ジャッジ時間 | 7,667 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int l = 1, r = 1e9 + 7; while (r - l > 1) { int mid = (l + r) / 2; cout << "? " << mid << endl; int t; cin >> t; (t ? l : r) = mid; } cout << "! " << l << endl; return 0; }