csacademy's blog

By csacademy, history, 7 years ago, In English

Hello, Codeforces!

We're going to host a new contest at csacademy.com. Round #80 will take place on Wednesday, 23 May 15:05 (UTC).. This contest will be a Div1 + Div2, with 7 tasks of varying difficulty that need to be solved in 2 hours.

Some of the problems will be based on contests from Romanian Olympiad IOI selection camp.

Facebook event

We recently created a new Facebook event. If you choose "Interested" here, you will be notified before each round we organise from now on.

Contest format:

  • You will have to solve 7 tasks in 2 hours.
  • 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.

Prizes

We're going to award the following prizes:

  1. First place: 100$
  2. Second place: 50$

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.

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

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Just a reminder, the contest starts in an hour. ☺️

»
7 years ago, # |
  Vote: I like it +14 Vote: I do not like it

We waited for this contest 2 weeks :(

»
7 years ago, # |
  Vote: I like it +16 Vote: I do not like it

Took second place and round is unrated :(. At least I will keep this rating which certifies my right to hold my current nickname :P (but it's hermetic joke)

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

I submitted, got a compilation error, didn't know what is wrong and resubmitted the same code (with a semicolon added because otherwise the system wouldn't allow me) and got AC. You might want to check that to avoid the issue in the future. Submission ID's are 1580921 and 1581103. Cheers.

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

    I'll get that checked out. It seems one judging machine was making weird problems. BlueMarry signaled the same thing as well. Definitely gonna check it out. Thanks

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

I just finished the editorial for problem anagram-sort. I really like the problem so I wanted to share the editorial with everyone. Even thou it's a long editorial, I hope it'll be easy to understand. Personally, I hope you'll enjoy the problem as much as I did.

The rest of the editorials will be coming in the following days. I have some exams at the university in this period so they'll be delayed a little bit.

Also, I'll be writing a post-morted regarding round-80 so others wouldn't do the same mistakes I did.

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

    Lol, I didn't note that n circular shifts is the same thing as 0 circulars shifts (which was first question in my code), so in my initial thought I needed n+1 questions for determining answer (for 0, 1, ..., n shifts) and next one for stating the answer which is n+2 queries and I needed to get rid of one query. I noted that if I get rid of last real query (not one stating answer) then I am able to get to know n-1 positions, so I can determine position of last element by seeing where is the only one not filled gap ;p.

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

      This was my first idea as well. I found out later that you actually make circular shifts and there are only N of them.

      It's funny because in the olympiad version you would have to specifically say "this is the solution" and I had a bug where I accidentally discovered the solution while doing the circular rotations.

»
7 years ago, # |
  Vote: I like it +14 Vote: I do not like it

How to solve shampoo exchange ?

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

    It's quite complicated for C. If you need to clear x bottles into y (fullest) bottles and x ≤ y, the answer is the volume in the fullest of these x bottles. Otherwise, take the fullest y bottles out of x and remember their sizes in a multiset S1; also, remember a number s denoting that everything in that multiset actually had volume s already subtracted from it, and store the remaining N - x - y smallest bottles in another multiset S2.

    Now you can simulate. You either transfer enough shampoo from S1 to the y bottles to fill up the last (initially fullest) of them completely, in which case you can remove it and continue with y — note that you need to move a bottle from S1 to S2 in that case — or enough to empty the smallest bottle from S1, in which case you delete it and move a bottle from S2 to S1 — if you're moving a from S2, you're moving a + s to S1, so that s would make sense for this bottle as well. Update s by adding to it the transferred volume in this step.

    In the end, you reach y = 0 or x ≤ y, at which point you can add to s, which actually represents the total time.