codeforces
cf
bibaolong*
这个作者很懒,什么都没留下…
展开
-
简单的区间dp Div2 Mar/25/2020 E - Array Shrinking
题目链接题解连接#include <iostream>#include <cstdio>#include <cstring>using namespace std;int num[510] = {0};int f[510][510] = {0};int w[510][510] = {0};int read(){ int x = 0, ...原创 2020-03-25 10:34:22 · 92 阅读 · 0 评论 -
(快速幂求逆元得到组合数)Mar/24/2020 16:46UTC+8Div2 D - Count the Arrays
快速幂 + 逆元 + 组合数题目链接题解链接快速幂求逆元关键:求解 a / b (mod p) – a b 很大无法直接约分利用x = a^{p-2} (mod p) [基于费马小定理] 使用前提使p必须为质数否则 应该利用扩展欧几里得来求逆元。#include <iostream>#include <cstdio>using namespace s...原创 2020-03-24 17:05:57 · 92 阅读 · 0 评论 -
1325D - Ehab the Xorcist div2 Mar/23/2020 10:19UTC+8关于异或
[添加链接描述]题解链接:(https://www.cnblogs.com/stelayuri/p/12495726.html)[添加链接描述]题目链接:(https://codeforces.com/contest/1325/problem/D)关于异或:输入 运算符 输入 结果1 ⊕ 0 11 ⊕ 1 00 ⊕ 0 00 ⊕ 1 11.一串数的异...原创 2020-03-23 10:26:57 · 154 阅读 · 0 评论 -
2020.3.6 div2 B
https://codeforces.com/contest/1316/problem/B简单的规律 + 字符串的赋值处理普通遍历赋值超时!!!得用字符串的 substr 提取子串直接赋值 和 reverse 翻转!!所以下一次处理字符串的时候一定要注意!!!一开始的超时代码#include <iostream>#include <cstdio>using...原创 2020-03-05 14:24:09 · 104 阅读 · 0 评论