Nội dung Bài tập
Mã:
StringProcessing
Tên:
Kỹ năng xử lý chuỗi (đề Tiếng Anh)
Dạng thi:
oi
Thang điểm:
10 điểm
Giới hạn thời gian:
1 giây
Giới hạn bộ nhớ:
64 MB
Được tạo bởi:
phucnq
Input and Output
Input contains several lines that contain only alphabet characters [A-Za-z], digits [0-9], space, dash ('-'), and period ('.').
The first input block ends with a line containing seven periods (".......").
The dash character, if appears, will only appear at the end of a line.
If there is a dash character at the end of a line, it means that the last word of that line is actually continued in the next line.
The dash character will not appear in the line before (".......").
There can be up to 30 characters per line and no more than 10 lines for this input block.

For this input block, output the input again but now in one line and in lowercase form.
Then output three integers in one line to denote the number of digits, vowels, and consonants found in this input block.
Then output two words (separated by a single space) in this input block that is lexicographically smallest and largest.
Here, word is defined by consecutive alphabet(s) and/or digit(s) separated by either space(s), dot(s), or a newline.
Finally, output either "0" or "1" in one line: "1" if the first input block contains substring "cs3233" (case insensitive); "0" otherwise.

After the line with seven periods ("......."), there will be one more line appearing in the input.
This last line can be of any length.

For this last line, output three integers in one line to denote the number of character 's' (lower case), 'h' (lower case), and '7' in the last line.

This problem can be frustrating one if you keep getting WA...
Thus, we have included the actual input/output data with very trivial modification.

The Actual Input (with very very few trivial modification so that you cannot just print the output)
I love CS3233 Competitive Pro-
gramming and AlGoRiThM. Of
course I love my wife Grace
Suryani very much too. Test
that there are thirty chars
m12345678901234567890123456789
......
hehehe the line above only
contains six . cannot stop...
.......
after the first input block... there will be one last line can be very long... I am going to type 77777777777777777777777777777777777777777777777777777777777777777777777777777 then a longgggggggggggggggggggggggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg ssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringggggggggggggggggggggggggssssssssssssssssssssssssssstrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrringgggggggggggggggggggggggg

The Actual Output (you will get WA if you just print these output)
i love cs3233 competitive programming and algorithm. of course i love my wife grace suryani very much too. test that there are thirty chars m12345678901234567890123456789 ...... hehehe the line above only contains six . cannot stop...
33 58 96
above wife
1
569 3 77

    Quảng cáo
       Ngôn ngữ : 

       Theme : 
Mời bạn soạn code



		



      Ai có thể xem bài này : 

Thông tin



Phần thảo luận