LC1001: Grid Illuminationm 작성일 2019-03-20 https://leetcode.com/problems/grid-illumination/ Hard, 40분 Hash 쓰는 문제, 아이디어 자체는 어렵지 않다. 2차원을 1차원으로 변환하는게 필요한 문제 구현을 잘 생각하지 않으면, 구현이 길어진다. 구현이 길어지면 자연스럽게 실수한다. ㅠㅠ PairHash라는 구현방식은 꽤 좋은것 같다. 그치만 아래의 hash 계산식은 Input Data가 허술해서 맞은듯.. 1234struct pairHash { size_t operator()(const pair<int, int> &x) const { return x.first ^ x.second; } }; unordered_set<pair<int, int>, pairHash> ls;