ShaysXIA/CodeInsightBench huggingface dataset:
Problem: 2057C - Trip to the Olympiad
Language: Java 21


Submission (verdict: Runtime error on test 1):
package prectice;

import java.lang.reflect.Array;
import java.math.BigInteger;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Stack;
import java.util.TreeMap;
import java.util.regex.Pattern;
import java.util.stream.Stream;



public class P1 {
	
	public static BigInteger factorial(int n) {
        BigInteger fact = BigInteger.ONE;
        for (int i = 1; i <= n; i++) {
            fact = fact.multiply(BigInteger.valueOf(i));
        }
        return fact;
    }
	

    // Method to calculate nCr using BigInteger
	
    public static int nCr(int n, int r) {
        if (r > n) {
            return 0;
        }
        BigInteger numerator = factorial(n);
        BigInteger denominator = factorial(r).multiply(factorial(n - r));
        BigInteger result = numerator.divide(denominator);
        return result.intValue();  // Cast to int
    }
    
    public static long gcd(long a,long b) {
    	if(b == 0) {
    		return a;
    	}
    	return gcd(b,a%b);
    }
    
	public static void dfs(List<List<Integer>> edge,int u,int p,int[] d,int[] s) {
	    	
		s[u] = 1;
		for(int v : edge.get(u)) {
			if(v == p) {
				continue;
			}
			d[v] = d[u]+1;
			dfs(edge,v,u,d,s);
			s[u] += s[v];
		}
	    	
	}
	
	public static void dfs2(List<List<Integer>> edge,int u,int p,int sd,int[] s,int[] ans,int n) {
		
		ans[u] = sd;
		
		for(int v : edge.get(u)) {
			if(v == p) {
				continue;
			}
			int sdv = sd + n - 2*s[v];
			dfs2(edge,v,u,sdv,s,ans,n);
		}
		
	}
	
	public static long f(long n,int k) {
		if((n+1)/2 >= k && n != 1) {
			return f((n+1)/2,k);
		}
		return n;
	}

    	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		
//		StringBuilder ansf = new StringBuilder("");

		
		while(t-- > 0) {
			
			int n = sc.nextInt();
			int m = sc.nextInt();
		
			int[] ar1 = new int[30];
			int[] ar2 = new int[30];
			
			for(int i=29;i>=0;i--) {
				ar1[i] = n%2;
				n/=2;
				ar2[i] = m%2;
				m/=2;
			}
			
			int ans = -1;
			for(int i=0;i<30;i++) {
				if(ar1[i] != ar2[i]) {
					ans = i;
					break;
				}
			}
			
			int a = 0;
			int b = 0;
			for(int i=0;i<30;i++) {
				if(i < ans) {
					a  = a*2 + ar1[i];
					b  = b*2 + ar1[i];
				}
				else if(i == ans) {
					a = a*2 + 1;
					b = b*2;
				}
				else {
					b = b*2 + 1;
					a = a*2;
				}
			}
			
			int c = 0;
			for(int i=n+1;i<=m;i++) {
				if(i != a && i != b) {
					c = i;
					break;
				}
			}
			
			System.out.println(a + " " + b + " " + c);
			
			
		}
		
	}
	
}
Problem: 2050C - Uninteresting Number
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= twos; i++)
        {
            for (int j = 0; j <= threes; j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}

Submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= min(10ll, twos); i++)
        {
            for (int j = 0; j <= min(10ll, threes); j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}
Problem: 2050C - Uninteresting Number
Language: C++17 (GCC 7-32)


Submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= twos; i++)
        {
            for (int j = 0; j <= threes; j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}
Problem: 2050C - Uninteresting Number
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= twos; i++)
        {
            for (int j = 0; j <= threes; j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                    break;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}

Submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= min(10ll, twos); i++)
        {
            for (int j = 0; j <= min(10ll, threes); j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                    break;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}
Problem: 2050C - Uninteresting Number
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= min(10ll, twos); i++)
        {
            for (int j = 0; j <= min(10ll, threes); j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}

Submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= twos; i++)
        {
            for (int j = 0; j <= threes; j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                    break;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}
Problem: 2050C - Uninteresting Number
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int sum = 0;
        string s = to_string(n);
        for (char c : s)
        {
            sum += c - '0';
        }
        if (sum % 9 == 0)
        {
            cout << "YES\n";
            continue;
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= min(10ll, twos); i++)
        {
            for (int j = 0; j <= min(10ll, threes); j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                    break;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}

Submission (verdict: Accepted):
#include <bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        string s;
        cin >> s;
        int sum = 0;
        for (char c : s)
        {
            sum += c - '0';
        }
        int twos = 0;
        int threes = 0;
        for (char c : s)
        {
            if (c == '2')
            {
                twos++;
            }
            else if (c == '3')
            {
                threes++;
            }
        }
        int flag = 0;
        for (int i = 0; i <= min(10ll, twos); i++)
        {
            for (int j = 0; j <= min(10ll, threes); j++)
            {
                if ((sum + 2 * i + 6 * j) % 9 == 0)
                {
                    flag = 1;
                    break;
                }
            }
        }
        if (flag)
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}
Problem: 2050B - Transfusion
Language: C++20 (GCC 13-64)


Submission (verdict: Wrong answer on test 1):
#include <iostream>

#include <fstream>

#include <string>

#include <vector>

#include <algorithm>

#include <cstdint>

#include <set>

#include <unordered_map>

#include <iomanip>

#include <map>

#include <numeric> 

#include <bitset>

#include <climits>

typedef long long ll;

#define F first

#define S second

#define PB push_back

#define MP make_pair

#define LOO(i,a,b) for (int i = a; i <= b; i++)

using namespace std;

ll MAX = 1e9 + 7;

void iO() {

    freopen("output.txt","w",stdout);

    freopen("input.txt","r",stdin);

}

vector<int> make_sorted_index(vector<int> const& values) {

    vector<int> index(values.size());

    iota(index.begin(), index.end(), 0);

    stable_sort(index.begin(), index.end(), [&values](int a, int b) { return values[a] < values[b]; } );

    return index;

}



ll iSqrt(ll n) {

    ll lo = 1, hi = min((ll)3037000500, n); // long long

    ll res = 1;

    while(lo <= hi) {

        ll mid = lo + (hi - lo)/2;

        if(mid*mid <= n) {

            res = mid;

            lo = mid + 1;

        }

        else {

            hi = mid - 1;

        }

    }

    return res;

}



int solve() {

    ll n;

    cin >> n;

    ll alter = 0;

    LOO(i, 0, n -1 ) {

        ll temp;

        cin >> temp;

        if (i%2==0) {

            alter += temp;

        }

        else {

            alter -= temp;

        }

    }

    if (alter == 0) {

        cout << "YES" << endl;

    }

    else {

        cout << "NO" << endl;

    }

    return 0;

}





int main() {

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    //iO();

    //pre_process();

    int t = 1;

    cin >> t;

    while (t--) {

        solve();

    }

}
Problem: 2050C - Uninteresting Number
Language: C++20 (GCC 13-64)


Submission (verdict: Wrong answer on test 1):
#include <iostream>

#include <fstream>

#include <string>

#include <vector>

#include <algorithm>

#include <cstdint>

#include <set>

#include <unordered_map>

#include <iomanip>

#include <map>

#include <numeric> 

#include <bitset>

#include <climits>

typedef long long ll;

#define F first

#define S second

#define PB push_back

#define MP make_pair

#define LOO(i,a,b) for (int i = a; i <= b; i++)

using namespace std;

ll MAX = 1e9 + 7;

void iO() {

    freopen("output.txt","w",stdout);

    freopen("input.txt","r",stdin);

}

vector<int> make_sorted_index(vector<int> const& values) {

    vector<int> index(values.size());

    iota(index.begin(), index.end(), 0);

    stable_sort(index.begin(), index.end(), [&values](int a, int b) { return values[a] < values[b]; } );

    return index;

}



ll iSqrt(ll n) {

    ll lo = 1, hi = min((ll)3037000500, n); // long long

    ll res = 1;

    while(lo <= hi) {

        ll mid = lo + (hi - lo)/2;

        if(mid*mid <= n) {

            res = mid;

            lo = mid + 1;

        }

        else {

            hi = mid - 1;

        }

    }

    return res;

}

bool down(int num, int choice2, int choice3) {

    if (num == 0) {

        return true;

    }

    if (choice2 == 0 && choice3 == 0) {

        return false;

    }

    else if (choice2 == 0) {

        return num;

    }

    else if (choice3 == 0) {

        return down((num+2)%9, choice2 - 1, choice3);

    }

    else {

        return down((num+2)%9, choice2 - 1, choice3) || down((num + 6)%9, choice2, choice3 - 1);

    }

}

int solve() {

    string n;

    cin >> n;

    int choices2=0;

    int choices3=0;

    int sum_of = 0;

    LOO(i, 0, n.size()-1) {

        if (n[i] == '2') {

            choices2++;

        }

        if (n[i] == '3') {

            choices3++;

        }

        sum_of = (sum_of + n[i] - '0')%9;

    }

    if (down(sum_of, choices2, choices3)) {

        cout << "YES" << endl;

    }

    else {

        cout << "NO" << endl;

    }

    return 0;

}





int main() {

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    //iO();

    //pre_process();

    int t = 1;

    cin >> t;

    while (t--) {

        solve();

    }

}
Problem: 2050D - Digital string maximization
Language: C++23 (GCC 14-64, msys2)

Previous submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

bool comp(char a, char b) {
    return !((b-a)>1);
}

void solve()
{
    string s;
    cin >> s;
    // sort(s.begin(),s.end(),comp);
    // cout << s << endl; return;
    for (int i = 0; i < s.length() - 1; i++)
    {
        int len = s.length() - 1;
        int mne = min(len, 9LL);
        // cout << len << mne << endl;
        for (int j = 0; j < mne; j++)
        {
            if (s[j + 1] - s[j] > 1)
            {
                swap(s[j + 1], s[j]);
                s[j] -= 1;
            }
            // cout << s << endl;
        }
    }
    cout << s << endl;
    return;
}

signed main()
{
    ios::sync_with_stdio(false), cin.tie(0);

    int tc = 1;
    cin >> tc;
    while (tc--)
    {
        solve();
    }
    return 0;
}

Submission (verdict: Time limit exceeded on test 6):
#include <bits/stdc++.h>
using namespace std;
#define int long long

bool comp(char a, char b) {
    return !((b-a)>1);
}

void solve()
{
    string s;
    cin >> s;
    // sort(s.begin(),s.end(),comp);
    // cout << s << endl; return;
    for (int i = 0; i < s.length() - 1; i++)
    {
        int len = s.length() - 1;
        int mne = min(len, 9LL);
        // cout << len << mne << endl;
        for (int j = 0; j < s.length()-1; j++)
        {
            if (s[j + 1] - s[j] > 1)
            {
                swap(s[j + 1], s[j]);
                s[j] -= 1;
            }
            // cout << s << endl;
        }
    }
    cout << s << endl;
    return;
}

signed main()
{
    ios::sync_with_stdio(false), cin.tie(0);

    int tc = 1;
    cin >> tc;
    while (tc--)
    {
        solve();
    }
    return 0;
}
Problem: 2050D - Digital string maximization
Language: C++23 (GCC 14-64, msys2)


Submission (verdict: Wrong answer on test 3):
#include <bits/stdc++.h>
using namespace std;
#define int long long

bool comp(char a, char b) {
    return !((b-a)>1);
}

void solve()
{
    string s;
    cin >> s;
    // sort(s.begin(),s.end(),comp);
    // cout << s << endl; return;
    for (int i = 0; i < s.length() - 1; i++)
    {
        int len = s.length() - 1;
        int mne = min(len, 9LL);
        // cout << len << mne << endl;
        for (int j = 0; j < mne; j++)
        {
            if (s[j + 1] - s[j] > 1)
            {
                swap(s[j + 1], s[j]);
                s[j] -= 1;
            }
            // cout << s << endl;
        }
    }
    cout << s << endl;
    return;
}

signed main()
{
    ios::sync_with_stdio(false), cin.tie(0);

    int tc = 1;
    cin >> tc;
    while (tc--)
    {
        solve();
    }
    return 0;
}
Problem: 2050D - Digital string maximization
Language: C++23 (GCC 14-64, msys2)

Previous submission (verdict: Time limit exceeded on test 6):
#include <bits/stdc++.h>
using namespace std;
#define int long long

bool comp(char a, char b) {
    return !((b-a)>1);
}

void solve()
{
    string s;
    cin >> s;
    // sort(s.begin(),s.end(),comp);
    // cout << s << endl; return;
    for (int i = 0; i < s.length() - 1; i++)
    {
        int len = s.length() - 1;
        int mne = min(len, 9LL);
        // cout << len << mne << endl;
        for (int j = 0; j < s.length()-1; j++)
        {
            if (s[j + 1] - s[j] > 1)
            {
                swap(s[j + 1], s[j]);
                s[j] -= 1;
            }
            // cout << s << endl;
        }
    }
    cout << s << endl;
    return;
}

signed main()
{
    ios::sync_with_stdio(false), cin.tie(0);

    int tc = 1;
    cin >> tc;
    while (tc--)
    {
        solve();
    }
    return 0;
}

Submission (verdict: Accepted):
#include <bits/stdc++.h>
using namespace std;
#define int long long

void solve() {
    string s;
    cin >> s;
    int n = s.length();
    for (int i=0;i<n;i++) {
        int best = s[i];
        int index = i;
        for (int j=i;j<min(i+9,n);j++) {
            if (s[j]-s[i]>j-i) {
                if (best < s[j]-(j-i)) {
                    best = s[j]-(j-i);
                    index = j;
                }
            }
        }
        while (index>i) {
            swap(s[index],s[index-1]);
            index--;
        }
        s[i]=best;
    }
    cout << s << endl; return;
}

signed main() {
    ios::sync_with_stdio(false), cin.tie(0);

    int tc=1;
    cin >> tc;
    while (tc--) {
        solve();
    }
    return 0;
}
Problem: 2060D - Subtract Min Sort
Language: C++20 (GCC 13-64)

Previous submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>

using namespace std;



#define zedanov                   \

ios_base::sync_with_stdio(0); \

cin.tie(0);                   \

cout.tie(0);

#define int long long

#define el "\n"

const int N = 2e5 + 5, md = 1e9 + 7, inf = 1e9;

// Verify Logic, Check Constrains

// Overflow, Fits in Time/Memory ?



void doWork()

{

int n;

cin >> n;

int a[n];

for (int i = 0; i < n; i++)

cin >> a[i];

if (a[0] > a[1])

{

cout << "NO\n";

return;

}



bool good = 1;

for (int i = 2; i < n; i++)

{

if (a[i] < a[i - 1])

{

a[i - 1] -= a[i - 2];

a[i - 2] -= a[i - 2];

if (a[i] < a[i - 1])

{

good = 0;

break;

}

}

}



if (good)

cout << "YES\n";

else

cout << "NO\n";

}



signed main()

{

zedanov int t = 1;

cin >> t;

while (t--)

doWork();



return 0;

}

Submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>

using namespace std;



#define zedanov                   \

ios_base::sync_with_stdio(0); \

cin.tie(0);                   \

cout.tie(0);

#define int long long

#define el "\n"

const int N = 2e5 + 5, md = 1e9 + 7, inf = 1e9;

// Verify Logic, Check Constrains

// Overflow, Fits in Time/Memory ?



void doWork()

{

int n;

cin >> n;

int a[n];

for (int i = 0; i < n; i++)

cin >> a[i];

if (a[0] > a[1])

{

cout << "NO\n";

return;

}



a[1] %= a[0];

a[0] = 0;



bool good = 1;

for (int i = 2; i < n; i++)

{

if (a[i] < a[i - 1])

{

good = 0;

break;

}



if (a[i - 1])

{

if (a[i] % a[i - 1] == 0)

a[i] = a[i - 1];

else

a[i] = (a[i] % a[i - 1]) + a[i - 1];

}

}



// for (int i = 0; i < n; i++)

//     cout << a[i] << " ";

// cout << el;



if (good)

cout << "YES\n";

else

cout << "NO\n";

}



signed main()

{

zedanov int t = 1;

cin >> t;

while (t--)

doWork();



return 0;

}