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

Автор ikrpprppp, 5 часов назад, По-английски

1995A - Diagonals

Hint
Answer to Hint
Solution

1995B1 - Bouquet (Easy Version)

Hint
Solution

1995B2 - Bouquet (Hard Version)

Hint
Solution

1995C - Squaring

Hint
Answer to Hint
Solution Integer
Solution Float
Code Integer
Code Float

1995D - Cases

Hint 1
Hint 2
Answer to Hint 2
Hint 3
Hint 4
Hint 5
Solution

1995E1 - Let Me Teach You a Lesson (Easy Version)

Hint 1
Answer to Hint 1
Hint 2
Hint 3
Answer to Hint 3
Hint 4
Solution

1995E2 - Let Me Teach You a Lesson (Hard Version)

Hint 0
Hint 1
Answer to Hint 1
Hint 2
Solution
Разбор задач Codeforces Round 961 (Div. 2)
  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

»
5 часов назад, # |
  Проголосовать: нравится -9 Проголосовать: не нравится

Auto comment: topic has been updated by ikrpprppp (previous revision, new revision, compare).

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

    Access denied 2024-7-24 09:10:13

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

was the 3 ^ C complexity for D intended here ? the constraints are way too low that it passes

272198648

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

Sorry for still having questions about D. I understand till masking. All masked numbers are bad. For example like ABCDACDBBCDADA when k=4, consider D as the last digit, masked numbers are 1111, 1011, 0111, 1001, 1000. After that, we need to find a number a=xxxx, where a & all masked numbers>0. How do you figure out this step? I can not fully understand. Thank you for answering.

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

    All the bad masks are the submasks of the inverted masks of k consecutive characters (in your case, inverted masks are 0000, 0100, 1000, 0110, 0111).

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

for B2 can someone help me find a counter testcase for this submission

my appraoch : for each 2 consective X and Y , Y = X+ 1

we take as much X and Y as possible

if we can reduce one Y and Add 2*x ( when the money left + Y >= 2 * X ) we make this operation

https://codeforces.com/contest/1995/submission/272222265

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

Man, I probably could have done better if I didn't try throwing FFT at C as soon as I saw it lol

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

in B2 what is the intuition behind greedily taking flowers with X petals and then greedily taking flowers with X + 1 petals?

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

    Let the number of flowers with X petals in an optimal solution be A and the number of flowers with X+1 petals be B. Let the maximum number of possible flowers with X petals be C. It is clear that C >= A+B. I claim that in an optimal solution A+B = C. Why? Suppose C > A + B and the solution is optimal. The maximum number of petals you can have is (C-1)(X+1) petals. That is CX-1 petals which is smaller than CX so it isn't optimal. So C = A+B. By greedily replacing as many 'A's with 'B's as we can, we add 1 to the maximum number of petals.

    Not very intuitive, but in my opinion it somewhat explains why this greedy algorithm is true. Can someone also confirm if my logic is correct.

»
3 часа назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

lovely problems, especially E

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

Is $$$O(n\cdot2^c)$$$ intended to pass on D? 272115564

Either this should be hackable or provably lower complexity through optimization.

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

Fast Editorial!

»
26 минут назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Can someone explain the solution to C, why are we squaring the previous element value if its already less the current element value