摘要: #include <stdio.h>#include <stdlib.h>struct node{ int c; int d;}nodes[100010];int cmp(const void * a,const void * b){ return (*(node *)a).d-(*(node *)b).d;}int main(){ int t,n,i,k=1; __int64 max,sum; scanf("%d",&t); while(t--) { max=0; sum=0; scanf("%d",&n); f 阅读全文
posted @ 2012-04-27 21:13 shijiwomen 阅读(176) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <malloc.h>int n,m,c;struct node{ int data; struct node * next;};void InitList(node * H){ H=(node *)malloc(sizeof(node)); H->next=NULL;}void CreateFromHead(node * H){ node *s; node *r; r=H; for(int i=1;i<=n;i++) { s=(node *)malloc(sizeof(node)); s->data 阅读全文
posted @ 2012-04-27 20:40 shijiwomen 阅读(259) 评论(0) 推荐(0) 编辑