結果
問題 | No.3011 あ、俺こいつの役やりたい! |
ユーザー |
|
提出日時 | 2025-01-25 12:36:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 2,017 ms |
コンパイル使用メモリ | 191,308 KB |
実行使用メモリ | 25,856 KB |
平均クエリ数 | 31.00 |
最終ジャッジ日時 | 2025-01-25 22:05:27 |
合計ジャッジ時間 | 6,014 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 44 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int ok = 0, ng = 1 << 30; while(ok + 1 < ng){ int mid = (ok + ng) / 2; int res; cout << mid << endl; cin >> res; (res == 1 ? ok : ng) = mid; } cout << ok << endl; }