Codeforces Round #506 (Div. 3) E dfs+贪心 #include<bits/stdc++.h> using namespace std; typedef long long ll; ; int n,u,v; int ans; vector<int>M[maxn]; int dfs(int cur,int pre) { ; ;i<M[cur].size();i++) { int nex = M[cur][i]; if(pre == nex)con…
D. Concatenated Multiples You are given an array aa, consisting of nn positive integers. Let's call a concatenation of numbers xx and yy the number that is obtained by writing down numbers xx and yy one right after another without changing the order.…
Codeforces Round #431 (Div. 2) A. Odds and Ends time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Where do odds begin, and where do they end? Where does hope emerge, and will they ever break…