-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathmutiple_missing.cpp
More file actions
43 lines (39 loc) · 782 Bytes
/
Copy pathmutiple_missing.cpp
File metadata and controls
43 lines (39 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<bits/stdc++.h>
using namespace std;
#define max(a,b) a>b?a:b
#define min(a,b) a<b?a:b
#define O cout<<
#define I cin>>
#define f0(i,n) for(int i=0;i<n;i++)
#define f1(i,n) for(int i=1;i<n;i++)
#define speed_karo ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define ff first
#define ss second
#define vecs(v) sort(v.begin(),v.end())
int main(){
int a[10]={2,3,4,5,7,8,9};
int h[9]={0,0,0,0,0,0,0};
int n = 7;
int l = a[0];
int m = 9;
// int diff = l-0;
// for(int i=0;i<n;i++){
// if(a[i]-i != diff){
// while(diff<a[i]-i){
// cout<<i+diff<<" ";
// diff++;
// }
// break;
// }
// }
for(int i=0;i<n;i++){
h[a[i]]++;
}
for(int i=l;i<9;i++){
if(h[i]==0){
cout<<i<<" ";
}
}
return 0;
}