atcoder
一只谜谜怪
怀着永远进步的心,追逐希望与梦想
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
AtCoder Beginner Contest 189 D - Logical Expression(线性dp)
题目链接:传送门 感想:最后因为一个小错没看出来,晚了12秒提交,直接难受。 思路:本题具有最优子结构,用dp[i][0 /1]表示i位置为0/1的情况数,dp即可。 代码: #include <bits/stdc++.h> using namespace std; const int maxn = 1e4 + 5; typedef long long ll; string s[100]; ll dp[100][2]; int main() { int n; ios::sync_原创 2021-01-23 22:28:40 · 341 阅读 · 2 评论 -
AtCoder Beginner Contest 138 E - Strings of Impurity(字符串)
题目链接:https://atcoder.jp/contests/abc138/tasks/abc138_e 思路:先预处理每个字符的下次出现位置,再进行模拟即可。 代码: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; int f[30][maxn]; bool v[maxn]; ...原创 2019-08-22 11:10:37 · 373 阅读 · 0 评论
分享