Hello Codeforces!
I am pleased to invite you all to participate in Codeforces Round 970 (Div. 3), which will start on Sep/01/2024 17:35 (Moscow time).
The format of the event will be like any Div. 3 rounds:
6-8 tasks;
ICPC rules with a penalty of 10 minutes for an incorrect submission;
12-hour phase of open hacks after the end of the round (hacks do not give additional points)
after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
by default, only "trusted" participants are shown in the results table.
I encourage participants with a rating of 1600+ not to create new accounts but to participate unofficially.
Only trusted participants of the third division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:
- take part in at least five 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 (or you are a newcomer/unrated), then the round will be rated for you.
Also, it will be the first round with unrated register. If you already registered as rated participant you can change registration type here.
I would like to thank
MikeMirzayanov for creating Codeforces and Polygon and testing the round.
Vladosiya for beautiful coordination and helping in preparation.
FBI, SashaT9 and Esestree for not only testing but also discussion of the problems.
gmusya, Axial-Tilted, chen_zexing, Mr.Pie, XYZ_Herry, gvancak, Layk, CLown1331 and aboodsalman04 for testing and useful feedback.
Good luck!
UPD:
Editorial has been published.
Good luck to everyone! How were you able to set a round as a specialist though?
One round ago I was pupil)
coaches don't play
Bcoz now a Specialist was once a Candidate master and probably future master
as a tester give me contribution
As a tester, wish me luck! ..... (●'◡'●)
good luck (●'◡'●)
As a tester, I cried because how beautiful the problems are
Pa_sha [user:Vladosiya][user:MikeMirzayanov] Why are people with a popular history of cheating like him are allowed to test? He will leak the problems even before the contest is conducted!
bros a self-proclaimed tester
you came because they cried ?
I literally have 0 skipped contests, I DON’T KNOW what are you talking about
He is not a tester. I don't know why he wrote that he is. All testers are in the blog
You can ascend to the heavens immediately.
my friend told me once that kids started using codeforces , I didn't believe him at first , but now I do
Unrated registration! Too bad I can't test that when I'm usually a rated participant! (since I'm >=1600)
it will soon be in div1/2 too
Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600 (or you are a newcomer/unrated) and register as rated participant, then the round will be rated for you.
yep, i want it, because i haven't participated in 5 rating contests
qp
Will not be able to give this contest :( as I have to travel to college tomorrow at same time.
will unrated participants know what their rating changes supposed to be?
my first unrated div3 :O
I have a question — youre only a specialist but you are able to make a content. I have heard that you have to be a master to be able to do that. Can someone explain?
You have to be master or a writer in the past, as blog with rules say
As a tester, the problems were great! GL everyone
The comment below literally has +18. STOP TESTERISM!
as a tester I hope that yall have fun in this contest!
experts who registered as specialists wya
darn they put me out of competition
I once again hope I can AK this round ^_^. Good luck to you all as well!
Interesting fact, this round is rated for the author. As a tester, I encourage him to participate and get $$$\infty$$$ delta.
Will we have more unrated registered rounds?
Yes, mike said
we will apply this innovation for ICPC-like rounds (Div. 4 Rounds, Div. 3 Rounds, Educational Rounds). After we have tested the feature in ICPC-like rounds, we will start using it in other types of rounds as well.
You can checkout the blog here
Return expert?
Going to attempt my first contest any suggestions.
Learn from my mistakes.Think before you write your code
I'm back
First time participating unofficially, hope the problems will be good, and good luck to other contestants! ^^
Good luck everyone !!! I will be gray forever huhu
Oh god give me power to solve atleast 2 + questions this time :) I love you all who ever reading it
Good luck and have fun! I am goona up to pupil
i hope i dont drop to newbiew
I am very much excited for today's contest, but as usual, more than 2000 cheaters are also ready
1120 Oh boy you are getting a new color CG in advance.
MikeMirzayanov attention plz there are lots of cheaters
I am hoping for a positive delta and changing the color of my username
and I did it
This Div3G is like div4D lol
I am not Ahmed57
ahh it seems i got it, but i just couldnt implement it. good job
Don't just change the problem statement mid contest,who tested this?
Are points reduced for compilation error also on submission. I forgot to select the correct language before uploading in 2 questions. :(
no reduction in points in error/wrong in 1st testcase
Problem F really made me angry thought about it over and over again with no conclusion, the third testcase did not make sense and I just can't think straight anymore from the anger I had of this failure. is the modulo increasing the result somehow? I just don't remember modulo could do something like this, am i missing something about probability? wish I started with other problem I would have had the chance probably. I got the same result for testcase 1 and 2 from the solution, but the third one made me want to throw my laptop
relatable
It is not increasing it, the answer for the third testcase is a fraction so it is the $$$numerator \cdot modular inverse(denominator) (mod 10^{9} + 7)$$$.
$$$\big(a\cdot b^{-1}\big)\bmod p = \big(a\cdot b^{p-2}\big)\bmod p$$$ for prime $$$p$$$.
You can check this blog about modular arifmetic. Particulary, about modular division, which is pretty common.
exactly same happened with me in the last 1 hour, wish I had solved D instead of trying F for so long.
Good balanced contest, thank you authors!
Problem F be like:
C++: Wrong Answer on test 4
Python: Accepted
So true. I don't know what is the issue with my c++ code, I handled all the overflows and yet it keeps giving me WA Test 4
Not all. You had overflow
Got it. Totally missed that. sum may overflow when N = 2e5, and a[i] = 1e9 for every a[i] then a[i] * sum would overflow.
Hard to observe mistake to be honest.
when n = 2e5, n * (n — 1) / 2 overflows
Have you tried $$$\texttt{long long}$$$?
FOR REAL I had submitted two C solutions which got
Wrong Answer
at test 5. At that point just gave up and used my beloved Python.is my solution for E hackeable?
I just hacked it
Can someone simplify on what needs to be done in
Problem F
Sakurako's Box
please.answer = $$$\sum_{i = 1}^{n} \sum_{j = i + 1}^{n} \frac{2 \cdot a_i \cdot a_j}{n \cdot (n - 1)}$$$
modulo $$$10^9 + 7$$$ of course.
Thank you for the reply. Isn't the denominator
(n*(n-1))/2
?Yes it is, sorry, I edited it.
There are $$$\frac{n(n - 1)}{2}$$$ possible pairs. Since we want to obtain the expected value, we know that we want to multiply the product of each pair by its probability. Clearly, each pair $$$(a_i, a_j)\, /\, i < j$$$ has the same probability of occurring. This means that the probability of each pair is $$$p = \frac{1}{\frac{n(n - 1)}{2}}$$$. Now then, we can see that the final result will have the form $$$pa_1a_2 + pa_1a_3 + ...$$$. So, we can extract the $$$p$$$s and obtain $$$p(a_1a_2 + a_1a_3 + ...)$$$. Here, we know what $$$Q = p^{-1}$$$. At this stage, you must choose a method to calculate $$$Q^{-1} \mod 10^9 + 7$$$. This can be achieved by any number of methods using the modular multiplicative inverse. The value obtained from this we will multiply with the calculated value of the numerator $$$P$$$ to obtain the final result.
On the other hand, we must find a way to efficiently calculate $$$a_1a_2 + a_1a_3 + ...$$$. This can be done by simply calculating $$$s = \sum_{j = 1}^{i - 1}$$$ and adding $$$sa_i$$$ to the numerator for each $$$2 \leq i \leq n$$$.
Hope this helps.
PS: Please do be careful with the modulos.
Thank you for taking the time to respond in detail.
Both (.-__-. and fisher199) your comments were helpful, and I have solved that problem. Thank you.
I added hints for H. Sakurako's Test on cfstep.com
Just participated — but am not "Trusted member of 3rd Div", i also noticed non of the the usual scoring points on the right hand side of the screen? I solved a few questions but will I get a delta?
You are not a trusted member of Div-3 yet because you've only participated in one contest so far.
The scoring thing isn't there because this contest use different rules/contest type.
As long as you register as rated participant and attempt to solve at least one problem you will get a delta.
Thanks!
why none of testers tried to check if F is solvable by chat-GPT ?
Why are you using Chat-GPT during the contest? What is even the point of solving a problem with GPT?
first of all, its the author's fault to not check if it's solvable by gpt or not, i can imagine that at least half of the submissions were made by the help of chat GPT (6k is a lot for a typical Div3 F)
F was set way too high IMO. It was easier than both D and E.
imagine using ChatGPT. using it should be banned because it can sometimes solve template problems regardless of their difficulty.
couldn't implement G although exactly know what I'm going to do
compute gcd of all element, cnt x % g, find first element not appear,
this can be done by binary search right? 😭
for n>1, you can set the array to 0, gcd, 2*gcd, 3*gcd, ..., (n-1)*gcd. I believe this will be enough for you to be able to solve it now.
Not quite. Compute gcd, let it be G. Then you can always make the array to be of the form
0, G, 2G, 3G ... (n - 1)G
. Then finding the kth MEX is O(N).Damn, I had no idea how to solve G. How did you notice the GCD?
read how to find GCD using euclidean algorithm
Actually fun fact. This is very similar to the most recent Div 2C, which has a quite similar use of the GCD concept. I immediately thought of using GCD because of how recent that problem was.
In fact, G was made before it, so I didn't take it's idea. But yeah, it is somehow similar.
Funnily enough I solved it in contest.
I got the idea almost at once thanks to this problem.
find smallest positive integer x out of set of integer
allow to add and subtract each other unlimited times. gcd naturally comes into mind.
how to handle the base case in problem D i spent 2 hours trying to fix the dp solution with a vis array which i was 90 sure is not going to work
I solved it with DSU
F was easier than D/E lol.
Yea but I dont know how to inverse modulo if not im spec by now
You can use fermat's little theorm.
$$$a^{p-1} \equiv 1 \pmod p \implies a \cdot a^{p-2} \equiv 1 \pmod p.$$$
So the inverse of $$$a$$$ is $$$a^{p-2}.$$$
Extended Euclidean Algorithm also works.
what is the idea for E when n%2 !=0 ?
Iterate over each letter to remove and maintain a count of each character at even and odd positions. Notice that the removal of a character will flip the parities of indices in front of it.
How to make sure that correct letter is being removed?
You don't have to, just try each one.
How this greedy solution could be corrected? I am messing up in in the case when n is odd.
yeah i did notice that, but couldn't proceed further. Is the algo for n = odd something like :
brute force. for removal of each charactor: calculate the number of operations, and choose the minimum of all such answers?
yep that is it
I just iterated from 1 to n and checked if i delete the current element in string , how many operations would i need to do in order to obtain alternating string and stored minimum of all those operations . For doing it in time limit , I stored the count of occurence of alphabets at odd and even positions at each index.
You can check this out , there may be better approaches but this came to me
https://codeforces.net/contest/2008/submission/279203992
You should think if there is a way to calculate de answer for even lengths in $$$O(1)$$$ or $$$O(\log n)$$$, so, you could try to delete all characters and calculate the answer for each resulting string.
The answer for even lengths could be calculated in $$$O(26)$$$ with prefix sum over the frequencies of the characters.
To calculate the number of operations required for an arbitrary string s, you need to find the maximum count of a character at odd indices and another count for even indices, then subtract both from the size of the string, because that's how many characters you need to change. Also, notice how removing a character at some index i flips the parity of all characters in front. Moreover, if you remove a character at index i and flip the parity of a character at index i+1, then that character will have the same parity for the removals of characters at indices < i. Knowing this, going down from i=n while i>=0 you only need to update the counts related to the characters at index i and i+1, where s[i] is the removed character
We will try removing ith character for all $$$ i $$$ such that $$$ 1 <= i <= n $$$. with some precomputation, at each $$$ i $$$ we can calculate the most frequent character at even positions and odd positions in $$$ pref_{0\cdot\cdot\cdot i-1} $$$. You can do the same for $$$suff_{i+1 \cdot\cdot\cdot n} $$$. During the precomputation you can also store the characters which occur the most in prefixes and suffixes respectively. Then it is easy to observe that whatever balanced string we'll have will contain either of the 4 characters we just stored (most frequent even from prefix, most frequent odd from suffix) and (most frequent odd from prefix, most frequent even from suffix). (After writing some cases you can observe that after the removal $$$ith$$$ character, the parities of suffix flip). and that's it. you can check my submission
I couldn't get AC during the contest but I just had to add
ans = 1e8
. feeling super sad rn :(Was G somewhere related to gcd of whole array if yes then why my solution is giving wrong
if no please help me in solving it
upd: got it just it just an extra equal to symbol
I haven't used the platform in a while, how can I know if it's unrated? In my case, I would like to know if this contest was rated. I checked the contest link and it shows this:
You registered for the contest as: pabloTabilo: contestant
When you register you have an option below either to choose rated or unrated. By default it is rated until and unless you chose unrated.
Could someone please identify what is overflowing in my F solutions?
Probably this line:
explain why people use prefix sum to solve H please :(
That's a very standard trick. It even appeared in a recent CF Problem : Med-imize.
I added more details here
I precalculated the answer for each x by binary search. Since $$$a_i \leq n$$$, each x splits the numbers int $$$\frac{n}{x}$$$ patterns of $$$0, 1, 2, ..., x - 1, x$$$, I used prefix sums to avoid iterating over that.
My submission: 279218027
Time complexity: $$$O(n log^2{n})$$$
wonderful set of problems! i managed to do my first two problems :)
congrats! Long way to go!
thank you pal <3
This is my best CF round — I am top 2000!!!
I wasted 30 extra minutes on E and had no time for F :(
Will you release an Editorial/Tutorial?
Yes. We will try to do it as soon as possible
Thanks, appreciate it
neal Congrats for actual Rank 1!
Funny how even the top 10 in ranklist people cannot code G correctly.... authors, testers do better. Wrong models really shouldnt be happening.
Here is my solution link, written in Simplified Chinese.
The solution of G before constrain modification is included.
I made the same error as std in G :D
Am I the only one stucking at implement of E?
I tried for like 20 mins and then went to F, and glad I did, F was easier than even D.
I believe my first solution for H is hackable. I imagine O(n^2) in the worst case, but it's hard to analyze the complexity.
If someone is interested in hacking, take it)
Basically instead of doing a binary search I'm trying to calculate current result as +1/-1 from the prev result (in the loop). So if we have tests where the result sequence is 0->n->0... then my solution is quadratic.
https://codeforces.net/contest/2008/submission/279227245
The problemset needs to be rearranged, C<B F<D&E!!
Once you read problem properly then B was more straightforward than C (i overkilled B then saw the statement again after contest), no comment on F.
B was alot of work but c was easier to approach and to implement. (it's just from my POV).
See this solution to B, it was this easy.
THX!I thought Just counting would give me WA, based on the statement so I just brute forced!
The hard part about problem C is proving the simplest solution runs without the risk of TLE. Which I think not many people did.
this could be as easy as a div4, anyway good contest
From my deepest point in my heart i hate cheaters
you're a cheater, bro, rating matters more bro, no one cares about your self righteeousness get answer from chat gpt or telegram oa group to get good rating, and placement
What are you saying
why are you saying you hate cheaters?
Who does?
Should've started doing G earlier instead of wasting my time in E I was just one line away from solving it :(
Still happy with my performance though, Div 3 is so fun! I wasn't just stuck at 3 solves like in Div 2, knowing everything else is impossible for me.
https://codeforces.net/contest/2008/submission/279214387
Does it help to not get banned? =)))
Someone help me. I don't understand codeforces at all. I don't understand divisions, ratings, trusted players, unrated contestant....I read some cf articles.
First time participated in this Div 3 contest, solved like 3 problems(A,B,C). Why still it shows unrated player?
Uncheck the "show unofficial" checkbox and you'll get a normal standing.
Thanks.
Lol, after seeing your B solution i now realized how bad i am at reading the problem, and with the fact that it was written in bold that the string is made from a beautiful matrix.
Anyways, level of contest: Div1(for people rated > 2100) > Div2 > Div3 > Div4
You will get your rating once final evaluation is done, for Div3, Div4, Educational round(level between Div2 and Div3) there are 12 hrs hacking phase after the contest(search about what is hacking in CF)
If you have registered rated then you will get rating tomorrow.
please explain how you got this answer to test 3 from example in F. Why 8 isnt the answer?
I also don't know how he got, so I stuck into it until the ending of the contest.
I found someone wrote down in his/her solution
What is it????
i mean there's a whole paragraph telling you to take the answer modulo M. basically when you divide two numbers, you will multiply by the denominator's mod inverse. which is equal to X^(MOD-2)
The sum (numerator) is $$$85$$$ while the denominator is $$$10$$$.
$$$85/10$$$ is $$$8.5$$$, not $$$8$$$
here you are required to print the answer to the mod of $$$10^9 + 7$$$ Since you can't use mod on a float value, you need to use mod inverse.
note that $$$ (a / b) \% m \neq (a \% m) / (b \% m)$$$
instead
$$$(a / b) \% m = (a \% m) * (b^{-1}) \% m$$$, here $$$b^{-1}$$$ denotes the mod inverse of $$$b$$$.
To calculate the mod inverse of a number $$$b$$$ for the mod of $$$m$$$ you can use this formula:
$$$(b ^ {m - 2}) \% m$$$
This can be calculated efficiently in $$$O(log(m))$$$ using binary exponentiation
This only works if the mod is prime
I know that pE is only prefix sum with odd/even index. But, I don't know how to write it efficiently. My sol is fucking LONG and still having some bugs.
Do I get a penalty for wrong submission on the problem which was not finally accepted
No
Though I wasn't cloudflared during the contest, I still spent more time loading pages than solving problem in ABCD. Perhaps I need to open all problem pages next time.
Is this solution to B fine? https://codeforces.net/contest/2008/submission/279237030
Lol I missed this condition during contest — R = C = sqrt(n)
Consider a 4*16 rectangle. 1074688
Thanks
can u also verify my B submission 279084385
Your submission seems correct
thank you , this was my 1st contest with 4 successful submissions but i still feel like i underperformed
Why this gives mle for D
change
string s
tostring& s
indfs
functionF
In problem B, since the string is always made from a perfect binary matrix, is it sufficient to check if the count of ones equals to 4 * (r — 1)?
Yes, I did the same thing but for count of 0s
This submission is failing on some test case. Problem G
https://codeforces.net/contest/2008/submission/279239206
Can anyone tell me why this is happening.
For this case:
You can operate on the array like this
$$$[6,10,15]\to[6,10,5]\to[1,10,5]\to\dots\to[1,0,2]$$$
Fixed it, Thanks
is D was so easy? My dfs function a bit hard
D was not so easy, but at the the same time, it should not have taken me a whole half hour to solve.
And if you are wondering how so many people submitted D, the solution for D was -
1) -> Easily solvable by chatgpt. The problem setters did not check to see if chatgpt was able to solve the prob or not.
2) -> Leaked within the first 10 minutes of the contest(I think) because, I have know a noob guy from my college, who does not have any clue about even basic BFS and DFS, but submitted the B,C and D within 13 minutes!!
So yeah, that should answer your question.
yup, I saw some cheaters!!
it could be done using dsu. you dont need to write complete dsu, just its template, and how it works
TL for G is actually insane, how is this TLE? 279241104
It has an integer overflow, because
r
is initialized with unnecessarily large number.Suppose $$$k=10^9$$$ and you have some distinct elements, then the answer is obviously larger than $$$10^9$$$. in this case, when
mid
is 1E9,good(mid)
will returntrue
, and thereforel
becomes 1E9. Becauser
is still 2E9,(l + r)
overflows.See the fixed version: 279244131.
ah, just realize overflow issue causes loop forever thanks.
Got fucked up in first problem, tried twice and solved in third attempt!!
quite normal at the beginning
How can I delete a comment?
hope Cheaters will be identified....
performed very bad :( should have taken mod of q also
279181406
Can some one please highlight the error in this solution?
I used this formula (Numer/Denom) where,
Numer = sum of (A[i]*(sum(A)-A[i])); for i=1 to n;
Denom = n*(n-1);
n * (n-1) can overflow before it's modded
That's not the case since I use #int long long
Anyways I got my silly error:
In my code, Correct:
int val = (A[i]*((cSum[n]-A[i]+MOD)%MOD)+MOD)%MOD;
Wrong:
int val = (A[i]*(cSum[n]-A[i])+MOD)%MOD;
Can anyone please tell me why this solution gives tle and this one does not?
In the first one (for the reason I can't understand), instead of counting the numbers in the range [a,b],I pushed all those number in a vector and printed the size of that vector.
vector push_back needs to resize the whole vector occasionally, but it all adds up into the time taken to run the whole program
Thanks man but can you explain it in a bit detail if it's okay for you!
Sure, you can check the Complexity of push_back in this link
It says
Constant (amortized time, reallocation may happen). If a reallocation happens, the reallocation is itself up to linear in the entire size.
So that's exactly what happen. You can avoid that reallocation by using the .reserve() function to allocate upfront, or the best thing to do in this case is just not using a vector at all.
Got it! Thanks a ton
Prefixforces
any one has idea how to solve E with dp I don't get how it's tagged as dp
misleading tag? Some people consider prefix/suffix sums to be dp
i got TLE on problem H three times before i realised that a test case can query the same integer multiple times
and i didn't memo that .-.
when the rate of contest will appear in my profile
Here is some feedback from me. The issue on G was unfortunate, but it can't be helped. However, even without that, I think some problems were also a bit too typical and some things could have been improved.
squared
wasn't very clear initially without the last sentence.Same thoughts on A. Like if you want to force the greedy just put 1e9 in the constraints, and also Idk why some codes pass and others are hacked while implementing the same complete search solutions.
Hello can you hack my H which ig has tc of O(n(logn)^3)
279221504
Hi. Thanks for the feedback. I appreciate it and I will consider it in the next contests. Here is what I can say about some of this:
A: There is a rule for Div3 that constrains in the first task should be small. I think it is made for solution like $$$2^{a+b}$$$ to pass, for the programmers who only start competetive programming.
D,F: I think you are right, but here is reasons I put it in the contest. There is not a lot of tasks, where expected value or dividing permutation on cycle are in a some simple way, so when I first saw task expected value it was to hard for me even with tutorial. So, I wanted some more easier tasks to be here on at least some topics. I understand that there is a lot of sites, books where you can learn this, but when I was only starting CP I didn't know any of that.
H: To be honest, I thought about it, but here is reasons I didn't want to do these version:
This is why there is queries.
One more time thanks for your feedback. I don't have anything to say about B and C, because probably you are right.
I can see your reasons behind the other things, but I still don't get about A. If that was your intention, then the constraints should have been even lower, because many $$$2^{a+b}$$$ did NOT actually pass and got hacked or FST. It could've been also done by guaranteeing distinct test cases, but even that was not the case.
So the only reason I can think why it's so small is just because it's a 4A problem, and I've seen this quite a few times on other Div. 4/3 A problems. It really feels like these constraints are not decided based on actual solutions that it wants / doesn't want to pass, and rather just want to be 'somewhat small'. I understand why the coordinators want to include every possible case in one test, but I honestly don't see why the number of test cases cannot be something like $$$1000$$$ in these problems with larger constraints. The only thing it would do is to take just tens of milliseconds more for any viable solution that is not exponential. If they actually intended to allow any viable exponential solution, then the constraint should be like only 1 digit. For now they're neither of these cases.
Why is rating not updated yet ?
Yes, it's not updated for me too
I have registered as rated in this content but still my rating has not changed in it.
The results are still not published
yea, the testing isnt finished i think
yep, me too
Can anyone tell me why this code get WA in B?
1.n must be a square number, like 4,9,16,... 2-(1) n=4 will be yes. 2-(2) n>4, if s contain '0' will be yes, otherwise no.
Any bug in this logic?
I fix it, thanks.
Have the ratings been updated? I don't see any changes, and the 3 problems I submitted and got accepted are for some reason showing "in queue" today.
I submitted solutions for 6 out of 8 problems, and now it shows that only the 1st is accepted, and the rest are in red or in the queue.
That's because System Testing is currently going on. Wait for it to get over and you're attempts will be back to normal.
oh okay Thank You
at first I was so amazed by the fact that its you first contest and you submitted 6/8 problems kinda cool. then I wanted to look your submission and when I saw you submissions of problem A, you took two inputs in array (alright great for beginner) but then your submissions got drastically changed with maturity of variable selection and formatting. I was having mixed thoughts in my mind until I looked at E's Submission and I got reminded of a random comment. Well you know I know what I am talking about but CF is all about fun, please enjoy!
When do we get our rating score at Codeforces Round Div 3?
just started and already cheating yeah GL
Hello sir nice copying skills
when will the system testing end ;(
Moderators I would like to report this guy almighty_xd with submission of E 279219069 . Vladosiya Pa_sha
why does the rating not update ?
Its the same for me I checked it has been updated for some users but its showing unrated for me and for you too i dont really know why?? maybe someone can help us understand the codeforces rating system
yep, i saw a few "trusted participants" people, but its the same for them
Why is my rating not changing?
Why the rating changes are so low? can someone explain if they know?
Why did I not get a delta this time?
So lucky to have E passed in 1999 ms. 279208099
Can someone please tell me whats the problem with my solution for Problem F?
https://codeforces.net/contest/2008/submission/279375562
Added a
+ mod
in your code. Now, it passes. 279398988Thanks :)
For problem B I can't understand how just count of 1s equal to perimeter condition is passing all tests 279233678. For s = 111111110 the above approach should say it is a beautiful matrix but the representation doesn't look like that.
1 1 1
1 1 1
1 1 0
Lol yeah, that solution doesn't look correct. Very interesting that it passed.
Guessed dufficulty
A — 800
B — 1000
C — 900
D — 1300
E — 1700
F — 1600
G — 2000
H — 2200
F is 1300 at most, you only need modulo inversion to do that
fair ig, but has lower solve rate than D so.
nice contest
Attention!
Your solution 279153639 for the problem 2008D significantly coincides with solutions AbhiramaSonny/279132413, Harsha_12354/279153639, Rahul_Jahannathan/279158842. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.net/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.
I recieved this mail and i don't know who AbhiramaSonny and Rahul_Jahannathan i written my solution by own and this is my explanation to my code:
Reading Input:
The number of test cases (t) is read. An empty list (results) is prepared to store the results for each test case, which will be printed later in a single operation for efficiency. Processing Each Test Case:
For each test case, the size of the permutation (n), the permutation array (p), and the color string (s) are read. Two arrays are initialized: visited to track which nodes have been processed. F to store the number of black nodes reachable from each node. Cycle Detection and Processing:
For each unvisited node i (i.e., nodes that haven't been processed), a DFS-like approach is used to explore all reachable nodes, which forms a cycle in the directed graph. Starting from node i, the program follows the permutation, marking nodes as visited and collecting all nodes in the current cycle. Counting Black Nodes:
Once a cycle is detected, the number of black nodes in the cycle is counted by checking the corresponding entries in the string s. Each '0' indicates a black node. Assigning Black Counts:
After counting black nodes in the cycle, the result (black count) is assigned to all nodes in the cycle, since every node in the cycle can reach the same set of nodes. Storing Results:
The result for the current test case is converted to a string and added to the results list. Final Output:
After processing all test cases, the results are printed at once to optimize performance.
Dear Codeforces Team,
I would like to address the recent notice regarding solution 279192712 for problem 2008D, which has been flagged for significant similarity with another solution. I want to clarify that this was not intentional and I have never shared my code publicly or with anyone else during or after the competition.If the similarity arose from using a common method or a standard approach to solving the problem, I can assure you that I strictly followed the rules and did not engage in any form of collaboration or code leakage. If there has been any inadvertent leakage, I am willing to cooperate fully and provide any information needed.Please let me know if there's any further action I should take to clarify the situation. I am committed to maintaining fair competition and integrity on the platform.
Thank you for your understanding.
Sincerely, vamsi648603
I deeply regret the oversight that occurred when I was writing code on Ideone and unintentionally left it in public mode. I sincerely apologize to Codeforces for this mistake. But I assure you that I have learned from it and will be more diligent in the future. I am truly sorry for any inconvenience this may have caused and understand the importance of adhering to the platform's guidelines. Please accept my heartfelt apologies, and I promise to be more cautious to prevent such issues from happening again. Thank you for your understanding. I apologisies for this and don't decrese my rating. I am very sorry.
I know that submitting code to code forces from two accounts in the contest is breaking the rules. I have two accounts at codeforces. I mistakenly submitted this round from two accounts. For this reason, was asked by codeforces to post why the same code is on two accounts. I am sorry for my mistake. It will not be like this before. I will be careful. My concern is whether my accounts will be blocked or not. please consider me this time. I will be happy if you don't block my accounts.
I am truly sorry for submitting the same code to two accounts. I know that using two accounts is breaking the rules. while submitting the code to one account, I mistakenly submitted it to another account. I apologize for my mistake. Please consider me this time. It will not be like this next time. I will be careful. Please don't block my accounts
Where are you?