uva 458 - The Decoder
2014-07-21 09:20
351 查看
The Decoder |
Input and Output
For example: with the input file that contains:1JKJ'pz'{ol'{yhklthyr'vm'{ol'Jvu{yvs'Kh{h'Jvywvyh{pvu5 1PIT'pz'h'{yhklthyr'vm'{ol'Pu{lyuh{pvuhs'I|zpulzz'Thjopul'Jvywvyh{pvu5 1KLJ'pz'{ol'{yhklthyr'vm'{ol'Kpnp{hs'Lx|pwtlu{'Jvywvyh{pvu5
your program should print the message:
*CDC is the trademark of the Control Data Corporation. *IBM is a trademark of the International Business Machine Corporation. *DEC is the trademark of the Digital Equipment Corporation.
Your program should accept all sets of characters that use the same encoding scheme and should print the actual message of each set of characters.
Sample Input
1JKJ'pz'{ol'{yhklthyr'vm'{ol'Jvu{yvs'Kh{h'Jvywvyh{pvu5 1PIT'pz'h'{yhklthyr'vm'{ol'Pu{lyuh{pvuhs'I|zpulzz'Thjopul'Jvywvyh{pvu5 1KLJ'pz'{ol'{yhklthyr'vm'{ol'Kpnp{hs'Lx|pwtlu{'Jvywvyh{pvu5
Sample Output
*CDC is the trademark of the Control Data Corporation. *IBM is a trademark of the International Business Machine Corporation. *DEC is the trademark of the Digital Equipment Corporation.
//样例已经告诉我们了,减7输出即可 //由于需要读取空格,所以不宜采取cin>>,应改为getchar(); //以下是代码: #include<iostream> #include<string.h> #include<stdio.h> #include<ctype.h> #include<algorithm> #include<stack> #include<queue> #include<set> #include<math.h> #include<vector> #include<map> #include<deque> #include<list> using namespace std; int main() { char ch; while (~(ch = getchar())) putchar(ch == '\n' ? '\n' : ch - 7); return 0; }
View Code
相关文章推荐
- UVA 458 The Decoder
- UVa458 - The Decoder-字符串-难度1
- 【uva - 458 The Decoder】
- UVA - 458 - The Decoder
- UVa 458 The Decoder (最简代码!)
- uva-458 - The Decoder
- UVa 458 - The Decoder
- UVa 458 - The Decoder
- UVA 458 - The Decoder
- UVA 458-The Decoder
- UVa OJ 458-The Decoder
- The Decoder - UVa458
- UVa 458 - The Decoder
- The Decoder - UVa458
- UVA458 The Decoder【编码】
- Uva 458 - The Decoder
- UVA 458 - The Decoder
- UVA - 458 The Decoder
- UVa 458 - The Decoder
- UVa 458 - The Decoder