随笔分类 - 贪心算法
摘要:题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=648&page=show_problem&problem=5159In normal football games,...
阅读全文
摘要: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...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1052Problem DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. Genera...
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:一、代码: 1、求逆元(原理貌似就是拓展欧几里得,要求MOD是素数): 2、底层优化(正确性未验证): 3、扩栈,这玩意儿在OJ上用能防爆? 4、神速读入fread 二、神牛blog matrix67 ZKW watashi 三、专题 动态规划系列: 数位dp模板 字符串系列: 【专辑】AC自动机
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号