#include #include #include #include #include #include #include #include #include using namespace std;const int MAXX = 10;int box[MAXX][MAXX];v...
分类:
其他好文 时间:
2014-08-15 12:41:58
阅读次数:
322
~~~~
果然用map暴力直接超时。原来要用hash,第一次写hash,真是个好玩的东西。
题目链接:http://poj.org/problem?id=1200
注意:1.题目说文本是由字符组成的,所以要用ascll码作为下标。
2.hash数组要开大点,否则RE。
#include
#include
#include
#include
#include
#define N 1...
分类:
其他好文 时间:
2014-08-15 08:17:47
阅读次数:
233
Description
Many people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text. Such number could be the number of d...
分类:
其他好文 时间:
2014-08-14 23:55:56
阅读次数:
329
交互询问--ask(-a)打印信息--verbose(-v)#以详述模式执行,可印出GNU错误讯息,并显示假执行所用的USEflags。--version(-V)#显示emerge版本。不能与其它选项共享,名称与格式为规范。查看依赖关系--pretend(-p)-pv#查看包含docUSEflag,来查看是否下载了文档。查询软件包名称-..
分类:
其他好文 时间:
2014-08-14 21:02:19
阅读次数:
443
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:
其他好文 时间:
2014-08-14 20:16:29
阅读次数:
219
标准的二分查找:binary_search int bsearch(int a[],int l,int r,int x){ int m; while(l>2; if(a[m]==x) return m; else if(a[m]>x) r = m-1; else l ...
分类:
其他好文 时间:
2014-08-14 19:33:59
阅读次数:
226
在CSS中,margin和padding是页面布局的主要属性,如何灵活有效使用对于基于DIV+CSS设计网页方法是非常重要的,笔者经常使用且经常误使用,所以根据经验和网上资料整理出切合自己的内容,以备以后使用。一.首先了解CSS盒模型 Box Model通过这个CSS盒模型模型就很容易理解Margi...
分类:
Web程序 时间:
2014-08-14 19:33:49
阅读次数:
238
题意:要你求出给定的单词表在一个字符串中出现了几个单词
思路:没学AC自动机之前,用KMP做了一下,果断超时。后来问了一下朋友,才知道要用AC自动机。涨姿势了
http://blog.csdn.net/u012313382/article/details/38541509
本题就是一道AC自动机的模板题
AC代码:
#include
#include
#include
#includ...
分类:
其他好文 时间:
2014-08-14 16:45:38
阅读次数:
202
1、首先xfire 不能加紧MyEclipse10中 只能通过添加jar包的方式添加;2、给MyEclipse6.5 添加xfire 点击 help->software updates ->find and install ->选择 search for new features to instal...
分类:
Web程序 时间:
2014-08-14 16:33:08
阅读次数:
257
之前是一个asp爱好者,感觉前途渺茫,特此转向Powerful的Java阵型,寻求心灵上的慰藉。把自己遇到的问题记录下来,同时也分享给大家。环境-下载1 JDKhttp://dlsw.baidu.com/sw-search-sp/soft/96/17531/jdk-8u11-windows-x64-...
分类:
编程语言 时间:
2014-08-14 15:56:49
阅读次数:
278