結果
| 問題 |
No.1425 Yet Another Cyclic Shifts Sorting
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:49:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 209 bytes |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 82,168 KB |
| 実行使用メモリ | 134,016 KB |
| 最終ジャッジ日時 | 2025-06-12 19:49:32 |
| 合計ジャッジ時間 | 5,661 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 22 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
b = sorted(a)
pos = {v: i + 1 for i, v in enumerate(a)}
breaks = 0
for i in range(1, n):
if pos[b[i]] < pos[b[i-1]]:
breaks += 1
print(breaks)
gew1fw