TopCoder

i_am_noob
施~~廣~~霖~~

User's AC Ratio

96.0% (170/177)

Submission's AC Ratio

56.6% (197/348)

Tags

Description

Input Format

Output Format

Sample Input 1

5
A33X5
30X21
11X11
00310
1120B

Sample Output 1

10

Sample Input 2

3
AX5
X4X
11B

Sample Output 2

X

Hints

Problem Source

原TIOJ1196 / TOI2004初選(prob 2)。

Subtasks

No. Testdata Range Score
1 0 16
2 1 16
3 2 16
4 3 16
5 4 16
6 5 20

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 262144 1
1 1000 65536 262144 2
2 1000 65536 262144 3
3 1000 65536 262144 4
4 1000 65536 262144 5
5 1000 65536 262144 6