
Code Jam
XMzhou
当你想要放弃的时候问问自己为什么坚持到了现在
展开
-
Code Jam 2008 Round1A Problem A. Minimum Scalar Product —— 贪心
ProblemYou are given two vectors v1=(x1,x2,...,xn) and v2=(y1,y2,...,yn). The scalar product of these vectors is a single number, calculated as x1y1+x2y2+...+xnyn.Suppose you are allowed to perm原创 2013-10-12 01:34:22 · 872 阅读 · 0 评论 -
Code Jam 2009 Round2 Problem A. Crazy Rows —— 贪心
ProblemYou are given an N x N matrix with 0 and 1 values. You can swap any two adjacent rows of the matrix.Your goal is to have all the 1 values in the matrix below or on the main diagonal. That i原创 2013-10-12 01:58:29 · 1033 阅读 · 0 评论 -
Code Jam 2009 Round1C Problem C. Bribe the Prisoners —— 区间DP
ProblemIn a kingdom there are prison cells (numbered 1 to P) built to form a straight line segment. Cells number i and i+1 are adjacent, and prisoners in adjacent cells are called "neighbours." A原创 2013-10-12 17:15:03 · 1029 阅读 · 0 评论 -
Code Jam 2008 APAC local onsites Problem C. Millionaire —— 概率DP
ProblemYou have been invited to the popular TV show "Would you like to be a millionaire?". Of course you would!The rules of the show are simple:Before the game starts, the host spins a wheel o原创 2013-10-12 19:32:50 · 2221 阅读 · 1 评论