2012年3月24日

BOI 383

摘要: Problem A. Ponding WaterDescriptionThere is a strange building on planet VOID. It is made up of N*Mrectangular parallelepipeds on N*M grids, whose bottom surfaces are 1*1squares. Since heights of these rectangular parallelepipeds are different,they form a number of “holes” inside the building. After 阅读全文

posted @ 2012-03-24 22:28 c语言源码 阅读(162) 评论(0) 推荐(0) 编辑

HDU 4001 To Miss Our Children Time

摘要: 一开始我一直想的是简单图论问题,构图SPFA求最长路,发现这样做有环不好处理。比如这组样例:21 1 1 01 1 1 0构图就会有环,不能直接SPFA,tarjan缩点的话应该可以做,但是代码量就太大了。可以这样去处理:bool cmp(block a,block b) { if(a.x!=b.x)return a.x<b.x; if(a.y!=b.y)return a.y<b.y; return a.d>b.d; } void build(){ //缩点,避免产生环 sort(x,x+n,cmp); int cnt=1; y[1]=x[0]; for(int i=1;i& 阅读全文

posted @ 2012-03-24 21:38 c语言源码 阅读(194) 评论(0) 推荐(0) 编辑

BOJ 396

摘要: Problem K. Alice's PianoDescriptionAlice has a piano which can plays nice music, but it's different from otherpianos. It has two rows of keys, and the method of playing it is also quitespecial. When Alice plays piano, she has to put her two hands on the leftsideof the two rows of keys respec 阅读全文

posted @ 2012-03-24 19:39 c语言源码 阅读(150) 评论(0) 推荐(0) 编辑

BOJ 394

摘要: Problem I. The Longest Sequence ofRectanglesDescriptionA rectangle is specified by a pair of coordinates (x1 , y1) and (x2 , y2)indicating its lower-left and upper-right corners (x1 <= x2 and y1 <= y2). Fora pair of rectangles, A = ((X_A1, Y_A1), (X_A2, Y_A2)) and B = ((X_B1, Y_B1),(X_B2, Y_B2 阅读全文

posted @ 2012-03-24 19:10 c语言源码 阅读(175) 评论(0) 推荐(0) 编辑

用心做软件—细节决定成败

摘要: 软件是什么?也许在编程者的眼中这是自己智慧的结晶,是技术运用的成果。但是在用户的眼中呢,用户会在乎你到底用了多少高级的技术、用了什么前卫的技术吗?我想大部分用户是不会管的,无论你是C#做的,Java做的,C++还是C做的,你的系统是Windows还是Linux,android还是塞班。用户的眼中你的软件只是一件产品,那么既然是产品,就要有价值,要能为用户带来方便,能为用户解决问题。当今的互联网上,大家都靠“免费”的概念来赚钱。开发了很多免费的软件给用户使用,积累了用户量自然就能赚钱。譬如360,QQ、迅雷、还有许许多多这种模式的。那么这么多的软件产品,用户为什么一定要用你的产品呢?自然是看谁. 阅读全文

posted @ 2012-03-24 17:21 c语言源码 阅读(252) 评论(0) 推荐(0) 编辑

约瑟夫环,杀人游戏(静态循环链表实现)

摘要: 觉得用静态循环链表最划算了。1、动态链表要动态分配,指针移来移去,释放指针等等,弄得很烦,容易出错。2、用循环链表是当然的了。// DS: 似循环静态链表 #include <iostream> #include <cstdio> //#include <cstdlib> using namespace std; int Kill_You( const int sum = 1, const int distance = 1, const int start = 1) { // 一共参加自杀的人数有 sum 个,每 distence 个人就杀一个,从第 sta 阅读全文

posted @ 2012-03-24 15:51 c语言源码 阅读(1879) 评论(0) 推荐(0) 编辑

说说VS2010中的插件

摘要: 我想大家在用VS的时候,一定有觉得VS很别扭的地方。比如说,我们在用C#编程的时候,会为里面的{}和()感到特别的不舒服,也让我们的编程感到很不愉快。 不知道大家在用什么好用的插件,如果觉得不错的,可以提供给大家,我们一起学习! 我在这里说一下——Visual Assist 吧!大家对它的评论也是不错的。 它的功能很强大,我也是刚刚接触,有好多的功能还认识不清,我这里就当是抛砖引玉吧。 自动添加括号:只要敲上一个左括号(,就会自动加上一个右括号(如果是不需要参数的,可以再打一个右括号,光标就会定位到括号的后面),并把光标定位到两个括号的中间,{}也是一样... 阅读全文

posted @ 2012-03-24 11:26 c语言源码 阅读(296) 评论(0) 推荐(0) 编辑

导航