QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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();
}
}
Details
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; | ~~^~~~~~~