摘要: 这个月懒了整整一个月,估计是没人监督的原因吧,不止何时才能让自己清醒过来= =,蓝瘦香菇........ 阅读全文
posted @ 2016-10-17 18:52 苍鼠 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 无聊的时候随手写了一个解数独的程序= =,记录一下 #include <iostream>#include <algorithm>#include <string>#include <cstring>#include <cstdio>#include <cmath>#include <vector> 阅读全文
posted @ 2016-09-10 17:50 苍鼠 阅读(240) 评论(0) 推荐(0) 编辑
摘要: N个点M条边的无向连通图,每条边有一个权值,求该图的最小生成树。 Input 第1行:2个数N,M中间用空格分隔,N为点的数量,M为边的数量。(2 <= N <= 1000, 1 <= M <= 50000) 第2 - M + 1行:每行3个数S E W,分别表示M条边的2个顶点及权值。(1 <= 阅读全文
posted @ 2016-08-22 11:01 苍鼠 阅读(882) 评论(0) 推荐(0) 编辑
摘要: Travel The country frog lives in has nn towns which are conveniently numbered by 1,2,…,n. Among n(n−1) / 2 pairs of towns, m of them are connected by 阅读全文
posted @ 2016-08-19 10:41 苍鼠 阅读(260) 评论(0) 推荐(0) 编辑
摘要: Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a 阅读全文
posted @ 2016-08-18 11:16 苍鼠 阅读(237) 评论(0) 推荐(0) 编辑
摘要: ZYB has a premutation P,but he only remeber the reverse log of each prefix of the premutation,now he ask you to restore the premutation. Pair (i, j)(i 阅读全文
posted @ 2016-08-16 15:51 苍鼠 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 你有一个日志文件,里面记录着各种系统事件的详细信息。自然的,事件的时间戳按照严格递增顺序排列(不会有两个事件在完全相同的时刻发生)。 遗憾的是,你的系统被病毒感染了,日志文件中混入了病毒生成的随机伪事件(但真实事件的相对顺序保持不变)。备份的日志文件也被感染了,但由于病毒采用的随机感染方法,主日志文 阅读全文
posted @ 2016-08-15 10:45 苍鼠 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 原文 http://xuanwo.org/2015/07/31/dp-lis/ 主题 动态规划 原文 http://xuanwo.org/2015/07/31/dp-lis/ 主题 动态规划 介绍 最长上升子序列问题,也就是 Longest increasing subsequence ,缩写为LI 阅读全文
posted @ 2016-08-13 22:51 苍鼠 阅读(759) 评论(0) 推荐(1) 编辑
摘要: Fat brother and Maze are playing a kind of special (hentai) game in the clearly blue sky which we can just consider as a kind of two-dimensional(二维的)  阅读全文
posted @ 2016-08-13 16:21 苍鼠 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 一天fly正坐在课堂上发呆,突然,他注意到了桌面上的一个字符串S1S2S3S4...Sn,这个字符串只由字符"a","b"和"c"构成。刚好这堂课很无聊,所以他决定为这个字符串画一张图,(这张图上的每个点代表字符串中的一个字符,例如节点1代表S1。)这张图有以下特点: 1.它有n个点,从1到n进行标 阅读全文
posted @ 2016-08-11 22:30 苍鼠 阅读(296) 评论(0) 推荐(0) 编辑