QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#604602#4935. Exchange BottleneckNMK#WA 3ms3828kbC++17361b2024-10-02 12:24:382024-10-02 12:24:38

Judging History

你现在查看的是最新测评结果

  • [2024-10-02 12:24:38]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3828kb
  • [2024-10-02 12:24:38]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
    cin.tie(0)->sync_with_stdio(0);
    int n; cin >> n;
    vector<int> A(n+1,0);
    A[1] = 1;
    int no = 0, ans = 1;
    for(int i=2;i<=n;i++) {
        cin >> A[i];
        if(A[i]) no = 0;
        no++;
        ans = max(ans,no);
    }
    cout << ans;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3516kb

input:

5
1 0 1 0

output:

2

result:

ok single line: '2'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

7
1 1 1 1 1 1

output:

1

result:

ok single line: '1'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

2
0

output:

1

result:

ok single line: '1'

Test #4:

score: -100
Wrong Answer
time: 3ms
memory: 3828kb

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'