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

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

We invite you to participate in CodeChef’s Starters 85, this Wednesday, 12th April, rated till 6-stars Coders (ie. for users with rating < 2500). This contest is organized by Programming Club, DAIICT.

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

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

Joining us on the problem setting panel are:

Written editorials will be available for all on Discuss. 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!

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

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

Div 1 unofficial editorial

A (EPANLINK)
B (CRZBISHOP)
C (TRPTSTIC)
D (GCD_QUERIES)
E (BOMBBLAST)
F (TXOR)
»
20 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How are the number of submissions for the first 4 problems in Div 1 basically the same? The 3rd was way more difficult than the 1st! This happened even in the last contest.

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

    Difficulty only affects number of solves past a certain point. For example, I'm guessing based on your rating that on Codeforces your solve rates for div. 2 B questions and div. 2 A questions is around the same (~ 100%), even though div. 2 B questions are typically harder. Similarly, I'm sure a div. 1 contestant on Codechef would agree the 3rd problem is harder than the 1st, it's just not hard enough for them to not to able to solve it.

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

I was upsolving the contest. And in div.2, I found problem E much easier than C and D. I think it's rated 2422 because less people tried it due of it's position. D seems to involve genuine thought, at least for me.

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

    I can feel you, did first 3 in 10 minutes and 4th one took 1 hr :( though I got the logic but took a lot of time to implement.

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

I have done similar thing as described in the editorial but my solution is giving TLE on 2/11 testcases. GCD Queries

Any help is appreciated. Thank you

Update : I had made vector of multiset for storing all numbers that has prime factor "p" and defined the size of vector 1e6+5. Just changed the vector to map and it got accepted.

  • »
    »
    20 месяцев назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    I also had 2/11 and others tle.

    What I changed--> instead of iterating on all factors of my map and checking if my current answer had that as a factor, I just iterated over all factors of the answers itself and removed it from the map.

    Solution

    Feeling very bad that I missed it by an inch during the contest :(

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

      I am doing that only, erasing all prime factor of my current answer. I am getting TLE on first 2 cases only.

      I know my code is a bit messy. But if you could see once and let me know if am doing anything wrong.

      Sad bro, I have nearly 1 hour to do this question, still cant figure out

      Update : I had made vector of multiset for storing all numbers that has prime factor "p" and defined the size of vector 1e6+5. Just changed the vector to map and it got accepted.

      • »
        »
        »
        »
        20 месяцев назад, # ^ |
          Проголосовать: нравится +1 Проголосовать: не нравится

        your modified code

        I changed you code for using map<long long ,multiset> and instead of vector and also :

        facts.push_back(spf[xx]);

        for this you could use a set as pushing say, 2 more than 1 times (any factor for that matter) is useless.

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

I think 300 query limit was tight in B_BRANCH