Блог пользователя ikatanic

Автор ikatanic, 11 лет назад, По-английски

Join us on Saturday, November 8th, 2014 for the second round of COCI!

Click here to see when the coding begins in your timezone!

  • Проголосовать: нравится
  • +49
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

why it appears " Comments (3)" ,but there is nothing in comment(of course not count this), is this a bug or comments are deleted?

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

Could you upload the contest to gym after it's over?

I really enjoy your contests, but the time is usually unsuitable for me :(

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

thank for informing...i joined it

»
11 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится +4 Проголосовать: не нравится

Oof. Got everything, but with over 9000 bugs, most likely. I had to rewrite some codes from scratch because I didn't read some clarifications until late in the contest...

For the hardest problem, I used divide and conquer with BIT in .

Also, (now correct) codes: MOBITEL UTRKA STUDENTSKO BOB SUMA NORMA.

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

lol,I solve problem D,E but I can't solve C still,can someone help ?

»
11 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

O(N(logN)2) for hardest problem deserves better then %50, isnt it?

EDIT: it seems my implementation was bad, since there is full score with same solution.

»
11 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Is it possible to solve D problem with DP? I got 24 points using DP. I knew it was wrong but I tried to get some points.

This is what I tried:

t[i][j] -> Value at row i and column j.

dp[i][j] -> Amount of rectangles ending at row i and column j.

row[i][j] -> Amount of the last consecutive equal values ending at column j in row i.

col[i][j] -> Amount of the last consecutive equal values ending at row i in column j.

Then:

dp[i][j] = 1 + dp[i - 1][j] + dp[i][j - 1] - dp[i - 1][j - 1] + (t[i][j] =  = t[i][j - 1]?row[i][j - 1]: 0) + (t[i][j] =  = t[i - 1][j]?col[i - 1][j]: 0 + (t[i][j] =  = t[i - 1][j]&&t[i][j] =  = t[i][j - 1]&&t[i][j] =  = t[i - 1][j - 1]?X: 0))

I can't get the value X in this dp.

Is this a correct approach to this problem or am I completely wrong? If somebody solved this problem using DP I will thank if he/she explains the approach. Thanks in advance.