結果
問題 |
No.2036 Max Middle
|
ユーザー |
![]() |
提出日時 | 2025-10-09 15:07:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 5,443 ms |
コンパイル使用メモリ | 160,424 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-10-09 15:08:05 |
合計ジャッジ時間 | 3,189 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 17 |
ソースコード
#include <bits/stdc++.h> using namespace std; /* ???????????????????????????????? =>?45? ???????????????????????????? ????????? ??? */ #define N 200005 int n,a[N]; int main(){ ios::sync_with_stdio(0); cin.tie(0); cin>>n; long long ans=0,up=0; for(int i=1;i<=n;i++){ cin>>a[i]; if(i>1){ if(a[i]>a[i-1])up++; else ans+=up; } } cout<<ans; return 0; }