会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
liukejie
Welcome to my blog
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
下一页
2023年7月3日
搜狗双拼
摘要:  
阅读全文
posted @ 2023-07-03 22:02 liukejie
阅读(150)
评论(0)
推荐(0)
2023年7月1日
比较实用的语法糖
摘要: # [《从 C++98 到 C++20,寻觅甜甜的语法糖们》](https://www.luogu.com.cn/blog/AccRobin/grammar-candies#) # 这篇文章对《从 C++98 到 C++20,寻觅甜甜的语法糖们》稍有改动 - find(bg,ed,val) - 返回
阅读全文
posted @ 2023-07-01 11:28 liukejie
阅读(151)
评论(0)
推荐(1)
2048 系列之普通版
摘要: # $ 自编 2048 小游戏$ ```cpp //2048小游戏原创 #include #include #include #pragma GCC optimize(2) #pragma GCC optimize(3) inline int max1 (int x, int y) { return
阅读全文
posted @ 2023-07-01 11:25 liukejie
阅读(39)
评论(0)
推荐(0)
2048 系列之朝代版
摘要: # $ 自编 2048 朝代版 $ ```cpp #include #include #include #pragma GCC optimize(2) #pragma GCC optimize(3) void chaodai (int n) { if (n == 2) printf ("商") ;
阅读全文
posted @ 2023-07-01 11:25 liukejie
阅读(27)
评论(0)
推荐(0)
AT4160 [ARC099A] Minimization 题解
摘要: ### [题目传送门](https://www.luogu.com.cn/problem/AT4160) ### 思路 对于这道题,读入的 $a$ 数组最终肯定会变成 $1$。 $\because$ 读入的是 $1 \sim n$,最小值是 $1$。 $\therefore$ $a$ 数组最终肯定会
阅读全文
posted @ 2023-07-01 11:23 liukejie
阅读(15)
评论(0)
推荐(0)
AT3732 [ARC088B] Wide Flip题解
摘要: ### [题目传送门](https://www.luogu.com.cn/problem/AT3732) ### 思路 $\because$ 要求的是 $k$ 的最大长度, $\therefore$ 无需考虑翻转次数。 对于第 $i$ 个字符来说,假设它不等于前 $i - 1$ 个字符,前 $i -
阅读全文
posted @ 2023-07-01 11:22 liukejie
阅读(13)
评论(0)
推荐(0)
AT2299 [ARC068B] Card Eater 题解
摘要: ### [题目传送门](https://www.luogu.com.cn/problem/AT2299) ___ ### 思路 这道题我们可以开一个桶, 统计一共有多少个不同的数。 如果个数是偶数的话, 最后的答案要 $-1$。 比如样例 ```cpp 5 1 2 1 3 7 ``` 不同的数有 $
阅读全文
posted @ 2023-07-01 11:21 liukejie
阅读(12)
评论(0)
推荐(0)
AT3882 [ARC090B] People on a Line 题解
摘要: ### [题目传送门](https://www.luogu.com.cn/problem/solution/AT3882) ___ ### 思路 这道题很简单,就是纯 Dfs。 先建图,表示 $l$ 在 $r$ 的左边,距离为 $d$,$r$ 在 $l$ 的右边,距离为 $-d$。 再开一个 $f$
阅读全文
posted @ 2023-07-01 11:21 liukejie
阅读(15)
评论(0)
推荐(0)
AT4733 [ABC132E] Hopscotch Addict 题解
摘要: ### [题目传送门](https://www.luogu.com.cn/problem/AT4733) ___ ### 思路 分层图跑最短路。 ___ $∵$ 题目中说每次只能走 $3$ 步, $∴$ 我们可以把一条边拆成三条边, 拆成 $1$ 到 $2$,$2$ 到 $3$,$3$ 到 $2$
阅读全文
posted @ 2023-07-01 11:20 liukejie
阅读(25)
评论(0)
推荐(0)
AT4848 [ABC138D] Ki 题解
摘要: ### [题目传送门](https://www.luogu.com.cn/problem/AT4848) ___ ### 思路 这道题,如果一边输入一边 Dfs,肯定会超时的。 那么,我们注意到题目中说的一句话: **每次操作将 $p_i$ 的子树中所有点的计数器增加 $x_i$。** 那么可以离线
阅读全文
posted @ 2023-07-01 11:16 liukejie
阅读(36)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
下一页
公告