QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#571142#9308. World CupjpphyRE 0ms0kbC++17563b2024-09-17 20:45:022024-09-17 20:45:02

Judging History

This is the latest submission verdict.

  • [2024-09-17 20:45:02]
  • Judged
  • Verdict: RE
  • Time: 0ms
  • Memory: 0kb
  • [2024-09-17 20:45:02]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
int a[33], id[33];
int ans[] = {0,32,32,16,16,16,16,8,8,8,8,8,8,8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,1};
void solve(){
    for(int i = 1; i <= 32; ++i){
        scanf("%d", a+i);
        id[i] = i;
    }
    sort(id+1, id+33, [](int x, int y){
        return a[x] < a[y];
    });
    for(int i = 1; i <= 32; ++i){
        if(id[i] != 1) continue;
        printf("%d\n", ans[i]);
        break;
    }    
}
signed main(){
    int t;
    scanf("%lld", &t);
    while(t--) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Runtime Error

input:

1
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

output:


result: