結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2019-09-29 23:54:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 517 bytes |
コンパイル時間 | 518 ms |
コンパイル使用メモリ | 67,644 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-03 04:44:15 |
合計ジャッジ時間 | 2,000 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
#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 max_input = 0; int input; if (!scanf( "%d", &input )) return 0; if (input < max_input) count++; if (max_input < input) max_input = input; } printf( "%d\n", count); return 0; }