Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int arr[1000],arr2[1000];
- int main()
- {
- int i,n;
- scanf("%d",&n);
- for(i=0;i<n;i++)
- {
- int x;
- scanf("%d",&x);
- arr[x]=1;
- }
- for(i=0;i<n;i++)
- {
- int x;
- scanf("%d",&x);
- arr2[x]=1;
- }
- for(i=0;i<1000;i++)
- {
- if(arr[i] == arr2[i] && arr[i]==1) printf("%d ",i);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement