Last active
May 3, 2024 09:45
-
-
Save cgiosy/a8a6ebe98d6f327d2f382378bd2a405f to your computer and use it in GitHub Desktop.
각도로 정렬하기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto m=partition(A.begin(), A.end(), [&](pii p) { return p<pii{}; }); | |
sort(A.begin(), m, [&](pii a, pii b) { return cross(a, b)<0; }); | |
sort(m, A.end(), [&](pii a, pii b) { return cross(a, b)<0; }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto m=partition(A.begin(), A.end(), [&](pii p) { return p<o; }); | |
sort(A.begin(), m, [&](pii a, pii b) { return ccw(o, a, b)<0; }); | |
sort(m, A.end(), [&](pii a, pii b) { return ccw(o, a, b)<0; }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment