Rudro_Debnath

Untitled

Apr 6th, 2021
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. /* --------------------------------
  2. | Team_ZeR0 |
  3. | Let's Fight For ICPC2020 |
  4. --------------------------------
  5. */
  6. #include <bits/stdc++.h>
  7. using namespace std;
  8. #define mxx 1e18
  9. #define mnn -1e18
  10. #define Y() cout<< "YES" <<endl
  11. #define N() cout << "NO"<<endl
  12. #define endl "\n"
  13. #define Ceil(x,y) ((x+y-1)/y)
  14. #define sz(s) (int)s.size()
  15. #define angle(x) double(x * acos(-1) / 180.0)
  16. #define max_3(a,b,c) max(a, max(b,c))
  17. #define min_3(a,b,c) min(a, min(b,c))
  18. #define gcd(a,b) __gcd(a,b)
  19. #define lcm(a,b) (a*b)/gcd(a,b)
  20. #define loser return 0
  21. #define ll long long
  22. #define PI acos(-1)
  23. #define mem(a,v) memset(a,v,sizeof(a))
  24. #define all(v) v.begin(),v.end()
  25. #define SORT(v) sort(v.begin(),v.end())
  26. #define SRV(v) sort(v.rbegin(),v.rend())
  27. #define REV(v) reverse(v.begin(),v.end())
  28. #define B begin()
  29. #define E end()
  30. #define V vector
  31. #define F first
  32. #define S second
  33. #define PSB push_back
  34. #define MP make_pair
  35. #define flash cout.flush()
  36. #define InTheNameOfGod ios::sync_with_stdio(0);cin.tie(0); cout.tie(0);
  37. constexpr ll MOD = 998244353;
  38. constexpr ll mod = 1e9 + 7;
  39. int dx[] = {0,0,1,-1};
  40. int dy[] = {1,-1,0,0};
  41. /*-----*/
  42. #define bug1(a) cerr<<a<<endl;
  43. #define bug2(a,b) cerr<<a<<" "<<b<<endl;
  44. #define bug3(a,b,c) cerr<<a<<" "<<b<<" "<<c<<endl;
  45. /*----*/
  46. const ll N=3e6+5;
  47. //vector<ll> adj[N];
  48. ll power(ll n,ll p){if(p==0) return 1;if(p==1)return n;if(p%2)return power(n,p-1)*n;else{ll x=power(n,p/2);return x*x;}}
  49. ll modpow(ll a,ll b,ll m){ll ans=1;while(b){if(b&1)ans=(ans*a)%m;b/=2;a=(a*a)%m;}return ans;}
  50. ll nsum(ll num){return (num*(num+1))/2;}
  51. //void edge (ll u,ll v) {adj[u].PSB(v) ;adj[v].PSB(u);}
  52. /*------------------START---------------------*/
  53. ll Tc;
  54.  
  55. /*-----*/
  56. void solve(){
  57.  
  58. cout<<"Case "<<++Tc<<": ";
  59. ll n;
  60. //string s;
  61. cin>>n;
  62. ll mn=mxx,mx=0;
  63. for(ll i=0;i<n;i++){
  64. ll a; cin>>a;
  65. mx=max(mx,a);
  66. mn=min(mn,a);
  67. }
  68. cout<<mx*mn<<endl;
  69.  
  70.  
  71.  
  72. //cout << fixed << setprecision(10);
  73. }
  74. /*-----*/
  75. int main(){
  76. InTheNameOfGod
  77.  
  78. ll Test=1;
  79. cin>>Test;
  80. while(Test--){
  81. solve();
  82. }
  83. loser;
  84. }
  85.  
  86. /////// Be Confident please ///////
  87.  
Advertisement
Add Comment
Please, Sign In to add comment