摘要: Problem DescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, for the machine to prepare processing a stick. The setup times are as 阅读全文
posted @ 2014-02-19 17:19 AHU_树 阅读(292) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John has received a noise complaint from his neighbor, Farmer Bob, stating that his cows are making too much noise.FJ's N cows (1 #include #include using namespace std; int a[10000+10]; int main() { int n; scanf("%d", &n); for(int i = 0 ; i #include using namespac 阅读全文
posted @ 2014-02-19 15:42 AHU_树 阅读(226) 评论(0) 推荐(0) 编辑
摘要: DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the square parcels of the same height h as the products have and of the size 6*6. Because of the expenses it is the 阅读全文
posted @ 2014-02-17 22:29 AHU_树 阅读(441) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corridor. Recently the Company made a plan to reform its system. The reform includes mo 阅读全文
posted @ 2014-02-16 21:54 AHU_树 阅读(548) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i] pounds of JavaBeans and requires F[i] pounds of cat food. FatMouse does not have to trade for a 阅读全文
posted @ 2014-02-16 20:34 AHU_树 阅读(627) 评论(0) 推荐(0) 编辑
摘要: 寒假在家不知为何登录不了BLOG...有一些不错的题目没法发布 很是郁闷.... 阅读全文
posted @ 2014-02-16 18:48 AHU_树 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking 阅读全文
posted @ 2014-01-15 21:12 AHU_树 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 2 #include 3 int map[210]; 4 int bfs(int a,int b); 5 int queue[10000]; 6 int mark[10000]; 7 int step[10000]; 8 int n; 9 int main()10 {11 int a,b;12 while(scanf("%d",& 阅读全文
posted @ 2014-01-15 21:10 AHU_树 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determi 阅读全文
posted @ 2014-01-15 21:09 AHU_树 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionNow an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or minus 1 to any digit. When add 1 to '9', the digit will change to be '1' and when minus 1 to '1' 阅读全文
posted @ 2014-01-15 21:03 AHU_树 阅读(297) 评论(0) 推荐(0) 编辑