HDU 1498 50 years, 50 colors(最小點覆蓋,坑題),hdu149850 years, 50 colorsProblem DescriptionOn Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nice, isn't it? To celebrate this meaningful day, the ACM team of
POJ 1692 Crossed Matchings(DP),pojmatchingsDescriptionThere are two rows of positive integer numbers. We can draw one line segment between any two equal numbers, with values r, if one of them is located in the first row and the other one is located
ZOJ 3156 Taxi (二分匹配+二分尋找),zoj3156題目連結:TaxiTaxiTime Limit: 1 Second Memory Limit: 32768 KB As we all know, it often rains suddenly in Hangzhou during summer time.I suffered a heavy rain when I was walking on the street
java中常見的輸入輸出資料流案例學習,java輸入輸出資料流案例位元組輸入資料流:1.FileInputStream用途:從檔案系統中的檔案獲得輸入位元組,常用於讀取映像、聲音等原始位元組流,讀取字元流可考慮使用FileReader詳細建構函式與常用方法可參考API文檔,網上已經有中文版的API了,我是個E文盲,傷不起這裡介紹一個最常見的方法:read(byte[] b, int off,
給定字典做分詞,給定字典分詞最近需要用到分詞,無聊寫個演算法。。。演算法:給定一個字典和一句話,做分詞;Target:輸入詞典,輸出所有可能的分詞結果思路:dfs加速:首先判斷是不是這句話裡所有的詞在字典中都有(validate)//// Wordsplit.cpp// // Target: Find all possible splitting of a sentence given a dictionary dict// Howto: refer to main////
Tree Operations 列印出有向圖中的環,treeoperations題目:You are given a binary tree with unique integer values on each node. However, the child pointers on each node may point to any other node in the tree including itself, introducing cycles into the binary