摘要:
1.字符串分割函数substr string st = *it; len = st.length(); for(int j = 1; j < len - 1; j++) { fst = st.substr(0, j); 字符串.substr(开始地址, 抽取宽度) lst = st.substr(j 阅读全文
posted @ 2018-10-18 21:08
张浦
阅读(235)
评论(0)
推荐(0)
摘要:
暴力枚举STL查重时间给了3000MS吓人的一批过完用了20MS//#pragma GCC optimize(2)#include #include #include #include #include #inc... 阅读全文
posted @ 2018-10-18 20:56
张浦
阅读(65)
评论(0)
推荐(0)
摘要:
简单模拟STL判重//#pragma GCC optimize(2)#include #include #include #include #include #include #include #include ... 阅读全文
posted @ 2018-10-18 18:42
张浦
阅读(99)
评论(0)
推荐(0)
摘要:
Alignment of Code UVA - 1593 //#pragma GCC optimize(2)#include using namespace std;typedef long long ll;... 阅读全文
posted @ 2018-10-18 10:56
张浦
阅读(81)
评论(0)
推荐(0)
摘要:
简单DP注意最后取值即可//#pragma GCC optimize(2)#include #include #include #include #include #include #include #inclu... 阅读全文
posted @ 2018-10-18 09:58
张浦
阅读(102)
评论(0)
推荐(0)
摘要:
问题化简了就是在找间断点用贪心差值越大越优//#pragma GCC optimize(2)#include #include #include #include #include #include #incl... 阅读全文
posted @ 2018-10-18 09:56
张浦
阅读(111)
评论(0)
推荐(0)
摘要:
暴力dfs将状态转换为数字串, 用map记录当前状态的最小步数若大于当前步则可剪枝搜完后输出MAP中全1的步数即可解法二可以证明一个点重复点击是无效的因此每次搜完打标记延展出的路不搜重复点再回溯更快也更容易做题时... 阅读全文
posted @ 2018-10-18 09:53
张浦
阅读(111)
评论(0)
推荐(0)