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

Автор CodeChef_admin, история, 3 года назад, По-английски

We invite you to participate in CodeChef’s Starters 91, this Wednesday, 24th May, rated till 6-stars Coders (ie. for users with rating < 2500).

Time: 8:00 PM — 10:00 PM IST

Note that the duration is 2 hours. Read about the recent CodeChef changes here.

Joining us on the problem setting panel are:

Note: Some problems have subtasks.

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest.

The video editorials of the problems will be available for all users for 1 day as soon as the contest ends, after which they will be available only to Pro users.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here.

Hope to see you participating. Good Luck!

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

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

Hoping this time, correct input test cases are there :)

All the best, everyone!

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

Note: Some problems have subtasks.

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

Why the answer for 2nd problem (Odd GCD Permutation) for n = 1 is No. Isn't it should be yes coz for odd indices, gcd is 1 and for even indices, it will be 0. Hence gcd for odd indices is greater than the even one. Then why no?

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

In Limited Shopping, why is this submission fast enough?
I coded $$$O(n*n*k)$$$ brute force at the last minute to fetch 30 points and was surprised to see 100 points on it.

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

Loved the question -XOR & sum

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

    How did you solve it?

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

      Start with the simple observation that $$$a + b = a \oplus b \iff a \& b = 0$$$, ie $$$a$$$ and $$$b$$$ share no 'on' bits.

      The observations from each subtask:

      Subtask 2
      Subtask 3

      Putting these together, we arrive at:

      The final solution

      Here's my AC submission. Sadly couldn't come up with this during contest :P