QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#548136#7062. Prince and PrincessTahmid76Compile Error//C++14469b2024-09-05 15:47:512024-09-05 15:47:51

Judging History

你现在查看的是最新测评结果

  • [2024-09-05 15:47:51]
  • 评测
  • [2024-09-05 15:47:51]
  • 提交

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;
      |                    ~~^~~~~~~