結果
問題 |
No.2085 Directed Complete Graph
|
ユーザー |
![]() |
提出日時 | 2022-09-23 21:07:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 633 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 27,848 KB |
平均クエリ数 | 2472.00 |
最終ジャッジ日時 | 2024-12-22 15:50:18 |
合計ジャッジ時間 | 4,411 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 WA * 14 |
ソースコード
n = int(input()) a = [0] * n for i in range(n): a[i] = i + 1 def merge_sort(v): if len(v) == 1: return v c = merge_sort(v[:len(v) // 2]) d = merge_sort(v[len(v) // 2:]) i, j = 0, 0 res = [] while i < len(c) and j < len(d): print("?", c[i], d[j]) t = int(input()) if t: res.append(c[i]) i += 1 else: res.append(d[j]) j += 1 while i < len(c): res.append(c[i]) i += 1 while j < len(d): res.append(d[j]) j += 1 return res merge_sort(a) print("!", n - 1, sep = "\n") print(*a)