結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2018-08-31 21:19:36 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 330 bytes |
コンパイル時間 | 470 ms |
コンパイル使用メモリ | 54,940 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 22:44:30 |
合計ジャッジ時間 | 3,036 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
#include <iostream> using namespace std; int main(void){ // Your code here! int n, ans = 0; cin >> n; int a[n]; for(int i=0; i < n; i++){ cin >> a[i]; } int pivot; pivot = a[0]; for(int i=1; i < n; i++){ if(a[i] < pivot) ans++; if(pivot < a[i]) pivot = a[i]; } cout << ans << endl; return 0; }