QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#575200 | #9308. World Cup | Alencryenfo | WA | 0ms | 3664kb | C++20 | 776b | 2024-09-19 11:14:51 | 2024-09-19 11:14:52 |
Judging History
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'