DISAPP's blog

By DISAPP, history, 8 months ago, In English

Hello ,can any one help me to solve this problem ?

 
 
 
 
  • Vote: I like it
  • +4
  • Vote: I do not like it

»
8 months ago, # |
  Vote: I like it -8 Vote: I do not like it

It will be solved with two pointers :)

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

    one of my friends tell me we can using 2 pointers and we have 2 cases if s[l]=s[r] so we don't need any swaps otherwise we should find the rightmost character equal to s[l] but I don't understand why this observation works good for all cases

  • »
    »
    8 months ago, # ^ |
    Rev. 2   Vote: I like it +13 Vote: I do not like it

    Yes, I entered ACPC kick off most of the problems were very unoriginal. I didn't like the contest anyways from its bad statements quality and no new ideas I found in it. I wasted an hour for 2 problems having unclear statements. 1 of them not saying the amount of testcases(or the limit of N all over testcases) and the other having just trash statement. I could've solved 10/11 out of 12 with that hour but I only solved 9 :/

    • »
      »
      »
      8 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      I read those two statmentes for 10 times trying to find any difference between them in the end they meant the same thing • Any two numbers with the same number of ones in their binary representation are in the same subset. • No two numbers with different number of ones in their binary representation are in the same subset

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

        { 1 , 1 , 3 , 3 } this set satisfies the first condition but not the second one.