Hello, Codeforces!
We are happy to announce that we're going to host a new contest at csacademy.com. Round #27 will take place on Wednesday, 03/May/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.
One of the problems is going to be interactive. You can read more about interactive problems here.
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.
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 contact@csacademy.com
Don't forget to like us on Facebook, VK and follow us on Twitter.
Later Edit:
Congratulations to the winners:
Also, the editorial has been published. Hope you enjoyed the contest!
Can somebody explain why my Java code for the interactive binary search problem here, does not work?
Here is my Java code, it does not work, link.
Here is my C++ code, should be exact same, does work, link.
The Java code works for me locally, and I have no idea how to debug why it give WA on sample on CS Academy judge.
Any help would be very greatly appreciated.
Edit:
The obvious suggestion would be that there is something wrong with how I am flushing output using Egor's custom IO library, but I do out.flush(), and this has worked for me on interactive problems on Codeforces judge. So unless I am missing something obvious, it seems to me that I do flushing correctly.
For interactive tasks, when you run the example you can see what queries your program made and what answers it received. For your C++ code for instance you can see that your program asks 3 questions and then answers with
A 3
. Your Java program doesn't have anything in the log. That means the judge program didn't receive anything, so it probably doesn't flush the output properly (like you said).I think interactive tasks should have a templated code anyway in the most common languages, like for the templated addition task so people don't have to manually worry about flushing, etc.
unfortunately the interactive problems were not working in other languages other than C++ due to a bug in the jailer.
It was fixed now. Hope everything will work smoothly :)
Can someone explain the dp solution of the second problem(max even subarray).
Thanks
I updated the editorial, hope it's more clear now.