- 博客(15)
- 资源 (6)
- 收藏
- 关注
原创 Cannot find or open the PDB file
在vs2010下写程序调一个API,结果返回的句柄始终为NULL,GetLastError() = 126。说明LoadLibrary不成功,全部重新配置之后,Debug结果如下:Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB fileLoaded 'C:\Windows\System32\kern
2013-06-08 10:53:50 1520
原创 c# Form中的键盘响应
由于工程项目需要,要在全屏Form中加上键盘ESC的响应,实现的效果就是:全屏中press键盘上的Escape键,程序结束。原本觉得挺简单的功能,却捣鼓了一会儿才解决。大致总结一下步骤:首先在form的designer下加上 this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Form_KeyPress);
2013-06-05 15:12:09 1101
原创 微软笔试题-老鼠与毒药
有1000个一模一样的瓶子,其中有999瓶是普通的水,有1瓶是毒药。任何喝下毒药的生命都会在一星期之后死亡。现在你只有10只小白鼠和1个星期的时间,如何检验出哪个瓶子有毒药? 解答:把瓶子从 0 到 999 依次编号,然后全部转换为 10 位二进制数。让第一只老鼠喝掉所有二进制数右起第一位是 1 的瓶子,让第二只老鼠喝掉所有二进制数右起第二位是 1 的瓶子,等等。一星期后,如果第一只老鼠死
2013-04-06 16:31:02 4570
转载 【转载】HDOJ 题型分布
原文:http://blog.sina.com.cn/s/blog_92718cc50101d1rf.html 1001 这个就不用说了吧1002 简单的大数1003 DP经典问题,最大连续子段和1004 简单题1005 找规律(循环点)1006 感觉有点BT的题,我到现在还没过1007 经典问题,最近点对问题,用分治1008 简单题1009 贪心
2013-03-12 14:52:07 804
原创 PAT 1013. Battle Over Cities (25) DFS
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee
2013-03-01 21:49:44 626
原创 PAT 1003. Emergency (25) Dijkstra算法 + DFS
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l
2013-03-01 19:05:06 1323
原创 PAT 1033. To Fill or Not to Fill (25) 加油站贪心问题
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different ga
2013-02-27 14:20:28 679
原创 PAT 1007. Maximum Subsequence Sum (25) 最大子序列和
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 Maximum Subsequence is the continuous subsequence which has the largest s
2013-02-27 14:16:04 1687
原创 PAT 1020. Tree Traversals (25) 根据树的中序与后序,求层序
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor
2013-02-21 12:54:49 855
原创 PAT 1026. Table Tennis (30)
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the ava
2013-02-17 10:03:08 2737 1
转载 [转载]c语言中数组作为函数参数
点击查看原文 平常写代码时候,如果函数需要接受一个数组作为参数,我总是习惯把函数声明为具有指针参数的形式,比如:#include void func1(char *array, int len) { int i; for(i = 0; i < len; i++) /* do something */} void fun
2013-02-05 19:43:58 651
原创 PAT 1047. Student List for Course (25) Mark~
Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input Spe
2013-02-04 13:32:40 815
原创 PAT 1025. PAT Ranking (25)
Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists w
2013-02-02 19:42:39 662
原创 PAT 1028. List Sorting (25) 重写sort 函数中的cmp
Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N
2013-01-31 20:44:28 745
原创 c语言中的全局数组和局部数组
今天在A一道题目的时候发现一个小问题,在main函数里面开一个int[1000000]的数组会提示stack overflow,但是将数组移到main函数外面,变为全局数组的时候则ok,就感到很迷惑,然后上网查了些资料,才得以理解。对于全局变量和局部变量,这两种变量存储的位置不一样。对于全局变量,是存储在内存中的静态区(static),而局部变量,则是存储在栈区(stack)。这里,顺便普
2013-01-31 14:15:29 6546
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人