一波水题 MZOJ 1035: 贝克汉姆
#include <bits/stdc++.h> using namespace std; ; int n,m; int v[N],w[N],f[N]; int main() { scanf("%d%d",&n,&m); ;i <= n; i++) scanf("%d%d",&v[i],&w[i]); ;i <= n; i++) for(int j = m; j >= v[i]; j--) f[j] = max(f[j],f[j - v[i]] + w[i]); printf("%d",f[m]); ; }
一波水题 MZOJ 1035: 贝克汉姆的更多相关文章
- hdu 2044:一只小蜜蜂...(水题,斐波那契数列)
一只小蜜蜂... Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepte ...
- hdu 2041:超级楼梯(水题,递归)
超级楼梯 Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Su ...
- Codeforces Beta Round #37 A. Towers 水题
A. Towers 题目连接: http://www.codeforces.com/contest/37/problem/A Description Little Vasya has received ...
- HDOJ 2317. Nasty Hacks 模拟水题
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- ACM :漫漫上学路 -DP -水题
CSU 1772 漫漫上学路 Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Submit ...
- ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 154 Solved: 112[ ...
- [poj2247] Humble Numbers (DP水题)
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...
- gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,
1195: 相信我这是水题 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 821 Solved: 219 Description GDUT中有个风云人 ...
- BZOJ 1303 CQOI2009 中位数图 水题
1303: [CQOI2009]中位数图 Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 2340 Solved: 1464[Submit][Statu ...
随机推荐
- centos 6.9 NTP基准时间服务器配置
时间服务器端 yum install ntp -y vim /etc/ntp.conf 增加允许客户端访问 restrict 192.168.0.0 mask 255.255.0.0 nomodify ...
- white-space和word-wrap和word-break所表示的换行和不换行的区别
一.前言 使得文本换行有很多方式, <br/>标签元素,能够强制使得所在位置文本换行 <p>元素,<div>设定宽度,都可以对文本内容实现自适应换行 对于长单词或者 ...
- jackson java对象和json对象的互相转换
概述 Jackson框架是基于Java平台的一套数据处理工具,被称为“最好的Java Json解析器”. Jackson框架包含了3个核心库:streaming,databind,annotation ...
- CTF题-http://120.24.86.145:8002/flagphp/:Bugku----flag.php
今天做了一道关于序列化的题目,收益颇多,愉快地开始. 首先,提示了“hint”,所以尝试加入hint参数.这儿没啥好说的,最后hint=1显示了重点内容.如下图所示 没错,是金灿灿的网页代码,开心,仔 ...
- Angular之特性模块 ( Feature Module )
项目结构 一 创建特性模块,及其包含的组件.服务. ng g module art ng g component art/music ng g component art/dance ng g ser ...
- 100-days: Six
Title: School lessons (be) to cover sexting, FGM and mental health(精神健康) be to do sth 将要做某事 => ...
- Django的视图函数和路由系统中一些没有用过的小点
1.request对象 print("返回用户访问的url,但是不包括域名",request.path_info) print("返回请求的方法,全大写",re ...
- POI依据类型设置导出格式
//设置Bigdecimal数据导出时以数值形式输出 CellStyle decimalStyle = workbook.createCellStyle(); DataFormat decimalDf ...
- Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not mat
Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b ...
- Http方式下载文件
代码: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System ...