qsort #1 BOJ/11650 좌표 정렬하기 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include typedef struct { int x; int y; }point; int compare(const void *p1,const void *p2) { const point* a1, * a2; a1 = (point*)p1; a2 = (point*)p2; if (a1->x > a2->x) { return 1; } else if (a1->x == a2->x) { if (a1->y > a2->y) { return 1; } else { return -1; } } else { return -1; } } int main() { int x; scanf(.. 2024. 1. 27. 이전 1 다음