MBOARD - Editorial

NZEC means non-zero exit code. So try to check whether you return zero at the end of the execution.

No my question is what is the frequency that I store in the BIT used here .Is it all the time of the column or row which was last set to 0,1 ??

1 Like

Thanks very much!

1 Like

Well yes, there is another slight trick one needs in that problem.
Look at it this way: you have x <= 10^9 agreed, but you have only Q (<= 2*10^5) possible ‘x’ to worry about.
Just a hint :slight_smile: good luck.

@anton_lunyov is right on the spot in explaining things easily from his code. That is why the solutions to the Jan Long Contest are having a great readability.
Nevertheless, the explanation is nice here :slight_smile: Coding can be done too.

1 Like

@pragrame I am still unable to solve the problem ORDERSET using BIT, Can you explain how to solve it using BIT?

Finally an accept. Stupid bug !! Nice problem, nice editorial :slight_smile:

Thanks, I cant figure out why in java I am getting RTE non-zero exit code …

@pragrame >> you’re Naveen Sir’s student, right?

What do you mean when you write “fast input and cin”? It’s written in FAQ, that

The second most common cause of TLE is that your method of reading input and writing output is too slow. In Java, do not use a Scanner; use a BufferedReader instead. In C++, do not use cin/cout - use scanf and printf instead.

1 Like

A “ColSet i x” operation will require you to update values of all data[0][i]. Thats O(N) right there.