QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#571876 | #9308. World Cup | MrLi | Compile Error | / | / | C++20 | 656b | 2024-09-18 09:38:22 | 2024-09-18 09:38:22 |
Judging History
answer
ccc#include<bits/stdc++.h>
using namespace std;
//#define int long long
typedef pair<string,char> pii;
#define endl "\n"
const int N=66;
int a[N];
void solve()
{
int x,y,res=0;
cin>>x;
for(int i=1;i<=31;i++)
{
cin>>y;
if(y<x) res++;
}
if(res>=31) puts("1");
else if(res>=27&&res<31) puts("2");
else if(res>=13&&res<27) puts("4");
else if(res>=6&&res<13) puts("8");
else if(res>=2&&res<6) puts("16");
else puts("32");
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--) solve();
return 0;
}
详细
answer.code:1:4: error: stray ‘#’ in program 1 | ccc#include<bits/stdc++.h> | ^ answer.code:1:1: error: ‘ccc’ does not name a type 1 | ccc#include<bits/stdc++.h> | ^~~ answer.code:4:14: error: ‘string’ was not declared in this scope 4 | typedef pair<string,char> pii; | ^~~~~~ answer.code:4:14: error: ‘string’ was not declared in this scope answer.code:4:14: error: ‘string’ was not declared in this scope answer.code:4:14: error: ‘string’ was not declared in this scope answer.code:4:14: error: ‘string’ was not declared in this scope answer.code:4:14: error: ‘string’ was not declared in this scope answer.code:4:9: error: ‘pair’ does not name a type 4 | typedef pair<string,char> pii; | ^~~~ answer.code: In function ‘void solve()’: answer.code:11:5: error: ‘cin’ was not declared in this scope 11 | cin>>x; | ^~~ answer.code:17:17: error: ‘puts’ was not declared in this scope 17 | if(res>=31) puts("1"); | ^~~~ answer.code:18:30: error: ‘puts’ was not declared in this scope 18 | else if(res>=27&&res<31) puts("2"); | ^~~~ answer.code:19:30: error: ‘puts’ was not declared in this scope 19 | else if(res>=13&&res<27) puts("4"); | ^~~~ answer.code:20:29: error: ‘puts’ was not declared in this scope 20 | else if(res>=6&&res<13) puts("8"); | ^~~~ answer.code:21:28: error: ‘puts’ was not declared in this scope 21 | else if(res>=2&&res<6) puts("16"); | ^~~~ answer.code:22:10: error: ‘puts’ was not declared in this scope 22 | else puts("32"); | ^~~~ answer.code: In function ‘int main()’: answer.code:26:5: error: ‘ios’ has not been declared 26 | ios::sync_with_stdio(false); | ^~~ answer.code:27:5: error: ‘cin’ was not declared in this scope 27 | cin.tie(0); | ^~~ answer.code:28:5: error: ‘cout’ was not declared in this scope 28 | cout.tie(0); | ^~~~