#P6263. [COCI 2014/2015 #3] STROJOPIS

    ID: 7037 远端评测题 1000ms 32MiB 尝试: 0 已通过: 0 显示难度入门 上传者: 标签>字符串2014COCI(克罗地亚)

[COCI 2014/2015 #3] STROJOPIS

Problem Description

Correct typing is becoming an important part of culture. If you still do not use all ten fingers to type, you must relearn typing—then you will type faster and feel more comfortable and happy.

Many websites teach you how to type correctly. The picture below shows the basic idea: keys that should be pressed by the same finger have the same color. Yellow keys should be pressed by the little finger, blue keys by the ring finger, green keys by the middle finger, and red keys by the index finger. Naturally, the left hand presses the left side of the keyboard (the keys to the left starting from 5, T, G, B), and the right hand presses the right side (the keys to the right starting from 6, Y, H, N). The thumb is responsible for the space bar.

Your task is to output, for each finger (except the thumb), how many times it must be pressed to correctly type the given string.

Input Format

Only one line containing a string ss. The string contains no spaces and contains only the characters shown in the picture above.

Output Format

The output must consist of eight lines, each containing one integer, which represents the number of key presses for each finger observed from left to right (excluding the thumb).

AON=BOO;
1
0
0
1
1
0
3
2

PRINT'NY'[NASLA]
2
1
0
2
4
1
1
5
VIDI,KO,JE,DOSA
1
1
3
1
1
6
2 
0

Hint

Constraints

Let s|s| denote the length of the input string. For 100%100\% of the testdata, 1s501\le |s|\le 50.

Translated by ChatGPT 5