QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#232083#7062. Prince and PrincessRonbogo#Compile Error//C++20214b2023-10-29 20:37:432023-10-29 20:37:43

Judging History

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

  • [2024-03-10 21:15:22]
  • hack成功,自动添加数据
  • (/hack/570)
  • [2024-03-10 21:10:56]
  • hack成功,自动添加数据
  • (/hack/569)
  • [2023-10-29 20:37:43]
  • 评测
  • [2023-10-29 20:37:43]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long a,b,c;
	cin>>a>>b>>c;
	if (b+c>=a){
		cout<<"NO";
                return 0;
	}
	cout<<"YES"<<'\n';
	else cout<<(b+c)*2+1;
	return 0;
}

详细

answer.code: In function ‘int main()’:
answer.code:11:9: error: ‘else’ without a previous ‘if’
   11 |         else cout<<(b+c)*2+1;
      |         ^~~~