CSES - HIIT Open 2024 - Results
Submission details
Task:Gerbil's run
Sender:(╯°□°)╯︵ ┻━┻
Submission time:2024-11-16 14:47:43 +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;

int B;

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

int main() {
	int r;cin>>r;
	B = 1000000/r*r;
	double len = 2*M_PI*r;
	double ax = len / 2.5;
	int a = ax;
	if (trySolve(a+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/1000000 1000000/1000000
2094395/1000000 3094395/100000...

Test 2

Verdict:

input
2

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

user output
0/1000000 500000/1000000
1256637/1000000 1756637/100000...

Test 3

Verdict:

input
3

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

user output
0/999999 333333/999999
897597/999999 1230930/999999
1795194/999999 2128527/999999
2692791/999999 3026124/999999
3590388/999999 3923721/999999
...

Test 4

Verdict:

input
4

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

user output
0/1000000 250000/1000000
628319/1000000 878319/1000000
1256637/1000000 1506637/100000...

Test 5

Verdict:

input
5

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

user output
0/1000000 200000/1000000
523599/1000000 723599/1000000
1047198/1000000 1247198/100000...

Test 6

Verdict:

input
6

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

user output
0/999996 166666/999996
418877/999996 585543/999996
837755/999996 1004421/999996
1256632/999996 1423298/999996
1675509/999996 1842175/999996
...

Test 7

Verdict:

input
7

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

user output
0/999999 142857/999999
369599/999999 512456/999999
739198/999999 882055/999999
1108796/999999 1251653/999999
1478395/999999 1621252/999999
...

Test 8

Verdict:

input
8

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

user output
0/1000000 125000/1000000
314159/1000000 439159/1000000
628319/1000000 753319/1000000
942478/1000000 1067478/1000000
1256637/1000000 1381637/100000...

Test 9

Verdict:

input
9

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

user output
0/999999 111111/999999
285599/999999 396710/999999
571198/999999 682309/999999
856797/999999 967908/999999
1142396/999999 1253507/999999
...

Test 10

Verdict:

input
10

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

user output
0/1000000 100000/1000000
251327/1000000 351327/1000000
502655/1000000 602655/1000000
753982/1000000 853982/1000000
1005310/1000000 1105310/100000...

Test 11

Verdict:

input
11

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

user output
0/999999 90909/999999
232710/999999 323619/999999
465421/999999 556330/999999
698131/999999 789040/999999
930841/999999 1021750/999999
...

Test 12

Verdict:

input
12

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

user output
0/999996 83333/999996
209439/999996 292772/999996
418877/999996 502210/999996
628316/999996 711649/999996
837755/999996 921088/999996
...

Test 13

Verdict:

input
13

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

user output
0/999999 76923/999999
196349/999999 273272/999999
392699/999999 469622/999999
589048/999999 665971/999999
785397/999999 862320/999999
...

Test 14

Verdict:

input
14

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

user output
0/999992 71428/999992
179518/999992 250946/999992
359036/999992 430464/999992
538554/999992 609982/999992
718073/999992 789501/999992
...

Test 15

Verdict:

input
15

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

user output
0/999990 66666/999990
169814/999990 236480/999990
339628/999990 406294/999990
509442/999990 576108/999990
679256/999990 745922/999990
...

Test 16

Verdict:

input
16

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

user output
0/1000000 62500/1000000
157080/1000000 219580/1000000
314159/1000000 376659/1000000
471239/1000000 533739/1000000
628319/1000000 690819/1000000
...

Test 17

Verdict:

input
17

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

user output
0/999991 58823/999991
149598/999991 208421/999991
299197/999991 358020/999991
448795/999991 507618/999991
598393/999991 657216/999991
...

Test 18

Verdict:

input
18

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

user output
0/999990 55555/999990
139625/999990 195180/999990
279250/999990 334805/999990
418875/999990 474430/999990
558500/999990 614055/999990
...

Test 19

Verdict:

input
19

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

user output
0/999989 52631/999989
133683/999989 186314/999989
267367/999989 319998/999989
401050/999989 453681/999989
534733/999989 587364/999989
...

Test 20

Verdict:

input
20

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

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

Test 21

Verdict:

input
50

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

user output
0/1000000 20000/1000000
50265/1000000 70265/1000000
100531/1000000 120531/1000000
150796/1000000 170796/1000000
201062/1000000 221062/1000000
...

Test 22

Verdict:

input
98

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

user output
0/999992 10204/999992
25541/999992 35745/999992
51082/999992 61286/999992
76624/999992 86828/999992
102165/999992 112369/999992
...

Test 23

Verdict:

input
99

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

user output
0/999999 10101/999999
25335/999999 35436/999999
50671/999999 60772/999999
76006/999999 86107/999999
101342/999999 111443/999999
...

Test 24

Verdict:

input
100

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

user output
0/1000000 10000/1000000
25033/1000000 35033/1000000
50065/1000000 60065/1000000
75098/1000000 85098/1000000
100130/1000000 110130/1000000
...

Test 25

Verdict:

input
101

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

user output
0/999900 9900/999900
24832/999900 34732/999900
49664/999900 59564/999900
74497/999900 84397/999900
99329/999900 109229/999900
...

Test 26

Verdict:

input
102

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

user output
0/999906 9803/999906
24541/999906 34344/999906
49083/999906 58886/999906
73624/999906 83427/999906
98166/999906 107969/999906
...

Test 27

Verdict:

input
158

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

user output
0/999982 6329/999982
15826/999982 22155/999982
31653/999982 37982/999982
47479/999982 53808/999982
63306/999982 69635/999982
...

Test 28

Verdict:

input
159

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

user output
0/999951 6289/999951
15747/999951 22036/999951
31493/999951 37782/999951
47240/999951 53529/999951
62986/999951 69275/999951
...

Test 29

Verdict:

input
160

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

user output
0/1000000 6250/1000000
15630/1000000 21880/1000000
31260/1000000 37510/1000000
46889/1000000 53139/1000000
62519/1000000 68769/1000000
...

Test 30

Verdict:

input
161

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

user output
0/999971 6211/999971
15552/999971 21763/999971
31104/999971 37315/999971
46656/999971 52867/999971
62208/999971 68419/999971
...

Test 31

Verdict:

input
313

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

user output
0/999722 3194/999722
7992/999722 11186/999722
15983/999722 19177/999722
23975/999722 27169/999722
31967/999722 35161/999722
...

Test 32

Verdict:

input
314

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

user output
0/999776 3184/999776
7962/999776 11146/999776
15923/999776 19107/999776
23885/999776 27069/999776
31847/999776 35031/999776
...

Test 33

Verdict:

input
315

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

user output
0/999810 3174/999810
7942/999810 11116/999810
15884/999810 19058/999810
23826/999810 27000/999810
31767/999810 34941/999810
...

Test 34

Verdict:

input
316

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

user output
0/999824 3164/999824
7912/999824 11076/999824
15824/999824 18988/999824
23736/999824 26900/999824
31648/999824 34812/999824
...

Test 35

Verdict:

input
317

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

user output
0/999818 3154/999818
7892/999818 11046/999818
15784/999818 18938/999818
23676/999818 26830/999818
31568/999818 34722/999818
...

Test 36

Verdict:

input
318

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

user output
0/999792 3144/999792
7862/999792 11006/999792
15724/999792 18868/999792
23587/999792 26731/999792
31449/999792 34593/999792
...

Test 37

Verdict:

input
319

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

user output
0/999746 3134/999746
7842/999746 10976/999746
15684/999746 18818/999746
23527/999746 26661/999746
31369/999746 34503/999746
...

Test 38

Verdict:

input
320

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

user output
0/1000000 3125/1000000
7815/1000000 10940/1000000
15630/1000000 18755/1000000
23445/1000000 26570/1000000
31260/1000000 34385/1000000
...

Test 39

Verdict:

input
500

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

user output
0/1000000 2000/1000000
5003/1000000 7003/1000000
10005/1000000 12005/1000000
15008/1000000 17008/1000000
20010/1000000 22010/1000000
...

Test 40

Verdict:

input
990

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

user output
0/999900 1010/999900
2525/999900 3535/999900
5050/999900 6060/999900
7575/999900 8585/999900
10101/999900 11111/999900
...

Test 41

Verdict:

input
996

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

user output
0/999984 1004/999984
2510/999984 3514/999984
5020/999984 6024/999984
7531/999984 8535/999984
10041/999984 11045/999984
...

Test 42

Verdict:

input
997

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

user output
0/999991 1003/999991
2508/999991 3511/999991
5016/999991 6019/999991
7525/999991 8528/999991
10033/999991 11036/999991
...

Test 43

Verdict:

input
998

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

user output
0/999996 1002/999996
2505/999996 3507/999996
5010/999996 6012/999996
7516/999996 8518/999996
10021/999996 11023/999996
...

Test 44

Verdict:

input
999

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

user output
0/999999 1001/999999
2503/999999 3504/999999
5007/999999 6008/999999
7510/999999 8511/999999
10013/999999 11014/999999
...

Test 45

Verdict:

input
1000

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

user output
0/1000000 1000/1000000
2500/1000000 3500/1000000
5001/1000000 6001/1000000
7501/1000000 8501/1000000
10001/1000000 11001/1000000
...