首页 > while
头像 Leavery
发表于 2025-04-28 14:32:08
补完题 发一下个人题解 A 模拟 #include <iostream> using namespace std; int main() { string s, t = "while"; cin>>s; int cnt = 0; for (int i=0; 展开全文
头像 可爱抱抱呀😥
发表于 2025-04-28 22:33:39
D~F Java题解,代码已去除冗余~~~ D 数组4.0 容易观察到,连续至少两种数字的集合,点与点之间可以相互到达,因为可以利用相邻的数字作为桥;连续一种数字,则需要组内数字连边至少成树;;而以上的组之间需要至少连边成树,时间复杂度(Tnlogn) import java.util.*; pub 展开全文
头像 潘昊ph
发表于 2025-05-01 04:04:29
#include <bits/stdc++.h> using namespace std; const int maxn = 2e5 + 5; vector a; vector pre; unordered_map<int, int> me; int root(int x) 展开全文
头像 潘昊ph
发表于 2025-05-01 04:06:01
#include <bits/stdc++.h> using namespace std; const int maxn = 2e5 + 5; vector<int> a; v 展开全文

等你来战

查看全部