結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2019-09-29 23:53:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 445 ms |
コンパイル使用メモリ | 69,088 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-03 04:44:10 |
合計ジャッジ時間 | 1,718 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 32 |
ソースコード
#include <cstdio> #include <iostream> #include <vector> #include <algorithm> #define rep( i, n, m ) for(ll i = ( n ); i < ( m ); i++) using ll = long long int; int give_water( int* array, int begin, int end ); int main( void ){ int n; if (!scanf( "%d", &n )) return 0; int count = 0; rep( i, 0, n ){ static int pre_input = 0; int input; if (!scanf( "%d", &input )) return 0; if (input < pre_input) count++; pre_input = input; } printf( "%d\n", count); return 0; }