結果
| 問題 | No.2036 Max Middle |
| コンテスト | |
| ユーザー |
sotanishy
|
| 提出日時 | 2022-08-12 21:49:21 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 88 ms / 2,000 ms |
| + 511µs | |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 95,952 KB |
| 実行使用メモリ | 114,816 KB |
| 最終ジャッジ日時 | 2026-09-02 21:30:05 |
| 合計ジャッジ時間 | 4,107 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / 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