Happy Matt Friends Time Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Others) Total Submission(s): 700 Accepted Submission(s): 270 Problem Description Matt has N friends. They are playing a game together. Each of Matt's friend…
Kattis - bank [简单DP] Description Oliver is a manager of a bank near KTH and wants to close soon. There are many people standing in the queue wanting to put cash into their accounts after they heard that the bank increased the interest rates by 42% (f…
Partial Tree Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5534 Description In mathematics, and more specifically in graph theory, a tree is an undirected graph in which any two nodes are connected by exactly…
B. Modulo Sum Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/577/problem/B Description You are given a sequence of numbers a1, a2, ..., an, and a number m. Check if it is possible to choose a non-empty subsequence aij such…
http://ac.nbutoj.com/Problem/view.xhtml?id=1479 [1479] How many 时间限制: 1000 ms 内存限制: 65535 K 问题描述 There are N numbers, no repeat. All numbers is between 1 and 120, and N is no more than 60. then given a number K(1 <= K <= 100). Your task is to find o…
题目:http://acm.fzu.edu.cn/problem.php?pid=2214 (http://www.fjutacm.com/Problem.jsp?pid=2053) 这题看起来是一题普通背包题,但是你会发现相对价格来说,体积太大了,此时只要将体积看为价格,价格看为体积,然后再来一个普通的背包DP算法就好了: #include<stdio.h> #include<algorithm> using namespace std; struct N { int w, v;…