QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#232074 | #7062. Prince and Princess | Ronbogo# | WA | 0ms | 3688kb | C++20 | 258b | 2023-10-29 20:27:27 | 2023-10-29 20:27:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if (b+c>=a){
cout<<"NO";return 0;
}
cout<<"YES"<<'\n';
if (b==0&&c==0){cout<<1;return 0;
}
if (b+c==a+1)cout<<a+b+c;
else cout<<(b+c)*2+1;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
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: 3688kb
input:
1 1 0
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
89586 69086 24655
output:
NO
result:
ok single line: 'NO'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
158180 57864 93937
output:
YES 303603
result:
ok 2 lines
Test #5:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
51497 19791 57294
output:
NO
result:
ok single line: 'NO'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
37924 72502 88364
output:
NO
result:
ok single line: 'NO'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
38506 50719 9243
output:
NO
result:
ok single line: 'NO'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
44623 66300 29302
output:
NO
result:
ok single line: 'NO'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
164851 97868 94938
output:
NO
result:
ok single line: 'NO'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
163100 62397 99567
output:
YES 323929
result:
ok 2 lines
Test #11:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
180210 69137 35332
output:
YES 208939
result:
ok 2 lines
Test #12:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
108374 4656 91320
output:
YES 191953
result:
ok 2 lines
Test #13:
score: -100
Wrong Answer
time: 0ms
memory: 3536kb
input:
1 0 0
output:
YES 1
result:
wrong answer 2nd lines differ - expected: '0', found: '1'