QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#573186#9308. World CupfeifangeCompile Error//C++14490b2024-09-18 17:40:252024-09-18 17:40:26

Judging History

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

  • [2024-09-18 17:40:26]
  • 评测
  • [2024-09-18 17:40:25]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int t;
int a[32];

int main(){
	cin >> t;
	for(int i = 0;i < t;i++){
		int sum = 0;
		for(int j = 0;j < 32;j++){
			cin >> a[j];
			if(j > 0){
				if(a[0] > a[j])
					sum++;
			}
		}
		if(sum < 31)	cout << 2 << endl;
		else if(sum < 27)	cout << 4 << endl;
		else if(sum < 13)	cout << 8 << endl;
		else if(sum < 6)	cout << 16 << endl;
		else if (cnt < 2) cout << 32 << endl;
		else	cout << 1 << endl;
	}
	return 0;
}

Details

answer.code: In function ‘int main()’:
answer.code:23:26: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
   23 |                 else if (cnt < 2) cout << 32 << endl;
      |                          ^~~
      |                          int