QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#164162 | #4935. Exchange Bottleneck | chengcheng567 | WA | 4ms | 3656kb | C++14 | 256b | 2023-09-04 20:26:42 | 2023-09-04 20:26:42 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n,ans=1,op=-1;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);cin>>n;n--;
while(n--){
int x;cin>>x;
if(x==1){
op=0;
}else op++;
ans=max(ans,op+1);
}cout<<ans<<"\n";
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3620kb
input:
5 1 0 1 0
output:
2
result:
ok single line: '2'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3656kb
input:
7 1 1 1 1 1 1
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
2 0
output:
1
result:
ok single line: '1'
Test #4:
score: -100
Wrong Answer
time: 4ms
memory: 3588kb
input:
90580 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 ...
output:
5
result:
wrong answer 1st lines differ - expected: '2', found: '5'