Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

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

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

Hello, CodeForces Community!

I am really pleased to announce that August Cook-Off 2017 saw mind boggling performances by the participants. The zeal and enthusiasm amongst the participants, really makes us feel proud and we are on cloud nine. To keep the competitive spirit on, we bring August LunchTime (https://www.codechef.com/LTIME51)

The contest will have four problems set by me and joining me on the problem setting panel, we have:

  • Problem Setter: AlexandruValeanu (Alexandru Valeanu)
  • Problem Tester and Contest Admin: kingofnumbers (Hasan Jaddouh)
  • Editorialist: likecs (Bhuvnesh Jain)
  • Russian Translator: CherryTree (Sergey Kulik)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Vietnamese Translator: Team VNOI

I hope you will enjoy solving them. Please give your feedback on the problem set in the comments below after the contest.

So, note down the details and be there when the contest starts:

Time: 26th August 2017 (1930 hrs) to (2230 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

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

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.

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 has started!

UPD1: The contest has ended!

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

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

Auto comment: topic has been updated by AlexandruValeanu (previous revision, new revision, compare).

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

Auto comment: topic has been updated by AlexandruValeanu (previous revision, new revision, compare).

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

If I have totally 0 points at contest (also I submitted something), am I considered participant of contest?

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

Auto comment: topic has been updated by AlexandruValeanu (previous revision, new revision, compare).

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

Auto comment: topic has been updated by AlexandruValeanu (previous revision, new revision, compare).

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

Auto comment: topic has been updated by AlexandruValeanu (previous revision, new revision, compare).

»
7 лет назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Too long queue :(

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

Submitted and got 10 points from MATCUT, 35 minutes passed and my score still not updated.

UPD: FIXED

»
7 лет назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

I hope you all enjoyed the problems.

The editorials for the problems can be found below :

MATPAN

MATDYS

MATTEG

MATCUT

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

Problem 2 has a slight disadvantage for Java programmers as Java doesn't have native support for unsigned long , so we either have to use Long.parseUnsignedLong() or BigInteger . Also 1 << 63 returns 0 in Java , so I had to hard code the value of 263 .

»
7 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Another way to solve MATDYS:

  1. Read the problem and realize you can get something with observation.
  2. Write bruteforce solution and check it with sending judge. https://www.codechef.com/viewsolution/15121998
  3. Print full array instead if k'th element with n=1 to 5.
  4. OBSERVE (observation skills++).
  5. Write simple recursive solution and gain 100 points. https://www.codechef.com/viewsolution/15122742
  6. PROFIT!!
»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why does this brute force solution for problem 3 fails in test 1Link Please help!

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

Can someone explain reason for WA?
MATDYS

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

Array of size 5*(10^8) allowed in question Mathison and the teleportation game. Are you serious bro ??? 256 mb was more than enough

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

I had some issues with problem B and couldn't resolve them yet. I hope someone helps me.

(1) My initial approach :

We wish to find the element at index k after all shuffles. We view the process backwards. So we try to transform the index k to some corresponding index j before the last shuffle. Then we use this j and apply the same process again. To find the transformation from k to j, we find the window in which k lies while shuffling (by using binary search) and next do the inverse transformation to find k. Here is the link to code using the mentioned approach. Though this doesn't handle the n=64 case (I still don't know how to store it :( ) I expected my solution to clear other subtasks but it failed.

(2) Then I wrote a brute force solution to stress test my solution.Here is the link to the code. It passed the basic test cases ie with n <= 10. I just wrote a script and compared the outputs from n=1 to n=15 (I basically compared the whole array after all shuffles) and I didn't find any difference.

I don't get the mistake even now. Are the constraints for subtask 1 definitely correct?! :D

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

    if(n==64) then in the first iteration you'll have to add 2^63(if number is odd).So just add 2^63(fits in unsigned long long) and decrement n by 1.After that you can do standard binary search.