Submission #00009
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int boad[n + 2] = {}; for ( int i = 1; i <= n; ++i) { cin >> boad[i]; } int mx = 1; int tmp = 0; for ( int i = 0; i < n; ++i) { if (boad[i] == 1) ++tmp; else { mx = max(mx, tmp); tmp = 0; } } cout << ++mx << endl; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - 双六 (Sugoroku) |
ユーザー名 | crom |
投稿日時 | 2018-11-07 21:41:31 |
言語 | C++11 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 348 Byte |
最大実行時間 | 25 ms |
最大メモリ使用量 | 668 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
01-01.txt | WA | 23 ms | 604 KB |
1
|
01-02.txt | WA | 20 ms | 572 KB |
1
|
01-03.txt | AC | 19 ms | 668 KB |
1
|
01-04.txt | AC | 23 ms | 512 KB |
1
|
01-05.txt | WA | 23 ms | 480 KB |
1
|
01-06.txt | AC | 24 ms | 580 KB |
1
|
01-07.txt | AC | 25 ms | 552 KB |
1
|
01-08.txt | WA | 20 ms | 520 KB |
1
|
01-09.txt | AC | 23 ms | 492 KB |
1
|
01-10.txt | WA | 20 ms | 596 KB |
1
|
sample-01.txt | AC | 20 ms | 440 KB |
1
|
sample-02.txt | WA | 23 ms | 540 KB |
1
|
sample-03.txt | WA | 21 ms | 516 KB |
1
|