Deemo's blog

By Deemo, 3 years ago, In English

Greetings Codeforces community!

I'd like to invite you to take part in CodeChef’s January Lunchtime 2019 sponsored by ShareChat. This short contest lasts 3 hours and has 5 problems for participants to solve and is rated for both divisions.

ShareChat- India’s fastest growing social network and sponsor of the contest is seeking talented programmers to join their team. Participants in the January Lunchtime will be eligible to apply for these jobs. Additionally, top 3 performers from Division 1 will gain free entry to the Hello Muscat Programming Bootcamp to be held in Muscat, Oman. For more details, visit the contest page.

The problem statements can be read in English, Hindi, Bengali, Russian, Mandarin and Vietnamese for greater ease of access. I hope you will join your fellow programmers and enjoy the contest problems. Joining me on the problem setting panel are:

  • Setter and Editorialist: Deemo (Michael Nematollahi)

  • Tester: teja349 (Teja Vardhan Reddy)

  • Statement Verifier: Xellos (Jakub Safin)

  • Mandarin Translator: huzecong (Hu Zecong)

  • Vietnamese Translator: Team VNOI

  • Russian Translator: Mediocrity (Fedor Korobeinikov)

  • Bengali Translator: solaimanope (Mohammad Solaiman)

  • Hindi Translator: Akash Shrivastava

Contest Details:

  • Start Date & Time: 26th January 2019 (1930 hrs) to 26th January 2019 (2230 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone
  • Contest link: https://www.codechef.com/LTIME68
  • 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 Indian and top 10 Global school students from ranklist will receive certificates and CodeChef laddus, with which they 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 winners@codechef.com)

Good Luck!

  • UPD Thank you for participating. I hope you enjoyed and please, leave your feedback below in the comments.
 
 
 
 
  • Vote: I like it
  • +50
  • Vote: I do not like it

»
3 years ago, # |
Rev. 2   Vote: I like it +44 Vote: I do not like it

Wow, your last name is the same as one of my friends Seyed Mohammad Hossein Nematollahi. Are you by any chance related? Considering your name (Michael), I assume you are Iranian-Canadian. Have you been to Iran? If not, you should definitely visit sometime.

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

    I can't believe you're getting more upvotes than I. You're like.. a wizard.

»
3 years ago, # |
  Vote: I like it +40 Vote: I do not like it

I want to ask about codechef goodies.After how many time exactly Codechef sending the goodies?
I got this message "Order Confirmation by CodeChefon 25th November, 2018", which 2 months ago and still my order "Tracking Service: Not yet shipped". I also sent mails to codechef about the situation, but no one replied to me.

»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can somebody tell why my following approach for DIST is giving WA.. I am just checking that the third point added beside 1 and N does not lead to shorter path between 1 and N and then basically checking it forms a triangle..

Submission Link : https://www.codechef.com/viewsolution/22654176

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You also need to check if 1->N->x or N->1->x leads to a shorter path (x is your 3rd point).

    PS: You also need to check for 0 in between which is not allowed.

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Why 0 in between is not allowed?

      • »
        »
        »
        »
        3 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Every road has positive length. I had missed this case before.

        • »
          »
          »
          »
          »
          3 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Each road has a positive (not necessarily integer) length.

          FML!!!! :(

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I am checking those 2 paths in my triangle condition ( the inequality condition ).. I was missing that 0 condition..I added it but its still giving WA..

      Submission Link : https://www.codechef.com/viewsolution/22655020

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

        You missed two additional conditions needed for AC. I submitted your code by adding those conditions and it got Accepted.

        Conditions :
        1. Distance from node 1 to 1 is not zero then f must be true.
        2. Distance from node N to N is not zero then f must be true.

        Rest was ok to get AC :).

        Submission : Here

        • »
          »
          »
          »
          »
          3 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Thanks a lot!! That hurts.I dont know why are you getting downvotes though!

»
3 years ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

ETA for editorials?
How to solve Mouse Meets Cheese?

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

O(T(V + E)K) solution of WANDERDER passes in 0.43s. Is there a faster approach?

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

Why did you set such high constraints in problems WNDR and MMC? It was a little confusing because N = 9000 or 10000 isn't common in problems where the intended solution is O(N2)

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

    It's not really uncommon either. Personally, whenever I see n <= 5000, I have a doubt whether N^2.log(n) is intended or not.

    In MMC, I specifically didn't want K^2.log(k) to pass. In WNDR, I simply was looking for n.k solutions and set the constraint as high as possible. I actually set it to 9000 instead of 1e4 to give a hint that N.K is intended.