paramsingh's blog

By paramsingh, history, 3 years ago, In English,

Hello, I am trying to solve the problem "It can be arranged" (link), but I can't seem to think of any solution. I would appreciate a hint as to how to approach the problem. I've been trying to model it as a matching problem, but can't seem to come up with anything. Thanks in advance.

Read more »

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

By paramsingh, history, 4 years ago, In English,

Hi there. I've been trying to solve http://www.spoj.com/problems/AKBAR/ for some time, but the only thing I can seem to come up with is starting a BFS from each of the soldiers as the source until the soldier's strength depth. However, that approach gives me a TLE. Any help regarding how to solve this problem would be appreciated. Thanks.

Here's the code for my approach that I tried (TLE): https://gist.github.com/paramsingh/81d728295e6bd01860a0

Read more »

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