結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
h_noson
|
| 提出日時 | 2016-04-29 22:27:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 538 bytes |
| コンパイル時間 | 612 ms |
| コンパイル使用メモリ | 59,580 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-04 18:05:39 |
| 合計ジャッジ時間 | 2,113 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 25 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define RREP(i,s,e) for (i = s; i >= e; i--)
#define rrep(i,n) RREP(i,n,0)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 100000000
typedef long long ll;
int main() {
int i, n, mx, ans;
int a[100000];
cin >> n;
rep (i,n) cin >> a[i];
mx = a[0];
ans = 0;
rep (i,n) {
if (a[i] >= mx)
mx = a[i];
else
ans++;
}
cout << ans << endl;
return 0;
}
h_noson