akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
	string S;
	cin >> S;

	int count = 0;
	for (int i = 0; i < S.length(); i++) {
		if (S[i] == 'o') {
			count++;
		}
	}

	if (count + (15 - S.length()) >= 8) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}


	return 0;
}

Measured memory_bytes: 256
/* -> Written by <-
   -----------
  |K_A_Z_A_M_A|
  |___________|
  |    _    |
  |   (^_^)   |
  |  /( | )\  |
  |____|_|____|
    H O A N G
*/

#define Task ""
#define F first
#define S second
#define push_back pb
#define bit(x, i) (x >> i) & 1
#define inf 1e9 + 7
#define INF 1e18 + 7

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <string>
#include <sstream>
#include <cstdio>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <unordered_map>
#include <stack>

using namespace std;

typedef long long ll;

const int MOD = 1e9 + 7;
const int maxn = 2e5 + 5;

string s;
int cnt = 0;

void Solve()
{
    cin >> s;
    for (int i = 0; i < s.size(); i ++)
    {
        char ch;
        cin >> ch;
        if (s[i] != ch) cnt ++;
    }
    cout << cnt;
}

int main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    if(fopen(Task".inp", "r"))
    {
        freopen(Task".inp","r",stdin);
        freopen(Task".out","w",stdout);
    }
    int test_case = 1;
//    cin >> test_case;
    while (test_case --)
        Solve();
    return 0;
}


Measured memory_bytes: 3740
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
#define repi(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,a) repi(i,0,a)
#define all(a) (a).begin(), (a).end()

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

using ll = long long;

ll N;
ll A[200010];
std::map<ll, ll> mp;
ll sum = 0;

int main()
{
  scanf( "%lld", &N );

  rep( i, N )
    scanf( "%lld", A+i ), ++mp[A[i]];

  for( auto it = mp.begin(); it != mp.end(); ++it )
  {
    if( it->second >= 2 )
      sum += (it->second)*(it->second-1)/2;
  }

  rep( i, N )
  {
    ll x = mp[A[i]];
    ll ret = sum-(x*(x-1)/2)+((x-1)*(x-2)/2);

    printf( "%lld\n", ret );
  }

  return 0;
}

Measured memory_bytes: 11008
#include <iostream>
#include <sstream>
#include <numeric>
#include <stack>
#include <iomanip>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <queue>
#include <cmath>

#define BEGIN(x) x.begin()
#define END(x) x.end()
#define ALL(x) BEGIN(x), END(x)
#define PAIR make_pair
#define VEC(type) vector<type >
#define endl '\n'

#define FOR(i, A, B) for(auto i = (A);i != (B); i++)
#define FORD(i, A, B) for(auto i = (A);i != (B); i--)

#define READRANGE(begin, end) FOR(it, begin, end) cin >> *it
#define READVEC(V) READRANGE(BEGIN(V), END(V))

using namespace std;

typedef long long lint;
typedef pair<int, int> Pii;
typedef pair<int, lint> Pil;
typedef pair<lint, lint> Pll;
typedef pair<lint, int> Pli;

// ---- BEGIN LIBRARY CODE ----
// ---- END LIBRARY CODE ----
void io_init()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
};

int main(int argc, char **argv)
{
    io_init();

    // Actual program code starts here.
    int N;
    cin >> N;
    VEC(int) W(N);
    READVEC(W);
    int ret = 1 << 30, totalSum = accumulate(ALL(W), 0), runningTotal = 0;
    FOR(i, 0, N) {
        runningTotal += W[i];
        ret = min(ret, abs(2 * runningTotal - totalSum));
    }

    cout << ret << endl;
    return 0;
};


Measured memory_bytes: 256
import java.io.*;
import java.util.Scanner;

class Main{
    public static void main(String[] args)throws IOException{
	BufferedReader br=
	    new BufferedReader(new InputStreamReader(System.in));
	while(true){
	    int n,m;
	    String[] buf=br.readLine().split(" ");
	    n=Integer.parseInt(buf[0]);
	    m=Integer.parseInt(buf[1]);
	    if(n==0 && m==0)break;
	    boolean[][] check =new boolean[n][m];
	    char[][] data=new char[n][m];
	    for(int i=0;i<n;i++){
		    String s=br.readLine();
		    data[i]=s.toCharArray();
	    }
	    int i=0,j=0;
	    while(true){
		if(check[i][j]){
		    System.out.println("LOOP");
		    break;
		}else if(data[i][j]=='.'){
		    System.out.printf("%d %d\n",j,i);
		    break;
		}
		int t_i=i,t_j=j;
		check[i][j]=true;
		i=next_v(data[t_i][t_j],t_i);
		j=next_h(data[t_i][t_j],t_j);
	    }
	}
    }
    public static int next_v(char data,int i){
	if(data=='v')
	    return i+1;
	if(data=='^')
	    return i-1;
	return i;
    }
    public static int next_h(char data,int j){
	if(data=='>')
	    return j+1;
	if(data=='<')
	    return j-1;
	return j;
    }
}

Measured memory_bytes: 11000
#include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long ll;


int main() {

    int n, k;
    cin >> n >> k;
    if (n % k == 0) cout << 0 << endl;
    else cout << 1 << endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
double dp[3001][3001];
int main()
{
    int n;
    
    dp[0][0]=1;

    cin >> n;
    double p[3001];

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

    for(int j=1;j<=n;j++)
    { 
        dp[0][j] = (1-p[j-1])*(dp[0][j-1]);
         for(int i=1;i<=j;i++)
        {
            dp[i][j]=p[j-1]*dp[i-1][j-1] + (1-p[j-1])*dp[i][j-1];
        }
    }

    double ans;
    for(int i=n/2+1;i<=n;i++)
    {
        ans+=dp[i][n];
    }
    cout << setprecision(9) <<  ans << endl;
}

Measured memory_bytes: 70016
#include <cstdio>
#include <iostream>
#include <set>
#include <map>
#include <algorithm>
#include <string>
#include <cstring>
using namespace std;
const int maxn = 2e5 + 100;
int f[maxn];
int d[maxn];
int ff(int x){
    if (f[x] == x) return x;
    int a = f[x];
    int b = ff(f[x]);
    d[x] += d[a]; 
    f[x] = b;
    return b;
}
int unit(int x,int y,int z){
    int fx = ff(x);
    int fy = ff(y);
    if (fx == fy){
        return (d[y] - d[x]) == z;
    }
    f[fy] = fx;
    d[fy] = d[x] + z -d[y];
    return 1;
}
int main(){
    int n,m;
    scanf("%d%d",&n,&m);
    for (int i = 1; i <= n; i++) f[i] = i;
    int flag = 0;
    for (int i = 0; i < m; i++){
        int x,y,d;
        scanf("%d%d%d",&x,&y,&d);
        if (!unit(x,y,d))
        {
            flag = 1;
        }
    }
    if (flag) printf("No\n");
    else printf("Yes\n");
}

Measured memory_bytes: 1024
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<deque>
#include<iomanip>
#include<tuple>
using namespace std;
typedef long long int LL;
typedef pair<int,int> P;
typedef pair<LL,int> LP;
const int INF=1<<30;
const LL MAX=1e9+7;

void array_show(int *array,int array_n,char middle=' '){
	for(int i=0;i<array_n;i++)printf("%d%c",array[i],(i!=array_n-1?middle:'\n'));
}
void array_show(LL *array,int array_n,char middle=' '){
	for(int i=0;i<array_n;i++)printf("%lld%c",array[i],(i!=array_n-1?middle:'\n'));
}

LL t[100005];

int main(){
	LL n,m;
	int i,j,k;
	LL a,b,c;
	LL s=0;
	cin>>n;
	m=0;
	for(i=0;i<n;i++){
		cin>>t[i];
		m^=t[i];
	}
	for(i=60;i>=0;i--){
		a=(LL)1<<i;
		b=-1;
		if(a&m)continue;
		for(j=0;j<n;j++){
			if((a&t[j])==0)continue;
			if(b==-1)b=t[j],t[j]=0;
			else t[j]^=b;
		}
		if(b==-1)continue;
		if((s&a)==0)s^=b;
	}
	cout<<s+(s^m)<<endl;

}

Measured memory_bytes: 1024
#include <stdio.h>

int main()
{   
    char str[101] = {};
    int i,count=0,strc=0;
    scanf("%s",str);
    for(i=0;str[i]!='\0';i++) strc++;
    int left=0, right=strc-1;
    while(1)
    {  
        while(str[left] == str[right])
        {
            left++;
            right--;
        }
        if(left>=right) break;
        str[right] = str[left];
        count++;
    }
    printf("%d \n",count);
    return 0;
}

Measured memory_bytes: 128
import java.util.Scanner;
public class Main {
	public static void main(String[]args) {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	}
}


Measured memory_bytes: 21844
main = do
  [h,w] <- map read . words <$> getLine :: IO [Integer]
  getLine
  as <- map read . words <$> getLine :: IO [Integer]
  let f i j n (0:as) r xs = f i j (n+1) as r xs
      f 0 _ _ _ _ _ = []
      f i 0 n as True xs = reverse xs : f (i-1) w n as False []
      f i 0 n as False xs = xs : f (i-1) w n as True []
      f i j n (a:as) r xs = f i (j-1) n (a-1:as) r (n:xs)
  mapM (putStrLn . unwords . map show) $ f h w 1 as True []

Measured memory_bytes: 2044
#include <bits/stdc++.h>
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"	
	typedef long long LL;
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define mod2 998244353
	#define INFINITE 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define sz(v) ((ll)(v).size())
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define pb push_back
	#define f first
	#define s second
	#define dbg(a) cout<<#a<<" --> "<<(a)<<"\n";
	#define forn(i,n) for (ll i=0; i<(n); ++i)
	#define fornd(i,n) for (ll i=(n)-1; i>=0; --i)	
	#define forab(i,a,b) for (ll i=(a); i<=(b); ++i)
	#define read(a) ll a; cin >> a;
	#define reads(s) string s; cin >> s;
	#define readb(a, b) ll a, b; cin >> a >> b;
	#define readc(a, b, c) ll a, b, c; cin >> a >> b >> c;
	#define readarr(a, n) int a[(n) + 1] = {}; forab(i, 0, (n-1)) {cin >> a[i];}
	#define readmat(a, n, m) int a[n + 1][m + 1] = {}; forab(i, 1, n) {forab(j, 1, m) cin >> a[i][j];}
	#define readv(A,n) vll A(n,0); forn(i,n) cin>>A[i]; 
	#define print(a) cout << a << endl;
	#define printarr(a, n) forab (i, 1, n) cout << a[i] << " "; cout << endl;
	#define printv(v) for (int i: v) cout << i << " "; cout << endl;
	#define printmat(a, n, m) forab(i, 1, n) {forab (j, 1, m) cout << a[i][j] << " "; cout << endl;}
	 
	#define INF (1e18+5)
	#define inf (1e9+5)
	int dx[4] = { 0, 0, 1, -1 };
	int dy[4] = { 1, -1, 0, 0 };
	// 8-directions
	//int dx[]={1,1,1,0,0,-1,-1,-1};
	//int dy[]={-1,0,1,-1,1,-1,0,1};
	#define fast_io ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
	using namespace std;
	int begtime = clock();
	mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
	mt19937_64 rngb(chrono::steady_clock::now().time_since_epoch().count()); // can give negative values too
	bool isPowerOfTwo(int x) {
    return x && (!(x & (x - 1)));
	}
	int takemod(int x) {
    return (x % mod + mod) % mod;
	}
 
	int fpow(int base, int power, int MOD) {
    int result = 1;
    base = base % MOD;
    while (power) {
        if (power & 1)
            result = (result * base) % MOD;
        base = (base * base) % MOD;
        power = power >> 1;
    }
    return result;
	}
 
	int modinv(int x) {return fpow(x, mod - 2, mod);}
	void solve()
	{
		ll s,d,t;
		cin>>d>>t>>s;
		forn(i,min(t+1LL,10001LL))
		{
			if(d<=s*i)
			{
				//dbg(i)
				cout<<"Yes"<<endl;
				return;
			}
		}	
		cout<<"No"<<endl;
	}
	int main()
	{	
		#ifndef ONLINE_JUDGE
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
		#endif
		fast_io;
		int T=1;
		//cin>>T;
		// cin.ignore(); must be there when using getline(cin, s)
		while(T--)
		{
			solve();
		}
		#ifndef ONLINE_JUDGE
    		cerr << "Time elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
    		#endif
		return 0;
	}

	
	

Measured memory_bytes: 3612
#include<algorithm>
#include<algorithm>     //sort,二分探索,など
#include<bitset>        //固定長bit集合
#include<cmath>         //pow,logなど
#include<complex>       //複素数
#include<deque>         //両端アクセスのキュー
#include<functional>    //sortのgreater
#include<iomanip>       //setprecision(浮動小数点の出力の誤差)
#include<iostream>      //入出力
#include<iterator>      //集合演算(積集合,和集合,差集合など)
#include<map>           //map(辞書)
#include<numeric>       //iota(整数列の生成),gcdとlcm(c++17)
#include<queue>         //キュー
#include<set>           //集合
#include<stack>         //スタック
#include<string>        //文字列
#include<unordered_map> //イテレータあるけど順序保持しないmap
#include<unordered_set> //イテレータあるけど順序保持しないset
#include<utility>       //pair
#include<vector>        //可変長配列

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef vector<vector<ld>> vvld;
typedef vector<vector<string>> vvs;
typedef vector<vector<bool>> vvb;
const ll MOD = 1000000007;
const ll INF = 1000000000000000000;
#define rep(i,n) for(int i=0;i<n;i++)
#define repl(i,s,e) for(int i=s;i<e;i++)
#define reple(i,s,e) for(int i=s;i<=e;i++)
#define revrep(i,n) for(int i=n-1;i>=0;i--)
#define all(x) (x).begin(),(x).end()

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

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

    string s, t;
    cin >> s >> t;

    vvi dp(s.size() + 1, vi(t.size() + 1));
    rep(i, s.size())
    {
        rep(j, t.size())
        {
            chmax(dp[i + 1][j + 1], dp[i + 1][j]);
            chmax(dp[i + 1][j + 1], dp[i][j + 1]);

            if(s[i] == t[j]) chmax(dp[i + 1][j + 1], dp[i][j] + 1);
        }
    }

    //DPの結果から逆算して文字列を復元
    string ans = "";
    int length = dp[s.size()][t.size()];

    revrep(i, s.size())
    {
        rep(j, t.size())
        {
            if (dp[i + 1][j + 1] == length && s[i] == t[j])
            {
                ans += s[i];
                length--;
            }
        }
    }

    reverse(all(ans));

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 38520
#include<iostream>
#include<stdio.h>
using namespace std;

int N,K;
int main () {
    cin >> N >> K;
    double ans = 0;
    for(int i=1; i<=N; i++) {
        double p = 1.0/N;
        for(int x=i; x<K; x*=2) p/=2;
        ans += p;
    }
    printf("%.12f\n",ans);
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;

int main(){
  string s1, s2;
  cin >> s1 >> s2;
  
  string ans = "EQUAL";
  
  if(s1.size() > s2.size()){
    ans = "GREATER";
  }
  else if(s1.size() < s2.size()){
    ans = "LESS";
  }
  else{
    for(int i=0; i<s1.size(); i++){
      if(s1.at(i) > s2.at(i)){
        ans = "GREATER";
        break;
      }
      if(s1.at(i) < s2.at(i)){
        ans = "LESS";
        break;
      }
    }
  }
  cout << ans << endl;

}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <stack>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <map>
#include <set>
#include <queue>
#include <list>
using namespace std;
using pii  = pair<int,int>;
using ll=long long;
using ld=long double;
#define pb push_back
#define mp make_pair
#define rep(i,n) for(int i=0;i<(n);++i)
#define REP(i,a,b) for(int i=(a);i<(b);++i)
#define crep(i) for(char i='a';i<='z';++i)
#define psortsecond(A,N) sort(A,A+N,[](const pii &a, const pii &b){return a.second<b.second;});
#define All(x) (x).begin(),(x).end()
#define endl '\n'
int ctoi(const char c){
  if('0' <= c && c <= '9') return (c-'0');
  return -1;
}
long long gcd(long long a, long long b){return (b == 0 ? a : gcd(b, a%b));}
long long lcm(long long a, long long b){return a*b/gcd(a,b);}
constexpr ll MOD=1000000007;
constexpr ld EPS=10e-8;
template<typename T> istream& operator>>(istream& is,vector<T>& v){for(auto&& x:v)is >> x;return is;}
template<typename T,typename U> istream& operator>>(istream& is, pair<T,U>& p){ is >> p.first; is >> p.second; return is;}
template<typename T,typename U> ostream& operator>>(ostream& os, const pair<T,U>& p){ os << p.first << ' ' << p.second; return os;}



int main() {
    ll A,B,G,C=0;
    cin >> A >> B;
    G=gcd(A,B);
    ll Q=sqrt(G);
    REP(i,2,Q+1){
        ll T=0;
        while(G%i==0){
            G/=i;
            T++;
        }
        if(T>0){
            C++;
        }
    }
    if(G!=1){
        C++;
    }
    cout << C+1 << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;

#define t_case ll test;cin>>test;while(test--)
#define left(nod) 2*nod
#define right(nod) 2*nod+1
#define ss second
#define ff first
#define pb push_back
#define pll pair<ll,ll>
#define FAST ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define deb(a) cout<<#a<<": "<<a;cout<<endl;
#define deba(a...) cout<<endl;cout<<#a<<": ";for(auto it:a)cout<<it<<" ";cout<<endl;

int main()
{
	FAST;//not faster than scanf printf
	
	string s,t;cin>>s>>t;
	ll mini=1e15;
	ll ns=s.length(), nt=t.length();
	for(ll i=0;(i+nt-1)<ns;i++)
	{
		ll cnt=0;
		for(ll j=i;j<=(i+nt-1);j++)
		{
			if(s[j]!=t[j-i])cnt++;
			
		}
		mini=min(mini,cnt);
		
		
	}
	cout<<mini;
	
	
}


Measured memory_bytes: 3616
#if __has_include("print.hpp")
  #include "print.hpp"
#endif

#ifndef bits/stdc++.h
  #include <bits/stdc++.h>
#endif /* end of include guard */

using namespace std;


#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

typedef long long ll;
typedef pair<int, int> p;

int main(){
  int n, t;
  cin >> n >> t;
  vector<int> c(n, 0);
  vector<int> time(n, 0);
  int res = INT_MAX;
  for (int i = 0; i < n; i++)
  {
    cin >> c[i] >> time[i];
    if(time[i] <= t) res = min(res, c[i]);
  }
  if(res == INT_MAX) cout << "TLE" << endl;
  else cout << res << endl;
}


Measured memory_bytes: 256
n, k = map(int, input().split())
MOD = 10 ** 9 + 7

ans = 0
a = 1

for i in range(1, n + 2):
  a -= 2 * (i - 1)
  if i >= k:
    ans += (i * n + a)
    ans %= MOD
print(ans)

Measured memory_bytes: 9180
//include,using,define等
#pragma region header
#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <math.h>
#include <cstring>

// ===============================================================
//using系
#pragma region header
using namespace std;
using ll = long long;
using lint = long long;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
using vvi = vector<vector<int>>;
using vs = vector<string>;
using vc = vector<char>;
using vcc = vector<vector<char>>;
using vm = vector<short>;
using vmm = vector<vector<short>>;
using pii = pair<int, int>;
using psi = pair<string, int>;
using ld = long double;
using ull = unsigned long long;
using ui = unsigned int;
using qul = queue<ll>;
using pql = priority_queue<ll>;
const int dx[] = { 1,0,-1,0 };
const int dy[] = { 0,1,0,-1 };
constexpr ll mod = 1e9 + 7;
constexpr long double pi = 3.141592653589793238462643383279;
#pragma endregion
// ========================================================================
//define
#pragma region header
//#define int long long
#define rep(i, n) for(ll i = 0; i < n; i++)
#define REP(i, n) for(ll i = 1; i <= n; i++)
#define INF (ll)10000000000000000
#define mod (ll)1000000007
#define P pair<lint,lint>
template <class T>
bool chmax(T& a, const T& b) {
	if (a < b) {
		a = b;  // aをbで更新
		return true;
	}
	return false;
}
template <class T>
bool chmin(T& a, const T& b) {
	if (a > b) {
		a = b;  // aをbで更新
		return true;
	}
	return false;
}
#pragma endregion
#pragma endregion
ll gcd(ll a, ll b)
{
	if (a % b == 0)
	{
		return(b);
	}
	else
	{
		return(gcd(b, a % b));
	}
}
//最大公約数
ll lcm(ll a, ll b)
{
	return a * b / gcd(a, b);
}

int main(void) {
	lint t; cin >> t;
	for (int _ = 0; _ < t; _++) {
		lint a, b, c, d; cin >> a >> b >> c >> d;
		if (b > a || b > d) {
			printf("No\n");
			continue;
		}
		if (c >= b) {
			printf("Yes\n");
			continue;
		}
		if (b - gcd(b, d) + (a % gcd(b, d)) > c)
			printf("No\n");
		else
			printf("Yes\n");
	}

    return 0;
}

Measured memory_bytes: 3568
parseInt(x) = parse(Int, x)
parseMap(x::Array{SubString{String},1}) = map(parseInt, x)

function hpush(h::Array{Tuple{Int,Int},1},x::Tuple{Int,Int})
	push!(h,x)
	if length(h) > 1
		l = length(h)
		k = div(l,2)
		while h[k][2]>x[2]&&k>=1
			tmp = h[k]
			h[k] = x
			h[l] = tmp
			k = max(div(k,2),1)
			l = div(l,2)
		end
	end
end

function hpop(h::Array{Tuple{Int,Int},1})
	x = h[1]
	z = pop!(h)
	if !isempty(h)
		h[1] = z
		k = 1
		l = length(h)
		while k <= l
			if 2*k>=l
				break
			elseif 2*k+1>=l
				if h[2*k][2]>=z[2]
					break
				else
					tmp = h[2*k]
					h[2*k] = z
					h[k] = tmp
					k = 2*k
				end
			else
				if h[2*k][2]>=z[2]&&h[2*k+1][2]>=z[2]
					break
				else
					t = h[2*k][2]<h[2*k+1][2]?2*k:2*k+1
					tmp = h[t]
					h[t] = z
					h[k] = tmp
					k = t
				end
			end
		end
	end
	x
end


function main()
	n,m = readline() |> split |> parseMap
	e = [Int[] for i in 1:3*n]
	for i in 1:m
		u,v = readline() |> split |> parseMap
		push!(e[u],n+v)
		push!(e[n+u],2*n+v)
		push!(e[2*n+u],v)
	end
	s,t = readline() |> split |> parseMap
	dis = -ones(Int,3*n)
	h = Array{Tuple{Int,Int},1}()
	push!(h,(s,0))
	while !isempty(h)
		v,w = hpop(h)
		dis[v]=dis[v]<0?w:min(dis[v],w)
		if v == t
			break
		end
		for i in 1:length(e[v])
			if dis[e[v][i]]<0　|| dis[e[v][i]]>w+1
				dis[e[v][i]] = w+1
				hpush(h,(e[v][i],w+1))
			end
		end
	end
	println(dis[t]>=0?div(dis[t],3):-1)

end

main()

Measured memory_bytes: 221592
import numpy as np

N, K, Q = map(int, input().split())

A = []
answer = np.array([0]*N)
score = np.array([K]*N)

for _ in range(Q):
    A.append(int(input())-1)

for a in A:
    answer[a] += 1

answer = K - (Q - answer)

ans = np.where(answer>0, True, False)

for x in ans:
    if x:
        print("Yes")

    else:
        print("No")

Measured memory_bytes: 19500
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		int num = 0;
		Scanner sc = new Scanner(System.in);
		String operates = sc.next();
		sc.close();
		for(int a = 0 ; a < 4 ; a++){
			if(operates.charAt(a) == '+'){
				num++;
			}else{
				num--;
			}
		}
		System.out.println(num);
	}
}

Measured memory_bytes: 23124
n=(int)(input())
a = list(map(int, input().split(" ")))
total = 1
if 0 in a:
  print(0)
else:
  for i in range(n):
    total *= a[i]
    if total > 10 ** 18:
      print(-1)
      break
  else:
    print(total)

Measured memory_bytes: 21604
#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
#define REP(i,n) for(int i = 1; i<=n; ++i)
#define all(x) begin(x),end(x)
#define show(obj) {for(auto x:obj)cout<<x<<' ';cout<<endl;}
#define line "----------"
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,ll> LP;
const int inf = 1001001000;
const ll INF = 1LL<<60;
const int MOD = (int)1e9 + 7;

int main(){
	string s;
	cin >> s;
	rep(i,s.size()){
		if(i < s.size()-1){
			if(s[i] == s[i+1]){
				cout << i + 1 << ' ' << i + 2 << endl;
				return 0;
			}
		}
		if(i < s.size()-2){
			if(s[i] == s[i + 2]){
				cout << i + 1 << ' ' << i + 3 << endl;
				return 0;
			}
		}
	}
	cout << "-1 -1" << endl;
	return 0;
}


Measured memory_bytes: 3708
import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),d=sc.nextInt();
		if(a!=c) {
			System.out.println("1");
		}else {
			System.out.println("0");
		}
	}
}

Measured memory_bytes: 23124
#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
#include<map>
#include<set>

using namespace std;
using ll = long long;

const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
const double PI = 4.0 * atan(1.0);

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, a, n) for (int i = a; i <= (n); ++i)

int main() {
    int A; cin >> A;
    int B; cin >> B;
    
    int ans = max(0, A - 2 * B);

    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
use proconio::input;
fn main() {
    input!{
        n:usize,x:usize,mut a:[usize;n],
    }
    let mut ans:usize=0;
    for i in 0..n-1{
        let t:usize=a[i]+a[i+1];
        if t>x{
            a[i+1]-=std::cmp::min(t-x,a[i+1]);
            if a[i+1]==0{
                a[i]-=x-a[i+1];
            }
            ans+=t-x;
        }
    }
    println!("{}",ans);
}

Measured memory_bytes: 3724
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// #define int long long

typedef vector<int> vi;
typedef pair<int, int> pi;

const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;

#define pb push_back
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP2(i, b, e) for (int i = (b); i <= (int)(e); i++)
#define DEBUG(x) cout << #x << ": " << (x) << endl
#define DEBUGA(a) cout << #a << ": "; for (const auto& v: (a)) cout << v << endl

signed main() {
    int N, K, Q;
    cin >> N >> K >> Q;

    vi A(N, 0);
    REP(i, Q) {
        int a; cin >> a; A[--a]++;
    }
    REP(i, N) {
        if (K - Q + A[i] <= 0) {
            cout << "No" << endl;
        } else {
            cout << "Yes" << endl;
        }
    }
    return 0;
}


Measured memory_bytes: 1024
# Tree Walk
class Tree:
    nodes = []
    def __init__(self):
        self.root = None
    def insert(self, nodenum, leftnum, rightnum):
        if leftnum != -1:
            self.nodes[nodenum].left = self.nodes[leftnum]
            self.nodes[leftnum].parent = self.nodes[nodenum]
        if rightnum != -1:
            self.nodes[nodenum].right = self.nodes[rightnum]
            self.nodes[rightnum].parent = self.nodes[nodenum]
    def preorder_walk(self, node):
        if node == -1:
            return
        print("", node.label, end = "")
        self.preorder_walk(node.left)
        self.preorder_walk(node.right)
    def inorder_walk(self, node):
        if node == -1:
            return
        self.inorder_walk(node.left)
        print("", node.label, end = "")
        self.inorder_walk(node.right)
    def postorder_walk(self, node):
        if node == -1:
            return
        self.postorder_walk(node.left)
        self.postorder_walk(node.right)
        print("", node.label, end = "")

class Node:
    def __init__(self, label):
        self.label = label
        self.parent = -1
        self.left = -1
        self.right = -1

tree = Tree()
n = int(input())
for i in range(n):
    tree.nodes.append(Node(i))
for i in range(n):
    num, left, right = map(int, input().split())
    tree.insert(num, left, right)
for i in tree.nodes:
    if i.parent == -1:
        print("Preorder")
        tree.preorder_walk(i)
        print("")
        print("Inorder")
        tree.inorder_walk(i)
        print("")
        print("Postorder")
        tree.postorder_walk(i)
        print("")


Measured memory_bytes: 5620
#include <stdio.h>

int main()
{
        int friend;
        int height[100000];
        int min;
        int i;
        int count=0;

        scanf("%d %d",&friend,&min);

        for(i=0; i<friend; i++)
        {
                scanf("%d",&height[i]);
                if(height[i]>=min) {count++;}
        }
        printf("%d\n",count);

        return 0;

}


Measured memory_bytes: 512
let n = Scanf.sscanf (read_line ()) "%d" @@ fun n -> n

let code_a = int_of_char 'a'

let char_of_code code = char_of_int (code_a + code)

let rec alp_of_int acc n =
  let acc = (n mod 26) :: acc in
  if n > 25 then alp_of_int acc (n / 26 - 1)
  else acc

let () = 
  (n - 1) |> alp_of_int [] |> List.map char_of_code |> List.map Char.escaped |> String.concat "" |> print_endline

Measured memory_bytes: 3732
#include <bits/stdc++.h>
#include <iostream>
#include <utility> // pair
#include <string>
#include <vector>
#define MAX_N 100001
#define INF 1000000000
#define FOR(i, a, b) for(int i=a; i<b; i++)
#define REP(i, n) for(int i=0; i<n; i++)
#define RER(i, n) for(int i=n-1; i>=0; i--)
#define ALL(v) v.begin() v.end()
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int n, m;
P a[9];

signed main(){
	cin >> n >> m;
	REP(i, m){
		cin >> a[i].first;
		switch(a[i].first){
			case 1:
				a[i].second = 2;
				break;
			case 2:
				a[i].second = 5;
				break;
			case 3:
				a[i].second = 5;
				break;
			case 4:
				a[i].second = 4;
				break;
			case 5:
				a[i].second = 5;
				break;
			case 6:
				a[i].second = 6;
				break;
			case 7:
				a[i].second = 3;
				break;
			case 8:
				a[i].second = 7;
				break;
			case 9:
				a[i].second = 6;
				break;
		}
	}
	sort(a, a+m, greater<P>());
	// REP(i, m) cout << a[i].first << " " << a[i].second << endl;
	int dp[MAX_N];
	dp[0] = 0;
	REP(i, n){
		dp[i + 1] = -INF;
		REP(j, m) if(i + 1 - a[j].second >= 0) dp[i + 1] = max(dp[i + 1 - a[j].second] + 1, dp[i + 1]);
	}
	// cout << dp[n] << endl;
	int k = n;
	REP(i, dp[n]){
		REP(j, m){
			if(k - a[j].second >= 0 && dp[k - a[j].second] == dp[k] - 1){
				cout << a[j].first;
				k -= a[j].second;
				break;
			}
		}
		// cout << k << " " << a[i].second << endl;
	}
	cout << endl;
    return 0;
}

Measured memory_bytes: 256
N, Y = map(int, input().split())

for x in range(N+1):
    for y in range((N+1)-x):
        if 10000 * x + 5000 * y > Y:break
        z = N - x- y
        if 10000 * x + 5000 * y + 1000 * z == Y:
            print(x, y, z)
            exit()
print(-1, -1, -1)

Measured memory_bytes: 3060
#include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(ll i = 0; i < n; i++)
#define per(i,n) for(ll i = n-1; i >= 0; i--)
#define REP(i,n) for(ll i = 1; i < n; i++)
#define PER(i,n) for(ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define YesorNo(a) printf(a ? "Yes\n" : "No\n")
#define endl '\n'
#define fi first
#define se second
using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
using vi = vector<int>;
using vii = vector<vi>;
using vl = vector<ll>;
using vll = vector<vl>;
using vs = vector<string>;
using vb = vector<bool>;
using vc = vector<char>;
using vcc = vector<vc>;
using vP = vector<P>;
using vPP = vector<vP>;
using vPl = vector<Pl>;
const int dx[] = {0,1,0,-1,1,1,-1,-1};
const int dy[] = {1,0,-1,0,1,-1,-1,1};
const int inf = (1<<30)-1;
const ll infll = (1LL<<62)-1;
ll ceil(const ll &a, const ll &b){return ((a)+(b)-1)/b;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }



int main(){
  int n, t;
  cin >> n >> t;
  vi a(n);
  rep(i,n) cin >> a[i];
  vi mn(n);
  mn[0] = a[0];
  REP(i,n) mn[i] = min(mn[i-1],a[i]);
  map<int, int> mp;
  rep(i,n) mp[a[i]-mn[i]]++;
  P p = *(mp.rbegin());
  cout << p.se << endl;
}

Measured memory_bytes: 8764
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
using namespace std;

int main() {
	int N = 0;
	int V[50];
	int C[50];
	int X = 0;
	int Y = 0;

	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> V[i];
	}
	for (int i = 0; i < N; i++) {
		cin >> C[i];
	}
	for (int i = 0; i < N; i++) {
		if (V[i] - C[i] > 0) {
			X += V[i];
			Y += C[i];
		}
	}
	cout << X - Y;
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>

int main(){
	int N, M, i, j;
	scanf("%d", &N);
	M = (N * (N - 1)) / 2;
	M -= N / 2;
	printf("%d\n", M);
	for(i = 1; i <= N; i++){
		for(j = i + 1; j <= N; j++){
			if(i + j != 2 * (N / 2) + 1){
				printf("%d %d\n", i, j);
			}
		}
	}
	return 0;
}

Measured memory_bytes: 128
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if i * 500 + j *100 + k * 50 == x:
        ans += 1
print(ans)        

Measured memory_bytes: 3060
#include <iostream>
using namespace std;

int main()
{
    char in[10];
    char r;
    while (scanf("%s",in) != EOF)
    {
	r='d';
	if (in[0] == in[4] && in[0] == in[8] && in[0] != 's')
	    r=in[0];
	if (in[2] == in[4] && in[2] == in[6] && in[2] != 's')
	    r=in[2];
	for (int i=0; i<3; i++)
	{
	    if (in[i*3] == in[i*3+1] && in[i*3] == in[i*3+2] && in[i*3] != 's')
		r=in[i*3];
	    if (in[i] == in[i+3] && in[i] == in[i+6] && in[i] != 's')
		r=in[i];
	}
	printf("%c\n",r);
    }
    return 0;
}

Measured memory_bytes: 0
import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        while (true) {
            int N = fs.nextInt();
            int K = fs.nextInt();
            if (N == 0 && K == 0) break;
            long[] arr = new long[N];
            for (int i = 0; i < N; ++i) arr[i] = fs.nextLong();

            long[] cumSum = new long[N+1];
            for (int i = 0; i < N; ++i) cumSum[i+1] = cumSum[i] + arr[i];

            long res = 0;
            for (int i = 0; i+K <= N; ++i) {
                res = Math.max(res, cumSum[i+K] - cumSum[i]);
            }

            System.out.println(res);
        }
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}

    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }

    public double nextDouble() { return Double.parseDouble(next());}
}


Measured memory_bytes: 27304
while 1:
    x = list(input())
    if x[0] == "0":
        break
    x.pop(0)
    a = x.count("A")
    b = x.count("B")
    if  a > b:
        x.append("A")
    else:
        x.append("B")
    print(x.count("A"),x.count("B"))



Measured memory_bytes: 5560
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	cin >> n;
	
	vector<int> A(n);
	for (int i = 0; i < n; i++)
		cin >> A[i];
		
	int q;
	cin >> q;
	
	int b, m, e;
	vector<int>::iterator it = A.begin();
	while (q--)
	{
		cin >> b >> m >> e;	
		rotate(it+b, it+m, it+e);
	}
		
		
	while (it != A.end())
	{
		if(it != A.begin())
			cout << ' ';
		cout << *it++;
	}
	cout << endl;
}


Measured memory_bytes: 3156
#include <bits/stdc++.h>
#define FASTIO
using namespace std;

using ll = long long;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;

constexpr int I_INF = numeric_limits<int>::max();
constexpr ll L_INF = numeric_limits<ll>::max();

//==================================

int H, W;
vector<Vi> mas;
int dp[105][105];


int main() {
#ifdef FASTIO
    cin.tie(0), cout.tie(0);
    ios::sync_with_stdio(false);
#endif
#ifdef FILEINPUT
    ifstream ifs("./in_out/input.txt");
    cin.rdbuf(ifs.rdbuf());
#endif

    cin >> H >> W;
    mas.resize(H);
    for (int i = 0; i < H; i++) {
        mas[i].resize(W);
        string S;
        cin >> S;
        for (int j = 0; j < W; j++) {
            mas[i][j] = (S[j] == '#' ? 1 : 0);
        }
    }

    fill_n(&dp[0][0], sizeof(dp) / sizeof(dp[0][0]), 1e9);
    dp[1][1] = (mas[0][0] == 1 ? 1 : 0);
    for (int i = 1; i <= H; i++) {
        for (int j = 1; j <= W; j++) {
            if (mas[i - 1][j - 1] == 1) {
                if (i - 2 >= 0 && mas[i - 2][j - 1] == 0) {
                    dp[i][j] = min(dp[i][j], dp[i - 1][j] + 1);
                }
                else {
                    dp[i][j] = min(dp[i][j], dp[i - 1][j]);
                }
                if (j - 2 >= 0 && mas[i - 1][j - 2] == 0) {
                    dp[i][j] = min(dp[i][j], dp[i][j - 1] + 1);
                }
                else {
                    dp[i][j] = min(dp[i][j], dp[i][j - 1]);
                }
            }
            else {
                dp[i][j] = min(dp[i][j], dp[i - 1][j]);
                dp[i][j] = min(dp[i][j], dp[i][j - 1]);
            }
        }
    }

    cout << dp[H][W] << endl;

    return 0;
}

Measured memory_bytes: 384
#include<iostream>
#include<vector>
#include<cmath>
#include<climits>
#include<algorithm>
#include<string>

int main(){
	int a, b;
	std::cin>>a>>b;

	if(a>9 || b>9)
		std::cout<< -1<<std::endl;
	else
		std::cout<<a*b<<std::endl;

	return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;

int main() {
	int N = 0;
	int x, y, b, p;
	int max = 0;
	int wari = 0;
	int i = 0;

	cin >> N;

	while (1) {
		cin >> x;
		cin >> y;
		cin >> b;
		cin >> p;

		max = ((x * b) + (y * p));

		if (b < 5){
			b = 5;
		}

		if (p < 2){
			p = 2;
		}

		wari = ((x * b) + (y * p)) * 0.8;

		if (max < wari) {
			cout << max << "\n";
		} else {
			cout << wari << "\n";
		}

		if(b == 0 && p == 0){
			cout << 0 << "\n";
		}


		i++;

		max = 0;
		wari = 0;

		if(i == N) {
			return 0;
		}
	}
}

Measured memory_bytes: 1160
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stdio.h>
#include<cstring>
#include<math.h>
#include<map>
#include<bitset>
#include<iomanip>
#include<queue>
#include<functional>
#include<stack>
#include<tuple>
#include<cassert>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using P = pair<int, int>;

int N, K;
int a[200000];
const int INF = 1000000000;

bool isOk(int key) {
  int cnt = 0;
  rep(i, N) {
    int temp = a[i] / key;
    if(a[i] % key != 0) temp++;
    temp--;
    cnt += temp;
  }
  if(cnt <= K) {
    return true;
  } else {
    return false;
  }
}

int lower_search() {
  int l = 0, r = INF;
  while(r - l > 1) {
    int half = (r+l) / 2;
    if(isOk(half)) r = half;
    else l = half;
  }
  return r;
}

int main() { 
  cin >> N >> K; 
  rep(i, N) {
    cin >> a[i];
  }
  int ans = lower_search();
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 4348
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n,m;
  cin >> n >> m;
  vector<int> cnt(n,0);
  REP(i,m){
    int a,b;
    cin >> a >> b;
    a--,b--;
    cnt[a]++, cnt[b]++;
  }
  REP(i,n){
    if(cnt[i]%2==1){
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}


Measured memory_bytes: 640
from heapq import heappush, heappop
from collections import deque
import re
import math
import functools


def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29


def mk1d(n, val=INF):
    return [val for i in range(n)]

def mk2d(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]

DIV = 998244353


def convolve(a, b):
    p, g = 1107296257, 5
    n0, n1 = len(a), len(b)
    n = 1 << (max(n0, n1) - 1).bit_length() + 1
    a = a + [0] * (n-n0)
    b = b + [0] * (n-n1)
    w = pow(g, (p - 1) // n, p)
    invw = pow(w, p-2, p)

    def fft(f):
        d = n // 2
        v = w
        while d >= 1:
            u = 1
            for i in range(d):
                for j in range(i, n, 2*d):
                    f[j], f[j+d] = (f[j] + f[j+d]) % p, u * (f[j] - f[j+d]) % p
                u = u * v % p
            v = v * v % p
            d //= 2

    def ifft(f):
        d = 1
        while d < n:
            v = pow(invw, n // (2 * d), p)
            u = 1
            for i in range(d):
                for j in range(i, n, 2*d):
                    f[j+d] *= u
                    f[j], f[j+d] = (f[j] + f[j+d]) % p, (f[j] - f[j+d]) % p
                u = u * v % p
            d *= 2

    fft(a), fft(b)
    for i in range(n):
        a[i] = a[i] * b[i] % p
    ifft(a)
    invn = pow(n, p - 2, p)
    return [a[i] * invn % p for i in range(n0 + n1 - 1)]


def main():
    N = iRaw()
    S = sRaw()
    ans = S.count("ABC")
    return ans

if __name__ == "__main__":
    print(main())


Measured memory_bytes: 38384
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		Console.WriteLine(T + S);
	}
	String S,T;
	public Sol(){
		var d = rsa();
		S = d[0]; T = d[1];
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}


Measured memory_bytes: 13140
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <random>
#include <unordered_map>
#include <unordered_set>
#define all(a) a.begin(),a.end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define pb push_back
#define debug(x) cerr << #x << ':' << (x) << '\n'
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
typedef complex<ld> com;
constexpr int inf = 1000000010;
constexpr ll INF = 1000000000000000010;
constexpr ld eps = 1e-12;
constexpr ld pi = 3.141592653589793238;
template<class T, class U> inline bool chmax(T &a, const U &b) { if (a < b) { a = b; return true; } return false; }
template<class T, class U> inline bool chmin(T &a, const U &b) { if (a > b) { a = b; return true; } return false; }

constexpr ll mod = 1000000007;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(20);

	int n;
	cin >> n;
	vector<int> x(n);
	rep(i, n) cin >> x[i];
	vector<int> ok(n);
	ok[0] = 1;
	rep(i, n - 1) {
		ok[i + 1] = ok[i];
		ll d = 2 * i + 4 - x[i];
		chmax(ok[i + 1], d / 2);
	}
	vector<int> cnt(n + 1);
	rep(i, n) cnt[ok[i]]++;
	ll ans = 1; ll s = 0;
	for (int i = 1; i <= n; i++) {
		s += cnt[i];
		ans *= s; ans %= mod;
		s--;
	}
	cout << ans << '\n';
}

Measured memory_bytes: 4520
#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define BITCNT(n) (__builtin_popcountll(n))
#define SUBS(s,f,t) ((s).substr((f)-1,(t)-(f)+1))
#define ALL(a) (a).begin(),(a).end()
using namespace std;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;cin>>n;
  vector<pair<ll,ll>>pll(n);
  for(auto &a:pll)cin>>a.S>>a.F;
  sort(ALL(pll),greater<pair<ll,ll>>());
  ll now=llINF;
  for(int i=0;i<n;i++){
    if(now>pll[i].F){
      now=pll[i].F;
    }
    now-=pll[i].S;
  }
  if(now>=0)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}


Measured memory_bytes: 3456
#include <bits/stdc++.h>

#define INF 1e9
using namespace std;
typedef long long ll;

int main() {

    int n; cin >> n;
    string s = to_string(n);

    int f = 0;
    for (int i = 0; i < s.size(); ++i) {
        f += s[i] - '0';
    }

    if (n % f == 0) {
        puts("Yes");
    } else {
        puts("No");
    }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(void){
    
    string x;
    
    cin >> x;
    
    if(x.at(2)==x.at(3)&&x.at(4)==x.at(5)){
        
        cout << "Yes" << endl;
        
    } else {
        
        cout << "No" << endl;
        
    }
    
    return 0;
    
}

Measured memory_bytes: 256
using System;
using System.Linq;

class C
{
	static int[] Read() => Console.ReadLine().Split().Select(int.Parse).ToArray();
	static void Main()
	{
		var h = Read();
		int n = h[0], m = h[1];
		var scs = new int[m].Select(_ => Read()).ToArray();

		var r = Enumerable.Range(0, 1000)
			.Select(i => i.ToString())
			.FirstOrDefault(s => s.Length == n && scs.All(sc => s[sc[0] - 1] - '0' == sc[1]));
		Console.WriteLine(r ?? "-1");
	}
}


Measured memory_bytes: 28552
#include<bits/stdc++.h>
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
int main() {
    jaldi

    int n;
    cin>>n;
    int k;
    cin>>k;
    vector<int> a(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    int l =0;
    int r = k;
    while(r<n) {
        if(a[r]>a[l]) {
            cout<<"Yes"<<'\n';
            r++;
            l++;
        }
        else {
            cout<<"No"<<'\n';
            r++;
            l++;
        }
    }

}


Measured memory_bytes: 3988