yash_daga's blog

By yash_daga, history, 23 hours ago, In English

We invite you to participate in CodeChef’s Starters 166, this Wednesday, 25th December, rated upto 5 stars (i.e. for users with rating < 2200).

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

Joining us on the problem setting panel are:

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest. The video editorials of the problems 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
  • +41
  • Vote: I do not like it

»
23 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Christmas round!

»
16 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Is this rated up to 5 or 6 stars? Website says 5.

  • »
    »
    13 hours ago, # ^ |
      Vote: I like it -16 Vote: I do not like it

    It is rated unto 5 stars only, I posted the wrong blog by mistake, really sorry for the inconvenience.

    Updated it now.

»
12 hours ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

Reminder: The contest will start in an hour.

»
9 hours ago, # |
  Vote: I like it -6 Vote: I do not like it

Very Strict Time Limits in All Equal , Nice Problems :) for a change

»
9 hours ago, # |
  Vote: I like it +13 Vote: I do not like it

almost all questions were GPTable. Poor contest.

»
9 hours ago, # |
  Vote: I like it +16 Vote: I do not like it

Screencast of me writing this round in rust

»
9 hours ago, # |
Rev. 2   Vote: I like it +18 Vote: I do not like it

Every single person in the top 25 of div2 has used GPT. This is just pathetic.

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

    There were many cheaters in div1 too:

    Rank 1 here Standings Username- optimusprimeop cheated on all questions,look at these submissions — 1 and 2, the number of functions(most aren't required) used for trivial tasks are laughable.

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

      oh yeah. Almost every code I check for the 5th problem is GPT generated in div1. The guy who got rank 1 in div1 has every single question GPT generated.

»
8 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

In the hard version of divisors I didn't noticed that I used map and an extra log(M) factor gave me TLE for 4 times. :(

»
8 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Why did my submission for Divisors Array(Hard version) give TLE? I think it is within the limits of the constraints.

Link: https://www.codechef.com/viewsolution/1117737372

  • »
    »
    8 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    for(auto x: tmp)m[x.first] += x.second;
    there are aprox $$$\frac{m}{log(m)}$$$ prime and you are iterating all of them $$$n$$$ times so it's $$$O(\frac{m * n}{log(m)})$$$ which is not within time limit

    • »
      »
      »
      8 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How is the number of primes m / log(m)??? It is log(m)/loglog(m).

      • »
        »
        »
        »
        8 hours ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        • »
          »
          »
          »
          »
          8 hours ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          That is the distribution of prime numbers themselves. You are getting confused between the two.

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

            i'm not confusing, you didn't even read the provided article
            it clearly says.

            The first such distribution found is π(N) ~ ⁠ N / log(N) ⁠, where π(N) is the prime-counting function (the number of primes less than or equal to N)

            • »
              »
              »
              »
              »
              »
              »
              8 hours ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              N / log(N) is the numbers of prime number less than N. But a number can only have log(m) prime factors. so tmp will only have log(m) elements.

              • »
                »
                »
                »
                »
                »
                »
                »
                7 hours ago, # ^ |
                  Vote: I like it 0 Vote: I do not like it

                But tmp is clearly initialized with all primes up to 10^7

              • »
                »
                »
                »
                »
                »
                »
                »
                7 hours ago, # ^ |
                  Vote: I like it 0 Vote: I do not like it

                what temp stores prime factors of $$$m!$$$ right?
                $$$m! = 1 * 2 \ * ... m$$$
                all the no. from 1... m are present in $$$m!$$$
                how many primes are there in range $$$1...m$$$
                $$$O(\frac{m}{log(m)})$$$, so what will be size of temp?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  7 hours ago, # ^ |
                    Vote: I like it 0 Vote: I do not like it

                  Got it now...I didn't realize that you were pointing to the initialization part. Thank you!!!

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

    May be 664,579(count 1e6) prime numbers below 1e7 and log2(1e7) + log3(1e7).... (count 100). & in the second loop n times over tmp(will have a large size).

    • »
      »
      »
      8 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      tmp will only grow to log(m) so final time complexity should be n * log(m) * log(max(a)). And even the author's solution contains a sieve till 1e7.

»
8 hours ago, # |
Rev. 2   Vote: I like it +18 Vote: I do not like it

Codechef please take this opportunity to go through the code of top 100 of div1 and div2 and ban the people who has GPT code. If you guys are not capable of doing that then unrate this contest. Great way to catch a lot of losers.

»
8 hours ago, # |
Rev. 5   Vote: I like it +9 Vote: I do not like it

Lol. What a joke. Ratings updated with gpt users at the top. Dominater069's math puzzles is better than this shite. Atleast that was GPT proof.

»
2 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

What sorcery was DPOWER? caught me off-guard completely. Do you recommend any other similar style problems to better develop an intuition for these? Thanks for the contest!