Supermagzzz's blog

By Supermagzzz, 6 months ago, translation, In English

Hello, Codeforces!

<almost-copy-pasted-part>

Hello! Codeforces Round #710 (Div. 3) will start at Mar/25/2021 17:35 (Moscow time). You will be offered 7 problems with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating 1600 or higher, can register for the round unofficially. The round will be hosted by rules of educational rounds (extended ICPC). Thus, during the round, solutions will be judged on preliminary tests, and after the round it will be a 12-hour phase of open hacks. I tried to make strong tests — just like you will be upset if many solutions fail after the contest is over.

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

Note that the penalty for the wrong submission in this round (and the following Div. 3 rounds) is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as trusted participants of the third division, you must:

  • take part in at least two rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

The problems for this round were invented by MikeMirzayanov, Supermagzzz, Stepavly and sodafago.

Thanks to darkkcyan, bugdone, harlequen, iankury, bfs.07, songsinger, infinitepro, sodafago, Gassa, Rox, sharepoLOVEDDD for testing this round.

Thanks to MikeMirzayanov for platforms and coordination of our work. Good luck!

</almost-copy-pasted-part>

UDP: Editorial is ready

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

»
6 months ago, # |
  Vote: I like it -120 Vote: I do not like it

Finally another Div 3! I was half expecting to go a month without one... Wishing everyone an enjoyable contest and positive delta!

»
6 months ago, # |
  Vote: I like it -147 Vote: I do not like it

Always so exciting to have these Div 3's in my life!

»
6 months ago, # |
  Vote: I like it -115 Vote: I do not like it

Isn't it risky to have a round without testers? Are there are some hidden testers for Div-3 rounds :P?

»
6 months ago, # |
  Vote: I like it -223 Vote: I do not like it

Can't wait for my first Div3 Round....

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

    Please change your profile picture first, why do you put such profile pictures on a platform like codeforces. It doesn't make sense at all, please change it!!

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

      It's weird that in this comment section your comment is the only one that still has upvotes :)))

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

      Naughty animals don't belong here either.

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

    MikeMirzayanov sir, plzz ban this kind of users.

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

    your wife is hot man

»
6 months ago, # |
  Vote: I like it -93 Vote: I do not like it

»
6 months ago, # |
  Vote: I like it -86 Vote: I do not like it

I'm waiting this contest since days ... it's best for me ^_^ We hope that are no any mistakes during the contest ... Thanks for your efforts !!

»
6 months ago, # |
Rev. 3   Vote: I like it -53 Vote: I do not like it

My chance to become green

»
6 months ago, # |
  Vote: I like it -98 Vote: I do not like it

Wishing you all A big positive delta!!

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

    U should have wished for positive upvotes in comment section.

»
6 months ago, # |
  Vote: I like it -89 Vote: I do not like it

wow, there's no comments with more likes than dislikes.

»
6 months ago, # |
  Vote: I like it -62 Vote: I do not like it

Are you saying no matter what I write I will still get downvotes

»
6 months ago, # |
  Vote: I like it -52 Vote: I do not like it

![ ](11)

»
6 months ago, # |
Rev. 2   Vote: I like it -63 Vote: I do not like it

َ

»
6 months ago, # |
Rev. 2   Vote: I like it -62 Vote: I do not like it

Downvote this comment if you wants be red on HackerRank

»
6 months ago, # |
  Vote: I like it -71 Vote: I do not like it
string s="sretovnwod uoy etah";
reverse(s.begin(), s.end());
cout<<s<<endl;
»
6 months ago, # |
Rev. 2   Vote: I like it -56 Vote: I do not like it

.

»
6 months ago, # |
Rev. 2   Vote: I like it -47 Vote: I do not like it

Will any comment here get upvoted?

»
6 months ago, # |
  Vote: I like it -40 Vote: I do not like it

After the div2 brutal round hopefully this contest will serve as a motivation to continue CP! haha

»
6 months ago, # |
  Vote: I like it -19 Vote: I do not like it

plot twist: this comment is gonna get downvoted

»
6 months ago, # |
  Vote: I like it -22 Vote: I do not like it

1-gon write a comment under this blog. Let's see if you can get more upvotes than downvotes

»
6 months ago, # |
Rev. 3   Vote: I like it -25 Vote: I do not like it

why too much down votes in every comment?

»
6 months ago, # |
  Vote: I like it -17 Vote: I do not like it

Guys let me compete with 1-gon for 1 rank in contribution, I need your help to achieve that goal!!!

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

    Upvoted. I think you have a lot of work to do. You made a few mistakes with this comment, such as not posting it immediately after the announcement comes out. Also, in this comment you state that you have a particular goal and people should upvote you to help you reach that goal. Unfortunately, this will isolate people who are willing to upvote you for different reasons. So, you should not state any reasons or argument for why the reader should upvote you. Instead, just directly command them.

»
6 months ago, # |
  Vote: I like it -19 Vote: I do not like it

MIKE IS GREAT AND CODEFORCES IS COOLEST CP PLATFORM.....DOWNVOTE IF DISASGREE

»
6 months ago, # |
  Vote: I like it -15 Vote: I do not like it

Why all comments are getting downVote?

»
6 months ago, # |
  Vote: I like it -14 Vote: I do not like it
Spoiler
»
6 months ago, # |
  Vote: I like it -17 Vote: I do not like it
Spoiler
»
6 months ago, # |
  Vote: I like it -23 Vote: I do not like it

We Want vovuh in upcoming div3 rounds :P

»
6 months ago, # |
  Vote: I like it -23 Vote: I do not like it

Is it rated?

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

    I just asked a simple question. Why downvote me?

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

      Why u going on downvoting my posts? ATLEAST ANSWER MY QUESTION FIRST. IS IT RATED OR NOT

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

      Because you don't like reading blog carefully, Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

»
6 months ago, # |
  Vote: I like it -26 Vote: I do not like it

The number of downvotes to this comment will be my delta in this contest.

»
6 months ago, # |
  Vote: I like it -37 Vote: I do not like it

I hope I will get some positive contribution for my courage to comment.

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

    you hope to get some positive contribution for your courage to comment from your alt?

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

      I always use this id. see my contribution :)

»
6 months ago, # |
  Vote: I like it -24 Vote: I do not like it

Downvote

»
6 months ago, # |
  Vote: I like it -20 Vote: I do not like it

Idiots

»
6 months ago, # |
  Vote: I like it -25 Vote: I do not like it

Am I able to get this thing-"The comment is hidden because of too negative feedback, click here to view it"?

»
6 months ago, # |
  Vote: I like it -17 Vote: I do not like it

I was gonna post a meme but I changed my mind

»
6 months ago, # |
  Vote: I like it -17 Vote: I do not like it

BanjoByster who?

»
6 months ago, # |
  Vote: I like it -28 Vote: I do not like it

One who dislike this post doesn’t love his/her mother!!

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

    One who dislike this post doesn’t love his/her mother!!

    Why go on mother, you could have gone on anything like keyboard, mouse, CP, electricity, Edison, etc. but don't comment such to just gain some upvotes, PLEASE!!!

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

      One who dislike above post loves his/her mother!!!

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

        You're out of your mind, aren't you?

»
6 months ago, # |
Rev. 14   Vote: I like it -26 Vote: I do not like it

The comment is hidden because of too negative feedback, click here to view it

»
6 months ago, # |
  Vote: I like it -21 Vote: I do not like it

plz downvote me, i'd like to have anticonributiuon on this acc

»
6 months ago, # |
  Vote: I like it -28 Vote: I do not like it

Yeah boisss, keep downvoting we are almost there.

»
6 months ago, # |
  Vote: I like it -24 Vote: I do not like it

Hi, can I join the negative contribution community?

»
6 months ago, # |
  Vote: I like it -24 Vote: I do not like it

¿Quieres?

»
6 months ago, # |
  Vote: I like it -21 Vote: I do not like it

.

»
6 months ago, # |
  Vote: I like it -25 Vote: I do not like it

This is my first comment.Hoping to become pupil. P.S. Don't Downvote

»
6 months ago, # |
  Vote: I like it -19 Vote: I do not like it

The one down voting this comment "HATES CP"...And the one ignoring it or up voting it "LOVES CP". :3

»
6 months ago, # |
  Vote: I like it -18 Vote: I do not like it

I am not scared of anyone of you......... >.<

»
6 months ago, # |
  Vote: I like it -23 Vote: I do not like it

The round starts in 20 mins, make sure you registered. I wish everyone participating good luck and a fun round !

»
6 months ago, # |
Rev. 2   Vote: I like it -13 Vote: I do not like it

please don't downvote

»
6 months ago, # |
  Vote: I like it -13 Vote: I do not like it

good luck everyone! hope to get rating increase

»
6 months ago, # |
Rev. 2   Vote: I like it -18 Vote: I do not like it

Still getting downvoted? Let's start positive trend. :)

»
6 months ago, # |
  Vote: I like it -21 Vote: I do not like it

why so many downvotes???????

»
6 months ago, # |
  Vote: I like it -46 Vote: I do not like it

Is there any problem? if i log in my account from multiple device when contest is running ?

one of my account disabled by codeforces and all of my solution skipped.I just log in from multiple device.

what is the problem?

»
6 months ago, # |
Rev. 3   Vote: I like it -14 Vote: I do not like it

my solution to problem E: https://youtu.be/efrkmxiEDNc
code: https://codeforces.com/contest/1506/submission/110998366

nevermind i think i missed the joke.

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

    Comeon Man, this isn't fair... Your video was posted way before the contest was gonna end... Atleast could have waited for the contest to end! Your videos must be source of logic and thinking for upcoming coders, not a way to help them seek an easier way to just copy and paste

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

      no it wasn't. it was supposed to premiere at 10:15PM IST. I made it live at 10:05PM IST exactly when the contest got over. do you seriously think I would do something like this for a few hundred views?

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

        I don't have a personal grudge here man... Just that someone has commented there exactly 15 minutes ago... Meaning at 10:01(+5:30). This would mean that your video got uploaded before 10:01 itself

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

          if I premiere a video on youtube, the thumbnail will be visible way before it goes live. people are allowed to comment, like/dislike but not watch before the premiere begins.

»
6 months ago, # |
  Vote: I like it -29 Vote: I do not like it

Almost all solutions are aviable online : C: https://www.geeksforgeeks.org/longest-common-substring-dp-29/ G: https://www.geeksforgeeks.org/lexicographically-smallest-string-formed-by-removing-duplicates/ @MikeMirzayanov It should be made unrated cause it is not fair to those who are giving.

»
6 months ago, # |
  Vote: I like it -14 Vote: I do not like it

How to solve problem D?? but nice contest though loved it:)

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

    If some number occurs x > floor(n/2) times, then, it is 2x — n. Else, its 0 or 1 depending on the length of the array

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

      can you elaborate a bit like how did you reach this solution while the contest was going on?

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

        I did not solve this problem during the contest, but I was close.

        Let's create a new array. Then, you choose the element that appears the most, and put them in the positions where the indices are, say, odd. Then, you fill the rest of the array in the even positions.

        I was close, but I couldn't think of anything further.

        • »
          »
          »
          »
          »
          6 months ago, # ^ |
          Rev. 3   Vote: I like it -24 Vote: I do not like it

          My approach was to create a frequency table using map For ex 1 1 1 6 4 4 Frequency table using map(in sorted key ) Val 1 4 6 Freq 3 2 1 Now take a vector Then I run the for loop for the Max freq available that is 3 in this case then pushing the element for the first time and reducing each freq by 1 So now vector contains (1,4,6) Now the freq table will become Val 1 4 6 Freq 2 1 0 And again doing the same process till all the freq becomes zero Vector will contain (1,4,6,1,4,1) Now lets start forming pairs i.e First two element make pair and both are diff Vector now have (6,1,4,1) Now it will continue till now no two adjacent element are same Hence vector get empty And ans is zero int this case but this process didn't work though:{

»
6 months ago, # |
  Vote: I like it -13 Vote: I do not like it

I was just going to submit D and contest finished :-( :sadpuppynoises:

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

    I wanna know abt D... It took so much brain power and idk why but i feel it's gonna be damn easy

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

      same here

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

      Just use priority queue keeping frequency of nos...Run a loop untill its size is strictly greater than 1

      In loop reduce frequency of first two nos and insert each one iff its frequency is still greater than 0.

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

        Used the same approach, but i guess this was an added condition to check! Thanks

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

      It was easy, but I think tricky. I don't know my solution works as I was not able to submit;

      	map<int, int> mp;
      	map<int, int> o;
      	int n;
      	cin >> n;
      	set<int> keys;
      	for(int i = 0; i < n; i ++) {
      		int t;
      		cin >> t;
      		keys.insert(t);
      		mp[t] ++;
      	}
      	for(auto &k : keys) {
      		for(auto &j : keys) {
      			if(mp[j] > 0 && j != k) {
      				o[k] += mp[j];				
      			}	
      		}
      	}
      	
      	int cnt = 0;
      	int total = n;
      	for(auto &k : keys) {
      		if(mp[k] > o[k]) {	
      			cnt += mp[k] - o[k];
      			total -= o[k];	
      		}
      		if(mp[k] > total) {
      			cnt += mp[k] - total;
      			total = 0;	
      		}
      	}
      	cout << cnt << endl;
      

      I feel it hard to explain it to others :|!

    • »
      »
      »
      6 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      firstly, sorry for my english

      let max be the maximum number of times the number occurs. if max>n-max, then the answer is max — (n-max) tk we can delete this number with all the others, but we can't delete it with ourselves. otherwise, the answer is n%2, because we can delete the remaining numbers up to the number of our number, and then delete them with our number. well, if n%2 == 0, then we can delete everything, otherwise everything is clear

»
6 months ago, # |
  Vote: I like it -9 Vote: I do not like it

No offense meant, but vovuh div3 magic is reeeaaaally missed :(

»
6 months ago, # |
  Vote: I like it -8 Vote: I do not like it

while submitting the third one I mistakenly submitted the second one again and got the wrong answer on the second one but it didn't show anything and still showed it correct. can someone confirm for me that which of my submission will be used in the system checking for problem number 2?.

»
6 months ago, # |
  Vote: I like it -7 Vote: I do not like it

can somebody find bug in B's code of me B-sol

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve G?

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why does my implementation using sets fail

https://codeforces.com/contest/1506/submission/111057558

Afaik the time complexity must be O(N*log_2(N))

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Try using left.lower_bound()

    • »
      »
      »
      6 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I'm doing that already in another function lower_bound defined above

      int lower_bound(set<int> a, int k)
      {
          set<int>::iterator it = a.lower_bound(k);
          if (it != a.begin())
          {
              it--;
              return *it;
          }
          else
              return 0;
      }
      
  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I didn't go through your code but I had used priority queue for this question and it got accepted (at least in pretests).

    Submission: https://codeforces.com/contest/1506/submission/111027634

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

      Thank you I'll try to understand

»
6 months ago, # |
  Vote: I like it -10 Vote: I do not like it

Did anyone also found E easier than D ?

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

what the heck happened to the comment section?!

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

something is wrong, all the comments are downvoted !! childish...

»
6 months ago, # |
  Vote: I like it +68 Vote: I do not like it

Thanks for the round! Here's my screencast (HD versions forthcoming): https://www.youtube.com/watch?v=s7owI7Uo2rk

»
6 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Is there any difference between :
auto itr = st.lower_bound(val); and
auto itr = lower_bound(st.begin(),st.end(),val);
One solution gave TLE and the other passed and the only difference is listed above, ACCEPTED and TLE

  • »
    »
    6 months ago, # ^ |
    Rev. 2   Vote: I like it +2 Vote: I do not like it

    yes for set its the right way -> st.lower_bound(val);
    and it totally wrong ->auto itr = lower_bound(st.begin(),st.end(),val);

    i once faced that.

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

      Okay I understood that it is wrong, that is why it must have given TLE, but what is the exact difference between them or their time complexities

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

        In lower_bound(set.begin(), set.end(), val), std::set doesn't have random-access iterators (think of them similar to array indexing), so the time complexity is linear. With set.lower_bound(val), std::set has that lower_bound built in, so it's much faster, logarithmic time complexity.

        Edit: Just realized that b23v said pretty much the same thing :/

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

    second lower_bound is linear. It is only logarithmic for random access iterators. first lower_bound is logarithmic because it is specialized and implemented in set class itself.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

MikeMirzayanov some users randomly downvote all the comments !!!

»
6 months ago, # |
  Vote: I like it +114 Vote: I do not like it

I see too many downvotes in this blog post. I'll investigate it in few days. Sorry, no time to do it right now. But I'll try to revert unfair votes and prevent such behaviour in the future.

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

    Hey, MikeMirzayanov Just wanted to bring before you plagrism of two users

    cyborg_7459 and cyborg7458

    Both of these Users don't know whether same persons or different has submitted solution of Problem A and B with minor Changes. Please Do look at their submission. Even their template is same. Since Even submitting Solutions from alternate account is clear voilation of policy please Review their submission. Maybe they would be same person just submitting solution from one account to confirm its correctness and escape penalty, which is voilation of Rule and needed to be punished if really found guilty.

    Their Submissions:

    Problem A: 110996666 and 111008607

    Problem B: 111007814 and 111006918

    • »
      »
      »
      6 months ago, # ^ |
      Rev. 3   Vote: I like it -34 Vote: I do not like it

      MikeMirzayanov plag_report Yeah my bad, but I have an explanation for that which I think might be justified. Since the past 3 contests I've been facing issues with the CodeForces server being down, as might be evident from the bad results of my past 2 contests as well as the fact that I could not give the Division 2 immediately preceding today's contest. Thus, to prevent a negative effect on my rating I started today's contest with my alternate account but switched back to my original one after facing no issues for about half an hour.

      I had no idea that submitting from 2 accounts is also a violation of Rule, and I thought that since I could easily prove the 2 accounts to be mine, I would be able to show that the code is completely original in case someone said otherwise.

      I can assure you that it wasn't a case of trying to avoid a penalty because I did get penalties in my D and E as well. If I had been trying to avoid penalties by testing solutions with my alt account, then I obviously wouldn't have stopped that for the harder problems

      Moreover, I submitted the solution for A from my main account 15 minutes later, which covers up the 1 penalty advantage that I would've received in problem B

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

        Still, you should have read the rules. They are right before registering into the contest. And also, don't you think it is unfair to whenever you have a good performance in your alt to you switch back to your main? This way it would be very easy to farm rating, just create an alt where you compete normally, and if you have a good performance switch back to your main account. This attitude shouldn't be tolerated since it is unfair to other participants. There is no justification to this, it is obviously unfair and violates the rules.

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

    I wish that could be prevented but I wonder how especially that deciding if a comment should be downvoted or not is an opinion

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

    MikeMirzayanov what? how do u find out unfair votes? I think its literrally impossible to find unfair votes. If it was possible, youtube would have that algorithm and tourist would not be $1 in the world.

    Can someone in meantime find out the bug in my code for B ? Submission

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    And how are you going to judge which votes are unfair?

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    MikeMirzayanov sir, please revert the unfair votes. :)

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    MikeMirzayanov sir, please revert the unfair votes. I am trying to remind you :)

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Sir, Please try :))))

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    MikeMirzayanov Sir, 8 days have been passed.Please try to revert the unfair votes and reply me . :)

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Another Div3 is coming :) Sir please try to revert unfair votes. MikeMirzayanov Please reply .

»
6 months ago, # |
Rev. 2   Vote: I like it -14 Vote: I do not like it

is CF oke ?? may be some bug for downvoting . ssense sir do something

»
6 months ago, # |
  Vote: I like it -28 Vote: I do not like it

Almost all solutions are aviable online : 1. C: https://www.geeksforgeeks.org/longest-common-substring-dp-29/ 2. G: https://www.geeksforgeeks.org/lexicographically-smallest-string-formed-by-removing-duplicates/ - - @MikeMirzayanov It should be made unrated cause it is not fair to those who are giving.

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

    It wasn't phrased as "find longest common substring" so the task was really figuring out that lcs was optimal. And constraints are low enough to brute force.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I have a small doubt. Will the total number of participants in div 3 whose round will be rated, is more than the number of trusted participants ?

»
6 months ago, # |
  Vote: I like it -23 Vote: I do not like it

Garbage Contest and Discussion!

»
6 months ago, # |
  Vote: I like it -17 Vote: I do not like it

Is there any specific reason why B is always tougher than C on CF contests ?

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

    There is no specific reason because it isn't true.

»
6 months ago, # |
  Vote: I like it -10 Vote: I do not like it

hydO7gen hey bkcd. aj to E o parli nah. shala noob kothaokar.

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

Can anyone help what's wrong in this submission?my submission https://codeforces.com/contest/1506/submission/111007893

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

can someone help me understand why my code is giving tle hacking, i am not able to find the test case in which it can give tle.

https://codeforces.com/contest/1506/submission/111050778

»
6 months ago, # |
  Vote: I like it -11 Vote: I do not like it

'D' was the easiest problem of the contest :(

Spoiler
»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

When you miss B because you type k instead of j.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Could anyone tell me how my code to E 111026430 being hacked... :(

  • »
    »
    6 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it
    		F(int, i, 1, cnt) {
    			x = a[maxi[i]];
    			F(int, j, maxi[i] + 1, maxi[i + 1] - 1) {
    				while(vis[x]) x--;
    				ans2[j] = x, vis[x] = 1;
    			}
    		}
    

    see you are deccrementing x and then finding the max avaiable number there is to fill. maybe this is causing tl in some very specific testcase.

    for example lets read

    N=8

    5 5 6 6 7 7 8 8

    answer is 5 4 6 3 7 2 8 1

    now see to get to 4 at index 1 you decremented x 1 time

    for index 3 you decremented 3 times

    for index 5 you decremented 5 times

    for index 7 you decremented 7 times

    total complexty is 1 + 3 + 5 + 7 + 9 + 11 + ... n (sum of all odds upto n). this looks like n^2. and exactly where tl is coming from.

»
6 months ago, # |
  Vote: I like it -12 Vote: I do not like it

I am black. If u downvote me — u are racist.

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

My computer was just used by others.I'm sorry to say rev.1's words

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes,I used his computer because of this easy round.

    • »
      »
      »
      6 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      He who fights with monsters should look to it that he himself does not become a monster. And if you gaze long into an abyss, the abyss also gazes into you.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why I get TLE in question D upon using unordered_map instead of map ! Isn't unordered_map is implemented using a BST which makes me think it should be faster than map ?

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

    Same I too got TLE on 8th case in problem D this is because the value of a[i] can be 1e9 if in any case there are more values greater than 1e8 then it will form chain structures to hold key-value pair so instead of O(1) per query the amortised complexity may be O(n) resulting in O(n^2) overall. So better to use map which has constant factor of O(log(n)) it won't hurt you!

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

My submission for problem D was accepted yesterday during the contest duration and I had solved 4 questions. But today the same submission is showing TLE instead of accepted and it is showing I only solved 3 questions during the contest duration. How is that possible? My solution wasn't hacked and also there wasn't the case of pretests and main tests if I am not wrong.

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Later they added more test cases based on hacks !

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You have used unordered map in the code. The same happened with me. Unordered maps are highly unreliable.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hi, it was my first contest and I solved 3 questions. will I get a rating, if yes when will the rating changes be announced?

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    will be updated soon! have patience.

    and congrats for positive delta!

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I joined the contest, only answered one problem cause I was so sleepy, it is said it's rated but now I checked I'm still unrated. How do I get my first rating? Quite new to codeforces mechanics, thank you.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

people getting TLE in TC 7/8 in Question D, if you have used unordered_map, change it to map

Check out this blog- https://codeforces.com/blog/entry/62393

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

To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove cheaters and update the ratings again!

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hello guys!!

i am getting a tle for my solution of problem D(Epic Transformation)

Can anyone pls look at my code and help me correct it??

My Code

»
6 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

MikeMirzayanov wrote 2 yr. ago (https://codeforces.com/blog/entry/65383):

Yesterday slappy advised me to stop writing problems. I will not listen to his advice and will not stop coming up with new problems.

This was another good Div.3 round! (After https://codeforces.com/contest/1490).

So thanks for authors for their problems, and keep composing!

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

in problem d i used unordered map and time limit got exceeded but replacing unordered map by map ans is accepted how is it even possible .111012090 time limit exceeded 111111133 accepted

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

For question B what will be the output for-

11 2

....*.....*

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I think I have used Ideone In public mode by mistake because I dont have idea that someone can see my solution there that's why my solution has been copied by somebody and please pardon me . I assure you this will not happen again.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

My solution was skipped even though I neither copied nor showed anyone my solution.How can I prove that I did not copy?This is really disgusting.This contest was unrated for me but what if it was rated.Please do review this. My D problem matched with someone I neither know and neither follow

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    was not expecting you to cheat :(

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I didn't

      • »
        »
        »
        »
        5 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        no one submission of d skip without matching of same code nd its not A its d almost all with honest submission have different code,,,Anyways please dont give contest in couple thing,I hope u will be honest from nect tym

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

My solution was skipped for this contest even though I neither copied nor showed anyone my solution.How can I prove that I did not copy?This is really disgusting.This contest was unrated for me but what if it was rated.Please do review this. My D problem matched with someone I neither know and neither follow

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

Anybody can help me ?

in Problem B, My prediction should be

1 50 10
*.***.***.***.**..*****.**....
x.***.***.x**.**..**x**.*x....

The distance between two neighboring replaced characters 'x' must not exceed k(10). Therefore, my answer is 4. but the answer is 6.