会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
待到山花烂漫时
你指尖流动的代码,是我不变的信仰
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2021年3月7日
Codeforces Round #705 (Div. 2) AB题解
摘要: A. Anti-knapsack 思路:首先比k大的都可以加进来。其次对于小于k的,检验当前集合里面有没有和他相加等于k的,没有的话就可以加进集合。这一步可以覆盖多个数相加的情况。 view code #include<iostream> #include<string> #include<algo
阅读全文
posted @ 2021-03-07 00:38 TL自动机
阅读(64)
评论(0)
推荐(0)
2021年3月3日
Educational Codeforces Round 105 (Rated for Div. 2) AB题解
摘要: A. ABC String 思路:相同字符要有相同的半括号(要么都是左括号要么都是右括号),总共8种情况。若把左括号看做1,右括号看成-1,那么这个序列满足任意前缀和\(sum[i]>=0且sum[n]==0\),对每种情况进行检验即可。 view code #include<iostream> #
阅读全文
posted @ 2021-03-03 12:40 TL自动机
阅读(293)
评论(0)
推荐(0)
2021年3月1日
Codeforces Global Round 13 ABC题解
摘要: A. K-th Largest Value 思路:操作就是0变1,1变0。那么只用统计1有多少个就知道第x大是谁了。 view code #include<iostream> #include<string> #include<algorithm> #include<cstdio> #include
阅读全文
posted @ 2021-03-01 00:34 TL自动机
阅读(106)
评论(0)
推荐(0)
2021年2月6日
Codeforces Round #699 (Div. 2) ABC题解
摘要: A. Space Navigation 思路:分别统计往px和py方向的步数,看看能不能分别大于等于px和py。 view code #include<iostream> #include<string> #include<algorithm> #include<cstdio> #include<c
阅读全文
posted @ 2021-02-06 00:38 TL自动机
阅读(79)
评论(0)
推荐(0)
2021年2月1日
2021牛客寒假算法基础集训营1 ABFI 题解
摘要: A 题意:问你含有us子序列的,长度不大于n的串有多少(都是小写字母) 思路:其实每个位置可填放的字符就三种, u,s,和其他24个字符。 由于要求含有us子序列的串比较麻烦,正难则反,我们可以先求出不含有us的串有多少,再用总数减去即可。 \(用dp[i][0]表示这一位及其之前,都没有填放u的方
阅读全文
posted @ 2021-02-01 18:11 TL自动机
阅读(181)
评论(0)
推荐(0)
2021年1月26日
Codeforces Round #697 (Div. 3) ABCDE 题解
摘要: 久违的cf服务器爆炸场 A. Odd Divisor 思路:任何一个数都可以写成\(n = k2^m,其中k是一个奇数\),若k=1,那么n就一定是一个2的幂。 view code #include<iostream> #include<string> #include<algorithm> #in
阅读全文
posted @ 2021-01-26 11:22 TL自动机
阅读(284)
评论(0)
推荐(2)
2021年1月5日
Codeforces Round #693 (Div. 3) ABCDE题解
摘要: A. Cards for Friends 思路:折纸游戏,看长宽能各折多少次,就是2的几次方,相乘即可。 view code #include<iostream> #include<string> #include<algorithm> #include<cstdio> #include<cstri
阅读全文
posted @ 2021-01-05 00:54 TL自动机
阅读(103)
评论(0)
推荐(0)
2021年1月2日
AtCoder Beginner Contest 187 ABCDE 题解
摘要: A - Large Digits 思路:签到题,读入字符串即可。 view code #include<iostream> #include<string> #include<algorithm> #include<cstdio> #include<cstring> #include<cmath>
阅读全文
posted @ 2021-01-02 23:07 TL自动机
阅读(123)
评论(0)
推荐(0)
2020年12月16日
Codeforces Round #690 (Div. 3) ABCDE题解
摘要: A. Favorite Sequence 思路:照着模拟即可。 view code #include<iostream> #include<string> #include<algorithm> #include<cstdio> #include<cstring> #include<cmath> #
阅读全文
posted @ 2020-12-16 01:32 TL自动机
阅读(101)
评论(0)
推荐(0)
2020年12月9日
A - Ability Draft Gym - 102155A 状压DP
摘要: 传送门 题意:有两个队伍,每队有n个人,每个人可以有s个普通技能和一个特殊技能。现在可以按照顺序抽技能卡,问各自都在最优策略下双方队伍的技能总分最大差值。 思路:算是一道看着简单但思路形成比较麻烦的一题。 首先因为贪心有后效性,排除贪心,考虑dp。 发现特殊技能每个人只能有一次,所以想着通过将每个队
阅读全文
posted @ 2020-12-09 14:14 TL自动机
阅读(157)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告
//鼠标点击特效第二种(小烟花)