上海奋斗之路
STILLxjy
不要让任何人打乱你生活的节奏
展开
-
(Coderforces 873C)C. Strange Game On Matrix 贪心+模拟
C. Strange Game On Matrixtime limit per test: 1 secondmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputIvan is playing a strange game.He has a matrix a with n rows an原创 2017-10-17 21:05:43 · 399 阅读 · 0 评论 -
(POJ 1270)Following Orders 求序列在限制条件下的 [全排列]
Following Orders Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5218 Accepted: 2126 DescriptionOrder is an important concept in mathematics and in computer science. For example,原创 2017-10-13 17:40:11 · 530 阅读 · 0 评论 -
(Coderforces 875A)A. Classroom Watch 暴力 + 思维
A. Classroom Watchtime limit per test: 1 secondmemory limit per test: 512 megabytesinput: standard inputoutput: standard outputEighth-grader Vova is on duty today in the class. After classes, he we原创 2017-10-17 21:59:51 · 800 阅读 · 0 评论 -
(CCF 201312-4)有趣的数 [DP] 最详细解答
问题描述 我们把一个数称为有趣的,当且仅当: 1. 它的数字只包含0, 1, 2, 3,且这四个数字都出现过至少一次。 2. 所有的0都出现在所有的1之前,而所有的2都出现在所有的3之前。 3. 最高位数字不为0。 因此,符合我们定义的最小的有趣的数是2013。除此以外,4位的有趣的数还有两个:2031和2301。 请计算恰好有n位的有趣的数的个数。由于答案可能非原创 2017-10-21 15:17:40 · 401 阅读 · 0 评论 -
(POJ 3687)Labeling Balls [逆top序列] 求按照某种排列方式的字典序最小的top序列
Labeling Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14922 Accepted: 4372 DescriptionWindy has N balls of distinct weights from 1 unit to N units. Now he tries to la原创 2017-10-11 16:40:09 · 524 阅读 · 0 评论 -
(POJ 3660)Cow Contest [详解] [floyd] 传递闭包 确定top序列顺序
Cow Contest Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13189 Accepted: 7337 DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programmin原创 2017-10-11 15:23:59 · 441 阅读 · 0 评论 -
(POJ 2367)Genealogical tree [top序列] 入门
Genealogical tree Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6116 Accepted: 4034 Special Judge DescriptionThe system of Martians’ blood relations is confusing enough. A原创 2017-10-11 10:34:48 · 293 阅读 · 0 评论 -
[欧拉图总结]
http://www.cnblogs.com/pandy/archive/2009/05/07/1452209.htmlhttp://bchine.com/mjmjmtl/?p=241参考以上:判断欧拉路,欧拉回路:注意图联通,可以DFS或者并查集一.无向图欧拉回路:每个顶点度数都是偶数欧拉路:所有点度数为偶数,或者只有2个点度数为奇数二.有向图(非混合)欧拉回路:每个顶点入度等于出度欧拉路:每个顶转载 2017-10-09 21:10:36 · 786 阅读 · 0 评论 -
(POj 2230)Watchcow [有向欧拉图] 输出欧拉回路
Watchcow Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 8436 Accepted: 3670 Special Judge DescriptionBessie’s been appointed the new watch-cow for the farm. Every night, it原创 2017-10-08 15:51:58 · 561 阅读 · 0 评论 -
(POJ 1041)John's trip [无向欧拉图] 输出字典序最小的欧拉回路
John’s trip Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9278 Accepted: 3112 Special Judge DescriptionLittle Johnny has got a new car. He decided to drive around the town原创 2017-10-09 11:30:09 · 745 阅读 · 0 评论 -
(Codeforces 873B)B. Balanced Substring [前缀和]+思维
B. Balanced Substring time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a string s consisting only of characters 0 and 1. A sub原创 2017-10-17 10:44:33 · 471 阅读 · 0 评论