mjnovice's blog

By mjnovice, history, 9 years ago, In English

I want to know how can we do this in 3 steps. Given 1 2 3 4 5 6 7 8, we need to reach this 2 1 4 3 6 5 8 7, doing a riffle/dovetail shuffle on this each time. Any leads ? This is a test case for the problem H.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By mjnovice, 11 years ago, In English

I was trying to solve FIRESC using http://www.codechef.com/viewsolution/3708062. Have used dfs implemented using stack in python and sys.stdin.readlines(). Yet, it is slow. Can someone suggest me if there is a faster way ? as here N=10^5, and it becomes slow for that.

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

By mjnovice, 11 years ago, In English

I am just curious that how do the problem setters create the strong test cases for problems, say which involve strings of size 10^6. I dont think they type a string of length 10^6. Can anyone enlighten my mind on this ?

Full text and comments »

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