|
|
вернуться в форумtle on 21 who can help me? I use bfs. Re: tle on 21 use dynamic programming seq:1 2 7 3 2 8 4 8 5 dp :1 2 3 4 2 3 4 3 4 dp[i] -> dp[i+1] or dp[i] -> dp[j] while seq[i] == seq[j] Notice that if much j exists, just goto the smallest j the algorithm is O(N) P.S : why netflow doesn't work now ? :) |
|
|