QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#349968 | #6727. K-hour Clock | wudibaolong# | WA | 23ms | 3644kb | C++14 | 365b | 2024-03-10 10:18:41 | 2024-03-10 10:18:41 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
using namespace std;
void solve() {
int x, y, z;
cin >> x >> y >> z;
int ans = x + y - z;
if (ans >= 1 && ans <= 2e9 && ans > x && ans > z) cout << ans << '\n';
else cout << "-1\n";
}
signed main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
int t = 1;
cin >> t;
while (t--) solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3564kb
input:
4 11 18 5 3 49 4 1 9 1 1 3 10
output:
24 48 9 -1
result:
ok 4 cases
Test #2:
score: -100
Wrong Answer
time: 23ms
memory: 3644kb
input:
100000 186826504 580942638 34507146 409013320 825277663 642758065 221040339 32805624 253845963 759538401 529610463 314034771 591738614 223935926 591499221 272890462 257036262 529926724 644722795 540369561 79342760 141738127 915104743 658190166 378771709 735410115 474472687 550207480 676282297 233056...
output:
733261996 -1 -1 975114093 -1 -1 1105749596 -1 639709137 1203184138 -1 1057591501 -1 847965981 -1 -1 -1 1229562136 797923156 -1 -1 -1 913981025 -1 -1 -1 1345234741 -1 1053306920 -1 -1 -1 -1 -1 -1 326906843 -1 -1 -1 -1 -1 -1 241058758 1450926252 -1 -1 -1 -1 -1 -1 1068580042 489254297 -1 803783602 7933...
result:
wrong answer Case #3: Participant says impossible but a solution actually exists (x = 221040339, y = 32805624, z = 253845963, k = -1)