結果
| 問題 |
No.2496 LCM between Permutations
|
| ユーザー |
mkawa2
|
| 提出日時 | 2023-10-06 22:42:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 362 bytes |
| コンパイル時間 | 477 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 28,104 KB |
| 平均クエリ数 | 656.00 |
| 最終ジャッジ日時 | 2024-07-26 16:45:07 |
| 合計ジャッジ時間 | 6,237 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 RE * 18 |
ソースコード
from functools import lru_cache
@lru_cache(None)
def ask(i, j):
print("?", i+1, j+1, flush=True)
return int(input())
n = int(input())
mn, i1 = 10**9, -1
for i in range(n):
x = ask(i, 0)
if x < mn: mn, i1 = x, i
bb=[0]*n
for j in range(n):bb[j]=ask(i1,j)
j1=bb.index(1)
aa=[0]*n
for i in range(n):aa[i]=ask(i,j1)
print("!",*aa,*bb,flush=True)
mkawa2