kishu_invain_1 and kishore1… both are same…
actually… when i was participating in july long challenge i was in that account… now as having two accounts is against code of conduct of codechef…i informed it to codechef help desk…
seems that… mine is the fastest solution for this problem
could be done in just O(n^2) time using dynamic programming…
ofcourse, i used dynamic programming with a little bit of backtracking viz could be removed if we are clever enough…
now i found an algorith of O(n^2) complexity… @noble_mushtak
could be done in just O(n^2) time using dynamic programming… ofcourse, i used dynamic programming with a little bit of backtracking viz could be removed if we are clever enough… now i found an algorith of O(n^2) complexity with dynamic programming alone… @noble_mushtak
Yeah. It’s always better to run codes on online compilers to check the time. The best I found is code.hackerearth.com