void DFS(vector<vector<int>>& nodes, vector<int>& set, vector<bool>& visited, int num, bool& isCycle) {
nodes도 set이나 visited처럼 참조로 받아 주세요.
1707번 - 이분 그래프
void DFS(vector<vector<int>>& nodes, vector<int>& set, vector<bool>& visited, int num, bool& isCycle) {
nodes도 set이나 visited처럼 참조로 받아 주세요.
댓글을 작성하려면 로그인해야 합니다.
mgs08041 2년 전
안녕하세요. DFS로 문제 풀고 있는데 6% 시간초과에서 넘어가지를 못하고 있습니다....
문제를 스스로 풀고, 문제집 답안을 참고해서 풀었는데 어디가 문제인지 모르겠습니다... 도움주시면 감사드리겠습니다 ㅠㅠㅠ