HDU 5407 CRB and Candies(數論+yy)
HDU 5407題意:計算:LCM(C0N,C1N,C2N,...,CNN)(1<=N<=106)思路:先打個表看看?我們可以發現:f(3)=f(4
HDU 5056 雙指針(也叫窗口滑動(也叫尺取法))
DescriptionYou are given a string S consisting of lowercase letters, and your ta
C++語言的getline在cl和g++中的不同語義
本文的cl指的是Visual studio 2010中的的C++語言編譯器,g++指的是g++ 4.9編譯器。getline在cl中指的是獲取的一行中沒帶&rd
HDU Victor and World (最短路+狀態壓縮)
題目鏈接:傳送門題意:n個城市m條路,剛開始在點1,求把每個城市都遍歷一邊最後回到1的花費的最小值。分析:我們首先需要預處理出任意兩個國家之間的最短距離,因為數
CSU 1506 Problem D: Double Shortest Paths(最小費用最大流)
題意:2個人從1走到n,如果一條路第一次走則是價值di,如果第二次還走這條路則需要價值di+ai,要你輸出2個人到達終點的最小價值!太水了!一條邊建2次就OK了
HDU 4415 Assassin's Creed(貪心)
HDU 4415題意:壯哉我Assassin!E叔有一柄耐久度為m的袖劍,以及n個目標士兵要去解決。每解決掉一個士兵,消耗袖劍Ai的耐久度,且獲得該士兵的武器,
hdu(2846)Repository
Problem Description When you go shopping, you can search in repository for avali
POJ2676 2918 Sudoku 暴搜
#include #include #include #include using namespace std;int s[][2] = {{1,1},{1,4
There is a war (hdu 2435 最小割+枚舉)
There is a warTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/3
樹狀數組模擬3個元素的排序 Codeforces 12D Ball
Ball time limit per test 2 seconds memory limit per test 256 megabyt