Hello Codeforces!
We are thrilled to invite you to participate in Codeforces Round 976 (Div. 2) and Divide By Zero 9.0, hosted as Divide By Zero 9.0 by The Programming Club, Indian Institute of Technology Indore (IIT Indore). The contest will take place on Sep/29/2024 18:35 (Moscow time).
UPD: The contest time has been updated to Sep/29/2024 18:35 (Moscow time), which differs from the previously announced schedule. Please take note of this unusual timing and adjust your plans accordingly.
You will have 2 hours to solve 6 exciting problems.
The round will be rated for participants with a rating below 2100.
Problem Setters:
The problems for this round have been authored by nishkarsh and me.
Acknowledgements:
We would like to extend our heartfelt thanks to:
irkstepanov and KAN for the wonderful coordination and support in preparing the contest.
Golovanov399, wyrqwq, irkstepanov, Error_Yuan, rolandpetrean, magga, mwen, MrDelrus, letsolum, chromate00, and AnanasClassic for their valuable feedback and testing.
Special thanks to MikeMirzayanov for the amazing Codeforces and Polygon platforms.
Score Distribution (Div. 2):
- 500 — 750 — 1250 — 1500 — 2000 — 2750
We hope you enjoy the problem set and have a great time solving!
Good luck to all participants!
Update: The editorial is here
Hope to solve till C in this and get close to specialist
very nice score distribution, looking forward to the contest
As a tester, I forgot when I tested this 💀
Big thanks to the problem setters nishkarsh and P.V.Sekhar
clashes with AtCoder
For most div 2 participant, AGC isnt even rated, so that works out.
Thank you for the notice. Somehow I though the AtCoder round is the usual 2h long. We've moved the round to avoid the clash.
Why did the Contest begin 1 hour early?
fire
Almost lost hope. Will try to be pupil in this one.
wishing luck
Some people like me might say that Codeforces isn’t for you. But don’t lose hope—keep pushing forward and keep grinding.
Auto comment: topic has been updated by P.V.Sekhar (previous revision, new revision, compare).
I thought Divide "By Zero 9.0" is a competition. but, it turn out to be a IIT Indore programming club. Excited to take participant in a contest presented by indian programmers.
Hope to solve till E in this round and get to Master.
E might be easy since it's score is just 2000, we have to aim for AK (or if F is too hard then speed will matter). Good Luck!
UPD : Well you are too close. Solving till E will probably suffice (rather we should talk about rank, so top 200).
UPD 2 : My predictions actually worked, but this is still generally not correct.
Stop confusing score distribution with problem rating. Not sure why this is becoming a common misunderstanding as of recently. The last contest's blog had 3 comments trying to compare div. 2 and div. 1 score distributions as if they are problem ratings.
HaccerKat orz
If you compare div2 contest's E problems, they usually have score >=2500. Last contest, E had score 2000, and you can see how many people solved it.
And I did not referred it to problem difficulty (at least not directly). Meanwhile, it's true that, more the score, more the difficulty (according to the setter).
I would like to bring out this blog for reference. Scores are not supposed to be compared between different contests, but instead only within a contest. I brought up problem rating because that is the metric combined with speed + penalty that strongly determines a contest performance. There is likely some correlation between rating and score, but from what I have seen it is weak enough to make predictions unreliable. This is especially true for div. 1 or combined rounds.
If we can't compare scores from different contests, then I agree with you. Thanks for clearing my misconceptions.
As a participant i wish i will reach Specialist
As a participant i wish i will reach Expert
Seeing score distribution seems the problem set will be easy. Good luck everyone.
Score distribution only says how difficult are the problems relative to each other, not how difficult they are relative to other problems on the platform, so you can't really make a prediction like this.
Why are contests recently
in such strange time?
There is AGC068
well I guess this one's timing balanced out last one's
precisely my thought, haha!
Hope to get a positive delta in this contest!
How many problem exist regarding binary strings?
id say binary strings arent too rare, if youre interested in the topic i can link you some problems with them i solved
give some!
Yes please do give. They are tricky in my opinion.
I'm really excited to move up the ladder this time. Thanks to your efforts for this contest!
hype hype
I really want to participate in this race, but this race time will make me sleep an hour later, and I can't accept it
Maybe you can take a nap from 22:00 to 23:00 (UTC+8)
You are Chinese so I used UTC+8
nishkarsh sir orz
Thanks for being a tester for the round.
hope full solve to get im xd
IIT 's never disappoint.
nishkarsh orz
As a participant I wish to reach pupil!
No t-shits ;_;
ask your mumma(mom) to buy one!!
Damn! kids have gotten so rude these days.
...
rivalq mein to na sehta
likewise
mein seh lehta hu, nadaan hai.
Hope everyone except me reach newbie in the contest!
And I reach Tourist in this contest!
More laughing faces
Why the time of recent rounds are so strange?
as it's clashing with atcoder
Technoblade never dies
Hope to have enjoying participation
mathforces
Indians as always are making the worst possible contest.
maybe you meant to write div 3 in the announcement?
and div1 problem
nice div2
Damn this contest humbled me
baler problem diche
Perhaps E should be swapped with D? I think it’s a little bit classic.
Yeah I was a bit surprised a straightforward DP works (at least passed pretest). Thought it may need some optimizations.
I think it nice math contest, I enjoyed the proving and solving.
shit contest.
indians == mathforces .
Great contest. Is it only me that felt C is is easier than B ?
C, D, E < B for me during contest lol
B took ~25 mins to solve while C, D and E took 20, 10 and 20 respectively.
since i knew that every perfect square is having odd divisors, i could do B easily, but C took me much of time for implementation and trying to figure out all cases
also i have seen the exact B question but only difference is the question had asked to find how many bulbs would be off at end
C is not easy to prove. B is pretty obvious.
I hate this problem set :)
what's the reason of making TL of D 2s?
how to solve F?
jeez louise D was tricky to code
Speedforces :)
I really feel like there really should have been a problem between E (750+ solves) and F (~20 solves).
E just require you to realize one fact which is fairly standard ($$$x \oplus x = 0$$$) and then code knapsack while F seems to require far more thinking.
So if you have a slow start of contest you have practically no ability to recover since D and E are far more code heavy than thinking heavy.
(disclaimer: This might just be salt due to having a serious skill issue on B)
You don't need to know $$$(x \oplus x = 0)$$$ for E to code the knapsack? You just need to know xor of two numbers $$$< 2^i$$$ is $$$< 2^i$$$. Also, E isn't code heavy at all.
Oh yeah, I'm dumb, I complicated the implementation in an attempt to "improve" the complexity.
I am sorry, but I think this was one of the lowest quality div2s in recent times. I'll elaborate:
A: not like standards for div2A are very high, but this is just very lazy.. and probably repeated for 1e9+7-th time
B: this is just knowledge-check (or google skills check) problem, with very classic and repeated setup
C: this is actually on border of being okay, but still nothing new, and there are like 1e9+7 very similar problems with same idea (just restore answer bit-by-bit)
D: this is also somewhat okay, though not very interesting
E: just way too classic, compilation of two well-known ideas: look at the xor bit-by bit, and expanding brackets in f^2 + apply linearity of expected value to consider each summand separately, with nothing else.
F: if problem asked just to find f(n^k, d) i think it would be pretty nice, but easy, like 1800* at most. and transition from this version to prefix-sum is just straight-up application of algorithm which is way too hard for div2 level (prefix sum of multiplicative function). very weird problem.
Is B actually binary search? Had to code a quick program to show me the pattern there.
i did with binary search, but i think it can also be solved like quadratic equation and little bruteforce (though im not sure). core idea is that there are $$$n - \lfloor \sqrt{n} \rfloor$$$ lamps that will be still on
I hopelessly submitted the one to bruteforce on x, given that (a+1)^2 — a^2 = 2a + 1 so in total there are 2a ones inbetween zeroes. Shit.
Basically
all the bulbs which are perfect square, would be switch off in the end
, so basically there aren - sqrt(n)
numbers that would be switched on. So for smallest n you have to perform binary search with the condition thatn - sqrt(n) should be >=k
very bad at casework and implementing but basically if n+sqrt(n)< (the smallest perfect square larger than n) it is n+sqrt(n), otherwise n+sqrt(n)+1
took half an hour to implement
i am bad at this
After reading the problem I knew I had to do binary search but I was missing points resulting in 5 wrong answers
how to solve D? is it related to gcd?
Notice that $$$d_i \le 10$$$.
i mean i did, so there are 10 unique modulos, but i just couldnt figure out how to merge and stuff, and i got really confused
(Assuming you fixed your numbers into range $$$[0, n-1]$$$ instead of $$$[1, n]$$$).
Basically, you can group all triplets with the same $$$(a_i \mod d_i, d_i)$$$ tuple, and start treating all elements in the form of $$$a_i \mod d_i + k \cdot d_i$$$ as a line. Merge that line using prefix sums and a little bit nitpicks.
I feel my solution for problem D is slightly easier to implement: for each $$$d$$$, maintain a union-find for the furthest index we can jump(processed by previous operations), and jump when possible 283622874
Oh yeah, true there. I was a bit overdoing myself with the prefixes.
for each point $$$i$$$ you have to check is there and edge between $$$i$$$ and $$$j$$$ such that
$$$max(1, i - 10) <= j < i$$$
I agree, I felt I knew close to the full solution as soon as I opened each of the problems for A-E.
Fyi E has an even simpler (and more braindead implementation) approach than yours.
Just realize $$$x \oplus x = 0$$$, so the value $$$x$$$ only contributes if it occurs an odd number of times.
Knapsack to find these "odd" probabilities in $$$O(n)$$$.
$$$a_i \leq 1024$$$, so just do Knapsack to find the probability of each $$$f(S)$$$ (worst case $$$~2 \cdot 10^7 ops$$$).
oh true, I overlooked it (the instinct to expand the brackets in the expectation of square is too strong), thanks
For E you can also dp for the probability of each resulting xor value and just calculate directly.
I agree completely, also something to note on E : it is even more classic than you put it as, because you can just code the trivial n * 1024 dp which comfortably passes without optimizations.
I am sad that this is the impression indian rounds leave for people....
How should I solve problem b. What Skills do I need to learn to do it?
binary search
how can we check the number of bits set at some n for that large value of k?
I just wrote a bruteforcer, it is a stupid problem.
it's binary search, notice that only perfect squares are turned off in a range.
Thank you so much. I was over thinking about primes :(
I did also at first, but after noticing each index is affected by the number of its divisors, the solution became straightforward.
Why was dsu giving tle, on test case 7 in D, is there any way to speed up this? and avoid using DSUs?
If you naively used a DSU, you would have to merge at worst O(n) elements for one operation. Since you have m Operations, you can have up to O(n*m) Merges, which is way too slow.
There are a lot of approaches to solve the problem, but the main observation is that $$$d_i \leq 10$$$. Based off that you could store for each element the last element to update and the merges that you would still need with a specific value of d. Thus, you only need to store how long the updates have to go back for each d, which means that for all elements, you have at most 10 merges backwards. For a merge just use the dsu to merge with the other element and update the amount of updates for the prior element if neccessary.
cool, thank you!. Would try to upsolve this question.
To speed up you can use 10 dsu (for each d).283663343
solution for this contest
hell B was such a pain problem man it gave me existential crisis.
https://oeis.org/search?q=2%2C3%2C5%2C6%2C7%2C8%2C10%2C11&language=english&go=Search
To be honest, this is not a big deal since the observation was easy enough to make anyway. And if you didn't make it, you could just write a brute force to print the numbers that don't have an even number of divisors and you would realize instantly that they are the square numbers.
How to solve B ? I tried binary search the n, such that n — sqrt(n) is greater than k, but failed in pretest 8.
I got WA on pretest 8 twice. Then I replaced sqrt by sqrtl and got AC
I think u'll get WA on system tests
should be like this
mid — n>=mid/(mid-n) + (mid%(mid-n)==0?0:1)
Try binary search to find sqrt(n) otherwise after getting n through binary search as you have done manually check by incrementing n when is n-sqrt(n)>=k
$$$sqrt(n)$$$ is not accurate enough for $$$10^{18}$$$, you will pass pretests (and hopefully systests) if you use $$$sqrtl(n)$$$.
The safest approach is to binary search on the value of $$$y = \lfloor \sqrt{x} \rfloor$$$ as $$$y \cdot y \leq x$$$. I was too lazy to do that in contest, lets see if the risk pays off :).
Submission: 283590674
i passes pretests with sqrt, am i cooked?
and here i am applying binary search 6 times and got WA every single time ;( https://codeforces.net/contest/2020/submission/283599697
There's no need for binary search, the solution is either k + floor(sqrt(k)) or one more.
Submission: 283593249
Same idea, but i did use a loop until the sqrt(k + sqrt(k)) becomes equal to the last sqrt(k).
283634666
bruh this can't be C solution, I kept thinking for 30 minutes because I thought it can't be that easy. and this B solution wasn't proven for me, but looked correct.. for the output it would be a combination of 0+2+0+4+0+6+0+8 right? I tried to divide (n+1) by 2 and then it would be the closest result for the rule of (x*(x+1))/2 but got WA on pretest 3
never cook again
Just Another Math/Speed forces
Help problem A TLE on pretest 1 although runs instantaneously locally: 283575473
Thanks got it. Although it should still pass pretest 1 right ? Or am I wrong in thinking pretest 1 == samples ? Got so baffled by tle that didn't even think anything else.
Possibly you missed the case when
k==1
, and directly outputn
, as there might be issues with division with 0 which would giveTLE/Runtime Error
. Also its kind of like writingn in the base k, and finding the set bits of it
Thanks.
WTF was this E
Told you not to trust Varga
my B one line solution
can anyone discuss B and C approach.
for C, iterate over bits and check if its possible to make the difference of the 2 bits of the first expression equal to the second expression. there are a few cases, and theyre pretty simple to figure out. for B, binary search, and also try to find out for a certain range how many bulbs will be turned on
I just tried c^d and b^d otherwise solution doesn't exist. It was a throw but passed the prestests
can someone help me in figuring out why this ac's? I stress tested and added the line
else if(inB && inC) a |= (1ll << j);
andif(ans != -1 && ((ans | b) - (ans & c) != d)) ans = -1;
and someone got aclink
Should have just headed straight to oeis when seeing problem B. Just a find-a-formula problem which only involves keep guessing it until it is right...
Well for what it's worth, I did solve it without guesswork. Bulb $$$x$$$ is on if it's flipped even number of times. Every factor of $$$x$$$ flips it. So "good" bulbs are those with even number of factors.
Represent $$$x$$$ as its prime factorization, $$$p_1^{n_1}\cdot p_2^{n_2} \cdots p_m^{n_m}$$$. Number of factors of $$$x$$$ is $$$(n_1 + 1) \cdot (n_2 + 1) \cdots (n_m + 1)$$$ (we have $$$n_i + 1$$$ choices for which power of $$$p_i$$$ to include in each factor)
It's easier to find bad bulbs — they have odd number of factors, so $$$n_i + 1$$$ must be odd $$$\forall i \in [1, m]$$$. So $$$n_i$$$ must be even $$$\forall i \in [1, m]$$$. Which is a roundabout way of defining a square number. So bulbs with square indices are bad.
I agree that it's guessable, but also liked arriving at the solution, which probably will cost me some rating. Anyway, I'm sure someone with better maths can solve it much faster.
Generate more samples either by hand or with brute force program and find pattern, that's how I did this problem and that's how I solve most of problems that are not obvious.
Yeah this is exactly what I did too and I am quite sure if I did input it in oeis, it would be a much faster solve (Extra important in a contest situation)
I tried to solve E first and got Time limit Exceeded by using O(N * 1024). After that, I optimize a lot and when the contest finished, I read other's solution, I see that they just add ios_base::sync_with_stdio(false) :(
no, that won't fix probably. Changing language/compiler might fix .
3 contests se downfall ho raha hai :(
Am I mistaken or do the authors actually allow a $$$O(N \times 1024)$$$ solution for problem E?
I hope all O(N x 1024) solutions will be eliminated :( :(
Probably possible if this is some back-in-the-day platform with 250ms TL... I meant, yep.
https://codeforces.net/contest/2020/submission/283606082 :(
$$$2 * 10^8$$$ operations for 4 seconds is fine lol
well I mean if it was then this problem would be quite disappointing
Same lmao. Like I just scrapped 30 minutes of buggy coding to write a completely new idiotic knapsack and it worked.
This problem could have been somewhat interesting if $$$a_i \le 2^{60}-1$$$.
Considering that it is trivial to cut this approach, I'm guessing that is true.
Man, these problems are just so bad.
only if in C had something to do with carry also ;(
an initial impression made me think of the case (0,1,1) and (1,0,0) (bits of b,c,d resp.) had something to do with carrying a bit over, had this covered in code and when stress tested it found that this is not the case T_T
it is too hard,harder than all div 2 I have participate in. perhaps I am not qualified to these div2s
nope, it was just maths knowledge test contest
then get better at math? it's still problem solving :P
yeah you are right :|
Poor contest, people had WA's in C before the announcement was made.
the limit of a<=2^61 wasn't specified earlier, i think, the wa's before announcement should be compensated.
eg.- a python user might not face the problem of overflow, for which the constraint was made.
why doesn't this work for B : https://codeforces.net/contest/2020/submission/283599697
came with the idea for C but cant implement it properly any hints??
each bit is independent in this equation
a=b^d
what's the proof?
1) We can solve for each bit independently. 2) Let's analyze all possible cases for some fixed bit position i: 1. If b's i-th bit is equal to d's i-th bit, we may not set a's i-th bit, it will not make our answer worse. 2. If b's i-th bit is 1 and d's i-th bit is 0, (a&c)'s i-th bit must be set, therefore a's i-th bit must also be set. 3. If b's i-th bit is 0 and d's i-th bit is 1, we have to set a's i-th bit to set (a|b)'s i-th bit. By using this analysis, we can claim that if there exists some a, for which (a|b)-(a&c) = d holds, then a = b^d will also be an answer.
Mathforces is crazy
Literally the worst B i have ever seen
I thought this was a nice contest with very nicely written problems. Thanks!
So do i, man. It really encourages me to learn more about number theory.
For C I've just checked if c^d could be the answer. But it's hard for me to prove it.
my worst contest i am pretty bad at maths
Did I the only one to solve C by using Digit Dp ?
I solved E using digit dp 😔 we should think more before start programming.
And this is exactly why i skip indian and chinese rounds. Questions are so unoriginal invloving mostly math and pattern recognition.
I knew that solving n-sqrt(n)=k for n will give me the right answer. I solved it too using basic quadratic math + flooring at the end, and it was actually giving me the correct answer but I don't know why it is failing the pretests. Can someone please tell me why????
maybe u missed the ones when ur answer was a perfect square, the code i made gave me answers like 36, but the real answer was 35 since 35 is smaller and the problem asked the smallest answer.
So basically I should've just checked till what range ans-i is possible. CP can be so cruel!!
very strong samples lol
Lol, B was binary search? I solved it without binary search: 283591395
Unlike other more complicated solutions, my approach to the C problem is simple:
I had the same approach :3
profile pic checks out for your comment
how did u thought of that? like replacing d to a
So simple!! Could you please explain the approach in more detail
what's the proof?
Multitest on F. Just why?
For problem B: Safe way to calculate sqrtl(num) ?
binary search
Did it without binary search: 283591395
nice solution bro
you can just use regular sqrt(num), and got through sqrt(num)-5 to sqrt(num)+5 to find the correct floor of sqrt(num) by finding the biggest x with x*x <= num and (x+1)*(x+1) > num.
(I think you can start from sqrt(num)-1 without any problems)
Check https://codeforces.net/blog/entry/107717
I hate the fact that B solution is just about old Ted-Ed riddle: https://www.youtube.com/watch?v=c18GjbnZXMw
i think e is easier than c :(
isn't that expected value problem ? any good source for expected value problem or learning way too ?
Errichto's blogs and videos.
Sums and Expected Value series
will try vai.. but my main problem is, after so many try, I'm still noob in DP. still trying tho :(
I'm not sure there's a trick. What I do is read the tutorial and try to solve it after the contest if there's any problem that I thought could be solved but actually wasn't.
I don't know why my div2A solution wrong 283639751? Can you guys give me some anti testcase please?
Check out my solution.
thank you! its help me a lot
i have no idea what the hell happened but I couldn't even solve problem A in this contest even after knowing the logic within literally 30 seconds of reading the problem, it's the most simple form of a greedy problem. i think i should have just moved on to B instead of trying to fix problem A the whole 2 hours, it was dumb on my part :(
I saw it as writing n in base k. If k = 1, answer is just n.
this solution looks absolutely wild, great work. i also realized the k=1 edge case after i kept getting memory overflow errors
The fact that I realised about even and odd factors of a number have impact on turning on a bulb but still couldn't realise about perfect squares hurts me more.
I asked ChatGPT: "What natural numbers have odd number of factors?" And It answered perfect squares and then problem is solved :)
I didn't participate in this contest but if I had, would that consider cheating?
I mean many people go to some kind of websites to find patterns. So it's ok. But I only search for syntax and func in cpp documentation or implementation of some ds.
need div 3 or div 4 to recover from the damage this contest has done to me
All the authors / testers have too much IQ, so missed what the average caveman would do for problem E.
For C question instead of doing for 62 bits seperately u can do this
int x=b^c,y=c^d;
int a=x|y;
if(a|b — a&c ==d) cout<<a<<'\n'; else cout<<-1<<'\n';
Love this contest, got WA because I used sqrt() instead of sqrtl() in B, and WA in C because I shifted (1 << i) instead of (1LL << i).
Thanks
Problem E
My Submission on compiler c++17 TLE but on c++23 1468 ms and I am add this problem to mashup the my solution took time 6749ms on c++17
TLE 283653307 AC 283661649 Please adjust the time limits for this problem and rejudge it
whats wrong with my code ? 283581784 I think there's a precision error in the log division . I'm not sure, though. and also is there a way to solve it using log or we have option to use only while loop to compute ?
DSrinath MikeMirzayanov
I found this account suspicious regarding the use of AI or cheating. The codes submitted are significantly larger, and there is a noticeable difference in variable naming and coding style compared to previous submissions.
In today’s contest:
We can see he used
a.begin()
,a.end()
, whereas in previous submissions he usedall()
. He usedvector<int>
this time, whereas he previously usedvi
. Additionally, he opted forfor(...)
instead offr()
as he had done before.P.V.Sekhar i would like to draw your attention towards an issue with the Problem B: [problem:https://codeforces.net/contest/2020/problem/B], i found a user with an accepted solution: [submission:https://codeforces.net/contest/2020/submission/283584670], and when i am trying to submit this solution again, i am getting wa on 8th test!! WOW! now codeforces is based on luck??
Please look into this. My submission link: [submission:https://codeforces.net/contest/2020/submission/283668692]
Check the language version bro,
sqrt()
has issues with accuracy.crazy thingss!
You can use
sqrtl()
for better accuracy.can you tell that why this fails? 283727496 but this gets accepted: 283728904
Same code different results (╥﹏╥)
C++17: 283654614
C++20: 283666208
P.V.Sekhar nishkarsh
Yes bro, same happened to me…
For problem B I have submitted the same code twice. -One in C++17 (GCC 7-32) (submission link: https://codeforces.net/contest/2020/submission/283669977) -Another in C++20 (GCC 13-64) (submission link: https://codeforces.net/contest/2020/submission/283669075). For te first one I got accepted but got wrong ans for the second one. why??
Because in 20 C++ sqrt returns double. And at 17 — long double This type is bigger. To do this, 20 C++ has sqrtl
My submission for problem B failed in Java on test case 8, idk what went wrong! It matches the approach in the editorial.
Precision issue of sqrt function.
I've got a technical issue.
Is it normal if a submission (https://codeforces.net/contest/2020/submission/283590461) still has the status "Preliminary tests passed", even if the system testing is completed?
for question d why is disjoint set giving tle for me
D is an easier version of the problem from Polish OI: https://szkopul.edu.pl/problemset/problem/oNnWY6ZuzzhvG-jCmijiXkIk/site/?key=statement
I think E is too easy for Div2.
There is only one simple DP algorithm for this problem.
What's the meaning of using Min_25 sieve instead of euler sieve? Does this mean that the usage of technology is the most important thing for a good problem? I can't understand why this problem appears on a CodeForces Round.
I'm gonna leave a bit of feedback here.
Overall it felt like the problemset requires too little observation and most of the part was about knowing a few well-known mathematical facts (except for problem D). The reason why many people felt that it's too math-heavy is because the problems were very friendly to math people who studied very little about problems in computer science, but has great knowledge in the math theory itself. Apparently, it is likely that you'll see these problems in math classes:
The statements were short and clear, but it was because that these problems can indeed be expressed as just one-line math equation. I'd love to see problems that require a bit more interesting observations next time.
https://codeforces.net/contest/2020/submission/283654441
Can someone please help why this is failing?
ans += 1ll<<k;
thanks :)
SHITY CONTEST
I don't know how can I use min25 to pass F, because of T<=10000.
I can construct a test that T=10000, n=100000 at all, in this case my solution can't pass because 10000*100000^0.75 is too large and my constant is a little big.
You can see my submission here 283699912.
I don't think T<=10000 is an appropriate constraint.
i hate this E. thought it would never run O(2e8) in 4 seconds.
In B question ,first I was submitting on C++ 20 compiler it was giving wrong answer on test case 8. Which after contest same code I submitted on C++ 17 compiler it worked. Anyone please explain.Also yesterday got -47 due to this issue
I just got TLE on prob E 9 times, today I resubmit my first code and got AC??
Is the Frequency of Contests on this site very low? I don't see any scheduled contests.
Well...it looks like we're continuing to go down
i'm so bad:((
Why did blog get so many downvotes? First time I'm seeing a contest blog with these many downvotes tbh. In fact first time seeing a contest blog with downvotes in general
probably since the contest wasn't very high quality. The only good problem was D
I think there is no special in D(though it is tagged bruteforce)
The problem C was easier if done by simple bitwise operations. I tried this.
ll ans=b^d; if(((ans|b)-(ans&c))==d) cout<<ans; else cout<<-1;
I think that this was much easier than the solution in the editorial. :P
I liked your intention of using "Number Theory" concepts in problems(esp. in F). But, as I have seen, the problems with the blend of concepts in mathematics and critical logical solving are in previous Codeforces Div. 2 (which I participated in).
I support you to continue setting some interesting problems in the future despite the downvotes count.
Fun Fact: I have a -70 delta in this contest, though I got the idea for B in 2-3 min. and C in 15-20 min. which was affected due to my inefficient coding at that time. I love Number Theory ;)
Also, I notified that there are similarities in my solution for this contest and also if there was any unintentional exposure of my code (perhaps through public IDEs or similar platforms), it was not deliberate, and I apologize for any misunderstanding. The code idea and algorithm is so clear, this make some solutions make a similarity there are more than 30k participants in this contest and this for sure will lead to similarity and similarity of thinking in creating the algorithm. In the last, take the suitable action and what you see will be correct do it, but don't block my account for little unawareness.
Thank you
Hi P.V.Sekhar , nishkarsh, I received below message from Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 Attention!
Your solution 283631407 for the problem 2020D significantly coincides with solutions shrey_gta/283612481, Isaac_Netero/283631407. 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 do not know shrey_gta, and i did not share my solution to anyone I used the following document for the DSU function. https://takeuforward.org/data-structure/disjoint-set-union-by-rank-union-by-size-path-compression-g-46/
if u can look into this matter, it will be helpful. thank u
Can anyone help me debug my solution to D problem? (WA at test 2)
I have merged APs with common terms and differences and then used classic DSU.
how
You do indeed have the same way of thinking, since you're the same person.
During contests you submit as many times as it takes for you to get solve a problem from bkdn24.__hide...
...and then conveniently submit the same code (with some useless variable name changes that makes you feel smart and undetectable) from bkdn24.ntth
In case you are too dumb to realise, this is cheating. Stop crying and do better.
orz
In 2020B - Brightness Begins,
What is special about test case 854258779689358055?
There are 854258779689358055 numbers before854258780613619263 which are not perfect square. Then why this is not the answer?
https://ideone.com/wEfOYM
There are 854258779689358056 numbers rather than 854258779689358055 before 854258780613619263 that are not perfect squares (as the number itself should also be included).
why is this disliked alot?