摘要: Flip Game Time Limit: 1000 MS Memory Limit: 65536 KB 64-bit integer IO format: %I64d , %I64u Java class name: Main [Submit] [Status] [Discuss] Descrip 阅读全文
posted @ 2016-03-12 11:39 Alan2 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Frequent values Time Limit: 2000 MS Memory Limit: 65536 KB 64-bit integer IO format: %I64d , %I64u Java class name: Main [Submit] [Status] [Discuss] D 阅读全文
posted @ 2016-03-12 11:11 Alan2 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 一道暴力的题,但暴力的过程中约束太多,必要的剪枝也太多了,所以我也不知道到底这道题属于什么了,不过这题还有状态压缩的做法,我会在下一篇博客上写(其实我看这道题本意是看状态压缩的) 题解全在代码的注释里了我就不再打一遍了。 1 #include<stdio.h> 2 #include<algorith 阅读全文
posted @ 2016-03-12 10:47 Alan2 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 51852 Accepted: 19039 Description In this problem, you have to analyze a pa 阅读全文
posted @ 2016-03-10 19:48 Alan2 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 树状数组的入门题,做完之后发现还是没有变形,依然套模板。 这题还要对数据处理一下。树状数组的值是从一开始时的,因为0 要用来判断结束所以+1;因为不算自己所以先求和。 Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/3 阅读全文
posted @ 2016-03-08 18:38 Alan2 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 数据结构好伤啊,今天碰到一个map竟然自己没有看明白,我会找时间好好写一篇map和vector的博客。 明白他的存放方式。我先给一张网上找的图片(引用自http://images.cnitblog.com/blog/402333/201303/02130035-8a70c86ecf024c049fa 阅读全文
posted @ 2016-03-05 16:00 Alan2 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 状态压缩这个名字听起来好可怕啊,(看了大神的博客自己说话都变风格了),但其实只是一个简单的知识点,学起来轻松些就可以。 注:此博客转自http://www.cnblogs.com/TonyNeal/p/bingchaji.html 以下为大神的讲解: 【转】并查集算法和路径压缩 并查集是我暑假从高手 阅读全文
posted @ 2016-03-05 11:20 Alan2 阅读(432) 评论(1) 推荐(0) 编辑
摘要: 介绍一下Eratosthense筛法(这里是素数表的打法) 对于不超过n的每个非负数P删除2*p,3*p.....,当处理完所有的剩下的就是素数了,优化方案之一是判重,二是开平方和平方。首先解释为什么要平方,因为假设i是大于2的,那么i之前的2i,3i,4i什么的都已经被2倍3倍的筛掉了,所以要平方 阅读全文
posted @ 2016-03-03 19:19 Alan2 阅读(342) 评论(0) 推荐(0) 编辑
摘要: Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 20 阅读全文
posted @ 2016-02-25 13:06 Alan2 阅读(448) 评论(0) 推荐(0) 编辑
摘要: Problem Description People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with value 阅读全文
posted @ 2016-02-21 22:34 Alan2 阅读(184) 评论(0) 推荐(0) 编辑