As a solo warrior in OJ, I spent about nearly 50% of my time on tackling TLE - that is innumerous hours. I almost lost my courage to OJ.But thanks to this post: http://www.spoj.com/forum/viewtopic.php?f=3&t=7968. I didn't use all of the hints, but ge
O(n^3)的时间复杂度,改了半天交了二三十遍,TLE到死,实在没办法了…… 跪求指点!!! #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; ; << ; int mat[MAXN][MAXN]; int SubSum[MAXN][MAXN]; int tempS[MAXN]; int N, K; i