結果
| 問題 | No.2036 Max Middle |
| コンテスト | |
| ユーザー |
sotanishy
|
| 提出日時 | 2022-08-12 21:49:21 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 2,000 ms |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 85,032 KB |
| 実行使用メモリ | 107,904 KB |
| 最終ジャッジ日時 | 2026-04-11 07:38:38 |
| 合計ジャッジ時間 | 2,225 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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