結果
| 問題 |
No.1830 Balanced Majority
|
| コンテスト | |
| ユーザー |
tnodino
|
| 提出日時 | 2022-02-04 21:50:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 306 bytes |
| コンパイル時間 | 330 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 27,864 KB |
| 平均クエリ数 | 2.65 |
| 最終ジャッジ日時 | 2024-06-11 11:43:47 |
| 合計ジャッジ時間 | 3,114 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 9 WA * 16 |
ソースコード
import sys
def Question(K):
print(f'? {K}')
sys.stdout.flush()
return int(input())
def Answer(L, R):
print(f'! {L} {R}')
sys.stdout.flush()
exit()
N = int(input())
M = N // 2 - 1
if Question(M * 2) == M:
Answer(1, M * 1)
if Question(2) == 1:
Answer(3, N)
Answer(2, N - 1)
tnodino