01 2018 档案

摘要:常用头文件和一些简单函数 阅读全文
posted @ 2018-01-28 09:43 爱国呐 阅读(304) 评论(0) 推荐(0)
摘要:题目描述 Iahub and Sorin are the best competitive programmers in their town. However, they can't both qualify to an important contest. The selection will 阅读全文
posted @ 2018-01-27 08:59 爱国呐 阅读(722) 评论(2) 推荐(0)
摘要:好久没有整题目了,并不是没有好的题目整,只是自己懒了太懒了太懒了。。。赶紧整理几个题补一下自己的罪过。。。 Description Bo is a "Life Winner".He likes playing chessboard games with his girlfriend G.The si 阅读全文
posted @ 2018-01-26 17:13 爱国呐 阅读(365) 评论(0) 推荐(0)
摘要:博弈可以看为找规律,不过找规律也是有先当多的套路,很久之前就接触过博弈了,不过一直没有整理,今天稍微整理一下三个基本的博弈。 一、Bash Game:同余理论 一堆n个物品,两人轮流取,每次取1至m个,最后取完者胜 基础:1 , 2, ...,m是必赢局面,m+1是必输局面递推:m+2,m+3, . 阅读全文
posted @ 2018-01-25 14:22 爱国呐 阅读(347) 评论(0) 推荐(0)
摘要:最大流KK算法 阅读全文
posted @ 2018-01-17 10:30 爱国呐 阅读(664) 评论(0) 推荐(0)
摘要:一、引入和概念 平常我们会遇到一些对数组进行维护查询的操作,比较常见的,修改某点的值、求某个区间的和。 数据规模不大的时候,对于修改某点的值是非常容易的,复杂度是O(1),但是对于求一个区间的和就要扫一遍了,复杂度是O(N)。 如果实时的对数组进行M次修改或求和,最坏的情况下复杂度是O(M*N),当 阅读全文
posted @ 2018-01-13 12:35 爱国呐 阅读(1626) 评论(0) 推荐(0)
摘要:Description In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network — for 阅读全文
posted @ 2018-01-09 17:07 爱国呐 阅读(614) 评论(0) 推荐(0)
摘要:Description An infinitely long railway has a train consisting of n cars, numbered from 1 to n (the numbers of all the cars are distinct) and positione 阅读全文
posted @ 2018-01-09 16:52 爱国呐 阅读(443) 评论(0) 推荐(0)