結果
| 問題 |
No.2036 Max Middle
|
| コンテスト | |
| ユーザー |
sotanishy
|
| 提出日時 | 2022-08-12 21:49:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 209 bytes |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 82,440 KB |
| 実行使用メモリ | 103,300 KB |
| 最終ジャッジ日時 | 2024-09-23 02:05:14 |
| 合計ジャッジ時間 | 2,403 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 17 |
ソースコード
import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(1, N):
if A[i-1] < A[i]:
cnt += 1
else:
ans += cnt
print(ans)
sotanishy