摘要: 今天看刘汝佳看到归并排序还看了分治求最大子序列和,感觉简单多了,刚开始学时看了几天都没看会,现在在看感觉果然不一样^.^,先打一个归并排序,马上就打子序列和, 哎~为什么总打这些水题呢,一是我现在很水,二是涉及人生完不完整的八数码暂时理解不深(哈哈),勉强看懂,等过几天就会相对高级的算法了,这里复制 阅读全文
posted @ 2016-02-04 12:10 Alan2 阅读(564) 评论(0) 推荐(0) 编辑
摘要: 水题,绝对水题,不过作为一个学C的人面对C++的这些东西还是忍不住发一下,这里用到的我不会的以后会发到博客上,由于题比较水,我就先不发题目了 代码如下:(朋友写的,已AC,好像比网上的简单啊) 1 #include <cstdio> 2 #include <map> 3 #include <stri 阅读全文
posted @ 2016-02-03 11:42 Alan2 阅读(196) 评论(0) 推荐(0) 编辑
摘要: stringstream的基本用法 stringstream是字符串流。它将流与存储在内存中的string对象绑定起来。 在多种数据类型之间实现自动格式化。 1 stringstream对象的使用 #include<sstream> #include<iostream> using namespac 阅读全文
posted @ 2016-02-03 11:28 Alan2 阅读(283) 评论(0) 推荐(1) 编辑
摘要: 现在假期已经过去一半了,再谈计划已经晚了,但如果不谈就没机会了。 院长让看完刘汝佳,而现在距开学还有大概25天,而现在高效算法,动态规划,数论,图论和高级专题还没看,算起来按照原来的速度肯定是看不完了,不过转念一想每一章都有简单的,肯定很好看,难得大不了一天一个知识点。 做题先以书上的为主,每一章练 阅读全文
posted @ 2016-02-02 11:23 Alan2 阅读(134) 评论(0) 推荐(0) 编辑
摘要: B - Vika and Squares Crawling in process... Crawling failed Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practi 阅读全文
posted @ 2016-01-30 18:00 Alan2 阅读(306) 评论(0) 推荐(0) 编辑
摘要: DescriptionFind the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ ... 阅读全文
posted @ 2016-01-21 11:11 Alan2 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Product of DigitsCrawling in process... Crawling failed Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice URA... 阅读全文
posted @ 2016-01-20 10:11 Alan2 阅读(161) 评论(0) 推荐(0) 编辑
摘要: DescriptionKevin Sun wants to move his precious collection of n cowbells from Naperthrill to Exeter, where there is actually grass instead of corn. Be... 阅读全文
posted @ 2016-01-19 11:18 Alan2 阅读(175) 评论(0) 推荐(0) 编辑
摘要: ---恢复内容开始---Description小z身处在一个迷宫中,小z每分钟可以走到上下左右四个方向的相邻格之一。迷宫中有一些墙和障碍物。同时迷宫中也有一些怪兽,当小z碰到任意一个怪兽时,小z需要将怪兽消灭掉才可以离开此方格。但消灭怪兽会花费一定的时间。现在小z想知道走出迷宫需要花费的最少时间。I... 阅读全文
posted @ 2016-01-18 08:53 Alan2 阅读(341) 评论(0) 推荐(0) 编辑
摘要: Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be fille... 阅读全文
posted @ 2016-01-13 13:34 Alan2 阅读(138) 评论(0) 推荐(0) 编辑