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