上一页 1 2 3 4 5 6 ··· 10 下一页

2013年7月30日

Digging(DP)

摘要: 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) 阅读全文

posted @ 2013-07-30 11:49 铁树银花 阅读(308) 评论(0) 推荐(0) 编辑

2013年7月29日

Qt如何获得窗口的几何信息(Window Geometry)

摘要: 一个窗口除去窗框以后,余下部分称为客户区域。获得窗口的几何信息(坐标,长宽等)有以下两组命令:1. 包括窗框(即整个窗口):x(), y(), frameGeometry(), pos(), move().2. 不包括窗框(即客户区域):geometry(), width(), height(), rect(), size().注意的是,以上两组命令的区别只存在于有窗框的窗口,而不存在于非顶级部件和没有窗框的窗口。下图可以帮助理解: 阅读全文

posted @ 2013-07-29 16:58 铁树银花 阅读(814) 评论(0) 推荐(0) 编辑

2013年7月28日

vim如何粘贴

摘要: 刚开始vim的学习之旅,在进行粘贴操作时遇到了麻烦。教程上粘贴的命令是p,但我发现该命令只适用于从vim到vim的复制(p未必就仅仅局限于此,但我目前所了解到的情况如此),当我从网上复制了一段代码想要粘贴到正用vim编辑的文本时就失败了,vim提示“寄存器没有内容”。显然,p命令用的应当是vim自己的剪贴板,而不是系统的剪贴板,而我从网上复制代码时用的却是系统的剪贴板,于是产生无法粘贴的现象。解决方法:用Shift+Insert命令。2013-07-2810:49:48 阅读全文

posted @ 2013-07-28 10:50 铁树银花 阅读(295) 评论(0) 推荐(0) 编辑

Counting Pair

摘要: 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... 阅读全文

posted @ 2013-07-28 09:48 铁树银花 阅读(327) 评论(0) 推荐(0) 编辑

King's Sanctuary(简单几何)

摘要: 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 阅读全文

posted @ 2013-07-28 09:45 铁树银花 阅读(332) 评论(0) 推荐(0) 编辑

2013年7月26日

System Administrator(构造,图论)

摘要: 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 阅读全文

posted @ 2013-07-26 22:38 铁树银花 阅读(452) 评论(0) 推荐(0) 编辑

Bargaining Table

摘要: 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. 阅读全文

posted @ 2013-07-26 17:09 铁树银花 阅读(914) 评论(0) 推荐(0) 编辑

Python print "hello world" SyntaxError: invalid syntax

摘要: 刚安装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 阅读全文

posted @ 2013-07-26 15:14 铁树银花 阅读(5996) 评论(0) 推荐(0) 编辑

2013年7月25日

Parencodings(模拟)

摘要: 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 阅读全文

posted @ 2013-07-25 20:56 铁树银花 阅读(352) 评论(0) 推荐(0) 编辑

Do the Untwist(模拟)

摘要: 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 阅读全文

posted @ 2013-07-25 17:18 铁树银花 阅读(904) 评论(0) 推荐(0) 编辑

Jugs(回溯法)

摘要: 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 阅读全文

posted @ 2013-07-25 01:05 铁树银花 阅读(511) 评论(0) 推荐(0) 编辑

2013年7月24日

Anagrams by Stack(深度优先搜索)

摘要: 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 阅读全文

posted @ 2013-07-24 00:42 铁树银花 阅读(534) 评论(0) 推荐(0) 编辑

2013年7月23日

Fire Net(深度优先搜索)

摘要: 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 阅读全文

posted @ 2013-07-23 20:52 铁树银花 阅读(346) 评论(0) 推荐(0) 编辑

Integer Numbers

摘要: 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 阅读全文

posted @ 2013-07-23 18:04 铁树银花 阅读(390) 评论(0) 推荐(0) 编辑

Codeforces Beta Round #34 (Div. 2) E. Collisions

摘要: 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 阅读全文

posted @ 2013-07-23 13:22 铁树银花 阅读(512) 评论(0) 推荐(0) 编辑

什么是Qt Widget?

摘要: 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(译名:部件)就是包含可视化元素的用户接口,如编 阅读全文

posted @ 2013-07-23 12:24 铁树银花 阅读(1602) 评论(0) 推荐(0) 编辑

2013年7月22日

codeblocks快捷键(转)

摘要: ==日常编辑==• 按住Ctrl滚滚轮,代码的字体会随你心意变大变小。• 在编辑区按住右键可拖动代码,省去拉(尤其是横向)滚动条之麻烦;相关设置:Mouse Drag Scrolling。• Ctrl+D可复制当前行或选中块。• Ctrl+Shift+C注释掉当前行或选中块,Ctrl+Shift+X则解除注释。• Tab缩进当前行或选中块,Shift+Tab减少缩进。• 可拖动选中块使其移动到新位置,按住Ctrl则为复制到新位置。• 按下Atl,再拖动鼠标,可以实现部分选择(即只选中一个区域内的字符,而不会包含它们所在行的其他字符)。• 需要更大编辑空间时,F2和Shift+F2分别可以显隐下 阅读全文

posted @ 2013-07-22 23:49 铁树银花 阅读(281) 评论(0) 推荐(0) 编辑

2013年7月21日

Anniversary party(树形dp入门)

摘要: 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 阅读全文

posted @ 2013-07-21 21:38 铁树银花 阅读(1674) 评论(0) 推荐(0) 编辑

Grass is Green

摘要: 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 阅读全文

posted @ 2013-07-21 14:16 铁树银花 阅读(273) 评论(0) 推荐(0) 编辑

2013年7月20日

Prufer Code

摘要: 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 阅读全文

posted @ 2013-07-20 17:33 铁树银花 阅读(669) 评论(0) 推荐(0) 编辑

2013年7月19日

Flying to the Mars

摘要: 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 阅读全文

posted @ 2013-07-19 21:12 铁树银花 阅读(499) 评论(0) 推荐(0) 编辑

2013年7月16日

C++ Arithmetic Exception

摘要: 运算异常错误,比如除零错误,浮点数取余等等。 阅读全文

posted @ 2013-07-16 16:05 铁树银花 阅读(1233) 评论(0) 推荐(0) 编辑

2013年7月14日

Codeforces Round #191 (Div. 2) B. Hungry Sequence(素数筛选法)

摘要: . 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 阅读全文

posted @ 2013-07-14 21:34 铁树银花 阅读(389) 评论(0) 推荐(0) 编辑

Codeforces Round #191 (Div. 2) A. Flipping Game(简单)

摘要: 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 阅读全文

posted @ 2013-07-14 20:57 铁树银花 阅读(484) 评论(0) 推荐(0) 编辑

2013年6月19日

constant value too large

摘要: 出错现场:1 .model small2 .data3 byte_var dw 'abc',10h,2 dup(-1,2 dup(4))4 .stack5 .code将byte_var dw 'abc',10h,2 dup(-1,2 dup(4))一句中dw改为db即可 阅读全文

posted @ 2013-06-19 20:31 铁树银花 阅读(666) 评论(0) 推荐(0) 编辑

2013年6月18日

Qt undefined reference to ***

摘要: 错因:某个类声明了一个函数但是没有定义就直接使用。 阅读全文

posted @ 2013-06-18 19:57 铁树银花 阅读(400) 评论(0) 推荐(0) 编辑

2013年5月25日

Codeforces Round #180 (Div. 2) B. Sail(简单)

摘要: B. Sailtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe polar bears are going fishing. They plan to sail from(sx, sy)to(ex, ey). However, the boat can only sail by wind. At each second, the wind blows in one of these directions: east, south, we 阅读全文

posted @ 2013-05-25 17:54 铁树银花 阅读(275) 评论(0) 推荐(0) 编辑

2013年5月18日

Codeforces Round #180 (Div. 2) A. Snow Footprints(简单)

摘要: A. Snow Footprintstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a straight snowy road, divided intonblocks. The blocks are numbered from 1 tonfrom left to right. If one moves from thei-th block to the(i + 1)-th block, he will leave a ri 阅读全文

posted @ 2013-05-18 15:09 铁树银花 阅读(339) 评论(0) 推荐(0) 编辑

2013年5月15日

并行接口和串行接口

摘要: 微型计算机主机与外部设备的连接,基本上使用了两类接口;串行接口与并行接口。 并行接口:数据的各位同时进行传送,其特点是传输速度快,但当传输距离较远、位数又多时,将导致通信线路复杂和提高成本。串行通信:数据一位位地顺序传送,其特点是通信线路简单,只要一对传输线就可以实现双向通信,并可以利用电话线,从而大大降低了成本,特别适用于远距离通信,但传送速度较慢。 阅读全文

posted @ 2013-05-15 20:46 铁树银花 阅读(565) 评论(0) 推荐(0) 编辑

2013年5月11日

A Simple Problem with Integers(线段树区间更新模板题)

摘要: A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other 阅读全文

posted @ 2013-05-11 09:43 铁树银花 阅读(250) 评论(0) 推荐(0) 编辑

2013年5月9日

汇编知识点整理

摘要: 1. 堆栈的操作数是字,不能是字节。2. push操作是先将栈顶指针减2,即(sp)-2 -> sp,然后将源操作数压栈,源操作数的高字节放入(sp)+1,低字节放入(sp)。pop则先把栈顶的字((sp) + 1, (sp))送到目的操作数,然后将栈顶指针sp-23. 使用call指令调用子程序时,该指令会将其下条指令的偏移地址(称为返回地址或断点)保存进栈,若为段间调用则要首先把cs寄存器的内容保存进栈,保存断点是为了在子程序执行ret返回指令后能顺利执行call的下一条指令。例:call myprocmov ax, 09h call指令会将指令mov ax,09h的偏移地址压栈 阅读全文

posted @ 2013-05-09 10:56 铁树银花 阅读(232) 评论(0) 推荐(0) 编辑

2013年5月8日

汇编错误:instruction operand must have size

摘要: 出错现场:shl [bx], 1更正:shl word ptr [bx], 12013-05-0822:09:40 阅读全文

posted @ 2013-05-08 22:09 铁树银花 阅读(1291) 评论(0) 推荐(0) 编辑

汇编错误:must be index or base register

摘要: 出错现场:shl word ptr [dx], 1错因:上述指令使用寄存器相对寻址方式,只能使用BX, BP,SI或DI。不能使用DX 阅读全文

posted @ 2013-05-08 21:57 铁树银花 阅读(1164) 评论(0) 推荐(0) 编辑

2013年5月6日

NV UP EI PL NZ NA PO NC的含义(转)

摘要: 原帖:http://answers.yahoo.com/question/index?qid=20061110202234AATMzc7The types of flags within the simple 8086 CPU are as follows, with their abbreviation in parentheses:Overflow (OF)Direction (DF)Interrupt Enable (IF)Sign (SF)Zero (ZF)Auxillary Carry (AF)Parity (PF)Carry (CF)The functions of the fla 阅读全文

posted @ 2013-05-06 21:03 铁树银花 阅读(999) 评论(0) 推荐(0) 编辑

汇编 byte register cannot be first operand

摘要: 出错现场:push al错因:al是字节寄存器,而栈的操作单位是字改为:push ax 阅读全文

posted @ 2013-05-06 13:15 铁树银花 阅读(1086) 评论(0) 推荐(1) 编辑

2013年5月1日

SQL Sever 2000 MMC 检测到此管理单元发生一个错误……

摘要: win7系统安装SQL 2000,通过鼠标右键选择新建表时弹出错误信息框:简便的解决方案是:鼠标点击选中“表”,然后点击上方的星形图标(新建图标)。 阅读全文

posted @ 2013-05-01 20:47 铁树银花 阅读(222) 评论(0) 推荐(0) 编辑

Qt画平滑曲线

摘要: 初学Qt绘图,使用drawling()绘制的直线在两端点间距离较小时总是出现折点(锯齿),非常不美观。后来发现使用QPainter::setRenderHint(QPainter::Antialiasing);能消除锯齿。setRenderHint用于设置呈现样式,Antialiasing是反锯齿。例:QPainter pen(this);//创建画笔并将画笔传到设备上pen.setRenderHint(QPainter::Antialiasing);//平滑直线pen.setPen(QPen(Qt::black,1,Qt::SolidLine,Qt::RoundCap,Qt::MiterJo 阅读全文

posted @ 2013-05-01 10:42 铁树银花 阅读(1527) 评论(0) 推荐(0) 编辑

2013年4月30日

Qt如何获取控件的坐标

摘要: 以pushButton为例,假设一个按钮控件的名称为mybutton,通过mybutton->x()和mybutton->y()可以分别获得横坐标和纵坐标 阅读全文

posted @ 2013-04-30 20:22 铁树银花 阅读(7177) 评论(0) 推荐(1) 编辑

Qt 写文件失败

摘要: 今天在学习使用Qt写文件时,发现写文件后打开该文件居然什么都没有。后来发觉原因是文件路径出错,在之前使用VS时文件路径若不指明,默认是应用程序所在目录,在Qt中就出错了。使用QFilefile("data.txt");则在应用程序所在目录下的data文件未能显示写入的信息,实际上语句操作的对象也不是该文件。使用QFilefile("F:\\data.txt");则信息成功写入F盘下的data文件关于Qt的文件路径设置仍在学习中~2013-04-30 14:24:50 阅读全文

posted @ 2013-04-30 14:24 铁树银花 阅读(435) 评论(0) 推荐(0) 编辑

Qt undefined reference to `vtable for paint'

摘要: 构建Qt项目时出现error:“undefined reference to `vtable for XXX'”。其中XXX是工程的一个头文件的名字。出现这个问题的原因可能是我修改了工程的内容而Qt没有检测到,我的解决方案是重现执行qmake(菜单栏“构建” -> “执行qmake”),再次构建项目,能正常启动和退出。 阅读全文

posted @ 2013-04-30 11:36 铁树银花 阅读(196) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 10 下一页

导航