题目链接:
啊哈哈,选我选我
思路是:对猜测的字符串进行扫描。。看最后猜错的次数是不是大于等于7,还有就是已经踩过的数字在猜算错误,所以用map判一下重即可。。如果知道这个坑,那么就是水马题。
Hangman Judge
In ``Hangman Judge,'' you are to write a program that j...
分类:
其他好文 时间:
2014-08-04 11:12:07
阅读次数:
263
for...in 循环主要用于数组,也可用于对象。for (var index in myArray) { document.write(myArray[index]);}var person = { firstname : "Bill", lastname : "Gates", ...
分类:
其他好文 时间:
2014-08-03 22:48:56
阅读次数:
134
最近研究了下模拟退火,首先戳这里>_顾研08年集训队论文,讲的非常详细
首先随机20个点作为候选解,以此扩展来确定距离工厂最近的点的最远的距离是多少。但是有需要注意到扩展点在边界的情况,因为边界是圆所以很难继续扩展,如论文中提到的两种情况。1.是两工厂垂直平分线与边界交点2.一个工厂的圆与边界相切。单独判断即可。
其中有个很蛋疼的地方,我之前距离用了很多次sqrt,T成狗,比较距离时只需比较距...
分类:
其他好文 时间:
2014-08-03 18:10:16
阅读次数:
215
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
/**
...
分类:
其他好文 时间:
2014-08-03 12:54:55
阅读次数:
201
read code:
[root@luozhonghua 03]# cat ex03-read-01.c
/*文件ex03-open-03.c,
O_CREAT和O_EXCL的使用*/
#include
#include
#include
#include
int main(void)
{
int fd = -1,i;
ssize_t size...
分类:
系统相关 时间:
2014-08-03 12:46:45
阅读次数:
355
#include#include#includeusing namespace std;int main(){ string word; vector Str; while(cin>>word) Str.push_back(word); for(auto c:...
分类:
其他好文 时间:
2014-08-03 12:38:05
阅读次数:
223
电信光猫 RG201O-CA2 破解 ======================== 1. 先在路由器底部找到登入帐号和密码 2. 打开 http://192.168.1.1 3. 输入刚才找到的帐号密码,登入路由器 4. 下载路由器配置文件:http://192.168.1.1/back...
分类:
移动开发 时间:
2014-08-02 23:37:45
阅读次数:
554
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { //判断是否按下返回键,event.getRepeatCount() == 0为防止点击的过快 if(keyCode==KeyEvent.KEYCODE_BACK&.....
分类:
其他好文 时间:
2014-08-02 23:15:44
阅读次数:
249
1. Choose a topic.2. Decide what to develop.3. Check feasibility of your idea, including the tools, time, etc.4. If feasible, write a project proposal...
分类:
其他好文 时间:
2014-08-02 20:38:53
阅读次数:
197
源自:http://www.en8848.com.cn/read/proseessay/lz/239065.html 1. Buy someone's coffee. 为他人买杯咖啡 It's just coffee -- no one needs coffee, so this doesn't r...