C - Extra Krunch
来源:互联网 发布:淘宝网链接 编辑:程序博客网 时间:2024/05/03 03:18
C - Extra Krunch
Crawling in process...Crawling failedTime Limit:1000MSMemory Limit:30000KB64bit IO Format:%I64d & %I64uDescription
A krunched word has no vowels ("A", "E", "I", "O", and "U") and no repeated letters. Removing vowels and letters that appear twice or more from MISSISSIPPI yields MSP. In a krunched word, a letter appears only once, the first time it would appear in the unkrunched word. Vowels never appear.
Krunched phrases similarly have no vowels and no repeated letters. Consider this phrase:
and its krunched version:
Blanks are krunched differently. Blanks are removed so that a krunched phrase has no blanks on its beginning or end, never has two blanks in a row, and has no blanks before punctuation. Otherwise, blanks not removed. If we represent blanks by "_",
krunches to:
where the single remaining blank is shown by "_".
Write a program that reads a line of input (whose length ranges from 2 to 70 characters), and krunches it. Put the krunched word or phrase in the output file. The input line has only capital letters, blanks, and the standard punctuation marks: period, comma, and question mark.
Krunched phrases similarly have no vowels and no repeated letters. Consider this phrase:
RAILROAD CROSSING
and its krunched version:
RLD CSNG
Blanks are krunched differently. Blanks are removed so that a krunched phrase has no blanks on its beginning or end, never has two blanks in a row, and has no blanks before punctuation. Otherwise, blanks not removed. If we represent blanks by "_",
MADAM_I_SAY_I_AM_ADAM__
krunches to:
MD_SY
where the single remaining blank is shown by "_".
Write a program that reads a line of input (whose length ranges from 2 to 70 characters), and krunches it. Put the krunched word or phrase in the output file. The input line has only capital letters, blanks, and the standard punctuation marks: period, comma, and question mark.
Input
A single line to be krunched.
Output
A single krunched line that follows the rules above.
Sample Input
NOW IS THE TIME FOR ALL GOOD MEN TO COME TO THE AID OF THEIR COUNTRY.
Sample Output
NW S TH M FR L GD C Y.
- C - Extra Krunch
- Extra Krunch
- Extra Krunch
- 1951 Extra Krunch
- poj 1951 extra krunch
- poj 1951 Extra Krunch
- BNUOJ 14280 Extra Krunch
- POJ-1951-Extra Krunch
- poj 1951 Extra Krunch
- POJ 1951 Extra Krunch G++
- poj 1951 Extra Krunch 字符串处理水题
- C++: Compile error: extra qualification
- C++: Compile error: extra qualification
- Extra
- C/C++ Swap without using extra variable
- CF#450 C.Remove Extra One
- codeforces 900C. Remove Extra One
- Codeforces 900C-Remove Extra One
- An R Time Series Tutorial
- Android4_SRC_分析~ActivityManagerService~图解(一)
- 北大ACM poj2453
- Android学习札记36:一个关于onSaveInstanceState ()方法的例子
- B - Dessert
- C - Extra Krunch
- Android开发Socket编程基础
- 使用ANT功能从SVN上下载项目
- Java接口学习笔记
- BUY LOW, BUY LOWER
- 谈谈Oracle数据库的启动
- Java反射经典实例 Java Reflection Cookbook
- STM32通过DMA采集多通道AD
- SPAN/RSPAN/ERSPAN