QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#736005#7062. Prince and PrincessTytytonyWA 0ms3720kbC++23276b2024-11-11 23:28:572024-11-11 23:28:58

Judging History

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

  • [2024-11-11 23:28:58]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3720kb
  • [2024-11-11 23:28:57]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;

int a,b,c; 

int main(){
	cin>>a>>b>>c;
	if(abs(a-b)<=c){
		cout<<"NO\n";
		return 0;
	}
	cout<<"YES\n";
	cout<<2*min(a+c,b+c)+1;
	return 0;

}

详细

Test #1:

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

input:

2 0 0

output:

YES
1

result:

ok 2 lines

Test #2:

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

input:

1 1 0

output:

NO

result:

ok single line: 'NO'

Test #3:

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

input:

89586 69086 24655

output:

NO

result:

ok single line: 'NO'

Test #4:

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

input:

158180 57864 93937

output:

YES
303603

result:

ok 2 lines

Test #5:

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

input:

51497 19791 57294

output:

NO

result:

ok single line: 'NO'

Test #6:

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

input:

37924 72502 88364

output:

NO

result:

ok single line: 'NO'

Test #7:

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

input:

38506 50719 9243

output:

YES
95499

result:

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