花落的新手算法 (C语言代码) 摘要:解题思路:注意事项:C语言无法删除已定义的数据。参考代码:#include<stdio.h>#define AUM(x,y) {int l;l=x;x=y;y=l;} //宏定义,交换数据,因为C语…… 题解列表 2017年12月17日 1 点赞 0 评论 1025 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,a[1000],i,t=0; scanf("%d",&n); for(…… 题解列表 2023年01月06日 0 点赞 0 评论 160 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素(C语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int CompactIntegers(int *arr,int n){ for (int…… 题解列表 2023年04月16日 0 点赞 0 评论 258 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素 摘要:解题思路:注意事项:参考代码:void del(int arr[], int n){ int count = 0;//统计非0元素个数 for (int i = 0; i < n; i++) { i…… 题解列表 2024年08月19日 0 点赞 0 评论 231 浏览 评分:0.0
PYthon 1479: 蓝桥杯算法提高VIP-删除数组中的0元素 摘要:解题思路:注意事项:参考代码:times = input()res = list(map(int,input().split(' ')))re = [i for i in res if…… 题解列表 2024年10月01日 0 点赞 0 评论 197 浏览 评分:0.0
最容易想到的解法了 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#include<stdio.h>using namespace std;i…… 题解列表 2025年02月18日 0 点赞 0 评论 116 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素-题解(C语言代码) 摘要:## 第一次读完题想到了自定义函数,嗯!很麻烦。 又换了一种思路,所谓的删除就是判断是否为0,不为0即输出值,用数组存储。emmmmm~自定义函数,不存在的!!! ```c #include …… 题解列表 2020年01月10日 0 点赞 0 评论 506 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素-题解(C语言代码) 摘要:#include int main() { int num,a[100],count = 0,i; scanf("%d",&num); for(i = 0;i < num…… 题解列表 2020年03月26日 0 点赞 0 评论 506 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素 (C语言代码) 摘要:解题思路: 可以边读边判,即读的是0则count不变,反之count改变,读入结束后用循环输出数组里的值,然后再在下一行输出一下count的值,即新元素的个数,就可以啦。参考代码:#include <…… 题解列表 2019年01月30日 0 点赞 0 评论 721 浏览 评分:0.0
蓝桥杯算法提高VIP-删除数组中的0元素-题解(C++代码) 摘要: #include #include using namespace std; const unsigned long CompactIntegers(vector…… 题解列表 2020年03月17日 0 点赞 0 评论 441 浏览 评分:0.0