TopCoder

User's AC Ratio

75.0% (6/8)

Submission's AC Ratio

50.0% (7/14)

Tags

Description

Input Format

Output Format

Sample Input 1

3
1 3
0
1 2
0

Sample Output 1

2 3 1

Sample Input 2

2
0
0
1
1 2

Sample Output 2

2 1

Sample Input 3

2
0
0
2
1 2
2 1

Sample Output 3

no

Hints

Problem Source

YTP 2021 高中組程式挑戰營 p11

Subtasks

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

Testdata and Limits

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