QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#131841 | #5133. Imperfect Imperial Units | mshcherba# | AC ✓ | 19ms | 4676kb | C++17 | 1.6kb | 2023-07-28 15:35:16 | 2023-07-28 15:35:18 |
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;
typedef long double db;
map<string, int> idx;
int getIdx(const string& s) {
if (!idx.count(s)) {
int sz = SZ(idx);
idx[s] = sz;
}
return idx[s];
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout << scientific << setprecision(10);
int n, q;
cin >> n >> q;
vector d(2 * n, vector<db>(2 * n, -1));
vector g(2 * n, vector<int>(2 * n, 0));
FOR(i, 0, 2 * n) {
d[i][i] = 0;
g[i][i] = 1;
}
FOR(i, 0, n) {
string one, unit1, equals, unit2;
db v;
cin >> one >> unit1 >> equals >> v >> unit2;
assert(one == "1" && equals == "=");
int idx1 = getIdx(unit1), idx2 = getIdx(unit2);
d[idx1][idx2] = log(v);
g[idx1][idx2] = 1;
d[idx2][idx1] = -d[idx1][idx2];
g[idx2][idx1] = 1;
}
int m = SZ(idx);
FOR(k, 0, m) {
FOR(i, 0, m) {
FOR(j, 0, m) {
if (g[i][k] == 1 && g[k][j] == 1) {
d[i][j] = d[i][k] + d[k][j];
g[i][j] = 1;
}
}
}
}
while (q--) {
db v;
string unit1, unit2, to;
cin >> v >> unit1 >> to >> unit2;
assert(to == "to");
int idx1 = getIdx(unit1), idx2 = getIdx(unit2);
if (!g[idx1][idx2]) {
cout << "impossible\n";
}
else {
cout << v * exp(d[idx1][idx2]) << "\n";
}
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3764kb
input:
4 3 1 foot = 12 inch 1 yard = 3 foot 1 meter = 100 centimeter 1 centimeter = 10 millimeter 750 millimeter to meter 42 yard to inch 10 meter to foot
output:
7.5000000000e-01 1.5120000000e+03 impossible
result:
ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
4 3 1 fortnight = 14 day 1 microcentury = 0.036525 day 1 microcentury = 1000 nanocentury 1 week = 7 day 22.2 fortnight to nanocentury 2.5 nanocentury to week 3.14 day to fortnight
output:
8.5092402464e+06 1.3044642857e-05 2.2428571429e-01
result:
ok
Test #3:
score: 0
Accepted
time: 1ms
memory: 3868kb
input:
10 2 1 micrometer = 1000 nanometer 1 millimeter = 1000 micrometer 1 meter = 1000 millimeter 1 kilometer = 1000 meter 1 megameter = 1000 kilometer 1 lightsecond = 299.792458 meter 1 lightminute = 60 lightsecond 1 lighthour = 60 lightminute 1 lightday = 24 lighthour 1 lightyear = 365.25 lightday 42 na...
output:
4.4394035029e-18 3.9735067985e+20
result:
ok
Test #4:
score: 0
Accepted
time: 10ms
memory: 4488kb
input:
100 10000 1 ooooooooooooooooolol = 913.613760987 ooooooooooooolooooll 1 oooooooooooooloollol = 626.088582061 ooooooooooooololooll 1 oooooooooooooolololo = 955.470952951 oooooooooooooloolooo 1 oooooooooooooooooool = 942.991120183 oooooooooooooooloolo 1 oooooooooooooooloooo = 537.689261619 ooooooooooo...
output:
7.5405654046e+09 7.4803334604e-12 6.2127297073e+00 1.0744657979e+02 5.3747666998e+02 4.8084335782e-07 2.5006920168e+00 4.3554794101e+07 4.3699125378e+02 1.6358985539e+10 6.0891810366e-06 7.0214207951e+04 2.9623949884e+00 1.9265570238e-02 2.9142515722e+12 5.2032244103e+06 1.5634480896e+04 5.536312273...
result:
ok
Test #5:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
5 42 1 ooooooooooooooooooll = 142.885328495 oooooooooooooooooloo 1 oooooooooooooooooolo = 890.325815433 ooooooooooooooooooll 1 oooooooooooooooooolo = 981.374056267 oooooooooooooooooool 1 ooooooooooooooooolol = 852.547129907 oooooooooooooooooloo 1 ooooooooooooooooooll = 723.801234729 oooooooooooooooo...
output:
5.7945237740e+07 2.5962819457e+00 3.0258535793e+03 3.7280037384e+00 2.1752362642e-01 9.2614933791e+04 1.9848529113e+03 1.1499485884e+00 3.4814967873e+05 1.5223604418e+02 3.7117733245e+01 1.3361405099e+05 2.4931954862e+00 4.1972542550e+00 3.7682816550e+00 8.8321218443e+02 1.4917500010e+03 2.655952870...
result:
ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
5 42 1 oooooooooooooooooooo = 732.078459045 oooooooooooooooooolo 1 ooooooooooooooooolol = 844.175222640 oooooooooooooooooolo 1 oooooooooooooooooool = 997.155262893 ooooooooooooooooooll 1 oooooooooooooooooloo = 645.410166331 ooooooooooooooooolol 1 ooooooooooooooooooll = 485.989361539 oooooooooooooooo...
output:
2.4363574309e-03 3.3773235361e+11 6.8068215737e+01 1.6687162529e-03 3.3063822167e+08 1.0020698844e+00 5.9728995663e-01 4.0325721894e-01 6.0736687277e+05 4.7879537012e-04 1.1220378037e-01 5.4420852147e+02 1.0068511214e+00 9.6053716944e+01 3.2856774057e+02 2.8698946448e+05 3.6128380961e-01 6.701222781...
result:
ok
Test #7:
score: 0
Accepted
time: 17ms
memory: 4672kb
input:
100 10000 1 oooooooooooooooooooo = 100.473080734 oooooooooooooooooool 1 oooooooooooooooooool = 161.954929534 oooooooooooooooooolo 1 oooooooooooooooooolo = 231.933887741 ooooooooooooooooooll 1 ooooooooooooooooooll = 481.662840068 oooooooooooooooooloo 1 oooooooooooooooooloo = 566.369884850 ooooooooooo...
output:
5.5830078737e+54 5.1972376134e+144 1.0675021371e-182 1.0648211746e+05 1.7847955870e-21 8.8563381255e+61 1.1969445194e-95 1.9376893984e-52 1.6403345556e-11 1.3755636781e-37 1.1455629474e+00 1.4226377181e-36 8.2022822587e+51 1.5874425088e-26 2.3143683193e+121 2.6187418604e+21 1.8201303376e+222 8.88768...
result:
ok
Test #8:
score: 0
Accepted
time: 13ms
memory: 4488kb
input:
100 10000 1 oooooooooooooooooooo = 667.152266248 oooooooooooooooooool 1 oooooooooooooooooool = 275.388730431 oooooooooooooooooolo 1 oooooooooooooooooolo = 850.056569929 ooooooooooooooooooll 1 ooooooooooooooooooll = 968.012584255 oooooooooooooooooloo 1 oooooooooooooooooloo = 602.896729977 ooooooooooo...
output:
1.0225761872e+23 9.5486320206e+01 3.9768869204e+61 6.8606260961e-24 8.2347688411e+150 1.8251919556e-111 1.6210301541e+42 1.1882209499e+29 1.6633746281e+157 9.3612381157e-86 1.0758540602e+41 1.0772156574e-17 1.5545841112e-33 1.7811129047e+82 5.0851955429e+02 1.5493022515e+172 3.0846620369e-08 4.26837...
result:
ok
Test #9:
score: 0
Accepted
time: 17ms
memory: 4488kb
input:
100 10000 1 oooooooooooooooooooo = 119.902630504 oooooooooooooooooool 1 oooooooooooooooooool = 317.399001691 oooooooooooooooooolo 1 oooooooooooooooooolo = 29.526873476 ooooooooooooooooooll 1 ooooooooooooooooooll = 226.003375174 oooooooooooooooooloo 1 oooooooooooooooooloo = 977.948345504 oooooooooooo...
output:
6.0037790532e+39 3.3374734073e-217 6.9553842409e+122 1.2851529262e+31 3.9411875498e+167 4.9264091565e-45 6.4931199274e+32 3.5526367235e+207 1.1347656287e+53 3.4338209932e-06 4.3031650155e+100 3.5836293488e+05 7.5175181605e-156 7.2505901522e+106 9.2959741602e-28 7.8806297241e-109 1.6009468665e-136 1....
result:
ok
Test #10:
score: 0
Accepted
time: 3ms
memory: 3924kb
input:
42 1337 1 oooooooooooooooooooo = 835.161633070 oooooooooooooooooool 1 oooooooooooooooooool = 628.032987858 oooooooooooooooooolo 1 oooooooooooooooooolo = 613.458608316 ooooooooooooooooooll 1 ooooooooooooooooooll = 669.609173844 oooooooooooooooooloo 1 oooooooooooooooooloo = 192.692866236 ooooooooooooo...
output:
1.2195814801e+49 4.1802651338e+20 1.0409406609e-74 1.0940405593e+21 2.2934518174e+45 8.0142948075e-20 9.5746301279e-85 3.1941210603e+27 2.8699705686e-02 5.1956726787e+81 2.6660731102e-92 4.3434074639e+53 2.2623919912e+43 9.8702173318e-45 3.8910691339e-60 6.6126140637e+05 6.8481878697e+67 1.277292473...
result:
ok
Test #11:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
5 42 1 oooooooooooooooooooo = 415.717707048 oooooooooooooooooool 1 oooooooooooooooooool = 567.879837190 oooooooooooooooooolo 1 oooooooooooooooooolo = 247.709598786 ooooooooooooooooooll 1 ooooooooooooooooooll = 844.646506012 oooooooooooooooooloo 1 oooooooooooooooooloo = 125.341351424 oooooooooooooooo...
output:
7.0643866776e-01 4.7436448442e+00 1.2234137117e+08 2.6184240520e+13 1.4753088367e+10 4.1198591485e+15 6.1112820334e-03 6.1982716147e+07 4.3257572872e+07 1.8521419501e-08 6.9515726082e-01 1.5780540672e-09 1.7904441467e+05 1.5325785821e+10 5.2834663156e-08 3.5235664871e-06 2.9943672121e+10 1.452590661...
result:
ok
Test #12:
score: 0
Accepted
time: 7ms
memory: 4488kb
input:
100 10000 1 oooooooooooooooooooo = 0.001000000 oooooooooooooooooool 1 oooooooooooooooooool = 0.001000000 oooooooooooooooooolo 1 oooooooooooooooooolo = 0.001000000 ooooooooooooooooooll 1 ooooooooooooooooooll = 0.001000000 oooooooooooooooooloo 1 oooooooooooooooooloo = 0.001000000 ooooooooooooooooolol ...
output:
1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000e-303 1.0000000000...
result:
ok
Test #13:
score: 0
Accepted
time: 16ms
memory: 4616kb
input:
100 10000 1 oooooooooooooooooooo = 0.001111111 oooooooooooooooooool 1 oooooooooooooooooool = 0.001111111 oooooooooooooooooolo 1 oooooooooooooooooolo = 0.001111111 ooooooooooooooooooll 1 ooooooooooooooooooll = 0.001111111 oooooooooooooooooloo 1 oooooooooooooooooloo = 0.001111111 ooooooooooooooooolol ...
output:
4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941e-299 4.1831376941...
result:
ok
Test #14:
score: 0
Accepted
time: 11ms
memory: 4492kb
input:
100 10000 1 oooooooooooooooooooo = 0.100000000 oooooooooooooooooool 1 oooooooooooooooooool = 0.100000000 oooooooooooooooooolo 1 oooooooooooooooooolo = 0.100000000 ooooooooooooooooooll 1 ooooooooooooooooooll = 0.100000000 oooooooooooooooooloo 1 oooooooooooooooooloo = 0.100000000 ooooooooooooooooolol ...
output:
1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000e-101 1.0000000000...
result:
ok
Test #15:
score: 0
Accepted
time: 13ms
memory: 4564kb
input:
100 10000 1 oooooooooooooooooooo = 1.000000000 oooooooooooooooooool 1 oooooooooooooooooool = 1.000000000 oooooooooooooooooolo 1 oooooooooooooooooolo = 1.000000000 ooooooooooooooooooll 1 ooooooooooooooooooll = 1.000000000 oooooooooooooooooloo 1 oooooooooooooooooloo = 1.000000000 ooooooooooooooooolol ...
output:
1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 1.000000000...
result:
ok
Test #16:
score: 0
Accepted
time: 12ms
memory: 4568kb
input:
100 10000 1 oooooooooooooooooooo = 10.000000000 oooooooooooooooooool 1 oooooooooooooooooool = 10.000000000 oooooooooooooooooolo 1 oooooooooooooooooolo = 10.000000000 ooooooooooooooooooll 1 ooooooooooooooooooll = 10.000000000 oooooooooooooooooloo 1 oooooooooooooooooloo = 10.000000000 oooooooooooooooo...
output:
1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000e+101 1.0000000000...
result:
ok
Test #17:
score: 0
Accepted
time: 17ms
memory: 4492kb
input:
100 10000 1 oooooooooooooooooooo = 1000.000000000 oooooooooooooooooool 1 oooooooooooooooooool = 1000.000000000 oooooooooooooooooolo 1 oooooooooooooooooolo = 1000.000000000 ooooooooooooooooooll 1 ooooooooooooooooooll = 1000.000000000 oooooooooooooooooloo 1 oooooooooooooooooloo = 1000.000000000 oooooo...
output:
1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000e+303 1.0000000000...
result:
ok
Test #18:
score: 0
Accepted
time: 12ms
memory: 4588kb
input:
100 10000 1 oooooooooooooooooooo = 4.200000000 oooooooooooooooooool 1 oooooooooooooooooool = 4.200000000 oooooooooooooooooolo 1 oooooooooooooooooolo = 4.200000000 ooooooooooooooooooll 1 ooooooooooooooooooll = 4.200000000 oooooooooooooooooloo 1 oooooooooooooooooloo = 4.200000000 ooooooooooooooooolol ...
output:
8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.8752037122e+62 8.875203712...
result:
ok
Test #19:
score: 0
Accepted
time: 19ms
memory: 4676kb
input:
100 10000 1 oooooooooooooooooooo = 999.999999999 oooooooooooooooooool 1 oooooooooooooooooool = 999.999999999 oooooooooooooooooolo 1 oooooooooooooooooolo = 999.999999999 ooooooooooooooooooll 1 ooooooooooooooooooll = 999.999999999 oooooooooooooooooloo 1 oooooooooooooooooloo = 999.999999999 ooooooooooo...
output:
9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990e+302 9.9999999990...
result:
ok
Test #20:
score: 0
Accepted
time: 12ms
memory: 4484kb
input:
100 10000 1 oooooooooooooooooooo = 9.999999999 oooooooooooooooooool 1 oooooooooooooooooool = 9.999999999 oooooooooooooooooolo 1 oooooooooooooooooolo = 9.999999999 ooooooooooooooooooll 1 ooooooooooooooooooll = 9.999999999 oooooooooooooooooloo 1 oooooooooooooooooloo = 9.999999999 ooooooooooooooooolol ...
output:
9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990e+100 9.9999998990...
result:
ok
Test #21:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
1 1 1 a = 0.001 b 0.001 a to b
output:
1.0000000000e-06
result:
ok
Test #22:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
1 1 1 a = 1 b 1 a to b
output:
1.0000000000e+00
result:
ok
Test #23:
score: 0
Accepted
time: 1ms
memory: 3728kb
input:
1 1 1 a = 1 b 1 a to a
output:
1.0000000000e+00
result:
ok
Test #24:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
1 1 1 a = 1000 b 1000 a to b
output:
1.0000000000e+06
result:
ok
Test #25:
score: 0
Accepted
time: 1ms
memory: 3664kb
input:
2 1 1 a = 1 b 1 c = 1 d 1 a to d
output:
impossible
result:
ok
Test #26:
score: 0
Accepted
time: 11ms
memory: 4592kb
input:
100 10000 1 ooooooooooooooololoo = 493.166249916 oooooooooooooollollo 1 ooooooooooooolollool = 26.647176218 oooooooooooooloolloo 1 oooooooooooooollolol = 886.594366999 oooooooooooooolooloo 1 ooooooooooooolololol = 32.115857191 oooooooooooooolloloo 1 oooooooooooooooooool = 322.957640630 ooooooooooooo...
output:
6.7689088561e-01 2.8452665038e-14 3.4008108044e+02 1.0072427754e-01 4.6944192299e+03 1.4205531743e+04 1.6057661087e-05 9.2914166855e+04 1.1320511234e+10 3.3620860344e+00 2.6370468578e+03 3.2317188778e+12 8.1693569156e-04 1.3374164749e+05 2.8477411704e+05 4.0377837139e-09 1.3174788469e+08 2.162883583...
result:
ok
Test #27:
score: 0
Accepted
time: 12ms
memory: 4488kb
input:
100 10000 1 ooooooooooooollooool = 137.600936806 ooooooooooooollooolo 1 ooooooooooooooolollo = 203.222671524 oooooooooooooooolloo 1 ooooooooooooollooolo = 543.294644613 ooooooooooooolololoo 1 oooooooooooooloollll = 321.682920121 ooooooooooooolollllo 1 ooooooooooooooololol = 8.196106325 ooooooooooooo...
output:
7.1205427015e+01 7.0896787229e-15 1.0071336845e+03 5.8000880355e+06 6.6014671042e+03 2.6390634284e+05 3.3519215181e-05 1.6654959800e-07 9.5095677598e-01 4.8911877363e-01 1.5091358655e+02 9.6574331123e-08 2.4738513158e+02 8.7628704614e-04 1.3835049621e-03 8.5957616164e-01 1.1637130219e-01 2.355359968...
result:
ok
Test #28:
score: 0
Accepted
time: 16ms
memory: 4672kb
input:
100 10000 1 oooooooooooooololool = 496.958070250 ooooooooooooooolllol 1 oooooooooooooooolooo = 681.691858619 ooooooooooooooolollo 1 ooooooooooooolollooo = 460.500914411 oooooooooooooollolol 1 oooooooooooooollolol = 472.546824524 oooooooooooooooooooo 1 oooooooooooooollloll = 128.859878296 ooooooooooo...
output:
4.0364849477e+05 3.8136426560e-03 3.6051396539e+02 3.0179213975e+08 5.8869373460e-09 4.7990740196e+04 3.5303479382e+01 2.4460889399e+03 3.0413413417e+04 7.5208431273e-02 2.2409121046e+01 1.6815762269e+01 1.1559195351e+10 6.0371572060e+01 1.8021609790e+00 3.2603013767e-03 1.6347519205e+00 1.122474720...
result:
ok
Test #29:
score: 0
Accepted
time: 3ms
memory: 3836kb
input:
42 1337 1 oooooooooooooololool = 44.381840397 oooooooooooooolololo 1 ooooooooooooooooooll = 269.810940492 oooooooooooooooolloo 1 oooooooooooooooololo = 108.649469327 ooooooooooooooolllll 1 ooooooooooooooolollo = 748.960543520 ooooooooooooooloolol 1 ooooooooooooooloolol = 310.489425772 oooooooooooooo...
output:
1.1208556382e+03 6.4404204719e+01 1.9835728677e+05 8.4627811499e+12 3.1354020115e+09 2.1203740347e-04 4.2000418198e-01 3.3082215458e-02 1.3871219739e+00 6.4508294663e+00 1.9289920126e-05 1.3490878687e+02 1.9863204625e+07 2.4965596072e+02 6.2533677736e-04 4.2297256847e-08 1.6153159264e+05 1.053911021...
result:
ok
Test #30:
score: 0
Accepted
time: 1ms
memory: 4016kb
input:
42 1337 1 ooooooooooooooollloo = 330.150347113 oooooooooooooolooloo 1 oooooooooooooooloooo = 901.873145108 ooooooooooooooollool 1 oooooooooooooolooooo = 51.460598371 ooooooooooooooloollo 1 ooooooooooooooollolo = 639.210964090 ooooooooooooooollool 1 ooooooooooooooolllll = 961.822268743 oooooooooooooo...
output:
1.4283482154e+04 4.6374874939e+16 1.4036109684e+05 1.6308090827e+14 5.1773625421e+09 2.8515967587e+02 9.4323158711e-06 5.1709960618e+15 1.6311809732e+03 2.8393147094e+04 1.2109664024e-02 5.8821960363e+06 8.1286601153e+07 4.7157522310e+08 1.7126745206e-03 2.8238220644e-02 1.4194816580e+03 2.936901773...
result:
ok
Test #31:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
42 1337 1 oooooooooooooolooool = 569.980782220 oooooooooooooolooloo 1 ooooooooooooooolllll = 215.830577497 ooooooooooooooolllol 1 oooooooooooooooollll = 880.635117530 oooooooooooooololool 1 oooooooooooooolooolo = 574.997979629 oooooooooooooooooooo 1 oooooooooooooooololo = 298.470367783 ooooooooooooo...
output:
6.0828708906e-03 2.5514977181e-04 6.9537809551e+01 4.7347625467e+10 6.2278380386e+01 1.7967583674e+03 2.3255864424e-07 2.9304929808e+00 2.9075757936e+00 1.5455673684e-03 6.3561305442e-01 1.3203634271e+12 5.8888307832e-05 1.8624612039e-09 2.7055488921e+03 1.1793315808e-06 1.3484482065e+00 2.476834351...
result:
ok
Test #32:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
5 42 1 oooooooooooooooooolo = 129.806996537 ooooooooooooooooolol 1 oooooooooooooooooooo = 575.147687931 ooooooooooooooooooll 1 oooooooooooooooooloo = 759.822984271 ooooooooooooooooooll 1 ooooooooooooooooolol = 666.896378712 oooooooooooooooooool 1 ooooooooooooooooolol = 57.518957291 ooooooooooooooooo...
output:
8.9926562015e+02 1.6481529915e-03 5.8194401738e+02 6.5336610061e+06 2.9172429909e+06 3.5856213790e+02 6.2844476843e-01 4.4966856069e+05 3.3071938032e+06 6.2896511163e+02 2.3715626844e+01 5.7120751406e+04 8.7564960994e+04 5.7926557267e+00 7.4299315038e+04 6.7014123165e-03 4.5804890338e+02 6.146572815...
result:
ok
Test #33:
score: 0
Accepted
time: 1ms
memory: 3800kb
input:
5 42 1 ooooooooooooooooolol = 513.711702684 ooooooooooooooooooll 1 oooooooooooooooooooo = 635.118265036 ooooooooooooooooolol 1 oooooooooooooooooool = 691.634295323 ooooooooooooooooolol 1 ooooooooooooooooolol = 649.199448277 oooooooooooooooooloo 1 ooooooooooooooooolol = 702.818375033 oooooooooooooooo...
output:
1.5225650054e-03 8.0951656200e-01 3.6281506699e-01 1.4567922670e-03 7.4918270664e+02 2.6470047115e-03 3.3171000152e-01 1.1134962092e-03 1.7459759120e-03 4.9798054246e+05 8.4582985321e-04 1.5182249827e+08 8.1500665056e+06 9.7123089106e+02 1.4044680042e+01 1.9444569134e+07 5.0053982040e+02 6.302741603...
result:
ok
Test #34:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
5 42 1 oooooooooooooooooool = 126.260390138 oooooooooooooooooloo 1 oooooooooooooooooolo = 799.858354900 ooooooooooooooooooll 1 ooooooooooooooooooll = 100.791760383 oooooooooooooooooloo 1 ooooooooooooooooolol = 549.556228234 oooooooooooooooooloo 1 ooooooooooooooooolol = 600.803115587 oooooooooooooooo...
output:
3.0483067295e+05 8.4765789136e-01 6.7262021946e+04 2.6302052746e-01 8.1553689493e+02 7.6911023499e+01 1.0887258658e+05 1.7413746028e-01 4.2048041029e+00 2.1214737156e+02 9.2439069577e-03 3.3366092102e+02 2.8610246512e+01 4.5950082083e+02 8.3335512297e-01 3.1461987098e+05 2.1996071132e+02 5.186174512...
result:
ok
Test #35:
score: 0
Accepted
time: 18ms
memory: 4568kb
input:
100 10000 1 planck = 132.593277816 oooooooooooooooooool 1 planck = 610.342655336 oooooooooooooooooolo 1 planck = 461.844039046 ooooooooooooooooooll 1 planck = 448.239640872 oooooooooooooooooloo 1 planck = 924.952007926 ooooooooooooooooolol 1 planck = 391.818743373 ooooooooooooooooollo 1 planck = 663...
output:
2.0623049519e+02 7.4234719920e+01 6.7917303221e+01 9.4270360914e+01 2.1245309063e+02 1.5149532140e+02 2.4407420887e+03 5.1463796520e+01 3.8872140998e+02 2.8212073537e+02 3.0212471773e+02 4.7113834027e+02 2.3444326577e+01 7.4458089651e+02 5.6129360692e+02 8.8734026057e+00 3.6202555580e+03 2.031990953...
result:
ok
Test #36:
score: 0
Accepted
time: 12ms
memory: 4672kb
input:
100 10000 1 planck = 401.563428858 oooooooooooooooooool 1 planck = 975.997231759 oooooooooooooooooolo 1 planck = 937.013093440 ooooooooooooooooooll 1 planck = 298.209872552 oooooooooooooooooloo 1 planck = 483.564039774 ooooooooooooooooolol 1 planck = 938.369196996 ooooooooooooooooollo 1 planck = 644...
output:
4.3472163719e+03 6.4879760629e+02 8.1243667352e+02 3.1671457306e+02 4.7595982986e+01 5.7916419758e+02 4.7442677011e+02 4.0192782820e+00 4.3144964609e+01 4.2781280768e+02 1.4231289651e+02 1.4226580598e+03 5.4496571487e+02 1.7182048376e+02 8.3758588413e+02 7.2808098557e+02 3.1369586272e+03 1.315462435...
result:
ok
Test #37:
score: 0
Accepted
time: 18ms
memory: 4560kb
input:
100 10000 1 planck = 622.751076397 oooooooooooooooooool 1 planck = 370.788235246 oooooooooooooooooolo 1 planck = 952.034659630 ooooooooooooooooooll 1 planck = 743.103189301 oooooooooooooooooloo 1 planck = 456.313891438 ooooooooooooooooolol 1 planck = 652.437081684 ooooooooooooooooollo 1 planck = 147...
output:
8.4285774135e+02 1.7837886479e+02 7.4232202553e+01 3.8896011515e+02 5.4286813041e+02 1.0411584099e+03 9.9490490296e+03 2.2243317620e+03 5.7480054098e+02 8.9957124373e+02 1.2573785723e+03 5.2673718193e+01 8.9165541406e+01 4.6249628380e+02 1.8117281356e+00 7.7351904571e+01 2.5738824728e+02 8.573050794...
result:
ok
Test #38:
score: 0
Accepted
time: 4ms
memory: 3924kb
input:
42 1337 1 planck = 703.809344507 oooooooooooooooooool 1 planck = 290.944155351 oooooooooooooooooolo 1 planck = 417.218543423 ooooooooooooooooooll 1 planck = 146.901002229 oooooooooooooooooloo 1 planck = 814.107920094 ooooooooooooooooolol 1 planck = 372.579729191 ooooooooooooooooollo 1 planck = 60.93...
output:
6.5422845421e+02 2.6808498165e+02 5.7064549981e+02 5.5853833828e+01 1.5260796921e+00 5.4848026419e+01 2.7128065541e+01 4.4818542442e+00 5.4554002414e+02 3.4873994070e+01 2.2122207444e+03 4.5705078502e+02 7.7510104113e+03 3.0219882682e+02 3.2591095922e+03 1.0265396225e+03 2.8038341164e+02 1.358884185...
result:
ok
Test #39:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
5 42 1 planck = 392.647811073 oooooooooooooooooool 1 planck = 804.234719107 oooooooooooooooooolo 1 planck = 689.264489552 ooooooooooooooooooll 1 planck = 868.970029219 oooooooooooooooooloo 1 planck = 452.241497065 ooooooooooooooooolol 233.618067562 ooooooooooooooooolol to oooooooooooooooooool 811.91...
output:
2.0283327260e+02 1.7968499181e+03 8.8967372614e+01 4.2393206919e+02 5.8776400023e+02 6.1152688268e+02 1.0714106716e+03 4.5730108849e+02 9.0378719940e+02 4.1360975970e+02 3.6141305870e+02 6.4173041327e+02 1.1020641694e+03 7.4879805971e+02 2.6414679260e+02 2.8323883225e+02 6.8535891092e+02 9.422349192...
result:
ok