Comments

Lets laugh together :)

It is there. j>=t (condition 3)

Thanks for replying! I am looping through each and every n*m cells assuming them as origin of the spruce (obviously if it exist). t denotes height of the a spruce having origin as i,j. so t=0 means assuming height as 0 initially. Explanation of conditions :

condition 1 : a[i+t][j+1+t]-a[i+t][j-t]==2*t+1 this checks if all cells ranging from j-t to j+1+t ( in total 2*t+1) at level t w.r.t. i,j are all * . because my array is prefix sum on every row.

condition 2 & 3 : remaining condition they just take care if my while loop is not cheking any cell which is not possible. as a[i+t][j+1+t] -> i+t can be max n and j+1+t can me atmost m.

Hope you understand.

I am getting wrong answer on 10th test case of B. can any body explain the error. https://codeforces.me/contest/1461/submission/100931109

0

we can define front and back of a string only if it is non empty. front and back are same for an empty string so solve case i==0 saparately .

I am really very thankful to u brother. i am happy to see that my logic was not totally wrong :) thank u once again.

it is 100000 'j' and all other 0. so u might have missed the cases in which 2 'j' are there in AP. it will be nC2 == n*(n-1)/2 . then u will get AC in it.

thanks brother

can anybody help me out with c. whats wrong with my code. https://codeforces.me/contest/1418/submission/92891613

bro, would u mind to check my short code. it's failing in test 55th of 2nd. https://codeforces.me/contest/1418/submission/92891613

here is my code that may help u. if u don't understand then sorry. https://codeforces.me/contest/1065/submission/91731954

Set does not contain duplicate elements. but we need to store it. pair<int,int> is used for this reason. Because index itself is stored with the beauty value, there is no chance for duplicate elements.(copied)

in 1140C can anybody tell what is the use making PAIR there. its giving wrong answer of 3rd testcase if I am not making a paired set.

havaliza. it is now 7 years of the tutorial. tomorrow never comes. :)

lol :)

On NALPCodeforces Round #159 (Div. 2), 6 years ago
0

hey senior ,do u still need :)