摘要: 下面的代码中用unsigned long long 运算的自然溢出来省掉取模的过程。#includeusing namespace std;typedef long long ll;const unsigned long long ull;const ull B=10... 阅读全文
posted @ 2019-02-16 19:40 erge1998 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 1005 Programming Pattern (35 分)Programmers often have a preference among program constructs. For example, some may prefer if(0==a), w... 阅读全文
posted @ 2019-02-16 19:33 erge1998 阅读(444) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;const int MAX_N=1000005;int n,k;int Rank[MAX_N+1];int tmp[MAX_N+1];int sa[MAX_N+1];bool compare_sa(int i,i... 阅读全文
posted @ 2019-02-16 12:09 erge1998 阅读(291) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;int main(){ string a; a.resize(100); //需要预先分配空间 scanf("%s", &a[0]); printf(... 阅读全文
posted @ 2019-02-16 10:21 erge1998 阅读(1597) 评论(0) 推荐(1) 编辑
摘要: 直接贴模板:#includeusing namespace std;const int MAX_N=1000005;int n,k;int Rank[MAX_N+1];int tmp[MAX_N+1];int sa[MAX_N+1];bool compare_sa(i... 阅读全文
posted @ 2019-02-16 09:52 erge1998 阅读(155) 评论(0) 推荐(0) 编辑