摘要:
第二个线段树,用malloc申请果断超内存,自己写了个销毁树的函数果断超时。最后还是默默地用数组实现了。2174ms 慢的可怕…… 1 #include <stdio.h> 2 3 typedef struct{ 4 int left,right,max; 5 int lChild,rChild; 6 }SegTree; 7 SegTree list[800000]; 8 9 int max(int a, int b){10 return a > b? a:b;11 }12 void createSegTree(int root, int left, int right){1 阅读全文
posted @ 2011-04-25 22:40
死线之蓝
阅读(375)
评论(0)
推荐(0)
浙公网安备 33010602011771号