hdu_problem_2054_A == B ?

给定两个数A和B,1081代码 Description 给定两个数A和B(长度不超过100),如果它们相等则输出"YES",否则输出"NO"。 Input 每组测试数据包含两个数A和B。 Output 对于每组测试数据,如果A和B相等,则输出"YES",否则输出"NO"。 Sample Input 1 2 2 2 3 3 4 3 Sample Output NO YES YES NO 立即下载

题目大意:给两个数A和B,如果A和B相等,就输出YES,否则输出NO
该题似乎只用多考虑一种情况,例如1.00000和1

/*
*
*Problem Description
*Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".
*
*
*Input
*each test case contains two numbers A and B.
*
*
*Output
*for each case, if A is equal to B, you should print "YES", or print "NO".
*
*
*Sample Input
*1 2
*2 2
*3 3
*4 3
*
*
*Sample Output
*NO
*YES
*YES
*NO
*
*
*Author
*8600 && xhd
*
*
*Source
*校庆杯Warm Up
*
*
*Recommend
*linle
*
*/
#include<iostream>
#include<string>
using namespace std;
int i;
void split(string &s) {
 if (s.find('.') == string::npos) return;
 for (i = 0; i < s.size(); ++i) {
  if (s.at(s.size() - 1 - i) != '0') {
   s.erase(s.end() - i, s.end());
   break;
  }
 }
 if (s.at(s.size() - 1) == '.') {
  s.erase(s.end() - 1, s.end());
 }
}
int main() {
 string a, b;
 while (cin >> a >> b) {
  split(a);
  split(b);
  if (a == b)
   cout << "YES" << endl;
  else
   cout << "NO" << endl;
 }
 system("pause");
 return 0;
}
Libero SoC v11.8安装与Silver License激活:双系统下FPGA工具链实战 FPGA开发环境是硬件工程师绕不开的基础设施,而EDA工具链的安装与授权管理更是决定项目起步效率的关键环节。以Microsemi(现Microchip)主流的Libero SoC为例,其集成了综合、仿真、布局布线与烧写流程,广泛应用于IGLOO2、SmartFusion2等中低端器件开发。对于需要在Windows与Linux双系统间切换的开发者而言,License的节点锁定机制、Host ID匹配以及环境变量配置常常成为隐性障碍。尤其当双系统硬件时钟策略不同步时,可能直接导致License校验失败。理解Fl 阅读详情

相关推荐

STM32F103用软件I2C读取IP2366电量数据,实测避坑指南(附完整源码)

本文详细介绍了如何使用STM32F103的软件I2C驱动读取IP2366电池管理芯片的电量数据,包括GPIO初始化、I2C时序实现、关键延时优化及常见问题解决方案。通过实测避坑指南和完整源码,帮助开发者快速实现稳定的电量数据读取,适用于嵌入式电池管理系统开发。

weixin_33725722的博客 532

HDU2054_A == B ?【模拟题】【大数】【水题】

题目大意:给你两个数A和B,判断A和B是否相等,若相等输出"YES", 否则输出"NO"。 思路:题目没有给出A、B的数据规模,这里就是个大数题。把A、B用 字符数组存起来,标记A、B的正负号,若为正,则标记为1,若为负, 则标记为0,将字符数组内的'-'赋值为'0',然后将整数前的零和小数部分 后边的零清除,然后用数组将整数部分和小数部分分别存起来。之后分别 比较A、B的整数部分和小数部分是否相等。注意A、B可能为整数或是小 数,尤其注意A、B可能会在整数部分前边有N个零或者小数部分后边有N 个零,比如0

程序员充电站(itcharge) 1638

实战!在 AMD RX 9070 XT (16G) 上使用原生 Windows ROCm 7.1 部署 ComfyUI + Z-Image-Turbo

本文详细介绍了如何在Windows系统下为AMD Radeon RX 9070 XT显卡配置Z-Image-Turbo AI绘图环境。主要内容包括:安装VS Build Tools和最新显卡驱动,配置Conda Python 3.12环境,安装ROCm 7.1.1 SDK及PyTorch适配版本,部署ComfyUI可视化界面。重点解决了AMD显卡在AI绘图中的适配问题,通过--use-split-cross-attention参数优化显存使用,最终成功搭建了可在消费级16G显存设备上运行的AI绘图环境

qq_33614778的博客 4803

杭电oj刷题(2054)

A == B ? 题目描述: Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers A and B. Output for each case, if A is equal to...

lucy girl 1016

如何使用安路TD与Modelsim进行联合仿真?

1)安装安路FPGA开发软件;(本次实验使用版本:TD_5.6.3_Release)2)安装Modelsim仿真软件;(本次实验使用版本:Modelsim SE-64 10.1c)3)FPGA开发板;(本次实验使用型号:EG4X20BG256)4)LED点灯例程;

qq_17313923的博客 3246

CentOS7安装openGauss5.0.2LTS版本

该文档要根据自己的实际情况调整ip地址。要根据自己的实际网卡调整。

superhanyubo的专栏 2706

一道看似很简单的判断A==B问题

Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Inputeach test case contains two numbers A and B.  Outputfor each case, if A is equal to B, you should pr

坏鱼儿恋夏的博客 1157

手把手教你用差分放大电路搭建LC振荡器(实测频率误差分析)

本文通过一个差分放大电路搭建LC振荡器的实践案例,深入分析了实测频率与理论值产生显著误差的原因。核心在于共模电感的互感效应改变了谐振回路的等效电感,导致频率偏差。文章提供了从电路搭建、误差根源剖析到波形优化与稳定性提升的完整解决方案,帮助电子爱好者深入理解模拟电路的实际行为。

svm4gardener的博客 558

杭电oj HDOJ 2054 A == B ?

杭电oj HDOJ 2054 A == B ? Problem Description Give you two numbers A and B, if A is equal to B, you should print “YES”, or print “NO”. Input each test case contains two numbers A and B. Output for each ...

qq_39880604的博客 599

【100%通过率】华为OD机试真题 JS 实现【水库蓄水问题】【2023 Q1 | 100分】

给定一个长度为 n 的整数数组height。数组的元素表示山的高度,选择两个元素作为水库的边界,求蓄水量的最大值并输出蓄水量最大时的边界下标(蓄水量相同时输出下标较近的)。

MISAYAONE的博客 8182

gb28181之rtp负载之h264

我们知道国标中支持的媒体流格式不止一种,其中最常见的就数PS和h264(ES流中的其中一种)了,PS流我们之前的博文中已经分享过了,本篇博文我们来一起聊聊国标中媒体流的负载为h264的细节。 我们知道h264为了方便网络传输,把原始数据分装成了多个NALU,而NALU包大小是不固定的,因此有时候一个rtp包中可以负载多个NALU,有时候一个rtp包中只负载一个NALU,有时候多个rtp包中包含的...

2103

Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".

#include<stdio.h> #include<string.h> int main(void) { char a[100000], b[100000]; while (scanf("%s%s", a, b) != EOF) { int aa = 0, bb = 0; int a1 = strlen(a), b1 = ...

qq_46176868的博客 3457

AI原生应用架构师指南:系统化思维框架解析

随着ChatGPT、Stable Diffusion等AI技术的普及,「AI原生应用」(AI-Native Application)已从概念走向实践。传统应用以「功能逻辑」为核心(比如用代码写死的购物车规则),而AI原生应用以「数据+模型」为核心(比如根据用户行为动态推荐商品)。本文的目的是为架构师提供一套系统化思维框架如何区分「伪AI应用」和「真AI原生应用」?数据、模型、业务场景三者如何协同设计?架构师需要关注哪些关键技术节点?如何避免「为了AI而AI」的陷阱?

AI Python 编程之道的博客 499

hdu-2054 A == B ?

Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".   Input each test case contains two numbers A and B.   Output for each case, i

wojiaohuangyu的专栏 644

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

假人有限元模型

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

hdu 2054 A == B ?

#include #include using namespace std; char a[100000],b[100000]; void change(char s[]) { int i,len; len=strlen(s); if(strstr(s,".")) { for(i=len-1;s[i]=='0';i--) { s[i]='\0'; len--; }

江东小熊熊 247

Devexpress16.2.6破解工具

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

hdu 2054 A==B?(模拟题)

A == B ? Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 32921    Accepted Submission(s): 5033 Problem Description Give you two numbers A and...

iteye_4729的博客 252

深度学习工具包 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")

JAVA大数几算--HDU 2054 A == B ?

Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers A and B. Output for each case, i...

日拱一卒,功不唐捐 2989

hdu 2054 A == B ? (java大数)

A == B ? Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 62507    Accepted Submission(s): 9807 Problem Description Give you two num

24小时的程序员 501

HDU 2054

期末后第一发。

大咸鱼。。。 666

HDU 2055 An easy problem

3

Shyazhut 308

HDOJ 2057 A + B Again(水题,基础)

http://acm.hdu.edu.cn/showproblem.php?pid=2057 A + B Again Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 23442    Accepted Submission(

Shyazhut 725

2022年暑假ACM热身练习3(部分题目总结)

Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".Inputeach test case contains two numbers A and B.Outputfor each case, if A is equal to B, you should print "YES", or print "NO".Sample 1 2 2 2 3 3 4 3

weixin_57662182的博客 1209

1月21日训练赛A

Give you two numbers A and B, if A is equal to B, you should print “YES”, or print “NO”. Input each test case contains two numbers A and B. Output for each case, if A is equal to B, you should print “...

weixin_44501863的博客 242

U - A == B ?

Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Inputeach test case contains two numbers A and B.  Outputfor each case, if A is equal to B, you should pr

Dockillor的博客 573

A是否等于B?

Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Inputeach test case contains two numbers A and B.  Outputfor each case, if A is equal to B, you should pr

Nice_punch的博客 1127

HDU 2054 A == B ?(找小数点)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2054   Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains tw...

9873
上一篇: hdu_problem_2053_Switch Game
下一篇: hdu_problem_2055_An easy problem
CoderZhuuu
博客等级 码龄10年 26粉丝 107原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址