QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#757541 | #7779. Swiss Stage | jr_zlw# | Compile Error | / | / | C++17 | 600b | 2024-11-17 09:59:06 | 2024-11-17 09:59:07 |
Judging History
answer
#include<bits/stdc++.h>
#define rep(a,b,c) for(int c(a);c<=(b);++c)
using namespace std;
inline void Solve()
{
int x,y;
scanf("%d%d",&x,&y);
if(x==1&&y==0)
{
puts("3");
}
else if(x==0&&y==0)
{
puts("4");
}
else if(x==0&&y==1)
{
puts("4");
}
else if(x==0&&y==2)
{
puts("6");
}
else if(x==1&&y==1)
{
puts("3");
}
else if(x==1&&y==2)
{
puts("4");
}
else if(x==2&&y==0)
{
puts("2");
}
else if(x==2&&y==1)
{
puts("2");
}
else
{
puts("2");
}
return 0;
}
int main(){
int T=1;
while(T--)Solve();
return 0;
}
详细
answer.code: In function ‘void Solve()’: answer.code:44:16: error: return-statement with a value, in function returning ‘void’ [-fpermissive] 44 | return 0; | ^ answer.code:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%d",&x,&y); | ~~~~~^~~~~~~~~~~~~~