#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
網(wǎng)頁題目:求珠子的長度最小區(qū)間
本文地址:http://weahome.cn/article/gdsgso.html