We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6033764 commit e9b5855Copy full SHA for e9b5855
missing-numbers.c
@@ -0,0 +1,35 @@
1
+//missing-numbers
2
+//mandeep singh
3
+
4
+#include<stdio.h>
5
+#include<stdlib.h>
6
+#define SIZE 10001
7
+int main()
8
+{
9
+ int a[SIZE];
10
+ int i,n,m;
11
+ for( i = 0; i<SIZE;i++)
12
+ {
13
+ a[i]=0;
14
+ }
15
+ int N, M;
16
+ scanf("%d", &N);
17
+ int temp;
18
+ for( n=0; n<N; n++)
19
20
+ scanf("%d", &temp);
21
+ a[temp]+=1;
22
23
+ scanf("%d", &M);
24
+ for( m =0; m<M; m++)
25
26
27
+ a[temp]-=1;
28
29
+ for( i =0; i<SIZE; i++)
30
31
+ if(a[i]<0)
32
+ printf("%d ", i);
33
34
+ return 0;
35
+}
0 commit comments