another ridiculously hard algorithms from india