csacademy's blog

By csacademy, 8 years ago, In English

Hello, Codeforces!

We are happy to announce that we're going to host a new contest at csacademy.com. Round #32 will take place on Thursday, 08/June/2017 15:00 (UTC). If you want to take part in this round you need to register before the contest begins. This contest will be a Div1 + Div2, with 7 tasks of varying difficulty that need to be solved in 2 hours and 30 minutes.

Prizes

Given that this round number is a power of 2 (and powers of 2 have a special place in a programmer's heart), we decided to award three prizes:

  1. First place: 100$
  2. Second place: 50$
  3. One random prize, either 50$ or a custom CS Academy T-shirt, whichever the winner wants. :)

Contest format:

  • You will have to solve 7 tasks in 2 hours and 30 minutes.
  • There will be full feedback throughout the entire contest.
  • Tasks will not have partial scoring, so you need to pass all test cases for a solution to count (ACM-ICPC-style).
  • Tasks will have dynamic scores. According to the number of users that solve a problem the score will vary between 100 and 1000.
  • Besides the score, each user will also get a penalty that is going to be used as a tie breaker.

About the penalty system:

  • Computed using the following formula: the minute of the last accepted solution + the penalty for each solved task. The penalty for a solved task is equal to log2 (no_of_submissions) * 5.
  • Solutions that don't compile or don't pass the example test cases are ignored.
  • Once you solve a task you can still resubmit. All the following solutions will be ignored for both the score and the penalty.

If you find any bugs please email us at [email protected]

Don't forget to like us on Facebook, VK and follow us on Twitter.

Later Edit:

Congratulations to the winners:

  1. tourist
  2. anta
  3. yutaka1999
  4. lexuanan
  5. lucyanna2018

Also, the editorial has been published. Hope you enjoyed the contest!

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

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

08/May/2017. I think you meant 08/June/2017

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

On the website its mentioned:
You will have to solve 8 tasks in 2 hours and 30 minutes.
but in the blog:
You will have to solve 7 tasks in 2 hours.
and also : 7 tasks of varying difficulty that need to be solved in 2 hours and 30 minutes.
I'm guessing the website is correct?

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

    There will be 7 problems, not 8.

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

      "with 7 tasks of varying difficulty that need to be solved in 2 hours and 30 minutes", "You will have to solve 7 tasks in 2 hours."

    • »
      »
      »
      8 years ago, # ^ |
      Rev. 3   Vote: I like it +10 Vote: I do not like it

      It's seems like there are 8 problems and not 7.

      Edit: maybe D and H are counted as 1.

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

Just a reminder, the round starts in 4 hours.

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

I am not able to submit a solution. The sidebar always shows "Connecting". Sometimes it changes to "Disconnected". Anyone else facing this issue?

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

Can someone please point out flaws in my solution for easy square root problem?

I've tried to do it like this:

Check all possible integer parts for the value of . Then using it I find x·1018. (t = (sqrtFrac + i·109)2). After this I get number k = x⌋·1018 = . And the answer will be such i that |t - k| is minimal. I also check k = x⌉·1018 in case it is rounded closer to integer x.

It gets wa5 and I'm not exactly sure why it is even wa. Doesn't this have more precision than straightforward long double solution?

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

    One of the possible reasons of it failing might be the fact that you are comparing to the floor number. As the input numbers are truncated (not rounded), you should note that the real (irrational) square root should be larger, so the number that you get by squaring should always be less than the sought square. Try comparing only with the ceil of the division and see if it works. I doubt though. I think the real reason is, in fact, that long double precision might just not be enough for this problem (I resorted to using 128-bit integers for my solution)

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

      It doesn't work, still fails on a couple of tests. But it passes two tests extra tests in comparison to trunc and ceil one.

      Yeah, this solution shouldn't work in long doubles as I can get numbers up to 1028, which takes more than 80 bits. I coded it in python (Solution itself).

      I have an accepted solution with long doubles though, with much simpler logic.

      P.S. also I don't really understand why does it say "Accepted" if I have two test with WA verdict.