Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int n,x[100000];
- long long P;
- int main()
- {
- cin>>n;
- for(int i=0;i<n;++i)
- cin>>x[i];
- sort(x,x+n);
- if(1ULL*x[n-1]*x[n-2]>1ULL*x[0]*x[1])
- cout<<1ULL*x[n-1]*x[n-2];
- else
- cout<<1ULL*x[0]*x[1];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement