TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

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

Sample Output 1

0
2
0
3
0
3
0
3
0

Sample Input 2

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

Sample Output 2

1
0
2
1
0
2
1
0

Hints

Problem Source

NPSC 2020 高中組決賽 pD

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 0~19 無額外限制 100

Testdata and Limits

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