随笔分类 -  CF

摘要:这道题目昨晚比赛没做出来,昨晚隐约觉得就是个动态规划,但是没想到怎么DP,今天想了一下,突然有个点子,即局部最优子结构为 1-j,j#include #include #include #define N 100000#define INF -900000using namespace std;int dp[105][N=N*2) continue; if (dp[i][j]==INF) continue; dp[i+1][j+temp]=max(dp[i+1][j+temp],dp[i][j]+a[i+1]); ... 阅读全文
posted @ 2013-11-25 21:59 KRisen 阅读(696) 评论(0) 推荐(0)
摘要:校队选拔神马的事情就不说了,哥们反正是要崛起的人了!感谢何骐的提醒。校队选拔的时候又被二分给坑了,所以还想做几道二分搜索的题目来练练手。C -Three Base StationsTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 51CDescriptionThe New Vasjuki village is stretched along the motorway and that's why every house on it i 阅读全文
posted @ 2013-09-06 12:30 KRisen 阅读(343) 评论(0) 推荐(0)
摘要:A -PermutationsTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionHappy PMP is freshman and he is learning about algorithmic problems. He enjoys playing algorithmic games a lot.One of the seniors gave Happy PMP a nice game. He is given two permutations of n 阅读全文
posted @ 2013-07-17 13:47 KRisen 阅读(548) 评论(0) 推荐(0)
摘要:Mishap in ClubPolycarpus just has been out of luck lately! As soon as he found a job in the "Binary Cat" cafe, the club got burgled. All ice-cream was stolen.On the burglary night Polycarpus kept a careful record of all club visitors. Each time a visitor entered t... 阅读全文
posted @ 2013-01-24 19:00 KRisen 阅读(230) 评论(0) 推荐(0)