QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#538943#7226. The Impressive Pathucup-team1005#TL 54ms5872kbC++205.3kb2024-08-31 13:38:002024-08-31 13:38:01

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 5868kb

input:

8 8 16

output:

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

result:

ok correct

Test #2:

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

input:

8 8 32

output:

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

result:

ok correct

Test #3:

score: 0
Accepted
time: 28ms
memory: 5620kb

input:

8 8 48

output:

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

result:

ok correct

Test #4:

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

input:

9 8 17

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
8 2
9 4
8 6
9 8

result:

ok correct

Test #5:

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

input:

9 8 35

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 4
6 5
8 6
9 8

result:

ok correct

Test #6:

score: 0
Accepted
time: 16ms
memory: 5872kb

input:

9 8 53

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 4
6 5
4 6
3 4
5 5
3 6
2 4
4 5
2 6
1 4
3 5
4 7
2 8
1 6
3 7
2 5
1 7
3 8
5 7
7 8
8 6
9 8

result:

ok correct

Test #7:

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

input:

10 8 18

output:

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

result:

ok correct

Test #8:

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

input:

10 8 38

output:

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

result:

ok correct

Test #9:

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

input:

8 10 58

output:

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

result:

ok correct

Test #10:

score: 0
Accepted
time: 54ms
memory: 5632kb

input:

8 10 60

output:

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

result:

ok correct

Test #11:

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

input:

11 8 19

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
9 4
10 6
11 8

result:

ok correct

Test #12:

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

input:

8 11 41

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
7 9
8 11

result:

ok correct

Test #13:

score: 0
Accepted
time: 6ms
memory: 5872kb

input:

11 8 63

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 4
6 5
4 6
3 4
5 5
3 6
2 4
4 5
2 6
1 4
3 5
1 6
3 7
2 5
1 7
3 8
5 7
7 8
9 7
11 8

result:

ok correct

Test #14:

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

input:

11 8 65

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 4
6 5
4 6
3 4
5 5
3 6
2 4
4 5
2 6
1 4
3 5
1 6
3 7
5 8
7 7
9 8
10 6
8 7
10 8
11 6
9 7
11 8

result:

ok correct

Test #15:

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

input:

8 12 20

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
5 6
6 8
7 10
8 12

result:

ok correct

Test #16:

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

input:

8 12 44

output:

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

result:

ok correct

Test #17:

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

input:

8 12 68

output:

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

result:

ok correct

Test #18:

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

input:

8 12 72

output:

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

result:

ok correct

Test #19:

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

input:

13 8 21

output:

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

result:

ok correct

Test #20:

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

input:

13 8 47

output:

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

result:

ok correct

Test #21:

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

input:

8 13 73

output:

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

result:

ok correct

Test #22:

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

input:

8 13 77

output:

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

result:

ok correct

Test #23:

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

input:

8 14 22

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
3 9
5 8
6 10
7 12
8 14

result:

ok correct

Test #24:

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

input:

8 14 50

output:

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

result:

ok correct

Test #25:

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

input:

14 8 78

output:

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

result:

ok correct

Test #26:

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

input:

8 14 84

output:

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

result:

ok correct

Test #27:

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

input:

8 15 23

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
5 9
6 11
7 13
8 15

result:

ok correct

Test #28:

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

input:

15 8 53

output:

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

result:

ok correct

Test #29:

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

input:

15 8 83

output:

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

result:

ok correct

Test #30:

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

input:

8 15 89

output:

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

result:

ok correct

Test #31:

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

input:

8 16 24

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
5 9
7 10
8 12
7 14
8 16

result:

ok correct

Test #32:

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

input:

16 8 56

output:

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

result:

ok correct

Test #33:

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

input:

16 8 88

output:

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

result:

ok correct

Test #34:

score: 0
Accepted
time: 15ms
memory: 5824kb

input:

8 16 96

output:

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

result:

ok correct

Test #35:

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

input:

9 9 18

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
3 8
5 7
7 8
9 9

result:

ok correct

Test #36:

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

input:

9 9 38

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 4
5 6
6 4
8 3
9 5
8 7
9 9

result:

ok correct

Test #37:

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

input:

9 9 58

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 4
5 6
6 4
4 3
5 5
6 3
4 2
5 4
6 2
4 1
5 3
6 1
8 2
7 4
9 5
8 7
7 9
9 8
8 6
9 4
7 3
8 5
7 7
8 9
9 7
7 8
9 9

result:

ok correct

Test #38:

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

input:

9 9 60

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 4
5 6
6 4
4 3
5 5
6 3
4 2
5 4
6 2
4 1
5 3
6 1
8 2
7 4
9 5
8 7
7 9
9 8
8 6
9 4
7 3
8 5
7 7
8 9
6 8
7 6
9 7
7 8
9 9

result:

ok correct

Test #39:

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

input:

9 10 19

output:

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

result:

ok correct

Test #40:

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

input:

9 10 41

output:

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

result:

ok correct

Test #41:

score: 0
Accepted
time: 3ms
memory: 5624kb

input:

9 10 63

output:

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

result:

ok correct

Test #42:

score: 0
Accepted
time: 4ms
memory: 5660kb

input:

10 9 67

output:

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

result:

ok correct

Test #43:

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

input:

9 11 20

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
5 6
7 7
8 9
9 11

result:

ok correct

Test #44:

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

input:

11 9 44

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
8 7
9 9
10 7
11 9

result:

ok correct

Test #45:

score: 0
Accepted
time: 3ms
memory: 5632kb

input:

9 11 68

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 4
5 6
6 4
4 3
5 5
6 3
4 2
5 4
6 2
4 1
5 3
6 1
7 3
8 5
9 7
8 9
7 11
9 10
8 8
9 6
7 5
8 7
9 9
7 10
9 11

result:

ok correct

Test #46:

score: 0
Accepted
time: 6ms
memory: 5636kb

input:

9 11 74

output:

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

result:

ok correct

Test #47:

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

input:

12 9 21

output:

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

result:

ok correct

Test #48:

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

input:

9 12 49

output:

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

result:

ok correct

Test #49:

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

input:

12 9 77

output:

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

result:

ok correct

Test #50:

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

input:

9 12 81

output:

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

result:

ok correct

Test #51:

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

input:

9 13 22

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
3 9
5 8
7 9
8 11
9 13

result:

ok correct

Test #52:

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

input:

9 13 52

output:

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

result:

ok correct

Test #53:

score: 0
Accepted
time: 4ms
memory: 5572kb

input:

13 9 82

output:

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

result:

ok correct

Test #54:

score: 0
Accepted
time: 4ms
memory: 5564kb

input:

13 9 86

output:

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

result:

ok correct

Test #55:

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

input:

14 9 23

output:

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

result:

ok correct

Test #56:

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

input:

14 9 55

output:

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

result:

ok correct

Test #57:

score: 0
Accepted
time: 3ms
memory: 5660kb

input:

14 9 87

output:

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

result:

ok correct

Test #58:

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

input:

14 9 93

output:

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

result:

ok correct

Test #59:

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

input:

15 9 24

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
10 2
12 3
13 5
14 7
15 9

result:

ok correct

Test #60:

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

input:

9 15 58

output:

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

result:

ok correct

Test #61:

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

input:

15 9 92

output:

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

result:

ok correct

Test #62:

score: 0
Accepted
time: 4ms
memory: 5508kb

input:

15 9 100

output:

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

result:

ok correct

Test #63:

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

input:

9 16 25

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
3 10
5 11
7 12
8 14
9 16

result:

ok correct

Test #64:

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

input:

16 9 61

output:

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

result:

ok correct

Test #65:

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

input:

9 16 97

output:

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

result:

ok correct

Test #66:

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

input:

9 16 107

output:

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

result:

ok correct

Test #67:

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

input:

10 10 20

output:

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

result:

ok correct

Test #68:

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

input:

10 10 46

output:

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

result:

ok correct

Test #69:

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

input:

10 10 72

output:

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

result:

ok correct

Test #70:

score: 0
Accepted
time: 27ms
memory: 5600kb

input:

10 10 74

output:

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

result:

ok correct

Test #71:

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

input:

11 10 21

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
9 2
10 4
11 6
10 8
11 10

result:

ok correct

Test #72:

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

input:

10 11 49

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 4
5 6
7 5
8 7
9 9
10 11

result:

ok correct

Test #73:

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

input:

10 11 77

output:

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

result:

ok correct

Test #74:

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

input:

10 11 81

output:

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

result:

ok correct

Test #75:

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

input:

10 12 22

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
3 9
5 8
7 9
9 10
10 12

result:

ok correct

Test #76:

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

input:

12 10 52

output:

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

result:

ok correct

Test #77:

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

input:

10 12 82

output:

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

result:

ok correct

Test #78:

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

input:

12 10 90

output:

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

result:

ok correct

Test #79:

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

input:

10 13 23

output:

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

result:

ok correct

Test #80:

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

input:

10 13 55

output:

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

result:

ok correct

Test #81:

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

input:

10 13 87

output:

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

result:

ok correct

Test #82:

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

input:

13 10 97

output:

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

result:

ok correct

Test #83:

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

input:

10 14 24

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
5 7
7 8
8 10
9 12
10 14

result:

ok correct

Test #84:

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

input:

10 14 60

output:

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

result:

ok correct

Test #85:

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

input:

10 14 96

output:

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

result:

ok correct

Test #86:

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

input:

10 14 104

output:

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

result:

ok correct

Test #87:

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

input:

10 15 25

output:

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

result:

ok correct

Test #88:

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

input:

15 10 63

output:

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

result:

ok correct

Test #89:

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

input:

10 15 101

output:

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

result:

ok correct

Test #90:

score: 0
Accepted
time: 3ms
memory: 5576kb

input:

15 10 111

output:

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

result:

ok correct

Test #91:

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

input:

16 10 26

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
11 2
13 3
15 4
16 6
15 8
16 10

result:

ok correct

Test #92:

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

input:

10 16 66

output:

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

result:

ok correct

Test #93:

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

input:

10 16 106

output:

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

result:

ok correct

Test #94:

score: 0
Accepted
time: 3ms
memory: 5628kb

input:

16 10 120

output:

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

result:

ok correct

Test #95:

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

input:

11 11 22

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
3 9
5 8
7 9
9 10
11 11

result:

ok correct

Test #96:

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

input:

11 11 52

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 4
5 6
6 4
4 3
5 5
7 6
9 7
10 9
11 11

result:

ok correct

Test #97:

score: 0
Accepted
time: 4ms
memory: 5620kb

input:

11 11 82

output:

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

result:

ok correct

Test #98:

score: 0
Accepted
time: 4ms
memory: 5572kb

input:

11 11 90

output:

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

result:

ok correct

Test #99:

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

input:

12 11 23

output:

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

result:

ok correct

Test #100:

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

input:

12 11 57

output:

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

result:

ok correct

Test #101:

score: 0
Accepted
time: 4ms
memory: 5788kb

input:

11 12 91

output:

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

result:

ok correct

Test #102:

score: 0
Accepted
time: 3ms
memory: 5620kb

input:

11 12 99

output:

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

result:

ok correct

Test #103:

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

input:

11 13 24

output:

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

result:

ok correct

Test #104:

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

input:

13 11 60

output:

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

result:

ok correct

Test #105:

score: 0
Accepted
time: 4ms
memory: 5824kb

input:

11 13 96

output:

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

result:

ok correct

Test #106:

score: 0
Accepted
time: 6ms
memory: 5564kb

input:

13 11 106

output:

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

result:

ok correct

Test #107:

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

input:

11 14 25

output:

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

result:

ok correct

Test #108:

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

input:

11 14 63

output:

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

result:

ok correct

Test #109:

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

input:

14 11 101

output:

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

result:

ok correct

Test #110:

score: 0
Accepted
time: 9ms
memory: 5564kb

input:

14 11 115

output:

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

result:

ok correct

Test #111:

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

input:

11 15 26

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
3 10
5 9
7 10
9 11
10 13
11 15

result:

ok correct

Test #112:

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

input:

11 15 68

output:

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

result:

ok correct

Test #113:

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

input:

11 15 110

output:

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

result:

ok correct

Test #114:

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

input:

11 15 122

output:

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

result:

ok correct

Test #115:

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

input:

11 16 27

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
5 10
7 11
9 12
10 14
11 16

result:

ok correct

Test #116:

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

input:

16 11 71

output:

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

result:

ok correct

Test #117:

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

input:

16 11 115

output:

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

result:

ok correct

Test #118:

score: 0
Accepted
time: 31ms
memory: 5624kb

input:

11 16 131

output:

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

result:

ok correct

Test #119:

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

input:

12 12 24

output:

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

result:

ok correct

Test #120:

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

input:

12 12 60

output:

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

result:

ok correct

Test #121:

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

input:

12 12 96

output:

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

result:

ok correct

Test #122:

score: 0
Accepted
time: 3ms
memory: 5856kb

input:

12 12 108

output:

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

result:

ok correct

Test #123:

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

input:

13 12 25

output:

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

result:

ok correct

Test #124:

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

input:

13 12 65

output:

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

result:

ok correct

Test #125:

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

input:

12 13 105

output:

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

result:

ok correct

Test #126:

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

input:

13 12 117

output:

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

result:

ok correct

Test #127:

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

input:

12 14 26

output:

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

result:

ok correct

Test #128:

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

input:

14 12 68

output:

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

result:

ok correct

Test #129:

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

input:

14 12 110

output:

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

result:

ok correct

Test #130:

score: 0
Accepted
time: 3ms
memory: 5512kb

input:

14 12 126

output:

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

result:

ok correct

Test #131:

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

input:

15 12 27

output:

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

result:

ok correct

Test #132:

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

input:

12 15 73

output:

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

result:

ok correct

Test #133:

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

input:

15 12 119

output:

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

result:

ok correct

Test #134:

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

input:

15 12 135

output:

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

result:

ok correct

Test #135:

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

input:

12 16 28

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
5 8
7 9
9 10
10 12
11 14
12 16

result:

ok correct

Test #136:

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

input:

12 16 76

output:

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

result:

ok correct

Test #137:

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

input:

12 16 124

output:

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

result:

ok correct

Test #138:

score: 0
Accepted
time: 4ms
memory: 5628kb

input:

16 12 144

output:

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

result:

ok correct

Test #139:

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

input:

13 13 26

output:

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

result:

ok correct

Test #140:

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

input:

13 13 68

output:

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

result:

ok correct

Test #141:

score: 0
Accepted
time: 4ms
memory: 5568kb

input:

13 13 110

output:

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

result:

ok correct

Test #142:

score: -100
Time Limit Exceeded

input:

13 13 126

output:


result: