QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#575200#9308. World CupAlencryenfoWA 0ms3664kbC++20776b2024-09-19 11:14:512024-09-19 11:14:52

Judging History

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

  • [2024-09-19 11:14:52]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3664kb
  • [2024-09-19 11:14:51]
  • 提交

answer

#include<iostream>
#include<array>
#include<algorithm>
using namespace std;
int t;
int main(){
 cin>>t;
 while(t--){
    array<pair<int,int>,32> info;
    for(int i=0;i<32;i++){
        int tmp;
        cin>>tmp;
        info[i]={tmp,i};
    }
    sort(info.begin(),info.end(),greater<pair<int,int>>());
    int pl;
    for(int i=0;i<32;i++){
        if(info[i].second==1){
            pl=i+1;
            break;
            }
    }
    if(pl==1){
        printf("1\n");
    }else if(pl<=5){
        printf("2\n");
    }else if(pl<=19){
        printf("4\n");
    }else if(pl<=26){
        printf("8\n");
    }else if(pl<=30){
        printf("16\n");
    }else if(pl<=32){
        printf("32\n");
    }
    }   
    
    
 return 0;   
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3664kb

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:

2

result:

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