TopCoder

User's AC Ratio

100.0% (2/2)

Submission's AC Ratio

100.0% (2/2)

Tags

Description

Input Format

Output Format

Sample Input 1

1234567
2
7654321
5641237

Sample Output 1

3
1

Sample Input 2

B6C
3
6CB
B6C
C6B

Sample Output 2

1
0
1

Sample Input 3

abcdefghijk
1
begjifdchka

Sample Output 3

4

Sample Input 4

vVYg8I0Of73GqjNouR4FwD9C26mA5sKMezblThcpyri1kXnJStP
7
NThcp1kXqj4F26mCvtPMe3GnJSwDYsI08yrblgOfuRiKzVo7A59
Of73gvth1kR0yrncp6mA5siCz8IKMuqjN29G4wFJSDbVlYXePoT
tKpkbziGq89FCo6mAyNg1vnsJDS70O4lThcjMRr5VIe3fPXYw2u
3k6ysfhrIN4qc2TFP8nuwb5tARzi0JKvV1jY9SmDlpg7oXeGMCO
vJ5wjYDi3lhfFg8TkC26qXy1A4Iou9SKzmePVO7rnRpN0GsbtMc
nJStPf73GqjNouR4Fw08ID9C26mA5sKMezblThcpyri1kXvVYgO
r7PK0lTXR13vV4F6mNOqzc8sAtjhD9yeSpkGwgb2MoCYiJ5Iufn

Sample Output 4

12
17
21
24
21
2
22

Hints

Problem Source

YTP 2020 高中組程式挑戰營 p14

Subtasks

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

Testdata and Limits

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