CSES - HIIT Open 2024 - Results
Submission details
Task:Gerbil's run
Sender:(╯°□°)╯︵ ┻━┻
Submission time:2024-11-16 16:46:53 +0200
Language:C++ (C++17)
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.00 sdetails
#20.00 sdetails
#30.00 sdetails
#40.00 sdetails
#50.00 sdetails
#60.00 sdetails
#70.00 sdetails
#80.00 sdetails
#90.00 sdetails
#100.00 sdetails
#110.00 sdetails
#120.00 sdetails
#130.00 sdetails
#140.00 sdetails
#150.00 sdetails
#160.00 sdetails
#170.00 sdetails
#180.00 sdetails
#190.00 sdetails
#200.00 sdetails
#210.00 sdetails
#220.00 sdetails
#230.00 sdetails
#240.00 sdetails
#250.00 sdetails
#260.00 sdetails
#270.00 sdetails
#280.00 sdetails
#290.00 sdetails
#300.00 sdetails
#310.00 sdetails
#320.00 sdetails
#330.00 sdetails
#340.00 sdetails
#350.00 sdetails
#360.00 sdetails
#370.00 sdetails
#380.00 sdetails
#390.00 sdetails
#400.01 sdetails
#410.01 sdetails
#420.01 sdetails
#430.01 sdetails
#440.01 sdetails
#450.01 sdetails

Code

#include <iostream>
#include <cmath>
using namespace std;

typedef long double ld;
typedef long long ll;

ll B;

bool trySolve(ll n, ll r) {
	if (n<=0) return 0;
	ld len = 2*M_PI*r;
	ld olen = (len-n) / n;
	if (olen > 1.99) return 0;
	if (olen < 1.01) return 0;
	ld cur = 0;
	for(ll i=0; i<n; ++i) {
		ll a = cur/r*B + 0.5;
		cout<<a<<'/'<<B<<' '<<(a+B/r)<<'/'<<B<<'\n';
		cur += len / n;
	}
	return 1;
}

int main() {
	ll r;cin>>r;
	B = 100000/r*r;
	ld len = 2*M_PI*r;
	ld ax = len / 2.5;
	ll a = ax;
	if (trySolve(ax+0.5, r)) return 0;
	if (trySolve(a, r)) return 0;
	if (trySolve(a+1, r)) return 0;
}

Test details

Test 1

Verdict: ACCEPTED

input
1

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 100000/100000
209440/100000 309440/100000
418879/100000 518879/100000

Test 2

Verdict:

input
2

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 50000/100000
125664/100000 175664/100000
251327/100000 301327/100000
376991/100000 426991/100000
502655/100000 552655/100000

Test 3

Verdict:

input
3

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99999 33333/99999
78539/99999 111872/99999
157078/99999 190411/99999
235617/99999 268950/99999
314156/99999 347489/99999
...

Test 4

Verdict:

input
4

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 25000/100000
62832/100000 87832/100000
125664/100000 150664/100000
188496/100000 213496/100000
251327/100000 276327/100000
...

Test 5

Verdict:

input
5

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 20000/100000
48332/100000 68332/100000
96664/100000 116664/100000
144997/100000 164997/100000
193329/100000 213329/100000
...

Test 6

Verdict:

input
6

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99996 16666/99996
41886/99996 58552/99996
83772/99996 100438/99996
125659/99996 142325/99996
167545/99996 184211/99996
...

Test 7

Verdict:

input
7

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99995 14285/99995
34905/99995 49190/99995
69810/99995 84095/99995
104715/99995 119000/99995
139619/99995 153904/99995
...

Test 8

Verdict:

input
8

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 12500/100000
31416/100000 43916/100000
62832/100000 75332/100000
94248/100000 106748/100000
125664/100000 138164/100000
...

Test 9

Verdict:

input
9

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99999 11111/99999
27318/99999 38429/99999
54636/99999 65747/99999
81954/99999 93065/99999
109272/99999 120383/99999
...

Test 10

Verdict:

input
10

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 10000/100000
25133/100000 35133/100000
50265/100000 60265/100000
75398/100000 85398/100000
100531/100000 110531/100000
...

Test 11

Verdict:

input
11

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99990 9090/99990
22438/99990 31528/99990
44875/99990 53965/99990
67313/99990 76403/99990
89751/99990 98841/99990
...

Test 12

Verdict:

input
12

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99996 8333/99996
20943/99996 29276/99996
41886/99996 50219/99996
62829/99996 71162/99996
83772/99996 92105/99996
...

Test 13

Verdict:

input
13

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99996 7692/99996
19039/99996 26731/99996
38078/99996 45770/99996
57118/99996 64810/99996
76157/99996 83849/99996
...

Test 14

Verdict:

input
14

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99988 7142/99988
17950/99988 25092/99988
35900/99988 43042/99988
53849/99988 60991/99988
71799/99988 78941/99988
...

Test 15

Verdict:

input
15

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99990 6666/99990
16533/99990 23199/99990
33066/99990 39732/99990
49599/99990 56265/99990
66132/99990 72798/99990
...

Test 16

Verdict:

input
16

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 6250/100000
15708/100000 21958/100000
31416/100000 37666/100000
47124/100000 53374/100000
62832/100000 69082/100000
...

Test 17

Verdict:

input
17

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99994 5882/99994
14611/99994 20493/99994
29222/99994 35104/99994
43834/99994 49716/99994
58445/99994 64327/99994
...

Test 18

Verdict:

input
18

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99990 5555/99990
13961/99990 19516/99990
27922/99990 33477/99990
41884/99990 47439/99990
55845/99990 61400/99990
...

Test 19

Verdict:

input
19

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99997 5263/99997
13090/99997 18353/99997
26179/99997 31442/99997
39269/99997 44532/99997
52358/99997 57621/99997
...

Test 20

Verdict:

input
20

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 5000/100000
12566/100000 17566/100000
25133/100000 30133/100000
37699/100000 42699/100000
50265/100000 55265/100000
...

Test 21

Verdict:

input
50

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 2000/100000
4987/100000 6987/100000
9973/100000 11973/100000
14960/100000 16960/100000
19947/100000 21947/100000
...

Test 22

Verdict:

input
98

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99960 1020/99960
2553/99960 3573/99960
5106/99960 6126/99960
7659/99960 8679/99960
10212/99960 11232/99960
...

Test 23

Verdict:

input
99

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99990 1010/99990
2523/99990 3533/99990
5046/99990 6056/99990
7569/99990 8579/99990
10092/99990 11102/99990
...

Test 24

Verdict:

input
100

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 1000/100000
2503/100000 3503/100000
5007/100000 6007/100000
7510/100000 8510/100000
10013/100000 11013/100000
...

Test 25

Verdict:

input
101

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99990 990/99990
2473/99990 3463/99990
4947/99990 5937/99990
7420/99990 8410/99990
9894/99990 10884/99990
...

Test 26

Verdict:

input
102

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99960 980/99960
2453/99960 3433/99960
4907/99960 5887/99960
7360/99960 8340/99960
9814/99960 10794/99960
...

Test 27

Verdict:

input
158

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99856 632/99856
1580/99856 2212/99856
3161/99856 3793/99856
4741/99856 5373/99856
6322/99856 6954/99856
...

Test 28

Verdict:

input
159

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99852 628/99852
1568/99852 2196/99852
3137/99852 3765/99852
4705/99852 5333/99852
6274/99852 6902/99852
...

Test 29

Verdict:

input
160

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 625/100000
1563/100000 2188/100000
3126/100000 3751/100000
4689/100000 5314/100000
6252/100000 6877/100000
...

Test 30

Verdict:

input
161

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99981 621/99981
1551/99981 2172/99981
3102/99981 3723/99981
4653/99981 5274/99981
6204/99981 6825/99981
...

Test 31

Verdict:

input
313

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99847 319/99847
797/99847 1116/99847
1594/99847 1913/99847
2391/99847 2710/99847
3189/99847 3508/99847
...

Test 32

Verdict:

input
314

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99852 318/99852
795/99852 1113/99852
1590/99852 1908/99852
2386/99852 2704/99852
3181/99852 3499/99852
...

Test 33

Verdict:

input
315

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99855 317/99855
792/99855 1109/99855
1584/99855 1901/99855
2377/99855 2694/99855
3169/99855 3486/99855
...

Test 34

Verdict:

input
316

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99856 316/99856
790/99856 1106/99856
1580/99856 1896/99856
2371/99856 2687/99856
3161/99856 3477/99856
...

Test 35

Verdict:

input
317

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99855 315/99855
787/99855 1102/99855
1574/99855 1889/99855
2362/99855 2677/99855
3149/99855 3464/99855
...

Test 36

Verdict:

input
318

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99852 314/99852
785/99852 1099/99852
1570/99852 1884/99852
2356/99852 2670/99852
3141/99852 3455/99852
...

Test 37

Verdict:

input
319

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99847 313/99847
782/99847 1095/99847
1564/99847 1877/99847
2347/99847 2660/99847
3129/99847 3442/99847
...

Test 38

Verdict:

input
320

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99840 312/99840
780/99840 1092/99840
1560/99840 1872/99840
2341/99840 2653/99840
3121/99840 3433/99840
...

Test 39

Verdict:

input
500

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 200/100000
500/100000 700/100000
1000/100000 1200/100000
1500/100000 1700/100000
1999/100000 2199/100000
...

Test 40

Verdict:

input
990

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99990 101/99990
253/99990 354/99990
505/99990 606/99990
758/99990 859/99990
1010/99990 1111/99990
...

Test 41

Verdict:

input
996

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99600 100/99600
250/99600 350/99600
500/99600 600/99600
750/99600 850/99600
1000/99600 1100/99600
...

Test 42

Verdict:

input
997

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99700 100/99700
250/99700 350/99700
500/99700 600/99700
750/99700 850/99700
1000/99700 1100/99700
...

Test 43

Verdict:

input
998

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99800 100/99800
250/99800 350/99800
500/99800 600/99800
750/99800 850/99800
1000/99800 1100/99800
...

Test 44

Verdict:

input
999

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/99900 100/99900
250/99900 350/99900
500/99900 600/99900
750/99900 850/99900
1000/99900 1100/99900
...

Test 45

Verdict:

input
1000

correct output
0/1000000 1000000/1000000
2000000/1000000 3000000/100000...

user output
0/100000 100/100000
250/100000 350/100000
500/100000 600/100000
750/100000 850/100000
1000/100000 1100/100000
...