Hello! Codeforces Round 913 (Div. 3) will start at Dec/05/2023 17:45 (Moscow time). You will be offered 6-8 problems with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating of 1600 or higher, can register for the round unofficially.
The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks.
You will be given 6-8 problems and 2 hours and 15 minutes to solve them.
Note that the penalty for the wrong submission in this round is 10 minutes.
Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted 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, then the round will be rated for you.
Problems have been created and written by pashka, MikeMirzayanov and me.
Part of the problems in this round were in the Cyprus Programming Challenge. If you participated in it, please refrain from participating in this round.
We would like to thank:
- peltorator, FairyWinx for red testing.
- Vladithur, Valters07 for yellow testing.
- stefanbalaz2, FBI, SlavicG, flamestorm, SashaT9, mesanu, trainerherp, Ush1su for purple testing.
- dan_dolmatov, Yousef.Osama for blue testing.
- Sergey140146659, Pa_sha, gas for cyan testing.
Good luck!
UPD: Editorial
hoping to return back the blue handle
As you wish
a ni pro
I hope to be the statements short.. i think this better
Yea I hate long statements usually problem setters try to make the problem in to a story and just extend it by 2 paragraphs which is annoying
Tomorrow is my birthday, and I hope to perform well in the contest. Wishing success for everyone.
Happy birthday, brother. I hope this round is memorable in your life.
Happy birthday!!!
Happy Birthday!!
Happy Birthday! The first time I became blue was on my Birthday — 23rd Sept. I hope You have an amazing contest today.
Happy Birthday!!!
Happy Birthday
Happy Birthday!
happy birthday :) Ramtin510
hope problems are interesting .....
First time testing :D Good luck to all!!
It's been a while since the last contest written by pashka, glad to see him.
Inshaallah, In this round I will be Green.
Inshaallah
My first unofficial Div.3 contest! Hope it will be fun and good luck to everyone!
I hope statements are short and legible :D
I don't know why I'm not included, but it's my first time testing :D
Fixed, sorry for waiting!
No problem, thanks!
ممكن تفتح الرسائل ؟؟
اتفتحت
As a tester, I enjoyed the problems, and I hope that you will enjoy them too
Nice !!!
As a tester, I can say that problems are very interesting
I might end up in top 100 in this contest.
I was wondering, why is that on some rounds (mostly educationals) the number of the problems isn't announced? Surely, authors know the number at least a day before the contest begins, and it's pretty inconvinient for the participants to not know that number (myself and I'm sure many others like to make files for the problems before the contest)
Will the round be delayed if this queue continue ?
Why is the round delayed by 10 mins?
i guess because of too much traffic the site was not loading
Hope to become expert.
Me too, Good luck to us ;)
Dreams come true
Hoping to get nearby ratings
Again! one refresh cost me ten minutes
please don't refresh any more
Mybad
if you open author list of this contest using dark reader, you end up with a color scheme of russian flag
What are you doing during the few minutes of the contest delay,it is so suffering
panicking nothing else
what does it mean — to be an any color tester?
Nice
why do i get HTTP Status 403 — Forbidden error after refreshing the page during a contest ? How do i get rid of it ?
cool problem G!
How to solve it ?
Let's construct the graph corresponding to. If we have a vertex of degree exactly $$$1$$$, then we either exactly take the edge coming from it, or exactly do not take this edge. We can do this one by one. Then we can prove that the remaining graph is a union of non-intersecting simple cycles. The solution for each of them is approximately the same. Let the cycle $$$v_1 v_2 ... v_k$$$. We have two cases: whether we take the edge $$$v_1 v_2$$$ or not. Each of the two cases is solved in the same way as the first part (if we take it, for example, then all other operations that are necessary are recovered uniquely).
Damn, what a nice explanation. Thanks!
hardest div3c I've ever seen.
regular greedy approach simply not hold.
I'm losing hope in cp
yeah i stuck at this problem for entire contest :(
any idea for this problem?
what if a majority of the characters is equal to the same character? what if not?
how did you come to this idea?
randomly trying stuff.
If I'm being honest, I found C harder than G...
If I had to improve on such problems, which topics should I practice?
There aren't really any "topics" to practise. Instead, you should just solve a lot of div2B-level problems which often revolve around this sort of idea.
look at his colour ;)
I tried a solution of keep sorting the count array (Of 26 characters) and if I still can find the smallest and biggest count (Both are distinct and > 0), I will decrement them each by 1 unit
After that I just add all the remaining counts
It got accepted, I felt so dumb because I didn't try it during the contest lol
My thought process of G: build graph i-ai. pressing a switch is flipping endpoints of an edge. each op is xor which is associative so order doesn't matter and no switch will be flipped twice so op is delete an edge and flip its endpoints.start with leafs. corresponding edges are fixed. we are left with a bunch of loops. now what ?? even no of 1s should be present in a loop. 2 possible ways of pairing find the min one.
Why does my solution for problem D not work? Any help is appreciated.
If you're sure that your binsearch is correct, then probably you haven't looked through all cases on how 2 slices can be related to each other(I found 6 separate cases)
don't the 6 cases degenerate into:
l = max(l — k, l2) and r = min(r + k, r2)
where [r, l] are the current valid range and [r2, l2] are the one we're checking to see if this k is valid.
Idk, I looked through 6 cases just to be sure. It doesn't take much time tho. But you're kinda right
I assume that means you passed? In which case congrats, mine didn't :^(. Clearly some edge case I'm not thinking of, shouldn't have been lazy. Please share your submission, if so.
You can see it, they're open now
1 10 0 17 7 9 8 14 14 19 5 8 2 14 11 14 2 16 2 2 7 9
Doesn't work on your code
How to do problem e?
Solution for n is the product of no of solutions for each digit of n. (So you only need to solve from 0 to 9)
Why is that? Could you explain please?
Since the sum of number and sum of digits is same. Let's say you change sum of digits on ith place by 1 then change in sum of numbers is 10^i. If you compensate this change in sum of digits at other place j then change would be -10^j. Net sum would be 0 iff i = j
For a general change in sum of digits you can view changes as numbers in base 10.
if sum of three didgits of the same rank >= 10, then the sum of digits of a, b, c > sum of digits of n, since n can contain only 8 digits
what is meant by rank here ?
1, 10, 100, 1000...
There is a bijection between the partitions of each digit of n into a sum of 3 numbers and the solution to the given problem. For Example n=26, the corresponding partitions are [[{0,1,1},{2,0,0}(and their permutations)],[{1,5,0},{2,3,1},{6,0,0},{2,4,0},{1,4,1},{2,2,2}(and their permutations)]]. Combining say {0,1,1} and {1,4,1} corresponds to a=01,b=14,c=11 and the tuple (01,14,11) for the solution.
Basically, the intuition is that we need a+b+c=n to hold in each decimal position as well for the digital sum property to hold. As a consequence, there must be no "carry-overs" while performing the addition a+b+c
Is G something like topo sort? My idea was to use topo sort until the remaining switches are in cycles, then see if every cycle has an even number of on switches. If so, then we are good.
Yes
f: https://atcoder.jp/contests/arc132/tasks/arc132_b
how did u find this, like how do u find the same problem in general?
it just happened that I had seen this before
This ARC B is much easier than current one because all numbers are distinct and also it is guaranteed that operation exist.
well, you are right
C ruined the experience
235953756 Can't find the bug for code in C :(
what's idea of this solution
The idea is basically from finding 2-majority element of a array without hashing,
I am basically first storing the count of each charater occurance in hash array.
After that, we lets define a process to reach minimum length which will be :-
(We will take the current majority character x in string and we will remove any pair x adjacent to non-x in string.)
if there is 2-majority element in array(if a element occured >= n/2 times), It will remain 2-majority after any no. of processes.
else if there is not any 2- mojority element in array. After some no. or processes, if string length is odd than a element can reach maximum count of n + 1/2 elements and will remain 2-majority after that. if string length is even than a element can reach maximum count of n + 1/2 elements and will remain 2-majority after that.
So, execute the process we defined on string and you will reach the answer after some analysis.(the solution I mentioned may seem tough to understand but it is simple when you will understand)
I think it's because of vector of char instead of vector of int
The above comment is true — it's because of the vector.
Char is in range of [-128, 127] I believe, and the string can be up to 2e5, so if any character appears more than 127 times, char will overflow.
Thanks a lot! its a blunder
Hints for problem E? Thanks.
try to observe a pattern in the given test cases. There is simple formula hidden
Solved F 20 minutes after the contest ended.
At first I thought G is 2-SAT. LOL
me to just for a second.
Me too!!
I couldn't solve $$$C$$$ , have I really gotten that dumb!!!
Relax, I've solved the EFGA problems :)
don't worry, I took at least 15min to mind-solve it and even then it was just trying random approaches until I found one that worked (then I proved it, of course). And I'm a master...
Hey, Can you just prove your solution for C
First assume that n is even. Then I claim that the answer is 0 if no character occurs more than n/2 times, and maxcnt-(n-maxcnt) = 2 * maxcnt — n otherwise where maxcnt is maximum number of occurrences of any character.
In the second case, we can see that the last remaining character is necessarily the one that occurs the most times, since it's impossible to remove all of them. (you can remove at most one per operation, and at most n/2 operations are performed so there's no way to remove all of them. The number of operations performed is bounded by the number of characters not equal to this most common character, which is n-maxcnt implying that at most 2*n-2*maxcnt characters can be removed. So the length is at least n-(2*n-2*maxcnt)=2*maxcnt — n. I claim that this can be achieved. Method: always try to remove exactly one non-most-common character per operation. This can always be done by choosing an occurrence of the most common character and one non-most-common character — it will always exist until all characters are made equal, at which point the length is 2*maxcnt-n.
We can show the first case by induction.
When n is odd, the reasoning is similar, but since the parity of the length is constant, replace "0" by "1" in the above.
For the case when n is odd, it is not true that removing a most frequent character with any other character will result in a string with no characters occuring more than (n-2)/2 times. Example: s="aaabccc". In fact, the end case 1 is in itself a counterexample. Fortunately, this only happens when the string has only 3 unique characters with first and second most frequent characters having the same frequency and third character having frequency of 1. This means that the final remaining string will also be of length 1. Moreover, the end case 1 suggests that this special case always occurs during removal of pairs under this algorithm.
You can always remove a pair which contains the most frequent letter, as long as all the letters are not the same...
It's my first time to complete 4. Can I turn green?
nope ig , you are having delta +105
I'm confused,what “delt+105”?
Delta is a word used in physics to describe small changes. In CP it is used to describe rating changes. Delta +105 therefore means your rating increased by 105
I see.But how he can predict my delta so accurately? I thought this was calculated randomly based on rankings.
codeforces uses a rating system similiar to the chess elo system. Meaning they have a formula to calculate rating changes deterministically.
can you check my delta?
use This extension
Error is large in this extension
F implementation was tricky
it would have been interesting if e would have been not for triplets but n-plets (basically for n numbers rather than 3 numbers).
I could not think of E yet, still trying lol
did any one else solve problem F using Hashing ?
my solution
can u pls explain ur solution, I am new to using hashing for strings in cp
I suggest you read This blog, it will give you details about hash functions.
Here am using hashing to simulate the process of shifting in O(1) instead of O(n) , I achieve this by changing the current hash value in each iteration from :
currhash = ( a[0]*A^n + a[1]*A^n-1 + a[2]*A^n-2 +..... a[n]*A )%p
To :
currhash = ( a[n]*A^n + a[0]*A^n-1 + a[1]*A^n-2 +..... a[n-1]*A )%p
i.e currhash = (currhash // A — a[n]) + a[n]*pow(A,n,p) )%p
you can easily see how thats done in my code (using modular inverse and modular exponentiation) . The rest is just checking if the currhash matches the sorted (in ascending or descending order) array hash value.
Nice idea!
thank you!
Can someone please explain problem D, how BS is working there?
[x,y] means interval from (inclusive) x to (inclusive) y.
We have to jump into these intervals: [0,0] -> [1,5] -> [3,4] -> [5,6] -> [8,10] -> [0,1]
We can check if this works if we fix k=3:
[0,0] -> [-3,3] //we can jump anywhere here
[-3,3] & [1,5] = [1,3] //this is the overlap. We can be anywhere here
[1,3] -> [-2,6] //we can jump anywhere here
[-2,6] & [3,4] = [3,4] //we can be anywhere here
[3,4] -> [0,7] //we can jump anywhere here
[-0,7] & [8,10] = [ERROR] //we have no overlap and nowhere to jump. K=3 does not work!
Code:
Thanks a lot for your explanation, bro! I knew this problem was BS but for a value k = mid, I couldn't figure out how we can win the game with k = mid or not.
Thanks brother, it helped me to find how to use mid,
Updating current to possible range is where i got confused, urs is Very good logic
Either brain's not braining or found the problem D much harder that usual don't know why...
How to solve G?
Construct the graph $$$i \rightarrow A[i]$$$, this type of graph is well known (Functional Graph). An important property is that it consist of several cycles and nodes that following the directed edges reach some cycle. So obviously if there is a 1 on a leaf you have to change it and switch the next node. In the end you will only have cycles left, some nodes will have 0 others 1. If the number of 1's in a cycle is odd, then it's impossible. Otherwise let $$$A_1, A_2, \ldots , A_{2k}$$$ the nodes that have 1, then you have two ways to convert them to 0. Grouping $$$(A_1, A_2), (A_3, A_4), \ldots , (A_{2k-1}, A_{2k})$$$ or $$$(A_2, A_3), (A_4, A_5), \ldots, (A_{2k}, A_1)$$$. Choose the one that minimize the changes.
Another way of doing it is by considering an undirected graph with edges $$$i \leftrightarrow a_{i}$$$. Now solve for each connected component individually. Notice that each connected component is a tree with one extra edge because there are $$$m$$$ nodes and $$$m$$$ edges, where $$$m$$$ is the size of the component. Try both using the extra edge or ignoring it. Now the problem becomes turning off all the lights in the tree, which we can just do using dfs.
Submission
Almost did it during the round, but didn't spot the trees and tried to find shortest paths to connect 1's instead
Could you explain the code a little more in detail please ?
We iterate over all the nodes. If $$$vis_{i}$$$ is true, we already processed the component containing node $$$i$$$. The first dfs call flips all the necessary nodes from the bottom of the tree upwards, and also finds the extra edge. Before the second call, we use the extra edge, flipping the two lights associated with it, then run dfs again to see if using the extra edge requires less flips.
C>D>B>E>A
anyone finding Div3.D harder than usual ?
I found it on easier side than usual, no dynamic programming problem was there also generally there's a question of tree data structure which wasn't.
Question E is the simplest
Explain please how I am confused.
When adding to the digits of these three numbers, it is impossible to generate carry operations. Knowing this, writing code only takes 5 minutes
How did the combinatorics part work?
If a low position generates a carry operations. So the missing digits sum need to be filled in at the high position, but increasing the digit at the high position will increase the sum of these three digits, making it impossible for the sum of the three numbers equal to be N
I think that the solution of problem B has been widely shared by cheaters. Here are some examples :
235939705 235936558 235937575 235905766
Nice contest! Problems very really good. Thanks a lot for the round Vladosiya pashka MikeMirzayanov and all testers.
This is a genuine plea for help, I have no idea how to approach problems like 1907C - Removal of Unattractive Pairs. The first thing my mind tries is a greedy approach, doesn't help, maybe check for DP, still no use. How do you develop the intuition to solve these type of problems, or even more fundamentally, how do we even approach these types of problems, when nothing else matters except a few observations that perhaps never strike you during the contest?
I just saw that if we want to remove the letter with the highest count then pairing it with 2nd highest letter will be beneficial.... that's why I use set to maintain the order of letters on the basis of their count ... I pick the last and second last and delete them and the update them and reinsert it and this will cost log(n) and do this till the size of the set is greater then 1. we will do this for n/2 element so, TC will be nlogn. 235912384 there is math solution also but I come up with this one during contest
Your solution always gives the correct answer, but the reasoning is incorrect: it's not always possible to remove two characters with largest and second largest frequency (remember that you need to remove two adjacent characters):
$$$\mathrm{acbdaeb}$$$
The most frequent characters are $$$\mathrm{a}$$$ and $$$\mathrm{b}$$$, but you can't remove both with one operation. This turns out to not matter: it's enough to remove the most frequent character with any other character unless the frequency of the second largest character is $$$\left\lfloor\mathrm{len}/2\right\rfloor$$$, in which case we definitely can remove the most frequent and second most frequent characters at once.
upd: there are actually some other cases I missed but the main idea is still there.
As adjacency of elements doesn't matter, to remove the element with the maximum count, we need the same amount of other elements, so the answer is the difference between the count of the maximum occurring character and the count of other elements. If the difference is less than or equal to 0, then we give the output as 0 in the case of an even-length string or 1 in the case of an odd-length string; otherwise, the answer is the mentioned difference.
I have noticed that you can transform the string in a compression of it, example: "aaabbc" is converted to 3 2 1,then the new problem is given an array you can rest 1 to an adjacent pair of numbers any number of times and if a number become 0 remove it and refill the space and this new problem look easier for me to solve.
I thought of this too but then consider the test case:
vvcvvv
. You will compress this to2,1,3
. However, the2
and3
cannot reduce each other since they are both instances ofv
. This is where I faced issue with my greedy approach. I do not know how to account for the fact that after some operations, 2 numbers in the array will become adjacent but they carry the same letter so they cannot reduce each other.of course the first observation to do is if a character appear more n/2 then you can delete all the others chars with an instace of it an the remaining ones will be the answer
You just have to count the letters. Like a frequency list of size 26. Cuz the order of the letters doesn't matter. vvcvvv -> 0 0 1 ... 5 ...
You're correct, but can you explain why that is true? On first glance it seems like it would matter as we're removing adjacent characters.
Is it even obvious after many glances? One would be tempted to say so since nearly 5000 people solved the problem but it just doesn't seem like the kind of fact that would jump at you, even if you stared hard enough.
It most definitely isn't obvious to me; even I guessed that it just works during the contest. I believe I would be able to prove it now, but it seems quite annoying.
Me guessing the solution was the combination of "I had seen similar problems before with similar solutions, this feels correct" and "this is D3C, the solution is probably very simple". Even though guessing isn't generally considered a proper way of solving problems, with strong enough intuition it might be more optimal than proving solutions in modern CF contests.
Is this a sign that the current problem style is bad? I'm not sure, but this should probably be discussed more.
think of it this way, you can always pair one highest frequency letter with another letter, unless only one type of letter remains(the highest frequency letter will have to border another letter). So the order doesnt matter
But if we consider the test case presented earlier by vgtcross:
acbdaeb
, we see that the two highest frequency charactersa
andb
turn out to not be adjacent to each other at all. So reducing both their frequencies by 1 is sort of a false move, since a and b can't reduce each other. Sure, you can always reduce the frequency of the highest letter, but it doesn't always end up being reduced with the second-highest frequency letter (which ironically turns out to be the correct greedy solution in the end).no, i meant pair (any) of the highest frequency letters at that moment with any other letter adjacent to it. you can always do this until you're left with nothing, or a string with a unique character(so you're not necessarily reducing it with the one with second highest frequency)
I think focusing on the highest frequency letter is more confusing than not : - you can always pair any letter with another letter except if this letter is the only letter.
Using this fact, the "order doesn't matter" property come in an easier way.
Then then question is, when do we have letters that are left and the highest frequency letter come in.
yeah that's it
This is not true, you need to pick the highest frequency letter, otherwise from aaabc you can end up at aaa, which is a wrong answer.
That is not what my message above is saying.
What it is saying is that you can basically always pick which letter you want and choose to delete it except if its the only letter. It does not say that your choice will be in the optimal answer.
So when you find that the letter that you want is indeed the highest frequency letter, you don't have think about IF at any moment, you will not be able to delete it. With the observation above, you know that you will ALWAYS BE ABLE TO.
That is also not true. Basically you are saying that in
abaca
, I will be able to pairb
andc
, delete them and end up withaaa
, but that is not the case.No, I'm saying that you can pick 'a', 'b', or 'c' and choose to delete it. It will be deleted with an other unknown letter but it is guaranteed that you will always be able to delete the one letter you choose.
А possible logical chain:
1) In final string you can't make any operation, since it's the shortest possible achievable string.
2) => In final string $$$s_1 = s_2, s_2 = s_3, \ldots, s_{k-1} = s_k$$$. I.e all symbols are equal in final string.
3) Quite intuitive thing to do is try to bruteforce that "final symbol".
4) Then you can see than until there is at least two different letters and at least one "final symbol", than there is an adjacent pair of symbols, one of which is "final symbol" and one of which is not. It's like a simple application of that classic obvious lemma: if there is a binary string with at least one "0" and at least one "1", than there is an substring "01" or substring "10".
From now it's more or less obvious what's next to do (I believe)
Steps 1, 2, 3 seems very logical to me. Maybe step 4 can be seen like an "observation", but this "lemma" about "binary string with at least one "0" and at least one "1", than there is an substring "01" or substring "10"" is way too classical, and it is an easily recognizable pattern after you seen this some number of times. So it all comes down to "solve more problems to be able to quickly recognize such patterns", who could have guessed
FWIW, I'd like to point out that the DP approach for C does work, although it's not efficient (time complexity $$$O(n^3))$$$. But solving it using DP in $$$O(n^3)$$$ is still a good learning exercise, as you might find transitions difficult if you are accustomed to thinking about DP problems in a certain manner, owing to the fact that the neighbors are joined together after deletion of inner elements. I suggest people comfortable with DP to try this out.
For example, you might define $$$dp[i][j]$$$ as the minimum number of characters remaining at the end when we are only dealing with $$$str[i...j]$$$. Then, you might try collapsing the first pair, say starting at index $$$x$$$. However, there's no way to proceed now because $$$dp[i][x - 1]$$$ and $$$dp[x + 1][j]$$$ cannot be combined.
Instead of performing the first collapse, focus on what happens to the first element. Apply some choices to it.
Notice that we were able to write the transitions easily just by changing our perspective.
Submission
I wanted help with problem C please, it is failing in test case 2
maybe, show the code could help make the problem more clear?
Well, I read your submission just now. As I'm not a native English speaker, if I say something confusing, please tell me. I thought you use recursion to delete characters until nothing can be deleted. Firstly, even if you writed the code well and didn't get a WA, this code could be made TLE because it's O(n^2). So it's not a correct solution for this problem. Secondly, your strategy of deleting is wrong. Let's think about such a string: "bbaebbaecccccccc". It's length is 16 and the answer is 0. However, your code will give the answer 6, which is wrong. because once it find a pair of different adjacent characters after same characters, it deletes them. For examples, it delete 3rd and 4th characters which are 'a' and 'e'. But it's possible that we don't delete them right now but later. Actually, to reach the answer zero,we delete the middle two chracters each time. So one correct way to solve the problem is to delete the characters which is the most numerous in the string right now with a character different with and adjacent to it. Obviously, when we can't do this, we can print the answer. You can use priority_queue (heap) to do this in O(nlogn). A better way is not to simulate the deletion process, just count the number of each letters and then print the answer, which is O(n). Here is my code: https://mirror.codeforces.com/contest/1907/submission/235898166
What's more, it's usually not a good idea to use vector(bool) due to some historical reasons. Try to use bitset instead.
Was this round rated? Why is it showing unrated?
It's not time yet. Normally, it would rate.
Why does my solution give TLE for problem B
https://mirror.codeforces.com/contest/1907/submission/235957135
The statement ans = ans + str[i] takes O(n) time where n is the length of ans so actually your solution works in O(n^2). You have to change it to ans.push_back(str[i[) and it will work fine
ans=str[i]+ans; this operating is costly as every time you add new char at the beginning of the string it takes O(size of string) time. instead of doing this you can insert the char at end of the string and after all the operation just reverse the string 236009502
Who understands the pain of not being able to load in 20 minutes at the beginning of the competition? I've never been stuck for so long before.
pls explain problem E. Thank you
How I solved it, although I'm not sure if I explain it well enough.
Notice that the digits are 'separate' — You can't create/compensate higher weight digit with lower weight digits — Your digsum will always overflow, since a single digit can have a value of 9 at most, and to have the next weight/power digit you need AT LEAST 10 in the sum of the current digits, always making it to overflow...
...Therefore you can assume that the 3 numbers you have are like this: abcdefg, where each letter represents some digit. You can decompose the target sum's digits into the sum of 3 digits POSITION-based. For example, if you have 38, you can decompose 3 and 8 separately, and then use combinatorics to calculate their combined answer — you can distribute the decomposition of 3 over every possible decomposition of 8 and you will always obtain a new answer. This works because the 10^1 doesn't change the digit of 10^0 position. In general, 10^n doesn't change any other digit 10^m, assuming n!=m. I precalculated every possible decomposition of the digit target sum using 3 digits, and then multiplied each digits' possible decompositions on each other.
I hope this makes sense, lol.
why didn't the submission 235883526 solution not work for 1907B - YetnotherrokenKeoard (problem B)? was it because of memory copy?
ans = str[i] + ans
This works in O(|ans|) which overall is O(n^2)
why it is so late to publish ratings nowadays?
After 10 contests, I'm finally green!
good job
wow
Good evening, Everyone (including system).MikeMirzayanov I have just recieved a notification regarding my submission number https://mirror.codeforces.com/contest/1907/problem/D for my solution coinciding with others. You can clearly see the name of functions been created to be obvious for the answer and also you can see the trademark of my solution to be genuine on the top. You can verify all of this from any of my submissions from the past few months. You can also go through my style of using the variables and functions from any of my previous submissions. It can be a coincidence as the functions and variables I use are very common among competitive coders but I am sure about my solution being genuine and completely self thought. Thank You
Mukul457 Some of my previous submissions-: https://mirror.codeforces.com/contest/1688/submission/217835352 (8 Aug 2023) https://mirror.codeforces.com/contest/1207/submission/220195657 (24 Aug 2023) https://mirror.codeforces.com/contest/1714/submission/226328908 (2 Oct 2023) https://mirror.codeforces.com/contest/31/submission/228841576 (19 Oct 2023) https://mirror.codeforces.com/contest/1869/submission/222855817 (11 Sep 2023)
NIce contest
.
I also think so
Why in this contest. I had rank 3xxx and got rating 500, but my friend had rank like 11k and got 620 rating ?
Because your initial scores are different
May someone please see my latest solution of question B and tell me why is it giving TLE on 3rd testcase even though it's complexity is of order O(N). People even have O(NlogN) solution then why its giving TLE in mine.