結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
1235486527
|
| 提出日時 | 2019-11-30 19:06:01 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 259 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 31,228 KB |
| 最終ジャッジ日時 | 2024-11-21 03:28:10 |
| 合計ジャッジ時間 | 23,419 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 23 TLE * 6 |
ソースコード
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