上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: https://www.luogu.com.cn/problem/P5675 #include <bits/stdc++.h> using namespace std; #define int long long const int mod = 1e9 + 7; int n, a[205], dp[ 阅读全文
posted @ 2020-03-24 11:12 Hazelxcf 阅读(199) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P4101 这个题自己做了一波,做的很心烦,最后也没解出来 百度了一下大佬的, 当n <= m时,合并的次数就是n - 1 当n > m时,合并之后的结果是 n / m个m; 剩下一堆时n % m个 这个时候需要的次数时 (n / m 阅读全文
posted @ 2020-03-24 08:29 Hazelxcf 阅读(168) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1848 模拟sg #include <bits/stdc++.h>using namespace std;const int maxn = 1005;int n,m,p;int f[maxn],vis[maxn], 阅读全文
posted @ 2020-03-22 20:41 Hazelxcf 阅读(149) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P2444 直接AC自动机即可。建完后,跑一边AC机,看一下能不能跑出一个不经过病毒,并且循环的字符串。 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 const int 阅读全文
posted @ 2020-03-20 20:32 Hazelxcf 阅读(171) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/13 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 #define int long long 5 const int maxn = 1e5 + 5; 6 int n; 7 i 阅读全文
posted @ 2020-03-19 17:05 Hazelxcf 阅读(197) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1324 题意: t组样例每组一个字符串 只有L,R组成 字符串从1到n青蛙从0开始,能到n + 1 的最大的d 如果是L,往左 ;如果是 R, 往右;保证青蛙从0走到最右面 逆向思维,加入一个点R,求相邻两个R之间距离的最大值 #inc 阅读全文
posted @ 2020-03-15 10:58 Hazelxcf 阅读(179) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/4370 B题 判断是不是前缀编码T组样例,N个字符串,判断有没有一个是另一个的前缀 Trie 标记这个节点的编号是否出现过两次 注意,一定要有ed,比如说第二组测试样例,如果没有ed,5,59此时5已经走过了 #include 阅读全文
posted @ 2020-03-13 14:16 Hazelxcf 阅读(635) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/123 A Anagram 不得不说,还是不喜欢英文的题面 题意:由a到b变化次数最少是多少 先排序,如果一样,说明是0 不一样,根据规则 a <= b, b - a; 否则 a先变道Z 再到b; 此时 我们可以想想一个圆,变化 阅读全文
posted @ 2020-03-12 22:46 Hazelxcf 阅读(242) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/problem/15167 二分 题意:先给b,再分给a,不符合就是no 二分就行了 #include <bits/stdc++.h> using namespace std; #define int long long const int m 阅读全文
posted @ 2020-03-11 16:48 Hazelxcf 阅读(128) 评论(0) 推荐(0) 编辑
摘要: https://www.bilibili.com/video/av90385531?from=search&seid=11790479184604279961 阅读全文
posted @ 2020-03-10 20:44 Hazelxcf 阅读(77) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页