알고스팟 문제와 동일해서 쉽게 풀었다.


달라진 점이라면 시작점이 0이 아니라는것과 test case 가 여러개라는것


struct node {
int x, y, w;
node (int x, int y, int w): x(x), y(y), w(w) {}
bool operator < (node other) const {
return w > other.w;
}
};

이 부분만 잘 기억해야겠다.


+ Recent posts