摘要: 题目:http://poj.org/problem?id=3368题意:给定n个数,给出一段区间,问区间内相同数最多的有一个思路:首先把给的数进行处理,给n个数重新编号,相同的数编号相同,用结构体记录相同数在原数组中的左右位置,用一个辅助数组记录原数据对应的新编号,询问的时候去看给的区间对应到新编号里面的位置View Code 1 #include <stdio.h> 2 #include <string.h> 3 #include <iostream> 4 #include <math.h> 5 #define N 100010 6 #defi 阅读全文
posted @ 2012-07-31 11:41 AC_Girl 阅读(220) 评论(0) 推荐(0) 编辑