In this problem you will meet the simplified model of game Pudding Monsters. An important process in developing any game is creating levels. A game field in Pudding Monsters is an n × n rectangular grid, n of its cells contain monsters and some other…
题目链接:http://codeforces.com/problemset/problem/711/C O(n^4)的复杂度,以为会超时的 思路:dp[i][j][k]表示第i棵数用颜色k涂完后beauty为j #include<bits/stdc++.h> using namespace std; typedef long long ll; const ll inf=1e15; int c[105]; int p[105][105]; ll dp[105][105][105]; int ma…