返回顶部
摘要: http://codeforces.com/contest/1208 C. Magic Grid 一开始想着直接排,结果20的时候纵向就翻车了。但4个连续自然数一组的思路是没问题的。一个偶然的机会,发现其实相差是纵向4的几个异或起来也是0。所以就是16个连续自然数一组自由构造。 来一个迷惑性极强的构 阅读全文
posted @ 2019-08-26 11:03 Inko 阅读(179) 评论(0) 推荐(0)
摘要: 目录 "1001 ^&^" "1002 array" 1003 K th occurrence "1004 path" "1005 huntian oy" "1006 Shuffle Card" "1007 Windows Of CCPC" "1008 Fishing Master" 1009 Ka 阅读全文
posted @ 2019-08-25 11:23 Inko 阅读(932) 评论(0) 推荐(0)
摘要: 区间修改线段树: cpp include using namespace std; typedef long long ll; define lt ls, l, m define rt rs, m + 1, r define ls (o 1; st[ls] += lazy[o] (m l + 1); 阅读全文
posted @ 2019-08-24 11:38 Inko 阅读(151) 评论(0) 推荐(0)
摘要: 鉴于水平有限,可能会有问题。 cpp include using namespace std; typedef long long ll; define ls ch[id][0] define rs ch[id][1] const int INF = 1e9; const int MAXN = 10 阅读全文
posted @ 2019-08-24 01:08 Inko 阅读(172) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/weixin_43093481/article/details/82229718 貌似好像也不是很完全的样子 阅读全文
posted @ 2019-08-23 21:17 Inko 阅读(84) 评论(0) 推荐(0)
摘要: ```cpp include define lc (o 1; sum[lc] = (1ll lz[o] (m l + 1) + sum[lc]) % mod; sum[rc] = (1ll lz[o] (r m) + sum[rc]) % mod; lz[o] = 0; } } void build 阅读全文
posted @ 2019-08-22 22:11 Inko 阅读(126) 评论(0) 推荐(0)
摘要: 一个字符串的最小循环表示: cpp include using namespace std; typedef long long ll; int n; int a[600005]; int min_representation() { int i = 0, j = 1, k = 0; while(i 阅读全文
posted @ 2019-08-22 22:07 Inko 阅读(216) 评论(0) 推荐(0)
摘要: 链接:https://scut.online/p/432 题意:给一个长度不超过1000的字符串,从中间切开前缀后缀(各至少一个字符),问每个切法中前缀后缀的相同的子串对的个数。 重新理解后缀自动机。 1.后缀自动机里面,endpos表示这个节点作为结束位置出现的次数。一个maxlen更长的节点出现 阅读全文
posted @ 2019-08-22 21:40 Inko 阅读(130) 评论(0) 推荐(0)
摘要: ```cpp include using namespace std; define ll long long int a[20]; ll dp[20][MAXS1][MAXS2]; ll dfs(int pos,int s1,int s2,bool lead,bool limit) { if(po 阅读全文
posted @ 2019-08-22 13:45 Inko 阅读(98) 评论(0) 推荐(0)
摘要: "1005 Welcome Party" 解题过程:先是考虑到一个n^2的做法,是可以的。首先下面会把去唱歌的人里面唱歌值最高的称作“主角”。首先枚举每个人作为主角,然后唱歌值比主角高的必须要丢到相声里面。然后相声里面就已经有一个最大值了,假如相声值最大值已经超过了主角的唱歌值,那么这个差就更新答案 阅读全文
posted @ 2019-08-21 17:08 Inko 阅读(256) 评论(0) 推荐(0)