当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2668:Daydream

题目描述
Welcome to 2009 HDU Girl’s Cup, bless you will happy in it.
Every girl are beautiful if you use you heart to feel. Every corner in the world will colourful and energetic by several girls standing. If you boy, a normal bay, I believe that you will try to watch when a beautiful girl passing you and you will nervous if a girl watching you just when you are watching her.

Now give you a surprise that may be never happy in the real time. Millions of PLMM stand in a line and facing you(^_^). They are dress colourful clothings. You should to find out a maximal subline PLMM that their clothing color are all different.
输入解释
The input contains multiple test cases.
Each case first give a integer n expressing many many girls stand in line.(n<=10000000)
Next line a string including n character, each character standing one girls’s clothing color.
输出解释
Output one integer the numbers of maximal subline PLMM that their clothing color are all different and the line's begin and end (based from 0). If their are more answer, print the begin smallest.
输入样例
3
abc
5
aaaba
8
hdugirls
输出样例
3 0 2
2 2 3
8 0 7
来自杭电HDUOJ的附加信息
Author yifenfei
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2668

最后修改于 2020-10-25T22:55:42+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)