Hello, Codeforces! ☀️☀️☀️

We are glad to invite you to our second Div. 3 round, which will take place on Nov/17/2023 17:35 (Moscow time). **The round will be rated for all participants with rating less than 1600.**

You will be given 7 tasks and 2 hours 15 minutes to solve it.

The tasks were prepared by zwezdinv, meowcneil, EJIC_B_KEDAX, Sokol080808 and molney.

Remember, that only *trusted Div. 3 participants* will be included in official standings. To qualify as trusted participant you need:

- Participate in at least five rounds (and solve at least one problem in each of them)
- Do not to have a point 1900 or greater in the rating

We would like to thank:

- MikeMirzayanov for Polygon and Codeforces
- Coordinators Vladosiya and Gornak40 for excellent coordination
- ace5, pavlekn, 998batrr, EternalAlexander, Rubikun for red testing
- Yar_sem, Be_dos, alex.kudryashov, makrav, qqq1n, 74TrAkToR, Turkhuuu, _LeMur_, beemax, sedev57, misorin for yellow testing
- Illumina, Alex239, SashaT9, Pa_sha, goncharovmike for purple testing
- _shakespeare_, OR_LOVe, TimVen74, ivan.alexeev, krigare, yaaarseny, dragonknight, Apachee, EzikBro, null0124, KoT_OsKaR, micho, keroru, dasha..zhilina for blue testing
- wtf._., El_Gemmy for cyan testing
- Flash70 for gray testing

Good luck everyone!

UPD: Editorial

As a tester I recommend you to participate in round, and don't forget to read all problems statements

the codeforces round 881 div 3 which was by the same setters was also a really good round !!! hoping for a positive delta :)

Hope I will reach specialist again.

good luck!

This is one of the best DIV 3 rounds I have ever participated in. Thanks for organizing such a great round!

me too!!!

As a tester, I recommend you to take part in this round!

1899B - 250 Thousand Tons of TNT

best task

bruuuuuh: -10)))

as a tester, this round is awesome

as a setter, this round is awesome

as a setter’s friend, this round is awesome

as a setter's friend's friend, this round is awesome

as a reader , this round is awesome

as a reader's friend this round is awesome... TNT

as a contestant, this round was amazing.

as a contestant's not friend, this round was awesome.

as a human being, this round was awesome.

As a tester, this round is very rofl.

as a not tester, I hope this round will be great

Does participating in at least five rounds count this round? Because I have been in exactly 4 contest before this :D

LOL I have the same doubt!!

petition to give Gornak40 black handle (as he is, in fact, huge male gorilla) :spinning_gorilla_emoji:

:gorilla: :rotate:

Score Distribution?

div3 has no score distribution

didn't know, thanks

I hope everyone enjoys this contest ^_^

Good thing that Gornak40 didn't create the tasks too, his problems are special

Don't be rude, most of his problems are pretty funny!

Excited for this round. Best of luck to all contestants :)

Green testing crying in the cornerCan I give this contest and become lgm?

In the contest page shows 2 hrs but in the blog page shows 2 hrs 15 minutes how is it possible?

Fixed.

CR7 > MESSI

how old are you

I dont remember

your mother > CR7's mother

your mother > kim kardashyan

good luck y'all

thanks

Coming back to give contests after long time, feels good to be back!!

I hope this round will help me reach 1200+ rating. As a participant, I wish you good luck!

hope this round will help me reach cyan

I really enjoyed your first div 3 round (Codeforces Round 881 (Div. 3)). Very much looking forward to this one =)

Wish I could be a pupil tonight！！！

Let's race who will be first

I will win Codeforces Round #909 Div3!

If you love your GOD like my comment

If everything okay, i will get green after this contest. I've been waiting a lot for this moment. My canonical event... is coming :'0

Let's do it !

As a tester I recommend you to participate in round, and don't forget to read all problems statements, it can be usefully)))

m1, m2, m3 codeforces sites are not working.

Thx. Very nice round. Enjoyed problem G alot!

What is so special about it?

I liked mixture of merge sort tree and dfs. Maybe it was not intended, but i liked my solution.

I solved same way, it's good problem tho, i'm not saying it's bad problem

can you tell me ur idea to G ?

contest running bruh :|

Well, lets count $$$tin$$$ and $$$tout$$$ ($$$tin_v$$$ = first time we entered vertex $$$v$$$, $$$tout_v$$$ = time we leaved vertex $$$v$$$ completely). Vertex $$$u$$$ is an ancestor of $$$v$$$ if and only if $$$tin_u \le tin_v$$$ and $$$tout_u \ge tout_v$$$, but $$$tout_v > tin_v$$$, so it brings us down to this condition: $$$tin_u \le tin_v \le tout_u$$$. Now lets make every $$$p_i = tin_{p_i}$$$. Every query we need to see if there is a number from $$$tin_x$$$ to $$$tout_x$$$, that is included in segment $$$[l; r]$$$. This can be done using segment tree in $$$O(log^2n)$$$ per query.

But why constraints in F are so low? My solution is linear with 10 lines of code...

How do you verify that the answer is correct faster than $$$O(n^2q)$$$?

We build a bamboo tree and just hung $$$n$$$-th vertex to $$$d$$$-th. In this case path from $$$n$$$-th vertex to $$$1$$$-st vertex will be exactly $$$d$$$.

You didn't understand my question. How does the

contest systemmake sure thatyour outputis correct faster than in $$$O(n^2q)$$$? They can't assume everyone will use the bamboo solution.Oh, okay, i got it now. Thanks

Didn't notice that only people competed in 5+ rounds are rated......

Already spent 1+ hour on the 7 problems

Sad QAQ

That qualification is for being a trusted participant.

"The round will be rated for all participants with rating less than 1600"

Yeah, I understand the constraint. I really enjoyed the 1+ hour anyway

yes sir

B,C >> D,E

pC has tedious implementations. I'd say E is quite easy as I solved it in 10 minutes (compared to 80 minutes for C).

However, B and C are easier when it comes to finding ideas. However, proving your idea works and implementing it makes it a lot more difficult, compared to E (can't say anything about D).

What's the intended solution to G? The only two solutions I could think of seem completely overkill:

Merge Sort Tree on DFS order times of the inverse values of the permutation.

SQRT Decomposition on whether each node is a parent of at least one node in the buckets $$$[p_1, p_{\sqrt{N}}], [p_{\sqrt{N} + 1}, p_{2 \cdot \sqrt{N}}], \ldots, [p_{k \cdot \sqrt{N} + 1}, p_n]$$$. For the upto $$$2 \cdot \sqrt{n}$$$ remaining nodes that don't lie completely in a bucket check them each in $$$O(1)$$$ using dfs order ancestor checking.

Is there an easier approach?

Euler's tour

This is what I mean by "DFS Order".

Thats overkill in that? Do dfs?

Can you explain why my Mo's algo solution gave TLE on test case 15.Submission

I think sack (DSU on tree) is easier

I tried implementing Sack (DSU on trees) along with Segment Tree for point updates and range queries but I was getting TLE'd.

Author's solution was MST on DFS order.

You scared me with MST... I thought you were talking about Minimum Spanning Tree, before i read the editorial...

Actually, i have no idea how you can do minimum spanning tree of dfs order... But we'll skip that point

I used a persistent segment tree with DFS order to pass G.

consider DFN.

We call the dfn interval of the i-th node's subtree is dfn[i] ~ dfp[i]. also we call the dfn[p[x]] is pdfn[x]

So for a query l r x, we're actually querying is there any pdfn[l~r] in the dfn[x]~dfp[x].

We can take all queries offline and use seg tree queries

https://codeforces.com/contest/1899/submission/233153059

It's possible to use small to large merging. Instead of adding a node's ID, add the position in which its ID appears in the permutation. Then a query can just be solved by binary searching on the set of values at each node.

I solved it answering query offline with DSU

Solved A,C,D,E but can't understand B. B>>>C,D,E

me too , solved A,C,D and I focused on B instead of E and still couldn't solve it ?

I easily solved A,C and D

but B took me most of the time and still couldn't solve it , how to solve ?

What i did was, for every possible K, found out sum of continuous K values and found max and min of all the n/k segments and answer is max sum — min sum of all those segments.

You just use greedy. Find all divisors of

n(except n itself) : - For each divisori, "i" will represent the number of trucks used. - For each subarray of lengthi, find its sum. - Keep track of the maximum sum and the minimum sum - update the answer , such that ans = max(ans, maximum_sum — minimum_sum)E was easier than B wtf

Also F was easier than B

based

Problem F,on example,2nd test case, in the third query already exist a path with distances 3 between 2 leafs , 5-4-2-3, but the answer wasn't -1 -1 -1.I'm receiving WA veredict for that?

Greedy-forces :)

oh f i just solve G 1 minute after contest time woooooooow

The contest is very good. Hope I solved more

I finished the G at the last minute, and because I forgot to write "return 0" ,I got compilation error and I passed it only 1 minute after the contest.

it's very sad... Good luck in next rounds. My friend got same situation with E

In D it's hard to prove that 1 and 2 the only correct combination without same numbers. Bad problem in my opinion.

It's easy to find it if you do some algebraic manipulation on the expression. a_j*2^a_i = a_i*2^a_j ----> a_j/a_i = 2^(a_j-a_i)

Since the function on RHS rapidly increases for large a_j,a_i, you can deduce that non trivial solution would have small a_i,a_j.

Its not that hard to prove :

Condition of the problem is equivalent to $$$a_i/a_j = 2^{a_i}/2^{a_j}$$$

WLOG assume $$$a_i>a_j$$$, we get $$$a_i/a_j = 2^{a_i-a_j} \leq 1e9$$$ $$$\iff a_i-a_j <= 30 \iff a_i/a_j \leq 30/a_j+1 \leq 31$$$

$$$2^{a_i-a_j} \leq 31 \iff a_i-a_j \leq 4 \iff a_i/a_j \leq 4/a_j + 1 \leq 5$$$

$$$2^{a_i-a_j} \leq 5 \iff a_i-a_j \leq 2 \iff a_i/a_j \leq 2/a_j+1 \leq 3$$$

$$$2^{a_i-a_j} \leq 3 \iff a_i-a_j \leq 1$$$

come onnnnnnn if the time was just one minute moreeeee ohhhhhhhhhhhhhhhhh

One of the easier contest I've had in a while

Problem Statements are too hard to understand.

low quality problems on Greedy_forces

I had done more problems on this contest, than anyother, one of them being D, which boosted my confidence and my hunger for working more. Thank you for such an amazing round!!!

In G, if

`It is guaranteed that the sum of n and the sum of q over all test cases do not exceed 1e5.`

shouldn't Binary Lifting work?I got TLE on TC 10. My Submission

bruh the sum of $$$q$$$ over all test cases do not exceed $$$10^5$$$, not the sum of $$$r_i - l_i$$$

dont feel like div3, only 1 task was for div3 or div4

D will appear in my nightmares

other than that, the contest was great

Spent 1.5 hour for B,C. For D, you just need to understand the condition and play roulette. E is rofl.

Free hack : submission

Mine is also hackable due to precision issues.

What was the solution to D? I observed something that only 1 and 2 matters.. but couldn't get to the solution

We need to count the numbers of pairs we can make w/ repeated numbers and also dont forget when the pairs of 1s and 2s. Let's say a number repeats n times, the numbers of pairs we can make w/ them is

`C(n,2) = n!/(2!*(n-2)!) = n*(n-1)/2`

Then we add that to the product of occurrences of 1s and 2s to get the final answerai * 2^aj = aj * 2^ai

let suppose (aj>ai)

2^(aj-ai) = (aj/ai);

now

aj/ai can be max 1e9, so aj-ai can be a maximum of 30,

so now for every ai, chek possibilities for numbers in ai+1 to ai+30;

O(n log(n)) solution of G using persistent segment tree 233188158

$$$O(nq)$$$ solution for G: 233198776

Limits $$$n, q \le 10^5$$$, TL=3sec should be non-existent in 2023 :)

it is hackable right ?

I don't think so, it's $$$\dfrac{nq}{8}$$$ because of vectorization, so should be fast enough

1e10 / 8

is 1e9 and I know that O(1e9) is at least need 5 second to run

Of course not, $$$10^9$$$ simple operations is very fast on modern CPUs.

$$$10^9$$$ executions of some complicated code is slow, but $$$10^9$$$ processor operations is fine

I tested your code ON C++ 17 and the code got TL

Pragmas enable vectorization, without vectorization it's just $$$nq$$$, not $$$\dfrac{nq}{8}$$$

And C++20(64) matters because 64bit compiler can handle 8 integers at the same time, while 32bit compiler can handle only four (as far as I understand)

thank you for answering my questions

sad

D could be solved without knowing the fact that only the combination of 1 and 2 is valid.

The statement equivalents to: Count the number of pair (i, j) such that $$$a_i * 2^{a_j} = a_j * 2^{a_i}$$$. Suppose $$$a_i > a_j$$$, then we have: $$$a_i = 2^{a_i - a_j} * a_j$$$. Knowing this, we can loop for each $$$a_j$$$, how many $$$a_i$$$ could satisfy this equality, and add it to the answer. The case when $$$a_i = a_j$$$ should be handled separately. My solution: submission

First contest I could fullsolve, wow!

You are expert now! Congratulations!

Thank you!

what's intuition behind E?

Really great round! In my opinion, the condition of problem D was too confusing, but the problem is still good

What will i receive when i hack a problem successfully?

glory and honour

Problem D is fun to understand the statement and enjoyable to solve, I really like it!

Thank you guys for the contest!

Problem B was difficult to understand

Yes :(

can anyone tell me why people having fewer solve count and people having same solve count and high penalty have better rank than me. Thanks!

Which data structure do I need to know to solve G?

El_Gemmy

Agmed tester <3

Thank you so much for contest :)

what all concepts are needed to solve G?

It was a nice round. Hats off to you guys (editorial panel). Really enjoyed as a newbie coder.

i was good but very bad luck because i had a little mistke in B which made me late and when i decide to leave it i went to solve C and D i had oubt that in D the only combination is 1 and 2 but kept lookign for solution until idecide to try it and got AC and then got back to B and found the mistake anyways i solved 4 problems for first time

Well done, buddy. I'm sure you'll succeed soon.

It was really an awesome contest.! Thanks all writer's and tester's.

Don't know why

problem Bwas one kinda boooooommm..Found a cheater Salman_Johir. This 233189111 is his submission. He copied this code from this video's code. Look at the both code. He just has changed the variables' name.

come on problem C is just an application of a known algorithm

Problem C is an application of a known problem, but if you check the code of the video and the code of the cheater Salman_Johir you will see: Their code is exactly same, code with 10-12 lines can be coincident due the algorithm,but if you give it a check you will see every bit of the code is similar.

And this guy's contest number 904 was totally copied and his both solutions were skipped!

Check here

kid,focus on your goal not others.good luck

https://www.geeksforgeeks.org/largest-sum-contiguous-subarray/ this algorithm is copied by this vedio.right??? hahahaha

Come on, you cheater!

The code you just have given from GFG is certainly written way before the video. And this algo is common. You definitely know the point. The point is there are lots of things which is not written in the GFG code, but written in the video. And you have exactly copied those things from that video. It is clear, man! Just admit. You got caught, man! And you know that. Why did you changed your profile picture and the school/college you study?

And what about the contest you got "skipped" you loser?

I have the ss of the school you study, I will send your this cheat to them. And you are from Bangladesh, no? I have seen those in your profile already, don't worry.

LOL! Have some shame! Salman_Johir Cheater, which country are you from?

You have got "skipped" in Codeforces round 904 too. Because of copying others code in contest time codeforces has given you "skipped" and still you are talking like this?! Such a brainless! Have some shame you loser!

Your cheating is here: Click

You are my biggest follower.thanks man.carry on

LOL! I am your follower! I even don't know the country you are from. Googled it and found it's somewhere near India. I just got you from a room, went to hack your code. Then found you are already a loser! LOL!

You got skipped in a contest,

Surprisingly in last contest you ranked around 2000, and suddenly 10k+ , LOL! You are lucky that codeforces failed to identify your cheating on that contest. But in 904 round you got skipped! LOL!

Such a looser!

This is why you're still newbie. Imagine cheating in div3 rounds. Skill issue.

very week pretest in problem C

problem C should not even be in the round it is application of famous algorithm

Thank you for the problems!

It's nice there is a short and witty solution to each one (except G).

For problem C 1899C - Yarik and Array , just modify the Kadane's Algorithm to incorporate the extra condition that parity of consecutive elements should be different.

Rest of the algorithm remains the same.

CodeFor Problem D 1899D - Yarik and Musical Notes, we need to count the number of pairs (i,j) such that

Taking logarithm to base 2 on both sides

We only need to take integral part of $$$\log_2{a_i}$$$ to avoid double/precision errors.

The only edge case to take care of here is power of 2 ($$$2^k$$$) and 1 less than power of 2 ($$$2^k-1$$$) both yield the same value yet they do not satisfy the original equation, so we need to separate powers of 2 from the other non-powers.

Also, club all the $$$1$$$s into $$$2$$$s. Now all the $$$a_i$$$, $$$a_j$$$ which hold the above equation can be stored in a map and number of such pairs will be : $$$ \displaystyle C_{2}^{N} $$$

CodeIs it ok to just use logs for D ? This works for now: https://codeforces.com/contest/1899/submission/233222857

Ofcourse, you can. And I see that you are actually using log to base 2.

The point is the function $$$2^{x}/x$$$ is increasing for $$$x > 2 $$$ so it is going to have different values for every different $$$x$$$ greater than 2.

Just handle the case for $$$x=1$$$ and $$$x=2$$$.

Could anyone please explain how to solve B?

its just brute force. it will be n*sqrt(n) I think that there can be only sqrt(n) divisors for an n.

what is better O(n sqrt(n)) or O(n logn)? I am right that asymptotically O(n n**0.33) equals O(n n**0.5)?

O(n logn)<O(n*sqrt(n)) eg. if n=1e16. logn=16, but sqrt(n) = 1e4

i got an O(n) solution that was hacked for problem D (TLE). The official solution is O(nlogn). Anyone throw some light on this? https://codeforces.com/contest/1899/submission/233176732

its just traversing a map (ordered or unordered takes too long for large maps) so even if its o(n) it will fail if all numbers are different.

Unordered maps can be hacked because of how collisions are handled. You can use custom hashing functions as parameters to the unordered map to solve that problem.

Is there an int version of it?

When I check the total number of participants who officially solved the problem A , it shows there are about 10k such participants , when I see the official participants who solved problem A , it shows there are about 17k of them .. so ideally , there should be about 17k people who have appeared for the contest , not near 10k...asking it because it would affect my rating..

can someone pls explain ?

I think rating is based on the official 10k the rest of the 17k are just unofficially doing the contest they don't get rating changes and they don't affect your rating.

but 17k participants are being shown officially , when u check in friends only mode

The friends mode is bugged.

I find that a lot of ranks , including mine have been skipped in the official standings .. i don't think that friends mode is bugged

also i can not find my name in the common standings

People, I didn´t make it :c

Why can't i find my name in the common standings ? Why am I an untrusted participant ?

you can find you standings in the friends' standing, see your standing, then search for the range of standings that you are in THEN search you name

still couldn't find myself :(

You're at rank 6525

Good contest, Really hope I can break the 1200 rating barrier after this contest

when will the ratings update?

My submission for D got hacked https://codeforces.com/contest/1899/submission/233134841. Is it cause I used unordered_map instead of map? :)

Nope, but rather because you are using int to store the number of pairs.

Think about worst case scenario, if I put all the $$$N$$$ values of array $$$a$$$ equal to $$$2$$$, then the number of pairs would be $$$N*(N-1)/2$$$, ain't it?

And $$$N$$$ can be upto $$$10^5$$$, can u store this value in int? or do u need to use another data type?

I have defined the macro #define int long long Btw hacked by TLE not WA :)

Oh! I did not see that!!!

Then it must've been the notorious unordered_map collisions resulting in $$$O(N^2)$$$ time complexity from $$$O(NlogN)$$$

Here 233255221 it works by using custom hash for the map.

Never ever use raw unordered_map in contests, always use the above custom_hashed_map.

You can read more about it in this blog.

I could have solved F if it had been in position A :))

You didn't write that there would be hacks...

got AC on Problem C during contest but got tle on system testing......?isn't its complexity O(n)!!!

Code : 233167945

UPDATE:: got TLE because of "auto" iterator!TLE :233167945AC :233276048No, it's not; you have a nested loop when you iterate through vector

`v`

.overall it would check not more than n times r nested loop is used for the alternating subarrays so it wont iterate over n time

Well, then how else do you explain your TLE?

For "AUTO" iterator

TLE : 233167945

AC : 233276048

Thank you for replying!Either way, your code is not $$$O(n)$$$. Your new submission just passes, when in reality an $$$O(n)$$$ solution would take ~60 ms to pass.

the exact submission got AC after resubmitting?

AC : 233277883

Basically, you got unlucky because it got TLE during system testing (There is no guarantee that it will run with the exact same time every time, because computers don't work like that)

But 982ms/1000ms should give you a hint about why there is a high chance it will get TLE and need to optimize your algorithm

The AC code passed in 982 ms / 1000 ms, that's very very close to the time limit. Maybe the use of the range-based for-loop had something to do with your code getting TLE, maybe it didn't. We can't really know since if your code is that close to the time limit, even the same exact code can pass on one submission and get TLE on another.

If you're wondering why your "$$$O(n)$$$" solution is on the verge of TLE, it's because you create an array

`int a[MAXN];`

every test case. Creating and initializing an array of length $$$n$$$ is $$$O(n)$$$ and since you're initializing an array of length $$$MAXN$$$, the time complexity ends up being $$$O(t\cdot MAXN)$$$ which is quite slow.Same... I guess Its just a system failure :\ 233286944

Even though I'm using an unordered map. Everything should work just fine.

And to be honest, I dont even understand why in the contests where the all problem tests are executed during the online sumbmission, the "aftertesting" is the case.

Hi everyone! I submitted solution for problem C and it got accepted during the contest but now it shows as wrong

Best contest

it was interesting. but, i wasted time to search something good to solve problem B, i thought to bruteforce that 'k' at first, as it was.. but don't know why i felt that stupid and moved to C:). Now i saw it's E was easier than that, it was likely not arranged in increasing difficulty :) also, i felt C easier than B.

B > A, C, D, E, F

Can someone explain what is wrong with my solution? My O(n) solution for D got hacked https://codeforces.com/contest/1899/submission/233160169

I'm not a python user so I can't get you an 100% precise answer but : - I found that dictionary using only string keys are way faster than other dictionaries, this would have been enough to get you an AC : https://codeforces.com/contest/1899/submission/233292415 - It's also faster to use pypy instead of python3 (there is even a warning when submitting a code)

As for the reason of your code being too slow, i tried to rewrite your sum a couple times and couldn't find anything way faster than what you wrote so it's most probably the insertions in the dictionary that are too slow. I saw that the worst insert case is 0(n), which happen if there are tons of conflict in the hashmap. So maybe the hack that got you to be too slow is designed to create lots of conflicting keys... This last part is a guess but I thought the first part was worth sending this answer.

Can anyone please tell why my O(n) solution got tle on problem D. https://codeforces.com/contest/1899/submission/233294769

https://codeforces.com/blog/entry/62393

Thanks vgtcross, it helps. Never thought a test case would take benefit of internal working of map :).

Yeah, I sure do think that intentionally including the test that will eliminate unordered_map solutions of div3 participants would be great)) Also still have no idea why TL dint't pop out when I ACTUALLY submited.

It must've been the notorious unordered_map collisions resulting in O(N2)

Please some help me. my rank in common stading is 2198 But in friend standing and profile contest page it is 2619 and and my rating change is calculated on 2619 rank

Common standings, when "unofficial participants" is off, doesn't show all rated participants. From the announcement:

Remember, that only trusted Div. 3 participants will be included in official standings. To qualify as trusted participant you need:

Regrdless of these extra restrictions, the rouns is still rated for everyone with < 1600 rating. Your rank among all rated participnts is the 2619, but your rank among trusted participants is 2198.

Thanks bro but i still have a doubt. Participants near 2619 rank have lower solve count than me and participants near 2198 rank same solve count and penalty as mine and still my rank is below to those who have solves less problem than me. Sorry for annoying question and terrible english

The people around 2619 in the

trusted participantstandings also have a lower rank among all rated participants:Your rank among trusted participants (link):

Your rank among all rated participants (link):

Near 2619 located random guy's rank among trusted participants (link):

Same random guy's rank among all rated participants (link):

Thanks bro! If don't mind please give some guidance to me regarding cp

Can anyone please clarify my doubt. In this contest I have solved 1 question and submitted it correctly at the first time..... After that I did not solve or submit any kind of question... But my rating has decreased by 17 .... Can anyone tell me why? I don't want to commit same mistake in next contest

I'd like to ask how to look the solution of the qustion.thanks.

Contest was wonderful!!!

for the problem no E ,according to the editorial the answer should be 1 for the case 4 6 1 2 5. is not it? can anyone help

Well, I received a notice of violation from the Codeforces system. It stating that my solution to the problem 1899D]COINCIDES WITH [USER:ORANGE. - Yarik and Musical Notes's submission. The submissions are very similar because the same formula is used, but the coincidence happened only due to how short the solution to that problem was. Also, the two codes are similar simply because of the similar solutions and the use of standard variable names.(like ans for answer and cnt for current, I guarantee there are a lot of people naming variables the same way), Other than that I don't think either code is cheating. And you can easily see from my past code that all my variable names are based on personal conventions. The solution didn't use any data structures/advanced algorithms so I didn't have to submit my code nearly twenty minutes after he did, so it's not fair for me to be judged as a cheater based solely on the variable names. Please give me a more acceptable explanation. Plz

for solving a question in this contest I used a third-party website (geeks for geeks) for a part of a code now I got a warning telling me that my code matches exactly with another person's

Attention!

Your solution 233122161 for the problem 1899C significantly coincides with solutions sk.dubey/233122161, 21H51A6655_/233126912, ayush_1217/233140420, sudhanshu_2306/233141014, mokamal2003/233141318, quantum_quill/233144312, Dineshsingh10001/233146424, huseyn_quliyev/233146946, fuck_23/233147330, mostakem123/233147919, Ritesh027/233148153, vaibhav0543/233148375, artemfad/233148803, akpalert/233148863, sihare_123/233149177, ayushverma150702/233149667, kanikapunia119/233149712, Anonymous-2002/233149818, Ooppa/233149911,

Shreshth/233150012, zakeer_shaik/233150023, jaikiran1027/233150227, gaurang_07/233150492, MADARA1287/233150624, aashish1110/233150766, krishnaP/233150907, O-G/233150925, saurav_24/233151260, Crypto_Wiz/233151484, ajaykumar2004/233151824, ankitsingh7979092/233151869, saigowthamkumar011/233152117,_/233158715, devil_1627/233159058, nullifier24/233159145, pankaj001/233159970, mamalak08/233160008, akashmaity57/233160166, zddtuus/233160574, BethHarmon/233160824, Harish_74/233161058, Nullpinter/233161472, roytijesha_30/233161900, manoj_kumar__10/233162028, itzkamal22/233162197, Harshitsingh30/233162730, saurabh033/233162777, sameer693/233162943, ja_g_an/233163193, yoshith/233163562, smfaizalam786/233163821, gauravsingh9864/233164082, sauravmh/233164326, imyash_b/233164337, HayatKoujan/233165365, praghavendar/233165583, Aparna165/233165627, SilentSpecterCode/233166087, arifakhtar51/233166627, uncool/233166850, 228r5a6620/233167211, IndianPsycho/233167868, AnialwaysOP/233168083, nithin93/233168736, mynameone/233169012, xcoderdevesh/233169033, Sangeetha_87/233169375, rahul__04/233169658, harsh___mishra/233169692, GoD_GaMerS/233169748, YAGNAPRIYA_2004/233169775, rushikesh_kotkar/233169998, c_dola/233170299, Gaurav_17/233170303, Vaibhav__Prasad/233170399, kiran_2244/233170630, Addictiveboy/233171085, Vaibhavp22/233171185, mnish_0.9369/233171432, Vishwas23/233171627, madhurgupta12/233172083, bvrith_95/233172398, jaythakor/233172632, bdbhatt01/233172642, maharshi1712/233174750, harshitchopra09/233174763, sumanth43028/233174807, yousofkortam/233174877, Terminator2004/233175070, chuvya_24/233175081, gupta05/233175542, A.Hazem_2003/233175598, aadi900/233175898, lakshmi_sowmya/233175992, deepanshu.26.g/233176074, Cpp_Master/233176451, SSingh_248/233176571, isham_026/233176598, Priyank295/233177099, AhmedLaithy/233177384, sanskar.resoluteai/233177489, suraj9192/233177560, HardCoder404/233177647, pravallika1805/233178427, kishanthakor/233178717, vinit__jha/233179019, tesla_11/233179191, komalkbairwa/233179363, NITHINKRISHNA/233179422, Mahin273/233179551, Yuvraj_17/233179572, aakash_811/233179605, ritu_raj_07/233179950, Perhac/233179955, crack__/233180114, falcoln/233180457, sharmahimanshu/233180660, sadhukhansubham588/233180881, mdmahfuzahmed2223/233180900, 21h51a7326/233180993, ankit7890/233180996, gin_spirit/233181047, sidhart25/233181535, AGOLAPUAMULYA/233181573, aryankrsingh4/233181649, vigneshdvs/233181691, Medhavi_Sahgal/233182302, suka_gehu/233182574, tejateju69/233182741, amaanahmad52/233182742, sowmya_04/233183322, mohamed_eltaweel/233183364, gugajcvda/233183394, Aryan_a1996/233183486, uday03meh/233183491, hawdiatarun/233184376, sabbirkhanoni/233184675, manasraj007/233184991, -.........__/233185098, anuragthakurNitrr/233185294, comalonwizme/233185303, verma.shivam2605/233185657, drynor/233185824, giriramireddy/233186059, hexaoctalai/233186216, CMRIT25_21R01A7301/233186650, 777_Raju_Ranjan/233186919, beanomahto/233188428, utkarsh_tyagi437/233188469, sudoaptrana/233188779, anoosh_op/233189369, shivansh2611/233189616, Ahmed_Mahmoud2/233190016, A_mish/233190062, Snehal652/233190096, _Mridul/233190188, rishabh0903/233190516, captive_geek/233190897, subba_reddy13/233191688, kanishks281/233193052, Zakir060/233193086, vishalsaw1092003/233193258, pavanjadhav17/233194069, pyansu07/233194321, blitzzz15/233194411.QuickSilver/233152299, ashisharyan/233152315,_mainshivamjha/233152449, Vivek_117/233152467, MK2001/233152516, Vishnu_Shukla/233152625, i_ayush23/233152627, vishalgoud_777/233152721, pratyushraghuvanshi73/233152789, am_2002/233153165, AdarshPandey_24/233153187, ArsheeyaTabassum/233153292, kalluboiiii/233153350, saideepu5692/233153507, 21b01a0526/233153853, Vedula_Aakanksha/233153939, hiteshkumar8642/233153988, Gismodos86/233154249, vishal22101/233154272, mani_gsn123/233154292, Krishnendu016/233154388, rijuoddusual1999/233154603, Hitzjack28/233154628, yashasrikommu/233154943, Gen_Raiden/233155200,21H51A0557/233155230, priyanshu_kumar/233155254, naruto2022/233155484, ayush_agr0311/233155989, jaiwanth/233156185, FakeCheck/233156461, ashraful_ridoy/233156638, Sadanand26/233157829, Sandeep_Tripathi/233158057, cosmodivine/233158176, aniketI am writing this post in response to the accusation of plagiarism during Codeforces Round #909 (Div 3) for Problem C. I want to express my genuine concern and assure everyone that I did not cheat during this contest.

Firstly, I want to highlight that as an Expert-rated participant, the contest was unrated for me. There was no incentive for me to cheat in a contest that wouldn't contribute to my rating. Moreover, I have consistently participated in Codeforces contests for over 1.5 years, and my commitment to fair play remains the priority.

Regarding the code similarity issue, I understand that there are resemblances between my code and that of others and the number is really huge (I'm shocked too seeing that). However, I want to clarify that I used a portion of the maxSubSum function from GeeksforGeeks. I am unsure whether this is permitted on Codeforces, but I take responsibility for not explicitly mentioning the source.

I urge you to please review my coding style, variable names, and previous submissions. You will find that while I might have used a common algorithm or function, the overall structure and approach are uniquely mine. I also noticed similar solutions from high-rated coders in the contest, which adds weight to my stance.

I want to emphasize that I have learned from my past mistakes during my initial days on Codeforces. I was involved in plagiarism in two contests when I was a Newbie, but I have since rectified my approach and have strictly adhered to honest coding practices. My friends and family know how dedicated I am to problem-solving, I miss family gatherings just to give CF contests. It is my hobby. I

I genuinely fear the possibility of my account getting permanently banned for an unintentional mistake. I fear because I have been working hard to achieve milestones on my account. I feel happy whenever I look at my graph which shows my commitment to CP and fear losing motivation and strength. I can get back to the same rating by creating a new account but this profile shows my struggle and journey.

I urge the Codeforces community and administrators to thoroughly investigate the matter. And I apologize for using third-party code. Please!