problem 1004

对话系统简介 《文本上的算法》学习笔记1、问答型1.1、基于语义分析的方法1.2、基于信息抽取的方法1.3、端对端的方法2、任务型2.1、生成式模型( Generative Model )2.2、判别式模型( Discrimitive Model )2.3、规则系统3、闲聊型3.1、规则方法3.2、生成模型3.3、检索方法 个人认为NLP领域最难的方向可以说是阅读理解与文本生成/摘要,而对话系统,尤其是闲聊常常... 阅读详情
Financial Management 
Time Limit:1000MS  Memory Limit:10000K
Total Submit:
20549 Accepted:9586 

Description
Larry graduated 
this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what's been going on with his money. Larry has his bank account statements and wants to see how much money he has. Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account balance. 

Input
The input will be twelve lines. Each line will contain the closing balance of his bank account 
for a particular month. Each number will be positive and displayed to the penny. No dollar sign will be included. 

Output
The output will be a single number, the average (mean) of the closing balances 
for the twelve months. It will be rounded to the nearest penny, preceded immediately by a dollar sign, and followed by the end-of-line. There will be no other spaces or characters in the output. 

Sample Input


100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75

Sample Output


$
1581.42

Source
Mid
-Atlantic 2001


Source

Problem Id:
1004  User Id:keepRunning 
Memory:92K  Time:0MS
Language:C
++  Result:Accepted

Source 

#include
<iostream>
using namespace std;
int main(void) {
    
float array[12];
         
int i;
    
for(i = 0; i < 12; i++) {
        cin 
>> array[i]; 
    }

    
float average;
    
float sum = 0;
    
for(i = 0; i < 12; i++) {
        sum 
+= array[i];
    }

    average 
= sum / 12.0;
    cout 
<< "$" << average;
    
    
return 0;
}


 
Flutter SDK的删除与重装:一步步教你如何轻松搞定 在Flutter开发过程中,我们可能会遇到一些需要重新安装Flutter SDK的情况,例如升级Flutter版本、解决依赖冲突等。本文将详细介绍如何删除并重新安装Flutter SDK,让你轻松应对各种问题。 阅读详情

相关推荐

CentOS 7下Ollama+Dify+DeepSeek离线部署全攻略(附模型迁移技巧)

本文详细介绍了在CentOS 7无网环境下,从零开始离线部署Ollama、DeepSeek模型与Dify平台的完整实战攻略。内容涵盖基础环境规划、Ollama服务安装、模型文件迁移技巧、Docker引擎离线部署,以及Dify平台与本地Ollama服务的集成配置,为企业内网构建安全、可控的AI应用提供了一套经过验证的解决方案。

weixin_28826521的博客 349

Light oj-1004 - Monkey Banana Problem,数字三角形的变形版~

1004 - Monkey Banana Problem PDF (English) Statistics Forum Time Limit:2 second(s) ...

weixin_30389003的博客 141

深入Linux网络子系统:STMMAC驱动如何通过MDIO总线与PHY芯片“对话”

本文深入解析了Linux网络子系统中STMMAC驱动通过MDIO总线与PHY芯片的通信机制。详细介绍了MDIO总线的注册流程、PHY设备的绑定机制以及设备树配置,帮助开发者理解MAC控制器与PHY芯片的协作基础,优化网络通信性能。

weixin_26897585的博客 448

1004 Problem E 今年暑假不AC

Problem E Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 258   Accepted Submission(s) : 78 Problem Description “今年暑假不AC?” “是的。” “那你干什么呢?”

qq_1053032898的博客 338

配置cts performance最优范围

这里写自定义目录标题cts例如此案例中,我们多测几次,发现Measured frame rate 的平均值为average=(380+389+380+371)/4=380 cts by VinterYoung Expected achievable frame rates for OMX.MTK.VIDEO.DECODER.HEVC video/hevc 1280x720: [75.0, 262.0]. Measured frame rate: [380.5645006622224, 389.3983545

o343196469的博客 1318

USB 3.0 高清音视频采集芯片——MS2130

MS2130 是一款 USB 3.0 高清视频和音频采集芯片,内部集成 USB3.0 Device 控制器、数据收发模块、音视频处理模块。

YOU_SeMi的博客 7859

Light OJ 1004 - Monkey Banana Problem dp

Light OJ 1004 - Monkey Banana Problem 纯属个人理解 不是最佳算法 You are in the world of mathematics to solve the great "Monkey Banana Problem". It states that, a monkey enters into a diamond shaped two dimensio

奋斗de穷小子 427

android usb读写,安卓(Android)下如何开发USB NFC读写器app

对安卓工程师来说,在安卓下使用USB设备需要了解很多硬件的内容,这可能会导致工程周期的延长或者app的不稳定。为了将这种风险降到最低,友我科技发布了NFC读写器在安卓下的sdk,使用NFC读写器的类接口,安卓工程师就可以直接调用NFC读写器了,简单可靠。NFC读写器的安卓库文件为:yoworfidreader.jar在ADT工程中导入yoworfidreader.jar库文件,即可在工程中引用NF...

weixin_36433781的博客 823

Problem 1004

Problem 1004 Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 27  Solved: 3 [Submit][Status][Web Board] Description 对于十进制整数N,试求其-2进制表示。 例如,因为  1*1  +  1*-2  +  1*4  +  0*-8  +1*16  +  1*-32  =  -1

CSUST_ACM的专栏 699

DeepSmote:一种深度SMOTE方法

DeepSmote 一种全新的将深度学习与Smote相结合的过采样方法! 目前在许多领域已经被使用,值得大家关注学习!

走在深度学习前沿的小宋 1447

大学计算 - NumPy库的矩阵运算 实训答案

本文介绍了三个NumPy矩阵操作的实验练习。第一关练习ndarray类型操作,包括矩阵构造、元素平方和计算、矩阵乘积运算和逆矩阵行列式计算;第二关针对matrix类型,涉及绝对值最大值获取、特定矩阵乘积运算和转置矩阵特征值计算;第三关实现Moore-Penrose伪逆矩阵计算,并与NumPy内置pinv函数结果比较误差。实验涵盖了NumPy核心矩阵操作,展示了从基础运算到高级矩阵分解的应用,帮助掌握科学计算中的矩阵处理技巧。

2403_89314916的博客 310

1004 Problem E

Problem Description “今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%...” 确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级女生

luohuaying的博客 290

COMSOL有限元仿真深度指南:为结构件添加预应变

一、什么是预应力和预应变? 我们知道,结构力学问题中,结构件在外载荷作用下产生变形响应以吸收外载荷做功带来的能量;而在结构内部,整体的受力和变形则是通过固体微元的应力与应变传递的。 对于线弹性材料来说,应力与应变的关系可以线性表达,也即 σ=Dεσ = Dεσ=Dε ;在该式中,无论固体微元的应变程度多大,弹性矩阵DDD都是一个不变的常值。而对于超弹性材料来说,应力与应变的关系则需要通过应变能密度函数WWW来表征(详细参加博客《COMSOL有限元仿真深度指南:超弹性模型有限元分析入门》)。 从上面我们也不难

忘了面孔的Batou 7170

LightOJ 1004 Monkey Banana Problem

LightOJ 1004 题意: 题目给了一张地图,地图上的数字表示猴子走到这点后能够取得的香蕉数目,猴子只能从自己当前位置向下一行的相邻位置转移,求得到最多的香蕉的数量 这道题跟数字三角形是一个意思的,只是这道题的走的图形不是一个三角形而是菱形,菱形相当于一个正的三角形和一个倒着的三角形拼接而成的。 我们来看菱形的上部分,用dp[i][j]表示在i,j位置得到的最大的香蕉数量.

KANEKI的博客 311

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

visio安装包

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

HDU-1004令人蛋疼的IO

第一次开始学习使用STL模板..感觉这东西好像跟JDK中的类库一样重要..都应该下大力气去掌握... 另外在这次代码编辑中又发现了一件令人蛋疼无比的事情..也有一个非常重要的收获..兹记于此. /* *Author:Rock Lee *Date:2012.5.24 *Review at 2012.8.7*Problem 1004(HDU):"Let the ballon rise" *

一即全,全即一 901

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Problem1004

[code="java"] /** * Description * Larry graduated this year and finally has a job. * He's making a lot of money, but somehow never seems to have enough. * Larry has decided that he needs to...

lins87的博客 115

假人有限元模型

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

ZOJ Problem Set - 1004

How can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert TROT to TORT: [ i i i i o o o o i o i i o o i o ] where i stands for Push an

我不要写标题 474

Problem E-1004

概述:输入若干节目的时间,求在一定时间内能看到的最大节目数量。 思路:利用贪心算法,在有限的时间内尽可能的多安排能够观看的节目,然后将节目排序,将上一个节目的结束时间与下一个节目的开始时间进行比较,选出能够完整观看的节目。 感想:第一道完成的题目,在第一次提交之前已经卡了三天,一直不理解贪心算法,再一次上课时理解,然后写完提交,只是代码的正确率存在着一些问题,最后在同学的帮助下改正题目,希望再

sdau-acm训练时代写下的博客 256

LightOJ 1004 Monkey Banana Problem 动态规划

题目:http://www.lightoj.com/volume_showproblem.php?problem=1004 题意:给定一个由数字组成的菱形,问从顶端走到底端的路线上数字的最大和,行走方式为可以从当前数字向下一层临近的两个数字走。 思路:动态规划。对于菱形的上半部,可以得状态转移方程为dp[i][j] += max(dp[i-1][j-1], dp[i-1][j]),对于下半部,

弱智就要多努力 750

Problem-1004

概述:现在从坐标系的原点开始射箭,求夹角最小能够射到给定的点,并且夹角最小。 思路:题目可以用二分法做,但是如果将题目列成方程组解方程,出来答案会更简单。 感想:知道是二分的题目,但是二分没找到思路。。。无奈,找了下网上的思路,发现用方程更简单,所以列了半小时的方程,解出了答案。#include #include #include #include using namespace std;

sdau-acm训练时代写下的博客 287

lightoj 1004 - Monkey Banana Problem 【dp】

题目链接:lightoj 1004 - Monkey Banana Problem1004 - Monkey Banana Problem PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are in the world of mathematics to sol

世界很大 733

1004 Problem D

1004 Problem D 题意:一个数如果它的素数因子是2、3、5、7,则这个数是丑数,给定任意一个数,输出它的丑数。(The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18,20, 21, 24, 25, 27, ... shows the first 20 humble numbers. ) 思路:由题意可以看出,以

diyutianxie的博客 296

FZU Problem 1004 Number Triangle

Problem 1004 Number Triangle Accept: 2450 Submit: 6555 Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description Consider the number triangle shown below. Write a program that calculate...

qq_26154135的博客 249

FOJ Problem 1004 Number Triangle

每晚例行一题!今天做的是这道,正好早上上人工智能课程时候讲到了动态规划算法,所以用在这一道题上。 题目大意是给你一个数字组成的三角形,从顶点数字依次向下走,但只能选择左下对角的数字和右下对角的数字。把沿路的数字加起来,求最大的数字和。简单来说就是这样: 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 最终结果就是 7+3+8+7+5 = 30! 附代码:

Arctring的专栏 617
上一篇: problem 1005
下一篇: problem 1003
keepRunning
博客等级 码龄20年 0粉丝 9原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值