摘要: 链接 :http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2109 1 #include 2 int a[100000],temp; 3 int main() 4 { 5 int sort(int i,int j,int *a); 6 int i,j,n; 7 scanf("%d",&n); 8 for(i = 0;i a[i]) {mark = 0;temp = a[i];a[i] = a[j];a[j] = temp;} 31 ... 阅读全文
posted @ 2013-06-29 13:13 好小孩 阅读(302) 评论(0) 推荐(0)
摘要: 链接 :http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2127&cid=1184AC code 130ms 和优先队列还是有一定差距的 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct N 9 {10 int data;11 N *l,*r;12 };13 14 struct N *creat()15 {16 N *p = (N *)malloc(sizeof(N));17 p->l =... 阅读全文
posted @ 2013-06-29 01:06 好小孩 阅读(195) 评论(0) 推荐(0)