QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#841287#9917. The Story of Emperor BiecomeintocalmWA 39ms4040kbC++20415b2025-01-03 16:21:142025-01-03 16:21:14

Judging History

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

  • [2025-01-03 16:21:14]
  • 评测
  • 测评结果:WA
  • 用时:39ms
  • 内存:4040kb
  • [2025-01-03 16:21:14]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

void solve() {
  int n;
  cin >> n;
  vector<int> A(n + 1);
  int Max = 0;
  for(int i = 1; i <= n; i++) {
    cin >> A[i];
    if(A[Max] < A[i]) Max = i;
  }

  for(int i = Max; i <= n; i++) {
    if(A[i] == A[Max]) printf("%d ", i);
    else break;
  }
  printf("\n");
}

int main() {
  int T;
  cin >> T;
  while(T--) {
    solve();
  }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3756kb

input:

3
1
5
2
1 3
3
3 3 3

output:

1 
2 
1 2 3 

result:

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

Test #2:

score: -100
Wrong Answer
time: 39ms
memory: 4040kb

input:

10000
25
25 39 31 40 11 29 9 4 42 32 39 5 21 33 19 50 19 20 7 41 13 45 34 23 7
6
33 14 11 25 24 37
6
50 35 17 42 37 10
11
22 17 45 17 48 29 2 42 19 19 50
91
12 27 3 20 37 39 4 48 4 29 44 37 38 11 39 15 38 28 20 19 50 20 48 28 43 6 19 16 7 10 30 44 9 25 13 9 21 8 3 39 11 10 34 28 23 13 49 44 45 4 23 ...

output:

16 
6 
1 
11 
21 
14 
17 
10 
14 
31 
53 
19 
11 
7 
4 
71 
40 
96 
2 
2 
46 
2 
1 
14 
47 
45 
1 
1 
16 
33 
1 
3 
4 
6 
4 
37 
54 
33 
7 
2 
27 
10 
7 
41 
9 
88 
68 
2 
2 
17 
6 
32 
5 
12 
80 
20 
23 
22 
14 
24 
40 
16 
7 
27 
27 
58 
34 
8 
1 
1 
4 
8 
12 
43 
1 
18 
5 
3 
5 
29 
4 5 
17 
34 
...

result:

wrong answer 6th numbers differ - expected: '70', found: '14'