Comments

Probably author mispushed Save instead of Save Draft.

On kuniavskiCodeforces Round #114, 7 weeks ago
+27

I’m too. I’m waiting for RAD or Gerald.

0

You can shuffle yourself using Random, with seed got from time.

+1

More easy is to shuffle data before sorting. But i don’t think simeting like this will hapen often on codeforecs. It’s not very sporting behavior.

0

Any quick sort impelementation with determinate algotrithm of choosing element for partition can be failed to O(N^2) time. Java implementation too.

On goryinyichCodeforces Round #102, 4 months ago
-10
When iterations where answer exists work immediately, and time-limit cut-off need only for last iteration where no answer exist, there is no need for any optimization.
On nataliaCodeforces Round #100, 4 months ago
+21
In my solution you need only values of and K! for N ≤ 106 and K  ≤ 5000. Both can be calculated with no problem. C(N, K) can be also calced becouse we need them for fixed N and small K. So we can calc them as product of O(K) numbers, with time of K2.

No, this error was also on contest, which this problem from.

On wituaCodeforces Beta Round #91, 7 months ago
-5
No, such problems are often apears on TopCoder too.
On sdryapkoIOI 2011, 11 months ago
0
Where did you get information from?
In this problem letters typed independently.
On kuniavskiCodeforces Beta Round #73, 11 months ago
0
Fixed.
Yes, it wil be translated tommorow.
On kuniavskiCodeforces Beta Round #73, 11 months ago
0
Yes.
+7
It's not N2logn, but N2. And it have very small constant, so it passed.

On stgatilovCodeforces Beta Round #47, 17 months ago
0
Contest haven't start yet.
See this post about raiting and this about colors.
0
http://codeforces.ru/blog/entry/79

See this post for detales.
On MikeMirzayanovCodeforces Contests, 20 months ago
0
If you lock your code you can't resabmit it. In any other situation you can do it, but the score on this problem wiil be less, becose of time between submitions and 50-points penalty.
it is both for div 2 and div 1.
On HartaNeed help for this problem, 23 months ago
0
Well, I don't know how to solve the problem. The only idea that i have (ans it's enough) to transponate matrix a (solve for matrix simetric to it). There is no test where both sizes are 3*k+2
On HartaNeed help for this problem, 23 months ago
0
Maybe you didn't understand what is sum?

sum for i line is:
sum[0]=ans[i][0]+ans[i][1]
sum[1]=ans[i][0]+ans[i][1]+ans[i][2]
sum[2]=ans[i][2]+ans[i][2]+ans[i][3]
...
sum[m-2]=ans[i][m-3]+ans[i][m-2]+ans[i][m-1]
sum[m-1]=ans[i][m-2]+ans[i][m-1]

where ans[i][j] is 1 if there is mine in (i,j) ans 0 if there is no mine ans m is sizeof of line.
On HartaNeed help for this problem, 23 months ago
+1
a[][] is what you had write.

sum fror third line are {2(4-2),2(6-4),1(6-5),0(3-3),0(1-1)}. Using that we can understand that anser for third line is {1,1,0,0,0}. As for me 1-0 is mor comfortable than X-. so I will use them. Values in brekets are explanations how numbers had been recived.
Then Sum for second line is {1(3-2),2(4-2),2(3-1),1(1-0),0(0-0)} and answer is {0,1,1,0,0}

Sum for First line is {1(2-1),2(4-2),3(5-2),2(3-1),1(1-0)} ans answer is {0,1,1,1,0}

So answer for all test is

01110
01100
11000.

On HartaNeed help for this problem, 23 months ago
+1
Oh, there is an error. We should not count prexix sums. We shoud count sums of connected bloks of 3 cells.
On HartaNeed help for this problem, 23 months ago
+1
I had 100 on this problem.
My solution is iterative. Firstly we should know how to solve this problem when m=1. It's not difficult. Mines' location uniquely determined by the presence of mines in the first cell.

Second we should understand how to calc sum of third line prefixes. sum[i]=a[i][1]-a[i][0]. Indexes are 0-based. a is array with mines number and sum is number of mines neer ith position in third line. Now we can find mines position in third line. Using this idea we can find positions of mines in line with 0-based 3*k+2 lines for all k. If the last of these lines is last or there is only one line after it we can find location in other lines using this idea.

If there are too lines after last line we can use it for columns instead of rows. And there is no tests when algorithm don't work both on rows and columns.

Sorry for my bad english.
In Wiindows version of g++(MinGW) you should use %I64d not %lld for reading and writing long longs.
On daftcoderSite improvements offers, 2 years ago
0
Про уведомление вообще впервые слышу и никогда не замечал. по поводу почты я, например, всегда отключаю сразу все уведомления( может кроме как соревнованиях). Хотя в принципе нужно просто быть внимательнее.
On daftcoderSite improvements offers, 2 years ago
0
А еще было бы удобно если бы показывалось что у тебя есть сообщения (окошко выплывало, просто циферка стояла рядом или что-то еще такое). А то можно очень долго ждать ответа на сообщение.
Of course firstly i mae them smaller. the absolute value are not necessary. So you can say that malist value is 1, next is 2 and etc. So values should be not more 5x105.
I have sorted by first parametr and then make rmq where indexes were second parametr and value is third. Becouse of stecific rmq request you can use Fenvik tree insted of interval tree and I have done it.

But i saw tthat some submited solutions are more easy.
your problems was with erase 0 or something like that.