QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#232050#7062. Prince and PrincessRonbogo#WA 0ms3692kbC++20254b2023-10-29 19:48:592023-10-29 19:48:59

Judging History

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

  • [2024-03-10 21:15:22]
  • hack成功,自动添加数据
  • (/hack/570)
  • [2024-03-10 21:10:56]
  • hack成功,自动添加数据
  • (/hack/569)
  • [2023-10-29 19:48:59]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3692kb
  • [2023-10-29 19:48:59]
  • 提交

answer

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3620kb

input:

2 0 0

output:

YES
1

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

1 1 0

output:

NO

result:

ok single line: 'NO'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3692kb

input:

89586 69086 24655

output:

YES
162829

result:

wrong answer 1st lines differ - expected: 'NO', found: 'YES'