akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fast ios_base::sync_with_stdio(false);  cin.tie(NULL); cout.tie(NULL);
#define scan(a,n) for(long int index=0;index<n;index++) cin>>a[index];
#define print(a,n) for(long int index=0;index<n;index++) cout<<a[index]<<" ";cout<<endl;
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define vli vector<long long int>
#define vlli vector<pair<long long int,long long int>>
#define vsi vector<string>
#define vci vector<char>


 
int main() {
   #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    fast;
    ll n;
    cin>>n;
    if(n>=30) cout<<"Yes";
    else cout<<"No";
  
return 0;
    
 }  

Measured memory_bytes: 3608
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define countof(array) (sizeof(array) / sizeof(array[0]))
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = (n)-1; i >= 0; --i)
#define rep2(i,n) for(int i = 1; i <= (n); ++i)
#define rrep2(i,n) for(int i = (n); i > 0; --i)
#define srep(i,s,n) for(int i = s; i < (n); ++i)
#define rsrep(i,s,n) for(int i = (n)-1; i >= s; --i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define aall(a) (a), (a)+countof(a)//for array sorting
#define raall(a) (a), (a)+countof(a), greater<>()
#define show(x) cout<<#x<<" = "<<(x)<<endl;
#define vfind(v, a) find(all(v), a) != v.end()
#define yn(f) { if (f) puts("YES"); else puts("NO"); }
#define yns(f) { if (f) puts("Yes"); else puts("No"); }
#define show_ary(...) { cout<<#__VA_ARGS__<<" = "; for (const auto& x : (__VA_ARGS__)) { cout<<x<<" "; } cout<<endl; }
#define show_pair(...) cout<<#__VA_ARGS__<<" = "<<endl; for (const auto& x : (__VA_ARGS__)) { cout<<"  "<<x.fi<<" : "<<x.se<<endl; }
#define out_ary(...) { int n = (__VA_ARGS__).size(); rep(i, n) printf("%d%s", (__VA_ARGS__)[i], i != n-1 ? " " : "\n"); }
#define argmax(v) distance((v).begin(), max_element(all(v)))
#define argmin(v) distance((v).begin(), min_element(all(v)))
#define vmax(v) *max_element(all(v))
#define vmin(v) *min_element(all(v))
typedef long long int ll;
typedef pair<int, int> P;
typedef vector<P> vpair;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<double> vdouble;
typedef vector<string> vstr;
typedef vector<bool> vbool;
typedef vector<vint> vvint;
typedef vector<vll> vvll;
typedef vector<vstr> vvstr;
typedef vector<vbool> vvbool;
const ll LINF = 2000000000000000000ll;
const int INF = 1000000100;
const ll MOD = 1e9+7;

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

    string ans = s.substr(0, 3);
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3624
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	string s;
	cin>>s;
	for (int i=0;i<s.length();i++)
	{
		if (s[i]=='1')
		s[i]='9';
		else if (s[i]='9')
		s[i]='1';
	}
	cout<<s<<endl;
}

Measured memory_bytes: 764
#include <stdio.h>
#include <string.h>
int q[20000], top, bottom;
int map[2][60][60], visited[60][60];
int main(void)
{
    int w, h;
    while (scanf("%d%d", &w, &h), w) {
        int i, j, res;
        memset(map, 0, sizeof(map));
        memset(visited, 0, sizeof(visited));
        for(i=0;i<2*h-1;++i)
            for(j=!(i%2);j<w;++j)
                scanf("%d", &map[i%2][i/2][j]);

        if (w==1 && h==1) { puts("0"); continue; }
        top=bottom=res=0;
        visited[0][0]=1;
        q[bottom++]=0;
        while (top!=bottom) {
            int r=q[top]/100;
            int c=q[top]%100;
            int k=visited[r][c];
            ++top;
            if (r==h-1 && c==w-1) { res=visited[r][c]; break; }
            if (r+1<h && !map[1][r][c] && !visited[r+1][c]) {
                q[bottom++]=(r+1)*100+c;
                visited[r+1][c]=k+1;
            }
            if (r-1>=0 && !map[1][r-1][c] && !visited[r-1][c]) {
                q[bottom++]=(r-1)*100+c;
                visited[r-1][c]=k+1;
            }
            if (c+1<w && !map[0][r][c+1] && !visited[r][c+1]) {
                q[bottom++]=r*100+c+1;
                visited[r][c+1]=k+1;
            }
            if (c-1>=0 && !map[0][r][c] && !visited[r][c-1]) {
                q[bottom++]=r*100+c-1;
                visited[r][c-1]=k+1;
            }
        }
        printf("%d\n", res);
    }
    return 0;
}

Measured memory_bytes: 656
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <ccomplex>
#include <unordered_map>
#include <cstring>
#include <iostream>
#include <numeric>
#include <sstream>
#include <set>
#include <tuple>
#include <iomanip>

using namespace std;
#define MAX 1LL << 60

typedef long long ll;

#define rep(i, s, e) for(ll i = s; i < e; i++)
#define repR(i, s, e) for(ll i = s; i > e; i--)
#define reft0(i, j) setfill('0') << setw(i) << j

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(){
	ll N, K;
    string S;
	cin >> N >> K >> S;
    S[K - 1] = tolower(S[K-1]);
	cout << S << endl;
 	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <complex>
#include <cmath>

using namespace std;

typedef complex<double> xy_t;
xy_t P[110];

int main (){
	int N = 0;
	double x, y;
	while (~scanf("%lf,%lf", &x, &y)){
		P[N++] = xy_t(x,y);
	}
	double sum = 0.0;
	for(int i = 0; i < N - 2; i++){
		xy_t a = P[0], b = P[(i+1) % N] , c = P[(i+2) % N];	
		sum += ((b.real()-a.real())*(c.imag()-a.imag()) - (b.imag()-a.imag())*(c.real()-a.real()));
	}
	printf("%.6f\n" , abs(sum)/2);
}

Measured memory_bytes: 1240
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
using namespace std;

int main(){
	int a, b;
	cin >> a >> b;
	
	if(a+b>9) printf("error\n");
	else printf("%d\n", a+b);
	
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <stdio.h>
#define llint long long

using namespace std;

llint N;
llint x[100005];
llint dif[100005];
llint M, K;
llint a[100005];
vector<llint> perm(100005), ans(100005), iden(100005);

vector<llint> pow(vector<llint> p, llint n)
{
	vector<llint> tmp(N), tmp2(N);
	
	if(n == 0) return iden;
	if(n % 2){
		tmp = pow(p, n-1);
		for(int i = 1; i <= N-1; i++) tmp2[i] = p[tmp[i]];
		return tmp2;
	}
	else{
		for(int i = 1; i <= N-1; i++) tmp[i] = p[p[i]];
		return pow(tmp, n/2);
	}
}

int main(void)
{
	cin >> N;
	for(int i = 1; i <= N; i++) cin >> x[i];
	for(int i = 1; i <= N-1; i++) dif[i] = x[i+1] - x[i];
	cin >> M >> K;
	for(int i = 1; i <= M; i++) cin >> a[i];
	
	for(int i = 1; i <= N-1; i++){
		perm[i] = i;
		iden[i] = i;
	}
	for(int i = 1; i <= M; i++){
		llint t = perm[a[i]];
		perm[a[i]] = perm[a[i]-1];
		perm[a[i]-1] = t;
	}
	
	ans = pow(perm, K);
	
	llint prev = x[1];
	cout << prev << endl;
	
	for(int i = 1; i <= N-1; i++){
		prev += dif[ans[i]];
		printf("%.11f\n", (double)prev);
	}
	
	return 0;
}

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

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

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

template<class S, class T> ostream& operator << (ostream& os, const pair<S, T> v){
  os << "(" << v.first << ", " << v.second << ")"; return os;
}
template<class T> ostream& operator << (ostream& os, const vector<T> v){
  for(int i = 0; i < v.size(); i++){if(i > 0){os << " ";} os << v[i];} return os;
}
template<class T> ostream& operator << (ostream& os, const vector<vector<T>> v){
  for(int i = 0; i < v.size(); i++){if(i > 0){os << endl;} os << v[i];} return os;
}

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

    ll H, W;
    cin >> H >> W;
    vector<ll> cnt(26, 0);
    REP(i, H){
    	string s;
    	cin >> s;
    	REP(j, W) cnt[s[j]-'a']++;
    }

    priority_queue<ll> pq;
    REP(i, 26) if(cnt[i]>0) pq.push(cnt[i]);

    REP(i, (H/2) * (W/2)){
    	ll tmp = pq.top();
    	pq.pop();
    	if(tmp >= 4){
    		tmp -= 4;
    		if(tmp > 0) pq.push(tmp);
    	}else{
    		cout << "No" << endl;
    		return 0;
    	}
    }

    if(H%2 == 1){
    	REP(i, W/2){
    		ll tmp = pq.top();
	    	pq.pop();
	    	if(tmp >= 2){
	    		tmp -= 2;
	    		if(tmp > 0) pq.push(tmp);
	    	}else{
	    		cout << "No" << endl;
	    		return 0;
	    	}
    	}
    }

    if(W%2 == 1){
    	REP(i, H/2){
    		ll tmp = pq.top();
	    	pq.pop();
	    	if(tmp >= 2){
	    		tmp -= 2;
	    		if(tmp > 0) pq.push(tmp);
	    	}else{
	    		cout << "No" << endl;
	    		return 0;
	    	}
    	}
    }

    if(H%2 == 1 && W%2 == 1){
    	REP(i, 1){
    		ll tmp = pq.top();
	    	pq.pop();
	    	if(tmp == 1){
	    		1;
	    	}else{
	    		cout << "No" << endl;
	    		return 0;
	    	}
    	}
    }

    cout << "Yes" << endl;
    return 0;
}

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

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

    for(int i=0; i<k; i++) {
        if( (i % 2) == 0) {
            a = (int) a / 2;
            b += a;
        } else {
            b = (int) b / 2;
            a += b;
        }
    }

    cout << a << ' ' << b;
    
    return 0;
}

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

int main()
{

    int n;
    vector<int>v;
    cin>>n;

    for(int i=0;i<n;i++){
        int k;
        cin>>k;
        v.push_back(k);
    }

    int m = v.size();
    int count=0;
    int ans = 0;
    for(int i=m-1; i>0; i--){
        if(v[i-1] >= v[i]){
            count++;
            ans = max(ans, count);
        }
        else{
            count=0;
        }
    }

    cout<<ans<<endl;

    return 0;
}



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

using namespace std;

int d[10][10];

void solve() {
    int n,m;
    cin >> n >> m;
    memset(d, 0, sizeof d);
    for (int _ = 0; _ < m; _++) {
        int x,y;
        cin >> x >> y;
        x--;y--;
        d[x][y] = d[y][x] = 1;
    }
    vector<int> perm(n);
    int cnt = 0;
    iota(perm.begin(), perm.end(), 0);
    do {
        if (perm[0]!=0) continue;
        bool y = true;
        for (int i = 1; i < n; i++) {
            y &= d[perm[i-1]][perm[i]];
        }
        if (y) cnt++;
    }while(next_permutation(perm.begin(), perm.end()));
    cout << cnt;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    cout << endl;
}


Measured memory_bytes: 256
import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv,
    std.functional, std.math, std.numeric, std.range, std.stdio, std.string,
    std.random, std.typecons, std.container;

ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Pair = Tuple!(long, "begin", long, "end");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

// 累積二乗法
long power_mod(long a, long n, long mod = MOD)
{
    long ret = 1;
    while (n)
    {
        if (n % 2)
        {
            ret *= a;
            ret %= mod;
        }
        a^^=2;
        a %= mod;
        n >>= 1;
    }
    return ret % mod;
}

long fermat_inv(long a, long mod = MOD)
{
    return a.power_mod(mod - 2);
}

auto lcm_mod(T)(T[] ary, T limit = MAX, long mod = MOD)
{
    // 素因数の形で保持
    auto lcm_table = new T[](limit + 1);
    auto minFactor = new long[](limit + 1);
    // 素因数分解には minFactor[i] = iに含まれる最小の素因数 とする配列を利用
    // この配列はエラトステネスの篩を使うことで高速に求められる
    // minFactorの設定
    {
        auto isPrime = new bool[](limit + 1);
        isPrime[] = true;
        isPrime[0] = isPrime[1] = false;
        foreach (i; iota(2, limit + 1))
        {
            if (isPrime[i])
            {
                foreach (j; iota(i, limit + 1, i))
                {
                    if (isPrime[j])
                    {
                        minFactor[j] = i;
                        isPrime[j] = false;
                    }
                }
            }
        }
    }
    // minFactor[]を利用した素因数分解とlcm_tableの設定
    foreach (e; ary)
    {
        long[long] prime_factor;
        while (minFactor[e])
        {
            if (minFactor[e] in prime_factor)
                prime_factor[minFactor[e]]++;
            else
                prime_factor[minFactor[e]] = 1;

            e /= minFactor[e];
        }
        foreach (key, value; prime_factor)
            lcm_table[key] = max(value, lcm_table[key]);
    }
    // lcmの計算(mod)
    long ret = 1;
    foreach (i, e; lcm_table)
    {
        if (e)
        {
            ret *= power_mod(i, e);
            ret %= mod;
        }
    }
    return ret;
}

void main()
{
    auto n = lread();
    auto a = aryread();
    // lcmのmodをなんとか計算したい
    auto lcm = a.lcm_mod();
    long ans;
    foreach (i; iota(n))
    {
        auto a_inv = a[i].fermat_inv();
        ans += lcm * a_inv % MOD;
        ans %= MOD;
    }
    writeln(ans % MOD);
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}


Measured memory_bytes: 21756
#include<bits/stdc++.h>
using namespace std;
#define pause system("pause")

int main()
{

	int n, a, b;
	cin >> n >> a >> b;
	bool flag = false;

	int  i = 1; 
	while (i *n <= b)
	{
		if (n * i <= b && n* i >= a)
		{
			flag = true; 
			break;
		}
		i++;
	}

	if (flag) cout << "OK" << endl;
	else cout << "NG" << endl;
	//pause;
}

Measured memory_bytes: 3636