Task: | Gerbil's run |
Sender: | Aalto CS-A1140 Team 2 |
Submission time: | 2024-11-16 16:09:37 +0200 |
Language: | C++ (C++17) |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | ACCEPTED | 0.00 s | details |
#4 | ACCEPTED | 0.01 s | details |
#5 | ACCEPTED | 0.00 s | details |
#6 | ACCEPTED | 0.00 s | details |
#7 | ACCEPTED | 0.00 s | details |
#8 | ACCEPTED | 0.00 s | details |
#9 | ACCEPTED | 0.00 s | details |
#10 | ACCEPTED | 0.00 s | details |
#11 | ACCEPTED | 0.00 s | details |
#12 | ACCEPTED | 0.00 s | details |
#13 | ACCEPTED | 0.00 s | details |
#14 | ACCEPTED | 0.00 s | details |
#15 | ACCEPTED | 0.00 s | details |
#16 | ACCEPTED | 0.00 s | details |
#17 | ACCEPTED | 0.00 s | details |
#18 | ACCEPTED | 0.00 s | details |
#19 | ACCEPTED | 0.00 s | details |
#20 | ACCEPTED | 0.00 s | details |
#21 | ACCEPTED | 0.00 s | details |
#22 | ACCEPTED | 0.00 s | details |
#23 | ACCEPTED | 0.00 s | details |
#24 | ACCEPTED | 0.00 s | details |
#25 | ACCEPTED | 0.00 s | details |
#26 | ACCEPTED | 0.00 s | details |
#27 | ACCEPTED | 0.00 s | details |
#28 | ACCEPTED | 0.00 s | details |
#29 | ACCEPTED | 0.00 s | details |
#30 | ACCEPTED | 0.00 s | details |
#31 | ACCEPTED | 0.00 s | details |
#32 | ACCEPTED | 0.00 s | details |
#33 | ACCEPTED | 0.00 s | details |
#34 | ACCEPTED | 0.00 s | details |
#35 | ACCEPTED | 0.00 s | details |
#36 | ACCEPTED | 0.00 s | details |
#37 | ACCEPTED | 0.00 s | details |
#38 | ACCEPTED | 0.00 s | details |
#39 | ACCEPTED | 0.00 s | details |
#40 | ACCEPTED | 0.01 s | details |
#41 | ACCEPTED | 0.00 s | details |
#42 | ACCEPTED | 0.01 s | details |
#43 | ACCEPTED | 0.01 s | details |
#44 | ACCEPTED | 0.01 s | details |
#45 | ACCEPTED | 0.00 s | details |
Code
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); double r; cin >> r; for (int a = 1; a <= 1000; ++a) { for (int b = 1; b <= a; ++b) { // x = a / b int n = (int)floor(2 * M_PI * r / (1 + double(a) / b)); double eps = 2 * M_PI * r - n * (1 + double(a) / b); if (double(a) / b + eps < 2) { for (int i = 0; i < n; ++i) { cout << a * i + b * i << "/" << b << " " << a * i + b * i + b << "/" << b << "\n"; } return 0; } } } }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 |
Test 2
Verdict: ACCEPTED
input |
---|
2 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 3
Verdict: ACCEPTED
input |
---|
3 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 4
Verdict: ACCEPTED
input |
---|
4 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/2 2/2 5/2 7/2 10/2 12/2 15/2 17/2 20/2 22/2 ... |
Test 5
Verdict: ACCEPTED
input |
---|
5 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/5 5/5 11/5 16/5 22/5 27/5 33/5 38/5 44/5 49/5 ... |
Test 6
Verdict: ACCEPTED
input |
---|
6 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/2 2/2 5/2 7/2 10/2 12/2 15/2 17/2 20/2 22/2 ... |
Test 7
Verdict: ACCEPTED
input |
---|
7 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/6 6/6 13/6 19/6 26/6 32/6 39/6 45/6 52/6 58/6 ... |
Test 8
Verdict: ACCEPTED
input |
---|
8 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 9
Verdict: ACCEPTED
input |
---|
9 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 10
Verdict: ACCEPTED
input |
---|
10 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 11
Verdict: ACCEPTED
input |
---|
11 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/7 7/7 15/7 22/7 30/7 37/7 45/7 52/7 60/7 67/7 ... |
Test 12
Verdict: ACCEPTED
input |
---|
12 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/2 2/2 5/2 7/2 10/2 12/2 15/2 17/2 20/2 22/2 ... |
Test 13
Verdict: ACCEPTED
input |
---|
13 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/3 3/3 7/3 10/3 14/3 17/3 21/3 24/3 28/3 31/3 ... |
Test 14
Verdict: ACCEPTED
input |
---|
14 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/2 2/2 5/2 7/2 10/2 12/2 15/2 17/2 20/2 22/2 ... |
Test 15
Verdict: ACCEPTED
input |
---|
15 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 16
Verdict: ACCEPTED
input |
---|
16 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 17
Verdict: ACCEPTED
input |
---|
17 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 18
Verdict: ACCEPTED
input |
---|
18 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/4 4/4 9/4 13/4 18/4 22/4 27/4 31/4 36/4 40/4 ... |
Test 19
Verdict: ACCEPTED
input |
---|
19 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/3 3/3 7/3 10/3 14/3 17/3 21/3 24/3 28/3 31/3 ... |
Test 20
Verdict: ACCEPTED
input |
---|
20 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/3 3/3 8/3 11/3 16/3 19/3 24/3 27/3 32/3 35/3 ... |
Test 21
Verdict: ACCEPTED
input |
---|
50 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 22
Verdict: ACCEPTED
input |
---|
98 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/6 6/6 13/6 19/6 26/6 32/6 39/6 45/6 52/6 58/6 ... |
Test 23
Verdict: ACCEPTED
input |
---|
99 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 24
Verdict: ACCEPTED
input |
---|
100 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 25
Verdict: ACCEPTED
input |
---|
101 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 26
Verdict: ACCEPTED
input |
---|
102 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 27
Verdict: ACCEPTED
input |
---|
158 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 28
Verdict: ACCEPTED
input |
---|
159 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/3 3/3 7/3 10/3 14/3 17/3 21/3 24/3 28/3 31/3 ... |
Test 29
Verdict: ACCEPTED
input |
---|
160 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/2 2/2 5/2 7/2 10/2 12/2 15/2 17/2 20/2 22/2 ... |
Test 30
Verdict: ACCEPTED
input |
---|
161 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/5 5/5 13/5 18/5 26/5 31/5 39/5 44/5 52/5 57/5 ... |
Test 31
Verdict: ACCEPTED
input |
---|
313 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 32
Verdict: ACCEPTED
input |
---|
314 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 33
Verdict: ACCEPTED
input |
---|
315 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/3 3/3 7/3 10/3 14/3 17/3 21/3 24/3 28/3 31/3 ... |
Test 34
Verdict: ACCEPTED
input |
---|
316 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/2 2/2 5/2 7/2 10/2 12/2 15/2 17/2 20/2 22/2 ... |
Test 35
Verdict: ACCEPTED
input |
---|
317 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/4 4/4 9/4 13/4 18/4 22/4 27/4 31/4 36/4 40/4 ... |
Test 36
Verdict: ACCEPTED
input |
---|
318 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 37
Verdict: ACCEPTED
input |
---|
319 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 38
Verdict: ACCEPTED
input |
---|
320 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 39
Verdict: ACCEPTED
input |
---|
500 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/3 3/3 8/3 11/3 16/3 19/3 24/3 27/3 32/3 35/3 ... |
Test 40
Verdict: ACCEPTED
input |
---|
990 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 41
Verdict: ACCEPTED
input |
---|
996 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 42
Verdict: ACCEPTED
input |
---|
997 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 43
Verdict: ACCEPTED
input |
---|
998 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 44
Verdict: ACCEPTED
input |
---|
999 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/1 1/1 2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 ... |
Test 45
Verdict: ACCEPTED
input |
---|
1000 |
correct output |
---|
0/1000000 1000000/1000000 2000000/1000000 3000000/100000... |
user output |
---|
0/7 7/7 15/7 22/7 30/7 37/7 45/7 52/7 60/7 67/7 ... |