题解 1070: 二级C语言-成绩归类 摘要:解题思路:循环判断输入的数据注意事项:发现有0或负数时跳出循环,结束输入注意包括0或负数以及之后的数据都不计入统计参考代码:li=li1=[]flg = 0while True: #循环控制输入 …… 题解列表 2022年03月29日 0 点赞 0 评论 843 浏览 评分:9.0
外卖店优先级(减少内存,优化时间)java ###注意事项同一时刻可能有多个店铺有订单,同一时刻同一店铺可能有多个订单###解题思路该题数据有点大,如果直接用HashMap,List等集合可能会超时,无疑数组是最快的我最开始的思路是建立一个二维数组,横坐标存时刻,纵坐标存每个店铺,值就是该时刻该店铺接到的订单数, 题解列表 2022年03月29日 0 点赞 1 评论 1083 浏览 评分:9.9
题解 1717: 数据结构-简单选择排序 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int min(int a[], int n, int i) //判断最小值是数组中的哪个数 { int j; …… 题解列表 2022年03月29日 0 点赞 0 评论 525 浏览 评分:0.0
python 编写题解 1484: 蓝桥杯算法提高VIP-Quadratic Equation 解题思路:注意事项:参考代码:frommathimportsqrta,b,c=map(float,input().split())A=sqrt(b**2-4*a*c)n=(-b+A)/(2*a)m=(-b-A)/(2*a)ifn>m:print("{:.2f}{:.2f}".format(n, 题解列表 2022年03月29日 0 点赞 0 评论 604 浏览 评分:9.9
多个无序数按从小到大排序(以10个数为例子) 解题思路:先读入这多个无序数将其放入数组里,然后for循环遍历数组求出来无序数中的最大的那一个max。接下来同样遍历求出来最小的值min,每次求出来一个数组的最小值就输出,之后标记这个最小值在数组中的位置然后将max+t(t初始值为1,每次运算之后t++)值赋给这个最小值。 题解列表 2022年03月29日 0 点赞 0 评论 708 浏览 评分:0.0
有手就行之排序问题 摘要:解题思路:冒泡排序注意事项:注意冒的泡泡参考代码:#include<stdio.h>int main(){ int a[4]; int i,j,t; for(i=0;i<4;i++)…… 题解列表 2022年03月29日 0 点赞 0 评论 830 浏览 评分:9.9
蓝桥杯算法提高VIP-选择排序(非递归100分) ```cpp#include#include#include#include#include#include#include#includeusingnamespacestd;intmain(){intn,a[100],mina=100,flag;cin>>n;for(inti=0;i 题解列表 2022年03月29日 0 点赞 0 评论 567 浏览 评分:0.0 python 编写题解 1483: 蓝桥杯算法提高VIP-数组替换 摘要:解题思路:注意事项:参考代码:def f(a, x, b, y): if y>=len(a)-x: a=a[:x]+b[:y] else: a=a[:x]+b[…… 题解列表 2022年03月29日 0 点赞 0 评论 592 浏览 评分:9.9 辗转相减法——最大公约数与最小公倍数 摘要:解题思路:辗转相减法注意事项:参考代码:m,n=map(int,input().split())product=m*nwhile m!=n: p=max(m,n) q=min(m,n) …… 题解列表 2022年03月29日 0 点赞 0 评论 845 浏览 评分:8.0 python 编写题解 1487: 蓝桥杯算法提高VIP-不同单词个数统计 摘要:解题思路:集合自动去重 &nb 题解列表 2022年03月29日 0 点赞 0 评论 701 浏览 评分:0.0 « 12...3616361736183619362036213622...59145915 »
python 编写题解 1483: 蓝桥杯算法提高VIP-数组替换 摘要:解题思路:注意事项:参考代码:def f(a, x, b, y): if y>=len(a)-x: a=a[:x]+b[:y] else: a=a[:x]+b[…… 题解列表 2022年03月29日 0 点赞 0 评论 592 浏览 评分:9.9
辗转相减法——最大公约数与最小公倍数 摘要:解题思路:辗转相减法注意事项:参考代码:m,n=map(int,input().split())product=m*nwhile m!=n: p=max(m,n) q=min(m,n) …… 题解列表 2022年03月29日 0 点赞 0 评论 845 浏览 评分:8.0