BledDest's blog

By BledDest, history, 2 months ago, In English

1765A - Access Levels

Idea: BledDest, preparation: awoo

Tutorial
Solution (awoo)

1765B - Broken Keyboard

Idea: vovuh, preparation: vovuh

Tutorial
Solution (vovuh)

1765C - Card Guessing

Idea: DStepanenko, preparation: BledDest

Tutorial
Solution (awoo)

1765D - Watch the Videos

Idea: BledDest, preparation: DmitryKlenov

Tutorial
Solution (DmitryKlenov)

1765E - Exchange

Idea: BledDest, preparation: BledDest

Tutorial
Solution (BledDest)

1765F - Chemistry Lab

Idea: awoo, preparation: awoo

Tutorial
Solution (awoo)

1765G - Guess the String

Idea: BledDest, preparation: BledDest

Tutorial
Solution (BledDest)

1765H - Hospital Queue

Idea: Neon, preparation: Neon

Tutorial
Solution (Neon)

1765I - Infinite Chess

Idea: DmitryKlenov, preparation: dmitryme

Tutorial
Solution (awoo)

1765J - Hero to Zero

Idea: BledDest, preparation: BledDest

Tutorial
Solution (BledDest)

1765K - Torus Path

Idea: adedalic, preparation: adedalic

Tutorial
Solution (adedalic)

1765L - Project Manager

Idea: BledDest, preparation: awoo

Tutorial
Solution (awoo)

1765M - Minimum LCM

Idea: BledDest, preparation: Neon

Tutorial
Solution (Neon)

1765N - Number Reduction

Idea: Neon, preparation: Neon

Tutorial
Solution (Neon)
 
 
 
 
  • Vote: I like it
  • +50
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Unfortunately, the editorials for two problems are not ready yet. They will appear here as soon as they're written.

»
2 months ago, # |
  Vote: I like it +3 Vote: I do not like it

In problem Torus Path wording "Note that you can't visit all vertices on the antidiagonal (vertices .... at the same time." — is quite confusing.

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

can problem N can be solved by using stack data structures ?

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

    Yes indeed! You need to check for all 1 <= i <= n-1, if s[i] > s[i+1] then we can delete s[i] to obtain a smaller number. You will continue doing this till k is 0. One special case, when stack's first element is greater than 0 and all the remaining values are 0, when placing a value x > 0 and x < stack.top, if k >= stack size, delete all the elements from the stack and push the current one . P.S — You need vector to do this stack operation. Check my submission

»
2 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I am not able to get the solution of N.. Neon Can someone please explain it more ?

  • »
    »
    2 months ago, # ^ |
    Rev. 4   Vote: I like it 0 Vote: I do not like it

    you should give priority to having the least number in the beginning positions(u cant have 0 at 1st position) so :- for every postion check the least number you can get that is iterate over a position vector of numbers from 0-9, and see if we can get that position by checking if it is equal to or smaller than k and once this is done for a postion update k and do this untill k != 0

    code:- https://codeforces.com/contest/1765/submission/183581472

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

The problem K is easily solvable using DP. But the greedy method is quite tricky, at least for me.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Can you please explain your solution.. And how do you store which cells you have already visited? Thanks in advance

  • »
    »
    11 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I was wondering if DP was possible, but I'm not so experienced with DP, and then I the greedy anyways.

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

Having a problem not understanding the solution to F.

Please, can someone explain it more?

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

The problem D can be done in O(N) using just two pointers.

AC submission: https://codeforces.com/contest/1765/submission/186659367

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Sorting does require O(NlogN) operations, you probably meant O(N) operations after sorting.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Your solution seems ease to understand. Thank you for sharing!. But TC is O(Nlog(N)) because of sorting.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

My implementation for N 187904357 using priorityqueue

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

can we do N. Neon by using monotonic stack ??

  • »
    »
    8 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes we can. Check out my solution 190315580. I am using string itself to simulate stack.

»
32 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Neon Can u plss explain why the limit of for loop in problem M is g * g <= n??

»
18 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Is there anyone to fail my code ? imo my logic is true and working every test cases that i used. Any help appreciated. 191443868