Codeforces Round #322 (Div. 2)】的更多相关文章

D. Three Logos Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/D Description Three companies decided to order a billboard with pictures of their logos. A billboard is a big square board. A logo of each company is…
C. Developing Skills Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/C Description Petya loves computer games. Finally a game that he's been waiting for so long came out! The main character of this game has n dif…
B. Luxurious Houses Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/B Description The capital of Berland has n multifloor buildings. The architect who built up the capital was very creative, so all the houses wer…
A. Vasya the Hipster Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/A Description One day Vasya the Hipster decided to count how many socks he had. It turned out that he had a red socks and b blue socks. Accordi…
It's election time in Berland. The favorites are of course parties of zublicanes and mumocrates. The election campaigns of both parties include numerous demonstrations on n main squares of the capital of Berland. Each of the n squares certainly can h…
E. Kojiro and Furrari 题意说的是 在一条直线上 有n个加油站, 每加一单位体积的汽油 可以走1km 然后每个加油站只有一种类型的汽油,汽油的种类有3种 求从起点出发到达终点要求使用最少的 1 号汽油的前提下使用最少的二号汽油, 我们可以这样考虑 当前在第i个加油站的时候         i个加油站 有3种情况 第一种 他是只有 1 号汽油 那么他必须携带 尽量少的 1号汽油到达离他最近的2号汽油点或者3号汽油点 更新这个点到达终点的代价 取最小值,因为他必须通过那个点到达其…
Zublicanes and Mumocrates Problem's Link Mean: 给定一个无向图,需要把这个图分成两部分,使得两部分中边数为1的结点数量相等,最少需要去掉多少条边. analyse: 树形dp. dp[cur][i][j]:当cur为i集合的时候 有j个和i同集合的方案 状态转移方程为: dp[cur][i][j+k] = min{dp[to][i^1][j=(叶子个数-d)]+dp[cur][i][k]+1,dp[to][i][j]+dp[cur][i][k]} c…
水 A - Vasya the Hipster /************************************************ * Author :Running_Time * Created Time :2015/9/28 星期一 16:58:13 * File Name :A.cpp ************************************************/ #include <cstdio> #include <algorithm>…
                                                  D. Three Logos Three companies decided to order a billboard with pictures of their logos. A billboard is a big square board. A logo of each company is a rectangle of a non-zero area. Advertisers will…
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate it n = int(raw_input()) s = "" a = ["I hate that ","I love that ", "I hate it","I love it"] for i in ran…