随笔分类 -  CodeForces

摘要:Educational Codeforces Round 25A.Binary Protocol题意分析给出一种新的表示数字的方法,根据1和0来表示。首先是一个数字n,表示01串的长度。接下来是一个n个数的01串。 表示的规则 1. 开头一定是1 2. 0表示分隔 3. 0分隔的区间... 阅读全文
posted @ 2017-07-17 19:26 pengwill 阅读(126) 评论(0) 推荐(0)
摘要:CodeForces 185A. Plant (矩阵快速幂)题意分析求解N年后,向上的三角形和向下的三角形的个数分别是多少。如图所示:N=0时只有一个向上的三角形,N=1时有3个向上的三角形,1个向下的三角形,N=2,有10个向上的三角形和6个向下的三角形。根据递推关系,设an为第N... 阅读全文
posted @ 2017-05-18 21:25 pengwill 阅读(132) 评论(0) 推荐(0)
摘要:CodeForces - 158B.Taxi (贪心)题意分析首先对1234的个数分别统计,4人组的直接加上即可。然后让1和3成对处理,只有2种情况,第一种是1多,就让剩下的1和2组队处理,另外一种是3多,那么结果就加上3的个数,再单独处理2. 对于1和2组队处理的讨论:首先分配2,... 阅读全文
posted @ 2017-04-29 22:34 pengwill 阅读(200) 评论(0) 推荐(0)
摘要:CodeForces - 50A Domino piling (贪心+递归)题意分析奇数*偶数=偶数,如果两个都为奇数,最小的奇数-1递归求解,知道两个数都为1,返回0。代码#include #include #include #include #include #include #... 阅读全文
posted @ 2017-04-29 22:28 pengwill 阅读(323) 评论(0) 推荐(0)
摘要:CodeForces.158A Next Round (水模拟)题意分析校赛水题的英文版,坑点就是要求为正数。代码总览#include #include #include #include #include #include #include #include #include #i... 阅读全文
posted @ 2017-04-29 22:25 pengwill 阅读(156) 评论(0) 推荐(0)
摘要:CodeForces71A. Way Too Long Words (水模拟)题意分析题怎么说你怎么做 没有坑点代码总览#include #include #include #include #include #include #include #include #include #... 阅读全文
posted @ 2017-04-29 22:22 pengwill 阅读(218) 评论(0) 推荐(0)
摘要:Chat Server’s Outgoing Traffic点我挑战提目考察点模拟 字符串 Time Mem Len Lang 30 0 543 c++题意分析给出类似一个群的即时通讯系统,会有用户的加入和离开,还会有用户发消息,每次用户发消息,都会给当前在聊天室内的... 阅读全文
posted @ 2016-12-14 19:08 pengwill 阅读(132) 评论(0) 推荐(0)