Sum It Up Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 4 Accepted Submission(s) : 1 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Given a specified total t and…
Sum It Up Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 6682 Accepted: 3475 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…
Sum It Up Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status 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…
Problem 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 4: 4,3…
Sum It Up Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7191 Accepted: 3745 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…
题目连接 http://poj.org/problem?id=1564 Sum It Up 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…
Apple Tree Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 30636 Accepted: 9162 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…
POJ3009 DFS+剪枝 原题: Curling 2.0 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16280 Accepted: 6725 Description On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from our…
Description Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that there is only one route from a village to a village that does not pass through some other village…
Hopscotch Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2845 Accepted: 1995 Description The cows play the child's game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cows creat…
Language: Default Channel Allocation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12367 Accepted: 6325 Description When a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that ever…
枚举行和列即可,当前已经放下cnt个棋子,当前已经搜索到第r行,如果 n - r + cnt < k 直接退出,因为后面无法放下剩下的棋子. AC代码 #include<cstdio> #include<cstring> const int maxn = 10; char G[maxn][maxn]; int vis[maxn], n, k; int ans; void dfs(int x, int cnt){ if(cnt == k){ ans++; return; }…