UVa 10878 - Decode the tape
来源:互联网 发布:怎么查看端口是否关闭 编辑:程序博客网 时间:2024/05/16 01:41
Problem A
Decode the tape
Time Limit: 1 second"Machines take me by surprise with great frequency."Alan Turing
Problemsetter: Igor Naverniouk
Special thanks: BSD games ppt.
Decode the tape
Time Limit: 1 second"Machines take me by surprise with great frequency."Alan Turing
Your boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is written on them.
Input
The input will contain one tape.
Output
Output the message that is written on the tape.
___________| o . o|| o . || ooo . o|| ooo .o o|| oo o. o|| oo . oo|| oo o. oo|| o . || oo . o || ooo . o || oo o.ooo|| ooo .ooo|| oo o.oo || o . || oo .oo || oo o.ooo|| oooo. || o . || oo o. o || ooo .o o|| oo o.o o|| ooo . || ooo . oo|| o . || oo o.ooo|| ooo .oo || oo .o o|| ooo . o || o . || ooo .o || oo o. || oo .o o|| o . || oo o.o || oo . o|| oooo. o || oooo. o|| o . || oo .o || oo o.ooo|| oo .ooo|| o o.oo || o. o |___________
A quick brown fox jumps over the lazy dog.
Problemsetter: Igor Naverniouk
Special thanks: BSD games ppt.
#include <stdio.h>#include <string.h>int main(){ int a,p[8]={6,5,4,3,0,2,1,0}; char s[20]; while(gets(s)!=NULL) { if(s[0]=='|') { a=0; for(int i=0;i<8;i++) { a|=(s[i+2]=='o')<<(p[i]); } printf("%c",a); } } return 0;}
- UVa 10878 - Decode the tape
- uva 10878 Decode the tape
- uva-10878 - Decode the tape
- uva 10878 - Decode the tape
- UVa 10878 - Decode the tape
- Uva - 10878 - Decode the tape
- UVA 10878 - Decode the tape
- UVa 10878 - Decode the tape
- UVA 10878 - Decode the tape
- UVA 10878 Decode the tape
- UVa - 10878 - Decode the tape
- UVA 10878 Decode the tape
- uva 10878 Decode the tape
- UVa 10878 - Decode the tape
- uva 10878 decode the tape
- uva - 10878 - Decode the tape
- uva 10878 Decode the tape
- UVA 10878 Decode the tape
- cocos2d-x游戏实例 《简单棋》入门尝试(一) 整体思路
- JAVA基础程序设计——数组排序、算法(数组实例+自己写的算法实例)
- UVa 10115 - Automatic Editing
- 邓仲祥:红红火火过大年
- UVa10815 - Andy's First Dictionary
- UVa 10878 - Decode the tape
- sh cssupdate
- Gentoo Linux的boot分区问题及其它
- zoj 1151 Word Reversal
- ssh配置c3p0
- BZOJ 1098([POI2007]办公楼biu-链表优化Dfs)
- nagios remote monitoring nrpe vs ssh
- POJ---3299 Humidex
- poj 1502 MPI dijkstra