結果
| 問題 |
No.397 NO MORE KADOMATSU
|
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-31 17:35:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 344 ms |
| コンパイル使用メモリ | 82,860 KB |
| 実行使用メモリ | 86,204 KB |
| 最終ジャッジ日時 | 2025-03-31 17:36:09 |
| 合計ジャッジ時間 | 6,871 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 17 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
_ = input() # Dummy input
arr = A.copy()
swaps = []
for i in range(n):
max_idx = i
for j in range(i, n):
if arr[j] > arr[max_idx]:
max_idx = j
if max_idx != i:
swaps.append((i, max_idx))
arr[i], arr[max_idx] = arr[max_idx], arr[i]
print(len(swaps))
for u, v in swaps:
print(u, v)
lam6er