結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2016-04-29 22:26:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 286 bytes |
コンパイル時間 | 432 ms |
コンパイル使用メモリ | 59,476 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 18:03:32 |
合計ジャッジ時間 | 1,947 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main() { int N, res = 0; vector<int> a; cin >> N; for (int i = 0, x, left; i < N; ++i) { cin >> x; a.push_back(x); if (i == 0) left = x; else if (left > x) ++res; } cout << res << endl; return 0; }