QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#859218 | #2916. Scaling Recipe | WeaRD276# | AC ✓ | 0ms | 3712kb | C++20 | 1.2kb | 2025-01-17 16:35:24 | 2025-01-17 16:35:25 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define x first
#define y second
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
typedef long long ll;
typedef double db;
typedef long double LD;
typedef pair<int, int> pii;
typedef pair<db, db> pdd;
typedef pair<ll, ll> pll;
int solve()
{
int n, x, y;
if (!(cin >> n >> x >> y))
return 1;
FOR (i, 0, n)
{
int a;
cin >> a;
cout << a * y / x << '\n';
}
return 0;
}
int32_t main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int TET = 1e9;
//cin >> TET;
for (int i = 1; i <= TET; i++)
{
if (solve())
{
break;
}
#ifdef ONPC
cerr << "_____________________________\n";
#endif
}
#ifdef ONPC
cerr << "\nfinished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec\n";
#endif
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
input:
2 4 10 8 12
output:
20 30
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
3 37627 38021 34571 38009 34189
output:
34933 38407 34547
result:
ok 3 lines
Test #3:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
20 1 40000 40000 1 314 5234 31149 11 271 10 999 101 103 107 109 14 15 16 17 18 19 20
output:
1600000000 40000 12560000 209360000 1245960000 440000 10840000 400000 39960000 4040000 4120000 4280000 4360000 560000 600000 640000 680000 720000 760000 800000
result:
ok 20 lines
Test #4:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
8 8109 33898 37206 36729 10017 10494 30528 20034 24804 22896
output:
155532 153538 41874 43868 127616 83748 103688 95712
result:
ok 8 lines
Test #5:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
4 508 10626 24892 37846 17526 29972
output:
520674 791637 366597 626934
result:
ok 4 lines
Test #6:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
3 642 29203 14124 35310 26322
output:
642466 1606165 1197323
result:
ok 3 lines
Test #7:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
2 722 28143 2888 28880
output:
112572 1125720
result:
ok 2 lines
Test #8:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
14 2730 33026 5265 15405 21645 26325 9555 1560 7410 9360 23400 9945 38415 23205 29835 32955
output:
63693 186361 261849 318465 115591 18872 89642 113232 283080 120309 464723 280721 360927 398671
result:
ok 14 lines
Test #9:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
9 11856 26628 6916 988 8892 35568 22724 29640 11856 37544 27664
output:
15533 2219 19971 79884 51037 66570 26628 84322 62132
result:
ok 9 lines
Test #10:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
16 3576 17390 1788 17880 19668 16092 35760 7152 10728 30396 5364 8940 28608 23244 26820 33972 14304 21456
output:
8695 86950 95645 78255 173900 34780 52170 147815 26085 43475 139120 113035 130425 165205 69560 104340
result:
ok 16 lines
Test #11:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
18 37689 15504 8868 16258 27343 5173 39167 34733 36211 33994 31038 10346 18475 19953 14780 24387 15519 17736 3695 31777
output:
3648 6688 11248 2128 16112 14288 14896 13984 12768 4256 7600 8208 6080 10032 6384 7296 1520 13072
result:
ok 18 lines