摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, ... 阅读全文
posted @ 2015-01-09 15:54 雄哼哼 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;void my_swap(vector &a,int i,int j){ int temp=a[i]; a[i]=a[j]; a[j]=temp;}vector v;int n;void printPrem... 阅读全文
posted @ 2015-01-09 13:29 雄哼哼 阅读(509) 评论(0) 推荐(0) 编辑