TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

2
3
a a a
b b b
a a a
1 2 3
2 3 4
1 2 3
3
t w t
t w t
t w t
1 2 3
1 2 3
2 4 6

Sample Output 1

13
15

Hints

Problem Source

Migrated from old NTUJ.

Fcrh

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 131072