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

Автор VastoLorde95, история, 9 лет назад, По-английски

Seems like HackerRank is down. Anybody from Hackerrank knows what will happen to the live contests? I mean, should we wait for 5-10 mins for the site to come back or what?

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

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

Yep, down for me too. Will Codeagon be extended or postponed or something?

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

It is working now for me

I didn't see comment above...

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

Delays in the verdict caused me severe issues, I wasted a lot of time due to that and also in Counting Princess Presents,

if the input graph is surely a Tree changes the problem drastically! Did I miss some line or was it understood or something? If not that was bad!

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

In the question "Happiness of a Kingdom", in case of no special edges,the empty subset was included n (ie number of nodes) times in the answer.Any explanation for this?

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

How to solve C ?

I tried a DP approach where my state is (idx , rem (remaining shops to visit)) . My pos array contains the indices of the shops which contain the item.

int bought = m - rem;
for(int i = idx + 1; i + rem <= pos.size(); i++) {
    long cost = 1L * (pos.get(i) - pos.get(idx)) * (bought == 0 ? 1 : 1L * bought * k);
    min = Math.min(min , cost + findOpt(i, rem - 1))
}

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

Was there some issue in the site in the middle of the contest as well (Somewhere around 2.5 hours into the contest)? The pages kept on loading for eternity. I tried on Firefox,Chrome, cleared the cache but only in the last few minutes the site functioned normally.