CodeChef_admin's blog

By CodeChef_admin, 13 months ago, In English

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!

  • Vote: I like it
  • +44
  • Vote: I do not like it

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

Update: The duration has been increased from 2 hours to 2 hours 15 minutes.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

how to solve GCD Queries?

»
13 months ago, # |
Rev. 2   Vote: I like it +22 Vote: I do not like it

Div 1 unofficial editorial

A (EPANLINK)
B (CRZBISHOP)
C (TRPTSTIC)
D (GCD_QUERIES)
E (BOMBBLAST)
F (TXOR)
»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

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

    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.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

  • »
    »
    13 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

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

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.

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

    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 :(

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

      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.

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

        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.

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I think 300 query limit was tight in B_BRANCH