Time of Update: 2014-08-09
標籤:hdu dp 題意:給定一棵樹和m個詢問 每個詢問要求回答不在u和v兩節點所形成的路徑上的點的最小標號思路:一開始以為是LCA… 不過T了好幾次… 後來發現不用LCA也可做考慮每個詢問u和v 如果他們的lca不是1 則1一定是答案 不過求lca會T 那麼我們只需要在遍曆樹的時候給節點染色 染的顏色就是1的兒子的顏色
Time of Update: 2014-08-09
標籤:style http color os io for ar div 解題報告題目傳送門題意:給一個字串,要求,對於這個字串空隔為k取字元對(k=0,1,2,3,4...)要求在相同的空隔取對過程匯總,整個字串中沒有一個相同
Time of Update: 2014-08-09
標籤:des style http color 使用 os io strong 《powershell 的版本所引起的載入 FSharp 編譯器問題》基本解決1、FSharp.Core.dll,不光要
Time of Update: 2014-08-09
標籤:des style http color os io strong for Description Problem B.Last Digit Background Give you a
Time of Update: 2014-08-09
標籤:style blog os io 2014 ar amp log POJ 2155
Time of Update: 2014-08-09
標籤:blog os io for 2014 ar amp new 題目大意:兩個人往一個空的字串裡填單詞,每一次只能填一個,而且填完之後要是給出的N個字串的首碼。思路分析:先用給出的所有單詞建字典樹。然後從根節點開始dfs。w
Time of Update: 2014-08-09
標籤:blog for 2014 ar log 設計 ef file /*===================================================*
Time of Update: 2014-08-09
標籤:acm 演算法 城市平亂時間限制:1000 ms |
Time of Update: 2014-08-09
標籤:seed-dim3517 arm gcc x264 第一步:官網上下了個最新的x264,地址http://www.videolan.org/developers/x264.html。我下載的檔案是last_x264.tar.bz2。120版本地址第二步:解壓命令為#tar -jxv -f
Time of Update: 2014-08-09
標籤:socket用戶端23UdpClient.cpp代碼:// 23UdpClient.cpp : 定義控制台應用程式的進入點。//#include "stdafx.h"#include <stdio.h>//Windows通訊端所需的標頭檔#include <WINSOCK.H>//Windows通訊端介面的庫檔案#pragma comment(lib,
Time of Update: 2014-08-09
標籤:hdu 貪心 題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=4296BuildingsTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1822
Time of Update: 2014-08-09
標籤:hdu acm dp 立方堆疊 Monkey and BananaProblem DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a
Time of Update: 2014-08-09
標籤:des style blog http color java os io Just a HookTime Limit: 4000/2000 MS
Time of Update: 2014-08-09
標籤:blog http os io for art ar amp http://poj.org/problem?id=3461先來一發KMP演算法:#include <cstdio>#include
Time of Update: 2014-08-09
標籤:style io for ar line amp size poj 有一顆蘋果樹,每個節點上面有很多蘋果,從一個節點到另外一個可以到達的節點花費1步,求k步最多能吃到多少蘋果,起始點為1,可以不回到起始點。這是典型的回溯型
Time of Update: 2014-08-09
標籤:style blog color 使用 div 時間 amp 演算法 解法一:若二進位末尾為1,則除以2餘1;int count(int a){ int num=0; while(a) {
Time of Update: 2014-08-09
標籤:矩陣 數學 斐波那契數列 題目連結: http://poj.org/problem?id=3070題目大意:給定n和10000,求第n個Fibonacci數mod 10000
Time of Update: 2014-08-09
標籤:java打包 jar one-jar 不知大家在寫Java程式的時候有沒有這樣的需求: 將引用其它第三方JAR庫的項目打包成一個JAR檔案運行.也就是說在你打包好的JAR檔案中再包含那些你引用的第三方JAR檔案,合成一個JAR包,這樣只需在Windows下雙擊,或在Linux終端下輸入 java -jar
Time of Update: 2014-08-09
標籤:des style blog color java os io strong 敵兵布陣Time Limit: 2000/1000 MS
Time of Update: 2014-08-09
標籤:os io for 代碼 amp ios 不同的 algorithm 給一個長度為n的A數列,每個數是0或1,要求構造一個遞增數列B,長度為n,每個數為[0,1]的實數,使得∑(Ai-Bi)2最小。可以發現,最前面連續的0