=== 풀이 === {{{ // // main.cpp // usa_selfish // // Created by 김 태진 on 12. 8. 14.. // Copyright (c) 2012년 __MyCompanyName__. All rights reserved. // #include #include #include using namespace std; typedef struct cow cow; struct cow{ int left; int right; }; int compare(const void* a,const void* b); int comp(cow a,cow b); int main() { int N,i,j,k; cow arr[50000],temp; cow array[10000]; scanf("%d",&N); for(i=0;iright - ((cow *)b)->right; } int comp(cow a,cow b) { //if(a.left == b.left)return a.right