vovuh's blog

By vovuh, history, 5 months ago, translation, In English

Hello! Codeforces Round #686 (Div. 3) will start at Nov/24/2020 17:35 (Moscow time). You will be offered 6 or 7 problems (or 8) 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 rating 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ACM-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 6 or 7 (or 8) 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 a 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.

Thanks to MikeMirzayanov for the platform, help with ideas for problems and for coordination of my work. Thanks to my good friends Daria nooinenoojno Stepanova, Mikhail awoo Piklyaev, Maksim Neon Mescheryakov and Ivan BledDest Androsov for help in round preparation and testing the round. Also thanks to Artem Rox Plotkin and Dmitrii _overrated_ Umnov for the discussion of ideas and testing the round!

Good luck!

UPD: I would also like to thank Ivan Gassa Kazmenko for invaluable help with the round preparation!

UPD2: Editorial is published!

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

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

vovuh, Will it be almost-copy-pasted-part ?

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

:)

»
5 months ago, # |
  Vote: I like it -16 Vote: I do not like it

I was waiting for this for almost a month. I hope this time Div3 goes well for me.

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

I wish this round becomes unrated for me soon.

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

    I wish this "soon" may not come in between of running contest though:)

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

      XD XD. That's the worst feeling in the world!!!

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

After a long there is a div3 contest looking forward to it . GOOD LUCK!

»
5 months ago, # |
  Vote: I like it -75 Vote: I do not like it

All the best everyone :)

As a 1-gon give me some contribution Xd..

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

I am working on making a series of blogs for competitive programming topics, If anyone is interested please message me. It would be a lot of fun.

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

    I need someone for making video editorials, and IT IS UNPAID, ONLY FOR COMMUNITY.

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

 And finally the wait is over!

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

DIV 3 rounds can be risky for higher specialists.

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

    Agree

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

    Why?

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

      Because they have the highest rating for rated participants, they need to get a really good rank to get +ve rating, which is ofc easier said than done

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

      They are the LGMs of Div 3

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

    true

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

    i think if u are thinking more about rating it will decrease your performance!!! this happens with me

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

    Yes! if you are a higher specialist, you need to get a high high high high rank that your rating can go up

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

Again same question, Why don't we have some extra testers in these rounds(Educational/Div-3)? If I am correct this won't reduce the quality of contest, rather it would increase the contest's quality.

Can we please start having some more testers in Educational/Div-3 rounds? As they are rated contests and any issue noticed during contest would just affect participants.

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

    I just encountered one more past educational round which was unrated because of an issue with problem A statement. Educational Codeforces Round 64 (Rated for Div. 2)

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

    They do have 6 testers in this round. Does it affect the contest quality in anyway, if none of the testers belong to the rating range for which the contest is rated? I am guessing it might affect the order of the problems a little for easier problems, as high rated testers might not notice the difference in difficulty as much as a contestant for whom it is rated. That apart other issues related to questions should mostly be covered

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

      I am just trying to make a point that having a list of testers with different rating group won't adversely affect the contest quality, rather it may improve it.

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

Ha bhai vovuh ji aajaenge thanks for inviting!

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

Exicted for the rare div 3 round. Does div 4 round even happens? Hoping to see some nice questions

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

    what the hell is that profile pic? get that nudity out of here

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

    this website is for education purpose ... kindly please REMOVE your DP....everyone is here to learn something please dont spoil the mood of our coders...please remove your DP or changed it to something else ..

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

More than half of the comments are downvoted ! :-{

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

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

Is there a way to participate after the 9:35 UTC-5? Sadly, these competitions always happen during my school hours and I really want to participate. :(

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

    no option except to go for virtual

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

    well div3 happens not so often . and i think you can take holiday that day . Afterall it will be worth it . coz we do it that way .

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

Does anyone know that whether Technocup Elimination Round will be rated or not

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

yay DIV 3 round

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

Is this Rated for me? guys?

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

Can't wait to see the problems! Good luck everyone! :D

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

Wish you all the best ♥

»
5 months ago, # |
  Vote: I like it -32 Vote: I do not like it

Is it rated?

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

When will div. 4 return ?

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

I hope in this round I can boost my ratings. Best of luck Coders :)

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

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

Good Luck for Everyone :)

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

It's valuable for waiting such long time :)

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

Finally wait is over. Hope I can get rating above 1000 today:)

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

    You will man. You will. You once solved 3 questions in div 2. That's surely above 1000. Good luck.

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

Hope the proverb "2 ghante mein rating double" gets true for all my indian fellows and friends.

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

.

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

Lol!! why lot of comments are hidden this time...Sadly my mouse isn't working to view them...Any way to see them with keyboard :)

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

Hope I can reach green this time

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

What is the points distribution for the problems? Or are there none for Div. 3 contests.

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

I want to be pupil! please pray for me! I want to pupil. I cry and cry! please pray for me ! may GOD help me to become pupil! please pray for me.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it
int rating=1134;
rating+=150;
»
5 months ago, # |
  Vote: I like it +8 Vote: I do not like it

This comment section is shit.

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

Finally a round which is made for me :)

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

5 minutes remaining Be Ready

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

L

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

If I submit multiple Accepted solutions, which one will be taken as my final solution (that is, used for others to hack?)

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

    DELETED

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

    all accepted solutions can be used for hacks, and for final testing first accepted will be considered and if failed then second and so on.

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

      So if one of my accepted solutions survive the hacks, then I solve the problem.

      Is that correct?

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

        Yes.

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

        yup, this is true only for Educational and Div. 3/4 rounds. In regular div 2/1 rounds only last pretest passed submission is considered afaik.

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

Screenshot-2020-11-24-215410.png
I felt like the dumbest person on the planet on reading this line after wasting 40 mins to solve a #P-complete problem.

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

    me too!! I'm too sleepy to read wrong question, trying to solve n vertices, m edges and wasting almost all time.

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

What's the solution of E? Really liked problemsetting (especially F).

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

How to solve E ? F was easier than E for me

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

    There are 2 paths between all pairs except for adjacent pairs within the root on the cycle of the almost-tree. Details and code are explained here.

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

    You have an "almost a tree"-graph. Erase the edges from the cycle, then for each pair of nodes of different components there are two paths, and for each pair of nodes of the same component there is only one path.

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

This contest made me remember the ABC from the past when first four problems are dead easy and last two are not touchable xD

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

    F was easy idea wise if you understand binary search & know a data structure(for range min queries like segment tree or sparse table), it was just about implementing.

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

      Now I am "Afraid" because I did not use a Binary search or segment tree or sparse table.

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

        I agree that other approach will work. But range min query + binary search was definitely the easiest(atleast for me) in terms that it just hit me after a few minutes of reading the statement because that's what was asked to find. When we have some problem asking to find some sort of triplet/pair/quadreplet the first thing i do is fix some of them and then think.

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

        What was your approach?

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

          It is I think same as Gassa's approach in the editorial.

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

Nice contest! I just want to ask what's the trick behind F. I've tried doing it using two pointers + segment tree, but that fails the test 2. My idea may be too off the right track, but that's what it is. Thanks.

EDIT: Now I see instead of 2 pointers I could have used binary search to solve, better luck next time I guess.

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

Guys what does it mean that there is a penalty of 10 mins for each wrong submission???

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

    Your final score time would be added with the penalties. For eg : lets say your total time is x mins and you have 2 wrong submissions then the final time penalty that would considered while ranking the leaderboard would be x + 20.

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

My Explanations for ABCD

A

Here given a positive integer n > 1 we want to print a permutation of distinct integers from 1 to n such that ith integer is not equal to i Consider the permutation {1,2,3 .. n} if we shift each element from 2 to n one position left and then print 1, that is {2,3,4 ...,n,1} then we are done Since here we are print the next integer for the positions 1 to n-1 and 1 at position n (n != 1),this is one of the required permutations.

Topic : Constructive Algorithm

B

Here we are given an array of n integers. We need to print the index of an integer which is unique and minimum among all possible such integers. So we maintain a map to track the frequency of each element. Iterate the map, check if frequency is one or not , if it is one then minimize the answer. if there is no unique element then print -1.

Topic : Implementation, Brute Force

C

Here we are given an array of positive integers We need to choose an element from this array of integers and use that integer to perform operations The operation is as follows: If we choose x , then remove any subbarray not containing x

We need to report the minimum number of operations So we can brute force all the distinct integers in the array and report the minimum answer

To do this , we maintain a map from integers to vector of integers. This map is from each unique integer in the array to it's indices .

For example let say the array as given in the sample case is [1, 2, 3, 1, 2, 3, 1] then our map will be [{1,[0,3,5]} , {2,[1,4]}, {3,[2,5]}]

To get the minimum number of operations for any given integer x (Let say), we remove all the indices which are not equal to x This can be done by doing the operation when the difference b/w consecutive indices of x is more than 1

For example take [1, 1, 66, 1, 77,88 , 1, 1] with x = 1, Now we have the indices of 1 as [0 ,1 ,3 ,6 ,7 ]

So we check we do the operation when consecutive indices have difference of more than 1. Here it is operation 1 — 1 and 3 (we remove 66) operation 2 — 3 and 5 (we remove 77,88)

Similarly do the operation for all unique integers and report the minimum ans

Topic : Implementation, Brute Force

D

We are given an integer n We need to print a sequence of maximum length such that it's product is n and for each element the next element(if exists) is divisible by the current element First we factorize the given integer n and obtain a map from prime factor to it's power. now we need to print the desired sequence. Since we need to print a sequence of maximum length, we sort the prime factors by their powers, so that we greedily have the element which occurs maximum times first. Let say we have 360,so we make a vector of pairs and sort it by power. that is

{2,3} {3,2} {5,1}

Now we iterate the vector of pairs, until the powers are >= 1

We insert the element until the remaining number is divisible by the current element going to be inserted

For example

we have 2 , remaining is 360/2 = 180, so we insert it. ans is {2}

we have 2, remaining is 180/2 = 90 , so we insert it . ans is {2,2}

we have 2 remaining is 90/2 = 45 , but 45 is not divisible by 2 , so we can't insert 2 , hence we insert 90.

This algorithm produces the maximum sequence since we are greedy picking the prime factor with maximum power.

Topic : Greedy, Implementation, Sorting

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

    Hi, thank you so much for sharing your ideas! I had implemented the very same idea for D, but I got a WA submission. Could you please help me with this. Thanks in advance!

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

Will the formula for $$$E$$$ be: $$$n(n-1)-(n-no \,of\, vertices\, in \,the \,cycle)$$$

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

    No, it would just pass the sample, try on this graph: {1 2}, {2 3}, {3 4}, {4 1}, {1 5}, {5 6}

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

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

What is the case 7 on the problem D?

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

    Try for 75

    Answer is

    2
    5 15

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

      My code produces the right answer there.

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

        Okay. My 1st submission failed and I thought of this case. My code failed for this too. Modified the logic and it passed

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

          I already know my error. It was a noob-bug during a sieve.

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

    Yes, even I got a WA on Test 7!

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

How to solve problem F? Well I applied two pointer approach so it was bound to get TLE. So, I guess it would include some binary search solution.

What was your approach?

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

    I binary sparse in answer. Good Qhuesion. Writer very very intelligent. You also sparse tabul. Else not accept.You understand me?

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

Where can I get the editorial for this contest? I am new to codeforces. Any help would be apprecited.

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

easy peasy Japanesey

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

https://www.youtube.com/watch?v=7WfLE_IIDqA&t=2809s&ab_channel=AoxiangCui this Youtuber live-streamed the live contest today that's the reason there are so many submissions for problem D also.

please correct me if I am wrong as I saw the video a just after the contest and it had 83 views on it

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

    This is sad.

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

    Did that person now know it was a live contest? anyway, how did you find it?

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

    Oh cmon... people like us tried to solve it very sincerely.

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

    Nope, she is a very experienced streamer. And the video was uploaded at the same moment when the contest ended. And it was never a live stream though

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

    Boy maybe there are so many submissions for D because it is very easy

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

where is the wrong in this code?

wrong answer 161st numbers differ — expected: '2', found: '1'

can I know it?

http://codeforces.com/contest/1454/submission/99493118

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

    You get wrong answer because you are wrong code. Write beautiphul code. Else not accept. You write in Jabha...hahahahahaha. I not like jabha. You not write jabha. Else I not see your code.

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

Is there anybody who solved problem D with backtracking? :)

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

    are you a masochist person?

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

      Excuse me, optimized brute-force.

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

The problems were awesome!! The magic of Data Structure! ;)

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

submission: 99493024

if(n==100000123) {
    cout<<1<<endl<<2<<endl;
    continue;
}

submission: 99494601

if(n==2001) {
    cout<<10000<<endl;
    continue;
}

Make system tests more and useless. Why do this?

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

    This codes are written with with the intent in hacking. There is no fault with system tests. No matter what done, these can't be avoid. Testing not culpableヽ(ಠ_ಠ) ノ. Today was good contest. I always want to give this good contest.

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

Today contest good contest. I very very like today contest. Make tomorrow contest. I give tomorrow contest.

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

E was an awesome problem!

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

Getting F a couple of minutes after the round's end :(

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

Nice set of problems

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

.

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

About B and C. Max n is 2*10^5. If I iterate all possible elements, it takes too much time. If I iterate only to 10^4 — I receive positive check. Is this clear ?

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

Does E,F problems are actually meant to solved by div. 3 users ? Really, I saw some red coders took 30 minutes to solve E.

So how could they expect a div. 3 Candidate to solve problems like E,F in an hour ?

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

    Not all problems are meant to be solvable during a contest, some are their to learn from, that is all. And it is not that E and F are unsolvable by people with rating <1600.

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

    Well, I solved both E and F in the contest and I'm a gray coder, so it is indeed possible.

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

      Yeah, but you are either an alt or have done lots of competitive programming on platforms other than cf.

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

I solved problems B and C without realizing that a_i <= n, and I was very wasteful in general.
I was still very far from the time limit (It would be cool if someone would hack me :P).

I implemented B using a map and a set and even also sort, and I implemented C using a map.

Were those constraints meant to make implementation easier?

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

I learned how to play hack. After 150 failures, I succeeded twice.

You also learned how to use the generator. Div3 was very useful.

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

I did D in a weird way.
Checked every divisor's (except 1) highest power that divides n. Among them took the one with maximum power then generated the answer from that.
Submission: 99476498

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

nice problems(specially C) but very weak test cases :(

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

i participated in this contest but in my profile it is still showing unrated, i solved 1 problem though

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

    the rating changes aren't announced yet wait a bit more :)

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

Thanks vovuh for a round with such elegant problems. Nice learning. Very balanced set of problems which were very carefully crafted and well organized. I am sure this took a lot of efforts from you and team! Can't even emphasize enough on how much of these efforts from you guys help others like me, to enjoy and learn from CF competitions.

Appreciate your efforts!! Thanks again!!

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

Hello! I have a question! If I took part here and solved tasks, then I understood that I can't solve other tasks, so I turned off my laptop and went out. And now I can't find me in the table, and I looks like that I didn't take part here. What do I need to do after finishing contest?

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

include <bits/stdc++.h>

using namespace std; int main() { int t;cin>>t; while(t--){ int n; cin>>n; int a[n],b[n]; for(int i=0;i<n;i++){ int x;cin>>x; a[i]=x; b[i]=x; } sort(b,b+n); int flag=0; vector c;int j=0; for(int i=0;i<n-1;i++){ if(b[i] !=b[i+1]){ c.push_back(b[i]);}

}
/*int repeat=0;
  if(b[n-2]==b[n-1]){
    repeat=1;
  }*/

//if(repeat!=1){
  c.push_back(b[n-1]);

//}
/*for(long long i=0;i<c.size();i++){
  cout<<c[i]<<" ";
}*/
//cout<<endl;
long long segment=0;
long long mini=INT_MAX;
for(int p=0;p<c.size();p++){
  segment=0;
  for(int i=0;i<n;i++){
    //for(int k=i+1;k<n;k++){
      if(a[i]!=c[p]){
        while(a[i]!=c[p] && i<n){
          i++;
        }
        segment++;
      }
    //}
  }
  /*if(c[p]!=a[0] || c[0]!=a[n-1] ){
    segment++;
  }*/
  //cout<<segment<<","<<c[p]<<endl;
  mini=min(mini,segment);
}
cout<<mini<<endl;

} }1454C-11 - Sequence Transformation

help!, its giving tle in test case-3 can anyone optimize it ,will be appreciated .......

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

Very nice contest with interesting problems. Much thanks to vovuh and MikeMirzayanov !!!

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

Why its taking so much time for declaring results.

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

When will ratings change?

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

handle -> just_try_to_solve has coppied my solutions, as I was using ideone, My all solutions are skipped what should i do, even this person agrees that he copied, then why my solutions are skipped, Please tell something, that person who copied my solution is saying that he agrees that he copies

please put him out of contest, not me

my submission links are as follows — 1. https://codeforces.com/contest/1454/submission/99406543 2. https://codeforces.com/contest/1454/submission/99419833 3. https://codeforces.com/contest/1454/submission/99456510 4. https://codeforces.com/contest/1454/submission/99468339

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

hello,I want to know whether the result are published for this round. because i am not seeing any up and down in my rating also a message is comming "Your rating are rolled back and will be back soon".pls help during the contest i did a misktake which is after submitting the code for first problem which passes all the pretest i submitted it again with the code of problem B and it gives a compilation error then i correctly submit the code of problem A as well as problem B.pls help me

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

    Not an issue , the most recent submissions are judged for evaluation . Ratings are rolled back quite often , there can be many reasons for it , Just chill , Ur recent submissions will be only counted.

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

      Thanks Yash for your help.I only solved 2 problems in div 3 and gained 164+ rating .Thankyou

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

Last div.3 was rated for <=1600. But how it is rated for This id ? Before participating his rating was 1601.

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

Your method to find the size of the tree hung on cycle vertices was brilliant!