sbasrik's blog

By sbasrik, 11 years ago, In English

Hi, As you know practice tasks are published in the last week, if you know solutions can you share some hints, thanks in advance.

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

»
11 years ago, # |
  Vote: I like it +8 Vote: I do not like it

problem 2 : here

problem 3 keyword: two pointers

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I used two pointers in third problem, but I can't get last 35 points... (If the restriction of the number of calling the row(a,b) method is 400000, it is easy...)

http://gyazo.com/5cefc933b359b884bb437c493811c89a

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

    Yes , you should think of some trick and use the advantage that function row return the number of bridges.

    this happened with me too! first coded 4*n rows calls solution then I tried not to make the pointers back one step and got 100%

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

      I found 3*n rows calls solution but couldn't find any better algorithms...

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

    My AC solution for 3rd problem makes exactly 2N calls to function "row" and then uses a very standard pointer walk to report bridges in order. I'd like to know what is the most interesting approach for problem "birthday".

    I think it's great that practice tasks are open for anyone to submit. Does anyone know if it'll be also possible for the actual competition's tasks ? Perhaps we can hope for a live online contest ?

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

please, show me example solution on pascal!!!