摘要: /* 实际上就是求一个k,满足kusing namespace std;string s;void div2() { string t; int l = s.size() - 1, tem = s[0] - '0'; if (tem > 1) t += '0' + tem / 2; te... 阅读全文
posted @ 2014-09-01 22:35 keambar 阅读(316) 评论(0) 推荐(0)
摘要: splay不过竟然用reverse一发水过了。。。调用STL的代码:(156ms)#include #include #include using namespace std;int f[130009];int n,m,l,r;int main(){ scanf("%d %d",&n,&... 阅读全文
posted @ 2014-09-01 21:29 keambar 阅读(439) 评论(0) 推荐(0)
摘要: 看懂题就是水题。。。code#include #include using namespace std;int a[110], n, l, r, ans;int main(){ cin >> n; for (int i = 0; i > a[i]; r = n - 1; sort (a, a + n... 阅读全文
posted @ 2014-09-01 20:57 keambar 阅读(222) 评论(0) 推荐(0)
摘要: 时间限制:0.25s空间限制:4M题意: 在n(ni+1-m 分析这个转移方程的时间复杂度是O(n*m*m)在此题的数据范围中高达10^8 显然我们需要更好的解法 分析上面的方程发现,在计算min(f[j][k])时,是有重复计算的部分的, 于是想办法减少这... 阅读全文
posted @ 2014-09-01 19:38 keambar 阅读(937) 评论(0) 推荐(0)