# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
313928 | georgerapeanu | 카멜레온의 사랑 (JOI20_chameleon) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "chameleon.h"
#include <vector>
#include <cstdio>
#include <cassert>
using namespace std;
vector<int> graph[1005];
vector<int> groups[2];
bool viz[1005];
void dfs(int nod,int lvl){
viz[nod] = 1;
groups[lvl].push_back(nod);
for(auto it:graph[nod]){
if(viz[it]){
continue;;
}
dfs(it,lvl ^ 1);
}
}
void make_groups(int pas){
for(int i = 1;i <= pas;i++){
viz[i] = false;
}
groups[0].clear();
groups[1].clear();