QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#374494#8316. Random PermutationPetroTarnavskyi#AC ✓1ms3924kbC++20636b2024-04-02 14:41:322024-04-02 14:41:33

Judging History

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

  • [2024-04-02 14:41:33]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3924kb
  • [2024-04-02 14:41:32]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#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--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second 

typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef long double db;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	cin >> n;
	db ans = 1;
	FOR (i, 1, n + 1)
	{
		ans *= i * i;
		ans /= n;
	}
	cout << fixed << setprecision(47) << ans << '\n';
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3884kb

input:

2

output:

1.00000000000000000000000000000000000000000000000

result:

ok found '1.000000000', expected '1.000000000', error '0.000000000'

Test #2:

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

input:

3

output:

1.33333333333333333336947340574951681446691509336

result:

ok found '1.333333333', expected '1.333333333', error '0.000000000'

Test #3:

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

input:

50

output:

104147662762941310818487818823710998616080384.00000000000000000000000000000000000000000000000

result:

ok found '104147662762941312066099264666008306912854016.000000000', expected '104147662762941312066099264666008306912854016.000000000', error '0.000000000'

Test #4:

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

input:

1

output:

1.00000000000000000000000000000000000000000000000

result:

ok found '1.000000000', expected '1.000000000', error '0.000000000'

Test #5:

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

input:

4

output:

2.25000000000000000000000000000000000000000000000

result:

ok found '2.250000000', expected '2.250000000', error '0.000000000'

Test #6:

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

input:

5

output:

4.60800000000000000051347814888913489994592964649

result:

ok found '4.608000000', expected '4.608000000', error '0.000000000'

Test #7:

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

input:

6

output:

11.11111111111111111188209932265635870862752199173

result:

ok found '11.111111111', expected '11.111111111', error '0.000000000'

Test #8:

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

input:

7

output:

30.84429106919735824252071232365324249258264899254

result:

ok found '30.844291069', expected '30.844291069', error '0.000000000'

Test #9:

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

input:

8

output:

96.89941406250000000000000000000000000000000000000

result:

ok found '96.899414062', expected '96.899414062', error '0.000000000'

Test #10:

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

input:

9

output:

339.89398635031922638050083662619726965203881263733

result:

ok found '339.893986350', expected '339.893986350', error '0.000000000'

Test #11:

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

input:

10

output:

1316.81894400000000022732393745172885246574878692627

result:

ok found '1316.818944000', expected '1316.818944000', error '0.000000000'

Test #12:

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

input:

11

output:

5584.59777978170593915052677402854897081851959228516

result:

ok found '5584.597779782', expected '5584.597779782', error '0.000000000'

Test #13:

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

input:

12

output:

25733.50694444444444997088794480077922344207763671875

result:

ok found '25733.506944444', expected '25733.506944444', error '0.000000000'

Test #14:

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

input:

13

output:

128025.66866558208869264490203931927680969238281250000

result:

ok found '128025.668665582', expected '128025.668665582', error '0.000000000'

Test #15:

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

input:

14

output:

683949.76495799106260164990089833736419677734375000000

result:

ok found '683949.764957991', expected '683949.764957991', error '0.000000000'

Test #16:

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

input:

15

output:

3905083.60652602785467024659737944602966308593750000000

result:

ok found '3905083.606526028', expected '3905083.606526028', error '0.000000000'

Test #17:

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

input:

16

output:

23731187.19206922833109274506568908691406250000000000000

result:

ok found '23731187.192069229', expected '23731187.192069229', error '0.000000000'

Test #18:

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

input:

17

output:

152934464.54970804639742709696292877197265625000000000000

result:

ok found '152934464.549708039', expected '152934464.549708039', error '0.000000000'

Test #19:

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

input:

18

output:

1041782238.14877047220943495631217956542968750000000000000

result:

ok found '1041782238.148770452', expected '1041782238.148770452', error '0.000000000'

Test #20:

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

input:

19

output:

7479469995.73051831917837262153625488281250000000000000000

result:

ok found '7479469995.730518341', expected '7479469995.730518341', error '0.000000000'

Test #21:

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

input:

20

output:

56448098958.87305914610624313354492187500000000000000000000

result:

ok found '56448098958.873062134', expected '56448098958.873062134', error '0.000000000'

Test #22:

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

input:

21

output:

446768591341.24636864662170410156250000000000000000000000000

result:

ok found '446768591341.246398926', expected '446768591341.246398926', error '0.000000000'

Test #23:

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

input:

22

output:

3700276748921.93576169013977050781250000000000000000000000000

result:

ok found '3700276748921.935546875', expected '3700276748921.935546875', error '0.000000000'

Test #24:

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

input:

23

output:

32007269639380.54180526733398437500000000000000000000000000000

result:

ok found '32007269639380.542968750', expected '32007269639380.542968750', error '0.000000000'

Test #25:

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

input:

24

output:

288630046441757.68951416015625000000000000000000000000000000000

result:

ok found '288630046441757.687500000', expected '288630046441757.687500000', error '0.000000000'

Test #26:

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

input:

25

output:

2708888570942365.17309570312500000000000000000000000000000000000

result:

ok found '2708888570942365.000000000', expected '2708888570942365.000000000', error '0.000000000'

Test #27:

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

input:

26

output:

26419890078249485.72265625000000000000000000000000000000000000000

result:

ok found '26419890078249484.000000000', expected '26419890078249484.000000000', error '0.000000000'

Test #28:

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

input:

27

output:

267389254029561668.01562500000000000000000000000000000000000000000

result:

ok found '267389254029561664.000000000', expected '267389254029561664.000000000', error '0.000000000'

Test #29:

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

input:

28

output:

2804508541393392134.50000000000000000000000000000000000000000000000

result:

ok found '2804508541393392128.000000000', expected '2804508541393392128.000000000', error '0.000000000'

Test #30:

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

input:

29

output:

30446382653772707152.00000000000000000000000000000000000000000000000

result:

ok found '30446382653772705792.000000000', expected '30446382653772705792.000000000', error '0.000000000'

Test #31:

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

input:

30

output:

341729529206733995136.00000000000000000000000000000000000000000000000

result:

ok found '341729529206733996032.000000000', expected '341729529206733996032.000000000', error '0.000000000'

Test #32:

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

input:

31

output:

3961238839958900960512.00000000000000000000000000000000000000000000000

result:

ok found '3961238839958900834304.000000000', expected '3961238839958900834304.000000000', error '0.000000000'

Test #33:

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

input:

32

output:

47374450754549289082880.00000000000000000000000000000000000000000000000

result:

ok found '47374450754549285126144.000000000', expected '47374450754549285126144.000000000', error '0.000000000'

Test #34:

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

input:

33

output:

583997997505977583796224.00000000000000000000000000000000000000000000000

result:

ok found '583997997505977616695296.000000000', expected '583997997505977616695296.000000000', error '0.000000000'

Test #35:

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

input:

34

output:

7413888129961783994613760.00000000000000000000000000000000000000000000000

result:

ok found '7413888129961783937990656.000000000', expected '7413888129961783937990656.000000000', error '0.000000000'

Test #36:

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

input:

35

output:

96846458602575070159175680.00000000000000000000000000000000000000000000000

result:

ok found '96846458602575065914540032.000000000', expected '96846458602575065914540032.000000000', error '0.000000000'

Test #37:

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

input:

36

output:

1300709375400895797725757440.00000000000000000000000000000000000000000000000

result:

ok found '1300709375400895815039844352.000000000', expected '1300709375400895815039844352.000000000', error '0.000000000'

Test #38:

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

input:

37

output:

17947747702888873979998633984.00000000000000000000000000000000000000000000000

result:

ok found '17947747702888873668613505024.000000000', expected '17947747702888873668613505024.000000000', error '0.000000000'

Test #39:

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

input:

38

output:

254251935779677530483161300992.00000000000000000000000000000000000000000000000

result:

ok found '254251935779677532493205995520.000000000', expected '254251935779677532493205995520.000000000', error '0.000000000'

Test #40:

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

input:

39

output:

3695306616464926398048337133568.00000000000000000000000000000000000000000000000

result:

ok found '3695306616464926284798639472640.000000000', expected '3695306616464926284798639472640.000000000', error '0.000000000'

Test #41:

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

input:

40

output:

55066881576713192011698091851776.00000000000000000000000000000000000000000000000

result:

ok found '55066881576713192737375766183936.000000000', expected '55066881576713192737375766183936.000000000', error '0.000000000'

Test #42:

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

input:

41

output:

840852315079047068179862787194880.00000000000000000000000000000000000000000000000

result:

ok found '840852315079047104771609759580160.000000000', expected '840852315079047104771609759580160.000000000', error '0.000000000'

Test #43:

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

input:

42

output:

13148803459163263315199643587969024.00000000000000000000000000000000000000000000000

result:

ok found '13148803459163262604756802370273280.000000000', expected '13148803459163262604756802370273280.000000000', error '0.000000000'

Test #44:

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

input:

43

output:

210450398178931248793560947061948416.00000000000000000000000000000000000000000000000

result:

ok found '210450398178931261673855881341566976.000000000', expected '210450398178931261673855881341566976.000000000', error '0.000000000'

Test #45:

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

input:

44

output:

3445727502538221105879934612134690816.00000000000000000000000000000000000000000000000

result:

ok found '3445727502538221016528518005104050176.000000000', expected '3445727502538221016528518005104050176.000000000', error '0.000000000'

Test #46:

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

input:

45

output:

57684695217789547549803899893879668736.00000000000000000000000000000000000000000000000

result:

ok found '57684695217789551280657888801636483072.000000000', expected '57684695217789551280657888801636483072.000000000', error '0.000000000'

Test #47:

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

input:

46

output:

986913587506382825585640741949369483264.00000000000000000000000000000000000000000000000

result:

ok found '986913587506382884615221777819934654464.000000000', expected '986913587506382884615221777819934654464.000000000', error '0.000000000'

Test #48:

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

input:

47

output:

17247882244608259188512557729093576032256.00000000000000000000000000000000000000000000000

result:

ok found '17247882244608259490744012632750869708800.000000000', expected '17247882244608259490744012632750869708800.000000000', error '0.000000000'

Test #49:

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

input:

48

output:

307778431583667476654077378790012141699072.00000000000000000000000000000000000000000000000

result:

ok found '307778431583667487609967619047589037473792.000000000', expected '307778431583667487609967619047589037473792.000000000', error '0.000000000'

Test #50:

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

input:

49

output:

5605338120585242255175912653794720331333632.00000000000000000000000000000000000000000000000

result:

ok found '5605338120585241642854985018985043342655488.000000000', expected '5605338120585241642854985018985043342655488.000000000', error '0.000000000'

Extra Test:

score: 0
Extra Test Passed