Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

yash_daga's blog

By yash_daga, history, 28 hours ago, In English

We invite you to participate in CodeChef’s Starters 163, this Wednesday, 4th 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
  • +31
  • Vote: I do not like it

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

BUMP

Contest starts in about 40 mins

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

hopefully it wont be a bunch math puzzles.

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

virtual memory exhausted: Cannot allocate memory what's going on ? i keep getting this error

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

    In which problem? and what's the language you're using? Usually you get this if code is using more than 1.5GB of the default available memory.

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

      Nah bro MLE i understand but i'm getting compile error and the same code passed after trying 2-3 times

»
3 hours ago, # |
  Vote: I like it +17 Vote: I do not like it

The problems were very good today.

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

variables in tree sum question was given in wrong order to what is mentioned.

»
3 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

good problems today !

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

For Nice Array problem, I tried the same approach kind of approach in c++ which was given in the editorial. Strangely, it was giving a wrong answer. Why is it so? I made sure to use ceil division (x+k-1)/k to calculate the ceil of the number!

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

    Did you use the in-built C++ ceil function?

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

      no I used (x+k-1)/k.

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

        Does your formula work if x is negative? Or maybe it overflows?

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

        Are you sure that works fine for negative numbers say A[i]= -4 and k= 3 according to your ceil function it will be 0 but it should be 1.

        or maybe i am wrong

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

        You don't even need to use any ceil division. See my submission

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

          I think I got confused with the definition of ceil and floor division for negative numbers. Thanks for your suggestion.

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

debug my code is not working !