简单易懂 给个赞 嘻嘻 摘要:解题思路:很简单注意事项:注意考虑周到参考代码:#include<stdio.h>#define N 10000void text(int * a , int n1 , int n2){&…… 题解列表 2025年01月09日 4 点赞 0 评论 340 浏览 评分:10.0
从后面移动,并保存消失的后面 摘要:解题思路:#include<stdio.h> int main(void) { int i, j, n, a[100], move; scanf("%d", &n); …… 题解列表 2024年12月28日 0 点赞 0 评论 273 浏览 评分:0.0
用冒泡排序的方法解决 摘要:解题思路: 通过交换相邻元素的方式将元素依次向前移动一位,实现将数组的后 m 个元素循环前移到数组前面。注意事项: 注意输入的 m 值不能超过数组的长度,否则可能会出现越界错误。代码中使用了变长数组(…… 题解列表 2024年12月28日 2 点赞 0 评论 192 浏览 评分:10.0
简单易想到 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void fun(int a[],int m,int n){ int b[n],i,j=0; for(i=n-m;i<n;i++){ …… 题解列表 2024年12月18日 2 点赞 0 评论 305 浏览 评分:0.0
一组数组不行就两组 摘要:解题思路:注意事项:在自定义函数中在定义一组数组,用于存放原数组中各数组元素后移形成的各数组元素。参考代码:#include<stdio.h>void f(int a[],int n,int m){ …… 题解列表 2024年12月04日 0 点赞 0 评论 189 浏览 评分:0.0
[编程入门]自定义函数之数字后移 摘要:扩充挪到前面的代码先输出,没动的代码先输出,但是内存可能不够参考代码: #include<stdio.h>int a[100000];int main(){ int n,m; scanf(…… 题解列表 2024年11月23日 1 点赞 0 评论 171 浏览 评分:0.0
数组法数字后移 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int F(int arr[],int j,int k){ int b[k]; for(int i=0;i<k;i++) { b[i]…… 题解列表 2024年11月20日 0 点赞 0 评论 119 浏览 评分:0.0
逆天解法,包得吃的。 摘要:解题思路:一直交换,将后面的数换到前面。注意事项:参考代码:#include<stdio.h>int main(){ int a,i,j,b,c,arr[10]={0}; scanf("%d",&a)…… 题解列表 2024年10月20日 0 点赞 0 评论 494 浏览 评分:9.9
malloc动态分配内存 循环每次后移一位 摘要:解题思路:每次移动一位注意事项:时间复杂度比较高 算法效率不高 比较好理解参考代码:#include <stdio.h>#include <stdlib.h>#include <errno.h>vo…… 题解列表 2024年08月26日 0 点赞 0 评论 65 浏览 评分:0.0
【编程入门】自定义函数之数字后移 摘要:参考代码:#include <bits/stdc++.h> using namespace std; int main(){ int n,k; int p[1007],s[1007]; …… 题解列表 2024年06月15日 0 点赞 0 评论 111 浏览 评分:9.9