QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#131851#5133. Imperfect Imperial UnitsYarema#AC ✓251ms3900kbC++171.4kb2023-07-28 15:53:572023-07-28 15:54:00

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-28 15:54:00]
  • 评测
  • 测评结果:AC
  • 用时:251ms
  • 内存:3900kb
  • [2023-07-28 15:53:57]
  • 提交

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;

const int INF = 1e9 + 7;

const int N = 447;

map<string, int> m;
vector<pair<int, __float128>> g[N];

__float128 val[N];
bool used[N];

void dfs(int v, __float128 a)
{
	used[v] = 1;
	val[v] = a;
	for (auto& [to, d] : g[v])
		if (!used[to])
			dfs(to, a * d);
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int idx = 0;
	int n, q;
	cin >> n >> q;
	FOR (i, 0, n)
	{
		string s, t;
		long double d;
		cin >> s >> s >> t >> d >> t;
		if (!m.count(s))
			m[s] = idx++;
		if (!m.count(t))
			m[t] = idx++;
		g[m[s]].PB({m[t], d});
		g[m[t]].PB({m[s], 1 / d});
	}
	cout << fixed << setprecision(300);
	FOR (j, 0, SZ(m)) val[j] = -74;
	FOR (i, 0, q)
	{
		long double x;
		string s, t;
		cin >> x >> s >> t >> t;
		int v = m[s];
		dfs(v, x);
		if (val[m[t]] < -47)
			cout << "impossible\n";
		else
			cout << (long double)val[m[t]] << '\n';
		FOR (j, 0, SZ(m))
		{
			used[j] = 0;
			val[j] = -74;
		}
	}
	
	
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3748kb

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:

0.7500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #2:

score: 0
Accepted
time: 0ms
memory: 3872kb

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:

8509240.2464065708427369827404618263244628906250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #3:

score: 0
Accepted
time: 1ms
memory: 3696kb

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:

0.0000000000000000044394035029033849474005178794794160721119496874077861049961296613375338893092703074216842651367187500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #4:

score: 0
Accepted
time: 96ms
memory: 3896kb

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:

7540565404.5878788223490118980407714843750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #5:

score: 0
Accepted
time: 1ms
memory: 3800kb

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:

57945237.740397935289365705102682113647460937500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #6:

score: 0
Accepted
time: 0ms
memory: 3880kb

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:

0.0024363574309401472516486953333314513514551435946486890316009521484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #7:

score: 0
Accepted
time: 91ms
memory: 3896kb

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:

5583007873719478945471962605109356943148853226264068096.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #8:

score: 0
Accepted
time: 101ms
memory: 3704kb

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:

102257618718385980628992.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #9:

score: 0
Accepted
time: 112ms
memory: 3708kb

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:

6003779053228542274841039278472677031936.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #10:

score: 0
Accepted
time: 11ms
memory: 3700kb

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:

12195814801254158672380572336115227595365750407168.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #11:

score: 0
Accepted
time: 1ms
memory: 3688kb

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:

0.7064386677620646381309255090741316962521523237228393554687500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #12:

score: 0
Accepted
time: 59ms
memory: 3716kb

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:

0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #13:

score: 0
Accepted
time: 60ms
memory: 3704kb

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:

0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #14:

score: 0
Accepted
time: 78ms
memory: 3708kb

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:

0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000137247787600736136393866950369337973706498913056600921799037924563372248695961887052296989240702566886458760616342777409297345463560604329132497795373740877717721634064836856632524...

result:

ok 

Test #15:

score: 0
Accepted
time: 69ms
memory: 3836kb

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.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #16:

score: 0
Accepted
time: 105ms
memory: 3820kb

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:

99999999999999999996693535322073426194986990198284960792713915417520186694826443244189778401170554880.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #17:

score: 0
Accepted
time: 245ms
memory: 3836kb

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:

100000000000000000001306338593867813193286239641666938228236899693517805332016156193366617731817347789926294211856470235704757344154848189459793301705153549783206768801204551359895956599945453988253868608426068842563750792196190750588312338999097538263366619451242651251292344694091626418654258738180...

result:

ok 

Test #18:

score: 0
Accepted
time: 109ms
memory: 3716kb

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:

887520371224771505660930051115048130581194377754120552263450624.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #19:

score: 0
Accepted
time: 251ms
memory: 3892kb

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:

999999999898999997279922326570318807142467157678880773235090880648930534688177321120135710857609483518823486026142218423794770297515187605081064932038928209171201041997183216313045661415475081454904544969365286869257424259937250890451780512701849662128768218116521325954244827780938085418947150438465...

result:

ok 

Test #20:

score: 0
Accepted
time: 110ms
memory: 3784kb

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:

99999998990000004703760194837458282425585003360889281090156809791954306223437356096465459080102674432.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #21:

score: 0
Accepted
time: 0ms
memory: 3756kb

input:

1 1
1 a = 0.001 b
0.001 a to b

output:

0.000000999999999999999999932852786595395425464638528012528695398941636085510253906250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok 

Test #22:

score: 0
Accepted
time: 1ms
memory: 3684kb

input:

1 1
1 a = 1 b
1 a to b

output:

1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok 

Test #23:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

1 1
1 a = 1 b
1 a to a

output:

1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok 

Test #24:

score: 0
Accepted
time: 1ms
memory: 3684kb

input:

1 1
1 a = 1000 b
1000 a to b

output:

1000000.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #25:

score: 0
Accepted
time: 1ms
memory: 3616kb

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: 91ms
memory: 3896kb

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:

0.6768908856129444345036023922279611042540636844933032989501953125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #27:

score: 0
Accepted
time: 90ms
memory: 3772kb

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:

71.205427014582844798262772911812135134823620319366455078125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #28:

score: 0
Accepted
time: 87ms
memory: 3900kb

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:

403648.49477223535876646565156988799571990966796875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #29:

score: 0
Accepted
time: 11ms
memory: 3808kb

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:

1120.8556382244692992689039101605885662138462066650390625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #30:

score: 0
Accepted
time: 11ms
memory: 3756kb

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:

14283.482154125767930707979758153669536113739013671875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #31:

score: 0
Accepted
time: 5ms
memory: 3708kb

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:

0.0060828708906356006366445375848489574011068725667428225278854370117187500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #32:

score: 0
Accepted
time: 1ms
memory: 3772kb

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:

899.26562014900000002759483663794526364654302597045898437500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #33:

score: 0
Accepted
time: 1ms
memory: 3880kb

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:

0.0015225650054485461553110031739446950105332234670640900731086730957031250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #34:

score: 0
Accepted
time: 1ms
memory: 3876kb

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:

304830.67294521213560187788971234112977981567382812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #35:

score: 0
Accepted
time: 87ms
memory: 3896kb

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:

206.23049519198686560517153054661321220919489860534667968750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #36:

score: 0
Accepted
time: 73ms
memory: 3788kb

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:

4347.2163719143389362109530793532030656933784484863281250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #37:

score: 0
Accepted
time: 91ms
memory: 3712kb

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:

842.85774135391384509485845910603529773652553558349609375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #38:

score: 0
Accepted
time: 12ms
memory: 3700kb

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:

654.22845420624743928428301842359360307455062866210937500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #39:

score: 0
Accepted
time: 0ms
memory: 3776kb

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:

202.83327260023500891727987749391104443930089473724365234375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok