摘要:ZOJ Problem Set - 1097Code the TreeTime Limit:2 Seconds Memory Limit:65536 KBA tree (i.e. a connected graph without cycles) with vertices numbered by the integers1, 2, ..., nis given. The "Prufer" code of such a tree is built as follows: the leaf (a vertex that is incident to only one edge
阅读全文
摘要:必有损,损阴以益阳。阴:此指某些细微的、局部的事物。阳:此指事物带整体意义的、全局性的事物。李代桃僵语出《乐府诗集·鸡鸣篇》:“桃生露井上,李树生桃旁,虫来啮[niè]桃根,李树代桃僵,树木身相代,兄弟还相忘?”本意是指兄弟要象桃李共患难一样相互帮助,相互友爱。此计用在军事上,指在敌我双方势均力敌,或者敌优我劣的情况下,用小的代价,换取大的胜利的谋略。
阅读全文
摘要:ZOJ Problem Set - 3689DiggingTime Limit:2 Seconds Memory Limit:65536 KBWhen it comes to theMaya Civilization, we can quickly remind of a term called the end of the world. It's not difficult to understand why we choose to believe the prophecy (or we just assume it is true to entertain ourselves)
阅读全文
摘要:一个窗口除去窗框以后,余下部分称为客户区域。获得窗口的几何信息(坐标,长宽等)有以下两组命令:1. 包括窗框(即整个窗口):x(), y(), frameGeometry(), pos(), move().2. 不包括窗框(即客户区域):geometry(), width(), height(), rect(), size().注意的是,以上两组命令的区别只存在于有窗框的窗口,而不存在于非顶级部件和没有窗框的窗口。下图可以帮助理解:
阅读全文
摘要:刚开始vim的学习之旅,在进行粘贴操作时遇到了麻烦。教程上粘贴的命令是p,但我发现该命令只适用于从vim到vim的复制(p未必就仅仅局限于此,但我目前所了解到的情况如此),当我从网上复制了一段代码想要粘贴到正用vim编辑的文本时就失败了,vim提示“寄存器没有内容”。显然,p命令用的应当是vim自己的剪贴板,而不是系统的剪贴板,而我从网上复制代码时用的却是系统的剪贴板,于是产生无法粘贴的现象。解决方法:用Shift+Insert命令。2013-07-2810:49:48
阅读全文
摘要:Counting PairTime Limit:1000 msMemory Limit:65535 kBSolved:112Tried:1209SubmitStatusBest SolutionBackDescriptionBob hosts a party and invites N boys and M girls. He gives every boy here a unique number Ni(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #inclu...
阅读全文
摘要:King's SanctuaryTime Limit:1000 msMemory Limit:65535 kBSolved:111Tried:840SubmitStatusBest SolutionBackDescriptionThe king found his adherents were building four sanctuaries for him. He is interested about the positions of the sanctuaries and wants to know whether they would form a parallelogram
阅读全文
摘要:System Administratortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob got a job as a system administrator in X corporation. His first task was to connectnservers with the help ofmtwo-way direct connection so that it becomes possible to transmit
阅读全文
摘要:Bargaining Tabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob wants to put a new bargaining table in his office. To do so he measured the office room thoroughly and drew its plan: Bob's office room is a rectangular roomn × mmeters.
阅读全文
摘要:刚安装Python,在IDLE中输入print “Hello World”,谁知却发生错误:>>> print "Hello World"SyntaxError: invalid syntax而在朋友的机子上测试却运行无误,经查得知这是Python 版本不同所致。朋友用的是2.x版本,而我用的是3.x版本正确命令:print("Hello World")问题是通过用help命令解决的。输入help(print)就知道print的正确用法了。>>> help(print)Help on built-in function
阅读全文
摘要:ZOJ Problem Set - 1016ParencodingsTime Limit:2 Seconds Memory Limit:65536 KBLet S = s1 s2 ... s2n be a well-formed string of parentheses. S can be encoded in two different ways:By an integer sequence P = p1 p2 ... pn where pi is the number of left parentheses before the ith right parenthesis in S (P
阅读全文
摘要:ZOJ Problem Set - 1006Do the UntwistTime Limit:2 Seconds Memory Limit:65536 KBCryptographydeals with methods of secret communication that transform a message (theplaintext) into a disguised form (theciphertext) so that no one seeing the ciphertext will be able to figure out the plaintext except the
阅读全文
摘要:ZOJ Problem Set - 1005JugsTime Limit:2 Seconds Memory Limit:65536 KB Special JudgeIn the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon jug with exactly
阅读全文
摘要:ZOJ Problem Set - 1004Anagrams by StackTime Limit:2 Seconds Memory Limit:65536 KBHow can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert TROT to TORT:[i i i i o o o oi o i i o o i o]whereistands for Push andostands for Pop. Your progra
阅读全文
摘要:ZOJ Problem Set - 1002Fire NetTime Limit:2 Seconds Memory Limit:65536 KBSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small castle that has four openings through w
阅读全文
摘要:ZOJ Problem Set - 3365Integer NumbersTime Limit:1 Second Memory Limit:32768 KB Special JudgeThe boy likes numbers. He has a sheet of paper. He have written a sequence of consecutive integer numbers on the sheet. The boy likes them.But then the girl came. The girl is cruel. She changed some of the nu
阅读全文
摘要:E. Collisionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn a number line there arenballs. At time moment0for each ball the following data is known: its coordinatexi, speedvi(possibly, negative) and weightmi. The radius of the balls can be ig
阅读全文
摘要:Qt帮助文档如此解释:The user interface contains visual elements that are called widgets in Qt. Examples of widgets are text edits, scroll bars, labels, and radio buttons. A widget can also be a container for other widgets; a dialog or a main application window, for example.简而言之,widget(译名:部件)就是包含可视化元素的用户接口,如编
阅读全文
摘要:==日常编辑==• 按住Ctrl滚滚轮,代码的字体会随你心意变大变小。• 在编辑区按住右键可拖动代码,省去拉(尤其是横向)滚动条之麻烦;相关设置:Mouse Drag Scrolling。• Ctrl+D可复制当前行或选中块。• Ctrl+Shift+C注释掉当前行或选中块,Ctrl+Shift+X则解除注释。• Tab缩进当前行或选中块,Shift+Tab减少缩进。• 可拖动选中块使其移动到新位置,按住Ctrl则为复制到新位置。• 按下Atl,再拖动鼠标,可以实现部分选择(即只选中一个区域内的字符,而不会包含它们所在行的其他字符)。• 需要更大编辑空间时,F2和Shift+F2分别可以显隐下
阅读全文
摘要:Anniversary partyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3043Accepted Submission(s): 1374Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical stru
阅读全文
摘要:Root3719 - Grass is GreenTime limit: 3.000 secondsThis year exactlynpeople bought land in Squareville_including you. When someone buys land, then the first thing they do is to plant grass on the land; everyone wants to make sure that their grass is greener than the neighbour's. Depending on the
阅读全文
摘要:1069. Prufer CodeTime limit: 0.25 secondMemory limit: 8 MBA tree (i.e. a connected graph without cycles) with vertices is given (N≥2). Vertices of the tree are numbered by the integers 1,…,N. A Prufer code for the tree is built as follows: a leaf (a vertex that is incident to the only edge) with a m
阅读全文
摘要:D -Flying to the MarsTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 1800DescriptionIn the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to attack Kscino
阅读全文
摘要:运算异常错误,比如除零错误,浮点数取余等等。
阅读全文
摘要:. Hungry Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub and Iahubina went to a date at a luxury restaurant. Everything went fine until paying for the food. Instead of money, the waiter wants Iahub to write a Hungry sequence consisti
阅读全文
摘要:A. Flipping Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub got bored, so he invented a game to be played on paper.He writes n integers a1, a2, ..., an. Each of those integers can be either 0 or 1. He's allowed to do exactly one move
阅读全文