结构体、动态处理、qsort()函数的综合运用(C语言) 摘要:解题思路:结构体的运用将数字和其出现次数捆绑起来。动态处理的思想有效节省时间和空间。qsort()函数的调用简化排序部分的代码注意事项:参考代码:#include<stdio.h> typedef …… 题解列表 2024年07月11日 0 点赞 0 评论 211 浏览 评分:9.9
用VS来写结构体数组并排序 摘要:解题思路:注意事项:参考代码:#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <malloc.h>struct _node{ int…… 题解列表 2024年07月11日 0 点赞 0 评论 236 浏览 评分:0.0
2950: 素数回文数的个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll prime (ll x){ …… 题解列表 2024年07月11日 0 点赞 0 评论 119 浏览 评分:0.0
1178三进制小数 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int fenzi; int fenmu; double sum; w…… 题解列表 2024年07月11日 0 点赞 0 评论 288 浏览 评分:0.0
1177三角形(经典的树塔问题) 摘要:解题思路:从下往上寻找最大值,可以说是递推的入门题注意事项:参考代码:#include<iostream>using namespace std;int main(){ int T; cin >> T…… 题解列表 2024年07月11日 0 点赞 0 评论 168 浏览 评分:0.0
1175金明的预算方案(dp动态规划,一维数组) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define MAX 10100int N, m;int dp[MAX];int arr[…… 题解列表 2024年07月11日 0 点赞 0 评论 125 浏览 评分:0.0
用VS来写链表求和 摘要:解题思路:注意事项:参考代码:#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <malloc.h>typedef struct _n…… 题解列表 2024年07月11日 0 点赞 0 评论 125 浏览 评分:0.0
1170能量项链(dp动态规划) 摘要:解题思路:看到最大值,就想到最优解,想到最优解就想到动态规划。将大问题分成一个个小问题来看。先求两个球能得到的能量,再求三个球时,四个球时,第一步,要得到两个球的能量,我们就需要三个数,这是第一层循环…… 题解列表 2024年07月11日 0 点赞 0 评论 359 浏览 评分:0.0
对方干净利落的特点 摘要:解题思路:无注意事项:无参考代码:print("**************************")print("Hello World!")print("********************…… 题解列表 2024年07月11日 2 点赞 0 评论 621 浏览 评分:9.9
1172计算两点间的距离(sqrt和pow综合运用) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ double x1, y1, x2, y…… 题解列表 2024年07月11日 0 点赞 0 评论 242 浏览 评分:0.0