摘要: RT 换博客用了 新地址http://blog.csdn.net/acm_yuuji 阅读全文
posted @ 2014-02-25 19:51 AHU_树 阅读(113) 评论(0) 推荐(0) 编辑
摘要: DescriptionLindsay is a shopaholic. Whenever there is a discount of the kind where you can buy three items and only pay for two, she goes completely mad and feels a need to buy all items in the store. You have given up on curing her for this disease, but try to limit its effect on her wallet.You hav 阅读全文
posted @ 2014-02-25 17:10 AHU_树 阅读(422) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John has a problem: the dirt road from his farm to town has suffered in the recent rainstorms and now contains (1 #include #include #include #include #include #include using namespace std;typedef struct { int s, e;}node;node a[10000+10];bool cmp(node a, node b){ return a.s = ... 阅读全文
posted @ 2014-02-23 11:00 AHU_树 阅读(655) 评论(0) 推荐(0) 编辑
摘要: DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the sea can be covered by a radius i 阅读全文
posted @ 2014-02-22 17:29 AHU_树 阅读(278) 评论(0) 推荐(0) 编辑
摘要: DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the sale begins. Each product takes precisely one unit of time for being sold. A selling sched 阅读全文
posted @ 2014-02-22 16:08 AHU_树 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after the deadline, the teacher will reduce his score of the final test. And now we assum 阅读全文
posted @ 2014-02-22 14:34 AHU_树 阅读(460) 评论(0) 推荐(0) 编辑
摘要: DescriptionMany graduate students of Peking University are living in Wanliu Campus, which is 4.5 kilometers from the main campus – Yanyuan. Students in Wanliu have to either take a bus or ride a bike to go to school. Due to the bad traffic in Beijing, many students choose to ride a bike.We may assum 阅读全文
posted @ 2014-02-22 13:37 AHU_树 阅读(1116) 评论(0) 推荐(0) 编辑
摘要: DescriptionWe have received an order from Pizoor Communications Inc. for a special communication system. The system consists of several devices. For each device, we are free to choose from several manufacturers. Same devices from two manufacturers differ in their maximum bandwidths and prices.By ove 阅读全文
posted @ 2014-02-21 21:22 AHU_树 阅读(444) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionSuppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a positive integer which is at most N*M. And there are no two cards with the same pip. During a round, each player chooses one card to compa 阅读全文
posted @ 2014-02-20 22:42 AHU_树 阅读(309) 评论(0) 推荐(0) 编辑
摘要: Description上初中的时候我们就学会了幂乘运算,可是我们却不知道对于高阶的幂乘,出结果的方法比较慢,那么你有什么更好的方法吗?Input第1行,一个整数N(1int pow_mod(int x, int y);int main(){ freopen("data.in", "r", stdin); int n; scanf("%d", &n); while(n--) { int x, y; scanf("%d %d", &x, &y); printf("%d\n", 阅读全文
posted @ 2014-02-20 17:48 AHU_树 阅读(290) 评论(0) 推荐(1) 编辑