結果
| 問題 |
No.2036 Max Middle
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2024-09-04 23:28:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 183 bytes |
| コンパイル時間 | 585 ms |
| コンパイル使用メモリ | 82,240 KB |
| 実行使用メモリ | 263,848 KB |
| 最終ジャッジ日時 | 2024-09-04 23:28:54 |
| 合計ジャッジ時間 | 11,575 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 7 TLE * 10 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
s=""
for i in range(n-1):
s+="<" if a[i]<a[i+1] else ">"
b=0
c=0
for i in range(len(s)):
if s[i]==">":
b+=i-c
c+=1
print(b)
sasa8uyauya