首页 > 删除元素
头像 Tender^
发表于 2021-10-04 23:12:49
#include<bits/stdc++.h> using namespace std; int main(){ int m,n; int arr[20]; while(cin>>n){ int a,i=0; while 展开全文
头像 牛客517072235号
发表于 2021-08-04 10:01:13
#include<iostream> using namespace std; int main() { int n; while(cin>>n) { int a[n]; for(int i=0; i<n; i++ 展开全文
头像 慷慨
发表于 2021-12-01 11:48:17
链接:https://ac.nowcoder.com/acm/problem/22228 来源:牛客网 题目描述 在给定的数组中删除一个数。 输入描述: 多组测试。 每组第一行输入1个整数n(n<20), 第二行输入n个整数 第三行输入1个整数m。 输出描述: 删除在第一行的n个整数中第一次出 展开全文
头像 Codecodify
发表于 2023-07-14 14:07:51
使用数组指针移动思路,测试的时候能通过,但是提交保存就过不了,希望大神帮忙看下: #include <stdio.h> void deleteElement(int nums[], int* size, int element) { int found = 0, i; 展开全文
头像 请问企鹅
发表于 2023-04-13 19:29:41
#include<stdio.h> int main() { int a[100],n,i,m,k; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) { scanf("%d",& 展开全文
头像 牛客458374228号
发表于 2020-12-09 15:17:25
题目描述在给定的数组中删除一个数。 正确的输入描述:多组测试。每组第一行输入1个整数n(n<20)第二行输入n个整数第三行输入1个整数m。 输出描述:删除在第一行的n个整数中第一次出现数字m并删除,然后按照顺序输出剩下的数。 示例1正确的输入:41 2 3 43输出:1 2 4 相似之 展开全文
头像 TWWT
发表于 2020-06-16 10:44:48
include using namespace std; int main(){ int n=0; cin>>n; int num[20]={0}; int m=0; int flag=0; int flag1=0; for(int i=0;i<n;i++) { 展开全文
头像 23数二杨帆
发表于 2023-11-08 19:23:55
#include <bits/stdc++.h> using namespace std; int main() { int n; int a[25] , b; while(cin >> n) { for( int i = 0 ; i < n ; i ++ ) c 展开全文
头像 KaynGe
发表于 2021-03-25 00:05:42
注意读题,多组测试 #include <iostream> #include <cmath> #include <algorithm> #include <vector> using namespace std; long long a[25]; 展开全文
头像 豁达的小白菜等oc
发表于 2022-06-23 22:52:23
#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0),cout.tie(0); int n,m; while(ci 展开全文

等你来战

查看全部