F. Group Projects time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output There are n students in a class working on group projects. The students will divide into groups (some students may be in g…
题目链接: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…