TopCoder

Thumb screenshot from 2022 02 07 14 53 28
FHVirus
$\Huge 8e7 二分圖判斷範例程式碼有錯,道歉!$

User's AC Ratio

87.5% (7/8)

Submission's AC Ratio

61.5% (8/13)

Description

Input Format

Output Format

Sample Input

// Sample input 1
1
acde
bcda

// Sample input 2
3
abf
eab
ab
cd

// Sample input 3
3
ace
ab
cd
ef

Sample Output

// Sample output 1
0 0 0 1 2

// Sample output 2
1 0 1 1 2

// Sample output 3
0 0 0 3 0

Hints

Problem Source

109 學年度全國資訊學科能力競賽

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 3~7 所有集合的元素都由前 $10$ 個小寫英文字母組成 $(a \sim j)$ 且 $P_5 = 0$。 23
3 8~18 所有集合的元素都由前 $10$ 個小寫英文字母組成 $(a \sim j)$。 50
4 19~30 無額外限制 27

Testdata and Limits

No. Time Limit (ms) Memory Limit (KiB) Output Limit (KiB) Subtasks
0 1000 131072 65536 1
1 1000 131072 65536 1
2 1000 131072 65536 1
3 1000 131072 65536 2
4 1000 131072 65536 2
5 1000 131072 65536 2
6 1000 131072 65536 2
7 1000 131072 65536 2
8 1000 131072 65536 3
9 1000 131072 65536 3
10 1000 131072 65536 3
11 1000 131072 65536 3
12 1000 131072 65536 3
13 1000 131072 65536 3
14 1000 131072 65536 3
15 1000 131072 65536 3
16 1000 131072 65536 3
17 1000 131072 65536 3
18 1000 131072 65536 3
19 1000 131072 65536 4
20 1000 131072 65536 4
21 1000 131072 65536 4
22 1000 131072 65536 4
23 1000 131072 65536 4
24 1000 131072 65536 4
25 1000 131072 65536 4
26 1000 131072 65536 4
27 1000 131072 65536 4
28 1000 131072 65536 4
29 1000 131072 65536 4
30 1000 131072 65536 4