题目传送门:http://poj.org/problem?id=1416 Shredding Company Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 6860 Accepted: 3710 Description You have just been put in charge of developing a new shredder for the Shredding Company Although a "…
POJ 1416 Shredding Company Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5231 Accepted: 2964 Description You have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would…
Shredding Company Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 6173 Accepted: 3361 Description You have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would just shre…
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; }…