Comments

hi...can explain wat is in the editorial for the mike and feet problem...i understood till finding l[],r[]... after tat can u make it a bit clear...

this code fails for case 5...can anyone fix the bug?? int count(int i)//method to count no of consecutive ones { int icnt = 0,maxsofar = 0; REP(j,m) { if(a[i][j] == 1) { if(j>0 && a[i][j-1] != 1) { maxsofar = icnt ; icnt = 1; } else icnt++; } } return max(maxsofar,icnt); } //in main REP(i,n) { int val = count(i); ma.PUB(val); } int maxi = INT_MIN; REP(i,k) { int r,c; cin>>r>>c;

    r -= 1 ,c -= 1 ;

    a[r][c] = a[r][c] ^ 1;
    int val1 = count(r);

    ma[r] = val1;
    maxi = INT_MIN;
    REP(i,ma.size())
    {
       if(ma[i] > maxi)
       {
         maxi = ma[i];
       }
    }

    cout<<maxi<<endl;
}
On PraveenDhinwa → Codeforces Round #251, 12 years ago
0

how to view the code of a person who s n my room?? is it posible to read the code wen the contest is goin>??

got the solution:)

On PraveenDhinwa → Codeforces Round #251, 12 years ago
0

in this round 251 div2...i submitted the problem Devu the dumb guy and got all pretests passed....nd got score of 680....but in few minutes i saw the status of my submitted problem as hacked....finally my score dropped to -1.....what it means...??how to prevent it>> ????

tanx bro...:)

for problem queue on bus stop the answer for 6th test case is given as 5...how is it be 5?? test case: (n=6 m=4) 1 3 2 3 4 1 IS IT NOT 4????????????????