拿捏,已知元素从小到大排列的两个数组x[]和y[],请写出一个程序算出两个数组彼此之间差的绝对值中最小的一个,这叫做数组的距离 摘要:解题思路:输入,迭代器迭代,做差,比较,赋值,输出注意事项:调试信息屏蔽掉参考代码:#include <iostream> #include <vector> #include <cmath> …… 题解列表 2024年08月19日 0 点赞 0 评论 343 浏览 评分:0.0
我们就要设置一个安全的密码,安全密码的检验,easy 摘要:解题思路:yixie c++的字符串基本操作注意事项:bool arr[4] = {true};只会将第一个元素设置为true;参考代码:#include <iostream> #include <…… 题解列表 2024年08月19日 0 点赞 0 评论 173 浏览 评分:0.0
蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:注意事项:参考代码:void check(int i,int flag,int* pc){ if (i > 0) { if (flag == 0 && (i % 10) % 2 == 1)…… 题解列表 2024年08月19日 0 点赞 0 评论 1066 浏览 评分:0.0
数据结构-双向循环链表(c语言纯享版) 摘要:```c #include #include typedef struct node { int date; // 节点存储的数据 struct …… 题解列表 2024年08月21日 0 点赞 0 评论 309 浏览 评分:0.0
1100: 采药(背包问题) 摘要:核心:0-1背包问题,设置二维数组dp[i][j], dp[i][j] = max(dp[i-1][j], dp[i-1][j-wi]+vi)代码:T, M = map(int, input().sp…… 题解列表 2024年08月21日 1 点赞 0 评论 376 浏览 评分:0.0
(c语言代码)暴力解法 摘要:```c #include #include #define MAX 101 int bf(char *num, char *num1) { int i = 0, j = 0; …… 题解列表 2024年08月21日 0 点赞 0 评论 319 浏览 评分:0.0
1177: 三角形(动态规划) 摘要:核心:利用动态规划的思想,从下向上求解最大路径和代码:"""动态规划""" T = int(input()) for i in range(T): n = int(input()) …… 题解列表 2024年08月21日 0 点赞 0 评论 171 浏览 评分:0.0
不用判断是否为奇数也能做(c语言代码) 摘要:```c #include int main(){ int n,sum=0; scanf("%d",&n); for(int i=1;i…… 题解列表 2024年08月21日 0 点赞 0 评论 124 浏览 评分:0.0
c语言代码题解 摘要:```c #include int main() { int n; scanf("%d", &n); while (n != 1) {// 当n不等于1时,继续…… 题解列表 2024年08月21日 0 点赞 0 评论 179 浏览 评分:0.0
题解(C语言) 摘要:这道题注意一个点即可,就是就算1/i的时候,那个1要写成1.0,因为计算浮点数,如果写成1就是当成整数去计算了 ```c #include double fun(int n){ do…… 题解列表 2024年08月21日 0 点赞 0 评论 96 浏览 评分:0.0