摘要:
https://leetcode-cn.com/problems/remove-sub-folders-from-the-filesystem/comments/ 愚蠢的做法,但是学了字典树。 class Solution { public: vector<string> ans; struct T 阅读全文
摘要:
https://leetcode-cn.com/problems/maximum-sum-bst-in-binary-tree/ ##题解 ###关键点: 1、判断是否二叉搜索树 2、是的话拿到键值和 判断二叉搜索树可以通过比较当前节点,当前节点左子树最大值和当前节点右子树最小值来实现;键值和可以在 阅读全文
摘要:
https://www.luogu.com.cn/problem/P2118 分析 枚举即可,因为。 #include <bits/stdc++.h> using namespace std; #define LL long long #define INF 0x3fffffff i 阅读全文
摘要:
https://www.luogu.com.cn/problem/P2239 分析 先剥掉层再做。特判时。 #include <bits/stdc++.h> using namespace std; #define LL long long int main() { int n, 阅读全文
摘要:
https://www.luogu.com.cn/problem/P2141 #include <bits/stdc++.h> using namespace std; #define LL long long int a[110]; int main() { int n,cnt=0; cin>>n 阅读全文
摘要:
https://www.luogu.com.cn/problem/P7911?contestId=54994 #include <bits/stdc++.h> using namespace std; #define LL long long #define P pair<string,int> s 阅读全文
摘要:
https://www.luogu.com.cn/problem/P7910?contestId=54994 分析 排序做成复杂度即可。 #include <bits/stdc++.h> using namespace std; #define LL long long struct s 阅读全文
摘要:
https://www.luogu.com.cn/problem/P7909?contestId=54994 分析 无。 #include <bits/stdc++.h> using namespace std; #define LL long long LL n,l,r; int main() { 阅读全文
摘要:
https://codeforces.com/contest/1593/problem/D2 分析 枚举选中的个数中最小的数,然后枚举大于其的数的所有因子,如果拥有某个因子的数的个数大于,则选中,求符合条件的最大的因子即可。 #include <bits/stdc++.h> us 阅读全文
摘要:
https://codeforces.com/contest/1593/problem/D1 分析 求最大公因子。 #include <bits/stdc++.h> using namespace std; #define LL long long int t,n,a[45],d[45]; int 阅读全文