题解列表

筛选

假设一个数为最大值

解题思路:假设a是最大值,然后if判断b大于最大值的话,那b就是最大值了,反之如果c大于最大值,那c就是最大的数注意事项:参考代码:value=input()lst=value.split()a,b,c=int(lst[0]),int(lst[1]),

密码破译 [编程入门]密码破译

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){    char s[11];                             //定义一个长度为10的……

八进制输出

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

计算素数之和

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

蓝桥杯2022年第十三届省赛真题-统计子矩阵(一维前缀和加双指针)

首先对于这道题一维和二维的前缀和都可以解,那我们此处讲一下一维+双指针和普通没有优化的暴力二维,有兴趣的同学可以去尝试用二维前缀+二分法求一下这个题第一种解法:暴力二维前缀和(只能拿80分)因为我们用的暴力解,所以想法很简单把每个位置的前缀和都求出来然后一层一层的for循环就可以了,

输出图案,C++

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

C语言格式输出

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    double a;    scanf("%lf",&a);    printf("%f\n",a);   ……