QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#137663 | #6727. K-hour Clock | Yarema# | WA | 11ms | 3636kb | C++17 | 681b | 2023-08-10 16:11:18 | 2023-08-10 16:11:19 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FOR(i, a, b) for (int i = (a); i<(b); ++i)
#define RFOR(i, b, a) for (int i = (b)-1; i>=(a); --i)
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define FILL(a, b) memset(a, b, sizeof(a))
typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
while (t--)
{
int x, y, z;
cin >> x >> y >> z;
int k = x + y - z;
if (k >= 0)
cout << k << '\n';
else
cout << -1 << '\n';
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3460kb
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: 11ms
memory: 3636kb
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 591532918 0 975114093 224175319 0 1105749596 398652704 639709137 1203184138 317612555 1057591501 0 847965981 -1 4320427 0 1229562136 797923156 233325064 0 0 913981025 347546858 0 -1 1345234741 0 1053306920 248241206 -1 0 -1 0 29016866 326906843 0 0 426219940 0 -1 133120806 241058758 145092...
result:
wrong answer Case #2: k <= z (x = 409013320, y = 825277663, z = 642758065, k = 591532918)