meetsid20's blog

By meetsid20, history, 6 years ago, In English

Hello Codeforces,

We at IIIT-Delhi would like to invite you to ProCon 2018, the annual programming contest conducted as a part of our technical festival — Esya. The contest is being hosted on CodeChef. It will start at 21:00 IST on 16th August, 2018. There will be 6 problems of varying difficulty to be solved within a duration of 2 hours, with ACM-ICPC style scoring. The contest will be rated for everyone (CodeChef Division 1 and Division 2). Top participants will be rewarded CodeChef Laddus. Moreover, there will be Cash Prizes for the Top 3 Indian contestants.

Happy Coding!

UPDATE

The Contest is now over.

The problems were set by the following - A, B : lavina_jain C : arpn D, E, F : meetsid20

Thanks to polingy, cerberus97 and aayush9 for help in testing.

The final scoreboard is available here.

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

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve PROC18C ?

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

    There can be at most 9*18 = 162 distinct sums of digits. If we can somehow calculate the count of numbers between L and R with these sums, we can simply use an O(n^2) brute force approach to arrive at the final answer. The first part can be solved using digit DP for each of the possible sum values i.e. 1 to 162.