2022-2023 Southern And Volga Russian Regional — Editorial
source link: http://codeforces.com/blog/entry/109642
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Idea: BledDest, preparation: awoo
Idea: vovuh, preparation: vovuh
Idea: DStepanenko, preparation: BledDest
Idea: BledDest, preparation: DmitryKlenov
Idea: BledDest, preparation: BledDest
Idea: BledDest, preparation: BledDest
Idea: DmitryKlenov, preparation: dmitryme
Idea: BledDest, preparation: BledDest
Idea: adedalic, preparation: adedalic
Idea: BledDest, preparation: awoo
Idea: BledDest, preparation: Neon
6 days ago, # | Unfortunately, the editorials for two problems are not ready yet. They will appear here as soon as they're written. |
6 days ago, # | In problem Torus Path wording "Note that you can't visit all vertices on the antidiagonal (vertices .... at the same time." — is quite confusing. |
6 days ago, # | can problem N can be solved by using stack data structures ? |
-
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
I am not able to get the solution of N.. Neon Can someone please explain it more ? |
-
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
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK