摘要: 模拟vim (雾 用两个栈s1, s2去模拟,s2的top位置就是光标。这样无论删除还是添加都很方便 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include< 阅读全文
posted @ 2020-08-12 15:56 A_sc 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 公式:\(f(n+2)-f(1)\) 但是本题求的是前n+1项的和,所以计算f(n+3)-f(1) 做法:矩阵乘法 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #i 阅读全文
posted @ 2020-08-12 14:45 A_sc 阅读(849) 评论(0) 推荐(0) 编辑
摘要: 暑假补题记录 dx1 [ ] A:后缀数组,结论题 [ ] B: [ ] C [ ] D [ ] E [x] F:签到 [ ] G [x] H:最小费用流 [x] I::最大流(, 带花树匹配 [x] J:数论公式 dx2 [ ] A [ ] B [x] C [x] D [ ] E [ ] F [ 阅读全文
posted @ 2020-08-12 10:36 A_sc 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 判断 \(\prod_{i=1}^{n}a[i]! == \prod_{i=1}^{m}b[i]!\) 做法:找两个模数,算一下比较一下就好了。如果上式相等那计算取模也一定相等。 #include<iostream> #include<cstdio> #include<cstring> #inclu 阅读全文
posted @ 2020-08-12 10:28 A_sc 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 刚看到一个做法很棒,枚举十字中点然后向四周扩展“十字”,并计数,如果数量等于*总数就输出YES,否则输出NO. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #inc 阅读全文
posted @ 2020-08-12 08:59 A_sc 阅读(170) 评论(0) 推荐(0) 编辑