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

Автор Wild_Hamster, 11 лет назад, По-русски

Приветствую сообщество Codeforces.

1 декабря 2014 года в 19:30 MSK состоится очередной раунд Codeforces #280 для участников из второго дивизиона. Традиционно, участники из первого дивизиона могут участвовать в соревновании вне конкурса.

Это мой первый Codeforces раунд. Надеюсь, он вам понравится.

Большое спасибо Максиму Ахмедову (Zlobober) за помощь в подготовке задач, Марии Беловой (Delinur) за переводы на английский, Михаилу Мирзаянову (MikeMirzayanov) за замечательные системы Codeforces и Polygon.

Участникам будет предложено пять задач и два часа на их решение.

UPD: Разбалловка стандартная — 500-1000-1500-2000-2500.

UPD: Спасибо всем, кто принимал участие в раунде!

Поздравляю победителей:

1.alex_y

2.wingemerald

3.Eric94

4.Zpw987

5.rabbit_TR

результаты

UPD: Разбор задач здесь.

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

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

thanks MikeMirzayanov and Zlobober and Wild_Hamster for this contest :)

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

Fixed :D

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

I had a lot of school's exams in this week and I didn't practice for coding...

But i like to join the contests...

God please help me...

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

If I am correct, this is the first time a wild hamster has prepared a codeforces round.

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

Что, 1 декабря?!!

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

What about the scoring system, dynamic or regular/normal... ?

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

    I bet, "Scoring will be announced just before the round starts."

  • »
    »
    11 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится +27 Проголосовать: не нравится

    Is Down vote became a tradition in CF, just asked a simple question and got so many Down votes... Really Unexpected... :(

    UPD: Scoring will be announced just before the round starts.

    This line was added to announcement after my post, and some so called smart didn't get that while pressing down vote.

    You may be so smart but Don't think some one that much stupid!!!

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

    In my opinion, announcing scoring system is not important, as it will be clear when the contest begins. Knowing problems' score before contest starts doesn't help you solve problems much. An announcing contest blog should introduce something about problem setters so that everybody will know them :D

    P/s: A lot of comments in this blog got downvotes, but I hope your guys will upvote my comment. Please. don't downvote, please :(

    • »
      »
      »
      11 лет назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится +22 Проголосовать: не нравится

      Heh, just want to mention that i know few guys saying "i have some other things to do in the evening... I'll find time to participate in CF, but only if there will be no dynamic scoring" (as you may guess, they don't like dynamic scoring for some reason). And maybe someone else have some other strange preferences:) But announcing of problem values for a normal scoring does not helps a lot — because it is often completely meaningless and does not describe relative problem difficulty — like in round 275, when both B and C had 1500, but B was solved by ~10 times more users than C.

      For me it seems meaningless to update blog in last minutes before contest — one may just enter contest few minutes later and he'll see values there:) But i don't know why scoring distribution isn't published a long time before contest — they just don't want to, or it is really decided just a few minutes before the start.

      P.S. It is risky to ask about upvotes:) Well, i'll upvote you, as you wish, pushing one button takes much less time than even typing of this message and it is an easy way to make a kind gesture:) But why do you care about upvotes? I can't understand point behind it. Contribution score is even more useless than rating, isn't it?

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

        Yes. I agree! Contribution is not as important as rating on Codeforces. It was made only for fun, and to make the forum more active, I think. But it will be a bit unhappy if my blogs, comments got downvote. Why? It means that people seems to hate me :( The last sentences on my above comment is quite simple: There's a fact that a lot of other comments got downvotes, and I don't want my comment to get dislikes.

        Sometimes, I try to find the answer of the question: "Which type of blogs, comments have most upvotes?" This question is not for coders, but it's an interesting and non-easy question. :D

        Ok. Asking about upvotes is risky, I won't do it anymore :D

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

Вокруг города автора прикольные названия населенных пунктов. В России они обычно попроще, а тут прямо воображение просыпается)

Слободка. А че, хорошее название!
Старый угринов. Ну че так невежливо? Ладно, Средний угринов.
Стебник. Хочу туда, там весело.
Кто мне может нарисовать, что за звери - Пшеничники ? А курить их можно?

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

Ivano-Frankivsk wooohooo :-)))) best wishes, hope for great round.

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

1 December 1918 – Transylvania unites with the Kingdom of Romania, following the incorporation of Bessarabia (March 27) and Bukovina (November 28), thus concluding the Great Union

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

Автор тролль.

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

I have a general question. Hope you can answer: Why is always the scoring announced just before the round starts? Is there a specific reason?

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

небольшой вопросик: когда будет раунд для див1?

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

The surprise is not only this contest but also we have another one after just 2 days :)

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

I'm afraid it won't be rated. Servers are slow for me for about one and half hour and the contest didn't start yet :-(

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

I'm afraid it will be delayed for 10 minutes :)

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

Brace yourselves, clone accounts invasion incoming.

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

Контест очень хороший для див-2, сложность идеальна! Нет вот этих задач Е с 5 решившими, которыми часто грешили в последние годы.

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

Нехорошо править задачу Е без клара, хоть и правка была вполне очевидна.

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

I think there will be a lot of fails on C while system testing! Good Luck!

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

What's the meaning of problem D? @.@

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

How was E supposed to be solved?

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

Sorry for failure in last minutes, I'll investigate it. It seems it works good almost all the contest, but failed the end. Sorry again.

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

What was pretest 3 in D :\

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

Last 20 minutes, unable to hack. Anyone else on this boat? :-)

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

Задачи слишком простые. Я не решил Е только потому, что сначала правильно прочитал условие (включая gcd( n, dx ) = 1 и gcd( n, dy ) = 1 ), придумал решение, потом придумал тесты, на которых это решение валится, но эти тесты слегка не удовлетворяли gcd, о чем я вспомнил только за 5 минут до конца.

UPD: Решение по Е, которое я придумал на 60 минуте от начала контеста — зашло. P.S. Впервые выдался такой шанс за контест решить все 5 задач, впервые решить Е во время контеста, и я его упустил =(

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

    Слишком простые? Думаю, что нет... По-моему, таблица результатов во втором дивизионе достаточно сбалансирована +как заметил dalex, сложность задачи Е была такой, что и халявой не назовешь, и решило не 5 человек за контест, что, как мне кажется, большой плюс для контеста.

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

Total this contest = problem B,test 3

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

Codeforces is temporary unavailable (last few minutes before the end) is that fair ?
what about the case of one solved problem correctly and didn't get the chance to submit it before the end of contest by 1 minute
what about the case of hacking someone solution and the system down before hack ?

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

    Worse yet, unable to read other people's code in an attempt to hack them. Yup, same boat.

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

    It is fair, since it is unavailable for everyone.

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

      Not if someone else started hacking before the system failed to deliver. Then it is unfair since only people who planned to hack earlier got the privilege to do so.

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

      think before write something. everyone has different strategies in contest time. how come a red coder says its fair? just cant blv my eyes

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

      some people read all the problems first then sit to solve, some do it one by one. its completely non-sense to say it was fair.

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

        Please don't misunderstand me. I think the only reason to ask "Is it fair?" that makes sense is to question the fairness of the organisers of the contest. I personally believe that the staff of Codeforces is dedicated to prevent any mishaps. But if it is accidental, of course it is not fair in that sense that different participants are affected unequally. It just doesn't make sense to me that the organisers' actions are to blame in such situations.

        And please, don't color-discriminate people. I was only expressing my thoughts.

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

      i solved the problem D in time, but could not submit it in time. It might be fair for div1 coder like you, but don't mock at tiny coder like us, at list my thought goes this way.

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

      It is "fair" in that the circumstances are the same for everyone, but it isn't "fair" in that different people are affected differently.

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

      I think the definition of "fair" should involve "follows the initial premise". Simple example: if, an hour into the contest, an announcement was posted that in order to speed up the testing, all submission results will be random (with some distribution), it would not be fair (by common sense, it's just fucking around, "fair" has no meaning), even though it affects everyone equally. In that sense, unexpected fails can't be considered fair.

      That's not to say I disagree — it actually was fair, since the fails aren't exactly unexpected anymore... and anyone who jumps into contests without checking what they involve takes the risk on himself.

      Still, the question to ask here is not about fairness. It is fair, and it sucks. And contests should be fair and fun.

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

dreamoon_love_AA is first place in div2 but unofficial :)

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

dreamoon_love_AA is first place in div2 but unofficial :)

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

If I view someones code for Hacking, but if I don't click on Hack It! then does CF deduct any score?

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

How the user rank 201 in official standing solve two problems at same time ? :D

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

Thanks Wild_Hamster for this nice problem :)

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

Как решать C?

UPD — прочитал решение, понял что там сыграл фактор кривых рук...

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

Hi,

I think there might be something wrong with app context for executing C# code. In problem B, my numbers were printed with "," comma separator, while answers were expected to be printed with "." separator. I wasn't using any formatting, i was using just: Console.WriteLine(decimal);

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

Could anyone help me understand why 8922945 and 8922927 with identical code but different compilers give different answers on the test #1 in C?

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

For the question B, I was getting wrong answer on pretest1. I changed long double to double in my code . And it got accepted!! Can anybody explain me how did it work ? My Code for the same

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

My solution for D is the following http://mirror.codeforces.com/contest/492/submission/8923198 It gives Memory Limit Exceeded for test 17.

If I do not store the elements in an array I passes all the tests (http://mirror.codeforces.com/contest/492/submission/8923768), but based on the input size the array should be max 400 KB. When reviewing test 17 with this modification I get a smaller memory usage with 100 MB.

I think this is not caused entirely by the array but because of the flushing of PrintWriter in Java. Do you guys have any suggestions/recommendations?

EDIT: I just checked and the output buffer and input buffer should be 8 MB each. I have absolutely no idea what the problem could be :|

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

Rating is too Late.........?

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

When will rating be updated?

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

Everybody(div2) waiting for rating.

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

Was it an unrated contest?

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

Hi, I'm wondering what the best way is to test an algorithm that I couldn't quite finish after the contest is over. I entered a virtual contest, but that doesn't indicate what was wrong with a submission either. Any way to just play with the problems for training purpose?

Also: Is this the best place for questions like this?

Best, Esuhi

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

    Just go to contests tab and click on "enter" instead of "virtual participation" and you can submit all the problems in practice mode. (Though you may have to wait until the virtual contest is over before you can do that :p )

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

    Try the "register for practice" button on the contest dashboard. If you don't see it, you're already able to submit (and see tests).

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

    Edit : Looks like I replied few seconds late. :)

    Yes, you may have to wait for some more time for that. Usually the contest problems are added as "Practice" problems in the problem set archive, tagged by contest id etc. Currently I see that submissions for practice problems are blocked temporarily by admin. Once its unlocked by admin, you can submit/test your solution there and test cases (system tests) will be run against your solution for the verdict. Hope this answers your question. :)

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

Why is problemset page blocked by the admin?

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

Ratings are updated! :) Cheers!

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

Was I the only one that "misread" problem D and thought the swing timer doesn't reset every time they kill a monster? There is nothing in the problem statement that says otherwise, until you run it on the first test.

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

It was a lucky contest for me....

And the best contest in codeforces so far.... :D

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

Hi. Can someone explain to me why at the C problem , I get runtime error if I use the compare function

bool cmp( const pair<long long ,long long> &x, const pair<long long ,long long> &y) { return (x.b<=y.b); }

but accepted when I use < instead of <= .

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

http://mirror.codeforces.com/contest/492/submission/8914525 Can someone explain where am I wrong , can't figure out from the failed system test case for problem C

  • »
    »
    11 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится +6 Проголосовать: не нравится
    vector < pair < int, int > > v(n);
    long long ans = 0, add = cmp - sum, here;
    ans += here * v[ptr].first;
    

    You multiply long long by int which makes the result of multiplication lower than intended, therefore the answer is less than it's supposed to be.

    EDIT: But I'm right! You just have to switch all ints to long longs and your solution will pass! I just tested it: 8928368. This is absolutely same as your submission except I changed all ints to long longs

    EDIT2: Ok, this is not even funny, why am I getting downvoted for trying to help? And people wonder why I have trust issues.

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

      Its not that line. here is a longlong so the result of the multiplication is still a longlong. I'm going to guess the culprit is cmp = avg*n*1LL — since multiplication is left-associative, it multiplies avg by n before converting the result to longlong.

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

Waiting for editorial. Can anyone please explain how to solve E?

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

Deleted

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

Can anyone explain why this submission for problem C is giving RTE on test case #11, and why is this code getting accepted? All i have changed is in the comp function: "<=" comparison to "<" ?

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

Sorry if this isn't the right place to ask clarifications.

For Problem C) I checked the editorial and my java solution appears to be correct. All I am doing is a sort and then a O(n) linear calculation, but my code is timing out in 1000 sec for the worst case test. (10000 items). Test for 1000 items is 92 ms, so it appears 10000 is probably > 920 ms but my code looks right. 8920114

Can anyone clarify? This is really puzzling. I don't know if I should switch to C++ because of this.