結果

問題 No.365 ジェンガソート
ユーザー Zu_rin
提出日時 2020-01-05 05:50:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 577 ms
コンパイル使用メモリ 70,844 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-22 21:54:45
合計ジャッジ時間 2,922 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define MOD 1000000007
#define INF 1 << 30

using namespace std;
typedef long long ll;

int main(void) {
	int num, i, ma = 0, ans = 0;
	cin >> num;
	vector<int> d(num);
	for (i = 0; i < num; i++)
		cin >> d[i];
	for (i = 0; i < num; i++) {
		ma = max(ma, d[i]);
		if (ma > d[i])
			ans++;
	}
	cout << ans << "\n";
	return 0;
}
0