蓝桥杯2023年第十四届省赛真题-子矩阵-二维滑动窗口+单调队列 摘要:先用滑动窗口求行的最大值,再对列求最大值,最后相乘求和取模即可from collections import deque def maxWindows(num,size): #求滑动窗口最大值 …… 题解列表 2023年05月06日 0 点赞 3 评论 1912 浏览 评分:6.0
1027题:自定义函数处理最大公约数与最小公倍数 #自己写的代码自己没有写出来,主要对于主函数调用无从下手#参考代码1```c#includeintmain(void){inta,b,c=1,j;//余数事先赋值为1scanf("%d%d",&a,&b);j=a*b;//先保留两个数的积/*---------把a变为大的数, 题解列表 2023年05月06日 0 点赞 0 评论 478 浏览 评分:0.0
1028题: 自定义函数求一元二次方程 #自己写的代码这道题不会,还是涉及主函数调用,另外关于二次函数的求解也不会用表达式表示#参考代码1```c#include#includeDAYL(floata,floatb,floatc)//根的判别式大于零{floatdelta,x1,x2;delta=b*b-4*a*c;x1=(-b+sqrt( 题解列表 2023年05月06日 0 点赞 0 评论 577 浏览 评分:0.0
1029题 : 自定义函数处理素数 摘要:# 自己写的代码 ```c #include int main() { int SuShu_Panduan(); int N,i=2; scanf("%d",&…… 题解列表 2023年05月06日 0 点赞 0 评论 489 浏览 评分:0.0
2233: 蓝桥杯算法训练-图形显示(c++代码) 摘要:解题思路:通过倒序循环来完成“*”和“ ”的输出;注意事项:空格和换行不要忘了哦参考代码:#include<iostream>using namespace std;int main(){ in…… 题解列表 2023年05月06日 0 点赞 0 评论 481 浏览 评分:9.9
1319: 没有上司的晚会 ```cpp#include#includeusingnamespacestd;constintmaxn=6001;intn,dp[maxn][2],hap[maxn];boolno_head[maxn];vectordown[maxn];intdfs(intnow, 题解列表 2023年05月06日 0 点赞 0 评论 642 浏览 评分:9.9
033: [编程入门]自定义函数之字符提取 ```c#include#includeusingnamespacestd;intmain(){stringstr;getline(cin,str);//输入字符串stringvowels;//元音字母for(charc:str){if(c=='a'||c=='e'||c=='i'||c=='o'|| 题解列表 2023年05月06日 0 点赞 0 评论 465 浏览 评分:0.0
编写题解 1169: 绝对值排序 ```c++#include#include#includeusingnamespacestd;intmain(){intnums[100]={0};intn,i;while(cin>>n,n){for(i=0;i>nums[i];}for(inti=0;i 题解列表 2023年05月06日 0 点赞 0 评论 460 浏览 评分:0.0
求圆的面积浅答 解题思路:先要有一个浮点型的半径r,当然还要知道圆的面积公式:半径的平方乘以PI,PI为3.1415926注意事项:这道题不能使用3.14的原因,按照样例来看应该是进行四舍五入了的;如果使用了3.14,输入2的话,输出就是12.56了scanf语句中, 题解列表 2023年05月07日 0 点赞 0 评论 777 浏览 评分:9.9
5行代码搞定 摘要:解题思路:直接使用内置函数max()来判断大小注意事项:使用format()的时候注意前面要加上{}参考代码:def Max_num(a,b,c): for i in range(1,3):…… 题解列表 2023年05月07日 0 点赞 0 评论 524 浏览 评分:0.0