QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#570232 | #9308. World Cup | AceTaffy258 | Compile Error | / | / | C++20 | 416b | 2024-09-17 14:52:04 | 2024-09-17 14:52:07 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int a[40];
bool cmp(int x,int y){
return x>y;
}
int main(){
std::ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int T;cin>>T;
while(T--){
for(int i=1;i<=32;i++){
cin>>a[i];
}
int chn=a[1];
sort(a+1,a+33,cmp);
int ans=1;
for(int i=1;i<=32;i*=2){
if(ch>=a[i]){
ans=i;break;
}
}
cout<<ans<<endl;
}
return 0;
}
Details
answer.code: In function ‘int main()’: answer.code:20:28: error: ‘ch’ was not declared in this scope; did you mean ‘chn’? 20 | if(ch>=a[i]){ | ^~ | chn