QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#682579 | #7779. Swiss Stage | zyq_313# | Compile Error | / | / | C++14 | 477b | 2024-10-27 16:10:41 | 2024-10-27 16:10:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
void solve(){
int x, y;
cin >> x >> y;
if(x==0) {
if(y==0) cout<<4<<endl;
if(y==1) cout<<4<<endl;
if(y==2) cout<<6<<endl;
}
if(x==1) {
if(y==0) cout<<3<<endl;
if(y==1) cout<<3<<endl;
if(y==2) cout<<4<<endl;
}
if(x==2) {
cout<<2<<endl;
}
int main(){
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int t = 1;
// cin >> t;
while (t --) solve();
}
詳細信息
answer.code: In function ‘void solve()’: answer.code:22:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 22 | int main(){ | ^~ answer.code:22:9: note: remove parentheses to default-initialize a variable 22 | int main(){ | ^~ | -- answer.code:22:9: note: or replace parentheses with braces to value-initialize a variable answer.code:22:11: error: a function-definition is not allowed here before ‘{’ token 22 | int main(){ | ^ answer.code:27:2: error: expected ‘}’ at end of input 27 | } | ^ answer.code:6:13: note: to match this ‘{’ 6 | void solve(){ | ^