TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

3
5 2
2 1
3 3
4 0
5 4
2 1
1 1
1 1
1 1

Sample Output 1

1
0
5

Hints

Problem Source

NCPC 2026 Final Problem L

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 1048576 1048576
1 1000 1048576 1048576