1 #include <bits/stdc++.h> 2 3 using namespace std; 4 #define ENDL "\n" 5 typedef long long ll; 6 typedef pair<int, int> pii; 7 const int inf = 0x7fff ...
分类:
其他好文 时间:
2021-01-26 12:07:05
阅读次数:
0
A 9,98,989,9890...... #include <bits/stdc++.h> #define rep(i,j,k) for (int i = j; i <= k; i++) #define dow(i,j,k) for (int i = j; i >= k; i--) #define ...
分类:
其他好文 时间:
2021-01-22 12:10:17
阅读次数:
0
概述 模板出自kuangbin的博客 典型应用: 给你两个字符串,寻找其中一个字符串是否包含另一个字符串,如果包含,返回包含的起始位置。 (1) 头文件 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N = 1e5+10; ...
分类:
编程语言 时间:
2021-01-21 10:42:47
阅读次数:
0
字符串反转? def reverse(s): if s == "": return s else: print(s[1:]) return reverse(s[1:]) + s[0] def main(): num = "1234" print("num="+num) num = reverse(n ...
分类:
编程语言 时间:
2021-01-19 12:28:34
阅读次数:
0
D. Divide and Summarize 题意 给你n个数,q次询问,问你能否具有满足和为s的序列。 思路 再求其有多少种和时需要使用$mid = max + min >> 1$来寻找有多少种和。 然后dfs,但是需要判断一下左面或者右面全部相等情况,否则会爆栈 #include<bits/s ...
分类:
其他好文 时间:
2021-01-19 12:24:43
阅读次数:
0
最短路变形:用一条最小边替换一条最大边意义下的最短路 分层图,dis[i][0/1][0/1]表示点i,是否经过最小边,是否经过最大边 最小边两倍贡献,最大边0贡献 /* * Author : GhostCai * Expecto Patronum */ #include<bits/stdc++.h ...
分类:
其他好文 时间:
2021-01-19 11:43:34
阅读次数:
0
CF1461B Find the Spruce 题目大意: 求指定类型图案的数量。 思路: 一个很巧妙的递推式。 注意从下往上进行递推。 Code: #include <bits/stdc++.h> using namespace std; const int N = 510; int n, m; ...
分类:
其他好文 时间:
2021-01-19 11:39:58
阅读次数:
0
参考: https://oi-wiki.org/ds/li-chao-tree/ 例题: P4097 [HEOI2013]Segment #include<bits/stdc++.h> #define db double const int p=39989; using namespace std; ...
分类:
其他好文 时间:
2021-01-18 11:39:35
阅读次数:
0
支持条件:gdb7.0以上 // 常用语句 record btrace (缩写 record) // 启动gdb程序后需设置,否则无法开启反向调试 set exec-direction mode // 设置gdb执行方向,前向或反向 reverse-next // 反向执行一步,功能和next相反 ...
分类:
其他好文 时间:
2021-01-18 11:01:54
阅读次数:
0
Java常用类——StringBuffer和StringBuilder String、StringBuffer、StringBuilder对比 IDEA中Ctrl+Shift+T查看类定义 String:不可变 StringBuffer:可变,线程安全,效率低 StringBuilder:可变,线程 ...
分类:
编程语言 时间:
2021-01-18 10:39:05
阅读次数:
0