Submission #00171
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include <bits/stdc++.h> using namespace std; int main() { vector< int >dataSets; // bool clear = false; while ( true ) { int n; cin >> n; if (n == 0) { break ; } else { // clear = true; int numbers[1100]; int count = 0; for ( int i = 0; i < n; i ++) { int target; cin >> target; numbers[i] = target; } for ( int i = 0; i < n; i ++) { if (numbers[i] == 2 && numbers[i + 1] == 0 && numbers[i + 2] == 2 && numbers[i + 3] == 0) { count ++; } } cout << count << '\n' ; } } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - カウントダウンアップ 2020 |
ユーザー名 | ei2030 |
投稿日時 | 2021-03-30 16:02:56 |
言語 | C++17 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 861 Byte |
最大実行時間 | 30 ms |
最大メモリ使用量 | 648 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
A1 | WA | 27 ms | 604 KB |
1
|
A2 | WA | 29 ms | 448 KB |
1
|
A3 | WA | 30 ms | 552 KB |
1
|
A4 | WA | 22 ms | 648 KB |
1
|