結果
問題 | No.2502 Optimization in the Dark |
ユーザー |
![]() |
提出日時 | 2023-10-15 11:56:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 452 bytes |
コンパイル時間 | 394 ms |
コンパイル使用メモリ | 82,392 KB |
実行使用メモリ | 72,148 KB |
平均クエリ数 | 4.00 |
最終ジャッジ日時 | 2024-09-16 21:59:08 |
合計ジャッジ時間 | 5,558 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 34 |
ソースコード
n = int(input())n2 = 2 * nX = [0] * 3def ansop(i):ans = []for j in range(3):ans.append(i % 3 + 1)ans.append((i + 1) % 3 + 1)i -= 2ans = ans * nprint("!", *ans)exit()for i in range(3):print("?", i + 1, n2, (i + 1) % 3 + 1, n2)if input() == "Yes":X[i] = 1if X.count(0) == 3:ansop(0)elif X.count(0) == 1:ansop((X.index(0) - 1) % 3)else:ansop((X.index(1)) % 3)