2014-11-17から1日間の記事一覧
バケット法を使うという解法もあるけど実は使わなくても可能という問題。探索&再帰&枝刈り #include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; int n,m,d,k; bool used[100002]; int ch[1002][1002]; int z[100002][2]; vector<int> e[100002]; int ans = 0; int </int></int,int></bits/stdc++.h>…