結果
問題 | No.1830 Balanced Majority |
ユーザー | tnodino |
提出日時 | 2022-02-04 21:50:17 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 694 ms |
コンパイル使用メモリ | 10,672 KB |
実行使用メモリ | 24,592 KB |
平均クエリ数 | 2.65 |
最終ジャッジ日時 | 2023-09-02 04:44:32 |
合計ジャッジ時間 | 3,234 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge16 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
24,060 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 38 ms
24,492 KB |
testcase_05 | AC | 38 ms
23,948 KB |
testcase_06 | WA | - |
testcase_07 | AC | 39 ms
24,200 KB |
testcase_08 | AC | 39 ms
23,892 KB |
testcase_09 | AC | 38 ms
24,196 KB |
testcase_10 | AC | 39 ms
23,696 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 40 ms
23,856 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | AC | 38 ms
23,784 KB |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
ソースコード
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)