2012年8月1日

RMQ

摘要: 1、朴素(即搜索),O(n)-O(qn) online。2、线段树,O(n)-O(qlogn) online。3、ST(实质是动态规划),O(nlogn)-O(1) online。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<time.h&g 阅读全文

posted @ 2012-08-01 16:30 more think, more gains 阅读(190) 评论(0) 推荐(0) 编辑

导航