1. #include <iostream> #include <vector> using namespace std; typedef long long ll; const int N = 1e5 + 5; vector<int> mp[N]; int cred[N], cblue[N], n; string color; ll ans; void dfs(int u,int fa){ cred[u] = cred[fa]; cblue[u] = cblue[fa]; if(color[u] == 'R'){ ...