摘要: 时间:2024-07-27 C. Sort 原题:C. Sort 标签:前缀和 题意 给定字符串a,b 定义 \(sorted(a[l..r])\) 表示将a的lr区间排序为有序 有q次询问,每次给出区间l,r,要求通过操作使\(sorted(a[l..r])==sorted(b[l..r])\) 阅读全文
posted @ 2024-07-27 20:25 lulaalu 阅读(43) 评论(0) 推荐(1) 编辑
摘要: 2024牛客暑期多校训练营2 H Instructions Substring 时间:2024-07-18 原题:Instructions Substring 标签:前缀和、map 题意 初始在\((0,0)\)处,给一串操作,给目标位置,要求有多少操作能经过当前位置 也就是说在到达目标位置后的所有 阅读全文
posted @ 2024-07-23 10:07 lulaalu 阅读(19) 评论(0) 推荐(0) 编辑
摘要: E2. String Coloring (hard version) 时间:2024-07-09 原题:Codeforces Round 617 (Div. 3) E2. String Coloring (hard version) 题意 给一串小写字母组成的字符串,要求上色,只有颜色不同的相邻字母 阅读全文
posted @ 2024-07-09 09:49 lulaalu 阅读(2) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<vector> #include<algorithm> #include<cmath> #include<cstring> #include<fstream> #include<iomanip> #includ 阅读全文
posted @ 2024-07-08 10:16 lulaalu 阅读(3) 评论(0) 推荐(0) 编辑
摘要: A. Row 时间:2024-07-08 原题:Codeforces Round 484 (Div. 2) A. Row 题意 给一串字符串有01组成,1边上不能有1,0边上不能没有1,如果满足输出yes 思路 就,一个一个遍历过来,写这题主要因为需要看清题目,注意如果只有一个“0”需要输出no,因 阅读全文
posted @ 2024-07-08 10:13 lulaalu 阅读(1) 评论(0) 推荐(0) 编辑
摘要: B. Sum of Two Numbers 时间:2024-07-06 原题:Codeforces Round 851 (Div. 2)B. Sum of Two Numbers 题意 一个数字 \(n\) ,将其分解为两个数字 \(x\) 和 \(y\) ,要求: \(x+y=n\) \(dig( 阅读全文
posted @ 2024-07-06 18:42 lulaalu 阅读(1) 评论(0) 推荐(0) 编辑
摘要: C. Canine poetry 时间:2024-07-05 原题:Good Bye 2020 C. Canine poetry 题意 对于一个字符串 \(s\) ,可以对任一字符变为 \(*\) 号,使所有子串不为回文串,即可将 \(babba\) 变为 \(ba*ba\) 使字符串内不存在回文串 阅读全文
posted @ 2024-07-05 23:14 lulaalu 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 时间: 24_05_30 原题:Codeforces Round 947 (Div. 1 + Div. 2) 标签: 二分/数据结构/[[DFS]]/[[模拟]]/[[树形结构]] 题目大意 有 \(n\) 个顶点的树,初始时每个节点都是白色 树上有两个棋子,为\(P_A\) 和 \(P_B\) , 阅读全文
posted @ 2024-05-30 22:07 lulaalu 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 时间: 24_05_29 原题:Codeforces Round 948 (Div. 2) 标签: 暴力枚举/数据结构/[[数学]] 题目大意 有长度为n的数组a,求a中最长子序列的长度,子序列要满足 \(lcm(subArray(a)) \notin a\) \(1 \le n \le 2000\ 阅读全文
posted @ 2024-05-29 11:54 lulaalu 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 时间: 2024_05_21 原题:Codeforces Round 946 标签: 组合[[数学]]/数据结构 题目大意 一个数组 \(a\) 。对于每个 \(j\) ( \(1 \le j \le n - 2\) ) 写出一个由 \([a_j, a_{j + 1}, a_{j + 2}]\) 组 阅读全文
posted @ 2024-05-21 17:57 lulaalu 阅读(155) 评论(0) 推荐(1) 编辑