QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#234971#7062. Prince and PrincessnekoWA 0ms3692kbC++14384b2023-11-02 09:41:212023-11-02 09:41:22

Judging History

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

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

answer

#include<bits/stdc++.h>

#define ll long long
using namespace std;

int f, t, a;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cin >> t >> f >> a;
    if (abs(f - t) <= a) {
        cout << "NO" << endl;
        return 0;
    }
    cout << "YES" << endl;
    cout << 2 * (min(f, t) + a) + 1 << endl;
    return 0;
}

詳細信息

Test #1:

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

input:

2 0 0

output:

YES
1

result:

ok 2 lines

Test #2:

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

input:

1 1 0

output:

NO

result:

ok single line: 'NO'

Test #3:

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

input:

89586 69086 24655

output:

NO

result:

ok single line: 'NO'

Test #4:

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

input:

158180 57864 93937

output:

YES
303603

result:

ok 2 lines

Test #5:

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

input:

51497 19791 57294

output:

NO

result:

ok single line: 'NO'

Test #6:

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

input:

37924 72502 88364

output:

NO

result:

ok single line: 'NO'

Test #7:

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

input:

38506 50719 9243

output:

YES
95499

result:

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