题解列表

筛选

新手必看,一正常,一函数递归

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() {    int n;    long long cows[55] = {0};     // 初始化前三年的母牛……

新手必看,俩for解决

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() {    int n,i,j,h,l; scanf("%d",&n); int a[n][n]; for(i=0;……

c语言 30306:树的存储

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#define MAX_N 10000// 邻接表节点结构体typedef struct Nod……

超级简单,用了循环和字符串函数,

摘要:解题思路:只要不是空格,就直接加,不用考虑字符是字母还是数字。注意事项:使用标记变量处理逗号问题。参考代码:#include <stdio.h>#include <string.h>int main(……

大神老白1390/////////

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int gys(int a,int b){ if (a==b) { return a; } else ……

使用函数易理解

摘要:解题思路:注意事项:由题可知大写变小写,加32即可,在注意下字符数组的输入输出参考代码:#include <stdio.h>#include <string.h>void fun(char a[]){……

推断不重要或重复关系

摘要:解题思路:1. 在  main  函数中,首先定义了两个整数  n  和  m  用于存储关系的数量和节点的数量。2. 定义了一个整数数组  root  ,初始时  root[i] = i  ,表示每……

贝西的训练

摘要:解题思路:1. 在  main  函数开头,定义了整数变量  M (奶牛进山的总时间)、 T (路段数量)、 U (上坡时间)、 F (平路时间)、 D (下坡时间),并通过  scanf  函数从用……