QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#240540#7112. XOR Cliqueucup-team2307#WA 5ms3772kbC++14468b2023-11-05 16:16:512023-11-05 16:16:52

Judging History

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

  • [2023-11-05 16:16:52]
  • 评测
  • 测评结果:WA
  • 用时:5ms
  • 内存:3772kb
  • [2023-11-05 16:16:51]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main() {
    cin.tie(0)->sync_with_stdio(0);
    int T;
    cin >> T;
    while(T--) {
        int n;
        cin >> n;
        vector<int> a(n);
        int run = 0, last = -1, ans = 0;
        for(auto &i : a) {
            cin >> i;
            i = __lg(i);
            if(last != i) run = 0;
            ans = max(ans, ++run);
            last = i;
        }
        cout << ans << '\n';
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
3
1 2 3
3
1 1 1
5
1 2323 534 534 5

output:

2
3
2

result:

ok 3 number(s): "2 3 2"

Test #2:

score: -100
Wrong Answer
time: 5ms
memory: 3604kb

input:

10000
10
10 8 8 8 8 2 5 4 8 7
10
8 9 3 2 7 10 3 10 3 10
10
2 10 10 4 10 10 10 1 5 10
10
4 4 1 4 10 3 4 6 4 6
10
7 3 4 5 9 4 4 7 8 8
10
8 6 5 1 6 2 7 3 7 4
10
2 8 7 3 10 5 1 6 8 3
10
6 4 7 4 10 4 8 5 7 6
10
8 5 5 3 8 1 9 10 8 9
10
10 8 10 8 3 6 10 8 2 6
10
10 7 4 10 1 8 4 6 2 3
10
9 10 4 2 7 5 5 4 4 ...

output:

5
2
3
4
3
2
1
4
4
4
2
6
2
2
2
3
2
4
3
4
3
2
2
2
4
2
1
2
4
3
2
5
3
3
3
3
4
3
1
2
3
3
2
3
3
2
2
5
3
2
2
2
2
2
4
2
3
2
3
1
2
2
2
1
2
3
1
2
2
2
2
5
2
3
2
3
4
3
2
2
3
3
2
4
2
2
4
2
2
3
3
2
3
2
3
3
2
3
2
2
5
2
2
5
3
2
3
3
3
2
2
3
5
6
3
3
1
2
9
2
2
2
2
2
2
2
2
3
2
2
3
2
2
4
3
3
3
2
3
3
3
2
2
2
2
4
3
2
4
3
...

result:

wrong answer 1st numbers differ - expected: '6', found: '5'