SHARE
TWEET

Untitled

a guest Jun 3rd, 2019 782 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. int arr[2005];
  5. int main()
  6. {
  7.     int n;
  8.     scanf("%d",&n);
  9.     for (int i=0;i<2*n;i++)
  10.     scanf("%d",&arr[i]);
  11.     sort(arr,arr+2*n);
  12.     if (arr[0]==arr[2*n-1])
  13.     {
  14.         printf("-1");
  15.         return 0;
  16.     }
  17.     for (int i=0;i<2*n;i++)
  18.     printf("%d ",arr[i]);
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top