結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
1235486527
|
| 提出日時 | 2019-11-30 19:06:01 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 463 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 29,740 KB |
| 最終ジャッジ日時 | 2026-05-15 09:00:04 |
| 合計ジャッジ時間 | 6,266 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 7 TLE * 1 -- * 23 |
ソースコード
def count_sort(L):
S = set()
for i, left in enumerate(L):
if left in S:
continue
for right in L[i:]:
if left > right:
S.add(right)
count = len(S)
if L[0] < L[-1] and L[-1] in S:
count += 1
return count
N = int(input())
a = list(map(int, input().split()))
print(count_sort(a))
1235486527