hdu 5949 Relative atomic mass

关于keil编译报.sct (7): error: L6236E: No section matches selector - no section to be FIRST/LAST.处理方法 使用keilUvision5向下兼容,选择S3C2440主款芯片编译运行汇编语言。 出现了一个错误: . \objectslex3-2.sct (7): error: L6236E: No section matches selector - no section to be FIRST/LAST. 我在网上搜了很多,没有找到适合修正我这里的错误的。故咨询陈老师,终于将这个错误解决。 错误如下: 修改过程: 打开小仙女棒 将linker的Use Memory Layout fromTarget Dial 阅读详情

http://acm.split.hdu.edu.cn/showproblem.php?pid=5949




给出一串字符串,C代表碳,H代表氢,O代表氧,求摩尔质量。遍历即可。



#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <cmath>
using namespace std;
char c[10005];
int main()
{
    int n;
    cin>>n;
    while(n--)
    {
       cin>>c;
       int n=strlen(c);
       int a=0,b=0,d=0;
       for(int i=0;i<n;i++)
       {
           if(c[i]=='H')
           {
               a++;
           }
           if(c[i]=='C')
           {
               b++;
           }
           if(c[i]=='O')
           {
               d++;
           }
       }
       cout<<a+b*12+d*16<<endl;
    }
    return 0;
}



【AI工具】Browser use搭建及使用的保姆级教程:让AI帮你自动操作浏览器 阅读详情

相关推荐

头歌操作系统 课堂练习4.2:页式内存管理 答案 无解析

头歌操作系统 课堂练习4.2:页式内存管理 答案 无解析

kercii的博客 1万+

HDU 5949 Relative atomic mass 【模拟】 (2016ACM/ICPC亚洲区沈阳站)

Relative atomic mass Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 66Accepted Submission(s): 59 Problem Description Relat...

PHILIP0917的博客 237

SMRATS(一) SMARTS+PPO baseline运行教程

python类方法 class Agent: @classmethod def from_function() python typing 含义 为防止弱类型python出现忘记变量类型的问题,python3.5及之后版本增加了对应的类型提示。 输入和输出类型 函数接受并返回一个字符串,注释像下面这样: def greeting(name: str) -> str: return 'Hello ' + name 常用的typing类型 int,long,float: 整型,

Freshduke的博客 1418

hdu 5949 Relative atomic mass 2016ACM/ICPC沈阳赛区现场赛B

Problem Description Relative atomic mass is a dimensionless physical quantity, the ratio of the average mass of atoms of an element (from a single given sample or source) to 12of the mass of an a

lqybzx的专栏 1048

工程师职级胜任力框架

一、前言 尽管这些年国内的IT行业发展迅速,但是仍然欠缺一套比较综合性的面向工程师的职级胜任力框架,造成国内很多工程师大都一心只想成为技术大牛,而忽视了自己全方位的工程师职业素养和能力的培养。 最近我有幸读到了Circle CI公司分享的工程胜任力矩阵,发现这份文档就是一份比较贴合互联网研发型企业的工程师职级胜任力框架,于是我在它的基础上,重新整理出了一份更适合国内工程师阅读的《工程师职级胜任力框架》,并把它分享在波波的github站点上,希望这份文档对工程师的职业开发和成长有帮助。注,Circle CI.

架构师波波的专栏 6354

esp32s3 spi camera gc6133调试

gc6133 spi只有master模式,同时需要esp32提供主时钟,需要有主时钟然后才能通过i2c进行初始化.测试了几种方式,记录如下。

hclydao的专栏 1574

HDU 5949 Relative atomic mass

Relative atomic mass Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1133    Accepted Submission(s): 972 Problem Description Relati

LZK1997的博客 573

SAP 更改物料基本计量单位

创建订单单位后,新创建的采购申请、采购合同、采购信息记录均会使用新的订单单位

matinal 當冬夜漸暖 。公众号:matinal 6180

codeforces 841A Generous Kefa

http://codeforces.com/contest/841/problem/A 给一串包含小写字母的字符串,每个字符代表不同颜色的气球,再给出一个人数,问能否把气球发完并保证不存在一个人拿2个相同颜色的气球。 只要保证数量最多的那种颜色的气球不超过人数即可。 #include #include using namespace std; int main(){ int

三水的鱼塘♂ 686

为什么BGA焊点总在四个角先坏?一次热-振耦合仿真给你讲明白

本文通过Ansys Workbench进行热-振耦合仿真,深入分析了BGA焊点在四个角点先失效的机理。研究发现,角点焊点由于CTE失配、振动载荷放大及几何应力集中等因素,承受的等效塑性应变和动态应力显著高于中心区域,导致其疲劳寿命大幅降低。仿真数据揭示了角点焊点的应力分布和蠕变特性,为电子封装可靠性设计提供了重要依据。

weixin_42535461的博客 441

SAP 中配置权限职责菜单并分配给用户的核心流程是:用PFCG 创建 / 维护角色(含菜单、事务码、权限)→ 生成权限参数文件 → 通过 SU01/SU10 将角色分配给用户

SAP权限配置核心流程:1)通过PFCG创建角色,配置菜单事务码及权限对象;2)生成权限参数文件;3)用SU01/SU10分配角色给用户。关键步骤包括:在PFCG中维护菜单结构、设置权限字段值、生成Profile,通过用户比较验证权限。批量分配可用SU10,特殊需求可创建复合角色或自定义权限对象。常见问题需检查权限缺失(SU53)、菜单分配及组织级别设置。流程简化为:创建角色→配置权限→分配用户→验证生效。

金牌架构师 1281

codeforces 884B Japanese Crosswords Strike Back

http://codeforces.com/problemset/problem/884/B #include using namespace std; int main() { int n,t; while(cin>>n>>t) { long long int ans=0; long long in

三水的鱼塘♂ 582

阿波罗开发板硬件架构与STM32模块化设计详解

嵌入式开发板的模块化设计是提升硬件复用性、降低迭代成本的关键技术路径。其核心在于底板与核心板的电气解耦与功能分层,依托STM32系列MCU(如F429/F767)的丰富外设资源与引脚复用能力,实现信号完整性、电源域隔离与热管理的系统级协同。该架构显著支撑工业HMI、智能家居网关、便携医疗设备等典型场景,尤其在RGB LCD驱动、QSPI Flash内存映射、多协议通信(CAN/RS485/USB)及低功耗唤醒(WK_UP按键)等工程实践中展现出高可靠性与易调试性。本文围绕阿波罗开发板展开深度解析,覆盖最小系

weixin_42510201的博客 71

codeforces 841B Godsend

http://codeforces.com/contest/841/problem/B 一道奇偶博弈题,两个人轮流拿一串数列中的数字,第一个人能拿总和为奇数的数字,第二个人能拿总和为偶数的数字。 如果对博弈很感兴趣的人一下就能发现,因为一个数只有减去(拿掉)奇数部分的时候,它本身的奇偶性才会发生变化,拿偶数则是不会发生变化的。 那么第二个人想要赢就只有可能是先手的人第一步都走不下去的

三水的鱼塘♂ 515

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

第八届福建省大学生程序设计竞赛-重现赛I Magic

Problem I Magic Accept: 24    Submit: 157 Time Limit: 2000 mSec    Memory Limit : 262144 KB Problem Description Kim is a magician, he can use n kinds of magic, number from 1 to n. We use

三水的鱼塘♂ 500

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

第八届福建省大学生程序设计竞赛-重现赛 A Frog

Problem A Frog Accept: 458    Submit: 573 Time Limit: 1000 mSec    Memory Limit : 262144 KB Problem Description Therearex frogs and y chicken in a garden. Kim found there are n heads and

三水的鱼塘♂ 470

visio安装包

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

codeforces 837A Text Volume

A. Text Volume time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a text of single-space separate

三水的鱼塘♂ 464

hdu 5948 Thickest Burger

http://acm.split.hdu.edu.cn/showproblem.php?pid=5948 #include #include #include #include #include using namespace std; int main() { int n; cin>>n; while(n--)

三水的鱼塘♂ 431

2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 C coconut

很简单的线性模拟,循环模拟,遇到不满足的情况就退出。 #include #include #include #include #include using namespace std; int main(){ int t; scanf("%d",&t); while(t--) { int city[1111]; int day[1111]; i

三水的鱼塘♂ 430

codeforces 873A Chores

http://codeforces.com/problemset/problem/873/A #include using namespace std; int main(){ int n,k,x; while(cin>>n>>k>>x) { int a[1111]; int i; for(i=1;i<=n;i++) cin>

三水的鱼塘♂ 390

csu 1567 Reverse Rot

1567: Reverse Rot Submit Page     Summary    Time Limit: 1 Sec     Memory Limit: 128 Mb     Submitted: 372     Solved: 203     Description A very simplistic scheme, which was used

三水的鱼塘♂ 379

poj 2080 Calendar

Calendar Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 13967   Accepted: 4951 Description A calendar is a system for measuring time, from hours and minutes

三水的鱼塘♂ 373

HDU 5982 Relic Discovery

http://acm.hdu.edu.cn/showproblem.php?pid=5982 这道题说实话没有读,但是看样例3 4 2 1 输出14 猜可能是3*4+1*2 结果还真是,很好奇在比赛的时候清华大学是怎么做到在1分钟内读完题并提交的,太强了。 #include using namespace std; int main(){ int

三水的鱼塘♂ 370

codeforces 1013 A Piles With Stones

http://codeforces.com/contest/1013/problem/A 只要看第二次的总和没有比第一次还大即可   #include&lt;bits/stdc++.h&gt; using namespace std; int main() { int n; while(cin&gt;&gt;n) { int a; int s1=0; ...

三水的鱼塘♂ 365
上一篇: hdu 5950 Recursive sequence
下一篇: hdu 5948 Thickest Burger
threeh20
博客等级 码龄9年 64粉丝 422原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值