TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

10 20 20

Sample Output 1

8
-18 2 9 1
-9 1 18 2
1 0 10 0
2 0 5 0
5 0 2 0
9 1 -18 2
10 0 1 0
18 2 -9 1

Sample Input 2

86 43 43

Sample Output 2

1
0 1 0 1

Sample Input 3

84 200 10

Sample Output 3

20
1 0 84 0
2 0 42 0
3 0 28 0
4 0 21 0
6 0 14 0
7 0 12 0
10 -1 60 6
10 1 60 -6
12 0 7 0
14 0 6 0
20 -2 30 3
20 2 30 -3
21 0 4 0
28 0 3 0
30 -3 20 2
30 3 20 -2
42 0 2 0
60 -6 10 1
60 6 10 -1
84 0 1 0

Hints

Problem Source

YTP 2022 國際賽 p10

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 3~11 $B = 1$ 1
3 12~13, 38~44 $A, B \leq 20$ 2
4 12~18, 34~44 $A, B \leq 2000$ 3
5 19~21 $N = 1$ 4
6 19~25, 34~44 $N \leq 1000$ 5
7 3~44 無額外限制 10

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 524288 65536 1
1 1000 524288 65536 1
2 1000 524288 65536 1
3 1000 524288 65536 2 7
4 1000 524288 65536 2 7
5 1000 524288 65536 2 7
6 1000 524288 65536 2 7
7 1000 524288 65536 2 7
8 1000 524288 65536 2 7
9 1000 524288 65536 2 7
10 1000 524288 65536 2 7
11 1000 524288 65536 2 7
12 1000 524288 65536 3 4 7
13 1000 524288 65536 3 4 7
14 1000 524288 65536 4 7
15 1000 524288 65536 4 7
16 1000 524288 65536 4 7
17 1000 524288 65536 4 7
18 1000 524288 65536 4 7
19 1000 524288 65536 5 6 7
20 1000 524288 65536 5 6 7
21 1000 524288 65536 5 6 7
22 1000 524288 65536 6 7
23 1000 524288 65536 6 7
24 1000 524288 65536 6 7
25 1000 524288 65536 6 7
26 1000 524288 65536 7
27 1000 524288 65536 7
28 1000 524288 65536 7
29 1000 524288 65536 7
30 1000 524288 65536 7
31 1000 524288 65536 7
32 1000 524288 65536 7
33 1000 524288 65536 7
34 1000 524288 65536 4 6 7
35 1000 524288 65536 4 6 7
36 1000 524288 65536 4 6 7
37 1000 524288 65536 4 6 7
38 1000 524288 65536 3 4 6 7
39 1000 524288 65536 3 4 6 7
40 1000 524288 65536 3 4 6 7
41 1000 524288 65536 3 4 6 7
42 1000 524288 65536 3 4 6 7
43 1000 524288 65536 3 4 6 7
44 1000 524288 65536 3 4 6 7