Блог пользователя STommydx

Автор STommydx, история, 9 лет назад, По-английски

Hello Codeforces!

I'm proud to announce that Codeforces Round #457 (Div. 2) will be held on 19 Jan, 14:35 UTC. The problemset is authored by southball, longhuenchan and me (STommydx). It is our first round in Codeforces and hope you all find the problems interesting.

We would like to thank the following people as the round would not be possible without their kind help: vintage_Vlad_Makeev for coordinating the round, Arpa for testing the problems and MikeMirzayanov for the great Polygon and Codeforces platform.

The contest will consist of 5 problems and you'll be given 2 hours to solve them. The scoring distribution will be announced close to the start of the round as tradition.

Let me close this blog post by answering the most frequently asked question in Codeforces. This round is rated for all Div. 2 participants. As usual, Div. 1 participants can join out of competition.

Good luck and high ratings!

UPD:

Scoring distribution: 500-1000-1500-2250-2500

UPD2:

We are extremely sorry for the situation for problem B. We are figuring out a correct solution for problem B. I hope you all enjoy the rest of the problems.

UPD3:

The round is over. Congratulates to the winners!

Div2:

  1. ustatt
  2. HanaElhami
  3. SorryBahadir
  4. ntv
  5. Om_nik

Div1+2:

  1. eddy1021
  2. chemthan
  3. nhho
  4. fmota
  5. ustatt

The editorial will be available tomorrow.

UPD4:

Editorial is ready!

  • Проголосовать: нравится
  • -251
  • Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Is it the first cf round whose problems are prepared by Hongkongers??

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -11 Проголосовать: не нравится

Why it doesn't appear in the main page? UBD : its Now :D

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Finally the wait is over.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

Good luck, high rating

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -17 Проголосовать: не нравится

I wish a high rating for all.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

enough time limit for problems

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +129 Проголосовать: не нравится

"Good luck and high ratings!"
Usually after these words there is always something very bad happening.

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +19 Проголосовать: не нравится

Good luck!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -73 Проголосовать: не нравится

thi cho vui chứ tạch VOI rồi :(

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

They mentioned unusual start time in the mail....What's the usual start time?

»
9 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +269 Проголосовать: не нравится

The problem B's standard solution has a error.

Input:1 7

Output should be -2 -2 -2 -3 -4 -5 -5 instead of -2 -3 -3 -3 -3 -3 -3.

http://codeforces.me/contest/916/hacks/399042

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

I presume you have overestimated the power of Div 2. A bit.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +49 Проголосовать: не нравится

Obligatory rage comment about round being unrated.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

How did people manage to get pretests passed on problem B? :D

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

Un...f***ing rated?

»
9 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится -17 Проголосовать: не нравится

Shit, if pretests of B are correct(?) why do you make round unrated?

My solution is passed and I think my solution is correct. Probably there is problem in checker that gave wrong answer on correct solutions which printed something different...

I found mistake in my solution xD

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I felt that B was a really bad problem...

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +70 Проголосовать: не нравится

RIP writer contribution score

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

Most unfortunate because of a serious issue. Anyway, still thanks for the contest, other problems were good! ;)

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

Round unrated but Interesting Problems. Making it unrated in last half hour of the contest is little disappointment.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -15 Проголосовать: не нравится

Fucking shit..How the fuck some people solved B?

I went mad solving that problem.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

uhhhhhhhhhhhaaaaaa, I have done 7 successfull hacks and this round will be unrated:)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Even though the round will be unrated, I liked the problems a lot! Kudos to the authors!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

3 problems got pretest passed and the round is declared unrated!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

:( I was frustrated by lots of WA from pB...

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

My algo for B was absolutely right and the only problem was there in implement lex. sort which was exceeding the time limit.

I went mad when I saw some people solving it with time of about 15ms.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I hate of hearing "The round is unrated" in the middle of the contest and I prefer not to go on.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -31 Проголосовать: не нравится

Kuttar baccha , notir pola , tor bal taina taina chirbo ajke , specialist hoite partam , bal falao ??? jotoshob

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

It's a shame, because D and E seemed like very interesting problems.

Apart from B, I thought the problem set was good (perhaps a little too straightforward with C). That said, I was going crazy trying to figure out how over 1000 people got B.

In any case, mistakes happen, so it's not a huge deal.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

What was the issue in B? I did not understand the explanation.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

My dream is to be an expert, and the day I have the opportunity, you destroy my dream :(

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

interesting problem, anyway, could someone tell me the right solution of problem B? I solve B with the wrong solution, but get passed

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

You should not write at least the closing line of the blog. :(

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +254 Проголосовать: не нравится
"Jamie is preparing a Codeforces round. He has got a idea for a problem, but does not know how to solve it. Help him write a solution to the following problem:"
Problem B. Jamie and Binary Sequence
*****
Unfortunately, the writers and coordinator solutions for the problem B are incorrect. The round will be unrated. We apologize.


D and E are pretty interesting (shoutouts to D) but I think they probably take too much time to code when put together in the same round.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

it was a realy good contest despite that problem B

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится
if(rank<=300)
    CF="UNRATED";
else
    CF="RATED";

:)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -37 Проголосовать: не нравится

Any1 wanna solution for B..

Here it is

https://ideone.com/0HvwUB

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Plz make the round semi-rated :(

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +31 Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can D be solved using implicit persistent segment tree?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

After a week of no contest We got "Unrated" one disappointed :(

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why turning the round unrated?!

Make it unrated for only those who got affected by problem B.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

So what will happen to problem B? Will it be deleted or will the solution be corrected?

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

So next time, Never ask if the contest is rated or not .. Who knows anyways xD

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +30 Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

B is tough. C is lot easier than B

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

A and C got AC ;)

is this why B has some mistake :P

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

when you did your best on the contest and it's unrated!!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +73 Проголосовать: не нравится

Unfortunately both author and my solutions for today's problem B were based on simple, nice (and incorrect) greedy idea so they are incorrect. Now we found correct solution for this problem, but answer for some pretests differs, so it's impossible to make this round rated. Of course I did some stress testing for this problem, but my bruteforce was really slow, so it was impossible to check solutions on most of the tests and greedy idea seemd clear and correct, so there were nothing to worry about. However the most simple greedy is incorrect here (it minimises y, but doesn't produce lexicography maximum sequence). You can check your solution on test "1 7". Answer for it is "-2 -2 -2 -3 -4 -5 -5". Of course we will desribe correct solution in the editorial. We are very sorry about it and will try to make everything to make this not happen again.

=========================================

К сожалению и моё и авторское решение к сегодняшней задаче B были основаны на простой, красивой (и неверной) жадной идее, поэтому они оказались неверны. Теперь мы уже знаем верное решение для этой задачи, но ответ для некоторых претестов был неверен, поэтому невозможно сделать этот раунд рейтинговым. Разумеется, я провёл стресс-тест решений к задаче, но мой перебор был очень медленный, поэтому было невозможно проверить решение на большинстве тестов. Кроме того, решение казалось очень простым и понятным, поэтому ни у кого не было повода волноваться по поводу решения. Однако наиболее простая жадность тут неверна (она минимизирует y, но не выводит лексикографически максимальный ответ). Вы можете проверить своё решение на тесте "1 7". Правильный ответ для него "-2 -2 -2 -3 -4 -5 -5". Конечно мы опишем правильное решение в разборе. Мы приносим глубочайшие извинения и постараемся сделать всё возможное, чтобы это никогда снова не произошло.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -31 Проголосовать: не нравится

Unfortunately, the writers and coordinator solutions for the problem B are incorrect. The round will be unrated. We apologize.

WTF! -_-

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I found problem B very interesting and loved the priority queue solution. I thought it was completely correct and had no clue it could be wrong, so I'm not surprised at all that authors did not realize the incorrectness of this solution too.

Please, don't be angry on them. I enjoyed this round a lot :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -22 Проголосовать: не нравится

Худший раудн . Задачи Туфта . Туфта!

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Probably author solution fails in test n=20, k=4. Correct answer is {3, 3, 1, 1} while my passed gave {3, 2, 2, 2}.

Oops, sorry, didn't see above comment of vintage_Vlad_Makeev.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

найс кф пацыки. продолжайте давать прикольные задачки

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +43 Проголосовать: не нравится

Those red in top 10 who got B correct should be moved back to Div 2.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +40 Проголосовать: не нравится

1500+ people did the same mistake as the setter's solution?? :o

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +41 Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -16 Проголосовать: не нравится

The round is rated....

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +50 Проголосовать: не нравится

"... Let me close this blog post by answering the most frequently asked question in Codeforces. This round is ..." 0-rated

On a more serious note, setters should not sub estimate easy problems. I had a similar experience with my problem KNICOV at CodeChef. The moral is that we have to double check greedy problems and have a formal proof.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +37 Проголосовать: не нравится

Come on guys, no need to be so harsh.

Everyone makes mistakes. Maybe they had a rough day and didn't properly check their solutions. Look at the number of up votes for this announcement before and after the UPD.

It is tougher to come up with a quality question than to solve it so we have to appreciate them.

Good job guys!! Make sure you double check your solutions next time ;)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

I think the correct answer is more important than rating.

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Why "Idleness limit exceeded on pretest 1" in http://codeforces.me/contest/916/submission/34316902 ?

UPD: This happens because I am trying to read an integer in queries and removes

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Can someone please explain solutions for problems D and E?

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    For D, you can use a implicit persistent segment tree to keep the values of the words and another to keep the amount of words with value equals to X.

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    for D, i think just use pbds and some implement... but i didn't do it before the end of the contest

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    For E, let's solve a simpler problem, suppose you just have to change the root and query the sum in a subtree, if we preprocess the sum of subtrees with the tree rooted at X, there's only three cases to handle when answering queries to a vertex V,
    if (current_root = V), the answer is the sum of all nodes
    if (current_root in V subtree), the answer is the sum of all nodes minus the sum of nodes in subtree of vertex that leads to current_root in the sons of V
    if (current_root not in V subtree), the answer is the sum of the nodes in the subtree of V

    To process the updates you have to find the lca(u,v) considering the tree rooted in current_root, the vertex is one of the nodes in {lca(u,v), lca(u, current_root), lca(v, current_root)} and then you process the update similar to the queries, to update a subtree and to query the sum in a subtree, you just need a bit and euler tour.

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +5 Проголосовать: не нравится

    and these are very interesting problems for me

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How about the system test for B?

Can the first successful submission be considered as the last submission? (for time and for score)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

problem setter make bug in problem B program and this round unrated if the solution of problem setter can accept, I think the problem is a good problem But problem D, E are very trouble, I don't think DS and long code and many details can be contest good if the round is div 2 , please problem setter use some hard and not template problem

so if the solution of problem setter can accept B, I also think this round should be unrated

the contest value > the contest rating :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Nice contest dudes too bad it's unrated but the problems were good!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

Alternatively u guys can fix B prroblem description to "Of all satisfied sets with elements sorted in non-increasing order, print out the lexicographically smallest one. THEN greedy sol would be correct.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

Common guys mistakes happen. Don't discourage problem setters

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +27 Проголосовать: не нравится

Is it good idea to change statement of problem B — only minimize max(a_i)? In this case problem is good for div2B and all solutions will get ok.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

Lesson to problem setters: If you are including a greedy problem, write a Formal proof of it. If you say after contest that the greedy solution seemed correct, I think it straight away implies that there was no formal proof written / verified.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Pretest 5 of Problem B gives me another chance to look my life again, how almost competitors wrong here?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

It was the first experience of contest setters. Sure, in the next time they will make better contest. Everything is ok.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

You guys need to calm down a little bit. In the end, this is just one round that, in the long run, will have very little impact on your life. Everyone makes mistakes. There's no need to curse out the problem writers, who clearly worked hard to make interesting problems. I can't imagine the difficulty it takes to write a set of problems that have absolutely no flaws in them, and most people complaining can't either, since Div 2 people rarely write rounds.

It's not the end of the world if one round you were doing well on goes unrated. If your performance was part of a trend, you'll do well on future contests. If your performance was an outlier, then future contests would have corrected your rating anyway.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Because problem B and the unrated contest they got more than (-100) on this post

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

why system testing is too slow ? -_-

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

For problem E, is it:

1. dfs the tree and build LCA and record the dfs order
2. build segment tree
3. do query

?

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

worked on B for quite a long time but can't solve. feel released now.

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Over 250 test cases for problem A... personally I think 50 would be enough and thanks to that judging time would be much shorter :P

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can you please reveal the test #5 of problem B?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

I wish I was the writer of this round, so I can get a lot of downvotes.

»
9 лет назад, скрыть # |
← Rev. 5  
Проголосовать: нравится -13 Проголосовать: не нравится

Very cool round!(no)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

You end up in fourth in the contest and then the contest was declared unrated, so sad

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve D and E ?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

"Джейми готовит раунд на Codeforces. Он придумал задачу, но не знает, как её решить. Помогите ему решить следующую задачу:"

Самоирония? :D

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +31 Проголосовать: не нравится

i don't get the point of putting Persistent Implicit segment tree in the D problem if someone has a decent template of it he can solve it in a little under 30 minutes i think putting a problem that required more thinking would have been better.

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +8 Проголосовать: не нравится

Don't you guys think that putting a persistent data structure problem on Div. 2D is not suitable ? I was going to compete in a Div. 2 contest for fun. However, got stuck on problem B and D........ :(

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -26 Проголосовать: не нравится

ваша тестирующая система некорректно работает, у меня ответы все правильные которые вы выдаете за неправильный ответ!!!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

expected that situation after phrase "He has got an idea for a problem, but does not know how to solve it."...