Chandra Chandu #include using namespace std; int main() { int n,i,j; vectorv; cin>>n; int a[n]; for(i=0;i>a[i]; v.push_back(a[i]*a[i]); } for(i=0;i<n;i++) { auto itr=find(v.begin(),v.end(),v[i]+v[i+1]); if(itr!=v.end()) cout<<"true"<<endl; return 0; } } Log in to Reply
#include
using namespace std;
int main()
{
int n,i,j;
vectorv;
cin>>n;
int a[n];
for(i=0;i>a[i];
v.push_back(a[i]*a[i]);
}
for(i=0;i<n;i++)
{
auto itr=find(v.begin(),v.end(),v[i]+v[i+1]);
if(itr!=v.end())
cout<<"true"<<endl;
return 0;
}
}