本文分类:news发布日期:2026/3/15 20:11:06
打赏

相关文章

ICPC2025四川省赛题解

质量很高的一场省赛。 比赛链接。 没有代码的题是队友写的。 I Essentially Different Suffixes 字典树板子题。 把每个串的所有后缀加入字典树,答案就是字典树的边数。 时间复杂度 \(O(\sum S_i)\)。 F Inversion Pa…

1022: 淘金

#include <bits/stdc++.h> using namespace std; const int N= 205; int w[N][N]; int dp[N][2]; int n,m; int main(){while(scanf("%d%d",&n,&m)!=EOF){memset(w,0,sizeof(w));for(int i=1…

701. 二叉搜索树中的插入操作-day18

由于二叉搜索树的中序遍历序列是单调递增的,因此二叉搜素树的中序遍历序列中的相同结点值一定相邻。只要得到二叉搜索树的中序遍历序列,即可得到每个结点值的出现次数,并得到众数。 使用递归实现中序遍历的做法是依…

java6

面向对象补充 静态代码块 public class Person {//2{System.out.println("匿名代码块");}//1 only onestatic {System.out.println("静态代码块");}//3public Person() {System.out.println("…

1023: 巨人排队

使用了set set具有互异性,multiset没有 set和ordered_map都是使用erase和insert,find删插查。 使用clear清空 #include <bits/stdc++.h> using namespace std; typedef long long ll; int n; multiset<ll>…

L2-024 部落(简单的并查集)

传送门 本题是单纯的并查集(加个排序应该不算加吧),很简单 #include<iostream> #include<vector> #include<algorithm> using namespace std; int f[10010]; vector<int> wait[10010]; vecto…

手机版浏览

扫一扫体验

微信公众账号

微信扫一扫加关注

返回
顶部