题解列表

筛选

2685: 蓝桥杯2022年第十三届省赛真题-蜂巢

摘要:解题思路:建立新的坐标系,转换坐标,判断距离图中坐标只是表示每个六边形的相对位置,不要理解成几何中心的平面坐标!注意事项:关键在于如何建一个坐标系使得方便判断距离参考代码:d1,p1,q1,d2,p2……

蓝桥杯2023年第十四届省赛真题-平均

摘要:解题思路:对于每个数的权重都存在一个数组中,数组从小到大排序,取前k个多余的最小权重的位置进行替换即可,用空间换时间注意事项:数组内有零值,需要遍历找到非0值参考代码:import java.io.B……

tarjan算法求lca

摘要:# 代码 ```cpp #include #include #include #include #include #include #include #include ……

自然数的拆分DFS

摘要:```cpp #include using namespace std; int n,d[9999999]; void dfs(int x,int c) //x表示的是已经找出……

python 知识点:字符统计 简单易懂

摘要:解题思路:学习python第一天注意事项: python的在线编译器用不了参考代码:# 字符串的统计 str.count('字符串') 输出为int类型的个数str=input()a0……

2758: 打印ASCII码

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    char a ;    cin>>a ;    co……

鸡你太美:坤坤三角

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long a[1005][1005];int main(){    in……

牛吃牧草(六年级天天写)

摘要:解题思路:小学题目 你不能不会吧注意事项:参考代码:#include<iostream> using namespace std; int main() {     int n;     c……

1332: 津津的储蓄计划

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[12];//每个月的预算 int i; for(i=0;i<12;i++)  { scanf("%……

函数求整数平均值

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int ave(int a[],int n){ int sum=0; for(int……