UVA 10878 - Decode the tape(字符串)

基于STM32与HRTIM的四开关Buck-Boost双向DC-DC电源设计实战(附源码、仿真与设计解析) 本文详细介绍了基于STM32F334的HRTIM高分辨率定时器实现四开关Buck-Boost双向DC-DC电源的设计实战。通过精准的PWM控制、双环PID算法和智能模式切换逻辑,解决了电压震荡与效率优化等关键问题,并提供了完整的源码、PSIM仿真及参数计算,为高性能电源设计提供了实用参考。 阅读详情

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.

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.


Problemsetter: Igor Naverniouk
Special thanks: BSD games ppt.


=============================

每一行代表一个ascii码,二进制表示,有 "o" 的地方为1,”.“不占二进制的位置不用管


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
    char str[20];
    while(gets(str))
    {
        int sum=0;
        if(str[0]=='_') continue;
        if(str[9]=='o') sum+=1;
        if(str[8]=='o') sum+=2;
        if(str[7]=='o') sum+=4;
        if(str[5]=='o') sum+=8;
        if(str[4]=='o') sum+=16;
        if(str[3]=='o') sum+=32;
        if(str[2]=='o') sum+=64;
        if(str[1]=='o') sum+=128;
        printf("%c",sum);
    }
    return 0;
}


联想拯救者恢复出厂设置全攻略 通过本文介绍的几种方法,你可以轻松地将联想拯救者恢复到出厂系统状态。无论是通过Windows恢复选项、高级启动选项还是一键恢复功能,都能帮助你解决系统问题、清除个人信息或重置软件环境。在重置前,请务必备份重要数据,并确保了解重置的影响。重置完成后,进行适当的系统设置和软件安装,让你的联想拯救者焕然一新,继续为你提供高效、稳定的计算体验。 阅读详情

相关推荐

ESD 防护深度解析:模型、等级、系统设计与防护策略

本文系统阐述了静电放电(ESD)防护的核心技术体系。首先对比分析了HBM(人体模型)和CDM(充电设备模型)两种基础ESD模型的物理特性、测试标准及分级要求,指出相同电压下CDM的破坏性是HBM的15-20倍。其次详细解析了IEC61000-4-2系统级ESD标准,包括接触/空气放电测试方法及判定等级。重点提出了系统级防护的三层架构:空间隔离(≥10mm间距)、电气隔离(地平面分割)和TVS管选型(响应时间<1ns),并对比了MOV、SCR等防护器件特性。针对不同应用场景(消费电子、工业控制等)给出了差异化

bother3000的博客 1883

UVaOJ 10878 - Decode the tape

AOAPC I: Beginning Algorithm Contests (Rujia Liu) :: Volume 1. Elementary Problem Solving :: String Description 解密一段磁带上的内容。 Type String Analysis 神一般的题目,要你破译一段密码。 输入从上往下看,可以看成题目所

A Code Rabbit 912

Flink项目基础配置指南

在大数据处理领域,Apache Flink凭借强大的实时流处理和批处理能力,成为众多开发者的首选工具。在日常工作中,开发Flink Jar任务是常见需求,但每次都需重复配置日志、梳理pom依赖、设置打包插件等,流程繁琐且易出错。为提升开发效率,减少重复劳动,将这些基础配置进行整理归纳十分必要。本文将围绕Flink项目的本地日志配置、pom依赖及插件配置展开详细介绍,为开发者提供一套可直接复用的基础配置方案,助力Flink项目高效开发。在Flink项目中,日志是了解任务运行状态、排查问题的重要依据。本地日志配

qq_42773076的博客 1210

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

three.js 载入 3D 模型的方法

三维模型的加载器ColladaLoader模型加载器。GLTFLoader模型加载器。OBJLoader模型加载器。FBXLoader模型加载器。

w418856的博客 4362

C语言 函数

一、什么是函数 二、函数的相关语法 三、函数编码规范

m0_57105760的博客 1891

UVa 10878 - 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

Invalid_Pointer的专栏 423

半桥LLC谐振变换器及同步整流MATLAB仿真(二)

接上文,半桥LLC谐振变换器及同步整流MATLAB仿真

qq_55203246的博客 4330

uva 10878 Decode the tape(字符串处理)

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

不慌不忙、不急不躁 1382

OpenClaw进阶实战(二十五):抖音企业号——私信回复与视频评论分析

摘要:本文介绍抖音企业号自动化运营方案,突破抖音强风控体系的技术挑战。针对内容生产、私信互动和账号矩阵三大场景,提出混合架构解决方案: 私信自动化:结合关键词触发与随机延迟(45秒±15),实现拟人化回复,支持价格咨询/商务合作等高优先级消息识别 混合技术栈:官方API(合规)+真机RPA(覆盖长尾需求)+AI辅助生成(脚本→剪辑→发布闭环) 安全策略:通过设备指纹模拟、行为间隔随机化和内容差异化处理规避风控,提供每日200条的安全操作阈值。配套OpenClaw技能实现一键部署,包含cookie配置、回复规

PeterPan的博客 144

【AI编程】Vibe Coding 开发环境搭建与项目实战操作详解

Vibe Coding 开发环境搭建与项目实战操作详解

congge 7335

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

那些年 847

华为OD 面试手撕代码真题【岛屿的周长】

0代表水,1代表陆地,岛由陆地组成且岛内不允许有湖,让你求岛的周长。

MISAYAONE的博客 8420

UVa10878 - Decode the tape-字符串-难度1

题目链接: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1819 Problem A Decode the tape Time Limit: 1 second "Machines take me by surpris

Ieyasu的专栏 707

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

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

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

UVa10878_Decode the tape(小白书字符串专题)

Description 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 c

_nplus 794

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

uva 10878 - Decode the tape 字符串水题 找到规律就简单了

#include #include int main() { #ifdef LOCAL freopen("in.txt","r",stdin); #endif // LOCAL char x[15] = "___________"; char str[15]; int d[11] = {0,0,64,32,16,8,0,4,2,1,0};

泪无痕 657

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

UVA 10878 (暑假-字符串(2) -C - Decode the tape)

#include #include int main() { int i, sum, count=0, len, j=0; char str[30]; gets(str); while ( gets(str) && str[0] != '_') { len = strlen(str); // puts(str); sum = 0; // printf ("\n%d

Bingo 1906

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

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

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

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

原题链接: https://vjudge.net/problem/UVA-10878 AC代码: #include <bits/stdc++.h> using namespace std; int c[11] = {0, 0, 64, 32, 16, 8, 0, 4, 2, 1,0}; int main() { char str[20]; fgets(str, 21, stdin); while(fgets(str, 21, stdin)&&str[0

sjyisdog的博客 143

UVa-10878-Decode the tape

AOAPC I: Beginning Algorithm Contests (Rujia Liu)::Volume 1. Elementary Problem Solving::String // 10878 - Decode the tape #include <iostream> #include <cstring> using nam...

abu47643的博客 156

uva-10878 - Decode the tape

uva-10878 - Decode the tape 题目大意:没有 结题思路:无脑解终于一题无脑解的水题哈哈哈哈(干笑)

mydjrzal2的博客 247
上一篇: UVA 409 - Excuses, Excuses!(字符串)
下一篇: UVA 10815 - Andy's First Dictionary(字符串)
coco430
博客等级 码龄14年 9粉丝 107原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值