Huffuman树 不需用删除,不需要额外空间。 摘要:解题思路:利用vector容器灵活性,可以自由添加数据,先对vector容器排序,取第一个和第二个数相加加入容器中,第一个和第二个数变为无穷大,不需用删除第一个第二个数,也不需要在开辟一个数组或者容器…… 题解列表 2022年11月27日 0 点赞 0 评论 519 浏览 评分:9.9
跟原先不使用函数一样的道理-C语言解决 摘要:解题思路:注意事项:参考代码:#include<stdio.h> void max(int a, int b, int c) { int max = 0; if (a > b) ma…… 题解列表 2022年11月27日 0 点赞 1 评论 537 浏览 评分:9.9
二级C语言-进制转换 %o解法与通解 摘要:第一种解法,直接用printf的%o格式打印。 ```c #include int main(){ int n; scanf("%d",&n); printf("%…… 题解列表 2022年11月27日 0 点赞 0 评论 525 浏览 评分:9.9
入门难度的题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int num[30];int maxnum;int main(){ stri…… 题解列表 2022年11月27日 0 点赞 0 评论 755 浏览 评分:9.9
自定义函数之字符串反转 摘要:解题思路:最简洁注意事项:参考代码:#include<stdio.h>#include<string.h>int fun(char a[]){ int n = strlen(a); return n;…… 题解列表 2022年11月27日 0 点赞 0 评论 264 浏览 评分:9.9
编写题解 1030: [编程入门]二维数组的转置 摘要:解题思路:将数组处理为最原始的样子(也就[[1,2,3],[4,5,6],[7,8,9]])注意事项:理解二维数组的运算方式参考代码:lst = []for i in range(3): j =…… 题解列表 2022年11月27日 0 点赞 0 评论 784 浏览 评分:9.9
利用循环查找元音字母 摘要:解题思路: 定义2个字符数组,利用循环在字符数组里查找元音字母,如找到了则赋值给另外一个字符数组,然后输出。 ```c #include int main() { char a[100];…… 题解列表 2022年11月27日 0 点赞 0 评论 424 浏览 评分:9.9
数字分离(c语言) 摘要:解题思路:我们可以使用一个数组来存储输入的数,然后在利用循环输出。 当我们不知道数组里面存了多少个数时,我们可以利用字符数组的最后一个结束符('\0')来作为循环的判断条件。 注意事项:'\0'在…… 题解列表 2022年11月27日 0 点赞 0 评论 439 浏览 评分:9.9
自定义函数之字符类型统计(c语言) 摘要:解题思路: 定义2个数组,一个存输入的值,另一个统计类型个数。 参考代码: #include void sum(char a[], int b[]) { for (…… 题解列表 2022年11月27日 0 点赞 0 评论 399 浏览 评分:9.9
通俗易懂好理解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a[100]; int n; scanf("%d",&n); int i,j; for(i=0;i<n…… 题解列表 2022年11月28日 0 点赞 0 评论 428 浏览 评分:9.9