#includeusing namespace std; #define MAXN 10 int colors[MAXN];//record the counter of one color int colorsCounter; void find(int arr[],int len, int colorsNeed) { int bestStartIndex = 0; int bestLen = len; int lastStartIndex = 0; for ( int i=0; i 1) { colors[arr[j]]--; ++j; } if (i-j+1
分享标题:求珠子的长度最小区间
浏览路径:http://kswsj.com/article/gdsgso.html
Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号