QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#548136 | #7062. Prince and Princess | Tahmid76 | Compile Error | / | / | C++14 | 469b | 2024-09-05 15:47:51 | 2024-09-05 15:47:51 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve(){
int a,b,c;
cin >> a >> b >> c;
if(b==0 && c==0){
cout << "YES\n";
cout << a!=1 << endl;
return;
}
else if(b+c>=a){
cout << "NO\n";
return;
}
else{
cout << "YES\n";
cout << (b+c)*2+1 << endl;
}
}
int main(){
int t=1;
// cin >> t;
while(t--){
solve();
}
}
詳細信息
answer.code: In function ‘void solve()’: answer.code:9:22: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<<’ 9 | cout << a!=1 << endl; | ~~^~~~~~~