原创 hdu1160最長上升子序列

#include <iostream> #include <cstring> #include <cmath> #include <algorithm> #include <cstdio> #include <stack> using

原创 UVALive 6853-Concert Tour(dp)

題意:有s個月,c個城市,給出第幾個月在第幾個城市舉辦演唱會的收益,並且給出從一個城市到另一個城市的成本,求最大的收益。到達第一個城市不需要成本。用dp[i][j]表示第j個月在第i個城市舉辦演唱會可以得到的最大收益。抄一下別人的題意,這

原创 poj1011dfs+剪枝

SticksTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 151961 Accepted: 36190DescriptionGeorge took sticks of

原创 poj3501 Escape from Enemy Territory 二分+預處理+bfs

Escape from Enemy TerritoryTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 2741 Accepted: 752DescriptionA sma

原创 hdu4004 二分

題意:給出n個石頭,對岸距離L,可以跳躍次數m,問最短跳躍距離是多少,可以踩着石頭過河。這題目先排一下序,然後我們把起點和對岸終點同樣看作一個石頭,那麼我們只需要對跳躍距離二分就可以了,這裏需要點思考,什麼時候跳躍次數最少?就是我們每次可

原创 hdu 1024 dp 最長連續子序列和加強版

Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves

原创 (二分)scau校賽題目+poj2456

Treasure Description Li likes playing games. One of games names Finding Treasure. In the game, you have given a map (

原创 hdu 1069 最長上升子序列和

A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of

原创 poj1166無腦暴力

The ClocksTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 15357Accepted: 6230Description|-------| |-------|

原创 51nod---1432 獨木舟貪心

1432 獨木舟 n個人,已知每個人體重。獨木舟承重固定,每隻獨木舟最多坐兩個人,可以坐一個人或者兩個人。顯然要求總重量不超過獨木舟承重,假設每個人體

原创 hdu1144 完全揹包

Piggy-BankTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2940 

原创 poj1243 猜數最大 dp

One PersonTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 2122 Accepted: 1426DescriptionIn the game show "The

原创 zoj4011 動態規劃

https://vjudge.net/problem/ZOJ-4011給定一個n,m,要求一個m爲長度,並且從第一項起有b[i+1]%b[i]==0的數列,求出組合個數(1<=b[i]<=n)利用dp來做,數組dp[i][j]表示在長度爲

原创 hdu1087 最大上升子序列模板

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good

原创 UESTC 數據結構

老頭馬桶槍! Time Limit: 1000 MS     Memory Limit: 64 MB 衆所周知,集訓隊的題目是非常困難的。因此,隊員們在掛機AK之後,常常會玩一些