結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
HeyHey0111
|
| 提出日時 | 2016-04-29 22:31:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 317 bytes |
| コンパイル時間 | 411 ms |
| コンパイル使用メモリ | 58,792 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-04 18:12:29 |
| 合計ジャッジ時間 | 1,826 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 25 |
ソースコード
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> v(n);
for(int i=0;i<n;i++)
cin >> v[i];
int cur =0;
int cnt=0;
for(int i=0;i<n;i++){
if(cur<v[i]){
cur=v[i];
}else{
cnt++;
}
}
cout<<cnt<<endl;
return 0;
}
HeyHey0111