摘要: High school student Vasya got a string of length n as a birthday present. This string consists of letters 'a' and 'b' only. Vasya denotesbeauty of the 阅读全文
posted @ 2017-06-01 19:42 Aragaki 阅读(204) 评论(0) 推荐(0) 编辑
摘要: int L, R = 1, ans = 0; for(L = 1; L <= n; L = R + 1) { for(R = L; R + 1 <= n && B[L] == B[R + 1]; R++); ans = max(ans, R - L + 1); } 阅读全文
posted @ 2017-06-01 19:11 Aragaki 阅读(161) 评论(0) 推荐(0) 编辑