graph1 C++ 997. Find the Town Judge(Leet Code) Leet Code_997. Find the Town Judge graph https://leetcode.com/problems/find-the-town-judge/ 문제 해석 이 문제를 풀기위해 이해해야 할 내용은 다음과 같습니다. 목표 마을 판사 찾기 방법 1. 판사는 아무도 믿지 않는다. 2. 모든 사람들이 믿어야 한다. 결과 마을 판사 찾기 통과한 코드 class Solution { public: int findJudge(int N, vector& trust) { map s; set se; for (int i = 0; i < trust.size(); i++) { s[trust[i][1]]++; se.insert(trust[i][0]); } for (int i = 1; i 2020. 6. 29. 이전 1 다음