akhauriyash/Code-Regression huggingface dataset:
#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();}

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 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)
#define RFOR(i,a,b) for(int i=(a)-1;i>=(b);--i)
#define RREP(i,n) RFOR(i,n,0)

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int 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){
    int N,R; cin >> N >> R;
    if(N >= 10) cout << R << endl;
    else cout << R + 100*(10-N) << endl;
    return 0;
}

Measured memory_bytes: 256
a, b = map(int, input().split())
def kansu_return_flag(a,b):
    ans = 0
    flag = 0

    if abs(a-b)%2 != 0:
        flag = 0
    else:
        ans = (a+b)/2
        flag = 1
    return flag,ans

flag,ans = kansu_return_flag(a,b)

if flag == 1:
    print(int(ans))
else:
    print('IMPOSSIBLE')

Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
    // ifstream in("data1.txt");
    // cin.rdbuf(in.rdbuf());
    int A, B;
    cin >> A >> B;
    if(A >= 1 && A <= 9 && B >= 1 && B <= 9) {
        cout << A * B << endl;
    } else {
        cout << -1 << endl;
    }
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int[] ints=new int[10];
        for(int i=0;i<10;i++){
            ints[i]=scanner.nextInt();
        }
        int max1=-1;
        int index1=0;
        for(int i=0;i<10;i++){
            if(max1<ints[i]){
                max1=ints[i];
                index1=i;
            }
        }
        ints[index1]=-1;
        int max2=-1;
        int index2=0;
        for(int i=0;i<10;i++){
            if(max2<ints[i]){
                max2=ints[i];
                index2=i;
            }
        }
        ints[index2]=-1;
        int max3=-1;
        int index3=0;
        for(int i=0;i<10;i++){
            if(max3<ints[i]){
                max3=ints[i];
                index3=i;
            }
        }
        System.out.println(max1);
        System.out.println(max2);
        System.out.println(max3);
    }

}



Measured memory_bytes: 26104
#include<bits/stdc++.h>
using namespace std;
#include<string>
#define ll long long int
#define ull unsigned long long int
#define ld long double
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define intarr(arr, n)  ll arr[n];  for (ll i = 0; i < n; i++)  cin >> arr[i]
#define inpvec(vec,n) for(ll i=0;i<n;i++){ll v;cin>>v;vec.push_back(v);}
#define ff first
#define ss second
#define pb push_back
#define mkp make_pair
#define vec vector<ll>
#define pi pair<ll,ll>
#define changeline cout<<endl
#define loop(i,a,b) for(ll i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define mod2 998244353
#define NO cout << "NO" <<endl
#define YES cout << "YES" <<endl
#define mem(arr,val) memset(arr,val,sizeof(arr));
const ll mod=1e9+7;

bool prime(ll n) 
{ 
    if (n <= 1)  return false; 
    if (n <= 3)  return true; 
    if (n%2 == 0 || n%3 == 0) return false; 
  
    for (ll i=5; i*i<=n; i=i+6) 
        if (n%i == 0 || n%(i+2) == 0) 
           return false; 
  
    return true; 
}
bool subsequence_checker(string str1, string str2, ll m, ll n) 
{ 
    if (m == 0) return true; 
    if (n == 0) return false; 
    if (str1[m-1] == str2[n-1]) 
        return subsequence_checker(str1, str2, m-1, n-1); 
    return subsequence_checker(str1, str2, m, n-1); 
}
ll inv(ll a)
{
    ll p=mod2;
    ll b=p-2,ans=1;
    for(;b > 0;a = a * a % p,b >>= 1)if(b & 1)ans = ans * a % p;
    return ans;
}
ll ncr(ll n,ll m)
{
    ll p=mod2;
    if(m > n)return 0;
    ll up=1,down=1;
    for(int i=n-m+1;i<n+1;i++)up*=i,up%=p;
    for(int i=1;i<m+1;i++)down*=i,down%=p;
    return up*inv(down)%p;
}

ll countDigit(ll n)
{   
    return floor(log10(n) + 1); 
}  
ll a_pow_b(ll a,ll b)
{
    ll p=1000000007;
    ll ans=1;
    for(;b > 0;a = a * a % p,b >>= 1)if(b & 1)ans = ans * a % p;
    return ans;
}
ll gcd(ll a,ll b) 
{ 
    if (b==0) 
        return a; 
    return gcd(b,a%b);      
} 
ll lcm(ll a, ll b)  
{  
    return (a*b)/gcd(a, b);  
}
bool isPerfectSquare(ll x) 
{   
  long double sr = sqrt(x); 
  return ((sr - floor(sr)) == 0); 
}
ll ncr123(ll n, ll k){
    if (k == 1) {
        return n;
    }
    if (k == 2) {
        return n * (n - 1) / 2;
    }
    if (k == 3) {
        return n * (n - 1) * (n - 2) / 6;
    }
}
bool com(const pi &a,const pi &b)   //acc to second element sort for vec of pi
{ 
    if(a.second==b.second)
        return a.first<b.first;
    return a.second<b.second;
}



void solve(){

    string s;
    cin>>s;
    string a="ARC";
    if(s==a)
        cout<<"ABC";
    else
        cout<<a;
    
    return ;
}
 
 
int main()
{
    IOS;
    ll t;
    //cin>>t;
    t=1;

    while(t--){
        solve();
        cout<<endl;
    }

    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}

Measured memory_bytes: 3576
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
#define pb push_back
using namespace std;
using ll=long long;
using ld=long double;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
struct edge{ll to,cost;};
struct edge2{ll from,to,cost;};

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

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N,X;
    cin >> N >> X;
    vl x(N);
    rep(i,N){
        cin >> x[i];
    }
    ll ans=abs(x[0]-X);
    rep(i,N-1){
        ans=gcd(ans,abs(x[i+1]-X));
    }
    cout << ans << endl;
}


Measured memory_bytes: 3968
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <list>
#define LL long long
using namespace std;
#define maxn 100007

int a[maxn];
int main()
{
    //freopen("in.txt","r",stdin);
    int n,i,j,k,x,y,sum=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
        sum+=abs(a[i]-a[i-1]);
    }
    sum+=abs(0-a[n]);
    for(i=1;i<=n;i++)
    {
        printf("%d\n",sum-abs(a[i]-a[i-1])-abs(a[i]-a[i+1])+abs(a[i+1]-a[i-1]));
    }
    return 0;
}


Measured memory_bytes: 1664
function Main(input){
  var inp = input.split('\n');
  var a = inp[0].trim();  // 行前後の改行コードを削除
  var b = inp[1].trim();  // 行前後の改行コードを削除

  var revb = b.split('').reverse().join('');
  a === revb ? console.log('YES') : console.log('NO');
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));

Measured memory_bytes: 7372
r, g, b, n = gets.chomp.split.map(&:to_i)

count = 0

i = 0
while r*i <= n do
  j = 0
  while (r*i + g*j) <= n do
    count += 1 if (n - r*i - g*j) % b == 0
    j += 1
  end
  i += 1
end

puts(count)

Measured memory_bytes: 1916
package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, k int
	fmt.Scan(&n, &k)
	h := make([]int, n)
	for i := range h {
		fmt.Scan(&h[i])
	}

	sort.Ints(h)
	ans := 1000000000
	for i := 0; i+k-1 < n; i++ {
		if h[i+k-1]-h[i] < ans {
			ans = h[i+k-1] - h[i]
		}
	}
	fmt.Println(ans)
}


Measured memory_bytes: 5504
#include <stdio.h>
 
int main(void){
	int N;
	scanf("%d",&N);
	char color[N];
  	int Rcnt=0, Bcnt=0;
    scanf("%s",color);
 
	for(int i=0;i<N;i++){
    	if(color[i]=='R'){
        	Rcnt++;
        }else if(color[i]=='B'){
        	Bcnt++;
        }
    }
  	if(Rcnt > Bcnt){
    	printf("Yes\n");
    }else{
    	printf("No\n");
    }
  
 	return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;


int main(){
    ll a, b;
    cin >> a >> b;
    int n = b - a + 1;

    if ((b < 0 && n%2 == 0) || a > 0) cout << "Positive" << endl;
    else if (a * b <= 0) cout << "Zero" << endl;
    else cout << "Negative" << endl;
    
    return 0;
}


Measured memory_bytes: 256
n,k  = map(int, input().split())
h = list(map(int, input().split()))

dp = [0] * n
for i in range(1, n):
  start = max(0, i - k)
  dp[i] = min([dp[j] + abs(h[j]-h[i]) for j in range(start, i)])  
  
print(dp[n-1])

Measured memory_bytes: 52592
import math
a, b, C = map(float, input().split())
C = math.radians(C)
S = a * b * math.sin(C) * 0.5
c =(a**2 + b**2 - 2*a*b*math.cos(C))**0.5
L = a + b + c
h = b * math.sin(C)
result = [S, L, h]
for i in result:
    print(i)


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

typedef long long ll;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second

typedef vector<int> vi;

vi normarize(const vi &v)
{
    vector<vi> r(4);
    rep(i,4)
    {
        vi t(4);
        rep(j,4) t[j]=v[(i+j)%4];
        r[i]=t;
    }
    sort(all(r));
    return r[0];
}

inline ll P(int n, int r)
{
    if(n<r) return 0;

    ll ret=1;
    rep(i,r) ret*=n-i;
    return ret;
}

inline ll POW(int x, int n)
{
    ll ret=1;
    rep(i,n) ret*=x;
    return ret;
}

inline ll DIM(const vi &v)
{
    if(v[0]==v[1] && v[1]==v[2] && v[2]==v[3]) return 4;
    else if(v[0]==v[2] && v[1]==v[3]) return 2;
    return 1;
}

int main()
{
    int n;
    scanf(" %d", &n);

    vector<vi> c(n,vi(4));
    rep(i,n)rep(j,4) scanf(" %d", &c[i][j]);

    map<vi,int> ct;
    rep(i,n)
    {
        c[i]=normarize(c[i]);
        if(ct.find(c[i])==ct.end()) ct[c[i]]=1;
        else ++ct[c[i]];
    }

    ll ans=0;
    // 上面i, 下面j
    rep(i,n)rep(j,i)
    {
        // 下面の向きを設定
        rep(k,4)
        {
            vi u(4);
            rep(x,4) u[x]=c[j][(k+x)%4];
            swap(u[1],u[3]);

            vector<vi> sides(4);
            rep(x,4)
            {
                vi t(4);
                t[0]=c[i][(x+1)%4];
                t[1]=c[i][x];
                t[2]=u[x];
                t[3]=u[(x+1)%4];
                sides[x]=normarize(t);
            }
            sort(all(sides));

            ll add=1;
            int idx=0, st=0;
            while(1)
            {
                while(idx<4 && sides[st]==sides[idx]) ++idx;
                vi key=sides[st];
                int value=idx-st;

                // 使ってないタイルのうち当てはめられる個数
                int num=ct[key];
                if(c[i]==key) --num;
                if(c[j]==key) --num;

                // 選び方、向き、位置
                add*=P(num,value)*POW(DIM(key),value);

                if(idx==4) break;
                st=idx;
            }
            ans+=add;
        }
    }

    // 向かい合う面の個数ぶん重複する
    cout << ans/3 << endl;
    return 0;
}


Measured memory_bytes: 139904
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int max=a;
		if(max<b) {
			max=b;
		}
		if(max<c) {
			max=c;
		}
		System.out.println(max*10+a+b+c-max);
	}
}

Measured memory_bytes: 22612
#include <bits/stdc++.h>
#define rep(i,l,r) for(int i=l; i<(int)(r); i++)
#define rep_eq(i,l,r) for(int i=l; i<=(int)(r); i++)
#define all(vec) vec.begin(),vec.end()
#define allr(vec) vec.rbegin(),vec.rend()
using namespace std;

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=int64_t;

using vb=vector<bool>;
using vc=vector<char>;
using vs=vector<string>;
using vi=vector<int>;
using vll=vector<ll>;
using vvi=vector<vi>;

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

  int N; cin >>N;
  vs s(N);
  set<string> u;
  rep(i,0,N) {
    cin >>s[i];
    u.insert(s[i]);
  }
  int M; cin >>M;
  vs t(M);
  rep(i,0,M) {cin >>t[i];}

  int ans=0;
  for (auto i : u) {
    int temp=count(all(s),i)-count(all(t),i);
    chmax(ans,temp);
  }

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


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

#define fst(t) std::get<0>(t)
#define snd(t) std::get<1>(t)
#define thd(t) std::get<2>(t)
#define unless(p) if(!(p))
#define until(p) while(!(p))

using ll = std::int64_t;
using P = std::tuple<int,int>;

int N;
std::set<std::string> se;
std::string S;

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

  std::cin >> N;

  for(int i=0;i<N;++i){
      std::cin >> S;

      se.emplace(S);
  }

  std::cout << se.size() << std::endl;
}


Measured memory_bytes: 19236
import scala.io.StdIn

object Main extends App {
  val Array(a, b, c) = StdIn.readLine.split(" ").map(_.toInt)

  def f(a:Int, b:Int, c:Int):Int = {
    def rec(acc:Int):Int = {
      if(acc % a == 0) acc
      else if(acc > a * b) -1
      else rec(acc+b)
    }
    rec(c)
  }
  val res = f(a, b, c)
  val ans = if(res < 0) "NO" else "YES"
  println(ans)
}

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

int main(void)
{
    for (int i = 1; i <= 9; i++) {
        for (int j = 1; j <= 9; j++) {
            printf("%dx%d=%d\n", i, j, i*j);
        }
    }
    return 0;
}

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

int main()
{
    int a,b;
    int hen[100]={0};
    while(cin>>a>>b)
    {
        hen[a-1]++;
        hen[b-1]++;
        if(a==0){
            if(hen[0]%2==1&&hen[1]%2==1){
                for(int i=2;i<101;i++){
                    if(i<100&&hen[i]%2==1){
                       cout<<"NG"<<endl;
                        break;
                    }
                    if(i==100)cout<<"OK"<<endl;
                }
            }
            else
                cout<<"NG"<<endl;
            
            for(int i=0;i<100;i++)
                hen[i]=0;
        }
    }
    return 0;
}

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

int main()
{
  long long int N, A, B;
  cin >> N >> A >> B;
  long long int X[N];
  long long int ans = 0;
  for(int i = 0; i < N; i++) cin >> X[i];
  for(int i = 1; i < N; i++) ans += min((X[i]-X[i-1])*A,B);
  cout << ans << endl;
}

Measured memory_bytes: 1024