- 博客(46)
- 资源 (6)
- 收藏
- 关注
原创 想写晨写
书上说,那些牛人,都有晨写的习惯。所以自己也想晨写。晨写,就是当早上起来的时候,当脑袋一片空白,还停留在伟大的潜意识中时,拿起笔,想到什么写什么,不加修饰。据说这可以开发右脑,更可以获得某些平时难以追寻,难以抓住的都写伟大的思想。据说安迪生就有这样的类似的习惯,他躺在椅子上睡觉的时候,手里总是会拿着一个小球,当他熟睡的时候,手里的小球就会掉下来,然后把他惊醒。然后他醒来之后就会马上
2012-10-17 22:37:08
684
原创 1196. History Exam
1196. History ExamTime Limit: 2.0 secondMemory Limit: 16 MBProfessor of history decided to simplify the examination process. At the exam, every student should write a list of historic da
2012-08-01 21:27:31
711
原创 1180. Stone Game
1180. Stone GameTime Limit: 1.0 secondMemory Limit: 16 MBTwo Nikifors play a funny game. There is a heap of N stones in front of them. Both Nikifors in turns take some stones from the he
2012-08-01 20:16:34
544
原创 1161. Stripies
1161. StripiesTime Limit: 1.0 secondMemory Limit: 16 MBOur chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian -
2012-08-01 13:20:52
540
原创 1139. City Blocks
1139. City BlocksTime Limit: 1.0 secondMemory Limit: 16 MBThe blocks in the city of Fishburg are of square form. N avenues running south to north and Mstreets running east to west bound
2012-08-01 12:35:04
853
2
原创 1131. Copying
1131. CopyingTime Limit: 0.25 secondMemory Limit: 16 MBA new educating program was received by the kindergarten. Of course, children have discovered it immediately and want to play with
2012-07-31 19:04:08
379
原创 1120. Sum of Sequential Numbers
1120. Sum of Sequential NumbersTime Limit: 1.0 secondMemory Limit: 16 MBThere is no involute formulation concerning factitiously activity of SKB Kontur in this problem. Moreover, there i
2012-07-31 16:32:18
564
原创 1110. Power
1110. PowerTime Limit: 0.5 secondMemory Limit: 16 MBYou are given the whole numbers N, M and Y. Write a program that will find all whole numbers X in the interval [0, M − 1] such that XN
2012-07-31 15:53:47
490
原创 1100. Final Standings
1100. Final StandingsTime Limit: 1.0 secondMemory Limit: 16 MBOld contest software uses bubble sort for generating final standings. But now, there are too many teams and that software wo
2012-07-31 15:29:53
811
转载 科学的励志和励志的科学
(《东方早报·上海书评》,2012年7月1日,报纸版标题是《按时交作业的学生何以常穿脏袜子》)励志类书籍的流行,也许是一个国家全面进入现代化,都市白领变成普遍职业的必然结果吧。我们看今天中国各大书店的畅销书排行榜,这类完全不计较文笔,用最直白的语言告诉你怎么“成功”的书籍占据了显著的位置。这种书在文艺青年眼里显然上不了台面,先不说追求所谓成功并不是什么了不起的情怀,就算那些已经成功了的人,
2012-07-30 16:47:17
3395
原创 1052. Rabbit Hunt
1052. Rabbit HuntTime Limit: 1.0 secondMemory Limit: 16 MBA good hunter kills two rabbits with one shot. Of course, it can be easily done since for any two points we can always draw a li
2012-06-04 16:31:16
449
原创 1049. Brave Balloonists
1049. Brave BalloonistsTime Limit: 2.0 secondMemory Limit: 16 MBTen mathematicians are flying on a balloon over the Pacific ocean. When they are crossing the equator they decide to celeb
2012-06-03 19:57:28
449
原创 1047. Simple Calculations
1047. Simple CalculationsTime Limit: 1.0 secondMemory Limit: 16 MBThere is a sequence of N + 2 elements a0, a1, …, aN+1 (1 ≤ N ≤ 3000, −2000 ≤ ai ≤ 2000). It is known thatai = (a
2012-05-27 23:19:11
521
原创 1033. Labyrinth
1033. LabyrinthTime Limit: 1.0 secondMemory Limit: 16 MBAdministration of the labyrinth has decided to start a new season with new wallpapers. For this purpose they need a program to cal
2012-05-26 13:29:25
635
原创 1073. Square Country
1073. Square CountryTime Limit: 1.0 secondMemory Limit: 16 MBThere live square people in a square country. Everything in this country is square also. Thus, the Square Parliament has pass
2012-05-25 16:45:45
728
原创 1024. Permutations
1024. PermutationsTime Limit: 2.0 secondMemory Limit: 16 MBBackgroundWe remind that the permutation of some final set is a one-to-one mapping of the set onto itself. Less formally, t
2012-05-25 14:42:24
522
原创 1022. Genealogical Tree
1022. Genealogical TreeTime Limit: 1.0 secondMemory Limit: 16 MBBackgroundThe system of Martians’ blood relations is confusing enough. Actually, Martians bud when they want and where
2012-05-21 19:31:07
499
原创 1021. Sacrament of the Sum
1021. Sacrament of the SumTime Limit: 1.0 secondMemory Limit: 16 MBBackground— The Brother of mine, the Head of Monastic Order wants to know tomorrow about the results long-term rese
2012-05-20 23:27:21
482
原创 1010. Discrete Function
1010. Discrete FunctionTime Limit: 1.0 secondMemory Limit: 16 MBThere is a discrete function. It is specified for integer arguments from 1 to N (2 ≤ N ≤ 100000). Each value of the functi
2012-05-16 12:37:40
574
原创 1017. Staircases
1017. StaircasesTime Limit: 1.0 secondMemory Limit: 16 MBOne curious child has a set of N little bricks (5 ≤ N ≤ 500). From these bricks he builds different staircases. Staircase consist
2012-05-16 11:49:47
752
原创 1013. K-based Numbers. Version 2
1012. K-based Numbers. Version 2Time Limit: 1.0 secondMemory Limit: 16 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notati
2012-05-16 00:08:17
787
原创 1011. Conductors
1011. ConductorsTime Limit: 2.0 secondMemory Limit: 16 MBBackgroundEveryone making translations from English to Russian knows an English phrase "Naked conductor runs along the bus".
2012-05-14 18:05:45
594
原创 1002. Phone Numbers
1002. Phone NumbersTime Limit: 2.0 secondMemory Limit: 16 MBIn the present world you frequently meet a lot of call numbers and they are going to be longer and longer. You need to remembe
2012-05-14 17:01:14
909
原创 1009. K-based Numbers
1009. K-based NumbersTime Limit: 1.0 secondMemory Limit: 16 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if itsK-based notation doesn’t c
2012-05-13 00:47:05
1498
转载 用户体验是个什么东西?用户体验如何评价好坏?怎样用一句话描述用户体验评价方法的核心?
个人对用户体验的目标是,做到“自然”。举几个例子,我观察3岁的小孩用iphone很容易上手。比如,iphone的开锁,小孩甚至不用学就会用。因为触摸是人的天性,同时iphone通过箭头图标,向右滑动的文字条(小孩看不懂文字),来暗示手指触摸向右滑动来解锁。自然和人的天性是一致的。大人因为成年后受污染较多,反而不一定立即学会iphone解锁,可能需要看文字解释来理解。所以不识字的小孩
2012-05-11 11:09:28
952
原创 _黑客与画家
前天开始看这本书。至少我认为他确实是一本大师级的书,因为他的前两章让我感觉到了有趣,他吸引了我。第三章让我有点跟不上作者的思维,以至于我不得不停下来思考。摘抄一些观点:(注:毕竟作者身处美国,有些观点在我们国家难免水土不服。(并不仅限于以下观点。程序写出来是给人看的,附带能在机器上运行。一种好的编程语言应该比英语更容易解释软件。只有在那些不太成熟,容易出现问题的地方,你才应该加上注
2012-05-02 00:10:46
825
原创 Wanderer
WandererEnsiferumIn time bleeding wounds will heal 伤痕终随时间平复Unlike some which are too deep to see 不同内心深处的苦痛 Like scars in the Nomads soul 正如那流浪者灵魂上的伤疤 Their mending is so slow 它们的
2012-04-15 21:46:41
370
原创 _代码之美
只看了一章,因为我发现我还看不懂这本书。收获如下:漂亮代码的七个原则:像书本一样。功能相似的代码在外观上也保持相似。减少缩进。分解大型的代码块。对代码进行注释。与已有的编码风格保持一致。
2012-03-13 17:35:43
345
原创 关于第一次团队合作的项目中的煞笔
1.一旦项目开始打开工,就要坚持下去,直到项目进入最后的测试阶段。因为这时候并不是你一个人在做,你一旦松懈了下来,(比如开始各种打Game,那么团队中的其他人也很容易受到影响,从最轻微的心里不平衡直至一起罢工。即使是你负责的这段已经做完了,也至少要摆出一副我正在学习的样子。如果你是这个项目的组长,那就更应该以身作则了,反正无论谁躺下了,组长也一定要坚挺! 2.有很多人都缺乏自主性,就算有,我
2012-02-29 00:04:49
1759
2
转载 Bitmap类getPixels()方法中参数stride理解
在学习Graphics中遇到位图(Bitmap)中getPixels()方法,对该方法的用法大体理解,但对其中的stride参数却不明白具体的用法以及用意,经过一番折腾后,有些明了,现记述过程如下: 行文有些详细,请赶时间的同学直接跳到红字总结处查看!! getPixels()方法的用处为获取位图(Bitmap)中的根据方法参数所决定的像素值(颜色值),存入类型为int的pixels数
2012-02-14 22:08:05
9861
1
原创 1048 The Hardest Problem Ever
又忘了C++怎么输入带空格的一行字符串了.....特地写下来,以免又忘了。(注意,cin后要加getchar(),不然后面的getline()会直接读取'\n')#include using namespace std;int main(){ char s[27] = "VWXYZABCDEFGHIJKLMNOPQRSTU"; char start[11], end[4],
2012-02-04 15:38:22
463
转载 在Android 中 Draw Bitmap
今天与大家交流 Bitmap 的绘制方法。昨晚和一个兄弟交流关于 imageButton 的问题。请看下面的图片,第一张是运行在模拟器上效果,第二张是运行在真机Q7 上的效果。 开始我一直怀疑是他的布局上有问题,看完他的布局后,改动了下,还是不行。后来再在工程的 res 目录下的drawable-mdpi、drawable-ldpi、drawable-hdpi 三个
2011-11-17 21:21:12
2558
原创 2046 骨牌铺方格
这是以前写的代码,好久没看,忘了当初是怎么写出这个公式来的了。。由此可见写解题报告的重要性啊!哪怕写个注释也好呀。#include#include using namespace std;int main(){ int n, i, k, j; double a, b; while (cin>>n) { k = n / 2; b = 0; f
2011-11-12 21:29:30
573
转载 让你的C++代码变的更加健壮
介绍在实际的项目中,当项目的代码量不断增加的时候,你会发现越来越难管理和跟踪其各个组件,如其不善,很容易就引入BUG。因此,我们应该掌握一些能让我们程序更加健壮的方法。这篇文章提出了一些建议,能有引导我们写出更加健壮的代码,以避免产生灾难性的错误。即使、因为其复杂性和项目团队结构,你的程序目前不遵循任何编码规则,按照下面列出的简单的规则可以帮助您避免大多数的崩溃情况。背景
2011-11-03 23:01:14
614
转载 苹果CEO乔布斯在斯坦福大学的演讲稿(中英对照版)
'You've got to find what you love',Jobs says This is the text of the Commencement address by Steve Jobs, CEO of Apple Computer and of Pixar Animation Studios, delivered on June 12, 2005. 这是苹果公
2011-10-24 23:39:44
1152
原创 Java各种类中的一些方法
JFrame// 设置不可改变大小void java.awt.Frame.setResizable(boolean resizable); (false:不可改变) JPanel JComponentint javax.swing.JComponent.getWidth(); /得到整个纸张的宽
2011-10-24 17:40:24
501
原创 《程序员成长路线——从入门到优秀》
1.很少有软件企业要招那种性格极端内向的程序员。2.面试时,要避免一问一答,要主动地在重点问题上谈谈自己的看法和想法,主动和面试官进行沟通。3.用人单位招收程序员一般有两种类型,一类是招来即用,一类是培训后使用。4.应聘者千万不要过度地表现自己的学习欲望,说一些“到单位之后,我会好好学习的”之类的话。用人单位要的不是一个学生,而是让你为它创造财富的。你不如说“我到单位后,将多做工作,为
2011-10-24 17:31:03
569
转载 栈和堆的区别【总结】
1.1内存分配方面:堆:一般由程序员分配释放,若程序员不释放,程序结束时可能由OS回收 。注意它与数据结构中的堆是两回事,分配方式是类似于链表。可能用到的关键字如下:new、malloc、delete、free等等。栈:由编译器(Compiler)自动分配释放,存放函数的参数值,局部变量的值等。其操作方式类似于数据结构中的栈。1.2申请方式方面:堆:需要程序员自己申请,并指明大小。
2011-10-24 11:34:15
313
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人