C++ :蓝桥杯算法训练VIP-提货单 ##C++结构体```c++#include#include#include#include#includeusingnamespacestd;structpurt{stringmc;doubledj;intsl;};intmain(){purts[200];intn;doublesum=0;cin> 题解列表 2023年06月24日 0 点赞 0 评论 669 浏览 评分:9.9
汽水题:较为标准的Python解法,参考了ChatGpt。 摘要:解题思路:注意事项:参考代码:def calculate_max_sodas(n): if n < 2: return 0 total_sodas = 0 remain…… 题解列表 2023年06月24日 0 点赞 0 评论 838 浏览 评分:9.9
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str1[201], str2[201]; scanf("%s%s…… 题解列表 2023年06月24日 0 点赞 0 评论 645 浏览 评分:9.9
台球碰撞(看题解自己敲啦一遍,题解写的真好【开心】) 摘要:解题思路:注意事项:acos(-1)=π,数学要学好啊!参考代码:#include#include#includeusing namespace std; int main() { int L,…… 题解列表 2023年06月25日 0 点赞 0 评论 609 浏览 评分:9.9
[编程入门]完数的判断 摘要:解题思路: 1、 //判断是否是完数 int isfullnum(int factor); 2、 //找出所有因数 int find_arr(int factor); 参考代码: #i…… 题解列表 2023年06月25日 0 点赞 0 评论 478 浏览 评分:9.9
利用二维数组实现蛇形矩阵 摘要:解题思路: 利用二维数组注意事项: 1.先将每行的第一个数字赋值 2.从每行的第二个数字开始,后一个数据为前一个数据加一个数,这个数是一个等差数列参考代码:#include int main() { …… 题解列表 2023年06月26日 0 点赞 0 评论 718 浏览 评分:9.9
查找最大元素(没用向量,简单写法,但是时间复杂度大) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include<string>using namespace std;int main(){ string s,s1; …… 题解列表 2023年06月27日 0 点赞 0 评论 646 浏览 评分:9.9
数组模拟计算,嘎嘎猛,思维难度低, 怎么模拟进位呢?比如有一个数组a[100],a[1]表示个位数上的数值,a[2]表示十位数的数值,以此类推。初始化数组中每个元素为0,再给a[1]赋值。假设a[1]=3,定义一个int型变量carry=0,a[1]*4=12,但是我们规定的是a[1]表示个位数的值,所以a[1]=2,即a[1]%10。 题解列表 2023年06月27日 0 点赞 1 评论 667 浏览 评分:9.9
数列排序(超时了,啊!!!) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int n; cin>>n;int a[n][9], b…… 题解列表 2023年06月28日 0 点赞 0 评论 736 浏览 评分:9.9
去掉双斜杠注释(时间复杂度大点) 摘要:解题思路:注意事项:if(s[j][0]=='/'&&s[j][1]=='/') continue;这个要注意啊,开头双斜杠不换行,要不是提交就是错。参考代码:#i…… 题解列表 2023年06月28日 0 点赞 0 评论 711 浏览 评分:9.9