QOJ.ac
QOJ
ID | Submission ID | Problem | Hacker | Owner | Result | Submit time | Judge time |
---|---|---|---|---|---|---|---|
#867 | #569872 | #9308. World Cup | dengjunhan | LateRegistration | Failed. | 2024-09-20 20:14:33 | 2024-09-20 20:14:33 |
Details
Extra Test:
Invalid Input
input:
output:
result:
FAIL Unexpected white-space - token expected (stdin, line 1)
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#569872 | #9308. World Cup | LateRegistration# | AC ✓ | 1ms | 3752kb | C++20 | 620b | 2024-09-17 11:42:19 | 2024-09-17 11:42:19 |
answer
#include<bits/stdc++.h>
using namespace std;
inline int read()
{
int n=0,f=1,ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
n=n*10+ch-'0';
ch=getchar();
}
return n*f;
}
int a[33];
int main()
{
int t;
t=read();
for(int greg=1;greg<=t;greg++)
{
for(int i=1;i<=32;i++)a[i]=read();
int sl=0;
for(int i=1;i<=32;i++)if(a[i]>a[1])sl++;
if(sl==0)printf("1\n");
else if(sl<=4)printf("2\n");
else if(sl<=18)printf("4\n");
else if(sl<=25)printf("8\n");
else if(sl<=29)printf("16\n");
else printf("32\n");
}
}