QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#571142 | #9308. World Cup | jpphy | RE | 0ms | 0kb | C++17 | 563b | 2024-09-17 20:45:02 | 2024-09-17 20:45:02 |
Judging History
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