# TopCoder

$\huge 南ことり$
$ε=ε=ε=(~￣▽￣)~烙跑囉$

82.0% (41/50)

36.8% (81/220)

# Input Format

 子任務（測資） 額外限制 分數 1 (0~4) $R=1$ 35 2 (5~9) $R \times C \leq 10^ 4$、$Q \leq 10^ 3$ 14 3 (5~19) $Q \leq 10^ 4$ 24 4 (0~24) 無 27

7 7
1 1 1 0 1 1 1
0 1 0 0 0 1 0
0 1 0 0 1 1 1
0 0 0 0 0 0 0
1 1 1 0 1 1 1
1 0 1 0 0 1 0
1 1 1 0 1 1 0
2
1 1 3 3
5 1 7 7

4
13

# Hints

Sample Input 第一筆詢問(1 1 3 3)的4種放法 : ( "@@" 為放置的冰塊)

 @ @ 1 1 @ @ 1 @ 1 1 1 1 0 1 0 0 1 0 0 @ 0 0 @ 0 0 1 0 0 1 0 0 1 0 0 @ 0

# Problem Source

Problem Set by Ting.H

No. Testdata Range Score
1 0~4 35
2 5~9 14
3 5~19 24
4 0~24 27

# Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 3500 131072 262144 1 4
1 3500 131072 262144 1 4
2 3500 131072 262144 1 4
3 3500 131072 262144 1 4
4 3500 131072 262144 1 4
5 1500 131072 262144 2 3 4
6 1500 131072 262144 2 3 4
7 1500 131072 262144 2 3 4
8 1500 131072 262144 2 3 4
9 1500 131072 262144 2 3 4
10 1500 131072 262144 3 4
11 1500 131072 262144 3 4
12 1500 131072 262144 3 4
13 1500 131072 262144 3 4
14 1500 131072 262144 3 4
15 1500 131072 262144 3 4
16 1500 131072 262144 3 4
17 1500 131072 262144 3 4
18 1500 131072 262144 3 4
19 1500 131072 262144 3 4
20 3500 131072 262144 4
21 3500 131072 262144 4
22 3500 131072 262144 4
23 3500 131072 262144 4
24 3500 131072 262144 4