RomaWhite's blog

By RomaWhite, history, 5 years ago, In English

Greetings Codeforces Community!

CodeChef presents July Lunchtime contest! The 3-hour long contest is jam-packed with engrossing problems that is sure to be an absolute treat for you. So, get ready to code and compete!

Further, if you have some engaging problem ideas and want them to be used in CodeChef's contests, you can share them with our admins here: www.codechef.com/problemsetting/new-ideas

Expecting to see you join your fellow coders and participate in the contest in large numbers. Joining me on the problem setting panel are:

  • Setters: kingofnumbers (Hasan Jaddouh), Erfan.aa (Erfan Alimohammadi)
  • Tester: RomaWhite (Roman Bilyi)
  • Editorialist: vijju123 (Abhishek Pandey)
  • Statement Verifier: Xellos (Jakub Safin)
  • Mandarin Translator: gediiiiiii (Gedi Zheng)
  • Vietnamese Translator: Team VNOI
  • Russian Translator: Mediocrity (Fedor Korobeinikov)
  • Bengali Translator: solaimanope (Mohammad Solaiman)
  • Hindi Translator: Akash Shrivastava

    Contest Details:

  • Start Date & Time: 27th July 2019 (1930 hrs) to 27th July 2019 (2230 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone
  • Contest link: https://www.codechef.com/LTIME74
  • 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 the winners can claim cool CodeChef goodies. Know more here: https://discuss.codechef.com/t/how-do-i-win-a-codechef-goodie/7344. (For those who have not yet got their previous winning, please send an email to [email protected]) Good Luck!
    Hope to see you participating!!
    Happy Programming!!
  • Vote: I like it
  • -16
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve PROFTRIP ?

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

    Like usual Dijstjka, but you have to maintain more than one minimum weight. The minimum weight is a pair of (spentMoney, minFuelPrice). So, for every reached city, there can be more than one such pair. Then simply follow all cheapest paths until target is found.

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

      Thanks. Btw, due to smaller constraints, I'm finding many codes with floyd — warshall too.

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

        I think the Floyed-Warshal finds all possible, paths. Then you can calc the price for every one, and use the smallest price. Not sure wich solution is better.

        Edit: How do you know when to stop the loop with Floyd-Warshal? You need to run it for countNode times. That should TLE for special test cases.

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

    If we want to go to another state we would always want to buy fuel from the state we've passed so far that has the minimum fuel price. So we add another dimension to our search state to include the index of the city with the minimum fuel price so far and we do Dijkstra on that.

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

In equal median, what should be the answer for the following testcase:

1

5 1

1 1 2 2 3

1 1

Some accepted solutions gives 2. However imo it should be 1.

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

    Same question here... all four accepted solutions print 2 but I can't see how it's not 1.

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

Either the test cases for EQMD are completely incorrect or I have misunderstood the problem. The following code got 50 points by just outputting the frequency of the median element. That would fail on so many cases. https://www.codechef.com/viewsolution/25455347

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

The test-cases of EQMD turned out to be wrong, hence the contest is unrated for div1 participants, we still didn't decide for div2.

I'm very sorry for this mistake.

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

    Will it be possible to submit it later with correct test cases? it was an interesting problem

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

    It happens to the best of us ;)

  • »
    »
    5 years ago, # ^ |
    Rev. 4   Vote: I like it +84 Vote: I do not like it

    I asked you. But you gave me wrong answer -.-

    tmp

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

      can you please share your approach?

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

      The correct answer to such a useless question (do you seriously expect someone to assume they made wrong tests?) is "no comment", be glad you didn't get that.

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

        I was not expecting any answer there.
        That was written in frustration after making odd 10 submissions and seeing low success rate despite easy 50pts?

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

      I resubmitted a correct answer to your question before the contest ends, do I get the score of the question ?

      seriously speaking, we didn't suspect of any issues in EQMD until very late, that was mainly because it's sometimes normal for 4th problem to have low number of solvers until the last 30 minutes of the contest, another reason was the problem TWOLANE which had less solvers than two other problem despite it's very straight forward greedy problem! this was weird enough to make me think high number of WA on EQMD isn't that weird. I apologize again for this mistake from us!

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

    Will the top students get laddus?

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

    Please make div 2 rated.

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

All submissions of EQMD are rejudged.

The contest is unrated for div1, while it's still rated for div2.

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

    This is the reason we get frustrated. Spend 3 and 1/2 hours and in return get an unrated round. Thanks.