首页 > 编程语言
BZOJ2434 NOI2011 阿狸的打字机 AC自动机+树状数组+DFS序
题意:给定三个操作:1、在当前字符串的末尾添加一个字符c 2、在当前字符串的末尾删除一个字符 3、记录当前字符串并对其标号。再给出N组询问,每组询问需回答第x个字符串在第y个字符串中出现的次数 题解: 首先按照如下规则建Trie,设当前节点为t,第i个字符串的结尾在Trie中的位置为mark[i]: ...
分类:编程语言   时间:2017-02-27 22:57:01    收藏:0  评论:0  赞:0  阅读:276
二元搜索算法(分治法)
1 #include 2 using namespace std; 3 4 5 int Binary_search(int *a, int p, int r, int x) 6 { 7 if (p > r) 8 return false; 9 int midpoint = (p + r) / 2; ... ...
分类:编程语言   时间:2017-02-27 22:55:44    收藏:0  评论:0  赞:0  阅读:757
kattis Curious Cupid (莫队算法)
Curious Cupid Curious Cupid Curious Cupid There are K There are K different languages in the world. Each person speaks one and only one language. Ther ...
分类:编程语言   时间:2017-02-27 22:54:58    收藏:0  评论:0  赞:0  阅读:281
BZOJ4010 HNOI2015 菜肴制作 拓扑排序+贪心
题意:给定限制条件(a,b)表示a必须在b之前,求所有合法序列中,小的数尽量在前面的方案 题解:首先我们根据限制条件建反向图,然后在反向图上求字典序最小的拓扑序(队列改为堆),逆序输出即可。 #include <queue> #include <functional> #include <cstdi ...
分类:编程语言   时间:2017-02-27 22:54:20    收藏:0  评论:0  赞:0  阅读:198
Spring中配置和读取多个Properties文件
Allows for making a properties file from a classpath location available as Properties instance in a bean factory. Can be used to populate any bean pro ...
分类:编程语言   时间:2017-02-27 22:51:09    收藏:0  评论:0  赞:0  阅读:267
进程、线程和上下文切换
进程是什么?狭义定义:进程是正在运行的程序的实例(aninstanceofacomputerprogramthatisbeingexecuted)。广义定义:进程是一个具有一定独立功能的程序关于某个数据集合的一次运行活动。它是操作系统动态执行的基本单元,在传统的操作系统中,进程既是基本的分配单元,也是基..
分类:编程语言   时间:2017-02-27 22:05:00    收藏:0  评论:0  赞:0  阅读:244
Python简单计算
环境:Python3.5[root@xiaoshui23:52:22~/test]#ll total16 drwxr-xr-x.2rootroot4096Feb2222:45sed -rwxr-xr-x.1rootroot105Feb2723:47test01.py -rw-r--r--.1rootroot41Feb2723:48test02.sh drwxr-xr-x.2rootroot4096Feb2723:36tmp3 [root@xiaoshui23:52:25~/test]#cattest01..
分类:编程语言   时间:2017-02-27 22:04:11    收藏:0  评论:0  赞:0  阅读:221
windows7 下 安装ipython-5.1.0报错
1,报错内容C:\Users\Hunk\Desktop\test\ipython-5.1.0>pythonsetupegg.pyinstall ………… error:Setupscriptexitedwitherror:MicrosoftVisualC++9.0isrequired.Get itfromhttp://aka.ms/vcpython272,解决方法未安装MicrosoftVisualC++CompilerforPython2.7http://www.mic..
分类:编程语言   时间:2017-02-27 22:02:10    收藏:0  评论:0  赞:0  阅读:559
Leetcode 503. Next Greater Element II JAVA语言
Givenacirculararray(thenextelementofthelastelementisthefirstelementofthearray),printtheNextGreaterNumberforeveryelement.TheNextGreaterNumberofanumberxisthefirstgreaternumbertoitstraversing-ordernextinthearray,whichmeansyoucouldsearchcircularlytofinditsnextg..
分类:编程语言   时间:2017-02-27 22:01:23    收藏:0  评论:0  赞:0  阅读:1306
CPE命名标准 - Common Platform Enumeration
参考网站:https://nmap.org/book/output-formats-cpe.html打开上面的网站,看第一段内容:CommonPlatformEnumeration(CPE)isastandardizedwaytonamesoftwareapplications,operatingsystems,andhardwareplatforms.CPE是(CommonPlatformEnumeration的缩写)以标准化方式为软件..
分类:编程语言   时间:2017-02-27 21:54:49    收藏:0  评论:0  赞:0  阅读:1029
在springboot中整合jersey和springfox-swagger2
前言为了实现RESTfulWebservice和接口说明,基于springboot平台,使用jersey作为JAX-RS的实现,采用swagger文档在线生成工具。提要在实现了springboot集成jersey的swagger文档功能,同时满足SpringMVC整合swagger提供RESTful文档功能。Springboot集成swagger通过springfox-swag..
分类:编程语言   时间:2017-02-27 21:54:02    收藏:0  评论:0  赞:0  阅读:2666
java之日期的一些操作
//获取两个日期之间的相差天数publicstaticintdifferentDaysByMillisecond(Datedate1,Datedate2){intdays=(int)((date2.getTime()-date1.getTime())/(1000*3600*24));returndays;}//publicstaticDategetOperateDate(Datetime){Calendarcalendar=Calendar.getInstance().getInst..
分类:编程语言   时间:2017-02-27 21:53:01    收藏:0  评论:0  赞:0  阅读:231
SpringMVC4 返回Json数据
在SpringMVC4之后jacksonx.jar都有更改。如果报NoClassDefFoundError错误,一般都会提示noconverttype,那么更改一下jackson相关jar包:1.jackson-annotations-2.5.0.jar2.jackson-core-2.5.0.jar3.jackson-databind-2.5.0.jarspringmvc配置也有变动:<!--用于将对象转换为J..
分类:编程语言   时间:2017-02-27 21:50:20    收藏:0  评论:0  赞:0  阅读:230
Codeforces 777E(离散化+dp+树状数组或线段树维护最大值)
E. Hanoi Factory time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Hanoi Factory time li ...
分类:编程语言   时间:2017-02-27 21:38:39    收藏:0  评论:0  赞:0  阅读:466
去掉数组中的空元素
function removeEmptyArrayEle(arr){ for(var i = 0; i < arr.length; i++) { if(arr[i] == undefined) { arr.splice(i,1); i = i - 1; // i - 1 ,因为空元素在数组下标 2 ... ...
分类:编程语言   时间:2017-02-27 21:35:16    收藏:0  评论:0  赞:0  阅读:120
人脸检测及识别python实现系列(4)——卷积神经网络(CNN)入门
人脸检测及识别python实现系列(4)——卷积神经网络(CNN)入门 上篇博文我们准备好了2000张训练数据,接下来的几节我们将详细讲述如何利用这些数据训练我们的识别模型。前面说过,原博文给出的训练程序使用的是keras库,对我的机器来说就是tensorflow版的keras。训练程序建立了一个包 ...
分类:编程语言   时间:2017-02-27 21:33:38    收藏:0  评论:0  赞:0  阅读:907
jsp页面提示“Multiple annotations found at this line: - The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path”解决方案
MyEclipse 的项目导入Eclipse中 所有的JSP页面都报红线,或者创建一个项目是,创建一个新的JSP文件报“Multiple annotations found at this line: - The superclass "javax.servlet.http.HttpServlet" ...
分类:编程语言   时间:2017-02-27 21:31:01    收藏:0  评论:0  赞:0  阅读:528
使用原生的javascript封装动画函数(有callback功能)
...
分类:编程语言   时间:2017-02-27 21:30:14    收藏:0  评论:0  赞:0  阅读:103
python-内置函数-
1、#快速查看一个类提供了哪些功能 print(dir(dict))2、#打印类详细的说明 help(list) 3、#除法运算获取商和余数,返回元组 divmod() r=divmod(97,10)结果返回元组:(9,7)第一个元素为商,第二个元素为余数 #把商赋给n1,余数赋给n2 n1,n2= ...
分类:编程语言   时间:2017-02-27 21:28:08    收藏:0  评论:0  赞:0  阅读:226
BP神经网络的Java实现(转)
http://fantasticinblur.iteye.com/blog/1465497 课程作业要求实现一个BPNN。这次尝试使用Java实现了一个。现共享之。版权属于大家。关于BPNN的原理,就不赘述了。 下面是BPNN的实现代码。类名为BP。 Java代码 package ml; impor ...
分类:编程语言   时间:2017-02-27 21:26:00    收藏:0  评论:0  赞:0  阅读:382
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!