Skip to content

Commit

Permalink
Create Hidden Array.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugdha-Hazra authored Dec 11, 2021
1 parent 3c87fe7 commit d57181b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Hidden Array.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//Hidden Array
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,i=0,j=0,k=0,m=0;
cin>>n;
long long int a[100000000],b[100000000],c[100000000]={0};
while(k<n)
{
cin>>a[k]>>b[k];
k++;
}
while(i<n)
{
if(a[i]>m)
{ m=a[i];
j=i;
}
i++;
}
cout<<m+b[j];
return 0;
}

0 comments on commit d57181b

Please sign in to comment.