题解列表
1307: 表达式计算1
摘要:```cpp
#include
using namespace std;
const int N=10001;
int a[N],b[N];
char op,k;
bool key,mar……
蓝桥杯2023年第十四届省赛真题-砍树(树上差分)
摘要:
# 解题思路
对于每一对 $$(a_i , b_i)$$,$$a_i$$ 到$$b_i$$之间的边都可以砍掉;
把可以砍掉的边权值+1,那么这条边的权值$$w$$表示砍掉这条边可以满足$$w$……
简单又实用,看不懂请打死我
摘要:解题思路:用排序函数sort对输入的数据进行排序,使用降重函数unique对输入的数据进行降重并输出注意事项:使用sort和unique前添加头文件#include<algorithm>参考代码:#i……
编写题解 1130: C语言训练-数字母
摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstring>#include <algorithm>using namespace std;const in……
个人觉得这解法是非常简单解法
摘要:解题思路我觉得代码能看懂,x=a/b,想要求x的最小,则x=a/(b+1)+1即可,x=a/b已经是最大的了。注意事项:参考代码:#include<iostream>#include<algorith……
学会结构体数组,看不懂就评论
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct student{ int num; int a,b,c; int su……
2773: 计算线段长度(制作不易,给个好评)
摘要:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double xa,ya,xb,yb; cin>>xa>>ya>>……
2775: 等差数列末项计算
摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c; cin >>a>>b>>c; cout<……