Why is the test case I'm failing not visible?


My previous submissions earned me partial marks. But after changing the code, when I’m submitting I get wrong answer. But I can’t see which test case I’m failing.

Here is my code btw. Please point out my mistake

    int Solution::seats(string A) {
    int stlen = A.length();
    vector <int> seatedPos;
    for (int i=0; i<stlen; i++) {
        if (A[i]=='x')
            seatedPos.push_back (i);
    if (seatedPos.empty())
        return 0;
    int mPos =  seatedPos[seatedPos.size()/2];
    int j=mPos-1, jump=0;
    for (int i=mPos-1; i>=0; i--) {
        if (A[i]=='x') {
            jump+= abs(i-j);
    for (int i=mPos+1; i<stlen; i++) {
        if (A[i]=='x') {
            jump+= abs(j-i);
    return jump%10000003;   


Use long long instead of int it will pass


Thank you! Can’t believe I spent more than an hour on this!


Nope. For me the submission does not pass, not even with long long. What is even weirder is that if I use size_t instead of long long the initial tests will fail ??!


use modulo arithmetric in the if cases too instead of just applying mod at the end…
#define mod 100000003
jump = (jump%mod + abs(j-i)%mod)%mod;