UVa 10878 Decode the tape (趣题)

当vCenter的证书过期、Root密码过期、Root密码遗忘同时发生时的解决方法与步骤 vCenter,强制修改root密码,修改SSO User密码,修复证书过期问题 阅读详情

10878 - Decode the tape

Time limit: 3.000 seconds

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=1819

"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.

Sample InputSample Output
___________
| 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.

多看看磁带吧。


完整代码:

#include<cstdio>
#include<cstdlib>

char str[11], num[8], *endstr;

int main(void)
{
	gets(str);
	while (gets(str), str[1] != '_')
	{
		int i;
		for (i = 2; i <= 5; ++i)
			num[i - 2] = (str[i] == 'o' ? '1' : '0');
		for (i = 7; i <= 9; ++i)
			num[i - 3] = (str[i] == 'o' ? '1' : '0');
		num[7] = '\0';
		putchar(strtol(num, &endstr, 2));
	}
	return 0;
}

SAP FB03凭证修改实战:巧用BAPI FI_DOCUMENT_CHANGE更新抬头与行项目 本文详细介绍了SAP FB03凭证修改的实战技巧,重点解析了BAPI FI_DOCUMENT_CHANGE的使用方法。通过该接口,用户可以在不冲销原凭证的情况下直接更新抬头文本(BKTXT)和行项目文本(SGTXT),确保凭证编号连续且符合审计要求。文章包含核心机制解析、完整实现步骤、错误处理方案以及高级应用场景,帮助开发者高效完成SAP财务凭证修改。 阅读详情

相关推荐

稀疏变分高斯过程【超简单,全流程解析,案例应用,简单代码】

稀疏变分高斯过程(Sparse Variational Gaussian Processes, SVGP)是一种高效的高斯过程(GP)近似方法,它使用一组称为引入点的固定数据点来近似整个数据集。这种方法大大减少了高斯过程模型的计算复杂度,使其能够适用于大数据集。下面是SVGP的详细数学过程。在标准高斯过程中,给定数据集xiyii1N{(xi​yi​i1N​,目标是学习一个映射fff,其中f∼GPmkf∼GPmkmmm是均值函数,kkk。

刘文凯的博客 3658

UVA 10878 - Decode the tape

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

落日小屋 4133

OpenClaw的引导配置(onboard)流程

脚本安装的直接安装完到引导配置界面,其他安装方式还可以直接命令到配置。

supersolon的专栏 1324

UVA-10878 Decode the tape

UVA-10878 Decode the tape题目大意:将题目中加密后的字符解密Sample Input 自己点击链接查看Sample Output A quick brown fox jumps over the lazy dog.解题思路:将题目中的信息转化为二进制信息,依次输出即可方法一//UVa 10878 - Decode the tape#include <iostream> #in

Tochase的博客 268

contextcapture多区块点云_多源点云数据融合的建筑物精细化建模

本文内容来源于《测绘通报》2020年第8期,审图号:GS(2020)3611号多源点云数据融合的建筑物精细化建模王树臻1, 郑国强1, 王光生1, 胡玉民2, 张德怀2, 亓伟3 ...

weixin_36301639的博客 1825

Java中使用工厂模式和策略模式优雅消除if-else语句(UML类图+案例分析)

在最近的后端开发中,多多少少会发现有很多if-else语句,如果条件过多则会造成整体代码看起来非常臃肿。本篇博客汇总了我对工厂模式和策略模式的理解,以及我是如何把它们巧妙运用在实际项目当中的一些技巧进行了分享,如有问题,欢迎评论区讨论!

黄团团的个人博客 2612

UVA 10878 Decode the tape

这绝对是我去UVA以后遇见的最坑的题,完全就是靠想象力。。。这题实际上是一道水题,就是用二进制表示ascll码,但要注意点前面的是从2的3次方开始的,字母o表示1,空格表示0。 有两点不太明白,第一是解码后的字符串结尾加‘\0’后居然不能ac,第二是输出的时候不能输出回车。 #include #include char find(const char *s) { int base1=

u013268685的专栏(有一种幸福叫AC,有一种期待叫AK) 997

基于Cesium实现,动态水面+大坝排水动画

一、绘制面状水域,使用水波纹理,进行渲染,水体透明,可以看到底色。三、使用粒子系统,将喷泉改变方向,加上重力设置,实现排水动画。二、绘制线状三维体,用作模拟大坝拦截效果。四、最后,模拟水位上升,进行淹没分析,

一醉千秋的专栏 1418

UVA10878 Decode the tape【编码】

“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 mightcontain some sort of useful inform

海岛Blog 1197

[特殊字符]用Python爬取中国裁判文书网案例信息:从爬虫到数据可视化全流程实战(附代码)

✅ 分析裁判文书网的网页结构;✅ 自动化爬取案件信息;✅ 解析加密参数并获取数据;✅ 数据可视化图表输出;✅ 模块化构建爬虫系统。

2201_76125261的博客 2823

正确解决Authentication plugin ‘caching _sha2_password’ cannot be loaded:异常的有效解决方法

正确解决Authentication plugin ‘caching _sha2_password’ cannot be loaded:异常的有效解决方法

wbajsjhhhhh的博客 1万+

UVa10878 Decode the tape

Problem A 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 tape

江枭的专栏 904

软件设计师---钉子户

软件设计师---钉子户

我从不打没有准备的仗! 2万+

uva 10878 Decode the tape

这道题可以算一道入门题,不需要用什么算法。 首先是理解题意,如果你把纸条的8个位置(点前有5个位置,不是4个,点后有3个位置)对应到char类型的8个位置上去,可以发现那正好是输出字符的ASC II码。 其次,要注意题目说了只有一个纸带,并且‘_’和‘|’也要处理。 最后,谈一下我犯的错误,就是没有把输入全部读取,而是在判断到‘\n’时就退出,导致WA。 由于输入十分繁琐,所以用输入输出流

水题收集者 614

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

UVA 10878-Decode the tape

UVA 10878-Decode the tape题目大意:给出图中磁带,判断加密规则解题思路:每一行是一个二进制数,o为1,空格为0#include <stdio.h> #include <string.h> #include <iostream> using namespace std; int main() { char a[20]; int y[] = {0, 0, 64,

ZeroLH00的博客 348

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

UVa 10878 - Decode the tape

/** * Author: Gneveek * Data: 2011-10-3 * Descripition: UVa 10878 - Decode the tape */ #include #define MAXN 15 const int asc[11] = {

程书画的 BLOG 739

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

UVA10878 - Decode the tape

题目https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1819是ascii的形式,转换一下就好,水题代码#include<iostream> #include<cstdio> #include<cstring> //#include<vector> #incl

fangtanchen的博客 402

UVa 10878 Decode the tape

Description   "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 conta

pengkexiaohuai的博客 265

UVA - 10878 Decode the tape

Decode the tape Time Limit: 3000MS   Memory Limit: Unknown   64bit IO Format: %lld & %llu Submit Status Description   "Machines take me by surprise with great freq

acm_1361677193的专栏 304

UVA10878 Decode the tape

阿兰·图林说:“机器的高频率令我震惊。” 最早的时候,计算机的数据及程序记录卡片上,后来出现了纸带。 问题链接:UVA10878 Decode the tape。 题意简述:本题的题目是纸带编码。输入输入模仿过去的纸带,其中的"|"纸带里是没有的。纸带上信息有7位,通过穿孔实现,有孔的为1(用"o"表示),没孔的地方为0(用空格表示)。中间有一串空用于机械带...

weixin_33858485的博客 202

UVA - 10878 Decode the tape

Description   "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 conta

七夜 512
上一篇: UVa 409 Excuses, Excuses! (字符串匹配)
下一篇: UVa 10815 Andy's First Dictionary (分离字符串)
synapse7
博客等级 码龄14年 432粉丝 701原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值