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
2 2
2 3
3 2
3 5 7
3 3
2 4 6

Sample Output 1

2 3
2 6
9 4

Hints

Problem Source

NCPC 2026 Final Problem C

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