QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#571863#9308. World Cupleo2005Compile Error//C++14625b2024-09-18 09:30:122024-09-18 09:30:12

Judging History

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

  • [2024-09-18 09:30:12]
  • 评测
  • [2024-09-18 09:30:12]
  • 提交

answer

#include<iostream>
#include<algorithm>
using namespace std;
int t,val,i,a[35];
int main(){
    cin>>t;
    while(t--){
      for(int i=1;i<=32;i++){
         cin>>a[i];
      }
      val=a[1];
      sort(a+1,a+33);
      for(i=1;i<=32;i++){
         if(a[i]==val){
            break;
         }
      }
      if(i==32){
        cout<<1<<endl;
      }else if(i>=28){
         cout<<2<<endl;
      }else if(i>=14){
         cout<<4<<endl;
    }
    else if(i>=7){
        cout<<8<<endl;
    }else if(i>=3){
        cout<<16<<endl;
    }else{
        cout<<32<<endl;
    }



    return 0;
}

Details

answer.code: In function ‘int main()’:
answer.code:36:2: error: expected ‘}’ at end of input
   36 | }
      |  ^
answer.code:5:11: note: to match this ‘{’
    5 | int main(){
      |           ^