QOJ.ac

QOJ

IDSubmission IDProblemHackerOwnerResultSubmit timeJudge time
#867#569872#9308. World CupdengjunhanLateRegistrationFailed.2024-09-20 20:14:332024-09-20 20:14:33

Details

Extra Test:

Invalid Input

input:



output:


result:

FAIL Unexpected white-space - token expected (stdin, line 1)

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#569872#9308. World CupLateRegistration#AC ✓1ms3752kbC++20620b2024-09-17 11:42:192024-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");
	}
}