LeeBlog

导航

2011年5月27日 #

HDU 2689 POJ 2299 树状数组 + 离散化

摘要: 以前都是直接树状数组裸奔,昨天一个题数据量好大,过不了,没办法只能学离散化,今天A了第一个离散化的题#include<stdio.h>#include<string.h>#include<stdlib.h>#define Max 500005long long s,a[Max];int n,max;struct e{ int num,f;}N[Max];int cmp( const void *a,const void *b ){ return ( ( e * )a ) -> num - ( ( e * )b ) -> num;}inline i 阅读全文

posted @ 2011-05-27 10:03 LeeBlog 阅读(170) 评论(0) 推荐(0) 编辑