An Industrial Spy Description Industrial spying is very common for modern research labs. I am such an industrial spy - don't tell anybody! My recent job was to steal the latest inventions from a famous math research lab. It was hard to obtain some…
题目描述: Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1, 1], then there are four different sums that equal…
Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can move only…
http://wikioi.com/problem/1229/ 赤裸裸的水题啊. 一开始我认为不用用完全部的牌,以为爆搜会tle.. 可是我想多了. 将所有状态全部求出,排序后暴力判断即可. (水题有点严重啊) #include <cstdio> #include <algorithm> using namespace std; int n, m; int h[440000], cnt, a[12]; bool vis[12]; void dfs(int x, int sum, i…
Apple Tree Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 25904 Accepted: 7682 Description There is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been…