菜出声
菜出声
全部文章
分类
dfs(3)
kmp(1)
STL(3)
二分(1)
同余逆元(1)
图论(1)
字符串(2)
数据结构(6)
模拟(3)
签到题(2)
训练赛(4)
贪心(1)
归档
标签
去牛客网
登录
/
注册
欢迎大佬
全部文章
(共28篇)
hdu 6576--Worker
题目链接 题意比较容易理解,不解释了。 会的两种解法 (1)找所有工厂效率的最小公倍数,再以最小公倍数除以时间的和作为最少人数,看m是否为最小人数整数倍即可 代码如下: #include<stdio.h> #include<algorithm> #include&...
2019-11-16
0
468
RGB Substring (easy version)
题目传送门 分析:数据的范围较小,可直接遍历整个母串,记录下每次的最小值,选出最小值即可 代码如下,比较容易看懂 #include<cstdio> #include<algorithm> #include<cstring> #include<stri...
暴力
2019-11-15
0
492
wave hdu-6570
题目链接 题解链接 #include<cstdio> #include<algorithm> #include<cstring> #include<map> #include<vector> using namespace st...
2019-11-12
0
516
训练赛一
训练链接 D. 分析:按照题意是求两交替且各自相同的子序列,用vector存每个数出现的不同位置,两个for循环遍历,每次取出i,j,now用于定位当前交替进行位置,x1,x2分别定位i,j,位置。 #include<cstdio> #include<algorith...
2019-11-12
0
434
kmp+kmp改+bf
#include<stdio.h> #include<string.h> using namespace std; const int maxn=100; int next[maxn]; int next2[maxn];//改进kmp char a[maxn]; ...
2019-11-12
0
494
kmp
#include<stdio.h> #include<string.h> using namespace std; int next[100]; char a[100]; char b[100]; int la; int lb; void abc() { int i=0,j...
2019-11-05
0
384
数据结构——BF
#include<stdio.h> #include<string.h> using namespace std; const int maxn=1e5+10; int la; int lb; int ant=0; char a[maxn]; char b[maxn]; in...
2019-11-05
0
459
数据结构——舞者匹配
#include<stdio.h> #include<string.h> using namespace std; #define maxsize 100 #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef in...
2019-11-05
0
479
dfs重温
题目传送门 感觉这是一道比较简单的dfs的题,我之前是直接遍历的但是超时了。 还是重新写一下,温习一下。 #include<stdio.h> #include<algorithm> #include<cstring> #include<string.h&g...
2019-11-04
0
458
大数加,减,乘,除
acwing 791 792 793 794 大数加法 #include<stdio.h> #include<string.h> #include<algorithm> #include<cstring> using namespace std; c...
2019-10-26
0
505
首页
上一页
1
2
3
下一页
末页