QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#567678#9308. World CupLeon#Compile Error//C++14480b2024-09-16 13:27:562024-09-16 13:27:57

Judging History

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

  • [2024-09-16 13:27:57]
  • 评测
  • [2024-09-16 13:27:56]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long 
void solve()
{
	int me;
	cin>>me;
	int re=1;
	for(int i=0;i<32;i++)
	{
		int x;
		cin>>x;
		if(me>x)re++;
	}
	int ans;
	if (rk == 1) ans = 1;
    else if (rk <= 5) ans = 2;
    else if (rk <= 19) ans = 4;
    else if (rk <= 26) ans = 8;
    else if (rk <= 30) ans = 16;
    else ans = 32;
	cout << ans << '\n';
}
signed main()
{
	int t;
	cin>>t;
	while(t--)
	solve();
	return 0;
 } 

详细

answer.code: In function ‘void solve()’:
answer.code:16:13: error: ‘rk’ was not declared in this scope; did you mean ‘re’?
   16 |         if (rk == 1) ans = 1;
      |             ^~
      |             re