Loading

摘要: 其只是内容已经在其他的博客中整理过,这里不再赘述。下面开始例题讲解。 1 例题 1.1 P3454 [POI2007]OSI-Axes of Symmetry 多边形的对称轴数量。我们直接用边长的平方和邻边作为字符,断环为链(复制一段),然后跑 Manacher,判断是否有符合长度的回文串即可。代码 阅读全文
posted @ 2021-08-30 09:21 hyl天梦 阅读(47) 评论(0) 推荐(0) 编辑
摘要: T1 模拟即可,比较水。 代码: #include<bits/stdc++.h> #define dd double #define ld long double #define ll long long #define uint unsigned int #define ull unsigned 阅读全文
posted @ 2021-08-30 08:28 hyl天梦 阅读(140) 评论(0) 推荐(0) 编辑
摘要: T1 推式子: \[ \sum\limits_{i=1}^n\sum\limits_{j=1}^p\phi(i^j)=\sum\limits_{i=2}^n\frac{\phi(i)\times (i^p-1)}{i-1}+p \] 所以我们筛一下 \(f(x)=\phi(x)\times x^p\ 阅读全文
posted @ 2021-08-30 08:04 hyl天梦 阅读(178) 评论(0) 推荐(0) 编辑