結果

問題 No.3011 あ、俺こいつの役やりたい!
ユーザー mihhiael
提出日時 2025-01-25 12:42:07
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 599 bytes
コンパイル時間 975 ms
コンパイル使用メモリ 129,504 KB
実行使用メモリ 25,972 KB
平均クエリ数 11.61
最終ジャッジ日時 2025-01-25 22:07:42
合計ジャッジ時間 3,987 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <numeric>
#include <set>
#include <unordered_set>
#include <map>
#include <vector>
#include <string>
#include <deque>
#include <queue>
#include <iomanip>

using namespace std;
using ll  = long long;

void solve();

int main(void) {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	solve();
	return 0;
}

void solve() {
	ll ok = 1, ng = 1e9;
	for(intmax_t i=0;i<intmax_t(30);i++) {
		const ll mid =  midpoint(ok, ng);
		cout << mid << endl;
		ll r;
		cin >> r;
		if(r) return;
		ng = mid;
	}
}
0