tarjan + lca + 树上差分 摘要:# 思路 * 主要讲讲怎么在边上树上差分吧 具体的思路就是,将要查询`diff[u] +=1,diff[v] += 1, diff[lca]-=2`,然后 * 状态一  { …… 题解列表 2023年04月19日 0 点赞 0 评论 422 浏览 评分:9.9
1670: 拆分位数 摘要:解题思路:wu注意事项:wu参考代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; cout<<n…… 题解列表 2023年04月19日 0 点赞 0 评论 225 浏览 评分:9.9
给用Java的开拓一下荒土 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[] a…… 题解列表 2023年04月19日 0 点赞 0 评论 259 浏览 评分:9.9
题目 1051: [编程入门]结构体之成绩统计2 摘要: #include #include struct student { //定义学生结构体,包含学号、姓名、三科成绩 char id[20]…… 题解列表 2023年04月19日 0 点赞 0 评论 257 浏览 评分:9.9
给用Java的开一下荒土 摘要:解题思路:药品不够的话给下一个人注意事项:参考代码:import java.util.Scanner; public class Main { public static void main…… 题解列表 2023年04月19日 0 点赞 0 评论 285 浏览 评分:6.0
水仙花数问题2 摘要:解题思路:注意事项:参考代码:for n in range(100,1000): a=n%10 #个位 b=int(n/10)%10 #十位 int()强转:强转成整数 c…… 题解列表 2023年04月19日 1 点赞 0 评论 273 浏览 评分:9.9
tarjan算法求lca 摘要:# 代码 ```cpp #include #include #include #include #include #include #include #include …… 题解列表 2023年04月19日 0 点赞 0 评论 830 浏览 评分:4.7
Tom数的题解 为什么老说我标题短 摘要:解题思路:字符串注意事项:无参考代码:#include <iostream>#include<string.h>using namespace std;int main(){ int sum =…… 题解列表 2023年04月19日 0 点赞 0 评论 308 浏览 评分:9.9
1044:三个字符串的排序 摘要:1. 用一个二维数组存储3个字符串 2. 用一个字符指针数组分别存储3个字符串的地址 3. 采取选择排序法和`strcmp()`库函数进行具体的比较和排序 4. 对具体的参数可以采用宏定义以实…… 题解列表 2023年04月19日 0 点赞 1 评论 220 浏览 评分:9.9