QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#234976#7062. Prince and PrincessnekoWA 0ms3396kbC++14476b2023-11-02 09:46:182023-11-02 09:46:18

Judging History

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

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

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;
    }
    if(!(t>a&&t>f)||!(t<a&&t<f)){
        cout << "NO" << endl;
        return 0;
    }
    cout << "YES" << endl;
    cout << 2 * (min(f, t) + a) + 1 << endl;
    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3396kb

input:

2 0 0

output:

NO

result:

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