2017-12-23から1日間の記事一覧

ABC 036 D問題 塗り絵

木DPの問題でした。下のサイトが参考になりました(というより例題1がそのまま流用できた) DP on Trees Tutorial - Codeforces #include<iostream> #include<vector> using namespace std; typedef long long int ll; static const int MOD = 1e9 + 7; vector<int> adj[100000]; ll</int></vector></iostream>…