题解列表

筛选

1938: 蓝桥杯算法提高VIP-道路和航路

摘要:解题思路:有负权的单源最短路径,使用spfa算法即可注意事项:不进行SLF优化会超时两个点参考代码:#include<bits/stdc++.h> using namespace std; str……

1184: 众数问题(基础)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){    int n;cin>>n;……

求分段函数的解

摘要:注意事项:1<=x<10的问题,好多新手都这样写,这在c里面是比较低级的错误,应该这样写   1<=x&&x<1参考代码:#include<stdio.h>int main(){    int x,y……

1182: 人民币问题(背下来)

摘要:解题思路:注意事项:参考代码:include<iostream>using namespace std;int main(){    int a,b,c,count=0;    int sum;   ……

蓝桥杯算法训练VIP-暗恋

摘要:解题思路:维护一个二维数组的前缀和数组,随后对其检测每一个正方形,若全为1则该正方形的和为其面积。若全为0,则正方形的和为0参考代码:#include<bits/stdc++.h> using na……

1179: 上车人数(有点意思)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    int a[100],b[100],c[100];//数组a上车……

用二维列表解决二维矩阵转置问题(python入门)

摘要:解题思路:1、利用列表推导创建法输入3x3矩阵;2、将3x3矩阵转置;3、遍历输出矩阵;注意事项:1、代码中使用了print函数来输出转置后的矩阵,需要确保输出格式符合预期,包括元素之间的分隔符和行与……

1175: 金明的预算方案

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    int n,m; cin>>n>>m;    int sum=1……

java--study||O.o

摘要:参考代码: import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; ……