UVa 10878 - Decode the tape

【DeepSeek实战】1、DeepSeek民用级开发全指南:从0到1掌握AI应用开发与模型蒸馏实战 DeepSeek创新性地打破了传统AI开发的技术壁垒,通过双模型架构(DeepSeek-V3和R1)实现普惠化与专业化并重。其核心优势包括:零代码操作、浏览器直接使用、中文提示词控制及低成本(2元/百万token)。用户通过简单三步(注册-配置-使用)即可快速开启AI之旅,平台提供$50免费额度支持2个月高频使用。 四大核心应用场景: 办公自动化:周报撰写、PPT生成、数据分析一键完成 内容创作:提供爆款标题生成、垂直领域写作模板 学习辅助:支持文档解析、错题讲解、知识图谱构建 生活服务:个性化行程规划 阅读详情
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 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.

 

 

 

#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;
}


 

《计算机视觉:从入门到精通》技术手册 第1章 计算机视觉概述与历史演进 视觉感知与机器视觉在工程实践中常被混用,但二者存在本质差异。视觉感知强调对光学信号的语义理解与场景解释,核心在于从二维投影重建三维世界的物理与语义属性。该领域关注遮挡处理、光照变化、材质反射等复杂因素的建模,其目标是实现类似人类视觉系统的场景理解能力。机器视觉则侧重于工业场景中的精密测量与控制,通常基于结构化光源、已知几何约束与标定参数,执行边缘检测、尺寸测量、位置定位等任务。前者面向开放环境的通用理解,后者面向受控环境的精确执行。 阅读详情

相关推荐

生信入门第七课:使用FastQC软件进行测序原始fastq数据质控

从实验到数据:RNA定量、文库片段长度、fastqc质控和fastp去接头

微生信 489

hive中两表同名列关联

hive中两表关联如果列同名会报错。 如下 Error: COMPILE FAILED: Semantic error: [Error 10878] Column xxx Found in more than One Tables/Subqueries (state=42000,code=10878) 这种情况下可以修改其中一个表的列名。如下 select a.stockCode,b.name,...

yahahassr的博客 2012

告别臃肿!保姆级教程:用NTLite深度精简Win10,打造你的专属纯净系统(附完整组件移除清单)

本文提供了一份详细的NTLite教程,帮助用户深度精简Windows10系统,移除冗余组件并优化性能。从准备工作到组件移除清单,再到系统配置优化和无人值守安装,逐步指导用户打造专属纯净系统。附完整组件移除清单和实战经验,确保系统稳定高效运行。

weixin_30945039的博客 858

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

从solidworks导出URDF模型

一、下载sw_urdf_exporter插件 ROS目前提供了SolidWorks转URDF的插件,叫做sw_urdf_exporter,从http://wiki.ros.org/sw_urdf_exporter下载sw2urdfSetup.exe文件,下载后点击安装,安装完成后就能在solidworks中导出URDF模型了。 二、创建solidworks模型 下面以较为简单的四轮小车为例进行说...

weixin_45168199的博客 4万+

CentOS8安装NVIDIA显卡驱动、CUDA和Anaconda

CentOS8安装NVIDIA显卡驱动和CUDA 参考:CentOS nvidia+cuda+cudnn 安装 安装英伟达显卡驱动 1、检查是否安装了NVIDIA的GPU(硬件层面): lspci | grep -i nvidia 2、安装GCC、kernal组件、dkms等 sudo yum install gcc sudo yum install gcc-c++ sudo yum -y install kernel-devel sudo yum -y install kernel-headers s

智慧的旋风的博客 1万+

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

永磁同步电机ADRC控制策略优化:从理论到Simulink仿真实践

本文深入探讨了永磁同步电机自抗扰控制(ADRC)策略的优化与实践。针对传统PID在动态响应、抗扰及噪声抑制方面的不足,详细解析了ADRC三大核心组件——跟踪微分器(TD)、扩张状态观测器(ESO)与非线性状态误差反馈(NLSEF)的工作原理。通过手把手的Simulink仿真教程,展示了从算法编写、模型搭建到参数整定的完整流程,并进阶实现了位置-速度双环ADRC协同控制,为高性能电机伺服系统设计提供了从理论到实践的清晰指南。

root9的博客 412

UVa 10878 ---- 求0.00ms解法

闲来无事,去UVa玩玩;

程书画的 BLOG 1158

解锁机器人逆运动学算法:从理论到实战

机器人逆运动学,简单来说,就是已知机器人末端执行器(如机械臂的手部、工具等)期望达到的位置和姿态,求解机器人各个关节需要达到的角度或位移的过程。在机器人的实际应用场景中,逆运动学起着不可或缺的作用。以工业制造中的焊接机器人为例,为了完成复杂的焊接任务,焊接头(末端执行器)需要精准地到达工件上的各个焊接点,并保持合适的姿态以确保焊接质量。这时,逆运动学算法就根据焊接点的三维坐标以及焊接头应有的姿态(如角度等),计算出机械臂各个关节的转动角度,从而控制机械臂带动焊接头准确地运动到目标位置。

远程部署调试 运行安装 项目调试 二次开发 项目技术新 持续迭代 部分源码免费分享 2052

学Simulink——基于新型动力与推进系统的场景实例:混合动力无人机的续航能力优化

通过本次 Simulink 仿真,你已掌握:✅混合动力系统架构设计✅内燃机、电机、电池联合建模✅三种能量管理策略(规则型、功率跟随、优化型)✅续航能力仿真与对比分析✅参数调优与优化方法核心收获混合动力是突破续航瓶颈的有效路径能量管理策略(EMS)决定系统效率电池SOC管理是关键Simulink 支持复杂多能源系统的协同仿真掌握混合动力无人机技术,你将具备设计长航时巡检机、应急通信平台、边境巡逻系统的能力。

xiaoheshang_123的博客 101

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

NDohia的博客 340

超级全的PCB LAYOUT高速信号走线指南——简化应用版

在PCB Layout中,几乎涵盖了所有的高速信号走线指南。包括了TF/SD、HDMI、LVDS、DVP、eDP、MIPI、USB2.0、USB3.0、MAC、BT.1120、PCIE高速信号等等。此版本为简化版。

bhxc809751502的博客 8549

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

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

visio安装包

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

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

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

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

OV9734 DATASHEET,完整规格书

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

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

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

水题收集者 614

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

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

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

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
上一篇: UVa10815 - Andy's First Dictionary
下一篇: UVa 123 - Searching Quickly
Invalid_Pointer
博客等级 码龄14年 0粉丝 33原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值