結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-23 10:21:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 267 bytes |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 82,544 KB |
| 実行使用メモリ | 142,852 KB |
| 最終ジャッジ日時 | 2024-12-21 12:21:52 |
| 合計ジャッジ時間 | 66,376 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 TLE * 21 |
ソースコード
N = int(input())
a = list(map(int, input().split()))
m = 0
x = [False]*N
for i in range(N):
if a[i] < m:
x[i] = True
for j in range(i):
if a[j] < a[i]:
x[j] = True
m = max(m, a[i])
ans = sum(x)
print(ans)