- 博客(16)
- 收藏
- 关注
原创 01背包几题
写了几道01背包,感觉做的时候想了好久都做不出来,还是有点考察思维的。一: HDOJ 1203 I need a offer 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1203题意是一个人要去投简历给m个学校想拿个offer,每个学校都有自己的申请费ai,这个人 存了n元钱,给出每个学校的申请费和拿到
2016-07-31 16:27:24 670
原创 Codeforces546B Soldier and Badges
DescriptionColonel has n badges. He wants to give one badge to every of his n soldiers. Each badge has a coolness factor, which shows how much it's owner reached. Coolness factor can be increase
2016-07-27 17:20:16 391 2
原创 Feast Coins(多重背包)
Problem descriptionLast feast the young princess received way too many coins. Since she is very young, she doesn’t know the value of each coin, if you give her a coin with the value 5 or a coi
2016-07-26 10:21:21 1240 1
原创 GNY 2015 Running Steps
Problem descriptionThe coach wants his team members to run up the stadium steps taking either one or two steps with each stride so that:a) The number of two step strides taken by each leg
2016-07-25 21:44:36 592
原创 POJ-3070Fibonacci(矩阵快速幂)
DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21,
2016-07-25 11:31:06 308
转载 hdoj 1014 Divding(03背包问题)
Problem DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the
2016-07-23 10:46:03 456
原创 Codeforces 540B - School Marks
Little Vova studies programming in an elite school. Vova and his classmates are supposed to write n progress tests, for each test they will get a mark from 1 to p. Vova is very smart and he can writ
2016-07-22 20:06:19 405
原创 HDOJ 2067 小兔的棋盘(棋盘dp)
Problem Description小兔的叔叔从外面旅游回来给她带来了一个礼物,小兔高兴地跑回自己的房间,拆开一看是一个棋盘,小兔有所失望。不过没过几天发现了棋盘的好玩之处。从起点(0,0)走到终点(n,n)的最短路径数是C(2n,n),现在小兔又想如果不穿越对角线(但可接触对角线上的格点),这样的路径数有多少?小兔想了很长时间都没想出来,现在想请你帮助小兔解决这个问题,对于你来说应该不
2016-07-21 10:34:42 511
原创 Codeforces Round #363 C (Div. 2) Vacations
题目: Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whether a co
2016-07-20 16:49:48 253
原创 Codeforces Round #363B (Div. 2) One Bomb
You are given a description of a depot. It is a rectangular checkered field of n × m size. Each cell in a field can be empty (".") or it can be occupied by a wall ("*").You have one bomb. If you
2016-07-20 10:00:28 257
原创 POJ3624 Charm Bracelet(01背包问题)
题目就不写了,太经典了用二维没有写出来,也没有用滚动数组。#include#include#include#includeusing namespace std;#define N 3500int w[N],d[N];int dp[12880];int main(){ int i,j,n,m; cin>>n>>m; memset(w,0,sizeof(w));
2016-07-19 16:40:50 248
原创 HDOJ 1081 To The Max(矩阵DP)
Problem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whole array. The sum of
2016-07-19 08:44:41 293
原创 POJ1159 Palindrome(滚动数组DP)
PalindromeTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 60017 Accepted: 20898DescriptionA palindrome is a symmetrical string, that is, a string read i
2016-07-18 16:49:04 312
原创 UVA 10010-- Where's Waldorf?
原题网址:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=951直接暴力搜索,有点麻烦但是不是很难。#include#include#include#includeusing namespace std;#define N 10000c
2016-07-18 10:55:02 360
原创 Codeforces 414b Mashmokh and ACM
Mashmokh's boss, Bimokh, didn't like Mashmokh. So he fired him. Mashmokh decided to go to university and participate in ACM instead of finding a new job. He wants to become a member of Bamokh's team.
2016-07-18 10:30:03 434
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人