結果

問題 No.365 ジェンガソート
ユーザー siguma323
提出日時 2016-04-29 22:36:46
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 489 bytes
コンパイル時間 773 ms
コンパイル使用メモリ 78,972 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-04 18:16:36
合計ジャッジ時間 2,388 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <numeric>
#include <string>
#include <vector>
#include <iostream>
#include <queue>
#include <utility>
#include <cmath>
#include <bitset>

using namespace std;


int main()
{
    int n;
    cin >> n;
    vector<int> a(n);

    for(auto&& x : a)
    {
        cin >> x;
    }

    int max = a.at(0);

    int count = 0;
    for(auto&& x : a)
    {
        if(x >= max)
            max = x;
        else
            ++count;
    }

    cout << count << endl;

}
0