結果

問題 No.365 ジェンガソート
コンテスト
ユーザー siguma323
提出日時 2016-04-29 22:36:46
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 489 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 410 ms
コンパイル使用メモリ 96,532 KB
実行使用メモリ 10,052 KB
最終ジャッジ日時 2026-09-10 06:44:23
合計ジャッジ時間 3,059 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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