Guessing Game 题目连接: http://codeforces.com/gym/100015/attachments Description Jaehyun has two lists of integers, namely a1,...,aN and b1,...,bM.Je!rey wants to know what these numbers are, but Jaehyun won't tell him the numbers directly. So, Je!rey as…
题面 Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The cows are standing in the same order as they are numbered, and…
---题面--- 题解: 差分约束学得实在是太烂了,,,,QAQ 这里先记下: a - b >= x ---> a >= b + x ----> b ---> a = x(b连a,边权为x), ----> 找最长路, --->f[a][b]对应a - b的最小值, a - b <=x ---->后面的都反过来就好了 关于这道题: 首先我们可以发现它实际上就是告诉了我们一堆这样的关系: a > b, a <…
Candies Time Limit: 1500MS Memory Limit: 131072K Total Submissions: 39666 Accepted: 11168 题目链接:http://poj.org/problem?id=3159 Description: During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought…