akhauriyash/Code-Regression huggingface dataset:
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<class T> ostream& operator << (ostream& out,const vector<T> V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; }
template<class T> ostream& operator << (ostream& out,const vector<vector<T> > Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; }
template<class S,class T> ostream& operator << (ostream& out,const map<S,T> mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; }

/*
 <url:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1619&lang=jp>
 問題文============================================================
 =================================================================
 解説=============================================================
 
 ================================================================
 */

ll n,m;

string b[505];

// n <= m
bool ok[501];

// n >= m
int bit[501];
int dp[2][1<<25];

int solve(){
    int res = 0;
    for(int i = 0; i < n;i++) cin >> b[i];
    if(n <= 20){
        for(int i = 0; i < (1<<n);i++){
            if(res >= __builtin_popcount(i)) continue;
            fill(ok,ok+501,false);
            for(int j = 0; j < n;j++){
                if(!((i>>j)&1)) continue;
                for(int k = 0; k < m;k++){
                    if(b[j][k] == '1') ok[k] = !ok[k];
                }
            }
            if(accumulate(ok,ok+m,0)) continue;
            res = max(res,__builtin_popcount(i));
        }
    }else{
        fill(bit,bit+n,0);
        for(int i = 0; i < n;i++){
            for(int j = 0; j < m;j++){
                if(b[i][j] == '1'){
                    bit[i] |= (1<<j);
                }
            }
        }
        for(int i = 0; i < 2;i++) for(int j = 0; j < (1<<m);j++) dp[i][j] = -1;
        dp[0][0] = 0;
        int cur = 0, next = 1;
        for(int i = 0; i < n;i++){
            for(int j = 0; j < (1<<m);j++){
                if(dp[cur][j] == -1) continue;
                dp[next][j] = max(dp[next][j],dp[cur][j]);
                dp[next][j^bit[i]] = max(dp[next][j^bit[i]],dp[cur][j]+1);
                
                dp[cur][j] = -1;
            }
            swap(cur,next);
        }
        res = dp[cur][0];
    }
    return res;
}
int main(void) {
    cin.tie(0); ios_base::sync_with_stdio(false);
    while(cin >> n >> m,n){
        cout << solve() << endl;
    }
    return 0;
}



Measured memory_bytes: 68676
#include <bits/stdc++.h>
using namespace std;
int main() {
 string a;
  cin >> a;
  sort(a.begin(), a.end());
  if (a[0] == 'a' && a[1] == 'b' && a[2] == 'c') {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Measured memory_bytes: 3620
import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = b-a;
    int h = (c*c+c)/2;
    int x = h-b;
    
    System.out.println(x);
  }
}

Measured memory_bytes: 23124
#include <bits/stdc++.h>
using namespace std;
int main(void){
    string S;
    cin >> S;
    vector<string> week = {"SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"};
    for (int i = 0; i < 7; i++)
        if (week[i] == S)
            cout << i+1 << endl;
}

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

#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rrep2(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define printV(v) for(auto&& x : v){cout << x << " ";} cout << endl
#define printVV(vv) for(auto&& v : vv){for(auto&& x : v){cout << x << " ";}cout << endl;}
#define printP(p) cout << p.first << " " << p.second << endl
#define printVP(vp) for(auto&& p : vp) printP(p);

typedef long long ll;
typedef pair<int, int> Pii;
typedef tuple<int, int, int> TUPLE;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<Pii> vp;
const int inf = 1e9;
const int mod = 1e9 + 7;
typedef vector<vector<int>> Graph;

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

    int n, x;
    cin >> n >> x;
    vi a(n);
    rep(i, n) cin >> a[i];

    int ans = 2e18;
    vi par(n);
    rep(i, n) par[i] = i;
    rep(k, n) { // 動かす最大の回数を全探索
        rep(i, n) {
            int j = (i - k + n) % n;
            if (a[j] < a[par[i]]) {
                par[i] = j;
            }
        }
        int t = x * k;
        rep(i, n) {
            t += a[par[i]];
        }
        ans = min(ans, t);
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<vector>
#include<functional>
#include<algorithm>
#include<stdlib.h>
#include<string>
#include<string.h>
#define _USE_MATH_DEFINES
#include<math.h>
#include<deque>
#include<set>
#include<map>
#include<queue>
#include<list>
#include<iostream>
#include <bitset>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(auto i=a;i<b;i++)
#define all(_x) _x.begin(), _x.end()
#define r_sort(_x) sort(_x.begin(), _x.end(), std::greater<int>())
#define vec_cnt(_a, _n) (upper_bound(all(_a), _n) - lower_bound(all(_a), _n))
#define vec_unique(_a) _a.erase(std::unique(all(_a)), _a.end());
ll gcd(ll a, ll b) { return a % b == 0 ? b : gcd(b, a % b); }
//ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
#define INF 1 << 30
const int mod = 1000000007;
int main() {
	string s, t;
	cin >> s >> t;
	t.pop_back();
	puts(s == t ? "Yes" : "No");
	return 0;
}


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

int n, best;
string s;
map<string, int> maps;

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

    cin >> n;

    while (n--) {
    	cin >> s;
    	maps[s]++;
    	best = max(maps[s], best);
    }

    for (auto it = maps.begin(); it != maps.end(); it++) {
    	if (it->second == best) {
    		cout << it->first << '\n';
    	}
    }
 
    return 0;
}

Measured memory_bytes: 23808
#include<bits/stdc++.h>
using namespace std;
long long n;
stringstream ss;
string its(long long x){
	string aans;
	ss<<x;
	ss>>aans;
	ss.clear();
	ss.str("");
	return aans;
}
int cnt[300];
string tmp,s;
unsigned long long ans=0;
unordered_map<string,unsigned long long> us;
unordered_map<string,unsigned long long>::iterator it;
char c;
int main(){
	scanf("%lld",&n);
	for(int i=0;i<n;i++){
		fill(cnt,cnt+256,0);
		tmp="";
		cin>>s;
		//cout<<sss<<endl; 
		for(int j=0;j<s.size();j++) {
			cnt[(int)(s[j]-'a')]++;
		}
		for(int j=0;j<30;j++) tmp=tmp+its(cnt[j]);
		//cout<<s<<endl;
		us[tmp]++;
	}
	for(it=us.begin();it!=us.end();it++){
		if(it->second>=2) {
			unsigned long long tmp;
			tmp=it->second*(it->second-1)/2;
			ans+=tmp;
		}	
	}
	cout<<ans;
	return 0;
}

Measured memory_bytes: 12196
#include <bits/stdc++.h>
//#pragma once
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
typedef long double lb;
#define int long long
#define double long double
typedef pair<double,double> P;
const ll INF = 1e18;
const int MOD = 1000000007;
const double EPS = 1e-10;
const double PI = 3.141592653589793;
template<class T> inline bool chmin(T& a, T b){if(a>b){a = b;return 1;}return 0;}
template<class T> inline bool chmax(T& a, T b){if(a<b){a = b;return 1;}return 0;}
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 

int h,w;
signed main(){
  cin>>h>>w;
  if(h == 1 || w == 1)cout << 1 << endl;
  else cout << (h*w+1)/2 << endl;
}


Measured memory_bytes: 256
import sys
x = int(input())


number = int(x/100)
number = number+1

for i in range(0,number):
    for j in range(0,number-i):
        for k in  range (0,number-i-j):
            for l in range(0,number-i-j-k):
                for m in range(0,number-i-j-k-l):
                    for n in range(0,number-i-j-k-l-m):
                        if i*100+j*101+k*102+l*103+m*104+n*105==x:
                            print(1)
                            sys.exit()
print(0)


Measured memory_bytes: 3064
#include <iostream>
#include <set>
#include <map>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <queue>
#include <deque>
#include <stack>
#include <climits>
#include <math.h>
#include <cassert>
#include <unordered_map>
using namespace std;
#pragma warning(disable : 4996)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

const ld PI = 3.14159265358979323846;
const ll MOD = 998244353;

int main() {
#ifdef _DEBUG
	freopen("input1.txt", "r", stdin);
	freopen("output2.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	ld a, b, h, m;
	cin >> a >> b >> h >> m;
	h = h + (m / 60.0);
	m /= 5.0;
	ld angle = abs(h - m) * 30;
	angle = min(angle, 360.0 - angle);
	ld ans = sqrt(a*a + b * b - 2 * a * b * cos(angle * PI / 180.0));
	cout << fixed << setprecision(20) << ans;
}

Measured memory_bytes: 4184
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
// #include <bits/stdc++.h>
using namespace std;

int main() {
  int M, K;
  cin >> M >> K;
  if (M == 0 && K == 0) {
    cout << "0 0" << endl;
  } else if (M == 0) {
    cout << "-1" << endl;
  } else if (M == 1 && K == 0) {
    cout << "1 0 0 1" << endl;
  } else if (M == 1 && K == 1) {
    cout << "-1" << endl;
  } else if (K < pow(2, M)) {
    vector<int> arr;
    for (int i = 0; i < pow(2, M); i++) {
      if (i != K) arr.push_back(i);
    }
    arr.push_back(K);
    for (int i = pow(2, M) - 1; i >= 0; i--) {
      if (i != K) arr.push_back(i);
    }
    arr.push_back(K);

    for (auto a = arr.begin(); a != arr.end(); a++) {
      cout << *a << " ";
    }
    cout << endl;
  } else {
    cout << "-1" << endl;
  }
  return 0;
}

Measured memory_bytes: 2932
#include<bits/stdc++.h>
#define re register
long long m[110],f[125010];
int p[110],v[110],p1[110],la[110];
inline bool cmp(re int a,re int b){return v[a]*m[b]>v[b]*m[a];}
int main()
{
	re int n,x,d,num=0,ans=0;
	scanf("%d%d%d",&n,&x,&d);
	v[1]=1;p1[1]=1;scanf("%lld",&m[1]);
	for(re int i=2;i<=n;i++)scanf("%lld%d",&m[i],&p[i]),v[i]=1,p1[i]=i;
	for(re int i=n;i>=2;i--)
	{
		m[p[i]]+=m[i];
		v[p[i]]+=v[i];
		num+=v[i]*std::min(n,d);
		la[i]=std::max(d-n,0);
	}
	la[1]=x;
	num=n*n*n;
	std::sort(p1+1,p1+n+1,cmp);
	for(re int i=1;i<=num;i++)f[i]=1ll<<60;
	for(re int i=2;i<=n;i++)
	{
		for(re int j=num;j>=0;j--)if(f[j]<(1ll<<60))
		{
			for(re int k=1;k<=std::min(n,d);k++)f[j+k*v[i]]=std::min(f[j+k*v[i]],f[j]+k*m[i]);
		}
	}
	for(re int i=0;i<=num;i++)
	if(f[i]<=x){
		re int x1=x-f[i],vv=i;
		for(re int j=1;j<=n;j++)
		{//printf("***%d %d %lld %d %d\n",i,p1[j],f[i],x1,vv);
			if(la[p1[j]]/10000*m[p1[j]]<=x1&&la[p1[j]]*m[p1[j]]<=x1)x1-=la[p1[j]]*m[p1[j]],vv+=v[p1[j]]*la[p1[j]];
			else vv+=x1/m[p1[j]]*v[p1[j]],x1-=x1/m[p1[j]]*m[p1[j]];
		}
		ans=std::max(ans,vv);
	}
	printf("%d\n",ans);
}

Measured memory_bytes: 1280
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc1 = new Scanner(System.in);

		int n = sc1.nextInt();
		int x = sc1.nextInt();
		int[] a = new int[n];

		for ( int i = 0 ; i < n ; i++ ) {
			a[i] = sc1.nextInt();
		}

		Arrays.sort(a);

		int total = 0;
		int j = 0;

		while (true) {
			if ( j < a.length) {
				total += a[j];
				if ( total > x ) {
					break;
				}
				else if ( total == x ) {
					j++;
					break;
				}
				else {
					j++;
				}
			}
			else
				break;
		}

		if ( total < x) {
			j--;
		}

		System.out.println(j);

		sc1.close();

	}

}

Measured memory_bytes: 24276
#include<stdio.h>

#define MAX 2000000
int n,A[MAX];

int left(int i){
  return 2*i;
}

int right(int i){
  return 2*i+1;
}
void maxHeapify(int i){
  int l,r,largest,tmp;
  l = left(i);
  r = right(i);
  if(l<=n && A[l] > A[i]) largest = l;
  else largest = i;

  if(r<=n && A[r] > A[largest]) largest = r;

  if(largest != i){
    tmp = A[i];
    A[i] = A[largest];
    A[largest] = tmp;
  maxHeapify(largest);
  }
}
int main()
{
  int i;

  scanf("%d",&n);

  for(i=1; i<=n; i++){
    scanf("%d",&A[i]);
  }

  for(i=n/2; i>0; i--) maxHeapify(i);
  for(i=1; i<=n; i++){
    printf(" %d",A[i]);
  }
  printf("\n");
  return 0;
}



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

int N;
char A[110], B[110], C[110];

int main(){
	scanf("%d%s%s%s",&N, A, B, C);
	int ret = 0;

	for(int i=0;i<N;++i){
		char a = A[i], b = B[i], c = C[i];
		if(a == b && b == c && c == a) ret+=0;
		else if (a == b || b == c || c == a) ret+=1;
		else ret+=2;
	}
	printf("%d\n",ret);
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
typedef int64_t Int;
typedef tuple<Int, Int, Int> TP;

int main(){
    Int N, Q;
    vector<TP> events;

    cin >> N >> Q;
    rep(i, N){
        Int S, T, X;
        cin >> S >> T >> X;

        Int L = S-X;
        Int R = T-X;
            
        events.push_back(TP(L, 1, X));
        events.push_back(TP(R, -1, X));
    }

    sort(events.begin(), events.end());

    auto now = events.begin();
    set<Int> stopped; //通行止めの座標の集合
    rep(query, Q){
        Int D; cin >> D;

        while(get<0>(*now) <= D && now != events.end()){
            if(get<1>(*now) == 1){
                stopped.insert(get<2>(*now));
            } else {
                stopped.erase(get<2>(*now));
            }
            now++;
        }

        if(stopped.empty()){
            cout << -1 << endl;
        } else {
            cout << *stopped.begin() << endl;
        }
    }
}

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

using namespace std;

const int MAXN = 1e5 + 10;

int dp[MAXN];

vector< int > gr[MAXN];

int deg[MAXN];
queue< int >q ;

int main() {
    #ifdef BLAT
        freopen("input", "r", stdin);
    #endif

    int n, m;
    cin >> n >> m;
    for(int i = 1; i <= m; ++i) {
    	int a, b;
    	cin >> a >> b;

    	gr[a].emplace_back(b);
    	deg[b] ++;
    }

    for(int i = 1; i <= n; ++i) {
    	if(!deg[i]) q.push(i);
    }

    int ans = 0;
    while(q.size()) {
    	int node = q.front();
    	ans = max(ans, dp[node]);
    	q.pop();
    	for(auto &x : gr[node]) {
    		dp[x] = max(dp[x], dp[node] + 1);
    		deg[x] --;
    		if(!deg[x]) q.push(x);
    	}
    }
    cout << ans;
}   

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

using namespace std;

#define ll long long
#define ld long double

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, k;
    cin >> n >> k;
    vector <int> a(n);
    for (int i = 0; i < n; i ++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    ll sum = 0;
    for (int i = 0; i < k; i ++) {
        sum += a[i];
    }
    cout << sum << endl;
    return 0;
}


Measured memory_bytes: 3616
import numpy as np
s = np.array(list(input()))
#Bの場所
ind = np.array(np.where(s=='B'))
#文字列の長さ
len_ind=ind.shape[1]
#Bの個数
len=s.shape[0]
#Bの移動先
dist=np.arange(len-len_ind,len)
#答え
ans=np.sum(dist-ind)
print(ans)

Measured memory_bytes: 18064
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 998244353;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
typedef complex<ld> Point;
const ld eps = 1e-9;
const ld pi = acos(-1.0);
typedef pair<ll, ll> LP;
int l[10];
int main(){
	int n; cin >> n;
	rep(i, n) {
		cin >> l[i];
	}
	sort(l, l + n);
	int sum = 0;
	rep(i, n - 1) {
		sum += l[i];
	}
	if (sum > l[n-1]) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	//stop
	return 0;
}


Measured memory_bytes: 256
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
using namespace std;
typedef long long lng;
typedef unsigned long long ulng;

#define pb push_back
#define SZ(a) int((a).size())
#define ALL(aA) (a).begin(), (a).end()
#define FOR(i,a,b) for(int i=(a); i<=(b); ++i)
#define FORD(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) FOR(i,0,n-1)
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())

lng power(lng b, lng e) {lng sol=1; while(e>0) {if(e&1) {sol=sol*b;} e>>=1; b*= b;} return sol;}

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

    int a, b;
    cin >> a >> b;

    int ans = 0;
    FOR(i, a, b) {
        int ni = i;
        int num = 10000;
        if(ni%10 == ni/num) {
            ni -= num * (ni/num);
            ni /= 10;
            num /= 100;
            if(ni%10 == ni/num) ans++;
        }
    }

    cout << ans << endl;
}


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

int main(void) {
    int n, m; cin >> n >> m;
    vector<string> s(n);
    for(int i=0; i<n; ++i) cin >> s[i];
    sort(s.begin(), s.end());
    for(auto&& e: s) cout << e;
    cout << endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<algorithm>
#include<vector>
using namespace std;
int main(void){

while(true){
  long n , m;     cin >> n >> m;
  if(n == 0 && m == 0)    break;

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

  long ans = 0;
  for(int i = 1 ; i < n ; i++){
    for(int j = 0 ; j < i ; j++){
      if(a[i] + a[j] <= m)
        ans = max(ans , a[i] + a[j]);
    }
  }

  if(ans == 0)
    cout << "NONE" << endl;
  else
    cout << ans << endl;
}

  return 0;
}



Measured memory_bytes: 3024
void main() {
	auto S = rs;
	if(matchAll(S, "^(dream|dreamer|erase|eraser)+$")) {
		writeln("YES");
	} else {
		writeln("NO");
	}
}

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

import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.range;
import std.traits;
import std.math;
import std.container;
import std.bigint;
import std.numeric;
import std.conv;
import std.typecons;
import std.uni;
import std.ascii;
import std.bitmanip;
import std.regex;
import core.bitop;

T readAs(T)() if (isBasicType!T) {
	return readln.chomp.to!T;
}
T readAs(T)() if (isArray!T) {
	return readln.split.to!T;
}

T[][] readMatrix(T)(uint height, uint width) if (!isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		res[i] = readAs!(T[]);
	}
	return res;
}

T[][] readMatrix(T)(uint height, uint width) if (isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		auto s = rs;
		foreach(j; 0..width) res[i][j] = s[j].to!T;
	}
	return res;
}

int ri() {
	return readAs!int;
}

double rd() {
	return readAs!double;
}

string rs() {
	return readln.chomp;
}

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

int main() {
    string s, t;
    int ans = 0;
    cin >> s >> t;
    rep(i, s.size()) {
        if (s[i] != t[i])
            ans++;
    }
    cout << ans << endl;
}

Measured memory_bytes: 3916
#include<stdio.h>

int main(){

	int a, b, d, r;
	double f;

	scanf("%d %d", &a, &b);

	r = a%b;
	d = (a - r) / b;
	f = 1.0*a/b;

	printf("%d %d %lf\n", d, r, f);

	return 0;

}




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

namespace contest_Csharp
{
    class Program
    {
        

        static void Main(string[] args)
        {
            var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);
            var vals = Console.ReadLine().Split(' ').
                Select(x => int.Parse(x)).ToArray();

            var ans = 0;
            for (int i = 0; i < 5; i++)
            {
                if (vals[i] == 0)
                    ans = i + 1;
            }



            Console.WriteLine(ans);
            Console.Out.Flush();
        }
        



    }
}




Measured memory_bytes: 28304
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <iostream>
#include <algorithm>

typedef char                SINT8;
typedef unsigned char       UINT8;
typedef short               SINT16;
typedef unsigned short      UINT16;
typedef int                 SINT32;
typedef unsigned int        UINT32;
typedef long long           SINT64;
typedef unsigned long long  UINT64;
typedef double              DOUBLE;

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))
#define REP(i,n) for(int (i)=0;(i)<(n);(i)++)

using namespace std;

int main() {

	map<string,SINT32> mp;
	SINT32 N = 0;
	SINT32 mx = 0;

	cin >> N;
	for (SINT32 i = 0; i < N; i++) {
		string s;
		cin >> s;
		mp[s]++;
	}

	SINT32 M = 0;
	cin >> M;
	
	for (SINT32 i = 0; i < M; i++) {
		string s;
		cin >> s;
		mp[s]--;
	}

	for(auto it=mp.begin();it!=mp.end();it++) {
		mx=max(mx,it->second);
	}

	cout << mx << endl;
	return 0;
}

//	sort(DATA.begin(),DATA.end());
//	sort(DATA.begin(),DATA.end(),std::greater<SINT32>());
//	__gcd(ANS,DATA[i]);

//	// DATA.emplace_back(BUF);	//後ろに追加

//  DATA.erase(std::unique(DATA.begin(), DATA.end()), DATA.end());

//	DATA.insert(DATA.begin() + X, 0);	//X番目の要素に0を挿入


//	vector<vector<SINT32>> DP(N,vector<SINT32>(3));　//2次元配列

/*
	SINT32 M = 3;
	vector<pair<SINT32,SINT32>> DATA2(M);
	for (SINT32 i = 0; i < M; i++) {
		cin >> DATA2[i].first;
		cin >> DATA2[i].second;
	}
	sort(DATA2.begin(),DATA2.end());
	cout << DATA2[0].first << endl;
	cout << DATA2[0].second << endl;
*/

// 	vector<pair<int,pair<int,int>>> DATA(M);
//	cin >> DATA[i].first;
//	cin >> DATA[i].second.first;
//	cin >> DATA[i].second.second;


//		APOSI = lower_bound(ADATA.begin(),ADATA.end(),QDATA[i]) - ADATA.begin();
//		BPOSI = lower_bound(BDATA.begin(),BDATA.end(),QDATA[i]) - BDATA.begin();


/* 文字列回転
	string N;
	cin >> N;
	N = N[N.length()-1] + N.substr(0,N.length()-1);
*/

Measured memory_bytes: 256
/*
  AOJ 2656
  Title:Taps
  @kankichi573
*/
#include <stdio.h>
#include <math.h>
#include <float.h>
#define min(x,y) (((x)<(y))?(x):(y))

double T,D,ta,tb,da,db;
double temp;
double diff;

main()
{
  double w;
  int i,j;
  
  scanf("%lf %lf",&T,&D);
  scanf("%lf %lf",&ta,&tb);
  scanf("%lf %lf",&da,&db);

  if(ta>tb)
    w=ta,ta=tb,tb=w,w=da,da=db,db=w;

  if(T<=ta)
    diff=(double)ta-T;
  else if(T>=tb)
    diff=(double)T-tb;
  else
    {
      diff=100.0;
      for(i=0;i*da<=D;i++)
	for(j=0;i*da+j*db<=D;j++)
	  {
	    if(i==0 && j==0)
	      continue;
	    temp=(ta*i*da+tb*j*db)/(i*da+j*db);
	    //printf("%lf %lf %lf \n",i*da,j*db,temp);
	    diff=min(diff,fabs(T-temp));
	  }
    }
  printf("%lf\n",diff);
  return(0);
}

Measured memory_bytes: 644
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

//面白そうなのを見つけたので

const int cm = 1 << 17;
char cn[cm], *ci = cn + cm, ct;
inline char getcha() {
	if (ci - cn == cm) { fread(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline int getint() {
	int A = 0;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';
	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';
	return A;
}

int main() {
	int N = getint();
	int A[100000];
	rep(i, N) A[i] = getint();

	vector<int> V;
	int M = sqrt(A[0]);
	for (int i = M; i >= 1; i--) {
		if (A[0] % i == 0) {
			V.pb(i);
			V.pb(A[0] / i);
		}
	}
	M = sqrt(A[1]);
	for (int i = M; i >= 1; i--) {
		if (A[1] % i == 0) {
			V.pb(i);
			V.pb(A[1] / i);
		}
	}
	sort(V.begin(), V.end());
	for (auto itr = V.rbegin(); itr != V.rend(); itr++) {
		ce(*itr);
		int k = 0;
		rep(i, N) {
			if (A[i] % (*itr)) k++;
			if (k > 1) break;
		}
		if (k <= 1) {
			co(*itr);
			break;
		}
	}

	Would you please return 0;
}

Measured memory_bytes: 768
#include<bits/stdc++.h>
using namespace std;
long long int a[100050];
int main()
{
	int n,k=0;
	cin>>n;
	for(int i=0; i<n; i++)
		scanf("%lld",&a[i]);
	sort(a,a+n);
	for(int i=0; i<n; i++)
	{
		if(a[i]>=0 && a[i-1]<0)
			k=i;  //k个负数   n-k个非负数
		if(a[n-1]<0)
			k=n;
	}
	int n1=n;
	long long int sum=0;
	if(k==0)
	{
		for(int i=1; i<n; i++)
		{
			sum+=a[i];
		}
		sum-=a[0];
		cout<<sum<<endl;

		for(int i=k; i<n1-2; i++)
		{
			cout<<a[i]<<" "<<a[i+1]<<endl;
			a[i+1]=a[i]-a[i+1];
		}
		cout<<a[n1-1]<<" "<<a[n1-2]<<endl;
	}
	if(k>0 && n-k>0)
	{
		for(int i=0; i<n; i++)
		{
			sum+=abs(a[i]);
		}
		cout<<sum<<endl;

		for(int i=k-1; i<n1-2; i++)
		{
			cout<<a[i]<<" "<<a[i+1]<<"\n";
			a[i+1]=a[i]-a[i+1];
		}
		cout<<a[n1-1]<<" "<<a[n1-2]<<"\n";
		a[k-1]=a[n1-1]-a[n1-2];

//		cout<<a[n1-1]<<" "<<a[0]<<"\n";
//		a[0]=a[n1-1]-a[0];
		for(int i=k-1; i>0; i--)
		{
			cout<<a[i]<<" "<<a[i-1]<<"\n";
			a[i-1]=a[i]-a[i-1];
		}

	}
	if(n==k)
	{
		for(int i=0; i<n-1; i++)
		{
			sum+=a[i];
		}
		sum=a[n-1]-sum;
		cout<<sum<<endl;

		for(int i=n-1; i>0; i--)
		{
			cout<<a[i]<<" "<<a[i-1]<<endl;
			a[i-1]=a[i]-a[i-1];
		}
	}

	return 0;
}

Measured memory_bytes: 2688
#include <iostream>
#include <string>

using namespace std;

int main() {
	int n, a, b;
	cin >> n >> a >> b;

	string ans = "Draw";
	if (abs(a - b) % 2 == 1) {
		ans = "Borys";
	} else {
		ans = "Alice";
	}

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


Measured memory_bytes: 256
#union-find-tree
import sys
sys.setrecursionlimit(10**7)
def init(n):
    return list(range(n+1))
def find(lis, x):
    if lis[x] == x:
        return x
    else:
        lis[x] = find(lis, lis[x])
        return lis[x]
def sameset(lis, x, y):
    return find(lis, x) == find(lis, y)
def union(lis, x, y):
    x = find(lis, x)
    y = find(lis, y)
    if x != y:
        lis[x] = y

n, q = map(int, input().split())
union_find_lis = init(n-1)
for _ in range(q):
    com, x, y = map(int, input().split())
    if com == 0:
        union(union_find_lis, x, y)
    else:
        if sameset(union_find_lis, x, y):
            print(1)
        else:
            print(0)


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

#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef complex<double> point;
#define xx real()
#define yy imag()

#define REP(i, a, b) for(int i = (a); i < (int)(b); i++)
#define REPN(i, a, b) for(int i = (a); i <= (int)(b); i++)
#define FA(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define SZ(x) (int)(x).size()
#define BE(x) (x).begin(), (x).end()
#define SORT(x) sort(BE(x))
#define _1 first
#define _2 second

#define x1 gray_cat_x1
#define y1 gray_cat_y1

template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }

#define file "I1"

const double EPS = 1e-9;
const double PI = acos(-1.);
const int INF = 1e9;
const ll MOD = 1e9 + 7;

const int MAXN = 1e5 + 5;

int a[MAXN];

void solve(){
	int n, x;
	scanf("%d%d", &n, &x);
	REP(i, 0, n) {
		scanf("%d", &a[i]);
	}
	sort(a, a + n);
	int ans = 0;
	for(; ans < n; ans++) {
		if (x >= a[ans]) {
			x -= a[ans];
		} else {
			break;
		}
	}
	if (x && ans == n) {
		ans--;
		ans = max(ans, 0);
	}
	printf("%d\n", ans);
}   

int main(){

    //freopen(file".in", "r", stdin); freopen(file".out", "w", stdout);
    int t = 1;
    //cin >> t;
    while(t--){
        solve();    
    }
}


Measured memory_bytes: 256
Option Strict On

Module Module1
    Dim a, b, v As Long

    Sub Main()
        Dim arr() As Long = Array.ConvertAll(Of String, Long) _
            (Console.ReadLine().Split(), AddressOf Long.Parse)

        'let'
        a = arr(0) : b = arr(1)

        Dim ans As Int32 = 1
        For Each v In arr
            ans *= CInt(v Mod 2)
        Next

        Console.WriteLine(New String() {"Even", "Odd"}(ans))

    End Sub

End Module

Measured memory_bytes: 11220
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.regex.Pattern;

public class Main {
    public void solve(Stdin stdin, PrintWriter stdout) throws NumberFormatException, IOException {
        int n = stdin.nextInt();
        List<List<Integer>> oks = new ArrayList<>();
        List<List<Integer>> ngs = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            oks.add(new ArrayList<>());
            ngs.add(new ArrayList<>());
        }
        for (int i = 0; i < n; i++) {
            int a = stdin.nextInt();
            for (int j = 0; j < a; j++) {
                int x = stdin.nextInt() - 1;
                int y = stdin.nextInt();
                if (y == 1) {
                    oks.get(i).add(x);
                } else {
                    ngs.get(i).add(x);
                }
            }
        }

        int ans = 0;
        for (int bit = 0; bit < (1 << n); bit++) {
            boolean good = true;
            for (int i = 0; i < n; i++) {
                if ((bit & (1 << i)) == 0) {
                    continue;
                }

                for (int ok : oks.get(i)) {
                    if ((bit & (1 << ok)) == 0) {
                        good = false;
                    }
                }
                for (int ng : ngs.get(i)) {
                    if ((bit & (1 << ng)) != 0) {
                        good = false;
                    }
                }
            }

            if (good) {
                ans = Math.max(ans, Integer.bitCount(bit));
            }
        }

        stdout.println(ans);
    }

    public static void main(String[] args) throws NumberFormatException, IOException {
        Stdin stdin = new Stdin();
        PrintWriter stdout = new PrintWriter(System.out, false);
        new Main().solve(stdin, stdout);
        stdout.flush();
    }

    public static class Stdin {
        private Deque<String> queue;
        private BufferedReader stdin;
        private Pattern delimiter;

        public Stdin() {
            queue = new ArrayDeque<>();
            stdin = new BufferedReader(new InputStreamReader(System.in));
            delimiter = Pattern.compile(" ");
        }

        public String next() throws IOException {
            if (queue.isEmpty()) {
                delimiter.splitAsStream(stdin.readLine()).forEach(queue::addLast);
            }
            return queue.removeFirst();
        }

        public int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(next());
        }
    }
}


Measured memory_bytes: 41328
n,q = map(int,input().split())
s = input()

tmp = [0 for _ in range(n)]

for i in range(1,n):
  if s[i] == 'C' and s[i-1] == 'A':
    tmp[i] = tmp[i-1] + 1
  else:
    tmp[i] = tmp[i-1]

for i in range(q):
  l,r = map(int,input().split())
  print(tmp[r-1]-tmp[l-1])


Measured memory_bytes: 6180
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[][]G = new int[n][n];
		for(int i = 0; i < n; i++) {
			int u = scan.nextInt() - 1;
			int k = scan.nextInt();
			for(int j = 0; j < k; j++) {
				G[u][scan.nextInt() - 1] = 1;
			}
		}
		scan.close();
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < n; j++) {
				if(j == n - 1) {
					System.out.println(G[i][j]);
				}else {
					System.out.print(G[i][j] +" ");
				}
			}
		}
	}
}


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

using namespace std;

#define all(x) x.begin(), x.end()
#define sz(x) (int) x.size()
#define pb push_back
#define endl '\n'
#define snd second
#define fst first
#define fastio cin.tie(NULL),cout.sync_with_stdio(true)

typedef long long int ll;
typedef unsigned long long int ull;
typedef vector <int> vi;
typedef pair <int, int> ii;

const ll mod = 998244353;
//const ll mod = 1e9 + 7;
const ll INF = (1LL<<50);
const double EPSILON = 0.001;
const int N = 200005;
ll mul(ll a, ll b){
	return a*b%mod;
}
ll add(ll a, ll b){
	a += b;
	if(a >= mod)
		a-=mod;
	return a;
}
ll expo(ll a, ll b){
	ll r = 1;
	for(;b; b >>= 1, a = mul(a,a))
		if(b&1)
			r = mul(r, a);
	return r;
}
ll fact[N], ifact[N];
void init(){
	fact[0] = 1;
	for(ll i = 1; i < N; i++)
		fact[i] = mul(i, fact[i-1]);
	ifact[N-1] = expo(fact[N-1], mod-2);
	for(ll i = N-2; i >= 0; i--)
		ifact[i] = mul(ifact[i+1], i+1);
}
ll ncr(ll n, ll r){
	if(n < r)return 0;
	return mul(fact[n], mul(ifact[r], ifact[n-r]));
}
/*
	from n total blocks, (n-1) is the total of adj pairs.
	assuming we want to make only k pairs to have the same color
	doesn't matter how those pairs are distributed , the ways to
	color them always follow that formula : C(n-1,k) * m * 1^(k) * (m-1)^(n-1-k)
	so the final answer is:
			i:(0,k) Σ C(n-1,i) * m * 1^i * (m-1) ^(n-1-i)
*/
int main(){
	fastio;
	init();
	int n,m,k,ans = 0;
	cin >> n >> m >> k;
	for(int i = 0; i <= k; i++)
		ans = add(ans, mul(ncr(n-1, i), mul(m, expo(m-1, n-1-i))));
	cout << ans << '\n';
	return 0;
}


Measured memory_bytes: 6736
#include <iostream>
#include <map>

typedef long long ll;
using namespace std;

const int MOD = 1000000007;

map<ll, ll> note;

ll DP(ll n) {
  if (note[n]) return note[n];

  note[n] = 
    DP(n/2) /// a, bの最後の桁が0, 0
    + DP((n-1)/2) /// 1, 0
    + DP(n/2-1); /// 1, 1
  note[n] %= MOD;
  return note[n];
}

int main() {
  ll n;
  cin >> n;

  note[0] = 1; /// 0になる組み合わせは(0, 0)
  note[1] = 2; /// 1になる組み合わせは(1, 0), (0, 1)
  cout << DP(n) << endl;

  return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<algorithm>
#include<functional>
#include<utility>
#include<bitset>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<cstdio>

using namespace std;

#define REP(i,n) for(int i=0;i<int(n);i++)
#define foreach(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
typedef long long ll;
typedef pair<int,int> P;

int main(void){
	          int i;

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

	          int A,B,C;
	          cin >> A >> B  >> C;

	          int q=C/(7*A+B),r=C%(7*A+B);
	          if(r<=7*A) r=(r+A-1)/A;
	          else r=7;

	          cout << 7*q+r << endl;

	          return 0;
}



Measured memory_bytes: 3176
import java.util.Scanner;
public class Main{

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int[] P = new int[5];

		int ans = 0;

		int p = 1000;

		int q = 1000;

		boolean flag = false;

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

			P[i] = sc.nextInt();

			q = P[i]%10;

			if(q<p && q!=0) {

				p = q;

				flag = true;
			}

			if(q!=0)ans = ans + P[i]+(10-q);

			else ans += P[i];
		}

		if(flag)System.out.println(ans+p-10);

		else System.out.println(ans);
	}

}


Measured memory_bytes: 21972
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <tuple>
#include <bitset>
#include <random>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main() {
  int h,w;
  cin>>h>>w;
  vector<vector<char>> ar(h,vector<char>(w));
  vector<bool> flag_row(h,false),flag_column(w,false);
  
  REP(i,h){
    REP(j,w){
      cin>>ar[i][j];
      if(ar[i][j]=='#'){
        flag_row[i]=true;
        flag_column[j]=true;
      }
    }
  }
  REP(i,h){
    REP(j,w){
      if(flag_row[i]&&flag_column[j]){
        cout<<ar[i][j];
      }
      if(j==w-1){
        cout<<endl;
      }
    }
  }

  
  return 0;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"

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

using namespace std;

struct Edge {
    int to;     // 辺の行き先
    int weight; // 辺の重み
    Edge(int t, int w) : to(t), weight(w) { }
};

//using Graph = vector<vector<Edge>>
using Graph = vector<vector<int>>;

// header area

int main() {
    long long X;
    cin >> X;

    //long long A, B;
    long long ans = 0;

    long long n = 1000;

    for (long long B = -n; B < n; B++) {
        for (long long A = B; A < n; A++) {
            ans = pow(A, 5) - pow(B, 5);
            if (ans == X) {
                cout << A << " " << B;
                return 0;
            }
        }
    }
    cout << "nothing";
}

Measured memory_bytes: 4100
#include<cstdio>
#define p 1000000007
int i,j,_[8][2]={{},{2,3},{4,1},{5,7},{2,2},{6,3},{5,5},{7,7}},dp[2][8];
char s[300005];
int main()
{
	scanf("%s",s+1);
	int*f=dp[0],*g=dp[1],*q;
	for(f[1]=i=1;s[i];i++,q=f,f=g,g=q)for(j=1;j<8;f[j++]=0)if(f[j])s[i]!='1'&&((g[_[j][0]]+=f[j])%=p),s[i]!='0'&&((g[_[j][1]]+=f[j])%=p);
	printf("%d",(f[3]+f[7])%p);
}

Measured memory_bytes: 512
A,B = map(int,input().split())
def gcd(x,y):
    if x<y:x,y = y,x
    if y==0:return x
    return gcd(y,x%y)
G = gcd(A,B)
S = set()
S.add(1)
n = G
for i in range(2,G+1):
    if i*i>n:
        S.add(n)
        break
    if n%i==0:
        S.add(i)
    while n%i==0:
        n//=i
print(len(S))

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1e9 + 7;
int64_t dp[101][100001];
int main() {
    #ifdef DEBUG
    std::ifstream in("/home/share/inputf.in");
    std::cin.rdbuf(in.rdbuf());
    #endif
    int N, K;
    cin >> N >> K;
    for(int k = 0; k <= K; k++) {
        dp[0][k] = 0;
    }
    dp[0][0] = 1;
    for(int i = 0; i < N; i++) {
        int a = 0;
        cin >> a;
        int64_t S = 0;
        for(int k = 0; k <= K; k++) {
            S = (S + dp[i][k]) % MOD;
            dp[i + 1][k] = S;
            if(k >= a) {
                S = (S - dp[i][k - a] + MOD) % MOD;
            }
        }
    }
    cout << dp[N][K] << endl;
    return 0;
}

Measured memory_bytes: 79104
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#include <list>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
//#define cerr if(false) cerr
#ifdef DEBUG
#define show(...) cerr << #__VA_ARGS__ << " = ", debug(__VA_ARGS__);
#else
#define show(...) 42
#endif
using namespace std;
using ll = long long;
using pii = pair<int, int>;
template <typename T, typename S>
ostream& operator<<(ostream& os, pair<T, S> a) {
    os << '(' << a.first << ',' << a.second << ')';
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
    for (auto x : v) os << x << ' ';
    return os;
}
void debug() {
    cerr << '\n';
}
template <typename H, typename... T>
void debug(H a, T... b) {
    cerr << a;
    if (sizeof...(b)) cerr << ", ";
    debug(b...);
}
int main(){
    int h, n;
    cin >> h >> n;
    vector<int>a(n);
    rep(i,n)cin >> a[i];
    int s = accumulate(a.begin(),a.end(),0);
    if(h <= s){
        puts("Yes");
    }else{
        puts("No");
    }
}


Measured memory_bytes: 640
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Math;
using static System.Array;
namespace AtCoderSolve
{
    class Solve
    {
        const int mod = 1000000007;
        const int INF = 2147483647;
        const long SINF = 9223372036854775807;

        //static int N, Q, K;
        //static int[] a, b, c, x, y;
        static string S;


        public static void Input()
        {
            var cin = new Scanner();
            S = Console.ReadLine();
        }

        static void Main(string[] args)
        {
            Input();
            //var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            //Console.SetOut(sw);

            
            long ans = 0;
            for(var i = 0; i < S.Length; i++)
            {
                if (i == 0) { continue; }
                if (S[i] != S[i - 1]) { ans++; }
            }

            Console.WriteLine(ans);
            //Console.Out.Flush();
        }

    }

    public class Scanner
    {
        public int[] SplitReader()
        {
            int[] array = Console.ReadLine().Split().Select(int.Parse).ToArray();
            return array;
        }
        public long[] SplitReaderL()
        {
            long[] array = Console.ReadLine().Split().Select(long.Parse).ToArray();
            return array;
        }

        public int[] MultiLineReader(int N)
        {
            int[] ret = new int[N];
            for(var i = 0; i < N; i++)
            {
                ret[i] = int.Parse(Console.ReadLine());
            }

            return ret;
        }
        public long[] MultiLineReaderL(int N)
        {
            long[] ret = new long[N];
            for (var i = 0; i < N; i++)
            {
                ret[i] = long.Parse(Console.ReadLine());
            }

            return ret;
        }

    }

    public class Graph
    {
        public void Dfs(List<List<int>> graph, bool[] seen, int v)
        {
            seen[v] = true;
            //初めて訪れたタイミングでここの処理

            foreach (var next in graph[v])
            {
                if (seen[next] == true) { continue; }
                Dfs(graph, seen, next);
            }
            //行き先がない状態になったらこの部分の処理

        }

        public void Gin(List<List<int>> graph, int size)
        {
            for (var i = 0; i < size; i++)
            {
                graph.Add(new List<int>());

            }
        }

        public void InitializeFalse(bool[] seen)
        {
            for (var i = 0; i < seen.Length; i++)
            {
                seen[i] = false;
            }
        }

        public bool AllTrue(bool[] seen)
        {
            for (var i = 0; i < seen.Length; i++)
            {
                if (!seen[i])
                {
                    return false;
                }
            }
            return true;
        }
    }
}

    



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

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef long long ll;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const long long INT_INF = 2147483647;
const long long LL_INF = 1LL<<60;
const long long MOD = 1000000007;

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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(void){
    ll N; cin >> N;
    vector<ll> A(N+1); REP(i,N) cin >> A[i+1];
    A[0] = 0;

    ll sum = abs(A[N]); REP(i,N) sum += abs(A[i+1]-A[i]);
    REP(i,N-1) cout << sum - (abs(A[i+2]-A[i+1]) + abs(A[i+1]-A[i])) + abs(A[i+2]-A[i]) << endl;
    cout << sum - abs(A[N]-A[N-1]) - abs(A[N]) + abs(A[N-1]) << endl;; 
    return 0;
}

Measured memory_bytes: 2048
#include<bits/stdc++.h>
using namespace std;
int main(){
  long N,K;cin>>N>>K;
  vector<long>A(N);for(int i=0;i<N;i++)cin>>A[i];
  cout<<(N-1)/(K-1)+((N-1)%(K-1)!=0);
}

Measured memory_bytes: 1152
h, w = map(int, input().split())
s = ["."*(w+2)]+["."+input()+"." for _ in range(h)]+["."*(w+2)]
Bl = set()

for i, t in enumerate(s):
    for j, w in enumerate(t):
        if w == '#':
            Bl.add((i, j))

for p in Bl:
    if (p[0]+1, p[1]) not in Bl and (p[0], p[1]+1) not in Bl and \
     (p[0]-1, p[1]) not in Bl and (p[0], p[1]-1) not in Bl:
        print("No")
        break
else:
    print("Yes")


Measured memory_bytes: 3316
#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(int)(n); i++)
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
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;}
/*
void chmin(ll a, ll b){if (a>b){a = b; return true;}return false;}
void chmax(ll a, ll b){if (a<b){a = b; return true;}return false;}
*/

const ll MOD = 1000000007;
const ll INF = 9999999999;

void primes(vector<bool> &prime){
  // 1000までの数が各々素数かどうか格納
  prime.at(0) = false, prime.at(1) = false;
  for (int i=0; i<prime.size(); i++){
    if (!prime.at(i)) continue;
    int j = i*2;
    while (j < 1000){
      prime.at(j) = false; j += i;
    }
  }
  return;
}

void divisor(int n, vector<int> &divi, vector<bool> &prime){
  for (int i=0; i<=n; i++){
    if (!prime.at(i)) continue;
    while (n%i == 0){
      divi.at(i)++;
      n /= i;
    }
  }
  return;
}

int main() {
  int n; cin >>n;
  vector<bool> prime(1001, true);
  vector<int> divi(1001, 0);
  primes(prime); // 素数のindexにはtrueを格納
  prime.at(1000) = false;
  for (int i=1; i<=n; i++){
    divisor(i, divi, prime);
  }
  ll ans = 1;
  for (int i=0; i<=n; i++){
    ans = ans * (divi.at(i) + 1) % MOD;
  }

  cout <<ans <<endl;
}

Measured memory_bytes: 256
<?php
  $array = explode(' ', trim(fgets(STDIN)));
  $w = $array[0];
  $c = $array[1];
  if ($w <= $c || $w <= $c*2) {
    echo 0 . PHP_EOL;
    return;
  }

  echo $w - ($c*2)  . PHP_EOL;

Measured memory_bytes: 4604
import sys
input = sys.stdin.readline
N, K = map(int, input().split())
a = list(map(int, input().split()))
res = float("inf")
for i in range(N - K + 1):
  if a[i] * a[i + K - 1] < 0:
    mn = min(abs(a[i]), abs(a[i + K - 1]))
    mx = max(abs(a[i]), abs(a[i + K - 1]))
    res = min(res, mn * 2 + mx)
  else:
    res = min(res, max(abs(a[i]), abs(a[i + K - 1])))
print(res)

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

int ans, k, s;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	
	cin >> k >> s;

	for (int i = 0; i <= k; i++) {
		for (int j = 0; j <= k; j++) {
			int z = s - (i+j);
			if (z >= 0 && z <= k) {
				ans++;
			}
		}
	}

	cout << ans << '\n';

	return 0;
}

Measured memory_bytes: 256
import sys
import math

MOD=10**9+7

def egcd(a, b):
    (x, lastx) = (0, 1)
    (y, lasty) = (1, 0)
    while b != 0:
        q = a // b
        (a, b) = (b, a % b)
        (x, lastx) = (lastx - q * x, x)
        (y, lasty) = (lasty - q * y, y)
    return lastx


x,y=map(int,input().split())

if (x+y)%3!=0: print(0),sys.exit()
p=(x+y)//3
q=min((2*y-x)//3,(2*x-y)//3)
if q<0: print(0),sys.exit()

ans=1
for i in range(q):
    ans=(ans*(p-i)*egcd(i+1,MOD))%MOD
print(ans)

Measured memory_bytes: 3064