Mitpro's blog

By Mitpro, 9 months ago, In English

I am very sorry for problem F, and M, solution for them are wrong, F is fixed, but M is not

I hope you enjoyed the contest! Thank you for participating! This is my first round on Codeforces, so there might be many mistakes, I would be happy to hear your feedback in the comments.

663295A — Jack and time

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295B — Palindromic Subsequence

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295C — Palindromic Substring

Approach: Mitpro

Hint
Editorial O(n^3)
Code (C++)
Editorial O(n)
Solution (Python 3)
Rate the problem!

663295D — Dino and Game

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295E — Sum Digital Root

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295F — Elevator

Approach: Mitpro

Editorial
Solution(C++)
Rate the problem!

663295G — Kun and Palindrome

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295H — Mario and pipes

Approach: Mitpro

Hint
Editorial
Solution(C++)
Rate the problem!

663295I — Magical Box

Approach: Mitpro ; Code: Mitpro

Hint
Editorial
Solution(Python 3)
Hint
Editorial 2
Solution 2(C++)
Rate the problem!

663295J — Adjacent XORs

Approach: Mitpro

Hint
Editorial
Code (C++)
Rate the problem!

663295K — Grandmaster and Chessboard

Approach: i_love_sqrt_decomp

Hint
Editorial
Code (C++)
Rate the problem!

663295L — Ducky Learns XORs

Approach: Mitpro

Hint
Editorial
Code (C++)
Rate the problem!

663295M — Palindrome Prefix

Approach: Mitpro

Hint
Editorial
Code (C++)
Rate the problem!
  • Vote: I like it
  • +32
  • Vote: I do not like it

»
9 months ago, hide # |
← Rev. 3  
Vote: I like it 0 Vote: I do not like it

Not sure about M, trying this test

1
15
111100001000001

your code gives -1. However, I think one valid output could be 111101111101111

  • »
    »
    9 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Well, I guess my solution is wrong :), If you can solve it, please give me the code.

  • »
    »
    9 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Does this work?

    Code
    • »
      »
      »
      9 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      You have to use manicker i guess, way too rare and standard sadly (like K), would be a good problem if it was greedy.....

    • »
      »
      »
      9 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Not sure, I mean I don't have the solution either. That's why I am looking for editorial. However, everything sounds right until: "Since the first k characters of t are all equal, the only way to guarantee that the palindrome condition is broken for all i in this block is to ensure that the mismatch happens within the last k characters of the prefix. Therefore, all characters assigned in a block of 0 s must be equal, otherwise, an earlier mismatch might disappear when the prefix grows, accidentally restoring the palindrome.". I think we can use all your aproaches above and add some new ones as it is a great progress to find out that there can not be two consecutive 1s.

»
9 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Problem L: One can also notice that $$$a$$$ is the difference array of $$$b$$$, thus getting the solution.