QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#484727#2495. Knight's Moveucup-team1005TL 1887ms5212kbC++203.9kb2024-07-19 21:58:482024-07-19 21:58:48

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4

output:

2 1 0
3 3 0
1 4 0
1 4 1
3 3 1
4 1 1
4 1 0
2 2 0
4 3 0
3 1 0
3 1 1
4 3 1
2 2 1
3 4 1
3 4 0
4 2 0
2 3 0
2 3 1
4 2 1
2 1 1
1 3 1
1 3 0
3 2 0
3 2 1
2 4 1
2 4 0
1 2 0
1 2 1

result:

ok good job

Test #2:

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

input:

6

output:

1 4 0
3 3 0
2 5 0
2 5 1
3 3 1
1 4 1
2 6 1
2 6 0
3 4 0
1 5 0
2 3 0
3 1 0
1 2 0
1 2 1
2 4 1
2 4 0
3 2 0
5 3 0
6 1 0
6 1 1
5 3 1
3 2 1
4 4 1
5 2 1
3 1 1
4 3 1
2 2 1
2 2 0
4 3 0
5 1 0
5 1 1
6 3 1
5 5 1
3 6 1
3 6 0
5 5 0
6 3 0
4 2 0
2 1 0
1 3 0
1 3 1
2 1 1
4 2 1
5 4 1
6 2 1
4 1 1
4 1 0
6 2 0
5 4 0
4 6 0
...

result:

ok good job

Test #3:

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

input:

8

output:

5 6 0
4 8 0
2 7 0
3 5 0
1 4 0
1 4 1
2 6 1
4 7 1
4 7 0
6 8 0
8 7 0
8 7 1
6 8 1
7 6 1
5 7 1
5 7 0
7 6 0
6 4 0
4 5 0
2 4 0
2 4 1
3 6 1
4 8 1
2 7 1
3 5 1
4 3 1
4 3 0
2 2 0
2 2 1
4 1 1
4 1 0
6 2 0
8 3 0
7 5 0
6 7 0
5 5 0
5 5 1
6 7 1
4 6 1
6 5 1
8 6 1
8 6 0
7 4 0
7 4 1
8 2 1
8 2 0
6 1 0
4 2 0
4 2 1
5 4 1
...

result:

ok good job

Test #4:

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

input:

10

output:

5 10 0
5 10 1
4 8 1
5 6 1
3 5 1
4 7 1
3 9 1
1 10 1
1 10 0
3 9 0
1 8 0
1 8 1
2 6 1
2 6 0
4 7 0
5 5 0
5 5 1
6 7 1
6 7 0
7 5 0
5 4 0
3 5 0
2 3 0
2 3 1
4 4 1
4 4 0
6 5 0
6 5 1
7 3 1
9 4 1
10 6 1
10 6 0
9 8 0
7 9 0
8 7 0
9 5 0
8 3 0
7 1 0
9 2 0
9 2 1
7 1 1
6 3 1
7 5 1
5 4 1
4 2 1
2 1 1
2 1 0
4 2 0
6 3 0
...

result:

ok good job

Test #5:

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

input:

12

output:

3 4 1
2 6 1
2 6 0
1 4 0
1 4 1
2 2 1
4 3 1
6 2 1
7 4 1
8 2 1
9 4 1
7 3 1
6 1 1
5 3 1
4 5 1
6 6 1
8 7 1
9 9 1
10 11 1
11 9 1
12 11 1
10 10 1
11 12 1
11 12 0
12 10 0
12 10 1
11 8 1
10 6 1
8 5 1
9 7 1
10 9 1
11 7 1
12 5 1
12 5 0
10 6 0
11 4 0
12 2 0
10 3 0
8 2 0
7 4 0
6 2 0
8 1 0
10 2 0
9 4 0
8 6 0
8 6 ...

result:

ok good job

Test #6:

score: 0
Accepted
time: 2ms
memory: 3740kb

input:

14

output:

1 5 0
1 5 1
2 7 1
3 9 1
2 11 1
1 9 1
1 9 0
2 7 0
4 6 0
6 5 0
7 3 0
5 4 0
4 2 0
3 4 0
3 4 1
2 6 1
3 8 1
3 8 0
1 7 0
1 7 1
3 6 1
5 5 1
7 4 1
9 3 1
11 2 1
13 1 1
13 1 0
11 2 0
13 3 0
14 5 0
13 7 0
12 9 0
11 11 0
10 13 0
12 14 0
11 12 0
13 13 0
13 13 1
11 12 1
10 10 1
10 10 0
11 8 0
12 6 0
14 7 0
13 9 0...

result:

ok good job

Test #7:

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

input:

16

output:

1 3 1
1 3 0
3 2 0
5 1 0
5 1 1
7 2 1
8 4 1
10 5 1
10 5 0
8 6 0
6 7 0
5 9 0
5 9 1
3 10 1
2 12 1
1 10 1
3 11 1
4 13 1
4 13 0
6 14 0
6 14 1
7 16 1
7 16 0
5 15 0
7 14 0
5 13 0
5 13 1
6 11 1
7 9 1
5 10 1
4 12 1
2 13 1
1 11 1
2 9 1
1 7 1
3 8 1
4 6 1
2 5 1
2 5 0
1 7 0
3 8 0
2 10 0
1 12 0
3 11 0
5 10 0
7 9 0...

result:

ok good job

Test #8:

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

input:

18

output:

15 18 0
13 17 0
11 18 0
12 16 0
13 14 0
12 12 0
10 13 0
10 13 1
11 15 1
9 14 1
9 14 0
7 15 0
6 13 0
4 12 0
3 14 0
1 15 0
1 15 1
3 14 1
5 15 1
7 16 1
9 15 1
9 15 0
11 14 0
10 16 0
8 17 0
10 18 0
12 17 0
12 17 1
14 18 1
15 16 1
16 18 1
18 17 1
18 17 0
16 18 0
17 16 0
17 16 1
15 15 1
16 17 1
14 16 1
16...

result:

ok good job

Test #9:

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

input:

20

output:

9 20 0
9 20 1
11 19 1
13 18 1
11 17 1
13 16 1
15 15 1
17 14 1
15 13 1
16 11 1
17 13 1
15 12 1
14 14 1
16 15 1
15 17 1
17 16 1
18 14 1
20 15 1
18 16 1
19 18 1
18 20 1
18 20 0
19 18 0
17 19 0
18 17 0
20 16 0
20 16 1
19 14 1
20 12 1
18 11 1
19 13 1
18 15 1
20 14 1
19 12 1
20 10 1
19 8 1
17 9 1
15 10 1
...

result:

ok good job

Test #10:

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

input:

22

output:

3 15 0
1 16 0
2 14 0
4 13 0
4 13 1
2 12 1
1 14 1
1 14 0
2 12 0
4 11 0
6 10 0
7 8 0
5 7 0
4 9 0
2 10 0
2 10 1
4 9 1
5 7 1
3 6 1
1 7 1
2 5 1
3 3 1
4 1 1
4 1 0
6 2 0
8 3 0
7 5 0
5 4 0
4 6 0
2 5 0
1 7 0
3 8 0
1 9 0
1 9 1
3 8 1
2 6 1
1 4 1
2 2 1
2 2 0
4 3 0
2 4 0
2 4 1
3 2 1
5 1 1
4 3 1
3 1 1
1 2 1
1 2 0...

result:

ok good job

Test #11:

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

input:

24

output:

20 11 0
18 10 0
16 9 0
17 7 0
15 8 0
13 9 0
13 9 1
14 7 1
13 5 1
12 3 1
11 1 1
11 1 0
10 3 0
12 4 0
10 5 0
8 6 0
6 7 0
7 9 0
9 8 0
9 8 1
10 6 1
12 7 1
11 5 1
10 3 1
12 2 1
14 1 1
16 2 1
18 3 1
19 1 1
17 2 1
15 1 1
13 2 1
15 3 1
16 1 1
16 1 0
18 2 0
20 1 0
22 2 0
24 1 0
23 3 0
21 4 0
21 4 1
22 6 1
20...

result:

ok good job

Test #12:

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

input:

26

output:

9 8 0
11 9 0
10 11 0
9 9 0
8 7 0
6 8 0
7 6 0
7 6 1
8 4 1
10 5 1
9 7 1
11 8 1
13 9 1
14 11 1
12 10 1
10 11 1
9 13 1
9 13 0
11 14 0
10 16 0
8 15 0
7 13 0
9 14 0
9 14 1
10 16 1
8 17 1
6 16 1
7 18 1
6 20 1
6 20 0
4 21 0
4 21 1
6 22 1
8 23 1
9 25 1
7 26 1
5 25 1
7 24 1
6 26 1
8 25 1
10 24 1
9 22 1
7 21 1...

result:

ok good job

Test #13:

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

input:

28

output:

5 4 0
7 3 0
6 5 0
6 5 1
8 6 1
10 7 1
12 6 1
14 5 1
12 4 1
11 6 1
9 5 1
7 4 1
6 2 1
8 1 1
8 1 0
10 2 0
11 4 0
12 2 0
14 1 0
14 1 1
16 2 1
14 3 1
15 1 1
13 2 1
11 3 1
10 1 1
10 1 0
8 2 0
6 1 0
6 1 1
8 2 1
6 3 1
6 3 0
5 1 0
5 1 1
7 2 1
8 4 1
9 6 1
8 8 1
7 10 1
5 11 1
7 12 1
9 13 1
8 11 1
7 13 1
7 13 0
...

result:

ok good job

Test #14:

score: 0
Accepted
time: 35ms
memory: 4148kb

input:

30

output:

7 8 0
8 10 0
6 11 0
5 13 0
4 15 0
6 16 0
8 17 0
7 15 0
6 17 0
5 15 0
7 14 0
8 12 0
10 13 0
12 14 0
13 16 0
14 18 0
14 18 1
16 19 1
14 20 1
16 21 1
16 21 0
18 20 0
20 19 0
18 18 0
18 18 1
16 17 1
16 17 0
15 15 0
17 14 0
18 16 0
19 18 0
20 20 0
18 19 0
19 17 0
17 16 0
15 17 0
16 15 0
17 17 0
19 16 0
2...

result:

ok good job

Test #15:

score: 0
Accepted
time: 57ms
memory: 4116kb

input:

32

output:

11 31 1
13 32 1
13 32 0
11 31 0
9 32 0
8 30 0
6 29 0
7 31 0
5 32 0
3 31 0
1 32 0
1 32 1
3 31 1
1 30 1
2 32 1
2 32 0
4 31 0
6 32 0
5 30 0
4 32 0
4 32 1
5 30 1
6 32 1
8 31 1
10 32 1
11 30 1
9 29 1
8 27 1
7 29 1
6 27 1
5 25 1
3 24 1
5 23 1
4 25 1
4 25 0
5 23 0
7 22 0
6 20 0
7 18 0
5 17 0
4 19 0
6 18 0
...

result:

ok good job

Test #16:

score: 0
Accepted
time: 64ms
memory: 4116kb

input:

34

output:

8 31 0
7 29 0
9 28 0
8 26 0
7 28 0
9 27 0
11 26 0
13 27 0
14 25 0
12 26 0
10 27 0
11 29 0
13 28 0
15 29 0
14 27 0
13 29 0
12 31 0
10 32 0
9 34 0
11 33 0
9 32 0
7 31 0
8 33 0
10 34 0
10 34 1
11 32 1
11 32 0
9 33 0
11 34 0
13 33 0
13 33 1
11 34 1
12 32 1
11 30 1
13 29 1
14 31 1
14 31 0
16 30 0
16 30 1...

result:

ok good job

Test #17:

score: 0
Accepted
time: 48ms
memory: 4092kb

input:

36

output:

6 35 1
4 36 1
4 36 0
3 34 0
4 32 0
4 32 1
3 34 1
1 33 1
2 35 1
2 35 0
1 33 0
2 31 0
4 30 0
6 31 0
5 29 0
3 30 0
2 28 0
1 30 0
1 30 1
2 32 1
1 34 1
2 36 1
2 36 0
1 34 0
3 33 0
3 33 1
1 32 1
1 32 0
2 30 0
4 31 0
2 32 0
4 33 0
4 33 1
5 35 1
5 35 0
7 36 0
7 36 1
9 35 1
7 34 1
8 32 1
6 31 1
5 33 1
4 35 1...

result:

ok good job

Test #18:

score: 0
Accepted
time: 81ms
memory: 4124kb

input:

38

output:

7 35 0
8 33 0
6 34 0
7 36 0
6 38 0
6 38 1
4 37 1
2 38 1
2 38 0
4 37 0
3 35 0
5 36 0
3 37 0
1 36 0
2 34 0
4 33 0
4 33 1
6 32 1
8 31 1
6 30 1
8 29 1
10 28 1
9 26 1
11 27 1
11 27 0
12 29 0
10 30 0
10 30 1
11 28 1
11 28 0
13 29 0
12 31 0
14 32 0
13 30 0
13 30 1
15 31 1
17 32 1
19 31 1
18 29 1
20 30 1
21...

result:

ok good job

Test #19:

score: 0
Accepted
time: 123ms
memory: 4408kb

input:

40

output:

25 13 0
26 11 0
27 9 0
28 11 0
28 11 1
30 12 1
31 10 1
32 12 1
30 13 1
28 14 1
28 14 0
27 12 0
26 14 0
24 15 0
22 14 0
23 12 0
25 11 0
26 13 0
27 15 0
26 17 0
24 18 0
25 20 0
24 22 0
22 23 0
20 22 0
18 23 0
20 24 0
18 25 0
17 23 0
15 24 0
16 26 0
15 28 0
13 27 0
12 29 0
13 31 0
13 31 1
11 32 1
10 34...

result:

ok good job

Test #20:

score: 0
Accepted
time: 177ms
memory: 4288kb

input:

42

output:

40 4 0
42 3 0
42 3 1
40 4 1
39 2 1
37 1 1
37 1 0
39 2 0
41 1 0
41 1 1
40 3 1
41 5 1
41 5 0
42 7 0
42 7 1
41 9 1
40 11 1
40 11 0
41 13 0
40 15 0
38 14 0
39 16 0
39 16 1
37 15 1
35 16 1
34 18 1
36 19 1
38 20 1
39 22 1
40 24 1
42 23 1
41 21 1
40 23 1
39 25 1
38 27 1
38 27 0
37 29 0
39 30 0
41 31 0
41 3...

result:

ok good job

Test #21:

score: 0
Accepted
time: 198ms
memory: 4328kb

input:

44

output:

6 6 0
7 8 0
9 7 0
8 5 0
9 3 0
8 1 0
10 2 0
12 1 0
12 1 1
11 3 1
13 2 1
15 3 1
16 1 1
14 2 1
14 2 0
16 3 0
15 1 0
17 2 0
18 4 0
20 5 0
20 5 1
19 7 1
17 6 1
16 4 1
18 3 1
17 1 1
15 2 1
14 4 1
13 6 1
11 7 1
9 6 1
7 7 1
8 5 1
10 4 1
9 2 1
8 4 1
7 6 1
9 7 1
8 9 1
6 10 1
7 12 1
8 14 1
10 13 1
12 12 1
14 1...

result:

ok good job

Test #22:

score: 0
Accepted
time: 167ms
memory: 4284kb

input:

46

output:

3 17 0
5 16 0
4 14 0
4 14 1
3 12 1
3 12 0
4 10 0
5 12 0
3 11 0
1 12 0
2 10 0
1 8 0
1 8 1
2 10 1
1 12 1
3 13 1
3 13 0
2 11 0
4 12 0
6 11 0
7 9 0
9 10 0
11 9 0
9 8 0
8 10 0
7 12 0
9 13 0
7 14 0
6 16 0
4 15 0
5 13 0
5 13 1
6 11 1
7 9 1
8 7 1
9 5 1
7 6 1
5 5 1
3 6 1
1 7 1
2 9 1
2 9 0
1 7 0
2 5 0
3 3 0
1...

result:

ok good job

Test #23:

score: 0
Accepted
time: 188ms
memory: 4244kb

input:

48

output:

26 35 0
27 37 0
25 38 0
24 36 0
26 37 0
25 35 0
23 36 0
22 34 0
24 35 0
24 35 1
26 36 1
25 38 1
23 39 1
24 37 1
22 38 1
21 40 1
20 42 1
19 40 1
17 39 1
15 40 1
14 42 1
16 43 1
17 41 1
19 42 1
20 44 1
22 45 1
21 43 1
19 44 1
21 45 1
20 43 1
18 42 1
17 44 1
19 43 1
18 41 1
19 39 1
20 37 1
21 39 1
23 3...

result:

ok good job

Test #24:

score: 0
Accepted
time: 301ms
memory: 4304kb

input:

50

output:

21 43 0
23 44 0
24 46 0
25 48 0
27 47 0
28 49 0
26 50 0
27 48 0
28 50 0
30 49 0
32 48 0
34 49 0
36 50 0
36 50 1
34 49 1
36 48 1
38 49 1
38 49 0
40 50 0
40 50 1
39 48 1
41 49 1
43 48 1
41 47 1
42 45 1
44 44 1
46 45 1
45 47 1
44 49 1
46 50 1
46 50 0
48 49 0
48 49 1
50 48 1
49 50 1
49 50 0
50 48 0
49 4...

result:

ok good job

Test #25:

score: 0
Accepted
time: 383ms
memory: 4416kb

input:

52

output:

22 19 0
24 18 0
25 16 0
26 18 0
28 17 0
26 16 0
25 18 0
25 18 1
27 17 1
27 17 0
29 18 0
28 20 0
26 21 0
26 21 1
24 20 1
22 21 1
21 23 1
23 24 1
25 25 1
24 23 1
26 22 1
28 23 1
30 24 1
31 22 1
31 22 0
30 20 0
30 20 1
29 22 1
27 21 1
25 20 1
27 19 1
26 17 1
24 16 1
26 15 1
27 13 1
27 13 0
28 15 0
29 1...

result:

ok good job

Test #26:

score: 0
Accepted
time: 413ms
memory: 4508kb

input:

54

output:

4 16 0
6 17 0
5 15 0
3 14 0
2 16 0
4 15 0
2 14 0
1 16 0
3 17 0
1 18 0
1 18 1
2 20 1
4 21 1
3 19 1
1 20 1
3 21 1
5 20 1
4 22 1
3 20 1
1 21 1
1 21 0
2 23 0
4 22 0
6 23 0
7 25 0
9 26 0
11 27 0
13 26 0
12 24 0
11 22 0
9 21 0
7 22 0
6 24 0
4 25 0
6 26 0
4 27 0
5 25 0
3 24 0
1 23 0
1 23 1
3 24 1
2 26 1
2 ...

result:

ok good job

Test #27:

score: 0
Accepted
time: 636ms
memory: 4768kb

input:

56

output:

43 34 1
45 33 1
44 35 1
42 36 1
42 36 0
43 34 0
45 35 0
46 33 0
46 33 1
44 32 1
45 30 1
47 31 1
48 33 1
49 31 1
48 29 1
49 27 1
49 27 0
51 26 0
49 25 0
50 27 0
50 27 1
49 29 1
51 28 1
51 28 0
50 26 0
52 27 0
53 29 0
51 30 0
53 31 0
52 29 0
51 31 0
52 33 0
52 33 1
54 32 1
56 31 1
56 31 0
55 29 0
54 3...

result:

ok good job

Test #28:

score: 0
Accepted
time: 476ms
memory: 4536kb

input:

58

output:

30 18 0
32 19 0
32 19 1
31 17 1
29 16 1
28 18 1
27 20 1
26 18 1
27 16 1
29 15 1
28 17 1
30 16 1
32 15 1
32 15 0
30 16 0
31 14 0
32 16 0
33 18 0
31 17 0
29 18 0
29 18 1
28 20 1
30 21 1
29 23 1
31 24 1
32 22 1
34 21 1
32 20 1
34 19 1
36 18 1
35 20 1
37 21 1
35 22 1
33 23 1
32 25 1
30 26 1
31 28 1
32 3...

result:

ok good job

Test #29:

score: 0
Accepted
time: 460ms
memory: 4820kb

input:

60

output:

1 3 1
1 3 0
3 2 0
4 4 0
5 2 0
7 3 0
8 1 0
10 2 0
12 1 0
12 1 1
11 3 1
13 4 1
13 4 0
12 2 0
10 3 0
11 5 0
9 4 0
8 2 0
6 1 0
6 1 1
5 3 1
4 5 1
6 6 1
7 8 1
8 10 1
9 8 1
7 7 1
5 6 1
6 8 1
8 7 1
7 5 1
5 4 1
3 5 1
2 3 1
1 5 1
3 4 1
2 2 1
2 2 0
1 4 0
3 3 0
3 3 1
1 4 1
2 6 1
4 7 1
5 9 1
3 10 1
2 8 1
1 10 1
...

result:

ok good job

Test #30:

score: 0
Accepted
time: 857ms
memory: 4724kb

input:

62

output:

6 17 0
7 19 0
9 20 0
11 21 0
10 23 0
9 25 0
7 26 0
6 28 0
6 28 1
7 30 1
7 30 0
8 32 0
6 31 0
5 33 0
7 34 0
6 32 0
6 32 1
5 30 1
4 28 1
5 26 1
7 27 1
8 29 1
10 30 1
12 31 1
14 32 1
16 31 1
17 29 1
19 30 1
18 32 1
16 33 1
17 31 1
17 31 0
18 33 0
18 33 1
20 32 1
18 31 1
19 33 1
17 32 1
16 30 1
15 32 1
...

result:

ok good job

Test #31:

score: 0
Accepted
time: 1641ms
memory: 4796kb

input:

64

output:

63 54 0
63 54 1
61 53 1
60 55 1
60 55 0
58 56 0
57 54 0
56 52 0
58 53 0
59 51 0
57 50 0
55 51 0
54 49 0
56 48 0
58 47 0
59 45 0
61 44 0
62 42 0
64 43 0
63 45 0
62 43 0
63 41 0
61 40 0
59 41 0
59 41 1
58 43 1
59 45 1
61 44 1
59 43 1
60 41 1
61 39 1
63 40 1
62 38 1
64 39 1
62 40 1
61 38 1
59 39 1
57 3...

result:

ok good job

Test #32:

score: 0
Accepted
time: 1715ms
memory: 4896kb

input:

66

output:

19 38 1
18 36 1
19 34 1
17 35 1
19 36 1
18 34 1
18 34 0
20 33 0
19 35 0
21 36 0
23 37 0
24 35 0
22 34 0
24 33 0
26 34 0
27 36 0
28 34 0
29 32 0
27 33 0
25 34 0
25 34 1
26 32 1
26 32 0
27 34 0
25 35 0
25 35 1
26 33 1
24 32 1
22 33 1
21 31 1
19 32 1
17 33 1
17 33 0
18 35 0
19 33 0
20 31 0
21 29 0
23 2...

result:

ok good job

Test #33:

score: 0
Accepted
time: 1143ms
memory: 4940kb

input:

68

output:

33 46 1
35 47 1
37 46 1
36 44 1
36 44 0
37 42 0
38 40 0
40 41 0
42 40 0
42 40 1
43 38 1
42 36 1
43 34 1
43 34 0
42 36 0
44 37 0
44 37 1
46 38 1
47 36 1
48 38 1
50 39 1
50 39 0
49 37 0
48 35 0
50 36 0
49 38 0
51 37 0
53 38 0
51 39 0
49 40 0
48 38 0
46 39 0
44 40 0
43 42 0
42 44 0
44 45 0
43 47 0
42 4...

result:

ok good job

Test #34:

score: 0
Accepted
time: 1469ms
memory: 5072kb

input:

70

output:

38 57 0
36 56 0
34 57 0
32 58 0
32 58 1
34 57 1
35 59 1
37 60 1
36 62 1
36 62 0
34 61 0
34 61 1
36 60 1
36 60 0
34 59 0
32 60 0
30 59 0
28 58 0
26 59 0
25 61 0
25 61 1
27 60 1
26 58 1
24 57 1
23 55 1
25 54 1
26 56 1
28 55 1
26 54 1
26 54 0
27 52 0
29 51 0
27 50 0
28 52 0
26 53 0
28 54 0
30 53 0
31 5...

result:

ok good job

Test #35:

score: 0
Accepted
time: 865ms
memory: 5024kb

input:

72

output:

33 31 0
32 33 0
31 35 0
29 36 0
30 38 0
31 40 0
29 39 0
30 41 0
32 40 0
30 39 0
29 41 0
27 42 0
25 43 0
23 42 0
25 41 0
23 40 0
24 38 0
26 37 0
28 38 0
27 40 0
26 42 0
26 42 1
28 43 1
29 41 1
28 39 1
29 37 1
29 37 0
27 38 0
28 36 0
26 35 0
24 34 0
26 33 0
24 32 0
22 33 0
23 35 0
25 36 0
27 35 0
28 3...

result:

ok good job

Test #36:

score: 0
Accepted
time: 1719ms
memory: 5136kb

input:

74

output:

12 46 0
13 44 0
15 43 0
14 45 0
16 46 0
14 47 0
15 45 0
16 47 0
18 46 0
17 44 0
19 43 0
20 41 0
22 42 0
23 40 0
24 42 0
22 43 0
24 44 0
23 46 0
25 47 0
24 49 0
22 48 0
20 49 0
20 49 1
18 50 1
19 52 1
21 51 1
19 50 1
17 49 1
18 51 1
19 49 1
20 47 1
20 47 0
21 45 0
20 43 0
18 42 0
19 40 0
21 39 0
19 3...

result:

ok good job

Test #37:

score: 0
Accepted
time: 1887ms
memory: 5212kb

input:

76

output:

12 17 0
10 16 0
10 16 1
12 15 1
14 16 1
16 15 1
15 13 1
14 15 1
16 14 1
14 13 1
13 15 1
12 13 1
10 12 1
9 14 1
7 15 1
5 16 1
6 18 1
7 20 1
9 21 1
10 19 1
8 20 1
7 18 1
5 17 1
4 15 1
3 17 1
1 16 1
3 15 1
2 17 1
2 17 0
1 15 0
2 13 0
3 15 0
5 16 0
7 15 0
9 14 0
11 13 0
9 12 0
11 11 0
13 10 0
14 8 0
16 ...

result:

ok good job

Test #38:

score: -100
Time Limit Exceeded

input:

78

output:


result: