Hello Codeforces!

We have a pleasure to invite you to Good Bye 2021, which will take place on Dec/29/2021 18:35 (Moscow time). You will have **2 hours** to solve the problems. The round will be rated for participants of both divisions.

The problems for this round were prepared by 300iq, with the help of excellent coordinators KAN and 74TrAkToR.

We would like to thank all the testers, who made this round possible: gamegame, thenymphsofdelphi, ko_osaga, golions, Ashishgup, izban, prabowo, 74TrAkToR, Devil, manish.17, taran_1407, minhcool, AlFlen, Utkarsh.25dec, NemanjaSo2005, wxhtzdy, ajit, mnaeraxr, Scrubpai, YashDwivedi, eatmore!

And of course, MikeMirzayanov for great platforms Codeforces and Polygon.

This round is supported by NEAR, a company founded by former competitor AlexSkidanov. NEAR is built by many prominent competitive programmers, including twice ICPC champion eatmore and GCJ and TCO winner Egor.

The participants who end up in the first 255 positions will receive prizes. The participant on the first place will receive Ⓝ128, the next two participants will receive Ⓝ64, the next four participants will receive Ⓝ32, etc.

NEAR is a modern blockchain protocol and a development platform. NEAR applications have digital assets as a first class concept, and are hosted in a way that anyone can ascertain the correctness of their execution. This allows building applications that by design provide users with ownership over their assets, data and the power of governance.

If you want to try building on top of NEAR, join Metabuild, a hackathon running until February with $1M in prizes: https://metabuild.devpost.com/

We hope you will enjoy the problem set! Good luck!

Congratulations the winners!

**UPD:** Editorial

woah 300iq is back

How many Problems appears on the content???? and What there

Score distribution?++

sekrit

To make the contest more realistic, looks like they have decided to keep the score distribution, number of problems and list of testers in

suspense, just like2021itself (or are they giving an trailer of 2022?)What is Ⓝ...?

NEAR tokens

It's a unit of currency in NEAR. You can exchange it to more familiar fiat money (and see it's current price) on several exchanges, for example:

https://www.binance.com/en/trade/NEAR_USDT

This particular one doesn't seem to work in the US, are there any that do? Thanks!

Certainly okcoin, and probably crypto.com.

As I tester I can confirm that round has some interesting problems. I hope that you will enjoy them and the last round of 2021 (I think).

I noticed that the hackathon is open to "Individuals who are at least the age of majority where they reside as of the time of entry." Does this mean that individuals who are minors cannot participate?

I suspect this is due to legal issues with awarding prizes. If you can find someone who's over the legal age of majority in your country to claim the prizes (shall you win some hackathon track) you should be good to go.

Hm. I don't want to break any rules. Just to clarify, I can participate if someone else who is a legal adult claims the prize for me?

I think that should be fine. Fancy seeing someone from Redmond here.

Is it rated?

Why only 2h :(

omg 300iq orz

Excited for this contest!

Best present.

Translation: testing will commence soon.

Excited:)

XD

hello 300iq! Came back just in time to end this year:p

Unusual time alert missing!!!

What if NEAR bankrupts ? Are the winners going to win money ?

How many problems will be there in this round? 300iq

Happy new year ~ ovo

Got introduced to forces this year and what a experience it has been looking forward for this last contest of the year.

Such as a great year for me! Best of luck for everyone.

happy coding :)

## Me during contests

It's a good thing — strong pretests

3 contest in 3 days.For me its overwhelming !!

How many problems? and Why only 2 hours, Good Bye 2020 and Good Bye 2019 was 3 hours!

May be the number of problems will also be less than that of Good Bye 2020 and Good Bye 2019.

Are the problems difficulty higher than Div2 based on the other new year contests you participated?

i heard Ⓝ1 worth about $13.5, so the total prize is Ⓝ1024 ~ $13800

that's a really big amout of money(to me)... i cannot imagine

pray for me to solve B this round for first time

you can do it

Good Bye 2020

edit : why so many downvotes , i just pasted the link of last year's contest to help people searching , wanting to solve it

Your comment is completely useless... just like yourself

Thanks for the feedback ☺️, hope you are doing well .

Upvoted. I think it was helpful.

Think better

Weren't you guys making some kind of CP solving AI? What's up with this switch to blockchain?

What, an AI solving CP problems !

they abandoned it cause it's impossible

It's been more than three years since we pivoted. Illia wrote a big blog post about the motivation back then https://near.org/blog/near-ai-near-protocol/

I guess it is not so NEAR then

All the best everyone :) Hope I reach pupil in this contest ! Wish me best of luck

How many problems will be there? 300iq

Last One

and the worst one

Can we know how many problem there will be yet?

Which divisions will write?

I wish my rate became 2021 but I'm still living in 10th century

Don't mean to trip you up, but you are living in 11th century

score distribution pls, i really wanna do some useless analytics five minutes before contest

Score distribution and problem count to be posted after the contest. Should add a new strategic element.

Bold of you to assume there are problems and a score distribution

Looks like this could be true AnandOza :-P

oh, the time in China is too unkind!

Is this round only for those who don't care about the number of problems and their score distribution?

Score distribution plz!

The suspense to the score distribution is as much as the suspense as to how 2022 will turn out to be.

I have seen many Oops! today. Maybe it's good to participate from the mirrors:

m1 m2 m3

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

Looking forward to receiving 1 Near coin! Might be able to afford a lunch.

WA3 in problem C is a nightmare

2022 ? yesterday was 2019:"

i feel d is easier than b and c :/

How to solve D?

How to solve C ?

How to solve B?

For the array to be good, it's sufficient that the sequence is in Arithmetic progression. So try to fix two elements and check how many elements we should change in order for the sequence to be in AP.

If there exists any bad $$$r$$$ for a given $$$l$$$, there will always exist some bad $$$r$$$ that is at most $$$l + 2$$$ (or at least $$$l + 9$$$ since I didn't have the guts to submit with $$$l + 2$$$). As for how you prove this I have no clue, I couldn't generate a counter-case so I submitted lol (inb4 pretests are weak and I FST).

The intuition mostly arises from any two adjacent values $$$\lt x$$$ being bad. If that isn't the case then they must alternate between $$$\lt x$$$ and $$$\geq x$$$, so if the whole range satisfies some prefix satisfies or something like that, I tried generating a two really small ends case but couldn't come up with anything that took more than $$$3$$$ so I just guessed it at that point.

Now you have a number of ranges of the form $$$[l, r]$$$ that must be covered with at least one point, so just use the standard idea — sort them by $$$r$$$, skip them if $$$l \geq \text {last removed}$$$, otherwise remove it and set $$$\text {last removed} = r$$$ (last removable point to make as many ranges as possible skippable).

Ohh pretty cool. If for any $$$l$$$, bad $$$r$$$ <= $$$l + 2$$$, then this can be solved using simple dp as we don't have to consider a lot of cases.

DP isn't even necesary if that fact holds actually. If you can identify all such ranges, it becomes a problem of choosing the minimum number of points that cover all ranges. This can be solved by processing the ranges in increasing order of their right points and greedily removing a point only when we reach the end of an uncovered range.

The proof is that every sequence can be split into chunks of 2 and 3, and the overall mean is a weighted average of these chunks.

I was able to solve this problem without the above observationl(actually, I was not able to come up with this idea at first lol). Observe that sum of a segment $$$[l,r]$$$ is negative iff $$$pfx[r] - x \times r< pfx[l-1] - x \times (l-1)$$$. Therefore, for every $$$j$$$ we need to find the largest $$$i(< j - 1)$$$ such that $$$arr[j] < arr[i]$$$, where $$$arr[k] = pfx[k] - x*k$$$. This can be done by modifying the standard method to find the nearest smallest element in the array $$$arr$$$.

Submission : 141149652

But this solution is an overkill if you have got the above observation.

Subtract $$$x$$$ from everything, now it's asking for segments such that every subsegment has a non-negative sum. You can find it by checking the leftmost $$$l$$$ such that $$$[l,i]$$$ has a non-negative sum and then doing a simple DP.

woah :o that's a great solution. from submissions, I see most people got this idea. don't know if that's a standard observation for such problems.

What a simple solution!

For the segment mentioned [l...i], In the dp phase, we will either choose the whole segment or leave it correct?

If we choose it how can we say it has all valid subsegments ([l...i-1] , [l+1....i-1]...)?

Yes, that's correct.

You can keep track of this with $$$l[i] = max(l[i],l[i-1])$$$. You can see my submission for more clarity.

Greedy,

an important observation i found is if all subarrays in triplet $$$(a1,a2,a3)$$$ satisfies the given condition, if $$$(a3,a4)$$$ satisfies the condition then $$$(a1,a2,a3,a4)$$$ will also satisfy the condition.

so maintain a variable $$$last$$$ which holds the last unselected index(initially $$$last=0$$$)

so start from $$$i=2$$$ and first check for subarray $$$[i-1,i]$$$ ,then $$$[i-2,i-1,i](if possible) $$$,if it doesnt satisfy the condition , unselect i ,and repeat this process.

sorry for my bad english.

Initially we have:

a(l)+a(l+1)+…+a(r)≥x⋅(r−l+1) -> a(l)+a(l+1)+…+a(r) — x⋅(r−l+1)≥0

We can reagente to (a(l)-x)+(a(l+1)-x)+…+(a(r)-x)≥0, so we can do a[i]-= x and only care if a(l)+a(l+1)+…+a(r)≥0.

Now we can use prefix sum to write this as ps[r] -ps[l-1]≥0

The idea now is for each i, you will not select i if some ps[r] — ps[j] < 0, with (the last index not selected) < j < r-1

can u explain ur soln?

can you please explain the idea behind D?

Solution of Problem C on StackOverFlow

Jeez should have searched for this. Thanks though for the link!

We just need to change our array into some AP. That's what I searched xD.

Lol. I did the same things xD. My idea was Sn of AP = n/2.(a0+al) and its 1/2*(a0+al).(r-l+1) and somehow I have to convert the array into AP and I googled it xD and got this.

I noticed that i should find the longest increasing or decreasing array from the given array, but i spent 1 hour trying to figure out how to do the nested loops and couldn't do it :D

Did the same exact thing. Unfortunately WA on tc 3 :(

Video Tutorial B:https://www.youtube.com/watch?v=T1Q3PhYtyLA

Can someone link the recent opencup problem that was H but instead of counting maximize the size of the set? I forgot which opencup it was.

It was problem I from GP of Poland on December 5th this year.

https://official.contest.yandex.ru/opencupXXII/contest/32038/problems/I/

How to solve E?

The resulting string s will be a prefix of t with the first character difference after less than the corresponding character in that position in t. We can just iterate this and use a segtree or something to maintain the minimum number of operations needed to transform to that prefix. Time is $$$O(n * 26 * logN)$$$.

if there is any transformation of s in mimimum moves such that new string is smaller than t

then that s will be converted to below transformation —

(t[0]+t[1]+...+t[i-1]+c+X)

where c < t[i]

and X contains remaining characters of s.

Iteratively, we can find moves required to transform s into all of the strings of above type and return minimum of all.

Solved only one problem, I want to die

It is easy to die.

Practice more and do better next time.

Thank you ! I will practice furthermore !

Fuck off

Bro your life is more important than the problem statement!!

How to solve C?you should convert array into arithmetic progression and for this it's sufficient to iterate over all possible $$$i, j$$$, fix this 2, find current $$$d$$$ ($$$d = (arr[j] - arr[i]) / (j - i)$$$) and make arithmetic progression with this $$$d$$$, then for each generated array find the one with minimum difference with old array

it results in O(n^2) can we optimise it??

maybe there exists more optimal solution, but this is also pretty fine to get AC(because of input size)

why we need to convert the array into arithmetic progression? what is the intuition behind it? how you come to the conclusion that making AP is the key idea to solve this problem?

The Sum of an AP is n/2.(a1+an) and in this question we were asked that a1+a2+a3+....+an = 1/2.(a1+an).(r-l+1) . Now r-l+1 is the number of terms i.e. n . So we can say that a1,a2,a3...,an are in AP and their sum is 1/2.(a1+an).(r-l+1).

the reason is quite simple:

every subsegment must be arithmetic progression(because this formula is correct only for AP-s), which definitely means -> whole array must be AP(because the array itself is the subsegment of it). Then, if the array is AP, indeed, every subsegment is also an AP, so this condition is necessary and enough too :)

I thought of C as fitting a line. Each pair of points can form a line x being their index and y being array value. You need to find the line which has the most points lying on the line. The points which are not on the line is the answer.

I dont think simple fit would help. Since we need equality, we may need AP.

thanks.

I tried finding the largest size of subsequence that is an AP sequence for C(then subtracting from N to get ans) but its TLE. Can anyone explain their solution?

Fix any two elements of the array and get the common difference of the AP according to those two "fixed" elements. Now adjust all other elements accordingly. Among all n(n-1)/2 cases, the one requiring minimum alterations corresponds to the required answer.

after fixing the 2 numbers how did u check.

did u had everything in double datatype?

Yes, here is my submission.

You can also rewrite the equation and write the condition with integers.

could you please elaborate this.

For example in the submission that exulansis linked he checks the following condition:

`v[k]!=a+d*(k-i)`

.You can replace

`d`

there and you get`v[k]!=a+(b-a)/(j-i)*(k-i)`

and if you multiply both sides by`(j-i)`

you get`v[k]*(j-i) != a*(j-i) + (b-a)*(k-i)`

which are all integers.Nice. This is better. You don't require to worry about floating point error

Just realised my stupidity. This is in fact a viable solution. But i was not doing what i described here. Lol, so I came up with the solution while trying to ask for help.

UPD: The one I proposed here is actually wrong and the one I was doing in-contest is right but is way too slow.

This is actually not a correct solution. I got stuck on this approach, but here is a counterexample:

`2 1 6 8`

The answer is 1, but doing what you described gives 2.

WA on B was the most irritatingI haven't proven it yet, but for problem E was it enough to try to find the nearest character in s equal to the current one we are evaluating (iterating through the target string t)? To update the answer, then we just find a smaller character instead. The idea would be to do this with Segment tree / BIT,

Was not able to do the kindergarten math of C :/

And noticed after contest that it is also doable with doubles instead of fractions which is even simpler.

prob C was directly available here: https://stackoverflow.com/questions/31750842/find-minimum-cost-to-convert-array-to-arithmetic-progression just check if n<=2 then ans = 0 else follow the code above :)

I did get the idea of the arithmetic progression and fixing two positions after some minutes. But was not able to write down the simple fraction addition to check if given value at some position fits that progression.

due to lags in the last 10 seconds, I didn't have time to send problem H (let's see if it works later...)

upd. no :)

Did anyone else think there were some server issues during the contest? It took me around 30 minutes to just get to read the problem statement of B, not even the lightweight sites were loading for me. Wanted to see if this was a server issue or a local one, because other sites were loading...

Earlier an hour before contest it was but during contest it was totally fine.

Same for me. Codeforces only worked for me in the last ~30 mins and even the lightweight websites were taking too much time to load. I was using a different internet connection today, I thought it's because of that.

Its Working properly In my Case

Today, i literally understood the meaning of laxicographically smaller.

Happy new year everyone <3

In whole contest the codeforces not worked properly,uneccesrily buffering . : (

One thing you should learn:

Support.

in problem B:

output must be:

`dbbbbd`

Any one felt server is slow?While contest

Exactly! Even the lightweight sites were refusing to load, I thought it was a local issue, but others were having problems too, and other sites were loading fine

It is taking 30-40 seconds to reload the standings and submissions :( .

What's the idea behind B?

You just had to take the longest nonincreasing prefix of the string and mirror it.

The only corner case is when the first two characters of the string are equal, in this case just take the first character and mirror it, as all possible generated strings are guaranteed to be lexicographically bigger that it.

This problem B derailed my contest. Seeing the number of successful submissions made by the others, I had a feeling that I was just missing something obvious. In the end I got some sort of an overcomplicated mix of greedy and DP (keep increasing 'k' as long as the new string becomes lexicographically smaller than the previous one and use DP for doing fast amortized O(1) comparisons of these strings). Unfortunately I was just a few seconds too late to submit it during the contest time and got interrupted by the "end of contest" banner. Okay, no luck getting back to blue in 2021, but hopefully 2022 will be better.

Same, in 2021 im returned to cyan. Sadly

I tried greedy, by finding the longest decreasing substring from 0, however it can be easily countered with cbba.

Short statements, really interesting problems, and good distribution. Thanks, 300iq!!

Are you aware that a problem very similar to H (max clique instead of number of all cliques) was on an OpenCup on 5th December ;d?

Well, unfortunately I was not aware :(

It is also kinda funny considering the fact that I've created this problem two years ago. In the 300iq Contest 2 there was a version with $$$\geq$$$ instead of $$$\leq$$$, because I couldn't solve $$$\leq$$$ back then :)

can somebody explain me this

code actual141111062 this is my submission

when i run the code in custom invocation (top right bar on codeforces) the execution time is 3478

while if i just comment the if condition

like thisthe execution time is just 452

why????

in case someone is intereted in test caseany idea for E ???

Greedy. Iterate through the string $$$t$$$. For each position, we either find the closest character in $$$s$$$ that is strictly smaller than the current one we are evaluating on $$$t$$$, or we just find the closest equal character and move on. The number of swaps required to properly position each character we pick is $$$pos + sum(pos + 1, n) - i$$$, where $$$pos$$$ is the position of the character in $$$s$$$, $$$i$$$ is the current index of $$$t$$$ and $$$sum(pos + 1, n)$$$ is the number of characters previously taken that are on the right of $$$pos$$$. Code : https://codeforces.cc/contest/1616/submission/141130793

Haha, I just bruteforced my way through C and prayed that it will pass =) 141117223

Can anyone please explain how we can tackle E? I read the comments above but still have no idea

Is D solvable using segment tree?

It is I believe. Everule solved it using segment trees (141109186) in contest though I don't know what it does as I cannot comprehend how his brain works.

First we subtract $$$x$$$ from all elements, and now we need all subarrays of more than one element to have non-negative sum.

I calculate the minimum $$$lim_i$$$ such that $$$[i \ldots lim_i]$$$ is an invalid range. For that let $$$p_k$$$ be the sum of the first $$$k$$$ elements. Notice that $$$p_i \le p_{i+2} \le p_{i+4}$$$ for the range $$$[i \ldots i+4]$$$ to be valid, so the value of $$$p_i$$$ becomes irrelevant after a certain range, in which case the maximum range is the same as for $$$i + 1$$$. If it becomes invalid earlier, then you can do quick brute force on small subarray.

Then I just iterate over where the next removed element is, as element $$$i$$$ being closed means that there is some element before $$$lim_{i+1}$$$ that is closed, and we take the minimum dp value among those. You could also probably do $$$O(n)$$$ for this but I didn't think that much.

I solved it using segment tree. First of all, we need to ignore an element from a subarray $$$[l, r]$$$ only if $$$ps(r) - x \cdot r \lt ps(l - 1) - x \cdot(l - 1)$$$. I call such subarrays "invalid subarrays". Note that $$$ps(x)$$$ here means prefix sum upto index $$$x$$$ ($$$1$$$-indexed).

Say $$$F(i) = ps(i) - x \cdot i$$$. First, I precompute all $$$F(i)$$$ and store it in an array $$$V$$$. Now for any invalid subarray to end at index $$$r$$$, we need atleast 1 $$$l$$$ such that $$$F(l - 1) \gt F(r)$$$.

We maintain a segment tree where index $$$i$$$ stores the largest $$$l$$$ such that $$$V_i$$$ is the largest value $$$\lt F(l - 1)$$$.

In this way, while iterating over the array and updating and querying the segment tree, we can find out for every invalid subarray ending at index $$$r$$$, the largest starting point $$$l$$$.

Once we have all $$$r$$$ and corresponding $$$l$$$ values, we can greedily choose what indices to not pick so that we have to (not pick) the minimum amount of elements.

Hey, stupid question: why does my solution for B work? (141087102)

Stupid problem F. A $$$\mathcal O(m^{3.5})$$$ solution is so obvious that I think there will be testcases to let it TLE. but everyone's naive Gaussian elimination implementation passed F in 31ms.

It's like, a simple tripartite graph with $$$9 + 9 + 9$$$ vertices and $$$3 \cdot 9 \cdot 9$$$ edges, and $$$9^3 = 729$$$ triangles, can let my solution spend 280ms in naively eliminating the linear system. But you didn't put any of similar graphs into the testcases.

I didn't dare to write it for a long time, worrying about TLE..

I doubt that there is no big tests in the testcases. I think that this particular solution is just very fast. You can try to hack all these solutions if you think you know how to

There was no big test in the systests. I was able to uphack a few of the AC solutions for TLE -- for example: https://codeforces.cc/contest/1616/hacks/779744

It's true though that the constant factor on this solution is very fast. However I don't see any reason that this problem needed to have 10 tests at a time and only 1 second for the time limit.

You can work mod 3 with bitsets, maybe they wanted to cut solutions that didn't use them?

Unfortunatly due to the relatively small constant of Gaussian elimination, even my naive implementation passed it in 850ms (141133870). (with absolute no pruning, I just used traditional Gaussian elim. but not the Gauss–Jordan elim., so there’s smaller constant)

I tried the tripartite graph of $$$[9, 9, 9]$$$, and the complete graph $$$K_{23}$$$ but both cannot let the implementation TLE. (actually an observation is that, any $$$K_5$$$ must be monochrome, my first code used this fact to reduce the constant)

It seems that 300iq intended to let these naive solutions to pass. But I think the simple observation of “ $$$1 + 2 + 3 \equiv k + k + k \equiv 0 \pmod{3}$$$ ” is not worth an F in a combined round.

Exactly, when I read problem F for 2 minutes before solving E, I immediately got that solution and thought "Lol get back to E, I am under-estimating this" because of only 30-40 solves.

You can actually get way more triangles, around $$$1771 = \binom{23}{3}$$$ with a clique of size $$$23$$$.

The reason of why I didn’t use $$$K_{23}$$$ is any $$$K_5$$$ must be monochrome, and maybe some solutions can check this to reduce the number of variables and equations. (actually myself considered this. But after the contest ended, I realized that I’m overthinking, and I’m very frustrated because of the puzzling constraints)

Similar feelings about E: firstly I wanted to fast write $$$O(26nlogn)$$$ with splay tree but thought it will TLE and I spend ~20 minutes to achieve $$$O(nlogn)$$$ with BIT. Splay passed in 62ms in upsolving...

Can anyone please tell me the mistake in this code for problem C

CodeIt might be due to double / float being not precise. It is better to implement this using int. To do this, instead of dividing $$$x$$$ by $$$(j - i)$$$ at the initial step, you check whether $$$(a_j - a_i) \cdot (k - i) \% (j - i) \neq 0$$$ which means that the result is a floating point number, otherwise you can get the expected value of $$$a_k$$$ to be $$$\frac{(a_j - a_i) \cdot (k - i)}{(j - i)}$$$.

You can view my submission here: 141082107

Thank you so much!

It seems for E, you can just copy and paste this , modify it a little and run binary search to get K. Unfortunately, I was unaware of it and coded a solution from scratch... RIP rating

Are you seriously saying that being unable to copy paste an existing solution is unfortunate? Yikes.

Hi, This contest has a lot of traps (eg. Problem B, C). May I ask that how do you all do testings other than stress testing to find out the wrong proof that we have made? I am very often stuck in these kinds of situations where my solution is mostly correct but due to tricky edge cases or wrong assumptions (for eg my problem C) that I could,t find out I was a mistake. I wish that I could get some help in facing these situations because I quite often faces these issues. Sorry for the bad english. Thank you very much.

I am so sad. After I solving the Problem C I am nearly 70th, But after I solving the Problem D I am nearly 700th.

I use a dp to solve the Problem but I think it is too hard. So I use greedy and pass the pretest suprisely in the end. It takes me nearly 1h. Is there anyone have an easier solution? Many thanks.

My stupid greedy

The first part of my solution is similar to yours: subtract $$$x$$$ to all the elements of $$$a_i$$$ so the problem becomes make range sums non-negative.

Then, we use the following greedy algorithm:

Iterate from $$$i=1$$$ to $$$i=N$$$, let us assume that $$$j$$$ is the maximum index smaller than $$$i$$$ such that $$$a_j$$$ is not selected. Then, if there exist any $$$k$$$ where $$$j < k < i$$$ and $$$\sum_{x=k}^i a_x < 0$$$, we can delete $$$i$$$.

To implement this, we can store the prefix sums of $$$a_i$$$ and keep track of the maximum prefix sum when we iterate from $$$i=1$$$ to $$$i=N$$$.

You can see my submission here: 141100821

When will ratings be updated?

It's clear that rounds with unusual timing have unusual rating updating :)

CF Predictor says I'm becoming a specialist, but only by 6 points. I can't handle this uncertainty

let's go

Codeforces is taking longer time than usual to reflect the rating changes :(

True

Please add tutorial, looking forward to read approaches for D and E problems

what is error in my solution for problem b my solution

wrong answer 8th lines differ — expected: 'baaaab', found: 'baab'

for input: baa

When will ratings be updated??

you can use CF predictor to get approx idea about what your rank will be be. I understand the excitement before announcement of ratings

Can someone find the mistake in my Problem-C solution?? link to my solution. https://codeforces.cc/contest/1616/submission/141148146

same here bro

use integers and multiplication instead of floating points and divisions

yeah, I got it Thanks for the reply.

What is error in

for problem C . It is failing in 7th testcase.my solutionyou have used double as data type for the common difference. instead of this you should have cross multiplied the denominator value with all terms in the equality statement

yes got ac but why division of doubles give wrong answer. Is it due to precision error?

Yes it is most probably due to precision issues in comparing double values. I handled that in my submission — 141107791

Your solution is failing probably due to comparison operator (!=) you are using in inner most for loop arr[k] != a + k * d. This way of comparing double is inappropriate. Replace that line with : abs(arr[k] — (a + k * d)) > 1e-10 and it should pass !!

When will the rating be updated？

Editorial of this contest is published https://codeforces.cc/blog/entry/98501

somehow they didn't linked it to this post

I think now ratings are going to be updated next year.

In problem C,7th testcase was not included in system testing!!

Was unaware of ideone has public access. Got a system email. Can someone help how to change it??? Ig I need to change my editor..

Anyone else waiting for rating change to see that beautiful purple color of candidate master

@MikeMirzayanov I have recieved an email from codeforces that my code is plag. This is really wrong sir,when i haven't done any cheating then why am i receiving such messeges from the codeforces.Please look into the matter sir.Its a Humble Request Sir.

I didn't have much knowledge about ideone, and wasn't aware that using it with default settings will lead to copying of my code. Honest mistake. Would really appreciate if i get my ratings back. Getting those points wasn't so easy :(

Can someone please clarify why the 7th test case was not included in system testing for problem C ?

Those are hack tests. And probably added by >=CMs after system testing

Please tell me how to get the reward of this competition

You can claim your prizes here:

https://nearcrowd.com/crowdforces

The official email / post about it will be sent out to everybody soon.

Hi, my solution for problem 1616B (141080537) and the solution ti21_phnam (141107393) was found to be too similar by the system. We believe that there is nothing similar in them, except for the title, but this is a comment. Can the authors of the round or the admins deal with this situation? @MikeMirzayanov

Yet another young LGM in China ,He_Ren orz.

He_Ren so good, and wish you one day become lgm too!

thanks .

And where did you guys take DIV 3 and Div 4 contests? Not all of us are in the elite league consider!!!

Do you realize that beginners get more resources than anyone else? You get more contests, more tutorials, everything. And yet you demand more. Be happy with what you get. Div 2 contests are completely suitable for you. Don't be so entitled to expect everything to be tailor-made for you.

Further, the last Div. 3 was a whopping 10 days ago. That's a normal gap.

He is not wrong tho. You guys even participate in div3. Solving questions in like mins or so and When we get stuck, (and check the leaderboard by mistake), you guys have already finished the contest. It demotivates the shit out of us.

Talking about div2, Sometimes it is difficult to crack even A. But you guys, make it look so easy that anyone below you, if asks for something(like the comment you replied to), You guys treat it like its worth nothing. -is-this-fft-

I think if you get demotivated by the existence of people better than you then it is hard to accomplish anything in life; Codeforces should not take such feelings into account.

When I started, there was no such thing as Div 3. And people managed to improve just fine. The whole existence of Div 3 is IMO a big favor.

.

Eish!!! Relax i didn't mean you come out being rude!!! It was a question!!

Wrong solution marked correctMy solution of the problem C has been marked as AC in the contest. AC SOLUTION However this solution is incorrect possibly due to floating point precision. On trying to resubmit the problem now it's giving WA on test 7, however in the contest there were only 5 tests and the solution was able to pass all those tests. Would you please revaluate the solutions? @thenymphsofdelphi @74TrAkToR @gamegame @300iqIt could be that extra tests got added after system testing. In that case it isn't right to rerun systests since it could be done forever.

Well that sounds right! I understand the thing, however it’s weird to know that the testcases were weak enough to make some wrong solutions pass. Thanks for the input

Let's use the new feature!

Problem A:

liked:

disliked:

neutral:

Problem B:

liked:

disliked:

neutral:

Problem C:

liked:

disliked:

neutral:

Problem D:

liked:

disliked:

neutral:

Problem E:

liked:

disliked:

neutral:

Problem F:

liked:

disliked:

neutral:

Problem G:

liked:

disliked:

neutral:

Problem H:

liked:

disliked:

neutral:

I can assure this near token will soon becomes the highest reward for a cf contest lol. Up Only.

Hi! I got rk12 in the goodbye round. However, I only received Ⓝ0.1 rather than Ⓝ16. I guess it's because I changed my handle after the contest. What should I do now?