For this Question: Consider the integer sequence A = {1, 2, 3, ...., N} i.e. the first N natural numbers in order.

You are now given two integers, L and S. Determine whether there exists a subarray with length L and sum S after removing <b>at most one</b> element from A.

A <b>subarray</b> of an array is a non-empty sequence obtained by removing zero or more elements from the front of the array, and zero or more elements from the back of the array.The first line contains a single integer T, the number of test cases.
T lines follow. Each line describes a single test case and contains three integers: N, L, and S.

<b>Constraints:</b>
1 <= T <= 100
2 <= N <= 10<sup>9</sup>
1 <= L <= N-1
1 <= S <= 10<sup>18</sup> <b> (Note that S will not fit in a 32-bit integer) </b>For each testcase, print "YES" (without quotes) if a required subarray can exist, and "NO"  (without quotes) otherwise.Sample Input:
3
5 3 11
5 3 5
5 3 6

Sample Output:
YES
NO
YES

Sample Explanation:
For the first test case, we can remove 3 from A to obtain A = {1, 2, 4, 5} where {2, 4, 5} is a required subarray of size 3 and sum 11., I have written this Solution Code: //HEADER FILES AND NAMESPACES 
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>  
#include <ext/pb_ds/tree_policy.hpp>   
// #include <sys/resource.h>
using namespace std;
using namespace __gnu_pbds;
 
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>; 
 
// DEFINE STATEMENTS
const long long INF = 1e18;
const int INFINT = INT_MAX/2;
#define num1 1000000007
#define num2 998244353
#define REP(i,a,n) for(ll i=a;i<n;i++)
#define REPd(i,a,n) for(ll i=a; i>=n; i--)
#define pb push_back
#define f first
#define s second
#define fix(f,n) std::fixed<<std::setprecision(n)<<f
#define all(x) x.begin(), x.end()
#define M_PI 3.14159265358979323846
#define epsilon (double)(0.000000001)
#define popcount __builtin_popcountll
#define fileio(x, y) freopen(x, "r", stdin); freopen(y, "w", stdout);
#define out(x) cout << ((x) ? "YES\n" : "NO\n")
#define CASE(x, y) cout << "Case #" << x << ":" << " \n"[y]
#define start_clock() auto start_time = std::chrono::high_resolution_clock::now(); auto end_time = start_time;
#define measure() end_time = std::chrono::high_resolution_clock::now(); cerr << (end_time - start_time)/std::chrono::milliseconds(1) << "ms" << endl;
#define reset_clock() start_time = std::chrono::high_resolution_clock::now();
			
typedef long long ll;
typedef long double ld;
typedef vector<long long> vll;
typedef pair<long long, long long> pll;
typedef vector<pair<long long, long long>> vpll;
typedef vector<int> vii;
 
// DEBUG FUNCTIONS 
#ifdef LOCALY
 
template<typename T>
void __p(T a) {
	cout<<a;
}
template<typename T, typename F>
void __p(pair<T, F> a) {
	cout<<"{";
	__p(a.first);
	cout<<",";
	__p(a.second);
	cout<<"}";
}
template<typename T>
void __p(std::vector<T> a) {
	cout<<"{";
	for(auto it=a.begin(); it<a.end(); it++)
		__p(*it),cout<<",}"[it+1==a.end()];
}
template<typename T>
void __p(std::set<T> a) {
	cout<<"{";
	for(auto it=a.begin(); it!=a.end();){
		__p(*it); 
		cout<<",}"[++it==a.end()];
	}
 
}
template<typename T>
void __p(std::multiset<T> a) {
	cout<<"{";
	for(auto it=a.begin(); it!=a.end();){
		__p(*it); 
		cout<<",}"[++it==a.end()];
	}
}
template<typename T, typename F>
void __p(std::map<T,F> a) {
	cout<<"{\n";
	for(auto it=a.begin(); it!=a.end();++it)
	{
		__p(it->first);
		cout << ": ";
		__p(it->second);
		cout<<"\n";
	}
	cout << "}\n";
}
 
template<typename T, typename ...Arg>
void __p(T a1, Arg ...a) {
	__p(a1);
	__p(a...);
}
template<typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
	cout<<name<<" : ";
	__p(arg1);
	cout<<endl;
}
template<typename Arg1, typename ... Args>
void __f(const char *names, Arg1 &&arg1, Args &&... args) {
	int bracket=0,i=0;
	for(;; i++)
		if(names[i]==','&&bracket==0)
			break;
		else if(names[i]=='(')
			bracket++;
		else if(names[i]==')')
			bracket--;
	const char *comma=names+i;
	cout.write(names,comma-names)<<" : ";
	__p(arg1);
	cout<<" | ";
	__f(comma+1,args...);
}
#define trace(...) cout<<"Line:"<<__LINE__<<" ", __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...)
#define error(...)
#endif
 
// DEBUG FUNCTIONS END 
 
// CUSTOM HASH TO SPEED UP UNORDERED MAP AND TO AVOID FORCED CLASHES
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }
 
    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};
 
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());  // FOR RANDOM NUMBER GENERATION
 
ll mod_exp(ll a, ll b, ll c)
{
	ll res=1;   a=a%c;
	while(b>0)
	{
		if(b%2==1)
			res=(res*a)%c;
		b/=2;
		a=(a*a)%c;
	}
	return res;
}
ll norm(ll a,ll b)
{
	return (((a = a%b) < 0) ? a + b : a);
}
ll gcdExtended(ll,ll,ll *,ll *);
ll modInverse(ll a, ll m) 
{ 
		ll x, y; 
		ll g = gcdExtended(a, m, &x, &y); 
		g++; g--;  //this line was added just to remove compiler warning
		ll res = (x%m + m) % m;
		return res;
} 
ll gcdExtended(ll a, ll b, ll *x, ll *y) 
{ 
		if (a == 0) 
		{ 
				*x = 0, *y = 1; 
				return b; 
		} 
		ll x1, y1; 
		ll gcd = gcdExtended(b%a, a, &x1, &y1);
		*x = y1 - (b/a) * x1; 
		*y = x1; 
		return gcd; 
}

struct Graph
{
	vector<vector<int>> adj;
	Graph(int n): adj(n+1) {}
	void add_edge(int a, int b, bool directed = false)
	{
		adj[a].pb(b);
		if(!directed) adj[b].pb(a);
	}
};

struct LCA
{
	vll tin, tout, level;
	vector<vll> up;
	ll timer;
	void _dfs(vector<vector<int>> &adj, ll x, ll par=-1)
	{
		up[x][0] = par;
		REP(i, 1, 20)
		{
			if(up[x][i-1] == -1) break;
			up[x][i] = up[up[x][i-1]][i-1];
		}
		tin[x] = ++timer;
		for(auto &p: adj[x])
		{
			if(p != par)
			{
				level[p] = level[x]+1; 	_dfs(adj, p, x);
			}
		}
		tout[x] = ++timer;
	}
	LCA(Graph &G, ll root)
	{
		int n = G.adj.size();
		tin.resize(n); tout.resize(n); up.resize(n, vll(20, -1)); level.resize(n, 0);
		timer = 0;

		//does not handle forests, easy to modify to handle
		_dfs(G.adj, root);
	}
	ll find_kth(ll x, ll k)
	{
		ll cur = x;
		REP(i, 0, 20)
		{
			if((k>>i)&1) cur = up[cur][i];
			if(cur == -1) break;
		}
		return cur;
	}
	bool is_ancestor(ll x, ll y)
	{
		return tin[x]<=tin[y]&&tout[x]>=tout[y];
	}
	ll find_lca(ll x, ll y)
	{
		if(is_ancestor(x, y)) return x;
		if(is_ancestor(y, x)) return y;
		ll best = x;
		REPd(i, 19, 0)
		{
			if(up[x][i] == -1) continue;
			else if(is_ancestor(up[x][i], y)) best = up[x][i];
			else x = up[x][i];
		}
		return best;
	}
	ll dist(ll a, ll b)
	{
		return level[a] + level[b] - 2*level[find_lca(a, b)];
	}
};

long long ap_sum(long long st, long long len) {
	//diff is always 1
	long long en = st + len - 1;
	return (len * (st + en))/2;
}

signed main() {
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t = 1;
	cin >> t;
	for(int i=0; i<t; i++) {
		long long N, L, S;
		cin >> N >> L >> S;

		if(S < ap_sum(1, L) || S > ap_sum(N - L + 1, L)) {
			cout << "NO\n";
		} else {
			cout << "YES\n";
		}
	}
    return 0;
}


/*

*/, In this Programming Language: C++, Now tell me if this Code is compilable or not?