ShaysXIA/CodeInsightBench huggingface dataset:
Problem: 2049C - MEX Cycle
Language: C++17 (GCC 7-32)

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

using namespace std;



int main() {

	// your code goes here

	int t; cin>>t; while(t--){

	    int n,x,y; cin>>n>>x>>y;

	    vector<int> a(n,0);

	    

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

             a[i]=i%2;

	    }

	    

	    if(!(n%2)){

	        if(x%2==y%2) a[x-1]=2;

	    }

	    else{

	        a[n-1]=2;

	        if(max(x,y)!=n){

	            if(x%2==y%2) a[max(x,y)-1]=2;

	        }

	    }

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

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

	    }

	    cout<<"\n";

	    

	    

	    

	}



}



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

using namespace std;



int main() {

	// your code goes here

	int t; cin>>t; while(t--){

	    int n,x,y; cin>>n>>x>>y;

	    vector<int> a(n,0);

	    

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

             a[i]=i%2;

	    }

	    

	    if(!(n%2)){

	        if(x%2==y%2) a[x-1]=2;

	    }

	    else{

	        a[n-1]=2;

	        if(max(x,y)!=n){

	            if(x%2==y%2) {

	                if(min(x,y)==1) a[0]=3;

	                else a[min(x,y)-1]=2;

	            }

	        }

	    }

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

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

	    }

	    cout<<"\n";

	    

	    

	    

	}



}
Problem: 2049C - MEX Cycle
Language: C++17 (GCC 7-32)

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

using namespace std;



int main() {

	// your code goes here

	int t; cin>>t; while(t--){

	    int n,x,y; cin>>n>>x>>y;

	    vector<int> a(n,0);

	    

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

             a[i]=i%2;

	    }

	    

	    if(!(n%2)){

	        if(x%2==y%2) a[x-1]=2;

	    }

	    else{

	        a[n-1]=2;

	        if(max(x,y)!=n){

	            if(x%2==y%2) {

	                if(min(x,y)==1) a[0]=3;

	                else a[min(x,y)-1]=2;

	            }

	        }

	    }

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

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

	    }

	    cout<<"\n";

	    

	    

	    

	}



}



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

using namespace std;



int main() {

	// your code goes here

	int t; cin>>t; while(t--){

	    int n,x,y; cin>>n>>x>>y;

	    vector<int> a(n,0);

	    

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

             a[i]=i%2;

	    }

	    

	    if(!(n%2)){

	        if(x%2==y%2) a[x-1]=2;

	    }

	    else{

	        a[n-1]=2;

	        if(max(x,y)!=n){

	            if(x%2==y%2) {

	                if(min(x,y)==1) {a[0]=2; a[n-1]=0;}

	                else a[min(x,y)-1]=2;

	            }

	        }

	    }

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

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

	    }

	    cout<<"\n";

	    

	    

	    

	}



}
Problem: 2049C - MEX Cycle
Language: C++17 (GCC 7-32)


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

using namespace std;



int main() {

	// your code goes here

	int t; cin>>t; while(t--){

	    int n,x,y; cin>>n>>x>>y;

	    vector<int> a(n,0);

	    

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

             a[i]=i%2;

	    }

	    

	    if(!(n%2)){

	        if(x%2==y%2) a[x-1]=2;

	    }

	    else{

	        a[n-1]=2;

	        if(max(x,y)!=n){

	            if(x%2==y%2) a[max(x,y)-1]=2;

	        }

	    }

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

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

	    }

	    cout<<"\n";

	    

	    

	    

	}



}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)

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

void solve(){
    ll n;
    cin>>n;
    ll a[n];
    for (int i=0;i<n;i++){
        cin>>a[i];
    }
    bool f=false;
    for (int i=0;i<n-1;i++){
        if (a[i+1]<a[i] && a[i+2]<a[i+1]){
            f=true;
        }
    }
    if (f){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

int main() {
    int T;
    cin>>T;
    while(T--){
        solve();
    }
}


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

void solve(){
    ll n;
    cin>>n;
    ll a[n];
    for (int i=0;i<n;i++){
        cin>>a[i];
    }
    bool f=false;
    if (n==2){
        if (a[1]<a[0]){
            f=true;
        }
    }
    else{
        for (int i=1;i<n-1;i++){
            if (a[i-1]>a[i] && a[i]>a[i+1]){
                f=true;
            }
        }
        
    }
    if (f){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

int main() {
    int T;
    cin>>T;
    while(T--){
        solve();
    }
}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)

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

void solve(){
    ll n;
    cin>>n;
    ll a[n];
    for (int i=0;i<n;i++){
        cin>>a[i];
    }
    bool f=false;
    if (n==2){
        if (a[1]<a[0]){
            f=true;
        }
    }
    else{
        for (int i=1;i<n-1;i++){
            if (a[i-1]>a[i] && a[i]>a[i+1]){
                f=true;
            }
        }
        
    }
    if (f){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

int main() {
    int T;
    cin>>T;
    while(T--){
        solve();
    }
}


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

void solve(){
    ll n;
    cin>>n;
    ll a[n];
    for (int i=0;i<n;i++){
        cin>>a[i];
    }
    bool f=false;
    if (n==2){
        if (a[1]<a[0]){
            f=true;
        }
    }
    else if (n==3){
        if (a[1]<a[0] && a[2]>a[1]-a[0]){
            f=true;
        }
    }
    else{
        for (int i=1;i<n-1;i++){
            if (a[i-1]>a[i] && a[i]>a[i+1]){
                f=true;
            }
        }
        
    }
    if (f){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

int main() {
    int T;
    cin>>T;
    while(T--){
        solve();
    }
}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)

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

void solve(){
    ll n;
    cin>>n;
    ll a[n];
    for (int i=0;i<n;i++){
        cin>>a[i];
    }
    bool f=false;
    if (n==2){
        if (a[1]<a[0]){
            f=true;
        }
    }
    else if (n==3){
        if (a[1]<a[0] && a[2]>a[1]-a[0]){
            f=true;
        }
    }
    else{
        for (int i=1;i<n-1;i++){
            if (a[i-1]>a[i] && a[i]>a[i+1]){
                f=true;
            }
        }
        
    }
    if (f){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

int main() {
    int T;
    cin>>T;
    while(T--){
        solve();
    }
}


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

void solve(){
    ll n;
    cin>>n;
    ll a[n];
    for (int i=0;i<n;i++){
        cin>>a[i];
    }
    bool f=false;
    if (n==2){
        if (a[1]<a[0]){
            f=true;
        }
    }
    else{
        for (int i=0;i<n-1;i++){
            if (a[i]>a[i+1]){
                f=true;
            }
            a[i+1]=a[i+1]-a[i];
        }
        
    }
    if (f){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

int main() {
    int T;
    cin>>T;
    while(T--){
        solve();
    }
}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)


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

void solve(){
    ll n;
    cin>>n;
    ll a[n];
    for (int i=0;i<n;i++){
        cin>>a[i];
    }
    bool f=false;
    for (int i=0;i<n-1;i++){
        if (a[i+1]<a[i] && a[i+2]<a[i+1]){
            f=true;
        }
    }
    if (f){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

int main() {
    int T;
    cin>>T;
    while(T--){
        solve();
    }
}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)

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

#include <vector>

#include <algorithm>

using namespace std;

 

typedef long long ll;

 

int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            cout<<"NO"<<endl;

            continue;

        }

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}

Submission (verdict: Accepted):
#include <iostream>

#include <vector>

#include <algorithm>

using namespace std;

 

typedef long long ll;

 

int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            cout<<"NO"<<endl;

            continue;

        }

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>=a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)


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

#include <vector>

#include <algorithm>

using namespace std;



typedef long long ll;



int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)

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

#include <vector>

#include <algorithm>

using namespace std;

 

typedef long long ll;

 

int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            cout<<"NO"<<endl;

            break;

        }

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}

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

#include <vector>

#include <algorithm>

using namespace std;

 

typedef long long ll;

 

int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            cout<<"NO"<<endl;

            continue;

        }

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)

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

#include <vector>

#include <algorithm>

using namespace std;

 

typedef long long ll;

 

int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            cout<<"NO"<<endl;

            continue;

        }

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}

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

#include <vector>

#include <algorithm>

using namespace std;

 

typedef long long ll;

 

int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            cout<<"NO"<<endl;

            continue;

        }

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}
Problem: 2060D - Subtract Min Sort
Language: C++17 (GCC 7-32)

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

#include <vector>

#include <algorithm>

using namespace std;



typedef long long ll;



int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}



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

#include <vector>

#include <algorithm>

using namespace std;

 

typedef long long ll;

 

int main() {

    int t;

    cin>>t;

    

    

    while(t--){

        int n;

        cin>>n;

        vector<ll>a(n);

        for(int i=0; i<n; i++)cin>>a[i];

        

        bool ok=true;

        

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

            cout<<"NO"<<endl;

            break;

        }

        

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

            ll minimo;

            

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

                ok=false;

                break;

            }

            

            if(a[i]>a[i-1]){

                minimo=min(a[i-1],a[i]);

                a[i-1]-=minimo;

                a[i]-=minimo;

            }

            

            

            

        }    

        

        if(ok){

            cout<<"YES"<<endl;

        }else{

            cout<<"NO"<<endl;

        }

        

    }

    

    return 0;

}
Problem: 2061D - Kevin and Numbers
Language: C++20 (GCC 13-64)


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

using namespace std;



#define endl '\n'

#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)



typedef long long LL;

typedef pair<int, int> PII;

typedef pair<LL, LL> PLL;

typedef map<int,int> Map;

typedef unordered_map<int, int> UnMap;

typedef unordered_set<int> Set;

typedef map<LL,LL> MaL;

const int Mod = 998244353;

const int N = 2e5 + 10;



int Add(int a, int b)

{

    return a + b >= Mod ? a + b - Mod : a + b;

}



int Sub(int a, int b)

{

    return a - b < 0 ? a - b + Mod : a - b;

}



int Mul(int a, int b)

{

    return 1LL * a * b % Mod;

}



int Pow(int a, int k)

{

    int R = 1;

    while (k)

    {

        if (k & 1) R = Mul(R, a);

        k >>= 1;

        a = Mul(a, a);

    }

    return R;

}



int Div(int a, int b)

{

    return Mul(a, Pow(b, Mod - 2));

}



int Fac[N + 10], Inv[N + 10];

 

void init()

{

    Fac[0] = 1;

    for(int i = 1 ; i <= N ; i ++)

        Fac[i] = Mul(Fac[i - 1], i);

    Inv[N] = Pow(Fac[N], Mod - 2);

    for(int i = N - 1; i >= 0 ; i --)

        Inv[i] = Mul(Inv[i + 1], i + 1);

}

 

int C(int n, int m)

{

    return Mul(Fac[n], Mul(Inv[m], Inv[n - m]));

}

 



int lowbit(int x)

{

    return x & (-x);

}



int primes[N], cnt;         //     primes记录从2-n中的素数,cnt记录素数个数 



bool st[N];                 



void get_primes(int n)

{

    st[1] = true;

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

	{

		if(!st[i])

		{

			primes[cnt ++] = i;

	    }

	    

		for(int j = 0; primes[j] <= n / i; j ++)

		{

		    st[primes[j] * i] = true;

		    if(i % primes[j] == 0) break;

	    }

	}

}



void solve()

{

    int n,m; cin >> n >> m;

    Map mb,ma;

    vector<int> a(n + 1);

    priority_queue<int> q;



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

        cin >> a[i];

        ma[a[i]] ++;

    }



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

        int x; cin >> x;

        q.push(x);

    }



    while(!q.empty()){

        if(m > n){

            cout << "No" << endl;

            return;

        }

        int tt = q.top();

        q.pop();

        //cout << tt << endl;

        if(tt >= 2)

        {

            if(ma[tt] == 0 || (mb[tt] > ma[tt])){

                int l = tt / 2, r = tt / 2 + (tt % 2 == 1);

                q.push(l);

                q.push(r);

                //cout << l << " " << r << endl;

                if(mb[tt] > ma[tt]) mb[tt] --;

                m += 2;

                continue;

            }

        }

        mb[tt] ++;

    }



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

        if(ma[a[i]] != mb[a[i]]){

            cout << "No" << endl;

            return;

        }

    }

    cout << "Yes" << endl; 



}



signed main()

{

    IOS;

    int t = 1; 

    cin >> t;

    while(t --)

    {

        solve();

    }

}
Problem: 2050B - Transfusion
Language: C++17 (GCC 7-32)

Previous submission (verdict: Time limit exceeded on test 3):
#include <bits/stdc++.h>

using  namespace std;

int main() {

    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    int t;cin >> t;

    while (t--) {

        int n;cin >> n;

        vector<int>v(n);

        int count = 0;

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

        if (count % n){cout << "NO" << endl;continue;}

        int sum = count / n;

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

            while (v[i - 1] != sum) {

                if (v[i - 1] < sum) {

                    v[i - 1]++;v[i + 1]--;

                }else {

                    v[i - 1]--;v[i + 1]++;

                }

            }

        }

        bool f = true;

        for (int i = 0;i < v.size();i++) {

            if (v[i] != sum){f = false;break;}

        }

        if (f)cout << "YES" << endl;else cout << "NO" << endl;

        v.clear();

    }

}

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

using  namespace std;

int main() {

    int t;cin >> t;

    while (t--) {

        int n;cin >> n;

        vector<int>v(n);

        vector<int>v2(n);

        int count = 0;

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

        for (int i = 0;i < v.size();i++)v2[i] = v[i];

        if (count % n){cout << "NO" << endl;continue;}

        int sum = count / n;

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

            int j1,j2;

            if (v[i - 1] < sum && v[i + 1] > sum) {

                j1 = sum - v[i - 1];

                v[i - 1] += j1;

                v[i + 1] -= j1;

            }else if (v[i - 1] > sum && v[i + 1] < sum){

                j1 = v[i - 1] - sum;

                v[i - 1] -= j1;

                v[i + 1] += j1;

            }

            else {

                j1 = v[i - 1] - sum;

                v[i - 1] -= j1;

                v[i + 1] += j1;

            }

        }

        bool f = true;

        for (int i = 0;i < v.size();i++) {

            if (v[i] != sum){f = false;break;}

        }

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

            int j1,j2;

            if (v[i - 1] < sum && v[i + 1] > sum) {

                j1 = sum - v[i - 1];

                v[i - 1] += j1;

                v[i + 1] -= j1;

            }else if (v[i - 1] > sum && v[i + 1] < sum){

                j1 = v[i - 1] - sum;

                v[i - 1] -= j1;

                v[i + 1] += j1;

            }

            else {

                j1 = sum - v[i - 1];

                v[i - 1] += j1;

                v[i + 1] -= j1;

            }

        }

        bool t = true;

        for (int i = 0;i < v2.size();i++) {

            if (v2[i] != sum){t = false;break;}

        }

        if (f || t)cout << "YES" << endl;else cout << "NO" << endl;

        v.clear();v2.clear();

    }

}