結果
| 問題 |
No.1425 Yet Another Cyclic Shifts Sorting
|
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-03-12 22:26:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 261 bytes |
| コンパイル時間 | 216 ms |
| コンパイル使用メモリ | 82,244 KB |
| 実行使用メモリ | 109,084 KB |
| 最終ジャッジ日時 | 2024-10-14 12:56:51 |
| 合計ジャッジ時間 | 9,063 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 22 |
ソースコード
import sys input = sys.stdin.readline N = int(input()) a = list(map(int, input().split())) sa = [(a[i], i) for i in range(N)] sa.sort(reverse = True) _, i = sa.pop() res = set() while len(sa): _, j = sa.pop() if i > j: res.add(i - j) i = j print(len(res))
wolgnik