随笔分类 -  贪心算法

摘要:题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=648&page=show_problem&problem=5159In normal football games,... 阅读全文
posted @ 2015-05-14 17:13 Oyking 阅读(697) 评论(0) 推荐(0)
摘要:Long long ago there is a strong tribe living on the earth. They always have wars and eonquer others.One day, there is another tribe become their targe... 阅读全文
posted @ 2015-05-13 20:09 Oyking 阅读(728) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1052Problem DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. Genera... 阅读全文
posted @ 2014-08-17 11:48 Oyking 阅读(357) 评论(0) 推荐(0)
摘要:Our chemical biologists have invented a new very useful form of life calledstripies(in fact, they were first called in Russian -polosatiki, but the scientists had to invent an English name to apply for an international patent). The stripies are transparent amorphous amebiform creatures that live in 阅读全文
posted @ 2014-03-02 20:48 Oyking 阅读(318) 评论(0) 推荐(0)
摘要:Description“Be subtle! Be subtle! And use your spies for every kind of business. ”― Sun Tzu“A spy with insufficient ability really sucks”― An anonymous general who lost the warYou, a general, following Sun Tzu’s instruction, make heavy use of spies and agents to gain information secretly in order to 阅读全文
posted @ 2013-10-19 13:43 Oyking 阅读(309) 评论(0) 推荐(0)
摘要:DescriptionA new Semester is coming and students are troubling for selecting courses. Students select their course on the web course system. There are n courses, the ith course is available during the time interval (Ai,Bi). That means, if you want to select the ith course, you must select it after t 阅读全文
posted @ 2013-09-05 23:32 Oyking 阅读(379) 评论(0) 推荐(0)
摘要:Problem DescriptionConsider a Depth-First-Search(DFS) spanning tree T of a undirected connected graph G, we define a T-Simple Circle as a path v1, v2, ..., vk(v1= vk) in G that contains at most one edge which not belongs to the DFS spanning tree T.Given a graph G, we process DFS on G starting from v 阅读全文
posted @ 2013-08-22 19:50 Oyking 阅读(693) 评论(0) 推荐(0)
摘要:一、代码: 1、求逆元(原理貌似就是拓展欧几里得,要求MOD是素数): 2、底层优化(正确性未验证): 3、扩栈,这玩意儿在OJ上用能防爆? 4、神速读入fread 二、神牛blog matrix67 ZKW watashi 三、专题 动态规划系列: 数位dp模板 字符串系列: 【专辑】AC自动机 阅读全文
posted @ 2013-08-14 23:48 Oyking 阅读(1316) 评论(0) 推荐(0)
摘要:DescriptionJohn is the only priest in his town. October 26th is the John's busiest day in a year because there is an old legend in the town that the couple who get married on that day will be forever blessed by the God of Love. This year N couples plan to get married on the blessed day. The i-th 阅读全文
posted @ 2013-08-14 22:09 Oyking 阅读(366) 评论(0) 推荐(0)