#include<iostream> using namespace std; int n; int maxx[21][21]; int lie[21]; int aa[21]; int ans; void dfs(int x,int sum) { if(x>n) { ans=max(ans,sum); return; } int vv=0; for(int p=x;p<=n;p++) { vv+=aa[p]; } if(sum+vv<ans) return; for(int…
Going Home Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3299 Accepted Submission(s): 1674 Problem Description On a grid map there are n little men and n houses. In each unit time, every l…
In the kingdom of Henryy, there are N (2 <= N <= 200) cities, with M (M <= 30000) one-way roads connecting them. You are lucky enough to have a chance to have a tour in the kingdom. The route should be designed as: The route should contain one or…
Going Home Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18169 Accepted: 9268 Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertical…
Young naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees. Each ant colony needs its own apple tree to feed itself. Bill has a map with coordinates of n ant colonies and n apple trees. He knows that ants tra…
奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14416 Accepted Submission(s): 6273 Problem Description 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子.这可是一件大事,关系到人民的住房问题啊.村里共有n间房间,刚好有n家老百姓,考虑…