結果
| 問題 | No.2753 鳩の巣原理 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-10 21:43:15 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 144 ms / 2,000 ms |
| + 2µs | |
| コード長 | 493 bytes |
| 記録 | |
| コンパイル時間 | 61 ms |
| コンパイル使用メモリ | 82,664 KB |
| 実行使用メモリ | 56,768 KB |
| 平均クエリ数 | 11.00 |
| 最終ジャッジ日時 | 2026-10-05 01:40:49 |
| 合計ジャッジ時間 | 2,901 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
n = int(input())
cnt = []
class nibutan():
def __init__(self):
self.n = n
def __len__(self):
return self.n
def __getitem__(self,x):
cnt.append(0)
print('?',x+1,flush=True)
z = int(input())
if z < x+1:
return 1
else:
return 0
import bisect
ans = bisect.bisect_right(nibutan(),0)
while len(cnt) != 10:
cnt.append(0)
print('?',1,flush=True)
z = int(input())
print('Yes',ans,ans+1,flush=True)