# TopCoder

icube
baluteshih 好強 <(_ _)>

66.7% (2/3)

62.5% (5/8)

# Input Format

 子任務（測資） 額外限制 分數 1 (0) $B=3, M=10^ 5, S=10^ 5, C=1$ $X,Y$在三進位下位數只包含0或1 10 2 (1) $B=5, M=10^ 5, S=10^ 5, C=1$ $X,Y< 5$ 10 3 (2) $B=3, M=3000, S=3000, C=2$ 10 4 (3) $B=7, M=3000, S=10^ 5, C=2$ 5 5 (4) $B=3, M=10^ 5, S=10^ 5, C=1$ 5 6 (5) $B=5, M=10^ 5, S=10^ 5, C=1$ 5 7 (6) $B=7, M=10^ 5, S=10^ 5, C=1$ 5 8 (7) $B=4, M=10^ 5, S=10^ 5, C=1$ 5 9 (8) $B=6, M=10^ 5, S=10^ 5, C=1$ 5 10 (9) $B=3, M=25, S=2500, C=1$ 5 11 (10) $B=5, M=25, S=2\times 10^ 4, C=1$ 5 12 (11) $B=7, M=25, S=10^ 5, C=1$ 5 13 (12) $B=4, M=25, S=10^ 4, C=1$ 5 14 (13) $B=6, M=25, S=5\times 10^ 4, C=1$ 5 15 (14) $B=8, M=25, S=4\times 10^ 5, C=1$ 5 16 (15) $B=9, M=25, S=4\times 10^ 5, C=1$ 5 17 (16) $B=10, M=25, S=4\times 10^ 5, C=1$ 5

3

# Sample Output 1

#以下兩個範例輸出是合法的輸出格式，但並非正確解。
#Sample Output 1
1
0 2 1
1 2 2
2 1 1
4
1 2 7
7 7 7
2 8 8
8 7 5
#Sample Output 2
2
0 2 1
1 2 2
2 1 0
1 2 0
2 1 0
1 1 2
3
1 2 4 0
5 5 5 1
4 2 4 1

# Problem Source

Problem Set / Judge by Yihda Yol

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

# Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 2000 262144 262144 1
1 2000 262144 262144 2
2 2000 262144 262144 3
3 2000 262144 262144 4
4 2000 262144 262144 5
5 2000 262144 262144 6
6 2000 262144 262144 7
7 2000 262144 262144 8
8 2000 262144 262144 9
9 2000 262144 262144 10
10 2000 262144 262144 11
11 2000 262144 262144 12
12 2000 262144 262144 13
13 2000 262144 262144 14
14 2000 262144 262144 15
15 2000 262144 262144 16
16 2000 262144 262144 17