D. Don't fear, DravDe is kind time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A motorcade of n trucks, driving from city «Z» to city «З», has approached a tunnel, known as Tunnel of Horror…
题目传送门:http://codeforces.com/problemset/problem/28/D 题意:给你$N$个物品,每个物品有其价格$P_i$,之前必须要买的物品价格和$L_i$,之后必须要买的物品价格和$R_i$和价值$W_i$.试给出一种物品的选择方案,使得满足所有选择的物品的条件且选择物品的价值和最大(物品的选择顺序必须要与原来的顺序相同).$N \leq 10^5 , P , L , R \leq 10^5 , W \leq 10^4$ 像背包DP,所以就是背包DP(雾 我们…
补一篇以前的扩展欧几里得的题,发现以前写错了竟然也过了,可能数据水??? 这个题还是很有意思的,和队友吵了两天,一边吵一边发现问题??? L. Knights without Fear and Reproach http://codeforces.com/gym/100812/problem/L time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output Th…
Last summer Peter was at his granny's in the country, when a wolf attacked sheep in the nearby forest. Now he fears to walk through the forest, to walk round the forest, even to get out of the house. He explains this not by the fear of the wolf, but…
G - Animals Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 35D Description input input.txt output output.txt Once upon a time DravDe, an outstanding person famous for his professional ac…
Codeforces 15E Triangles Last summer Peter was at his granny's in the country, when a wolf attacked sheep in the nearby forest. Now he fears to walk through the forest, to walk round the forest, even to get out of the house. He explains this not by t…