三角形 简单dp练习 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n和t,分别表示测试用例的数…… 题解列表 2024年12月14日 3 点赞 0 评论 658 浏览 评分:10.0
特别基础,用了结构体和选择排序, 摘要:解题思路:首先定义结构体,然后比较分数大小,遇到分数相同的,再比较字符串大小因为是选择排序,每次循环,都可以得到一个在最前面的下标,依次进行即可。注意事项:参考代码:#include <stdio.h…… 题解列表 2024年12月14日 1 点赞 0 评论 518 浏览 评分:10.0
3052: 最大上升子序列和 dp做法简单秒懂 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n和数组a、dp,其中a存储…… 题解列表 2024年12月14日 1 点赞 0 评论 273 浏览 评分:10.0
纯新手for循环 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[10]; for(int i=0;i<10;i++){ scanf("%d",&a[i]); }…… 题解列表 2024年12月15日 4 点赞 0 评论 876 浏览 评分:10.0
使用函数易理解 摘要:解题思路:注意事项:由题可知大写变小写,加32即可,在注意下字符数组的输入输出参考代码:#include <stdio.h>#include <string.h>void fun(char a[]){…… 题解列表 2024年12月15日 3 点赞 2 评论 745 浏览 评分:10.0
运用if和else语句实现输出三个数的最大值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,max; scanf("%d %d %d",&a,&b,&c); max=…… 题解列表 2024年12月15日 9 点赞 0 评论 1728 浏览 评分:10.0
超级简单,用了循环和字符串函数, 摘要:解题思路:只要不是空格,就直接加,不用考虑字符是字母还是数字。注意事项:使用标记变量处理逗号问题。参考代码:#include <stdio.h>#include <string.h>int main(…… 题解列表 2024年12月15日 1 点赞 0 评论 407 浏览 评分:10.0
c语言 30306:树的存储 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#define MAX_N 10000// 邻接表节点结构体typedef struct Nod…… 题解列表 2024年12月15日 1 点赞 0 评论 434 浏览 评分:10.0
新手必看,一正常,一函数递归 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int n; long long cows[55] = {0}; // 初始化前三年的母牛…… 题解列表 2024年12月16日 3 点赞 0 评论 1622 浏览 评分:10.0
老头也能看懂的for循环 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int n,a=0,b=0,c=0; for(;;){ scanf("%d",&n); i…… 题解列表 2024年12月16日 2 点赞 0 评论 859 浏览 评分:10.0