ShaysXIA/CodeInsightBench huggingface dataset:
Problem: 2057B - Gorilla and the Exam
Language: C++17 (GCC 7-32)

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

int main()
{
    ios_base::sync_with_stdio(false), cin.tie(nullptr);
    long long t;
    cin >> t; 

    while (t--)
    {
        long long n, k;
        cin >> n >> k; 
        long long arr[n];

        
        for (long long i = 0; i < n; i++) {
            cin >> arr[i];
        }

        
        unordered_map<long long, long long> freq;
        for (long long num : arr) {
            freq[num]++;
        }
        
        vector<pair<long,long>>p;
        for(auto it : freq)
        {
               p.push_back({it.second,it.first});
        }
        sort(p.begin(),p.end());
        
        long long count = p.size();
        for(auto it:p)
        {
               if(k>=it.first)
               {
                     k-=it.first;
                     count--;
               }
               else
               {
                     break;
               }
        }
        if(count<=0)
        cout<<1<<endl;
        else
        cout << count << endl;
        
    }

    return 0;
}


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

int main()
{
    ios_base::sync_with_stdio(false), cin.tie(nullptr);
    long long t;
    cin >> t; 

    while (t--)
    {
        long long n, k;
        cin >> n >> k; 
        long long arr[n];

        
        for (long long i = 0; i < n; i++) {
            cin >> arr[i];
        }

        
        map<long long, long long> freq;
        for (long long num : arr) {
            freq[num]++;
        }
        
        vector<pair<long,long>>p;
        for(auto it : freq)
        {
               p.push_back({it.second,it.first});
        }
        sort(p.begin(),p.end());
        
        long long count = p.size();
        for(auto it:p)
        {
               if(k>=it.first)
               {
                     k-=it.first;
                     count--;
               }
               else
               {
                     break;
               }
        }
        if(count<=0)
        cout<<1<<endl;
        else
        cout << count << endl;
        
    }

    return 0;
}
Problem: 2057B - Gorilla and the Exam
Language: C++17 (GCC 7-32)

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

int main()
{
    int t;
    cin >> t; 

    while (t--)
    {
        int n, k;
        cin >> n >> k; 
        int arr[n];

        
        for (int i = 0; i < n; i++) {
            cin >> arr[i];
        }

        
        unordered_map<int, int> freq;
        for (int num : arr) {
            freq[num]++;
        }

        
        priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
        for (const auto& entry : freq) {
            pq.push({entry.second, entry.first});
        }

        
        int count = 0;
        while (k > 0 && !pq.empty()) {
            pair<int, int> top = pq.top();
            pq.pop();

            int temp = min(top.first, k);
            k -= temp;

            if (temp < top.first) {
                pq.push({top.first - temp, top.second});
                break;
            }
        }
        if(pq.empty())
        count = 1;
        
        while (!pq.empty()) {
            pq.pop();
            count++;
        }

        cout << count << endl;
    }

    return 0;
}


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

int main()
{
    ios_base::sync_with_stdio(false), cin.tie(nullptr);
    int t;
    cin >> t; 

    while (t--)
    {
        int n, k;
        cin >> n >> k; 
        int arr[n];

        
        for (int i = 0; i < n; i++) {
            cin >> arr[i];
        }

        
        unordered_map<int, int> freq;
        for (int num : arr) {
            freq[num]++;
        }

        
        priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
        for (const auto& entry : freq) {
            pq.push({entry.second, entry.first});
        }

        
        int count = 0;
        while (k > 0 && !pq.empty()) {
            pair<int, int> top = pq.top();
            pq.pop();

            int temp = min(top.first, k);
            k -= temp;

            if (temp < top.first) {
                pq.push({top.first - temp, top.second});
                break;
            }
        }
        if(pq.empty())
        count = 1;
        
        while (!pq.empty()) {
            pq.pop();
            count++;
        }

        cout << count << endl;
    }

    return 0;
}
Problem: 2057B - Gorilla and the Exam
Language: C++17 (GCC 7-32)


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

int main()
{
    int t;
    cin >> t; 

    while (t--)
    {
        int n, k;
        cin >> n >> k; 
        int arr[n];

        
        for (int i = 0; i < n; i++) {
            cin >> arr[i];
        }

        
        unordered_map<int, int> freq;
        for (int num : arr) {
            freq[num]++;
        }

        
        priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
        for (const auto& entry : freq) {
            pq.push({entry.second, entry.first});
        }

        
        int count = 0;
        while (k > 0 && !pq.empty()) {
            pair<int, int> top = pq.top();
            pq.pop();

            int temp = min(top.first, k);
            k -= temp;

            if (temp < top.first) {
                pq.push({top.first - temp, top.second});
                break;
            }
        }
        if(pq.empty())
        count = 1;
        
        while (!pq.empty()) {
            pq.pop();
            count++;
        }

        cout << count << endl;
    }

    return 0;
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)


Submission (verdict: Wrong answer on test 1):
#define mod 1000000007
#define ull unsigned long long
#define ll long long
#define cy cout<<''YES''<<endl
#define cn cout<<''NO''<<endl
#define hai cout<<-1<<endl
#define pb push_back
#define ff first
#define ss second
bool isprime(ll n){if (n <= 1)  return 0; if (n <= 3)  return 1; if (n%2 == 0 || n%3 == 0) return 0; for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0) return 0; return 1;}
#include<bits/stdc++.h>
using namespace std;
void fun(vector<ll> &num1,vector<ll> &num2){
  while(num2.size()!=num1.size()){
    num2.pb(0);
  }
}
void solve()
{
    ll v1,v2;
    cin>>v1>>v2;
    vector<ll> num1,num2;
    ll x=v1;
    while(x){
      ll w=(x&1);
      num1.pb(w);
      x=x>>1;
    }
    ll x1=v2;
    while(x1){
      ll w=(x1&1);
      num2.pb(w);
      x1=x1>>1;
    }
    
    reverse(num1.begin(),num1.end());
    reverse(num2.begin(),num2.end());
    if(num1.size()>num2.size()){
      fun(num1,num2);
    }else{
      fun(num2,num1);
    }
    // for(auto it : num1){
    //   cout<<it<<" ";
    // }
    // cout<<endl;
    // cout<<endl;
    // for(auto it : num2){
    //   cout<<it<<" ";
    // }
    // cout<<endl;
    ll x2=0;
    vector<ll> num3;
    for(ll i=0;i<num1.size();i++){
      if(num1[i]!=num2[i]){
        x2=i;
        break;
      }
      num3.pb(num1[i]);
    }
    num3.pb(0);
    x2++;
    for(ll j=x2;j<num1.size();j++){
      if(num1[j]==num2[j] && num1[j]==0){
        num3.pb(1);
      }else if(num1[j]==num2[j] && num1[j]==1){
        num3.pb(0);
      }else{
        num3.pb(1);
      }
    }
    // for(auto it : num3){
    //   cout<<it<<" ";
    // }
    // cout<<endl;
    ll value=0;
    ll ww=1;
    for(ll i=num3.size()-1;i>=0;i--){
      // cout<<num3[i]*ww<<endl;
      value+=num3[i]*ww;
      ww=2*ww;
    }
    cout<<v1<<" "<<value<<" "<<v2<<endl;
}
int32_t main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t=1;
cin>>t;
while(t--){
solve();
}
  return 0;
}
Problem: 2063B - Subsequence Update
Language: C++17 (GCC 7-32)


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



using namespace std;



int main() {

    int t;

    cin >> t;



    while (t--) {

        int n, l, r;

        cin >> n >> l >> r;

        l--;

        r--;



        vector<int> a(n);

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

            cin >> a[i];

        }



        sort(a.begin(), a.begin() + l + 1);

        sort(a.begin() + l, a.begin() + r + 1);

        sort(a.begin() + r + 1, a.end());

        

        int left = 0;

        for (int i = r, j = 0; i >= l; i--, j++) {

            if (j < l) {

                left += min(a[j], a[i]);

            } else {

                left += a[i];

            }

        }

        int right = 0;

        for (int i = r, j = r + 1; i >= l; i--, j++) {

            if (j < n) {

                right += min(a[j], a[i]);

            } else {

                right += a[i];

            }

        }

        cout << min(left, right) << "\n";

    }

    return 0;

}
Problem: 2063B - Subsequence Update
Language: C++17 (GCC 7-32)

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



using namespace std;



int main() {

    int t;

    cin >> t;



    while (t--) {

        int n, l, r;

        cin >> n >> l >> r;

        l--;

        r--;



        vector<int> a(n);

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

            cin >> a[i];

        }



        sort(a.begin(), a.begin() + l + 1);

        sort(a.begin() + l, a.begin() + r + 1);

        sort(a.begin() + r + 1, a.end());

        

        int left = 0;

        for (int i = r, j = 0; i >= l; i--, j++) {

            if (j < l) {

                left += min(a[j], a[i]);

            } else {

                left += a[i];

            }

        }

        int right = 0;

        for (int i = r, j = r + 1; i >= l; i--, j++) {

            if (j < n) {

                right += min(a[j], a[i]);

            } else {

                right += a[i];

            }

        }

        cout << min(left, right) << "\n";

    }

    return 0;

}

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



using namespace std;



int main() {

    ios::sync_with_stdio(false);

    cin.tie(nullptr);

    

    int t;

    cin >> t;



    while (t--) {

        int n, l, r;

        cin >> n >> l >> r;

        l--;

        r--;



        vector<int> a(n);

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

            cin >> a[i];

        }

        sort(a.begin(), a.begin() + l);

        sort(a.begin() + l, a.begin() + r + 1);

        sort(a.begin() + r + 1, a.end());

        

        int left = 0;

        for (int i = r, j = 0; i >= l; i--, j++) {

            if (j < l) {

                left += min(a[j], a[i]);

            } else {

                left += a[i];

            }

        }

        int right = 0;

        for (int i = r, j = r + 1; i >= l; i--, j++) {

            if (j < n) {

                right += min(a[j], a[i]);

            } else {

                right += a[i];

            }

        }

        cout << min(left, right) << "\n";

    }

    return 0;

}
Problem: 2063B - Subsequence Update
Language: C++17 (GCC 7-32)

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



using namespace std;



int main() {

    ios::sync_with_stdio(false);

    cin.tie(nullptr);

    

    int t;

    cin >> t;



    while (t--) {

        int n, l, r;

        cin >> n >> l >> r;

        l--;

        r--;



        vector<int> a(n);

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

            cin >> a[i];

        }

        sort(a.begin(), a.begin() + l);

        sort(a.begin() + l, a.begin() + r + 1);

        sort(a.begin() + r + 1, a.end());

        

        int left = 0;

        for (int i = r, j = 0; i >= l; i--, j++) {

            if (j < l) {

                left += min(a[j], a[i]);

            } else {

                left += a[i];

            }

        }

        int right = 0;

        for (int i = r, j = r + 1; i >= l; i--, j++) {

            if (j < n) {

                right += min(a[j], a[i]);

            } else {

                right += a[i];

            }

        }

        cout << min(left, right) << "\n";

    }

    return 0;

}

Submission (verdict: Accepted):
#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int t;
    cin >> t;

    while (t--) {
        int n, l, r;
        cin >> n >> l >> r;
        l--;
        r--;

        vector<int> a(n);
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }
        sort(a.begin(), a.begin() + l);
        sort(a.begin() + l, a.begin() + r + 1);
        sort(a.begin() + r + 1, a.end());
        
        long long left = 0;
        for (int i = r, j = 0; i >= l; i--, j++) {
            if (j < l) {
                left += min(a[j], a[i]);
            } else {
                left += a[i];
            }
        }
        long long right = 0;
        for (int i = r, j = r + 1; i >= l; i--, j++) {
            if (j < n) {
                right += min(a[j], a[i]);
            } else {
                right += a[i];
            }
        }
        cout << min(left, right) << "\n";
    }
    return 0;
}
Problem: 2062C - Cirno and Operations
Language: C++17 (GCC 7-32)


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

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n;
		cin >> n;
		vector<int> a;
		int x;
		long long mxsum = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> x;
			a.push_back(x);
			mxsum += x;
		}

		while (a.size() > 1)
		{
			reverse(a.begin(), a.end());
			for (int i = 0; i < a.size() - 1; i++)
			{
				a[i] = a[i + 1] - a[i];
			}
			a.pop_back();
			long long sum = 0;
			for (auto it : a)
			{
				sum += it;
			}
			mxsum = max(sum, mxsum);
		}
		mxsum = max(mxsum, (long long)a[0]);
		cout << mxsum << endl;
	}
}
Problem: 2062C - Cirno and Operations
Language: C++17 (GCC 7-32)

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

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n;
		cin >> n;
		vector<long long int> a;
		int x;
		long long int mxsum = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> x;
			a.push_back(x);
			mxsum += x;
		}

		while (a.size() > 1)
		{
			reverse(a.begin(), a.end());
			for (int i = 0; i < a.size() - 1; i++)
			{
				a[i] = a[i + 1] - a[i];
			}
			a.pop_back();
			long long int sum = 0;
			for (auto it : a)
			{
				sum += it;
			}
			mxsum = max(sum, mxsum);
		}
		mxsum = max(mxsum, a[0]);
		cout << mxsum << endl;
	}
}


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

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n;
		cin >> n;
		vector<long long int> a;
		long long int x;
		long long int mxsum = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> x;
			a.push_back(x);
			mxsum += x;
		}

		while (a.size() > 1)
		{
			for (int i = 0; i < a.size() - 1; i++)
			{
				a[i] = a[i + 1] - a[i];
			}
			a.pop_back();
			long long int sum = 0;
			for (auto it : a)
			{
				sum += it;
			}
			
			mxsum = max(abs(sum), mxsum);
		}
		mxsum = max(mxsum, a[0]);
		cout << mxsum << endl;
	}
}
Problem: 2062C - Cirno and Operations
Language: C++17 (GCC 7-32)

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

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n;
		cin >> n;
		vector<int> a;
		int x;
		long long mxsum = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> x;
			a.push_back(x);
			mxsum += x;
		}

		while (a.size() > 1)
		{
			reverse(a.begin(), a.end());
			for (int i = 0; i < a.size() - 1; i++)
			{
				a[i] = a[i + 1] - a[i];
			}
			a.pop_back();
			long long sum = 0;
			for (auto it : a)
			{
				sum += it;
			}
			mxsum = max(sum, mxsum);
		}
		mxsum = max(mxsum, (long long)a[0]);
		cout << mxsum << endl;
	}
}


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

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n;
		cin >> n;
		vector<long long int> a;
		int x;
		long long int mxsum = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> x;
			a.push_back(x);
			mxsum += x;
		}

		while (a.size() > 1)
		{
			reverse(a.begin(), a.end());
			for (int i = 0; i < a.size() - 1; i++)
			{
				a[i] = a[i + 1] - a[i];
			}
			a.pop_back();
			long long int sum = 0;
			for (auto it : a)
			{
				sum += it;
			}
			mxsum = max(sum, mxsum);
		}
		mxsum = max(mxsum, a[0]);
		cout << mxsum << endl;
	}
}
Problem: 2052A - Adrenaline Rush
Language: C++20 (GCC 13-64)


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

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const ll lmax = 9223372036854775807;
const ll N = 1e9 + 7;


int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int tt = 1;
    while(tt--){
        int n; cin >> n;
        vector<int> c(n);
        for (int i = 0; i < n; i++) cin >> c[i];

        vector<int> v(n + 1, 1);

        vector<pair<int, int>> ans;

        for (auto x : c){
            for (int i = x + 1; i <= n; i++){
                if (!v[i]) continue;
                ans.push_back({i, x});
            }
            for (int i = x + 1; i <= n; i++){
                if (!v[i]) continue;
                ans.push_back({x, i});
            }
            for (int i = x - 1; i > 0; i--){
                if (!v[i]) continue;
                ans.push_back({x, i});
            }
            v[x] = 0;
        }

        cout << ans.size() << '\n';

        for (auto[x, y] : ans){
            cout << x << ' ' << y << '\n';
        }
    }
}



/*

1- Figure out the Nature of an Optimal Solution.

2- Solve subtasks of the original problem and then trying to extend/generalize your solution.

3- Fix a parameter and then trying to maximise the result with respect to that fixed parameter.

4- Find necessary and sufficient conditions. Are they the same?

5- Identify Lower and Upper bounds, and construct them.

6- Reduce a problem into smaller subproblems.

7- Consider the Decision Version of the Problem instead (specially counting problems).

8- Assume the opposite, and start constructing a structure until you find a contradiction.

*/
Problem: 2050C - Uninteresting Number
Language: C++23 (GCC 14-64, msys2)


Submission (verdict: Wrong answer on test 2):
#include "bits/stdc++.h"
#define int long long
#define uint unsigned long long
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define fr(i,n) for(int i=0; i<(n); i++)
#define rep(i,a,n) for(int i=(a); i<=(n); i++)
#define nl cout<<"\n"
#define dbg(var) cout<<#var<<"="<<var<<" "
#define all(v) v.begin(),v.end()
#define srt(v)  sort(v.begin(),v.end())         // sort 
#define mxe(v)  *max_element(v.begin(),v.end())     // find max element in vector
#define mne(v)  *min_element(v.begin(),v.end())     // find min element in vector
#define unq(v)  v.resize(distance(v.begin(), unique(v.begin(), v.end())));
// make sure to sort before applying unique // else only consecutive duplicates would be removed 
#define bin(x,y)  bitset<y>(x) 
using namespace std;
int MOD=1e9+7;      // Hardcoded, directly change from here for functions!



void modadd(int &a , int b) {a=((a%MOD)+(b%MOD))%MOD;}
void modsub(int &a , int b) {a=((a%MOD)-(b%MOD)+MOD)%MOD;}
void modmul(int &a , int b) {a=((a%MOD)*(b%MOD))%MOD;}
// ================================== take ip/op like vector,pairs directly!==================================
template<typename typC,typename typD> istream &operator>>(istream &cin,pair<typC,typD> &a) { return cin>>a.first>>a.second; }
template<typename typC> istream &operator>>(istream &cin,vector<typC> &a) { for (auto &x:a) cin>>x; return cin; }
template<typename typC,typename typD> ostream &operator<<(ostream &cout,const pair<typC,typD> &a) { return cout<<a.first<<' '<<a.second; }
template<typename typC,typename typD> ostream &operator<<(ostream &cout,const vector<pair<typC,typD>> &a) { for (auto &x:a) cout<<x<<'\n'; return cout; }
template<typename typC> ostream &operator<<(ostream &cout,const vector<typC> &a) { int n=a.size(); if (!n) return cout; cout<<a[0]; for (int i=1; i<n; i++) cout<<' '<<a[i]; return cout; }
// ===================================END Of the input module ==========================================


void solve() {
    int n;
    cin >> n;
    if (n % 9 == 0) {
        cout << "Yes" << endl;
        return;
    }

    int cnt2 = 0, cnt3 = 0;
    int sum = 0;
    int temp = n;

    // Calculate digit sum and counts of 2 and 3
    while (temp) {
        int a = temp % 10;
        sum += a;
        if (a == 2) cnt2++;
        if (a == 3) cnt3++;
        temp /= 10;
    }

    // Attempt to modify sum
    for (int i = 0; i < 8; ++i) {
        if (sum % 9 == 0) {
            cout << "Yes" << endl;
            return;
        }
        if (cnt2 > 0) {
            sum += 2;
            cnt2--;
        } else if (cnt3 > 0) {
            sum += 6;
            cnt3--;
        }
    }

    cout << "No" << endl;
}


int32_t main()
{
 
 ios_base::sync_with_stdio(false);
 cin.tie(NULL);

    int T = 1;
    cin >> T;
    while (T--)
    {
        solve();
    }
    return 0;
}
Problem: 2050D - Digital string maximization
Language: C++17 (GCC 7-32)

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

#include <string>

#include <vector>



int main() {

std::ios_base::sync_with_stdio(false);

std::cin.tie(nullptr);



int t;

std::cin >> t;



while (t--) {

std::string s;

std::cin >> s;



int n = s.length();

bool changed = true;



while (changed) {

changed = false;



for (int i = 1; i < n; i++) {

if (s[i] == '0') continue;



for (int j = i - 1; j >= 0; j--) {

std::string temp = s;

temp[i]--;

std::swap(temp[j], temp[i]);



if (temp > s) {

s = temp;

changed = true;

break;

}

}



if (changed) break;

}

}



std::cout << s << '\n';

}



return 0;

}

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

#include <string>



int main() {

std::ios_base::sync_with_stdio(false);

std::cin.tie(nullptr);



int t;

std::cin >> t;



while (t--) {

std::string s;

std::cin >> s;



bool improved = true;

while (improved) {

improved = false;



for (int i = 1; i < s.size(); i++) {

if (s[i] == '0') continue;



for (int j = i-1; j >= 0; j--) {

std::string temp = s;

temp[i]--;

std::swap(temp[i], temp[j]);



if (temp > s) {

s = temp;

improved = true;

goto found_improvement;

}

}

}

found_improvement:;

}



std::cout << s << "\n";

}



return 0;

}
Problem: 2050D - Digital string maximization
Language: C++17 (GCC 7-32)


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

using namespace std;



void solve() {

int t;

cin >> t;

while (t--) {

string s;

cin >> s;

int n = s.size();

for (int i = n - 1; i > 0; --i) {

if (s[i] > '0' && s[i] - 1 >= s[i - 1]) {

swap(s[i], s[i - 1]);

s[i]--;

i = min(i + 2, n);

}

}

cout << s << "\n";

}

}



int main() {

ios::sync_with_stdio(0);

cin.tie(0);

solve();

return 0;

}