2016年12月22日

P2001xor-sigma 字典树,然而好坑

摘要: https://vijos.org/p/2001 设perXor[i]表示1 i的前缀异或值。 那么要得到某一段的异或值,只需要perXor[j] ^ perXor[i - 1] 那么我们把perXor[n]先加入去字典树,然后用perXor[n - 1]去找,找到的就是下标n的贡献。 同理,然后把 阅读全文

posted @ 2016-12-22 23:01 stupid_one 阅读(172) 评论(0) 推荐(0) 编辑

Hackonacci Matrix Rotations 观察题 ,更新了我的模板

摘要: https://www.hackerrank.com/contests/w27/challenges/hackonacci-matrix-rotations 一开始是没想到观察题的。只想到直接矩阵快速幂。 但是超时了,因为我的矩阵快速幂是应对稀疏矩阵的, http://www.cnblogs.com 阅读全文

posted @ 2016-12-22 14:15 stupid_one 阅读(272) 评论(0) 推荐(0) 编辑

导航