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

Привет, Codeforces!

10 апреля в 17:35 по Москве начнётся Educational Codeforces Round 42.

Продолжается серия образовательных раундов в рамках инициативы Harbour.Space University! Подробности о сотрудничестве Harbour.Space University и Codeforces можно прочитать в посте.

Этот раунд будет рейтинговым для Div. 2. Соревнование будет проводиться по немного расширенным правилам ACM ICPC. После окончания раунда будет период времени длительностью в один день, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачами вместе со мной занимался Александр fcspartakm Фролов. Также мы поблагодарим Николая KAN Калинина, Григория vintage_Vlad_Makeev Резникова и Владимира vovuh Петрова за тестирование и помощь в подготовке раунда.

Удачи в раунде! Успешных решений!

UPD: Подлетела информация от нашего партнёра Harbour.Space University

The third Hello Programming Bootcamp finished as teams from around the world learned, competed, and got to know each other in the cities of Kollam and Moscow.

“I'm positively surprised with the level and number of Indian teams. I believe when following a systematic and regular training schedule — they will certainly attend top world records in programming” says Mike MikeMirzayanov Mirzayanov.

The results of the India boot camp are as follows:

We would like to congratulate the top teams from the India side in both divisions A and B — and especially recognise division A’s winner: Team SDV — Vasily platypus179 Alferov, Vaibhav gvaibhav21 Gosain, Motasem Motarack AL-Kayed sponsored by Social Discovery Ventures, and winners of the Educational Codeforces Round 39.

The division A winners are: Team SDV (platypus179, gvaibhav21, Motarack), TheVindicators (IIIT Kharagpur) (pranjal.ssh, Chenghiz), DomiNUS (NU of Singapore) (vodanhna, darknsux, minh141198).

The division B winners are: BEU Programmers (Baku Engineering University) (mahmud2690, Mamedov, fuck_coderinuse), Penza State University (Fortin, WooDeND, Key_J) and Sab_lite_hai (IIT(BHU),Varanasi) (Enigma27, Dsingh_24, nitishk24).

All results from India side
All results from Russia side

From the ever present in ACM World Finals city of Moscow, to the new-comer on the world stage city of Kollam — Hello India x Russia Programming Bootcamp showcased heart, passion, and a universal drive towards a better competition.

“It's the first time I participate at Hello ACM-ICPC Bootcamp in Asia and I admire local hospitality and students motivation. Everyone seems to be eager to learn, participants stay very late upsolving the contest problems and revising the topics they were thought during the day” states Gleb GlebsHP Evstropov, The Coordinator of the Programming Committee.

The latest in world finals simulation training would not be possible without the bronze sponsorship of VTB, the institute with the most extensive international network of any Russian bank, boasting more than 30 banks and financial companies in more than 20 countries.

Fill out this form and we will keep you up to date on our next boot camp!

UPD: Разбор

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

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

MikeMirzayanov as problemsetter :D

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

I think you meant April 10 in the post instead of April 14

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

Дата на ссылке timeanddate не совпадает с таковой при переходе по оной

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

Dreaming of purple after this contest! Good luck to everyone

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

Enjoyable When two education Round occurs very closely <3 <3

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

Just became Purple again... But I will still take part in the contest.

Good luck to everyone!!

»
7 лет назад, # |
Rev. 3   Проголосовать: нравится +87 Проголосовать: не нравится

Dear contest setter MikeMirzayanov, please Give thanks to MikeMirzayanov for this awesome codeforces platform.. :D

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

dedication for users by "MikeMirzayanov"*

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

Good luck to everyone!

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

Good luck to everyone!

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

I want a problem on dp

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

Just 20 minutes before the contest can we see 6000+ participation :)

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

typo : its IIT Kharagpur not IIIT Kharagpur

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

i think you have to stop rounds until you update servers

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

Today's E is a copy-paste of New Year and Rainbow Roads from Goodbye 2017.

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

    Why are you posting this before the round ends?

    • »
      »
      »
      7 лет назад, # ^ |
        Проголосовать: нравится -133 Проголосовать: не нравится
      Комментарий удален по причине нарушения правил Codeforces
      • »
        »
        »
        »
        7 лет назад, # ^ |
          Проголосовать: нравится +60 Проголосовать: не нравится

        I didn't know that pointing out a question was copied from CodeForces contest itself, that too, a very recent one and the one with the most registrants ever made me dumb.

        Thank you for your insight. Maybe have the balls to say it from your main account instead of hiding behind a fake one.

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

        Wow great logic -_-

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

      Ah, I'm sorry. The contest was almost at an end, and I thought of leaving for dinner..

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

    So to me seems like a notorious coincidence :)

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

    Two questions:

    Can we just copy paste during contest (since it was a past round and we can use the code)

    And will the round be unrated because of this?

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

      Yes, you can. You can read the rules about using another's code.

      This is educational round, so I don't think it's such a big deal about copypasted problems.

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

    Guys, I apologize for the coincidence of tasks. It was a really unexpected surprise for me. It seems that Lewin and I read the same articles.

    • »
      »
      »
      7 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится -6 Проголосовать: не нравится

      Unrated?

      Edit. It should be, given that despite copy-pasting the exact same problem, there were still some issues with it at the beginning...

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

      Please don't make it unrated. Will be very unfair for the majority.

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

        Define "unfair" The way I see it, people who copy-pasted the code had an "unfair" advantage and people who didn't copy-paste the code implicitely had an "unfair" disadvantage. Since the category "people who didn't copy-paste the code" represents the majority, it follows that the majority had an "unfair" disadvantage.

        I"m not saying that the round should be unrated (I'm not saying the opposite either), but "will be very unfair for the majority" seems like a misleading statement to me.

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

      I received a mail about violating the rules of the contest, by copying the code.

      I really copy other solution but the solution was published before the contset. It was the solution of the 908F.I don't know whether i violated the rule.

      My solution : http://mirror.codeforces.com/contest/962/submission/37173319

      The code I took it from: http://mirror.codeforces.com/contest/908/submission/33845527

      Please nullify the claim that I collaborated with someone else during the contest. It is pure coincidence that they took the same code.

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

        Probably someone else copied the same solution so these solutions are same which is violating the rules

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

          Thanks for your reply. But int this passage [Your text to link here...]` ,it says that we can use the code which is published before the contest . QAQ

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

            You can use it but system will find out if there are two simillar solutions which is forbiden. You legitametly copied solution but someone else did too

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

Fuck me, spend an hour coding F with wrong solution, i extracted nodes in simple cycles not edges.

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

Was G "Weiler Atherton" polygon clipping?

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

In problem A, what is the correct answer for: 4 1 2 1 3

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

Runtime error on test 15 in problem D. Can anyone help?

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

    I think this might be the problem:


    Here


    Here

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

      Mapa contains compressed indexes, so it shouldnt have more than 2 milion element.

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

        mapa[2*idx[i]] will exceed 2000010?

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

          Why would it? There wont be 2 milion elements in mapa. You see that mapa[val] = compressed_val

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

            Oh so you are storing compressed values, i didn't look at it

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

            I think kapillamba4 is right idx could have a huge value since its based on elements in vector b:

            idx[cnt] = b[i];
            
            • »
              »
              »
              »
              »
              »
              »
              7 лет назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              Yes but nums [ mapa [ 2 * idx [ i ] ] ] is not a problem because idx, has huge value, but mapa is map<int,int>, so mapa[ huge_value ] is not a problem.

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

                I think its possible you are generating more than 2000010 different values, since your inner loop runs around ~59 times

                if( a[i]*k > maxx/2 )
                

                and there could be up to 150 000 different values you will end with more than 2M elements.

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

                  thank you. it may be the problem.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  7 лет назад, # ^ |
                  Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

                  Try Creating a test case for all numbers 2 to 150000. This test case will give segfault related to mapa

                  Replace 2000010 by 3000010 everywhere and you won't get segfault anymore

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

                  I think 3000010 wont be enough :( because as he said, it can be about 60 operations in while loop.

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

Does anyone have any idea about pretest 10 in B?!

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

problem G seems to be exactly https://main.edu.pl/en/archive/oi/5/okn

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

    Does O(N^2) solution passes problem G? I don't see how can you check whether a line segment completely lies within a polygon quacker .... quicker than O(N) time deterministicly.

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

Did someone solve E using MST?

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

how to solve D ?

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

    I have runtime error on test 15, but i think my idea is correct. Index compression and keep indexes for every value. go from 1 to compressed_max_val, sort indexes and do what problem tells exactly.

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

    make a map map<ll,set<int>>mp in which you insert the index of each number

    for each pair in mp you need to remove the first two elements in the set. before doing that, you need to insert the second item of the set into key*2 you will have to repeat this step while the size of the current set greater than 1

    take a look at this code

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

    I have solved this problem by using Priority_Queue . Thanks all :)

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

Problem E Test Case 11 anyone?

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

deleted

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

Problem E, Why is the output for this case 10 and no 7? 4 1 P 2 R 6 R 8 P

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

Even though it is Educational round, is it legit to just copy&paste previous Codeforces contest problem? I don't think it is a good idea.

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

    Please don't make the queue even longer.

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

    Oh you mean when people copy paste past codes in under 2 minutes is not legit?

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

      Then what should the contestants do? Should they have to write all the code again, when knowing that there is already an accepted code in somewhere else? What's the difference between copy&pasting segtree/MaxFlow/FFT algorithm and copy&pasting exact same code on exact same problem?

      It's perfectly legit to copy & paste previous code. It is open to everyone (On previous contest's submission history), it is his own written code. We can't blame contestants to use such kind of source codes.

      But it seems too unfair for everyone, isn't it? That's why problemsetters should avoid same problem to the contest.

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

        Actually my sarcasm was in the fact that authors shouldn't copy past problems so that we would be able to copy past codes. Of course once we know the problem we should paste it but what i mean was that there shouldn't be the opportunity to copy something in the first place. So i have the same opinion as you. :D

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

    I hadn't solved the older version of the problem. After the round I submitted my code from this E to the old F from Goodbye only increasing the constraints and it got Accepted. Complete copy-paste of a problem

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

test 11 for D has given WA for quite large part of submissions, what's so special about this one?

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

    what is it? Even I can't debug.

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

    I got WA11 in my first submission, and it was because I was adding the new element to the first position of the two old ones, not the second

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

In problem C

In one operation you can delete any digit of the given integer so that the result remains a positive integer without leading zeros.

In case of 101 why the answer is 2 not 1 (remove first 1 and result is 1).

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

    In one operation you can delete any digit of the given integer so that the result remains a positive integer without leading zeros.

    means that leading zeros must also be deleted.

    01 != 1

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

      I think it means after do an operation the result will remains a positive integer without leading zeros. My bad ;).

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

    According to the problem's statement, one cannot delete a digit in a way that leads to the incorrect number, i.e. 101 → 01 is prohibited. Hence, one should make the following operations: 101 → 11 → 1 (two operations).

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

i think this round should be unrated, Problem E is literally copy paste from goodbye 2017 F, it is unfair for someone who hasn't solved it before

goodbye 2017 F http://mirror.codeforces.com/contest/908/submission/37175943

Educational Codeforces E http://mirror.codeforces.com/contest/962/submission/37171865

it won't affect my rating anyway

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

I think there is a mistake in Institute name of TheVindicators. It should be IIT Kharagpur instead of IIIT Kharagpur

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

there will be manyyyyyyyyyy hacks in problem A

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

Someone please hack my C and D.

»
7 лет назад, # |
Rev. 3   Проголосовать: нравится +176 Проголосовать: не нравится

An update of this comment : (sorry for my editing skills)

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

I do all my hacks in problem 962A - Equator with this test case:

2
2 3

PD: And I was hacked too...

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

MikeMirzayanov, what article did you saw? (I'm just curious, and I want to know about the theory behind)

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

Why? I am test in debug and release screen code

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

Can somebody confirm that %lld started working on Codeforces? What is the earliest C++ version for which it works?

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

Please don't make this round unrated, otherwise it would be unfair to me who deserve a massive downfall of rating.

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

Contest should be rated IMO. Would affect the majority of the people very heavily, moreover not many people solved E from div 2 so let it just be a coincidence and move on from this, but no need for the contest to be unrated.

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

Loooooooooooooool I submit the same code of problem E in goodby 2017 F only I change only 'P' to 'G'

goodbye 2017 F http://mirror.codeforces.com/contest/908/submission/37179332

Educational Codeforces today http://mirror.codeforces.com/contest/962/submission/37172686

this round should be unrated it`s not fair I spend more than 1 hour to solve it and others take it copy & paste !!!!!!!!!!

Educational round learns us how to make a copy and paste from previous rounds !!!!!

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

    How many people solved E and how many of them was Div2(and maybe how many of those saw the problem before) ?

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

      well there is a lot of people participating in the Goodbye 2017.

      30 or 50 Div2 copy-paster could affect a lot of near-purple guy.

      and even "if" there is less than ten people that copy paste it. Updating the rating when there is a flaw in the contest isn't "competitive".

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

        Are there official rules/guidelines for when contests are changed from rated to unrated? At the moment, it seems like it's at the discretion of MikeMirzayanov (not that there's anything wrong with that).

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

    If you have code for a previous problem that can be applied to a current problem, and it is allowed to copy + paste, then why wouldn't you? It similar to having a template on hand for segment tree, or max flow. It's not something that should be learned, but should be obvious for a competitor.

    Furthermore, Goodbye 2017 happened on CF and after the contest ended all submissions were made public so everyone have the opportunity to upsolve and make their own solutions for E.

    It was unfortunate that a problem happened to be exactly the same as one before, but invalidating the round would be too much of a takeaway from the time and effort the problem setter put in, and the competitors as well. If you feel like you placed lower this round due to an unfair advantage by others, then just do better than them next round when it won't be so unlucky (hopefully).

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

      By your logic, it would be entirely OK to have a round consisting solely of problems which were previously seen in other contests on CF. At that point, the contest no longer tests programming skills, but who can search through previous contests (and editorials) better and more efficiently.

      Also, "If you feel like the round was unfair, just do better next time" to me sounds like a very superficial (and somewhat insulting) statement.

      P.S. I'm not taking sides here. Not saying the round should be unrated (not saying that it should be rated either). Just pointing out your arguments towards keeping it rated are not very consistent.

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

        On your second point, I'm not saying that he has to do better (as if it was his fault that he got "cheated"). I said that he can "just do better than them" next contest. If you're the better competitor but someone else used an unfair advantage to get ahead, then that sucks, but you have opportunities (future contests) to show that you are better and earn back any undeserved rating (and it is possible for them to lose it as well). Things will return to what they belong in the long run.

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

        On your first point, I'm not saying that a contest should be kept rated if every question was a previous question with a new story. I'm just saying that in this case where one question happened to be a repeat that the contest should be kept rated. I didn't think about what should be done in the extreme case.

        However, Googling solutions and bruteforcing small cases then searching OEIS is already a "technique" that people use to solve problems. It wouldn't be such a big jump to search old editorials for hints/solutions to similar problems if there was an efficient way to do so.

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

So hack period was limited to 12 hours and extended again to 24?

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

How to solve E? :c

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

How to solve B ?

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

When does the System Test begin?

»
7 лет назад, # |
Rev. 5   Проголосовать: нравится -6 Проголосовать: не нравится

In problem D, my solution was working on my local compiler(Ubuntu), but gave me a different answer on the CF judge on the first test case itself (thank god :P)

I tried using the custom invocation command, and realised the output was different (3 2 8 1 instead of 3 8 2 1). Eventually AC'd it by changing the way I played around with the iterators, though could anyone help me out in understanding the reason for this?

Submission link: http://mirror.codeforces.com/contest/962/submission/37165193

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

    I also faced a similar error when i erased 2 elements(first 2) from set but when printing the set, they were not actually erased.

    Submission link

    Edit: works on custom invocation but fails on local.

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

    You've got UB.

    Take a look of set of ones. It is {2, 5, 6}. What iterator is? Is some object pointing to object in container and iterator knows what iterator is next or prev or something else.

    What you did? itr2 points to 2, itr3 points to 5. You did

    (*itr).se.erase((*itr2));
    

    Cool. 2 was removed from set. But what itr2 is pointing to now? It is undefined. So itr2++ is undefined too as goog as result of whole code after. And for different compiler there will be different result.

    How to do it right?

    If you pass iterator to erase function it will remove element iterator points to and return iterator points to next element.

    So you must do something like:

    itr2 = itr->se.erase(itr2);
    
»
7 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Is system testing waiting until 12 hours later?XD

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

So... Why are people saying that it's unfair to the majority if the round is unrated?

A significant but still minority portion of participants solved the problem and got a free problem count from it. Isn't this unfair to those who didn't solved/copied it? (Heck, even if I spend 20mins solving it I am still tanking time penalty.)

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

Hope that the round goes rated.

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

I think G is the same as this problem.

UPD : Sorry I didn't see the above comment.

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

Is there any additional score for a successful hacking attempt?

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

can someone please give me some hint on how to optimize simple O(M^2) solution of F. Thanks!

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

Rated or Unrated ,that is a question.

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

MikeMirzayanov please tell us ?? Rated or Unrated

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

Whether this round goes rated or unrated doesn't matter to me.Bcz I really enjoyed it.

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

I don't know why pepole are asking is this contest will be rated o not.

In this blog, it was clearly mentioned that the contest is Rated for Div. 2.

If for any case, it will be unrated, the post will be also updated. So, I don't think commenting same question is necessary.

»
7 лет назад, # |
Rev. 3   Проголосовать: нравится +21 Проголосовать: не нравится

Problem E was exactly the same as a past problem F:

http://mirror.codeforces.com/contest/908/problem/F

I think most of the participants remember this problem because it was a Good Bye 2017 contest where almost everyone participates. When I remembered that I saw this problem before I got there and copied one of the already accepted codes (The contest was unrated for me anyway). Now I get a message saying that my code coincides with someone else's code (Apparently we both copied Petr's code xD) and that this can lead to my account being blocked !!

MikeMirzayanov Is this really a violation? Is it really my fault that the problem came only a few months before? and on CODEFORCES?

The contest is unrated for me anyway, but I don't want to be treated as a cheater and getting my submissions skipped, in addition to getting a note that this can lead to my account being blocked !!

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

    they shouldn't even think about banning on this particular problem. Bcz almost everyone did that copy-paste on that problem. lets hope that the message was just for formalities.(I am in div-2 and managed to solve only A,B,C)

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

      I hope so. The rules specifically say that it's ok to use codes that were written before the start of the contest, and the code I copied was written about 4 months ago (Thus before the start of the contest)

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

This is ridiculous. In my opinion the contest must be unrated without any doubts.Also seeing the comments in this blog .I think you must respond with some reply to the people .The main thing as per me that differentiates codeforces and other platforms (specially csacademy) is that codeforces accepts its their mistake and gives an apology compared to just ignoring.Hope you dont change..Added upon that doing this adds a lot of frustation.Look into it MikeMirzayanov KAN fcspartakm vintage_Vlad_Makeev

»
7 лет назад, # |
  Проголосовать: нравится -27 Проголосовать: не нравится

Make contest un-rated for people with copy-pasted solutions on E and rated for others. If it is possible think it will be a good solution for the problem.

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

    The rule clearly states that you can use any code publicly distributed before the contest. Why should it be unrated for those who copy-paste?

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

    Some people may have used GB2017's editorial without copying a solution so we can't know who used the editorial... Declaring people who solved E unrated would not be "a good solution" either.

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

TB to the educational round Educational Codeforces Round 37 (Rated for Div. 2)

920E - Connected Components? was a case of 190E - Counter Attack and the contest wasn't get unrated (copy & paste code will work)

it's totally unfair that the contest get unrated ... :|

hope the contest being rated & it'll never happen again :)

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

Still no rating changes :( Like previous educational round it's taking too long

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

I received a mail about violating the rules of the contest, by copying the code. But I have conclusive evidence that I had taken the code from a AC code of another problem, 908F. If u want I can link the solution here, from which I took the code. However, it was present BEFORE this contest began. So I am not sure how this can be a violation of the rules. It's the setters fault that the problem was exactly the same.

My solution : http://mirror.codeforces.com/contest/962/submission/37168611 The code I took it from: http://mirror.codeforces.com/contest/908/submission/33800403

I too had a AC code to this problem:908F (http://mirror.codeforces.com/contest/908/submission/33824171) But that got some error, so I decided to take another code.

Please nullify the claim that I collaborated with someone else during the contest. It is pure coincidence that they took the same code.

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

Can anyone explain how to solve F?

PS:When will the editorial for this round be posted?

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

    Calculate all the double connected component by tarjan (which means the component is connected after any vertex is remove).Let v = (the number of vertexes of the double connected component),e = (the number of edges of double connected component).If u == v then this double connected component is a sample circle.

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

I received a mail about violating the rules of the contest, by copying the code.

I really copy other solution but the solution was published before the contset. It was the solution of the 908F.I don't know whether i violated the rule.

My solution : http://mirror.codeforces.com/contest/962/submission/37173319

The code I took it from: http://mirror.codeforces.com/contest/908/submission/33845527

Please nullify the claim that I collaborated with someone else during the contest. It is pure coincidence that they took the same code.

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

    This is really funny. Anyways, here is the proof that you haven't broken any rules. You used code which was available to the public before the contest which is clearly allowed.

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

      From the link:

      Any usage of third-party code should not violate the right holder’s license or copyright. Remember that published code is not always free to use! At the request of the right holder, any code that violates the license or copyright may be considered as violating the rules.

      We never really got an answer to the 5 year old first comment asking whether it's ok to use other people's previous submissions.

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

        When i see five "skip" , i am so sad. I want to know whether i violated the rule.

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

          I can't put my finger exactly but there was an offline contest(LAN) which was later held as an online round here on cf. This was from some training camp. In that case people who had participated in the local event were asked not to participate. In that case this will be considered cheating but in yours in my humble opinion definitely not cheating.

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

            Thank you! I hope MIKE can reply me. But i got some lessons,i will be stronger and do the problem myself!

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

My Rating is going to increase , but still i think so making this contest Rated Will be Unfair for many people and even for me , because I_Love_Mohan_Pyare .

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

The decision is made. This round is rated.

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

Can any body explain to me why I'm unrated for both ECR41 and ECR42. I don't think I'm against the rules.

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

Copyforces should atleast reply something now.

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

Great! This contest is was held in the suitable time!I could watch the UCL quarter-final 2nd legs:AS Roma vs Barca.It really a history match.(sorry for my poor english).

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

Does this round have ranklist and hacker ranklist, and when will they be updated?

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

Anyone knows why i get WA 11? I am trying to do MST. 37176128

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

In problem E.The answer of 3 0 P 1 B 2 P is 2 or 3?

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

And the editorial is gone...

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

Where is the editorial???

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

Can someone help me figure out how to solve the problem B? I've already read some solutions, but I couldn't come up with my own answer, and I am not sure how to solve it by greedy. Thanks in advance!

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

For all of the users with skipped solutions because of used public codes of 908F: for sure, I'll revert the punishment, it is not a violation (see http://mirror.codeforces.com/blog/entry/8790).

Currently I just arrived to Beijing and Internet connection in my hotel is really bad. Is it good idea to buy local sim-card to have stable Internet? What provider/tariff can you suggest?

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

    Buying local sim-card is ok, when my internet is not stable I always use sim-card to connect CF and it always work.

  • »
    »
    7 лет назад, # ^ |
    Rev. 4   Проголосовать: нравится +9 Проголосовать: не нравится

    Welcome to China. Unfortunately, the delay in accessing codeforces and other foreign websites is relatively high. However, the local SIM card I used has always worked well. You may need a VPN or SS. In addition, in China you cannot directly access Google or YouTube's website because of the existence of GFW.

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

    My phone with China Unicom's plan can visit codeForces properly. It may be slow while first access, but it will work fine later. Good time in BJ.

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

    If you connect the Internet in China (like www.baidu.com) bad,you should buy local sim-card. Otherwise,you should use a vpn.

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

    Maybe daily card is suitable for you (1G/day 1yuan/day)

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

Who can tell me how to solve the problem F?qwq

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

Why have the ratings decreased?