By MikeMirzayanov, 10 days ago, translation, In English,

Hello Codeforces!

On April 10, 14:35 UTC Educational Codeforces Round 42 will start.

Series of Educational Rounds continue being held as Harbour.Space University initiative! You can read the details about the cooperation between Harbour.Space University and Codeforces in the blog post.

This round will be rated for Div. 2. It will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 7 problems and 2 hours to solve them.

The problems were prepared by me and Alex fcspartakm Frolov.

We'd like to thank Nikolay KAN Kalinin, Grigory gritukan Reznikov, Vladimir Vovuh Petrov for the testing and help in preparing the round.

Good luck to all participants!

UPD: Some information from Harbour.Space U

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) (evil666man, 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: Tutorial

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

»
10 days ago, # |
  Vote: I like it +25 Vote: I do not like it

MikeMirzayanov as problemsetter :D

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +143 Vote: I do not like it
    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      When was the last time you were a contestant?

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it +13 Vote: I do not like it

      WOW!! Is there anybody in codeforces involved in more problem setting than you? Wish to see you in contest as contestant just once.

      • »
        »
        »
        »
        10 days ago, # ^ |
          Vote: I like it +123 Vote: I do not like it

        Thanks! I like to take part in contests for now. But each time I can take part in a contest, I think about time I can dedicate to development of Codeforces. You see that there are a lot of ideas around Codeforces I want to be implemented. Each time I think like "it is better to improve Codeforces than have fun taking part in a contest".

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yeah, you "sometimes" write problems :)

      I think there is a better word than sometimes :) You write so many problems.

»
10 days ago, # |
  Vote: I like it +91 Vote: I do not like it

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

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +118 Vote: I do not like it

    Thanks, fixed. I was testing your attentiveness.

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it +14 Vote: I do not like it

      We somehow got used to your "I was testing your attentiveness" phrase during bootcamp. Thanks for perfect lectures and taking care of each student.

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it +11 Vote: I do not like it

      is it same as you check our attentiveness during camp?

»
10 days ago, # |
  Vote: I like it +5 Vote: I do not like it

Dreaming of purple after this contest! Good luck to everyone

»
10 days ago, # |
  Vote: I like it +4 Vote: I do not like it

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

Good luck to everyone!!

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    You won't be affected in this round by any rating change. It's only rated for Div 2 contestants :)

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it +2 Vote: I do not like it

      Contests are good for practice, you shouldn't just do them to increase your rating.

      • »
        »
        »
        »
        10 days ago, # ^ |
          Vote: I like it +22 Vote: I do not like it

        And I only replied because I thought he may have forgot about it or doesn't know.

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thats the spirit .

»
10 days ago, # |
Rev. 3   Vote: I like it +87 Vote: I do not like it

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

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +138 Vote: I do not like it

    I express my gratitude to myself for ten years of efforts to develop Codeforces and Polygon!

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

dedication for users by "MikeMirzayanov"*

»
10 days ago, # |
  Vote: I like it +3 Vote: I do not like it

Good luck to everyone!

»
10 days ago, # |
  Vote: I like it +1 Vote: I do not like it

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

»
10 days ago, # |
Rev. 3   Vote: I like it +3 Vote: I do not like it

typo : its IIT Kharagpur not IIIT Kharagpur

»
10 days ago, # |
  Vote: I like it +1 Vote: I do not like it

i think you have to stop rounds until you update servers

»
10 days ago, # |
  Vote: I like it +115 Vote: I do not like it

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

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +32 Vote: I do not like it

    Why are you posting this before the round ends?

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it -133 Vote: I do not like it
      The comment removed because of Codeforces rules violation
      • »
        »
        »
        »
        10 days ago, # ^ |
          Vote: I like it +60 Vote: I do not like it

        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.

      • »
        »
        »
        »
        10 days ago, # ^ |
          Vote: I like it -6 Vote: I do not like it

        Wow great logic -_-

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it +25 Vote: I do not like it

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

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +64 Vote: I do not like it

    So to me seems like a notorious coincidence :)

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    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?

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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.

      • »
        »
        »
        »
        10 days ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        Isn't it that the ideas of the problems can be well known (or something like that) and not the whole problem?

      • »
        »
        »
        »
        10 days ago, # ^ |
          Vote: I like it +11 Vote: I do not like it

        Well it is kind of a big deal, it is rated for Div 2.

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +41 Vote: I do not like it

    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.

    • »
      »
      »
      10 days ago, # ^ |
      Rev. 2   Vote: I like it -6 Vote: I do not like it

      Unrated?

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

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

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

      • »
        »
        »
        »
        9 days ago, # ^ |
          Vote: I like it +13 Vote: I do not like it

        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.

    • »
      »
      »
      9 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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://codeforces.com/contest/962/submission/37173319

      The code I took it from: http://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.

      • »
        »
        »
        »
        9 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

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

        • »
          »
          »
          »
          »
          9 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          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

          • »
            »
            »
            »
            »
            »
            9 days ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            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

»
10 days ago, # |
  Vote: I like it -7 Vote: I do not like it

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

»
10 days ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

Was G "Weiler Atherton" polygon clipping?

»
10 days ago, # |
  Vote: I like it +1 Vote: I do not like it

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

  • »
    »
    10 days ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    3

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Should be 3. Because on day 2, 3 problems will be done which is less than half of total problems. On day 3, 4 problems will be completed which is more than half of the problems.

  • »
    »
    9 days ago, # ^ |
      Vote: I like it -9 Vote: I do not like it

    3

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    I think this might be the problem:


    Here


    Here

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

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

      • »
        »
        »
        »
        10 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

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

        • »
          »
          »
          »
          »
          10 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

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

          • »
            »
            »
            »
            »
            »
            10 days ago, # ^ |
              Vote: I like it +1 Vote: I do not like it

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

            • »
              »
              »
              »
              »
              »
              »
              10 days ago, # ^ |
                Vote: I like it +9 Vote: I do not like it

              Yes. Anyway, thanks for trying to help me!

          • »
            »
            »
            »
            »
            »
            10 days ago, # ^ |
            Rev. 2   Vote: I like it 0 Vote: I do not like it

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

            idx[cnt] = b[i];
            
            • »
              »
              »
              »
              »
              »
              »
              10 days ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              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.

              • »
                »
                »
                »
                »
                »
                »
                »
                10 days ago, # ^ |
                Rev. 3   Vote: I like it 0 Vote: I do not like it

                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.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  10 days ago, # ^ |
                    Vote: I like it 0 Vote: I do not like it

                  thank you. it may be the problem.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  10 days ago, # ^ |
                  Rev. 4   Vote: I like it 0 Vote: I do not like it

                  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

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  10 days ago, # ^ |
                    Vote: I like it 0 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it +55 Vote: I do not like it

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

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
10 days ago, # |
  Vote: I like it +7 Vote: I do not like it

Did someone solve E using MST?

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

how to solve D ?

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I used map<long long, set > to map all numbers to the list of indices. I have another set which contains all the numbers, I iterate through this set making changes to the mapping when required. I seems to work. During the contest I accidentally used map<int, ...> which results in overflow so my solution got TLE. My solution: http://codeforces.com/contest/962/submission/37177161

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    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

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it +7 Vote: I do not like it

Problem E Test Case 11 anyone?

  • »
    »
    10 days ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    Don't know about your solution, but mine also failed on test 11 and I've found this counter-test:

    5
    0 P
    4 B
    5 P
    6 R
    10 P
    

    Answer seems to be 12

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    6 0 P 1 B 2 R 998 R 999 B 1000 P

    Answer: 1006

    Mine was failing with this

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it +93 Vote: I do not like it

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.

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    Please don't make the queue even longer.

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it +41 Vote: I do not like it

      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.

      • »
        »
        »
        »
        10 days ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        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

        • »
          »
          »
          »
          »
          10 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          I misunderstood your opinion a lot. I'm sorry for it.

          Really yes, contest should not be copy & paste contest.

          • »
            »
            »
            »
            »
            »
            10 days ago, # ^ |
              Vote: I like it +1 Vote: I do not like it

            No problem XD

  • »
    »
    10 days ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    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

»
10 days ago, # |
  Vote: I like it +7 Vote: I do not like it

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

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    what is it? Even I can't debug.

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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).

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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

    • »
      »
      »
      10 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    10 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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).

»
10 days ago, # |
Rev. 2   Vote: I like it +53 Vote: I do not like it

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://codeforces.com/contest/908/submission/37175943

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

it won't affect my rating anyway

  • »
    »
    10 days ago, # ^ |
    Rev. 2   Vote: I like it +7 Vote: I do not like it

    Making this contest unrated will also be unfair to more people, won't it?

»
10 days ago, # |
  Vote: I like it +6 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it +4 Vote: I do not like it

there will be manyyyyyyyyyy hacks in problem A

»
10 days ago, # |
  Vote: I like it +11 Vote: I do not like it

Someone please hack my C and D.

»
10 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

if I got hacked.. the problem does not count for me, right? so if I hacked a solution, shouldn't it help to rais my rating ?? please answer

»
10 days ago, # |
Rev. 3   Vote: I like it +176 Vote: I do not like it

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

»
10 days ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

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

2
2 3

PD: And I was hacked too...

»
10 days ago, # |
  Vote: I like it +47 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it +5 Vote: I do not like it

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

»
10 days ago, # |
  Vote: I like it +19 Vote: I do not like it

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.

»
10 days ago, # |
  Vote: I like it +35 Vote: I do not like it

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

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

Educational Codeforces today http://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 !!!!!

  • »
    »
    9 days ago, # ^ |
    Rev. 2   Vote: I like it +19 Vote: I do not like it

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

    • »
      »
      »
      9 days ago, # ^ |
      Rev. 2   Vote: I like it +10 Vote: I do not like it

      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".

      • »
        »
        »
        »
        9 days ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        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).

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +36 Vote: I do not like it

    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).

    • »
      »
      »
      9 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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.

      • »
        »
        »
        »
        9 days ago, # ^ |
          Vote: I like it +17 Vote: I do not like it

        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.

      • »
        »
        »
        »
        9 days ago, # ^ |
          Vote: I like it +14 Vote: I do not like it

        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.

»
10 days ago, # |
Rev. 2   Vote: I like it -42 Vote: I do not like it

That’s it from now on i’m going to use only doubles :D

  • »
    »
    9 days ago, # ^ |
    Rev. 2   Vote: I like it -40 Vote: I do not like it

    1) Don't write about your personal frustrations here. You solution was wrong ? Too bad, try again next time.
    2) Try to think about the limits and edge cases. w.r.t Problem A: See that n can be at max 200000 = 2*10^5 and ai can be 10000=10^4 therefore the maximum sum of the entire array can be 2*10^9 which a 32 bit Integer can easily hold. Even I made the mistake of using an Int64 which was not required but not wrong nonetheless. You instead used a Float32. Go and read about how a float is stored inside a computer(IEEE 754) and realize what you have done and that every value <= 2e9 cannot be represented by it.

»
9 days ago, # |
  Vote: I like it +8 Vote: I do not like it

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

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    And now it's back to 12? This is weird.

»
9 days ago, # |
  Vote: I like it +2 Vote: I do not like it

How to solve E? :c

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve B ?

»
9 days ago, # |
  Vote: I like it +30 Vote: I do not like it

When does the System Test begin?

»
9 days ago, # |
Rev. 5   Vote: I like it -6 Vote: I do not like it

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://codeforces.com/contest/962/submission/37165193

  • »
    »
    9 days ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    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.

  • »
    »
    9 days ago, # ^ |
    Rev. 3   Vote: I like it +7 Vote: I do not like it

    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);
    
»
9 days ago, # |
  Vote: I like it +9 Vote: I do not like it

Is system testing waiting until 12 hours later?XD

»
9 days ago, # |
  Vote: I like it +11 Vote: I do not like it

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.)

»
9 days ago, # |
  Vote: I like it +6 Vote: I do not like it

Hope that the round goes rated.

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

This contest looked great but I was in work & only possible to do 1 hour :/

When will the next education round be? Please do 7 questions again

»
9 days ago, # |
Rev. 2   Vote: I like it +12 Vote: I do not like it

I think G is the same as this problem.

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

»
9 days ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Is there any additional score for a successful hacking attempt?

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No, there is no additional score for successful hacking attempt in Educational Rounds Afaik

»
9 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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

»
9 days ago, # |
  Vote: I like it +21 Vote: I do not like it

Rated or Unrated ,that is a question.

»
9 days ago, # |
  Vote: I like it +29 Vote: I do not like it

MikeMirzayanov please tell us ?? Rated or Unrated

»
9 days ago, # |
  Vote: I like it +7 Vote: I do not like it

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

»
9 days ago, # |
Rev. 2   Vote: I like it +12 Vote: I do not like it

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.

»
9 days ago, # |
Rev. 3   Vote: I like it +21 Vote: I do not like it

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

http://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 !!

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

    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)

    • »
      »
      »
      9 days ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      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)

»
9 days ago, # |
  Vote: I like it +12 Vote: I do not like it

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 gritukan

»
9 days ago, # |
  Vote: I like it -27 Vote: I do not like it

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.

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +20 Vote: I do not like it

    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?

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
9 days ago, # |
  Vote: I like it +31 Vote: I do not like it

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 :)

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

hope this contest will be rated

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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://codeforces.com/contest/962/submission/37168611 The code I took it from: http://codeforces.com/contest/908/submission/33800403

I too had a AC code to this problem:908F (http://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.

»
9 days ago, # |
  Vote: I like it +10 Vote: I do not like it

Can anyone explain how to solve F?

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

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    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.

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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://codeforces.com/contest/962/submission/37173319

The code I took it from: http://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.

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    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.

    • »
      »
      »
      9 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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.

      • »
        »
        »
        »
        9 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

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

        • »
          »
          »
          »
          »
          9 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          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.

          • »
            »
            »
            »
            »
            »
            9 days ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

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

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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 .

»
9 days ago, # |
  Vote: I like it +12 Vote: I do not like it

The decision is made. This round is rated.

»
9 days ago, # |
Rev. 2   Vote: I like it +12 Vote: I do not like it

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

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It's probably a bug. You should have received your rating.

»
9 days ago, # |
  Vote: I like it -11 Vote: I do not like it

Copyforces should atleast reply something now.

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

When editorial will be posted?

»
9 days ago, # |
  Vote: I like it +9 Vote: I do not like it

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).

»
9 days ago, # |
  Vote: I like it +17 Vote: I do not like it

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

»
9 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
9 days ago, # |
  Vote: I like it +8 Vote: I do not like it

And the editorial is gone...

»
9 days ago, # |
  Vote: I like it +12 Vote: I do not like it

Where is the editorial???

»
8 days ago, # |
  Vote: I like it +1 Vote: I do not like it

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!

»
8 days ago, # |
  Vote: I like it +46 Vote: I do not like it

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://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?

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

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

  • »
    »
    8 days ago, # ^ |
    Rev. 4   Vote: I like it +9 Vote: I do not like it

    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.

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

    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.

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

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

  • »
    »
    8 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

»
8 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
7 days ago, # |
  Vote: I like it +3 Vote: I do not like it

Why have the ratings decreased?