QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#836046#9917. The Story of Emperor Bieucup-team4435#WA 15ms3756kbC++20763b2024-12-28 16:13:462024-12-28 16:13:58

Judging History

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

  • [2024-12-28 16:13:58]
  • 评测
  • 测评结果:WA
  • 用时:15ms
  • 内存:3756kb
  • [2024-12-28 16:13:46]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;

#define all(a) begin(a), end(a)
#define len(a) int((a).size())

void solve(int /* test_num */) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (auto &x : a) {
        cin >> x;
    }

    int l = 0;
    while (l + 1 < n && a[l + 1] >= a[l]) {
        l++;
    }
    int r = n - 1;
    while (r > 0 && a[r - 1] >= a[r]) {
        r--;
    }

    for (int i = r; i <= l; i++) {
        cout << i + 1 << ' ';
    }
    cout << '\n';
}

int main() {
    cin.tie(nullptr)->sync_with_stdio(false);

    int tests;
    cin >> tests;
    for (int test_num = 1; test_num <= tests; test_num++) {
        solve(test_num);
    }
}

详细

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: 15ms
memory: 3620kb

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:






















2 
1 




1 


1 









































































2 










1 






1 



1 

1 



























































1 











2 
1 












1 



























































...

result:

wrong answer 1st numbers differ - expected: '16', found: '2'