It just went worst, Once I was able to solve 3 problems regularly in Div2 and was going close towards 4th one and now I am unable to do even 2nd one. Don't know what is going on
this was the first contest in which i had solved my first div 2 second problem , second was quite challenging beacause after 4 wrong submission i got the ac
It is with Great Honour to inform you that TLE Eliminators Is teaching much better than other TH-camrs Who Explain the answers after CodeForces Contests. Thank You So Much Sir.
Thank you so much for this amazing video! Could you help me with something unrelated: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How should I go about transferring them to Binance?
So basically we must know that 111111 is divisible by 7. This is something we must know. When we know this we can say that if n! >= 6 then everytime we can divide by 7. Coz any n! Value above 6 will be a multiple of six. Like 3! = 6,4! = 24, 5! = 120. So everytime the sequence the "111111" repeats itself some number of times
one way to understand it could be. We can write the number of the form k* (1111... n! times) . then firstly if k%7==0 then the whole number is divisible by 7. now the bracket part can be written as (10^(n!)-1)/9 now to make this whole thing divisible by 7 we need to make ( 10^n! % 7 == 1 ) so when that happens?? if you try to simulate and check you'll find the the remainders will repeat at every 6 zeros {10%7==3 ,100%7==2 .. . . ,1000000%7==1 ,10000000%7==3} so n! must be multiple of 6 . which is only possible for n>=3.
One way to think about this can be to use the Fermat's Little Theorem. Which states that for co-prime integers a and p, where p is a prime number, a^(p-1) (mod p) = 1. That is, when a is raised to the power p-1, it gives a remainder of 1 when divided by p. Now, for the case of divisibility by 7, notice the series of ddddd....dd can be written as d*((10^(n!) - 1) / 9). Now in order for this to be divisible by 7, 7 must divide 10^(n!) - 1 (why?) or d must be equal to 7. Consider the former case, we must have 10^(n!) (mod 7) = 1. That means 6 must divide n!, according to Fermat's Little Theorem (why?). That means any n >= 3 would work because 6 divides n! for all n >= 3. So the necessary and sufficient condition for divisibility by 7, in this case is i) d = 7 ii) n >= 3. QED
1:05:11 I came up with a proof for your solution. Lets represent your scaled down factors as low and high (low = ceil(l/G), high = floor(r/G)) if(low == 1){ gcd of low and high is always 1 so even the maximum high would suffice. } else{ The number of primes less than n are estimated to be n/log(n). Lets consider two numbers a and b such that a
I was able to solve C for special case but made mistake when there is element except 1,-1 , regret is that hour after contest ended I was able to solve it completely
It just went worst, Once I was able to solve 3 problems regularly in Div2 and was going close towards 4th one and now I am unable to do even 2nd one. Don't know what is going on
same
this was the first contest in which i had solved my first div 2 second problem , second was quite challenging beacause after 4 wrong submission i got the ac
Don't feel demotivated, forget this like a bad day !! Bro
same with me
same with me i was able to solve reg 2 problems in div2 contest and move towards 3rd problem but in this contest i was not able to solve 2nd problem
It is with Great Honour to inform you that TLE Eliminators Is teaching much better than other TH-camrs Who Explain the answers after CodeForces Contests.
Thank You So Much Sir.
for D, the intuition you can use is prime gaps.
Sound quality is not good at all !!!!!!😕😕
Thank you so much for this amazing video! Could you help me with something unrelated: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How should I go about transferring them to Binance?
Why minimum suffix + minimum prefix + val. I can't understand this part 47:10
cant understand the b only divisibility by seven can someone help me out how he gets this intuition
So basically we must know that 111111 is divisible by 7. This is something we must know. When we know this we can say that if n! >= 6 then everytime we can divide by 7. Coz any n! Value above 6 will be a multiple of six. Like 3! = 6,4! = 24, 5! = 120. So everytime the sequence the "111111" repeats itself some number of times
one way to understand it could be. We can write the number of the form k* (1111... n! times) . then firstly if k%7==0 then the whole number is divisible by 7.
now the bracket part can be written as (10^(n!)-1)/9 now to make this whole thing divisible by 7 we need to make ( 10^n! % 7 == 1 ) so when that happens?? if you try to simulate and check you'll find the the remainders will repeat at every 6 zeros {10%7==3 ,100%7==2 .. . . ,1000000%7==1 ,10000000%7==3} so n! must be multiple of 6 . which is only possible for n>=3.
kept checking for 1,11,11,1111,11111,.... and 111111 is divisible by 7, so for all n>=3 number is div by 7
One way to think about this can be to use the Fermat's Little Theorem. Which states that for co-prime integers a and p, where p is a prime number, a^(p-1) (mod p) = 1. That is, when a is raised to the power p-1, it gives a remainder of 1 when divided by p. Now, for the case of divisibility by 7, notice the series of ddddd....dd can be written as d*((10^(n!) - 1) / 9). Now in order for this to be divisible by 7, 7 must divide 10^(n!) - 1 (why?) or d must be equal to 7. Consider the former case, we must have 10^(n!) (mod 7) = 1. That means 6 must divide n!, according to Fermat's Little Theorem (why?). That means any n >= 3 would work because 6 divides n! for all n >= 3. So the necessary and sufficient condition for divisibility by 7, in this case is
i) d = 7
ii) n >= 3.
QED
@@beiberu nice explanation bro , thx
Can someone please explain the intuition behind the prefix and sufix range, iam not getting it.
Please fill the Feedback form for PCD: forms.gle/XWE5FTrZ4ab3o9PT9
in problem c, on the suffix part of 1, -1 how the answer is 0, -1, 0 instead of 0, 1, -1? plx reply
Basically...
From the right,
- 0 elements = [] = 0
- 1 element =[-1] = -1
- 2 elements = [1,-1]= 0
man ...I have to say that this explanations was really great ❤❤❤❤❤❤
1:05:11 I came up with a proof for your solution.
Lets represent your scaled down factors as low and high (low = ceil(l/G), high = floor(r/G))
if(low == 1){
gcd of low and high is always 1 so even the maximum high would suffice.
}
else{
The number of primes less than n are estimated to be n/log(n).
Lets consider two numbers a and b such that a
how are we certain in the 2nd question that if num%i==0 and n>=r we can take i ?
tried 3rd one by recursion.. got wrong ans on test case 5.
Can SomeOne Clarify me with the Problem D. Understood a Little.
I was able to solve C for special case but made mistake when there is element except 1,-1 , regret is that hour after contest ended I was able to solve it completely
a lot of wrong test case on 4 problem C🤒