The Decoder
Write a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple coded set of characters and print the exact message that the characters contain. The code key for this simple coding is a one for one character substitution based upon asingle arithmetic manipulationof the printable portion of the ASCII character set.
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.
#define RUN #ifdef RUN #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <vector> #include <list> #include <cctype> #include <algorithm> #include <utility> #include <math.h> using namespace std; #define MAXN 1000 int main(){ #ifndef ONLINE_JUDGE freopen("458.in", "r", stdin); freopen("458.out", "w", stdout); #endif char c; while(scanf("%c", &c) != EOF){ if(c != '\n'){ printf("%c", c-7); } else{ printf("\n"); } } return 0; } #endif
相关推荐
EasyToYou is a decoder of IonCube, as the name indicates, here you can decode the files encrypted with IonCube easily. We have developers working every day to keep the site and the decoder updated. If...
BASE64Decoder包 加密代码: 加密前字符串:String key="mykey"; byte[] bt = key.getBytes(); 加密后字符串:String newKey=(new BASE64Encoder()).encodeBuffer(bt); 解密代码: 加密后的字符串:String newkey=...
sun.misc.BASE64Encoder找不到jar包的解决方法?... Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar
libmp3decoder, the library is to decoder mp3 audio stream to pcm audio stream. the library is witten by c language, so it is independent-plateform. it can be compiled in any plateform, in the ...
Matlab simulations of the encoder and decoder for the New Radio LDPC code from 3GPP Release 15.zip
Decoder for Zend php 5.6.9.0
- RSDecoder.v : contains description of top module of the decoder. It combines 5 modules of typical RS Decoder building blocks. - scblock.v : contains description of the SC (Syndrome Computation) ...
Matlab simulations of the encoder and decoder for the LTE turbo code from 3GPP Release 15.zip
decoder v2
PIE(pulse interval decoder)- Its the PIE decoder that I built for my RFID project. Its an ambedded simulink model.
Loads a new frame, reads its headers, and determines the uncompressed image format.
4FSK software decoder for Flex Paging Decoder
this code maab descrie the decoder componetnt of turbo with iterative decoding process
AIS Decoder 使用说明,步骤清晰。。
base64加密和解密,很好用,亲测试可用,包含sun.misc.BASE64Decoder和sun.misc.BASE64Encoder
sun.misc.BASE64Decoder.jar 绿色版 官方版本自己打包好的,可以直接调用,欢迎下载
Decoder of IonCube, as the name indicates, here you can decode the files encrypted with IonCube easily. We have developers working every day to keep the site and the decoder updated. If you want to ...
sun.misc.BASE64Decoder 其中包括 Android Base64Jar包 以及Java源代码 sun.misc.BASE64Decoder 其中包括 Android Base64Jar包 以及Java源代码 sun.misc.BASE64Decoder 其中包括 Android Base64Jar包 以及...
mp2 audio decoder source code
The easy to use Swift JSON decoder.zip,[Deprecated] The easy to use Swift JSON decoder