原创 Codeforces Round #263 (Div. 1)-A,B,C

A: 這道題目還是很簡單的,做過很多遍了,類似於切割木板的問題。 把所有的數放在一個優先隊列裏,彈出兩個最大的,然後合併,把結果放進去。依次進行。 #include <iostream> #include<stdio.h> #includ

原创 hdu-5015-233 Matrix-矩陣

很顯然矩陣的第一列爲: 0 a[1] a[2] a[3] a[4] 我們轉化一下,轉化爲 23 a[1] a[2] a[3] a[4] 3 那麼由第一列轉移到第二列則爲 23*10+3 a[1]+23*10+3 a[2]+a[1]+23*

原创 bug修復日記---------玩家信息被重複寫入數據庫

結構介紹:         當客戶端下線的時候,客戶端會發一個消息給服務端,告訴服務端,我要下線,接着,客戶端就會執行下線的函數         下線函數裏會執行讓服務端往數據庫裏寫客戶端的數據的函數並且把這個客戶端從session列表裏

原创 BestCoder Round #7-A,B,C

A:Little Pony and Permutation 直接暴力搜索,複雜度O(n) #include<stdio.h> #include<iostream> #include<stdlib.h> #include<string.h>

原创 scala-第七章-打印9*9乘法口訣表

class multitable{ def makeRowSeq(row: Int) = for(col <- 1 to 10) yield { val prod = (row * col).toString;//pro

原创 slf4j配置與解析

logback.xml 當在jvm裏運行jar包程序時,可以使用參數-Dlogback.configurationFile=xxx/logback.xml 指定lobback.xml的位置。 當使用Intellij IDEA等idea

原创 scala-簡單的模式匹配

csvMap.get(row) match { case Some(y:Map[String, String]) => y.get(list) case None => None } csv