Блог пользователя Shefin_

Автор Shefin_, 4 года назад, По-английски

Hello, Codeforces!

adnan_toky and I are super thrilled to invite everyone to participate in Codeforces Round 848 (Div. 2), which will be held on Feb/01/2023 17:35 (Moscow time).

This round is rated for the participants with ratings strictly lower than 2100. You will be given 6 problems and 2 hours to solve them. All the problems are authored and prepared by adnan_toky and me. To get the 6 problems approved, we needed to propose 12 problems in total sneaky_wink_catto.

UPD: Score distribution: $$$500-1000-1250-1750-2250-2750$$$

We would like to thank:

This is our first round! We've tried our best to make the round enjoyable. It is greatly recommended to read all the problems.

We are looking forward to your participation. Good luck to everyone king.

UPD2: Congratulations to the winners!

Overall:
1. jiangly
2. SSRS_
3. Geothermal
4. BurnedChicken
5. Ormlis

Div. 2:
1. CoCl2_6H2O
2. Joyemang
3. gqh_cpp
4. rainboy
5. NoMentalPowerLeft

UPD3: Editorial is out

  • Проголосовать: нравится
  • +417
  • Проголосовать: не нравится

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Super excited bhai

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Looking forward to get an amazing problemset. Super Excited!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

Super thrilled to participate

»
4 года назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +24 Проголосовать: не нравится

As a tester, the problems are really good and educative. I recommend everybody to participate in this round!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Bangladeshi round after a long time. Also the first ever RUETian CF round. Super excited to participate <3

»
4 года назад, скрыть # |
 
Проголосовать: нравится +38 Проголосовать: не нравится

As a Tester, I can assure you that problems are really good, and you will enjoy them a lot for sure. So be sure to participate in another amazing Div. 2 round. Orz Shefin_ and adnan_toky.

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +23 Проголосовать: не нравится

As a tester, I hope everyone enjoys the problems as much as I did! :p

»
4 года назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится

as a tester, I tested, so as a participant, you should participate :D

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

So excited after seeing another Bangladeshi Round!!!!!!!

Hope it will be a good contest & all the contestant will enjoy the problemset.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Inb4, clash with Codechef Round comments :kekw:

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

As a Bangladeshi participants, I am so excited,,,, proud of you bro

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Wow..Another Bangladeshi Round.

Super excited

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

That is my birthday!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +44 Проголосовать: не нравится

As a Tester, the problems tasted sweet to me, I hope the same for you too! :p

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

As a tester, I can assure you the problems are very quality and amazing. Good luck for everyone

»
4 года назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

As a Robot, I will be taking place in the Round. Don't get scared Humans.. -- ChatGPT

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Finally non-chinese round. Maybe I can get positive delta .

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Now it's toky_bhai round, not tourist round...

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

This is 4th round from Bangladeshi setter. Really a proud moment for aspiring Competitive Programmers from Bangladesh. Super excited to participate in this round.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Clashing with Codechef Round, I know most people including myself would prefer Codeforces, but I don't wanna miss any of them. Past few rounds of codechef had some interesting problemset.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Looking forward to a rated round

»
4 года назад, скрыть # |
 
Проголосовать: нравится -18 Проголосовать: не нравится

I am improving day by day, I might end up top1 in this contest.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

How did can i give two contest on 1 feb there is codechef contest also at the time of codeforces div2

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Really excited for my first Bangladeshi round.

Congratulations adnan_toky and Shefin_ bhai.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Excited to participate in Bangladeshi round. Hope the round will be good and rated, no unwanted issue will happen.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

no more unrated round!!!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Hoping to move closer to cyan color.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Another Codeforces and Codechef clash ...

But there is no doubt which one I will prefer :)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Wow. Bangladeshi Round.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I hope it will be a good round.I don't want a unrated round again!

»
4 года назад, скрыть # |
 
Проголосовать: нравится -31 Проголосовать: не нравится

Today I will beat tourist....:)

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Hurrah! Problem Setters from Bangladesh.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +84 Проголосовать: не нравится

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Waiting...

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Strange score for problem C || nice:)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

can anyone tell me how can i increase my rating or problem solving skill

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Please arrange prizes for top Bangladeshi Performers Shefin_ bhai.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

When will the rating from the previous round will get updated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

I will claim my green color back

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

5 минут осталось, жду, не дождусь, когда начнётся соревнование! Всем удачи! Надеюсь, я смогу хотя б одну задачку решить :)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Forgot to register and was willing to join 10 minutes late but damn this looked quite speedforces that I rethought, lmao

Spoiler
»
4 года назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

goofy contest

»
4 года назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

I think I am dyslexic, took me 30 min to read problem B lol

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Why is the second problem so difficult?

»
4 года назад, скрыть # |
← Rev. 10  
Проголосовать: нравится -22 Проголосовать: не нравится

.

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится
2nd problem be like
»
4 года назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

5 2 4

2 5 4 3 1

5 2

After the contest, it will be helpful for me if anyone tell me the answer and explanation of this test case.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +60 Проголосовать: не нравится

The description of problem B could not be any worst.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

B>>>>>>C :( Could Have Finished In 3 Dig I Would Have Not Wasted 45 mins in B

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

hardest problem B i have ever seen

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

implementing B is masochism

»
4 года назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

What the hell is D?...

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

How to solve D?

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Nice round overall! If I don't FST on problem C (I have doubts about my time complexity) this will be my teal round!

A: If the numbers are all 1, then ans = n-4, if there are two consecutive -1's, ans = sum+2, else ans = sum

B: It was a nightmare to read for me personally but once I drew it on paper the idea became clear. We just need to store the positions of the numbers and let ans be the minimum between the distance between a and a_i+1 and the number of swaps to get a_i+1 out of range for all i.

C: I forgot how to bitmask so I wrote some really weird code converting my bitmasks to strings so I could access them by index. Hope I don't FST!

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Next time i will not participate this author contest.. One of worst problem statement. they can't explain any single problem easily. shame on you

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

am i gonna get a negative rating, cuz my dumbass could not even solve problem A :skull: :sob:

»
4 года назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Today I learned

p = 10**9 + 7
for x in range(1, 10**6):
    pow(x, p-2, p)

Used: 1559 ms, 2732 KB

p = 10**9 + 7
for x in range(1, 10**6):
    pow(x, -1, p)

Used: 420 ms, 2112 KB

»
4 года назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Is there anybody who wasted much time to write total bruteforce for C?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Disgusting problems, especially D

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

what is "UNEXPECTED VERDICT" in the case of hacking ???

I was trying to hack the solution, which seems like will TLE in worst case input...

https://codeforces.me/contest/1778/submission/191593774

Can someone analyse the complexity in worst case ???

1000 * 100 * 10^3 * 100 is my worst case scenario...

10^10 seems quite unreachable in 2 seconds,,, is it reachable ???

»
4 года назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

I missed some important observations in B because of this explaining, i'm sorry but this explaining is so bad.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve D, i got the recurrence relation, but seemed like there is only one initial value but 2 are needed.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +37 Проголосовать: не нравится

The most unclear statements of the Year. This contest is the Winner

»
4 года назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +24 Проголосовать: не нравится

Любительский разбор задачи D. Гибкая строка возвращается + исходник

Разбор задачи D

Исходный код решения

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Спасибо за разбор

    Не самая лучшая задача, так как до уравнения дойти очень легко, а дальше нужно просто знать как решать такие уравнения. Я не знал, поэтому не решил, хотя такое же уравнение написал почти сразу.

    • »
      »
      »
      4 года назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Если знаете метод гаусса, то можно вывести самому. Сначала нужно обнулить коэффициенты элементарными преобразованиями под элементом $$$A(0,0)$$$ за счёт нулевой строки, затем под $$$A(1,1)$$$ за счёт первой строки, и т.д. Так как каждое уравнение содержит не более 3-х неизвестных и все они расположены возле диагонального элемента, то это за O(1) для каждого коэффициента делается. Суммарно O(n). Потом можно снизу-вверх пойти и пообнулять уже элементы над диагональными, но лично я на контесте вбил в яндексе "метод прогонки C++" и скопипастил код из Викиучебник -> Реализации алгоритмов -> Метод прогонки, переименовав переменные.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Problem B gave me shivers

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve B?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Understanding problem B took more time than implementing it lmao

»
4 года назад, скрыть # |
← Rev. 10  
Проголосовать: нравится +30 Проголосовать: не нравится

A: The answer is sum(a[i])-2*min(a[j]+a[j+1]), where 1<=i<=n, 1<=j<=n-1.

B: Consider for each pair of a[i], a[i+1]. Let pos0=pos[a[i]], pos1=pos[a[i+1]]. if pos1 < pos0 or pos1 > pos0+d for any i, the answer is zero. Otherwise, for each pair of (pos0, pos1), we have 2 ways break the condition: move a[i+1] left to pos1, the number of move is pos1-pos0; move a[i] to the left and move a[i+1] to the right until their distance is greater the d, the number of move is d+1-(pos1-pos0). Be careful that the second way is invalid if d>=n-1.

C: For each different chars in string a, assign a number (from 0 to 9) for it. Then consider all masks from 0 to 1024 with bitcount(mask)==k, run dp for it (for each 0<=i<n, consider i is valid position if a[i]==b[i] or mask&(1<<t)>0, where t is the number we assigned for a[i]). The maximum number of masks we need to consider is C(10,5)=10!/(5!*5!)=252.

D: The recurrence formula is E(i)=1+(i/n)*E(i-1)+((n-i)/n)*E(i+1), where E(i) is the expected number of moves if the number of j which satisfies a[j]==b[j] is i. We can subtract E(0) from both sides of this formula, therefore (E(i)-E(0))=1+(i/n)*(E(i-1)-E(0))+((n-i)/n)*(E(i+1)-E(0)), we let dp[i]=E(0)-E(i), then dp[0]=0, dp[1]=1, dp[i+1]=(n*dp[i]+n-i*dp[i-1])/(n-i). Then let i=n-1 in the initial formula, and notice that E(n)=0, we get E(0)=n*dp[n-1]+n-(n-1)*dp[n-2]. Therefore we are done.

  • Condider we need to calculate E(i). Because there are i good bits and n-i bad bits, we have chance of (n-i)/n to increase i by 1, i/n to decrease i by 1. Then E(i)= p(i'=i+1)*E(i | i'=i+1)+p(i'=i-1)*E(i | i'=i-1) =((n-i)/n)*(1+E(i+1))+(i/n)*(1+E(i-1))=1+(i/n)*E(i-1)+((n-i)/n)*E(i+1).

(PS: In fact, if we let E(n)=0 and write the formula as E(i)-(i/n)*E(i-1)-((n-i)/n)*E(i+1)=1 (0<=i<n), we can get a tridiagonal equation system, where the coefficient matrix is a tridiagonal matrix. )

E: No idea.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

what's D doing in a programming contest?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +30 Проголосовать: не нравится

I hate problem B :((( The statement is unclear :(((

»
4 года назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

Any comments about this being posted in contest time?

»
4 года назад, скрыть # |
 
Проголосовать: нравится -6 Проголосовать: не нравится
Is is div2B or div1B ? I don't think I even came close to solution. I just pushed everything to left by fixing first postion and everything to right by fixing right postion and that did not work

may be each pair has 2 options i and i+1 cross each other and [i+1.n] maintian k distance and [0..i-1] maintain k distance gap and moving left.

Nice problem set 
»
4 года назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

not a good contest.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится
»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How come the answer for this last test case of problem C is 11 ?

10 3
lkwhbahuqa
qoiujoncjb

I think that answer should be 10, after changing A to lkwujonuqa. What is the correct update of A then ?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Looking at other's solution after contest gave me more clarity about problem B than the problem statement itself.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Welp time to learn Expected Value.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I think the problem setters skipped English lectures to study maths...

Problem B :( u all know why

and problem D was more of maths than programming.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

I think B statement was clear enough (though don't like the problem much). Samples explained further as well which I noticed ages later. Just shows I can't even read.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Literally, curious to know how to solve D! The states seems to depend on each other so a straightforward dp with recursion will fall into infinite recursion...

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +35 Проголосовать: не нравится

    Let $$$dp[i]$$$ be the expected number of moves to make both strings equal if we have $$$i$$$ matching characters, so:

    1. $$$dp[N]=0$$$
    2. $$$dp[0]=1+dp[1]$$$
    3. $$$dp[i]=1+\dfrac{i}{N}\cdot dp[i-1]+\dfrac{N-i}{N}\cdot dp[i+1]$$$

    From the $$$2^{nd}$$$ point we can observe that the $$$dp[i-1]$$$ part in the RHS of $$$dp[i]$$$ can be replaced with an expression in terms of $$$dp[i]$$$, to do that, let's assume $$$dp[i-1]=cof[i-1]+dp[i]$$$. Now just replace $$$dp[i-1]$$$ in the RHS of $$$dp[i]$$$ with $$$(cof[i-1]+dp[i])$$$ and simplify, we will find that:

    $$$cof[i]=\dfrac{N+i\cdot cof[i-1]}{N-i}$$$. So we can calculate $$$cof$$$ in increasing order of $$$i$$$ then calculate $$$dp$$$ in decreasing order of $$$i$$$. So, if we have $$$M$$$ matching characters in the initial strings, the answer is $$$dp[M]$$$.

    • »
      »
      »
      4 года назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      I am sorry but what is cof[i] ?

      • »
        »
        »
        »
        4 года назад, скрыть # ^ |
         
        Проголосовать: нравится +5 Проголосовать: не нравится

        By analogy with the "$$$dp[i-1]=cof[i-1]+dp[i]$$$", $$$cof[i]$$$ can be found in $$$dp[i]=cof[i]+dp[i+1]$$$.

        Note that we were able to shape the equation of $$$dp[i]$$$ like that because from the original equation $$$dp[i]=1+\dfrac{i}{N}\cdot dp[i-1]+\dfrac{N-i}{N}\cdot dp[i+1]$$$, when we replace $$$dp[i-1]$$$ in the RHS with $$$cof[i-1]+dp[i]$$$ and rearrange we get:

        $$$\dfrac{N-i}{N}\cdot dp[i]=1+\dfrac{i}{N}\cdot cof[i-1]+\dfrac{N-i}{N}\cdot dp[i+1]$$$

        So dividing the whole equation by $$$\dfrac{N-i}{N}$$$ yields $$$dp[i]=\dfrac{N+i\cdot cof[i-1]}{N-i}+dp[i+1]$$$. So we just renamed the RHS to $$$cof[i]+dp[i+1]$$$.

    • »
      »
      »
      4 года назад, скрыть # ^ |
       
      Проголосовать: нравится +5 Проголосовать: не нравится

      let's assume dp[i−1]=cof[i−1]+dp[i]

      Is there a name for this technique?

      Kind of reminds me of guessing the solution of a differential equation by intuition then figuring out the constants

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

One question I had for a long time , when system testing occurs does it check the submissions in the order it was submitted in the contest ?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится
»
4 года назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

Saw expectation problem in the position of D and got afraid... Spent nearly one hour trying to understand how to implement expectation dp, finally understood, and got AC.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Atleast , you should have learnt English first before writing problem statement for B.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Interesting problems. well done shefin vai and adnan toky

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

what is the meaning of this line you have to maximize the number of integer pairs (l,r) (1≤l≤r≤n) such that a[l,r]=b[l,r] and why was the string a can be of almost 10 different character is there any data structure we can use or something

»
4 года назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Any hints for D please?

And any resource for some probability and expectations?

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +5 Проголосовать: не нравится

    Solution idea for D here.

    Resource is here.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    Suppose there are $$$d$$$ mismatching bits. Let $$$F(d)$$$ be the expected number of operations that we need until the two strings match. Can you derive a recurrence relation for $$$F(d)$$$?

    If you're familiar with the basic definition of expected value, i.e. multiply each possible value by its probability of occurring and then add up all the products, then this is sufficient for this problem. No advanced properties are required here.

»
4 года назад, скрыть # |
 
Проголосовать: нравится -6 Проголосовать: не нравится

Why this problem B is soooo hard? I mean, this is harder than other Bs of Div2 contests

  • »
    »
    4 года назад, скрыть # ^ |
    ← Rev. 3  
    Проголосовать: нравится 0 Проголосовать: не нравится

    I don't think the problem itself is difficult.

    1. It's hard to understand the description.
    2. The statement of the conditions is complicated.

    For these two reasons, I think it took a long time to find the right way to solve the problem.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

lmao at 8 pages of cheaters getting WA on test 24 for problem D

https://codeforces.me/contest/1778/status/page/1?order=BY_JUDGED_DESC

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

B was not very readable.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

In problem D, if expected value is $$$\frac{p}{q}$$$, how to prove that $$$q$$$ has mod-inverse for $$$998244353$$$?

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится -6 Проголосовать: не нравится

    Modular inverse of x exists iff gcd(x, mod) = 1. Here, mod is prime, so the inverse exists always.

    • »
      »
      »
      4 года назад, скрыть # ^ |
      ← Rev. 2  
      Проголосовать: нравится +8 Проголосовать: не нравится

      gcd(mod, mod*2) is not 1. :) So, if q=0 (mod 998244353), then it would not exist. I think there are other proofs,

      • »
        »
        »
        »
        4 года назад, скрыть # ^ |
        ← Rev. 6  
        Проголосовать: нравится +11 Проголосовать: не нравится

        Well, as long as $$$q$$$ never becomes a multiple of $$$MOD$$$, then it will have a modular inverse. Every quotient we utilize for solving this problem is built from multiplying and dividing various coefficients of the recurrence relation for various arguments. For example, with $$$T(i)$$$, the recurrence relation uses $$$\frac{i}{n}$$$ and $$$\frac{n - i}{n}$$$. These base values are always from $$$1$$$ to $$$n$$$, where $$$n \leq 10^6 \lt MOD$$$, so it is impossible to generate a multiple of $$$MOD$$$ by multiplying/dividing such values in any combination.

      • »
        »
        »
        »
        4 года назад, скрыть # ^ |
         
        Проголосовать: нравится +21 Проголосовать: не нравится

        If you solved D, you may know that the denominator of every fraction in the calculation process does not exceed n. So the final denominator of the expected value must be the multiplication of numbers below n, which does not have mod as a factor.

      • »
        »
        »
        »
        4 года назад, скрыть # ^ |
         
        Проголосовать: нравится +8 Проголосовать: не нравится

        Zero always has no inverse as an exception.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

How to solve expectancy related.problems?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I solved ABCDE in div.2 for the first time. Thanks for the contest!

But I think problem E is not so good, because the problem like "choose some node $$$r$$$ to be the root of the tree and then choose a node $$$v$$$ and ask some questions about the subtree of $$$v$$$" is popular in China. We have an easy solution by using heavy path decomposition (and similar, I don't know how to descirbe it). What's more, I spent 50 minutes on ABCD but 40 minutes on E. It's hard to code and debug.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

[problem:B] there are too many distracting details and it made me miss the important details

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

[problem:B] there are too many distracting details and it made me miss the important details

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

What was the idea in problem E?

»
4 года назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Problem B test different ability.Two interconnected statement made it hard to cut to the chase.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Didn't like the problem statement for the second question, was to confused. Thought we need to do the operations such that all of them make it "not good". Was stuck on solving this for whole 1.5 hour.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I found C to be easier than B as it didn't require any intuition and was just a simple implementation problem, I've explained it here in this video, https://youtu.be/OH3jNLrdFag. happy coding :)

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +20 Проголосовать: не нравится

The winner of this contest is the for all line in problem B.

Saw this after the end of contest. Blind me :-((

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In problem B statement:

For example, with the permutation p=[4,2,1,3,6,5] and d=2 :

a=[2,3,6] is a not good array. a=[2,6,5] is good because pos(a1)=2 , pos(a2)=5 , so the condition pos(a2)≤pos(a1)+d is not satisfied. a=[1,6,3] is good because pos(a2)=5 , pos(a3)=4 , so the condition pos(a2)<pos(a3) is not satisfied.

How is pos(a3)=4 for the last array a?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why the solution:191560464 giving WA?

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

There are test cases with n or m equal to 1?.In the statement that input is excluded

»
4 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

when the rate will be changed ?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

If problem B statement be written in clear way it will have more than 10k submission Anyway will be cautious from next conests. For anyone whose is having problem implementing code for b here it is 191620224

»
4 года назад, скрыть # |
 
Проголосовать: нравится -10 Проголосовать: не нравится
Pic
»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +4 Проголосовать: не нравится

There should have been at least one test case for problem B which could explain that we have to think only for adjacent pairs and not for whole array.

»
4 года назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

During contest there are live YouTube streams running. Pls do something!

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

The language of B made it one of the toughest questions to understand, language should have been improved. If someone understands properly it was very simple but I and most of my colleagues thought in wrong direction resulting in a decrease in the ranks.

»
4 года назад, скрыть # |
 
Проголосовать: нравится -10 Проголосовать: не нравится

Why are ratings not updated till now?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

D is a very nice problem in my opinion, thanks!

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

i just realised that in problem B, for an array to be good u just need one of the indexes to not meet the requirement. I thought you have to make it false for all indexes.

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Could someone please explain how the answer is 56/3 in third testcase of D

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Are there any prerequisite topics we need to learn before attempting Problem D?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Any idea when ratings will be updated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

There is an issue with problem "C". Verdict is showing Accepted but the same code is getting TLE now!!!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I have submitted someone's AC code in Problem C after the contest ends. But got TLE. My submission link : https://codeforces.me/contest/1778/submission/191670480 AC submission in contest time : https://codeforces.me/contest/1778/submission/191601266

»
4 года назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

Is it rated?

»
4 года назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +7 Проголосовать: не нравится

isn't taking too late to update rating ?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Why hasn't the rating been updated yet

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

As a newbie, when to add rating?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

WHEN rating changes? my purple flying away...

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Benq stay at the first place for a longer time due to the rating hasnt update.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

When will the ratings change?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Ratings not updated yet :-/

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I was hoping for a rating increase, but no update in rating :o

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

LateRatingForces

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Please, update ratings!!! :( :( :(

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

why rating hasn't updated yet??

»
4 года назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

When will the ratings get updated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Why ratings not updated yet?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Why it's still unrated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

When rating will be updated of this Contest?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

I think you can swap the position of D and E , D is very crazy .

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is it rated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

why didn't the rating is updated yet.Is there any problem or cheaters are being caught?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Shefin_ what exactly is the problem in backend.It is getting so late rating changes.I hope contest will be rated.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +10 Проголосовать: не нравится

    We also know the same as what prateek_saxena said. We have not received any negative response from CF about our round. So, the round is rated. You just need to wait for the plagiarism test of both rounds and the previous round's rating changes. Don't worry.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Is it rated ? rating is not added yet ?

I am new in to CF

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Is the contest unrated? My rating has not been updated yet...

I would be glad to know.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

When will the ratings get updated? O.o

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

When will we be rated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

The rating changes for round847(div3) have disappeared too.What happened?So strange.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

yayy ratings updated, got positive delta