QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#234754 | #7062. Prince and Princess | stcmuyi# | AC ✓ | 1ms | 3572kb | C++20 | 494b | 2023-11-01 21:45:57 | 2023-11-01 21:45:58 |
Judging History
answer
#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define i64 long long
#define endl '\n'
#define lb(x) ((x) & (-x))
using namespace std;
const i64 mod = 1e9+7;
const int maxn = 1e4+10;
signed main()
{
IOS;
int a,b,c; cin >> a >> b >> c;
if(a <= b+c) cout << "NO" << endl;
else
{
cout << "YES" << endl;
if(a == 1) cout << "0" << endl;
else cout << (b+c)*2+1 << endl;
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3392kb
input:
2 0 0
output:
YES 1
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3392kb
input:
1 1 0
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
89586 69086 24655
output:
NO
result:
ok single line: 'NO'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
158180 57864 93937
output:
YES 303603
result:
ok 2 lines
Test #5:
score: 0
Accepted
time: 0ms
memory: 3392kb
input:
51497 19791 57294
output:
NO
result:
ok single line: 'NO'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
37924 72502 88364
output:
NO
result:
ok single line: 'NO'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
38506 50719 9243
output:
NO
result:
ok single line: 'NO'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3400kb
input:
44623 66300 29302
output:
NO
result:
ok single line: 'NO'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3400kb
input:
164851 97868 94938
output:
NO
result:
ok single line: 'NO'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
163100 62397 99567
output:
YES 323929
result:
ok 2 lines
Test #11:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
180210 69137 35332
output:
YES 208939
result:
ok 2 lines
Test #12:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
108374 4656 91320
output:
YES 191953
result:
ok 2 lines
Test #13:
score: 0
Accepted
time: 0ms
memory: 3392kb
input:
1 0 0
output:
YES 0
result:
ok 2 lines
Test #14:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
10 0 0
output:
YES 1
result:
ok 2 lines