该文被密码保护。 阅读全文
摘要:
双指针法的应用 阅读全文
摘要:
直接用双端点枚举会超时,这里采用尺取法。 答案的存取 起初我想的是就直接开一个10^8的数组,按照差值存在对应的数组,但是会超内存。因此又想到了 算法笔记中用单个数组保存的方法。 阅读全文
摘要:
注意一下 vector之间的复制 将数组作为 vector存储元素的方法。 阅读全文
摘要:
其实不用删除也可以,直接都存下来,然后最后判断下 第一个 map 值为1的数字即为答案 阅读全文
摘要:
if(rt < lt ) break; else if (ch[rt] != ch[lt]) { cur = 0; break; } 阅读全文
摘要:
#include<iostream> #include<vector> #include<algorithm> #include<cstring> using namespace std; struct str{ char s[16]; int index; }; bool cmp(str a,st 阅读全文