#include<stdio.h>
int main()
{
int n,a[],b[],i,flag=;
while(scanf("%d",&n)!=EOF)
{
for(i=;i<n;i++)
{
scanf("%d",&a[i]);
}
int m,j=;
scanf("%d",&m);
for(i=;i<n;i++)
{
if(m!=a[i])
{
b[j]=a[i];
j++;
}
}
if(j==)
printf("\n");
else
{
for(i=;i<j-;i++)
{
if(flag)
{
printf("%d ",b[i]);
flag==;
}
else
printf(" %d",b[i]);
}
printf("%d\n",b[j-]);
}
}
return ;
}

Problem E: 零起点学算法84——数组中删数II的更多相关文章

  1. 1145: 零起点学算法52——数组中删数II

    1145: 零起点学算法52--数组中删数II Time Limit: 1 Sec  Memory Limit: 64 MB   64bit IO Format: %lldSubmitted: 293 ...

  2. Problem D: 零起点学算法83——数组中删数

    #include<stdio.h> int main(void) { int n,i,t,x,flag; while(scanf("%d",&n)!=EOF) ...

  3. 1144: 零起点学算法51——数组中删数(C语言)

    题目: 题目来源WUSTOJ 源代码: #include<stdio.h> int main() { int n, m, i, a[20]; while (scanf("%d&q ...

  4. Problem F: 零起点学算法85——数组中插入一个数

    #include<stdio.h> int main() { ],b[]; while(scanf("%d",&n)!=EOF) { ;i<n;i++) ...

  5. Problem C: 零起点学算法82——数组中查找数

    #include<stdio.h> int main(void) { ],m; while(scanf("%d",&n)!=EOF) { ;i<n;i++ ...

  6. Problem F: 零起点学算法42——多组测试数据输出II

    #include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...

  7. 1137: 零起点学算法44——多组测试数据输出II

    1137: 零起点学算法44--多组测试数据输出II Time Limit: 1 Sec  Memory Limit: 64 MB   64bit IO Format: %lldSubmitted: ...

  8. Problem A: 零起点学算法91——找出一个数组中出现次数最多的那个元素

    #include<stdio.h> int main() { ],b[]={}; while(scanf("%d",&n)!=EOF) { ;i<n;i+ ...

  9. Problem B: 零起点学算法81——找出数组中最大元素的位置(下标值

    #include<stdio.h> int main(void) { ],i,max; while(scanf("%d",&n)!=EOF) { ;i<n ...

随机推荐

  1. c语言简单实现telnet客户端

    c语言简单实现telnet客户端 http://blog.csdn.net/haiwenchen/article/details/69944118

  2. linux加载指定目录的so文件

    linux加载指定目录的so文件 http://blog.csdn.net/win_lin/article/details/8286125 download urlhttp://download.ch ...

  3. [New learn] UIKit 框架类

    NSObject NSObject is the root class of most Objective-C class hierarchies. NSDataAsset The NSDataAss ...

  4. [New learn]讲解Objective-c的block知识

    1.简介 OC的Block感觉就是C中饿函数指针,提供回调功能,但是OC中的block比C的函数指针要更加强大,甚至可以访问本地变量和修改本地变量. block在oc中是一个对象,它可以像一般的对象那 ...

  5. 安装ubuntu-server16.0,设置WiFi

    想装个server版的Linux系统玩玩,下面记录一下遇到的坑. 1:安装语言选英文:可能是因为其他原因,我选中文的时候安装失败了,最后一次选中文的时候成功了. 2:以前装了一个ubuntu的,后面想 ...

  6. HDU 3480 Division(斜率DP裸题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3480 题目大意:将n个数字分成m段,每段价值为(该段最大值-该段最小值)^2,求最小的总价值. 解题思 ...

  7. LeetCode解题报告—— Rotate List & Set Matrix Zeroes & Sort Colors

    1. Rotate List Given a list, rotate the list to the right by k places, where k is non-negative. Exam ...

  8. C#进行Socket通信编程之一

    关于Socket编程的相关资料(含实例)在网上多如牛毛,而我写这篇文章的初衷仅仅是为了记录自己的一些心得体会. Socket提供了这样一个接口,可以方便地使程序员通过其来发送和接收网络上的数据.在利用 ...

  9. hdu 1026(优先队列+路径输出)

    Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (J ...

  10. LR脚本用户自定义C语言函数

    LR脚本实战:用户自定义C语言函数 Loadrunner可以使用标准C语言的函数,因此我们可以在脚本中编写自己的函数用于调用,把脚本结构化,更好的进行重用. 先看一个例子: Action() { in ...