QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#601085 | #9296. Golden Spirit | miluosi | WA | 7ms | 3640kb | C++14 | 559b | 2024-09-29 20:47:46 | 2024-09-29 20:47:47 |
Judging History
answer
#include<iostream>
#include<unordered_map>
#include<vector>
#include<algorithm>
#include<string>
#include<math.h>
#include<map>
#include<set>
#include<string.h>
#include<iomanip>
#include<queue>
using namespace std;
const int N = 200015;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> PII;
//int mod = 998244353;
int main()
{
int t;
cin >> t;
while (t--)
{
int n, x, t;
cin >> n >> x >> t;
long long z = n*t+ n * t;
ll ans = z + z + max(0ll, x - z - t- t);
cout << ans << endl;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3640kb
input:
3 2 2 2 3 1 10 11 45 14
output:
16 120 616
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 7ms
memory: 3608kb
input:
10000 3050395 689380 200550 5885929 822329 269033 6682339 28476 346976 9571342 934182 89292 9928491 668975 401621 6524373 173981 202472 5331629 482403 456644 9661686 231207 298636 5454412 961564 632648 5186684 9125 590489 8036028 738212 913802 1211903 553317 790831 6044436 222947 254859 2202128 6558...
output:
-551956580 3254752324 -1342831428 -107688482 -773435117 1201626144 -1180558397 -1781891297 -567062452 1472665712 -2112324800 2531017540 2932555632 -296941545 -2028608550 -626738819 2136220744 3487319248 -1531143367 74466060 801811348 157894424 2492258424 -1510711560 2158139696 4247518096 -1868414930...
result:
wrong answer 1st lines differ - expected: '2447026869000', found: '-551956580'