結果

問題 No.365 ジェンガソート
ユーザー kyabaria
提出日時 2018-09-11 15:39:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 407 bytes
コンパイル時間 2,534 ms
コンパイル使用メモリ 160,872 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 10:46:31
合計ジャッジ時間 4,220 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
typedef  long long ll;
#define INF 1000000000
using namespace std;
#define N 101
int main(void){
    int n,k;
    cin>>n;
    vector<int>a(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    int ans=0;
    int max=a[0];
    for(int i=1;i<n;i++){
        if(a[i]>max){
            max=a[i];
        }else if(a[i]<max){
            ans++;
        }
    }
    cout<<ans<<endl;
}
0