码迷,mamicode.com
首页 >  
搜索关键字:scala for if match while    ( 37974个结果
ffmpeg save rtsp stream
#include #ifdef __cplusplusextern "C" {#endif#include #include //#include #ifdef _MSC_VERint strcasecmp(const char *s1, const char *s2){ while ((*s...
分类:其他好文   时间:2014-05-05 11:09:37    阅读次数:382
NYOJ 633 幂
#include #include int main() { double k,m; int T; scanf("%d",&T); while(T--) { scanf("%lf%lf",&k,&m); int a=pow(10,log10(m)/k); while(pow(a+1,k)<=m) ++a; printf("%d\n",a); } return 0; }...
分类:其他好文   时间:2014-05-04 18:44:58    阅读次数:296
Exception loading sessions from persistent storage
严重: Exception loading sessions from persistent storage  java.io.EOFException 删除Tomcat里面的work/Catalina/localhost下的内容即可解决 Tomcat在启动时出现如下异常问题: 严重: IOException while loading persisted sessions...
分类:其他好文   时间:2014-05-04 17:58:54    阅读次数:313
JS获取URL参数
使用JavaScript获取URL上的参数值 方法一: function getUrlParam(name) {      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象      var r = window.location.search.substr(1).match(reg);...
分类:Web程序   时间:2014-05-04 17:47:44    阅读次数:265
[codility]MaxProductOfThree
最近在学scala语言,scala代码如下: import scala.collection.JavaConversions._ import scala.util.control.Breaks._ object Solution { def solution(A: Array[Int]): Int = { // write your code in Scala 2.10...
分类:其他好文   时间:2014-05-04 09:42:56    阅读次数:372
CF(427D-Match & Catch)后缀数组应用
题意:给两个字符串,求一个最短的子串。使得这个子串在两个字符串中出现的次数都等于1.出现的定义为:可以重叠的出现。 解法:后缀数组的应用。从小枚举长度。如果一个长度len合法的话:则一定存在这个样的sa[i]排名。sa[i]与s[i+1]的公共前缀长度大于等于len,且sa[i]与[i-1]的公共前缀长度小于len,同时sa[i+1]与[i+2]的公共前缀长度小于len,同时保证sa[i...
分类:其他好文   时间:2014-05-04 09:42:00    阅读次数:275
CF 427D Match & Catch 求最短唯一连续LCS
题目来源:CF 427D Match & Catch 题意:给出2个字符串 求最短的连续的公共字符串 并且该字符串在原串中只出现一次 思路:把2个字符串合并起来求height 后缀数组height的应用 #include #include #include using namespace std; const int maxn = 100010; char s[maxn]; int s...
分类:其他好文   时间:2014-05-04 09:32:45    阅读次数:315
[codility]Distinct
最近在学scala语言,scala代码如下: import scala.collection.JavaConversions._ object Solution { def solution(A: Array[Int]): Int = { // write your code in Scala 2.10 // using quick sort to so...
分类:其他好文   时间:2014-05-04 09:22:37    阅读次数:341
[codility]CountDiv
最近在学scala语言,scala代码如下: import scala.collection.JavaConversions._ object Solution { def solution(A: Int, B: Int, K: Int): Int = { // write your code in Scala 2.10 var cnt: Int = 0...
分类:其他好文   时间:2014-05-04 09:06:08    阅读次数:307
Let us learn C in Code <11> flowchart while
So many days passed since the last C tutorial about the flowchart, this chapter we will go on  the flowchart and while loops...
分类:其他好文   时间:2014-05-04 09:01:20    阅读次数:307
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!