목록게리맨더링 (1)
Deep Learning study
백준 17471문제
#include using namespace std; int N, pop[12],visit[12],divi[12],ANS = 1e9; vector G; void dfs(int cur, int division){ visit[cur] = 1; for(int next : G[cur]) if(!visit[next] && divi[next] == division) dfs(next, division); } void update(){ int div0 = -1, div1 = -1; for(int i=0 ;i pop[i]; for(int i=0; i> k; for(;k>0;k--){ int p; cin >> p; G[i].push_back(p-1); } } div(0); cout
백준 문제 코드
2019. 12. 7. 00:15