摘要:
题目链接:https://codeforces.com/contest/1244/problem/D 题意:给你一个树,让你把树上的每个节点染成三种颜色,使得任意三个互相相邻的节点颜色都不一样(意思是如果两个节点相邻,那么与这两个节点相邻的节点的颜色得和这两个节点都不一样)。这里给出每个节点染成三种 阅读全文
posted @ 2019-10-16 22:27
hh13579
阅读(175)
评论(0)
推荐(0)
摘要:
#pragma GCC optimize(2) #include <bits/stdc++.h> #define ll long long using namespace std; const int N = 5e5+10; const int mod=20071027; const int sigma_size=26; int dp[N]; char str[N]; char s[105]; s 阅读全文
posted @ 2019-10-16 12:46
hh13579
阅读(141)
评论(0)
推荐(0)