偶尔写写ACM水题还是挺好玩的。(好吧其实是老婆求助我才看滴) 题目链接:http://acm.hdu.edu.cn/showproblem.

题目: http://acm.hdu.edu.cn/showproblem.php?pid=3336 水题一道,主要是测试数据很水 不解释,贴代码: #include <iostream> #include <cstdio> #include <vector> #include <cstring> using namespace std; char str[200005]; vector<long>glo_Pos; int main() { int t; long output,i,n,j; scanf("%d",&t); while(t --) { output = 0; glo_Pos.clear(); scanf("%ld %s", &n, str); for(i = 0; i < n; i ++) { if(str[i] ==