04 2022 档案

摘要:题目大意:给你N个字符串,你可以从中选择任意数量的字符串,请统计在你的字串中,相同字母出现次数正好为K次的字母数。数据保证出现的字母都是小写字母。 1≤N≤15 1 ≤K≤N 一开始读题的时候读错了,读成了至少为k次,就想的暴力选择全部字符串,然后统计字母数,但是在认真读题WA了N发后发现是恰好为K 阅读全文
posted @ 2022-04-30 11:22 empty_y 阅读(162) 评论(0) 推荐(0) 编辑
摘要:小豆现在有一个数 x,初始值为 1。小豆有 QQ 次操作,操作有两种类型: 1 m:将 x变为 x × m,并输出 x mod M 2 pos:将 x 变为 x 除以第 pos次操作所乘的数(保证第 pos 次操作一定为类型 1,对于每一个类型 1 的操作至多会被除一次),并输出 x mod M。 阅读全文
posted @ 2022-04-29 01:46 empty_y 阅读(44) 评论(0) 推荐(0) 编辑
摘要:给定长度为N的数列A,以及M条指令,指令为一下两种之一: 1. C L R d 表示把A[L],A[L+1].....A[R]都加上d 2. Q L R 表示查询 A[L]......A[R]的最大公约数 对于每个询问输出一个答案; 这个题算是经典的线段树的问题了,因为:区间修改+区间查询 这道题好 阅读全文
posted @ 2022-04-24 15:09 empty_y 阅读(83) 评论(0) 推荐(0) 编辑
摘要:1 # include<iostream> 2 # include<cstring> 3 # include<algorithm> 4 using namespace std; 5 const int N = 110; 6 7 int e[N], ne[N], idx; 8 int h[N]; 9 阅读全文
posted @ 2022-04-13 00:07 empty_y 阅读(38) 评论(0) 推荐(0) 编辑
摘要:1 # include<iostream> 2 # include<cstring> 3 using namespace std; 4 const int N = 55; 5 int ne[N]; 6 7 char s[N],T[N]; 8 /*s为字串,T为主串*/ 9 int main(){ 1 阅读全文
posted @ 2022-04-12 10:07 empty_y 阅读(33) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round #781 C. Tree Infection time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A 阅读全文
posted @ 2022-04-09 11:17 empty_y 阅读(157) 评论(0) 推荐(1) 编辑
摘要:1 # include<stdio.h> 2 # include<string.h> 3 # include<malloc.h> 4 # include<stdlib.h> 5 6 int peopleid = 20220200;/*最初的管理员编号*/ 7 int bookid = 0200200 阅读全文
posted @ 2022-04-04 13:59 empty_y 阅读(506) 评论(0) 推荐(0) 编辑
摘要:菜鸡第一次打icpc 记录一下历程 习惯#define int long long 以下皆是按照我认为的难易顺序排序 K. 看题意大概就是说求从L加到R 1 ios::sync_with_stdio(false); 2 cin.tie(nullptr); 3 cout.tie(nullptr); 4 阅读全文
posted @ 2022-04-04 12:37 empty_y 阅读(80) 评论(0) 推荐(0) 编辑
摘要:1 # include<iostream> 2 # include<stdio.h> 3 # include<algorithm> 4 # include<string> 5 using namespace std; 6 /*建树的过程和二叉树大差不差*/ 7 const int N = 10001 阅读全文
posted @ 2022-04-04 11:57 empty_y 阅读(27) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示