QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#351375 | #7062. Prince and Princess | Yshanqian | WA | 1ms | 3676kb | C++14 | 1.3kb | 2024-03-11 21:15:49 | 2024-03-11 21:15:49 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define xx first
#define yy second
#define endl "\n"
#define lowbit(x) x & (-x)
#define int long long
#define ull unsigned long long
#define pb push_back
typedef pair<int, int> PII;
typedef pair<double, double> PDD;
#define LF(x) fixed << setprecision(x)
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define Yshanqian ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
const int N = 1e6 + 10, M = 1010, inf = 0x3f3f3f3f, mod = 1e9 + 7, P = 13331;
const double eps = 1e-8;
void solve()
{
int a, b, c;
cin >> a >> b >> c;
int s = a + b + c;
if (s == 1)
{
cout << "YES" << endl;
cout << 0 << endl;
return;
}
else if (s == a)
{
cout << "YES" << endl;
cout << 1 << endl;
return;
}
if (a > b + c)
{
cout << "YES" << endl;
cout << a + b + c << endl;
}
else
{
cout << "NO" << endl;
}
}
signed main()
{
Yshanqian;
int T;
T = 1;
// cin >> T;
for (int cases = 1; cases <= T; ++cases)
{
// cout<<"Case #"<<cases<<": ";
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3588kb
input:
2 0 0
output:
YES 1
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
1 1 0
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
89586 69086 24655
output:
NO
result:
ok single line: 'NO'
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3676kb
input:
158180 57864 93937
output:
YES 309981
result:
wrong answer 2nd lines differ - expected: '303603', found: '309981'