Like and Subscribe guys 👍 A. In C++ language #include using namespace std; #define int long long int32_t main() { int t; cin>>t; while(t--) { int n; cin>>n; vectorvec(n); for(int i=0;i>vec[i]; }
A. In C++ language #include using namespace std; #define int long long int32_t main() { int t; cin>>t; while(t--) { int n; cin>>n; vectorvec(n); for(int i=0;i>vec[i]; }
A. In C++ language #include using namespace std; #define int long long int32_t main() { int t; cin>>t; while(t--) { int n; cin>>n; vectorvec(n); for(int i=0;i>vec[i]; }
Like and Subscribe guys 👍
A.
In C++ language
#include
using namespace std;
#define int long long
int32_t main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vectorvec(n);
for(int i=0;i>vec[i];
}
bool c=true;
for(int i=0;i=0 && vec[i-1]>=vec[i])
{
if(2*vec[i]>vec[i-1])
{
c=false;
break;
}
}
else if(i-1>=0 && vec[i-1]vec[i])
{
c=false;
break;
}
}
if(i+1=vec[i])
{
if(2*vec[i]>vec[i+1])
{
c=false;
break;
}
}
else if(i+1
Like and Subscribe guys..👍
please share this code in comments
A.
In C++ language
#include
using namespace std;
#define int long long
int32_t main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vectorvec(n);
for(int i=0;i>vec[i];
}
bool c=true;
for(int i=0;i=0 && vec[i-1]>=vec[i])
{
if(2*vec[i]>vec[i-1])
{
c=false;
break;
}
}
else if(i-1>=0 && vec[i-1]vec[i])
{
c=false;
break;
}
}
if(i+1=vec[i])
{
if(2*vec[i]>vec[i+1])
{
c=false;
break;
}
}
else if(i+1
correct code do bhai
A.
In C++ language
#include
using namespace std;
#define int long long
int32_t main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vectorvec(n);
for(int i=0;i>vec[i];
}
bool c=true;
for(int i=0;i=0 && vec[i-1]>=vec[i])
{
if(2*vec[i]>vec[i-1])
{
c=false;
break;
}
}
else if(i-1>=0 && vec[i-1]vec[i])
{
c=false;
break;
}
}
if(i+1=vec[i])
{
if(2*vec[i]>vec[i+1])
{
c=false;
break;
}
}
else if(i+1