摘要: 怎么感觉这次有点水啊。。3个水。。不过差点悲剧,数组开小了,依旧过了。。。人品吗。。。A乱搞。数组开小,做到最后想hack,意识到自己的数组开小了,没想到居然也过了。。。写的不好WA了次,18分钟。 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #define N 1001 5 int p[N]; 6 int main() 7 { 8 int i,n,k; 9 scanf("%d%d",&n,&k);10 for(i = 1;i < 阅读全文
posted @ 2012-08-18 21:52 Naix_x 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 这个帖子链接:http://topic.csdn.net/t/20041217/21/3655691_2.html虽然不是很明白,我现在也纠结是考研还是工作,到真正的该去选择的时候,我觉得一定会做出选择的。PS:05年的帖子确实好久了,不过看得出逛csdn和逛天涯猫扑贴吧的人确实不一样。。。 阅读全文
posted @ 2012-08-18 21:27 Naix_x 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目链接多重背包。先按排a[i]好序,然后倒叙多重背包。#include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>struct node{ int h,c,a;}bag[401];int cmp(const void *q,const void *b){ return (*(struct node *)q).a > (*(struct node *)b).a ? 1:-1;}int p[401][40001],h[401],c[401],a[401];i 阅读全文
posted @ 2012-08-18 14:25 Naix_x 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目链接无向图啊。。。 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 int o1[510401],o[510401],num; 5 struct node 6 { 7 int flag; 8 struct node *next[26]; 9 }; 10 struct node *build() 11 { 12 int i; 13 struct node *p; 14 p = (struct node *)malloc(sizeof(struct n... 阅读全文
posted @ 2012-08-18 14:21 Naix_x 阅读(177) 评论(0) 推荐(0) 编辑