TopCoder

Thumb hsnu2016
Adrien Wu
烏梭聯合王國,簡稱烏梭,為北佤羅善、安那海及佤羅善島弧國家之一。

User's AC Ratio

100.0% (50/50)

Submission's AC Ratio

56.1% (64/114)

Description

Input Format

Output Format

Sample Input

Sample Input #1:

5
A33X5
30X21
11X11
00310
1120B

Sample Input #2:

3
AX5
X4X
11B

Sample Output

Sample Output #1:

10

Sample Output #2:

X

Hints

Problem Source

原TIOJ1196 / TOI2004初選(prob 2)。

Subtasks

For Testdata: 0 ~ 0, Score: 16
For Testdata: 1 ~ 1, Score: 16
For Testdata: 2 ~ 2, Score: 16
For Testdata: 3 ~ 3, Score: 16
For Testdata: 4 ~ 4, Score: 16
For Testdata: 5 ~ 5, Score: 20
No. Time Limit (ms) Memory Limit (KiB) Output Limit (KiB)
0 1000 65536 65536
1 1000 65536 65536
2 1000 65536 65536
3 1000 65536 65536
4 1000 65536 65536
5 1000 65536 65536