My issue
how to approach to this problem?? like how can i think of something like this??
My code
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define pb push_back
#define endl "\n"
#define forn(i, a, b) for (auto i = a; i < b; i++)
void solve()
{
ll n; cin>>n;
vector<ll>v(n);
forn(i,0,n) cin>>v[i];
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll t;
cin >> t;
while (t--)
{
solve();
}
}
Problem Link: Disjoint Non-Decreasing Array Practice Coding Problem - CodeChef