题目链接:http://codeforces.com/problemset/problem/429/B 给你一个矩阵,一个人从(1, 1) ->(n, m),只能向下或者向右: 一个人从(n, 1) ->(1, m),只能向上或者向右.必须有一个相遇点, 相遇点的值不能被取到, 问两个人能得到的最大路径和是多少? dp[i][j]:表示从一个点出发的最大值:先预处理从(1,1) (1,m) (n,1) (n,m)四个点出发的4个dp最大值.然后枚举所有的点,但是这个点不能在边缘,考虑枚举点不够…
C. Writing Code Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/544/problem/C Description Programmers working on a large project have just received a task to write exactly m lines of code. There are n programmers working o…
题目:http://codeforces.com/problemset/problem/429/B 第一个人初始位置在(1,1),他必须走到(n,m)只能往下或者往右 第二个人初始位置在(n,1),他必须走到(1,m)只能往上或者往右 每个点都有个权值,要求两个人中间相遇一次且只有一次,相遇的那个点的权值不算,两个人的速度可以不一样,然后求出最大值是多少 思路:他的要求是相遇一次且只有一次,那么画几个图其实就只有两个情况了(这图是借了一位大佬的,[小声bb]) 既然知道了这个图分为了这四个区域,…
题目:https://codeforces.com/problemset/problem/711/C 题意:给你n,m,k,代表n个数的序列,有m种颜色可以涂,0代表未涂颜色,其他代表已经涂好了,连着一段是相同颜色的是一个连通块,求正好有k个连通块的最小花费 思路:首先每个位置有可能有m中颜色,而且要满足k个,我们我们可以推出所有情况 dp[n][m][k] n代表前n个数 m代表当前涂m色 k代表满足k个了 #include<cstdio> #include<cmath> #in…
Hard problem 题目链接: http://codeforces.com/contest/706/problem/C Description Vasiliy is fond of solving different tasks. Today he found one he wasn't able to solve himself, so he asks you to help. Vasiliy is given n strings consisting of lowercase Engl…
D. Tricky Function Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 codeforces.com/problemset/problem/429/D Description Iahub and Sorin are the best competitive programmers in their town. However, they can't both qualify to an important contest. The sele…
题目链接: http://codeforces.com/contest/429/problem/B B. Working out time limit per test2 secondsmemory limit per test256 megabytes 问题描述 Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym w…
C. Xor-tree Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/430/problem/C Description Iahub is very proud of his recent discovery, propagating trees. Right now, he invented a new tree, called xor-tree. After this new revolu…
B. Balls Game Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/430/problem/B Description Iahub is training for the IOI. What is a better way to train than playing a Zuma-like game? There are n balls put in a row. Each ball i…
A. Points and Segments (easy) Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/430/problem/A Description Iahub isn't well prepared on geometry problems, but he heard that this year there will be a lot of geometry problems on…