Submission #00010


ソースコード

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 = 1; 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:44:17
言語 C++11
状態 Wrong Answer
得点 0
ソースコード長 349 Byte
最大実行時間 29 ms
最大メモリ使用量 612 KB

セット

セット 得点 Cases
1 ALL 0 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
01-01.txt WA 22 ms 472 KB
1
01-02.txt AC 25 ms 568 KB
1
01-03.txt AC 21 ms 540 KB
1
01-04.txt AC 27 ms 512 KB
1
01-05.txt WA 18 ms 484 KB
1
01-06.txt AC 18 ms 452 KB
1
01-07.txt AC 22 ms 420 KB
1
01-08.txt WA 29 ms 516 KB
1
01-09.txt AC 22 ms 612 KB
1
01-10.txt WA 24 ms 584 KB
1
sample-01.txt AC 18 ms 556 KB
1
sample-02.txt WA 21 ms 524 KB
1
sample-03.txt AC 21 ms 496 KB
1