can an algorithm with the complexity O(N^{2}sqrt(n)) and 1<=N<=10^{5} execute in 2 sec.

A computer can perform about 10^8 instructions per second so according to that this complexity of yours should be able to run in 2 seconds and let me know it if not.

I’m quite sure it won’t. Even a simple loop running 10^{10} times is enough to give TLE on the TEST problem, which has a time limit of 2.95918 sec. With N=10^{5} and complexity of O(n^{2}sqrt(n)) = O(n^{5/2}) results in approximately 3.16×10^{12} iterations, which is just not possible.