单独打印第一行后,循环打印后面的行数(c语言) 摘要:解题思路:假设用left-x表示左边需要打印x的位置,right-x表示右边需要打印x的位置则每行打印“x”的规律:随着打印行数的增加,left-x向右移动(即left--),right-x向左移动(…… 题解列表 2022年09月18日 0 点赞 0 评论 487 浏览 评分:9.9
1674: 数据结构-有序线性表的有序合并 摘要: #include//万能头 using namespace std; inline int read(){//快读 int x=0,f=1; c…… 题解列表 2022年09月18日 0 点赞 0 评论 714 浏览 评分:9.9
1673: 数据结构-集合union 摘要: #include//万能头 using namespace std; inline int read(){//普普通通的快读 int x=0,f=1; …… 题解列表 2022年09月18日 0 点赞 0 评论 1031 浏览 评分:9.9
兰顿蚂蚁(C语言解答) 摘要:解题思路:本题只需按照题目所给要求一步一步完成即可,比较简单。注意事项:注意行列变换规律。参考代码:#include<stdio.h>int main(){ int n,m,x,y,k,z; /…… 题解列表 2022年09月18日 0 点赞 0 评论 581 浏览 评分:9.9
数组的正输入逆输出(数组的遍历) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[10],i; for(i=0;i<10;i++) { scanf("…… 题解列表 2022年09月18日 0 点赞 0 评论 295 浏览 评分:2.0
辗转相除法与倍数法;用函数法; 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void gcd(int a,int b);void lcm(int a,int b);void swap(int a,int b);i…… 题解列表 2022年09月18日 0 点赞 0 评论 320 浏览 评分:0.0
分类处理数字 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,cnt,cnt_; double sum,n,average;//sum:每一个正数的和…… 题解列表 2022年09月18日 0 点赞 0 评论 306 浏览 评分:0.0
多重条件符合的输出 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; for(n=10;n<=1000;n++) { if(n%2==0…… 题解列表 2022年09月18日 0 点赞 0 评论 564 浏览 评分:0.0
难点:标齐各个的位置 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j,k;//j*i=k for(i=1;i<=9;i++)//i循环:要从1走到9;是每…… 题解列表 2022年09月18日 0 点赞 0 评论 298 浏览 评分:0.0
用函数的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void Leftmove(int *n);//左移一位void getmin_print(int *n);//得到最小的那一位数并打印…… 题解列表 2022年09月18日 0 点赞 0 评论 272 浏览 评分:0.0