Do not spend all your time on training or studying - this way you will probably become very exhausted and unwilling to compete more. Whatever you do - have fun. Once you find programming is no fun anymore – drop it. Play soccer, find a girlfriend, study something not related to programming, just live a life - programming contests are only programming contests, and nothing more. Don't let them become your life - for your life is much more interesting and colorful. --Petr
\n
摘要:
有n个程序,这n个程序运作产生m行代码,但是每个程序产生的BUG总和不能超过b,给出每个程序产生的代码,每行会产生ai个BUG,问在总BUG不超过b的情况下,我们有几种选择方法思路:看懂了题意之后就是一个完全背包题了定义dp[ i ][ j ][ k ] 表示前 i 个程序员,已经写了 j 行代码,... 阅读全文
posted @ 2015-05-31 15:25
Jeremy Wu
阅读(333)评论(0)推荐(0)
摘要:
ProblemYou're about to play a simplified "battleship" game with your little brother. The board for this game is a rectangular grid withRrows andCcolum... 阅读全文
posted @ 2015-05-12 15:49
Jeremy Wu
阅读(296)评论(0)推荐(0)
摘要:
先上笔记内容吧:这次上课的内容有关构造函数析构函数运算符重载return * this 内容很细,大家好好回顾笔记再照应程序复习吧 :)#include using namespace std;class Integer {public: int i; int geti () cons... 阅读全文
posted @ 2015-04-28 21:33
Jeremy Wu
阅读(298)评论(0)推荐(0)
摘要:
这题的意思是给你 n 道菜,第 i 道菜需要 Ai 步才能完成每次你能对 m 道菜分别完成一步,请问最少需要几次?这题暴力写肯定是不行的,去年省赛的时候就是没写出来这题,今天再把思路理一理吧。首先我们需要明确的是1. n m ①此时我们不难发现这个现象,如果 sum (A[i]) 能被 m 整除... 阅读全文
posted @ 2015-04-24 20:43
Jeremy Wu
阅读(179)评论(0)推荐(0)
摘要:
考验理解能力的时候到了 T^TVery often, especially in programming contests, we treat a sequence of non-whitespace characters as a string. But sometimes, a string m... 阅读全文
posted @ 2015-04-21 14:21
Jeremy Wu
阅读(361)评论(0)推荐(0)
摘要:
ProblemYou are waiting in a long line to get a haircut at a trendy barber shop. The shop has B barbers on duty, and they are numbered 1 through B. It ... 阅读全文
posted @ 2015-04-18 15:18
Jeremy Wu
阅读(1006)评论(0)推荐(0)