QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#329345 | #4935. Exchange Bottleneck | ouo# | WA | 1ms | 5772kb | C++17 | 575b | 2024-02-16 16:17:22 | 2024-02-16 16:17:23 |
Judging History
answer
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
int n;
int arr[1000005];
int dp[1000005] = {0};
const int N = 1e6 + 5;
signed main() {
ios::sync_with_stdio(0), cin.tie(0);
int mx = 0, cur = 0;
cin >> n;
int get0 = 0;
for (int i = 1; i < n; i++) {
cin >> arr[i];
if (i == 1)
;
else if (!arr[i]) {
cur++;
mx = max(cur, mx);
} else {
mx = 1;
cur = 0;
}
}
cout << mx + 1;
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 5696kb
input:
5 1 0 1 0
output:
2
result:
ok single line: '2'
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 5772kb
input:
7 1 1 1 1 1 1
output:
2
result:
wrong answer 1st lines differ - expected: '1', found: '2'