kostya_by's blog

By kostya_by, 9 years ago, translation, In English

Hello CodeForces Community,

I would like to co-ordially invite you all to take part in the CodeChef April Cook-Off. The problems were set by me and tested by shef_2318 (Pavel Sheftelevich). I hope you will enjoy solving them. Please give me your feedback on the problem set in the comments below after the contest. Please find the rest of the details about the contest below.

Time: 17th April 2016 (2130 hrs) to 18th April 2016 (0000 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Details: https://www.codechef.com/COOK69

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

  • Problem Setter: kostya_by (Kanstantsin Sokal)
  • Problem Tester & Russian Translator: shef_2318 (Pavel Sheftelevich)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Contest Admin & Editorialist: PraveenDhinwa (Praveen Dhinwa)
  • Vietnamese Translator: VNOI Team

Prizes:

  • Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: https://www.codechef.com/laddu. (For those who have not yet got their previous winning, please send an email to [email protected])

Good Luck! Hope to see you participating!

UPD

The contest starts in 30 minutes!

Good luck everyone!

  • Vote: I like it
  • +38
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Maybe this is a dumb question, but I see that most of the AC solutions for BITTWIST sort the adjacency lists of each vertex. Is there some reason for this? Shouldn't they already be added in sorted order?

»
9 years ago, # |
  Vote: I like it +5 Vote: I do not like it

How to solve the last problem?

BTW, problem D is very similar to this problem

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    Seems like O(K) per query with memoization amortizes the complexity of the solution to O(N root N). Can someone prove this?