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

Автор nik_exists, 2 месяца назад, По-английски

Since once hasn't been released, and I love procrastinating on stuff that I probably should have already finished, I thought I might make one. I also don't know why the links to the problems aren't working, blame CF. Apologies if anything is unclear, I'm tired.

[contest:2218A]

Solution

369602653

[contest:2218B]

Solution

369607814

[contest:2218C]

Solution

369615740

[contest:2218D]

Solution

369652425

[contest:2218E]

Solution

369651255

[contest:2218F]

Solution

369686043

[contest:2218G]

Solution

(note, my implementation for this problem was really bad, I kinda overcomplicated it in my head) 369716131

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

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

Thanks for the editorial

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

What do you mean by outputting adjacent odd numbers in D?

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

    I think he means the product of adjacent odd integers

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

    He means two consecutive odd numbers , notice that $$$2i-1$$$ generates the $$$i_{th}$$$ odd number , the construction is :

    $$$(2i-1)\cdot(2i+1) , (2i+1)\cdot (2i+3) , (2i+3)\cdot (2i+5) , ....$$$

    $$$\gcd((2i-1)\cdot(2i+1),(2i+1)\cdot(2i+3))=(2i+1)$$$ because $$$\gcd(2i-1,2i+3)=1$$$ , in fact here you don't need Euclidean algorithm to show so , the $$$\gcd$$$ is no more than $$$4$$$ (from the fact that the $$$\gcd(a,b) \le |a-b|$$$ , Here $$$a \neq b$$$) , it can never be either $$$2$$$ or $$$4$$$ since both are odd numbers , you just need to show they never both divides $$$3$$$ , if one divides $$$3$$$ then other not (because modulus $$$1$$$) and of course the other cases are redundant as one of the numbers won't be a multiple of $$$3$$$ , thus our proof is complete and the construction is valid.

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

My implementation for G is worst but it ok intentionally wanted to solve constructively as I struggled in recent contest in writing long constructive codes.