結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2016-06-08 07:58:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 776 ms |
コンパイル使用メモリ | 71,040 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 02:51:11 |
合計ジャッジ時間 | 3,717 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); for(auto &i : a){ cin >> i; } int ans = 0, t = 0; for(auto i : a){ if(t > i) ans++; t = max(t, i); } cout << ans << endl; return 0; }