mahmoud-a
9/9/2017 - 9:07 AM

## https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1592

#include <bits/stdc++.h>

#define ll long long
#define sz(v) ((int) ((v).size()))
#define clr(v, d) memset(v, d, sizeof(v))
#define lp(i, n) for(int i = 0; i < (int)(n); ++i)
#define rep(i, v) for(int i = 0; i < sz(v); ++i)

using namespace std;

const int MAX = 10;
const int OO = 1e9;

int n, l;
string s;
int cache[5000];

int getBit(int num, int indx) {
return ((num>>indx) & 1) == 1;
}

int setBit1(int num, int indx) {
return num | (1<<indx);
}

int setBit0(int num, int indx) {
return num & ~(1<<indx);
}

if(ret != -1)
return ret;
ret = 0;
lp(i, 12-2) {
//cout << i << " " << mask << " " << tmpmask << endl;
ret = max(ret, 1 + PebbleSolitaire(tmpmask));
}

ret = max(ret, 1 + PebbleSolitaire(tmpmask));
}
}

return ret;
}

int main() {
cin>>n;
lp(i, n) {
clr(cache, -1);
cin>>s;
l = s.length();
int cnt = 0;
for(int j = 0 ; j < l; j++) {
if(s[j] == 'o') {
cnt++;
} else {
}
}
//cout << cnt << endl;
cout << cnt - PebbleSolitaire(mask) << endl;
}
return 0;
}