akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;

//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;
//template <typename T> using orderSet =
//tree <T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

typedef long long ll;
typedef unsigned long long llu;
#define filein freopen("input.txt", "r", stdin)
#define fileout freopen("output.txt", "w", stdout)
#define inf 1e9
#define mod 132021913
#define ff first
#define ss second
#define pb push_back
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define FastRead ios_base::sync_with_stdio(0);cin.tie(nullptr);
ll power(ll b,ll p) {ll res=1,x=b; while(p > 0){if(p&1ll)res=res*x;x=x*x;p >>= 1;} return res;}

#define MX 200005
ll arr[MX], w[MX], ans[MX], n, k, sm;

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

	cout<<a+(a*a)+(a*a*a)<<endl;
}


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

#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))

int main() {
    //cout.precision(11);
    int n, m, c;
    cin >> n >> m >> c;
    int b[m];
    int a[n][m];
    for(int i = 0; i < m; i++){
        cin >> b[i];
    }
    for(int i = 0; i < n; i++){
        for(int j = 0; j < m; j++){
            cin >> a[i][j];
        }
    }
    int ans = 0;
    for(int i = 0; i < n; i++){
        int sum = c;
        for(int j = 0; j < m; j++){
            sum += a[i][j] * b[j];
        }
        if(sum > 0) ans++;
    }
    cout <<  ans << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0;i<(n);i++)
typedef long long ll;
bool aaa[11111111];
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
ll gcd(ll a, ll b) {
  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}


int main() {
  ll k,x,y=0,b,c,m,memo=0,sx=0,sy=1,gx,gy;
  string ka,ss;
  float a;
  int n,ans=0;
  cin>>x>>y;
  b=x%y;
  c=-((x%y)-y);
  cout<<min(b,c)<<endl;
}

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

int main()
{
    long max=5000000;
    int N,M;
    long X;
    cin >> N >> M >> X;
    long c[N];
    long a[N][M];
    rep(i,N){
        cin >> c[i];
        rep(j,M){
            cin >> a[i][j];
        }
    }
    long point[M];
    rep(i,M)point[i]=0;
    int bin[N];
    rep(i,N)bin[i]=0;
    long count=0;
    long min=max;
    bool flag=false;
    rep(i,pow(2,N)){
        
        for(int j=i,k=0;j>=1;j/=2,++k){
            bin[k]=j%2;
        }
        rep(j,N){
            if(bin[j]==1){
                rep(k,M){
                    point[k]+=a[j][k];
                }
                count+=c[j];
            }
        }
        rep(j,M){
            if(point[j]<X){
                flag=false;
                break;
            }flag=true;
        }
        if(min>count&&flag==true){
            min=count;
        }
        rep(j,M){
            point[j]=0;
        }
        count=0;
        rep(j,N){
            bin[j]=0;
        }

    }
    if(min!=max){
        cout << min << endl;
    }else{
        cout << -1 << endl;
    }
}

Measured memory_bytes: 4108
#include <cstdio>
#include <cstdint>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <array>
#include <vector>
#include <unordered_map>
#include <unordered_set>

struct Happy {
    uint64_t A;
    uint64_t B;
    uint64_t sum;

    bool operator<(const Happy& rhs) {
        return sum < rhs.sum;
    }
};

int main()
{
    int N;
    std::cin >> N;

    struct Happy h[N];

    for (int i = 0; i < N; ++i) {
        std::cin >> h[i].A >> h[i].B;
        h[i].sum = h[i].A + h[i].B;
    }

    std::sort(h, h + N);
    std::reverse(h, h + N);

    uint64_t taka = 0;
    uint64_t aoki = 0;

    for (int i = 0; i < N; ++i) {
        if (i % 2 == 0) {
            taka += h[i].A;
        } else {
            aoki += h[i].B;
        }
    }

    const int64_t ans = taka - aoki;
    std::printf("%ld\n", ans);

    return 0;
}

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

int main(){
int A, B, C, D;
cin >> A >> B >> C >> D;
if (A + B < C + D){
    cout << "Right" << endl;
}
else if (A + B > C + D){
    cout << "Left" << endl;
}
else {
    cout << "Balanced" << endl;
}
}


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

using ll = long long;

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

	vector<ll> av(n + 1, 0);
	vector<ll> bv(n + 1, 0);

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

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

	ll ans = 0;
	for (int i = 0; i < n; i++) {
		ll m = min(av[i], bv[i]);
		ans += m;
		bv[i] -= m;
		if (bv[i] > 0) {
			ll mn = min(av[i + 1], bv[i]);
			ans += mn;
			av[i + 1] -= mn;
		}

	}

	cout << ans;
	return 0;
}

Measured memory_bytes: 1792
#include<cstdio>
using namespace std;
int main(){
    int n,h,w,a,b,ans=0;
    scanf("%d %d %d",&n,&h,&w);
    for(int i=0;i<n;i++){
        scanf("%d %d",&a,&b);
        if(a>=h&&b>=w){
            ans++;
        }
    }
    printf("%d\n",ans);
}

Measured memory_bytes: 128
# include <cstdio>
# include <algorithm>
# include <cstring>
# include <cmath>
# include <climits>
# include <iostream>
# include <string>
# include <queue>
# include <vector>
# include <set>
# include <map>
# include <cstdlib>
# include <stack>
# include <ctime>
using namespace std;

# define Rep(i,a,b) for(int i=a;i<=b;i++)
# define _Rep(i,a,b) for(int i=a;i>=b;i--)
# define mct(a,b) memset(a,b,sizeof(a))
# define gc getchar()
typedef long long ll;
const int N=1005;
const int inf=0x7fffffff;
const double eps=1e-7;
template <typename T> void read(T &x){
	x=0;int f=1;
	char c=getchar();
	for(;!isdigit(c);c=getchar())if(c=='-')f=-1;
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+c-'0';
	x*=f;
}

int n,m,high;
int ans=INT_MAX;
int a[N],b[N],c[N][20];
int f[N][5005];

inline int Qpow(int base,int ind){
	int res=1;
	while(ind){
		if(ind&1)res*=base;
		base*=base;
		ind>>=1;
	}
	return res;
}

inline int change(int x,int i){
	int num[15],cnt=0;
	memset(num,0,sizeof(num));
	while(x){
		num[++cnt]=x%2;
		x/=2;
	}
	Rep(j,1,b[i])num[c[i][j]]=1;
	int res=0;
	Rep(j,1,n)res+=num[j]*Qpow(2,j-1);
	return res;
}

int main()
{
	memset(f,0x3f,sizeof(f));
	read(n),read(m);
	high=Qpow(2,n)-1;
	f[0][0]=0;
	Rep(i,1,m){
		read(a[i]);
		read(b[i]);
		Rep(j,1,b[i])read(c[i][j]);
		Rep(j,0,high){
			f[i][j]=min(f[i][j],f[i-1][j]);
			int nxt=change(j,i);
			f[i][nxt]=min(f[i][nxt],f[i-1][j]+a[i]);
		}
	}
	Rep(i,1,m)ans=min(ans,f[i][high]);
	if(ans<1e9)printf("%d\n",ans);
	else puts("-1");
	return 0;
}

Measured memory_bytes: 19968
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>

using namespace std;

char a[1024][1024];
int ret[1024][1024] = {{0}};

int main() {
	int H, W;
	scanf("%d%d", &H, &W);
	for(int h=0; h<H; ++h) {
		scanf("%s", a[h]);
	}
	ret[0][0] = 1;
	for(int w=1; w<W; ++w) {
		if(a[0][w]=='.') {
			ret[0][w] = ret[0][w-1];
		}
	}
	for(int h=1; h<H; ++h) {
		if(a[h][0]=='.') {
			ret[h][0] = ret[h-1][0];
		}
		for(int w=1; w<W; ++w) if(a[h][w]=='.') {
			int r = ret[h-1][w]+ret[h][w-1];
			if(1000000007<=r) {
				r -= 1000000007;
			}
			ret[h][w] = r;
		}
	}
	printf("%d\n", ret[H-1][W-1]);
	return 0;
}


Measured memory_bytes: 5248
#include<bits/stdc++.h>
using namespace std;
#define rep(i, c) for(ll i = 0; i < (ll)c; i++)
#define ll long long
#define upd_max(maxer, updater) if (maxer < updater) maxer = updater;
#define upd_min(miner, updater) if (miner > updater) miner = updater;
const int inf = 1000000000; // 10^9

int main(){
    ll n, i = 0;

    bool ng = true;

    cin >> n;

    while(i <= n){
        if(i*108/100 == n){
            cout << i << endl;
            ng = false;
            break;
        }
        else i++;
    }

    if(ng) cout << ":(" << endl;

    return 0;
}

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

const int MOD = (int)1e9+7;

int main(){
	int N;
	long long K;
	cin >> N >> K;
	vector<long long> A(N);
	for(int i=0;i<N;i++){
		cin >> A.at(i);
		A.at(i)+=K-1;
	}

	vector<long long> sum(N+1,0);
	for(int i=0;i<N;i++)	sum.at(i+1)=sum.at(i)+A.at(i);

	map<long long,long long> mp;
	long long ans=0;
	mp[0]++;
	for(int i=1;i<=N;i++){
		long long x=sum.at(i)%K;
		if(i-K>=0)	mp[sum.at(i-K)%K]--;
		if(mp.count(x))	ans+=mp.at(x);
		mp[x]++;
	}
	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 15872
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        long x = Long.parseLong(br.readLine());

        br.close();

        long now = 100;
        int ans = 0;

        while (now < x) {
            now = (long) (now * 1.01);
            ans++;
        }

        bw.write(String.valueOf(ans));

        bw.flush();

    }
}

Measured memory_bytes: 32464
#include <iostream>
#include <cstdlib>
#include <string>
#include <algorithm>

int main(void) {
    std::string str;
    int a;
    int b;
    int q;
    std::string start = "";
    std::string sub = "";
    std::string end = "";
    std::string s = "";
    std::cin >> str >> q;

    for (int i = 0; i < q; i++) {
        std::string order;
        std::cin >> order;
        std::cin >> a >> b;
        start = str.substr(0, a);
        sub = str.substr(a, b - a + 1);
        end = str.substr(b + 1, str.size() - b);

        if (order == "replace") {
            s = "";
            std::cin >> s;
            str = start + s + end;
        } else if (order == "reverse") {
            std::reverse(sub.begin(), sub.end());
            str = start + sub + end;
        } else if (order == "print") {
            std::cout << sub << std::endl; 
        } else {
        }
    }

    return EXIT_SUCCESS;
}

Measured memory_bytes: 3204
<?php
$n=trim(fgets(STDIN));
$c=str_split(trim(fgets(STDIN)));
$k=array_keys($c,"W");
if(count($k)==0 or count($k)==$n){
  echo 0;
  exit;
}
$ans=$n-count($k);
$i=0;
while($i<$n-$ans){
  if($k[$i]>=$ans){
    $ans=min($ans,$i);
    break;
  }
  ++$i;
}
echo $ans;

Measured memory_bytes: 35600
#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <ctype.h>
#include <math.h>
#include <stack>
#include <string>
#include <string.h>
using namespace std;
double PI = 3.1415926535897932;
long mod = 1000000007;

const long INF = 1e9 + 1;

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

  int cnt = 0;
  for(int i = 0; i < n; i++) {
    if(s[i] == 'A' & s[i+1] == 'B' & s[i+2] == 'C') {
      cnt++; i += 2;
    }
  }
  cout << cnt << endl;
}


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

using namespace std;

const int OO = 1e9;
const double EPS = 1e-9;

#define ndl cout << '\n'
#define sz(v) int(v.size())
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define present(a, x) (a.find(x) != a.end())
#ifdef LOCAL
#define db(...) ({cout << "> Line " << __LINE__  \
		<< ": "; _db(#__VA_ARGS__, __VA_ARGS__);})
#define RNG() rng()
#else
#define db(...) true
#define RNG() true
#endif

template<class T>
void _db(const char *dbStr, T e) {
	cout << dbStr << " = " << e << endl;
}
template<class T, class... L>
void _db(const char *dbStr, T e, L... r) {
  while(*dbStr != ',') cout << *dbStr++;
  cout << " = " << e << ','; _db(dbStr + 1, r...);
}
template<class S, class T>
ostream& operator<<(ostream& o, const map<S, T>& v) {
	o << "["; int i = 0;
	for (const pair<S, T>& pr : v) o << (!i++ ? "" : ", ") << "{"
	<< pr.fs << " : " << pr.sc << "}"; return o << "]";
}
template<template <class, class...> class S, class T, class... L>
ostream& operator<<(ostream& o, const S<T, L...>& v) {
	o << "["; int i = 0;
	for (const auto& e : v) o << (!i++ ? "" : ", ") << e;
	return o << "]";
}
template<class S, class T>
ostream& operator<<(ostream& o, const pair<S, T>& pr) {
	return o << "(" << pr.fs << ", " << pr.sc << ")";
}
ostream& operator<<(ostream& o, const string& s) {
	for (const char& c : s) o << c;
	return o;
}

template<class T> using V = vector<T>;
template<class T> using VV = V<V<T>>;
template<class T> using VVV = VV<V<T>>;
using ll = long long;
using pii = pair<int, int>;
using vi = V<int>;
using vii = V<pii>;
using vvi = VV<int>;
using mii = map<int, int>;
using umii = unordered_map<int, int>;
using si = set<int>;
using usi = unordered_set<int>;

vi A, B;

bool compA(int i, int j) {
	return A[i] < A[j];
}
bool compB(int i, int j) {
	return B[i] < B[j];
}

int main() {
	#ifdef LOCAL
	auto stTime = clock();
//	freopen("in.txt", "r", stdin);
	mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
	#endif
	ios::sync_with_stdio(false);
	cout.precision(10);
	cin.tie(0);

	int N;


	cin >> N;

	A.assign(N, 0);
	B.assign(N, 0);

	vi sortA(N), sortB(N);

	for (int i = 0; i < N; ++i)
		cin >> A[i] >> B[i];

	sort(A.begin(), A.end());
	sort(B.rbegin(), B.rend());

	if (N & 1)
		cout << B[N / 2] - A[N / 2] + 1 << '\n';
	else
		cout << (B[N / 2] + B[N / 2 - 1]) - (A[N / 2] + A[N / 2 - 1]) + 1 << '\n';

	#ifdef LOCAL
	cout << "\n\n\nExecution time: " <<
		(clock() - stTime) * 1e3 / CLOCKS_PER_SEC << " ms" << endl;
	#endif
	return 0;
}


Measured memory_bytes: 6356
#include <stdio.h>

int main(void){
   int N,A[105]={},i,j,max,temp;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d",&A[i]);
	}
	max=0;
   for(i=0;i<N;i++){
	   if(A[i]==1){
		   temp=0;
		   for(j=i;A[j]==1;j++){
			   temp++;
		   }
		   if(temp>max){max=temp;}
	   }
   }
   printf("%d\n",max+1);
}



Measured memory_bytes: 2120
#include <stdio.h>
#include <algorithm>

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

  int d[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", d + i);
  }

  std::sort(d, d+n);

  int r = 1;
  for (int i = 1; i < n; i++) {
    if (d[i] != d[i-1]) {
      r++;
    }
  }

  printf("%d\n", r);
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
#define ll                 long long int
#define mod                1000000007
#define pi                 3.14159265358979323846264338327950288419716939937510
#define setbit(x)          __builtin_popcountll(x)
#define db                 double
#define pp(x)              pair<x,x>
#define ff                 first
#define ss                 second
#define FIO                ios_base::sync_with_stdio(false); cin.tie(NULL);
#define tc                 ll tc; cin>>tc; for(ll number = 1 ; number <= tc ; number ++ )
#define vv(x)              vector<x>
#define pb                 push_back
#define pob                pop_back
#define pf                 push_front
#define pof                pop_front
#define endl               "\n"
#define pq                 priority_queue
#define dbg(x)             { cout<< #x << ": " << (x) << endl; }
#define dbg2(x,y)          { cout<< #x << ": " << (x) << " , " << #y << ": " << (y) << endl; }
#define bp                 ll kkk; cin >>kkk;
#define dbgArr(a,n)        cout<<"Array "<<#a<<endl; for(ll i=0 ; i<n ; i++) cout<<a[i]<<" "; cout<<endl;
#define maxE(a,n)          *max_element(a,a+n);
#define minE(a,n)          *min_element(a,a+n);
#define forn(i,s,n)        for(ll i=s ; i<n ; i++)
#define fornr(i,e,s)       for(ll i=e-1 ; i>=s ; i--)
#define arr(a,n)           for(ll i=0;i<n;i++){ cin>>a[i]; }
#define arr1(a,n)          for(ll i=1;i<=n;i++){ cin>>a[i]; }
#define file freopen("input.txt","r",stdin); freopen("output.txt","w",stdout)
#define print cout<<"Case #"<<number<<": "
#define all(x) x.begin(), x.end()
ll power(ll x, ll b) {ll p = 1;while (b > 0) {if(b&1) {p = p * x; p %= mod;} b >>= 1; x *= x; x %= mod;} return p % mod;}
using namespace std;
# define INF 1e15
struct lex_compare {
    bool operator() (const pair<db,ll>  p1, const pair<db,ll> p2){
        return (p1.first ==  p2.first) ? p1.ss < p2.ss : p1.first > p2.first;
    }
};
#define MAXN 1005

int main(){
    FIO;
    ll n; cin >> n;
    map<string,ll> m;
    forn(i,0,n){
        string s; cin >> s;
        m[s]++;
    }
    cout << "AC x " << m["AC"] << endl;
    cout << "WA x " << m["WA"] << endl;
    cout << "TLE x " << m["TLE"] << endl;
    cout << "RE x " << m["RE"] << endl;
    return 0;
}


Measured memory_bytes: 3628
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i,u) for (register int i=head[u]; i; i=nxt[i])
#define rep(i,a,b) for (register int i=(a); i<=(b); i++)
#define per(i,a,b) for (register int i=(a); i>=(b); i--)
using namespace std;
typedef long long ll;
typedef unsigned int ui;
typedef pair<int,int> Pii;
typedef vector<int> Vi;
template<class T> inline void read(T &x){
	x=0; char c=getchar(); int f=1;
	while (!isdigit(c)) {if (c=='-') f=-1; c=getchar();}
	while (isdigit(c)) {x=x*10+c-'0'; c=getchar();} x*=f;
}
template<class T> inline void umin(T &x, T y){x=x<y?x:y;}
template<class T> inline void umax(T &x, T y){x=x>y?x:y;}
inline ui R() {
	static ui seed=416;
	return seed^=seed>>5,seed^=seed<<17,seed^=seed>>13;
}
const int N = 188;
int n,m,f[2][N][N][N],g[2][N][N][N];char s[N][N];
int main() {
	read(n);read(m);rep(i,1,n)scanf("%s",s[i]+1);
	rep(i,1,max(n,m))rep(l,1,max(n,m))rep(r,l,max(n,m))f[0][i][l][r]=g[0][i][l][r]=i-1;
	per(i,m,1)rep(l,1,n){
		for(int r=l;r<=n&&s[r][i]==s[l][i];r++)
			f[0][i][l][r]=s[l][i]==s[l][i+1]?f[0][i+1][l][r]:i;
	}
	per(i,n,1)rep(l,1,m){
		for(int r=l;r<=m&&s[i][r]==s[i][l];r++)
			g[0][i][l][r]=s[i][l]==s[i+1][l]?g[0][i+1][l][r]:i;
	}
	for(int d=0;;d++){
	//	printf("<%d %d>\n",f[d&1][1][1][n],g[d&1][1][2][m]);
		if(f[d&1][1][1][n]==m){printf("%d\n",d);return 0;}
		int p=d&1,q=p^1;//p-->q
		rep(i,1,m)rep(l,1,n)rep(r,l,n)
			f[q][i][l][r]=f[p][i][l][r]==m?m:f[p][f[p][i][l][r]+1][l][r];
		rep(i,1,n)rep(l,1,m)rep(r,1,m)
			g[q][i][l][r]=g[p][i][l][r]==n?n:g[p][g[p][i][l][r]+1][l][r];
		rep(x,1,n)rep(y,1,m){
			static int dp[N];
			rep(i,0,max(n,m))dp[i]=0;
			rep(z,y,m)umax(dp[g[q][x][y][z]],z);
			per(i,n,x)umax(dp[i],dp[i+1]),umax(f[q][y][x][i],dp[i]);
			rep(i,0,max(n,m))dp[i]=0;
			rep(z,x,n)umax(dp[f[q][y][x][z]],z);
			per(i,m,y)umax(dp[i],dp[i+1]),umax(g[q][x][y][i],dp[i]);
		}
	}
	return 0;
}


Measured memory_bytes: 103808
N = int(input())
A = list(map(int, input().split()))

num_odd = 0
num_4 = 0
num_2 = 0
for a in A:
    if a % 4 == 0:
        num_4 += 1
    elif a % 2 == 0:
        num_2 += 1
    else:
        num_odd += 1

if num_odd <= num_4:
    print("Yes")
elif num_odd == num_4 + 1 and num_2 == 0:
    print("Yes")
else:
    print("No")


Measured memory_bytes: 62576
n = int(input())
k, *l = [int(x) for x in input().split()]

mbit =[]
for i in l:
    mbit.append(i)

print("0:")
for i in range(1, 1<<len(mbit)):
    num = 0
    p = []
    for j in range(len(mbit)):
        if i & (1<<j) != 0:
            num |= 1<<mbit[j]
            p.append(mbit[j])

    print("{}: ".format(num), end="")
    print( *p )



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

int main() {
	int N, M;
	cin >> N >> M;
	vector<int>v(N);
	vector<int>u(2 * M);
	for (int i = 0; i < 2 * M; i++) {
		cin >> u.at(i);
	}
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 2 * M; j++) {
			if (u.at(j) == i+1)
				v.at(i)++;
			else
				v.at(i) += 0;
		}
	}
	for (int i = 0; i < N; i++) {
		cout << v.at(i) << endl;
	}
	return 0;
}

Measured memory_bytes: 256
char r[99],g[99],d[99];main(c,i,j,k){for(;scanf("%s%s%s",r,g,d)>2;puts(""))for(i=j=k=0,c=g[j++];i+j<=strlen(r)+strlen(g);)if(c==d[k])k++,c=r[i++];else putchar(c),c=g[j++];exit(0);}

Measured memory_bytes: 524
#include<stdio.h>
int main (void){
int b[1000],f[1000],r[1000],v[1000],n,i,j,k,l,m,o,N;
scanf("%d",&n);
for(i=1;i<=n;i++){ 
	scanf("%d %d %d %d",&b[i],&f[i],&r[i],&v[i]);
}
for(j=1;j<=3;j++){//?£??????¨???????????????????£?
	for(l=1;l<=3;l++){//????????¨?????????????????????
		for(m=1;m<=10;m++){//??¨?±??????¨?????????????????????
			N=0;//??¨?±?????????°????????????
			for(o=1;o<=n;o++){//o??????????????±
				if(b[o]==j && f[o]==l && r[o]==m){
					N=N+v[o];
				}

			}
			printf(" %d",N);
		}
		printf("\n");
	}


	for(k=1;k<=20;k++){//????????¨???
		printf("#");
		}
	printf("\n");
	}
j=4;
for(l=1;l<=3;l++){//????????¨?????????????????????
		for(m=1;m<=10;m++){//??¨?±??????¨?????????????????????
			N=0;//??¨?±?????????°????????????
			for(o=1;o<=n;o++){//o??????????????±
				if(b[o]==j && f[o]==l && r[o]==m){
					N=N+v[o];
				}

			}
			printf(" %d",N);
		}
		printf("\n");
	}


return 0;	
}

Measured memory_bytes: 1840
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		execute21_2();
	}

	private static void execute21_2() {
		try (Scanner sc = new Scanner(System.in)) {
			int d = sc.nextInt();
			int t = sc.nextInt();
			int s = sc.nextInt();

			int ans = 999999;

			if(t*s>=d) {
				
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		}
	}
}

Measured memory_bytes: 27052
#include <bits/stdc++.h>
#define N 1000011
using namespace std;
int mp[2000][2000];
int dx[]={1,0,-1,0},dy[]={0,-1,0,1};//>, ^,<,v
bool prime[N];

void mk_mp(){
  mp[1000][1000]=1;  
  int x=1001,y=1000,dir=0,num=2;
  while(num<N+N){
    mp[y][x]=num;
    int ndir=(dir+1)%4,nx=x+dx[ndir],ny=y+dy[ndir];
    if(mp[ny][nx]==0) dir=ndir;
    else x+=dx[dir],y+=dy[dir],num++;
  }
}

typedef pair<int,int> P;
int n,m;
P mem[2000][2000];
int used[2000][2000];
P dfs(int y,int x){
  if(mp[y][x]>m)return P(0,0);
  if(used[y][x]++) return mem[y][x];
  P res=max(dfs(y+1,x-1),max(dfs(y+1,x),dfs(y+1,x+1)));
  if(!prime[mp[y][x]]){
    res.first++;
    if(res.second==0)res.second=mp[y][x];
  }
  return mem[y][x]=res;
}


int main(){
  prime[0]=prime[1]=1;
  for(int i=2;i*i<N;i++)
    if(!prime[i])
      for(int j=2;j<=N/i;j++) prime[i*j]=1;
  mk_mp();
  while(1){
    cin>>m>>n;
    if(!n&&!m)return 0;
    memset(used,0,sizeof(used));
    int x=-1,y=-1;
    for(int i=0;i<2000&&x==-1;i++)
      for(int j=0;j<2000&&x==-1;j++)if(mp[i][j]==n)x=j,y=i ;
    P ans=dfs(y,x);
    cout <<ans.first<<" "<<ans.second<<endl;
  }
  return 0;
}

Measured memory_bytes: 62100
#include<bits/stdc++.h>
using namespace std;
int xx[5000000];
int main()
{
    int n,k,v,c=0;
    cin>>n>>k;
    for(int i=0;i<n;i++)
    {
        cin>>v;
        xx[v]++;
    }
    vector<int>vc;
    for(int i=1;i<=200000;i++)
    {
        if(xx[i]!=0)vc.push_back(xx[i]);
    }

    sort(vc.begin(),vc.end());
    int si=vc.size();
    si-=k;
    if(si<=0)cout<<"0"<<endl;
    else{
        for(int i=0;i<si;i++)
            c+=vc[i];
        cout<<c<<endl;
    }

    return 0;
}


Measured memory_bytes: 2168
N,M=map(int,input().split())
D=[]
for i in range(1,int(M**0.5+1)):
  if M%i==0:
    D.append(i)
    D.append(M//i)
D.sort()
for j in D:
  if j >=N:
    print(M//j)
    exit()

Measured memory_bytes: 3060
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <array>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#define _USE_MATH_DEFINES
#include <cmath>
#include <climits>
#include <cstdio>
#include <iomanip>
#include <utility>
#include <unordered_map>

using namespace std;
typedef long long int ll;

#define SP(x) setprecision((int)x)
#define SW(x) setw(x) // 桁数指定
#define SF(c) setfill(c) // 埋め文字指定('0')
#define ALL(v) v.begin(), v.end()

int main(int argc, char const *argv[])
{
    ll n, x;
    cin >> n >> x;
    ll last = 0;
    ll ans = 0;
    for (ll i = 0; i < n; i++)
    {
        ll a;
        cin >> a;
        if (last + a > x)
        {
            ans += last + a - x;
            a -= last + a - x;
        }
        last = a;
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
#define PRINT(v) for (auto x : (V)) cout <<x <<" " <<endl;
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll MOD = 1000000007;
const ll INF = 10000000000000000;
vector<int> x4 = {0, 1, 0, -1}, x8 = {0, 1, 1, 1, 0, -1, -1, -1};
vector<int> y4 = {1, 0, -1, 0}, y8 = {1, 1, 0, -1, -1, -1, 0, 1};
template<class T> struct edge { int from, to; T cost;};
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;}
template<class T> inline T powerM(T a,T b){if (b==0) return 1;
T tmp = powerM(a,b/2); if (b%2==0) return tmp*tmp%MOD; else return tmp*tmp%MOD*a%MOD; }
template<class T> inline T power(T a,T b,T m){ if (b==0) return 1;
  T tmp = power(a,b/2,m); if (b%2==0) return tmp*tmp%m; else return tmp*tmp%m*a%m; }
template<class T> inline T gcd(T a, T b){if (b==0) return a; return gcd(b, a%b);}
template<class T> inline T lcm(T a, T b){return a / gcd(a,b) * b;}
// ax+by=gcd(a,b)を解く
template<class T> inline T extgcd(T a,T b,T &x,T &y){if (b==0){x=1; y=0; return a;} T d=extgcd(b,a%b,y,x); y -= a/b*x; return d;}
void hey(){ cout <<"hey" <<endl; }


int main() {
  int n,m,Q; cin >>n >>m >>Q;
  vector<vector<ll>> dp(n+1, vector<ll>(n+1, 0));
  // dp[i][j] := [i, j) に完全に含まれる列車の本数
  rep(i, m){
    int l,r; cin >>l >>r; l--; // [l, r) (0-indexed)
    dp[l][r]++;
  }
  // [i, j) に完全に含まれる列車は[i, j+1) にも含まれるし[i-1, j) にも含まれるし[i-2, j+3) にも含まれるよね！
  // dp[i][j] = dp[i+1][j] + dp[i][j-1] - dp[i+1][j-1]みたいなアレ
  for (int k=1; k<=n; k++){
    for (int i=0; i<n; i++){
      int j = i + k;
      if (j > n) break;
      // dp[i][j]を更新する
      dp[i][j] += dp[i+1][j] + dp[i][j-1] - dp[i+1][j-1];
    }
  }
  rep(i, Q){
    int p,q; cin >>p >>q; p--;
    cout <<dp[p][q] <<endl;
  }
}


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

using namespace std;
using ll =long long;

#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cout << #x << " = " << (x) << endl;
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; }
bool coY() {cout <<"Yes"<<endl;}
bool coN(){cout <<"No"<<endl;}

const ll INF = 1LL << 60;

string s;
//Write From this Line
ll n,ans=0;
void dfs(ll x,ll a,ll b,ll c){
  if(x>n) return; 
  if(a&&b&&c) ans++;
  dfs(x*10+3,1,b,c);
  dfs(x*10+5,a,1,c);
  dfs(x*10+7,a,b,1);
}
const int mod = 1e9+7;
int main()
{
	cin >> n;
	dfs(0,0,0,0);
	cout <<ans << endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<cmath>
#include<map>
#include<queue>
#include<stack>
#include<algorithm>
#include<functional>

typedef unsigned long long LL;

using namespace std;

int main() {
	int N;
	cin >> N;
	vector<int> s;
	for (int i = 0; i < N; i++) {
		int tmp;
		cin >> tmp;
		s.push_back(tmp);
	}
	sort(s.begin(), s.end());
	vector<int> check(10002, 0);
	check[0] = 1;
	for (int i = 0; i < N; i++) {
		for (int j = 10001; j > -1; j--) {
			if (check[j] == 1) {
				check[j + s[i]] = 1;
			}
		}
	}
	int ans = 0;
	for (int i = 0; i < 10001; i++) {
		if (check[i] != 0 && i % 10 != 0) {
			ans = max(ans, i);
		}
	}
	cout << ans << endl;
}

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

int comp(const void *a, const void *b)
{
    if (*(int *)a > *(int *)b)
        return 1;
    else
        return -1;
}

int main()
{
    int N, i, j, judge = 0;
    scanf("%d", &N);
    long long A[N];

    for (int i = 0; i < N; i++)
    {
        scanf("%lld", &A[i]);
    }

    qsort(A, N, sizeof(long long), comp);

    for (i = 0; i < N - 1; i++)
    {
        if (A[i] == A[i+1])
        {
            judge = 1;
            break;
        }
    }

    if (judge == 1)
        printf("NO");
    else
        printf("YES");

    return 0;
}

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

int si = 0;
string S;
bool parse(char c)
{
  bool fail = false;
  for(; si < S.length(); si++)
  {
    if(S[si] == c)
      return true;
    switch(S[si])
    {
      case '(':
        si++;
        fail = !parse(')');
        break;
      case '[':
        si++;
        fail = !parse(']');
        break;
      case ']': case ')':
        fail = true;
    }
    if(fail)
      return false;
  }
  return false;
}

int main()
{
loop:
  si = 0;
  getline(cin, S);
  if(S == ".")
    return 0;
  cout << (parse('.') ? "yes" : "no") << endl;
  goto loop;
}

Measured memory_bytes: 1172
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <locale>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()

using namespace std;

using ll = long long;
using ld = long double;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template <typename T> int len(const T &x) { return x.size(); }

template<typename T>
vector<T> table(int n, T v) { return vector<T>(n, v); }

template <class... Args>
auto table(int n, Args... args) {
  auto val = table(args...);
  return vector<decltype(val)>(n, move(val));
}

struct yes_no : numpunct<char> {
  string_type do_truename()  const { return "Yes"; }
  string_type do_falsename() const { return "No"; }
};

void solve(ll n, vector<ll> a) {
  sort(ALL(a));
  int ma = a.back();
  int res = 0;
  REP(i,n) {
    if (abs(ma - res * 2) > abs(ma - a[i] * 2)) res = a[i];
  }
  cout << ma << " " << res << endl;
}

int main() {
  locale loc(locale(), new yes_no);
  cout << boolalpha << setprecision(12) << fixed;
  cout.imbue(loc);
	ll n;
	scanf("%lld", &n);
	vector<ll> a(n-1+1);
	for (int i = 0 ; i <= n-1 ; i++) {
	  scanf("%lld", &a[i]);
	}
	solve(n, a);
	return 0;
}


Measured memory_bytes: 1792
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(begin, i, end) for (int i = begin; i < (int)(end); i++)
#define all(v) v.begin(), v.end()
const int MOD = 1000000007;

int main()
{
    ll N, X, T;
    cin >> N >> X >> T;
    ll num = 0, ans = 0;
    while (num < N)
    {
        num += X;
        ans += T;
    }

    cout << ans << endl;
}

Measured memory_bytes: 3628
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(){
	int x_og,x, r, sum = 0;
	scanf("%d", &x);
	x_og = x;
	while(x){
		sum += x%10;
		x /= 10;
	}
	if(x_og%sum) printf("No\n");
	else printf("Yes\n");
	return 0;
}


Measured memory_bytes: 128
#include <stdio.h>
#define N 100
#define WHITE 0
#define GRAY 1
#define BLACK 2

int n, M[N][N];
int color[N], d[N], f[N], tt;

void dfs_visit(int u){
    int v;
    color[u] = GRAY;
    d[u] = ++tt;
    for(v=0; v<n; v++){
        if(M[u][v] == 0) continue;
        if(color[v] == WHITE) {
            dfs_visit(v);
        }
    }
    color[u] = BLACK;
    f[u] = ++tt;
}

void dfs(){
    int u;
    for(u=0; u<n; u++) color[u] = WHITE;
    tt = 0;
    
    for(u=0; u<n; u++){
        if(color[u] == WHITE) dfs_visit(u);
    }
    for(u=0; u<n; u++){
        printf("%d %d %d\n", u+1, d[u], f[u]);
    }
}

int main(){
    int u, v, k, i, j;
    
    scanf("%d", &n);
    for(i=0; i<n; i++){
        for(j=0; j<n; j++) M[i][j] = 0;
    }
    
    for(i=0; i<n; i++){
        scanf("%d %d", &u, &k);
        u--;
        for(j=0; j<k; j++){
            scanf("%d", &v);
            v--;
            M[u][v] = 1;
        }
    }
    dfs();
    
    return 0;
}


Measured memory_bytes: 2716
#include<iostream>

int main() {
    int a, b, c, d, e;
    int t[5];
    int total = 0;
    int r_min = 100;
    std::cin >> a;
    std::cin >> b;
    std::cin >> c;
    std::cin >> d;
    std::cin >> e;

    t[0] = a; t[1] = b; t[2] = c;
    t[3] = d; t[4] = e;

    for(int i=0; i<5; i++) {
      if(t[i]%10 == 0) {
        total = (t[i]/10)*10 + total;
      }
      else {
        total = (t[i]/10)*10 + 10 + total;
        if(t[i]%10 < r_min) r_min = t[i]%10;
      }
    }

    if(r_min != 100) {
      total = total - (10 - r_min);
    }

    std::cout << total;
    return 0;
}


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

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0, c = getchar_unlocked();
	do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0');
	return n;
}

int main()
{
	int N, i, a, r, ans;

	N = in();
	ans = 0;
	while (N--) {
		a = in();
		if (a == 2) ans++;
		else if (a&1) {
			r = (int)sqrt(a);
			for (i = 3; ; i+=2) {
				if (i > r) { ans++; break; }
				if (a%i == 0) break;
			}
		}
	}
	printf("%d\n", ans);
	return 0;
}



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

#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()

typedef long long ll;
typedef array<int, 3> tri;
typedef array<int, 2> duo;
typedef long double ld;

template <class T> istream& operator>>(istream& I, vector<T>& v) {for (T &e: v) I >> e; return I;}
template <class T> ostream& operator<<(ostream &O, const vector<T>& v) {for (const T &e: v) O << e << ' '; return O;}




void _main() {
        string s; cin >> s;
        for (int i = 0; i < 3; i++) {
                if (s[i] == s[i + 1]) {
                        cout << "Bad";
                        return;
                }
        }

        cout << "Good";
}



signed main() {
        ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//        freopen("input.txt", "r", stdin);
        int _t = 1;
//        cin >> _t;
        while (_t--) _main();
        return 0;
}


Measured memory_bytes: 3584
import java.util.Scanner;

public class Main {
	public static void main (String args[]) {
		Scanner scan = new Scanner(System.in);
		Long n = scan.nextLong();
		long ans = 0;
		for(int i = 1; i < n + 1; i++) {
			for(int j = 1; j < n + 1; j++) {
				for(int k = 1; k < n + 1; k++) {
					ans = ans + gcd(i, j, k);
				}
			}
		}
		System.out.println(ans);
	}
	
	public static long gcd (long a, long b, long c) {
		long temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		
		while((temp = c%b)!=0) {
			c = b;
			b = temp;
		}
		return b;
	}
}

Measured memory_bytes: 27292
// package app;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Objects;
import java.util.Scanner;
import java.util.stream.Stream;

public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);

        // final String S = sc.next();

        final long L = sc.nextLong();
        // final int A = sc.nextInt();
        // final long B = sc.nextLong();
        // final String s = sc.next();
        // final String b = sc.next();

        // double l = L / 3.0;
        BigDecimal l = new BigDecimal(( L / 3.0 ) * ( L / 3.0 ) * ( L / 3.0 ));

        System.out.println(l.toPlainString());

        // System.out.println(A <= X && A + B >= X ? "YES" : "NO");

    }
}

Measured memory_bytes: 21716
fn main() {
    let kn = read_vec::<i32>();
    let a = read_vec::<i32>();

    let mut length = Vec::new();
    for a_next in 1..(kn[1]) {
        length.push(a[a_next as usize] - a[a_next as usize - 1]);
    }
    length.push(kn[0] + a[0] - a[kn[1] as usize - 1]);
    println!("{}", length.iter().sum::<i32>() - length.iter().max().unwrap());
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}


Measured memory_bytes: 9464
N, M, C = gets.split.map(&:to_i)
B_array = gets.split.map(&:to_i)
A_matrix = []

N.times{|i|
  A_matrix << gets.split.map(&:to_i)
}

result_num = 0
A_matrix.each{|row|
  answer = 0
  row.each_with_index{|item,idx|
    answer += item*B_array[idx]
  }

  if ((answer + C) > 0)
    result_num += 1 
  end
}

puts result_num


Measured memory_bytes: 1788
MOD = 10 ** 9 + 7
N = int(input())
A = list(map(int, input().split()))
maxA = max(A)

maxA_len = len(bin(maxA)[2:])
num0_each_digit = [0 for _ in range(maxA_len)]
num1_each_digit = [0 for _ in range(maxA_len)]

for i in range(N):
    for i_bit, bit in enumerate(bin(A[i])[2:].zfill(maxA_len)):
        if bit == '0':
            num0_each_digit[i_bit] += 1
            num0_each_digit[i_bit] %= MOD
        else:
            num1_each_digit[i_bit] += 1
            num1_each_digit[i_bit] %= MOD
ans = 0
for i in range(maxA_len):
    factor = (2 ** (maxA_len - i - 1)) % MOD
    ans += (num0_each_digit[i] * num1_each_digit[i] * factor) % MOD

print(ans % MOD)

Measured memory_bytes: 123056
N = int(input())
D = []
for _ in range(N):
    d1, d2 = map(int,input().split())
    if d1 == d2:
        ver = 1
    else:
        ver = 0
    D.append(ver)

ans = "No"
for i in range(N-2):
    if D[i] == 1 and D[i+1] == 1 and D[i+2] == 1:
        ans = "Yes"
        print(ans)
        break

if ans == "No":
    print(ans)

Measured memory_bytes: 9188
import bisect
from operator import itemgetter
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N,sunke,hunke,Gs,Gh = IL()
s = S()

f = 0
for i in range(sunke-1,max(Gs,Gh)):
    if f == 0:
        if s[i]=="#":
            f = 1
    else:
        if s[i]=="#":
            print("No")
            exit()
        else:
            f = 0

cnt = 0
cntf = 0
for i in range(hunke-2,min(Gs,Gh)+1):
    if s[i]=="#":
        cnt = 0
    else:
        cnt += 1
    if cnt == 3:
        cntf = 1
        break

if (sunke < hunke) and (Gs > Gh):
    if cntf == 1:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")

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

#define llong long long
#define inf 999999999
#define mp make_pair
#define pb push_back
#define fn fill_n
typedef pair<int, int> P;
typedef pair<P, int> PP;
typedef pair<PP, int> PPP;
typedef struct data{
	int now;
	int cost;
}data;
int nh[4] = {1, 0, -1, 0};
int nw[4] = {0, 1, 0, -1};





int main(){
	int a = 0, b = 0, c = 0, d, e;
	int A[100], B[100], C[100];
	string D, E;

	cin >> a >> b >> c;
	for(int i = a; i <= b; i++){
		if(i - a < c || b-i < c) cout << i << endl;
	}


	return 0;	
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <cstring>
#include <cmath>
#include <cstdio>
#include <cassert>
#include <cinttypes>

#define fi first
#define se second

using namespace std;

typedef int64_t ll;
typedef uint64_t ull;

#define int ll
const int INF = 1e18 + 10;

int N, M;
int _from1[200010];
int _toN[200010];

signed main() {
  cin >> N >> M;


  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    if (a == 1) {
      _from1[b] = true;
    }
    if (b == N) {
      _toN[a] = true;
    }
  }

  for (int i = 2; i < 200001; i++) {
    if (_from1[i] && _toN[i]) {
      cout << "POSSIBLE" << endl;
      return 0;
    }
  }

  cout << "IMPOSSIBLE" << endl;

  return 0;
}

Measured memory_bytes: 3328
# 75

import sys
sys.setrecursionlimit(10**8)

MOD = 10**9+7
N = int(input())
g_l = [[] for i in range(N)]
check_l = [-1] * N
num_l = [0] * N
for i in range(N-1):
    ai, bi = map(int, input().split())
    g_l[ai-1].append(bi-1)
    g_l[bi-1].append(ai-1)


def dfs(n):
    d = 1
    if check_l[n] > 0:
        return num_l[n]
    check_l[n] = 1
    for next_n in g_l[n]:
        d += dfs(next_n)
    num_l[n] = d
    return d


def modinv(a):
    # calc : (a**(-1)) %MOD
    return pow(a, MOD-2, MOD)


def solve():
    dfs(0)
    pow_l = [None]*(N+1)
    pow_l[0] = 1
    for i in range(1, N+1):
        pow_l[i] = (pow_l[i-1] * 2) % MOD

    ans = 0
    # for i in range(1, N):
    #     ans += (1 - (1/2)**num_l[i]) * (1 - (1/2)**(N-num_l[i]))
    # ans += 1 - (1/2)**N  # 辺の期待値→頂点の期待値に変換(空集合以外は+1される)
    # ans -= N/2  # 黒点の期待値を引く
    for i in range(1, N):
        ans = (ans + (pow_l[num_l[i]]-1) *
               (pow_l[N-num_l[i]]-1) % MOD) % MOD
    ans = (ans + (pow_l[N] - 1) - (N * pow_l[N-1]) % MOD) % MOD
    y = ans
    x = pow(2, N, MOD)

    z = (y * modinv(x)) % MOD

    print(z)


solve()


Measured memory_bytes: 168264
#include <stdio.h>

int main(){
	int A,B,C;
	scanf("%d %d %d",&A,&B,&C);
	if(A<C && C<B){
		printf("Yes\n");
	}else if(A>C && C>B){
		printf("Yes\n");
	}else{
		printf("No\n");
	}

	return 0;
}

Measured memory_bytes: 128
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}


#[allow(dead_code)]
fn solve(s: &str) -> String {
    format!{"A{}C", s.split_whitespace().nth(1).unwrap().chars().nth(0).unwrap()}
}

fn main() {
    use std::io::*;
    let mut s = String::new();
    stdin().read_to_string(&mut s).ok();

    println!("{}", solve(&s));
}




Measured memory_bytes: 4476
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG //これつけるとA[N]でもいいらしい
//for文のマクロ
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define big 1000000007
#define all(a) sort((a).begin(),(a).end()) //ソートのマクロ
#define Re(a) reverse((a).begin(),(a).end())
#define YN(a) if(a){cout<<"Yes"<<endl;}else cout<<"No"<<endl;//条件によってYes、Noを出力する
const int MOD=1000000007;
const double pi = 3.141592653589793;
int main(){
    int n,k;
    cin>>n>>k;
    vector<int> x(n);
    rep(i,n)cin>>x[i];
    int ans=0;
    rep(i,n){
        ans += 2*min(x[i],abs(k-x[i]));
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 3604
#include<bits/stdc++.h>
using namespace std;
const int mod=2019;

void dfs(int cur,vector<int>&col,vector<vector<pair<int,int>>>&g){
	for(auto&&i:g.at(cur)){
		if(col.at(i.first)!=-1)continue;
		if(i.second%2==0){
			col.at(i.first)=col.at(cur);
		}
		else{
			if(col.at(cur)==1)col.at(i.first)=0;
			else col.at(i.first)=1;
		}
		dfs(i.first,col,g);
	}
}

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	vector<vector<pair<int,int>>>g(n);
	for(int i=1;i<n;++i){
		int u,v,w; cin>>u>>v>>w; --u,--v;
		g.at(u).push_back({v,w});
		g.at(v).push_back({u,w});
	}
	vector<int>col(n,-1); col.front()=0;
	dfs(0,col,g);
	for(auto&&i:col)cout<<i<<"\n"s;
}


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

using namespace std;

int main()
{

    int n;
    cin >> n;
    vector<long long> v(n, 0);

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

        cin >> v[i];
        v[i] -= i + 1;
    }

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

    long long sum = 0, sum2 = 0;
    for (auto i : v)
    {
        sum += abs(i - v[n / 2]);
        sum2 += abs(i - v[n / 2 - 1]);
    }

    cout << min(sum, sum2) << endl;
    return 0;
}

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

using namespace std;

int main(){
    int N;
    cin >> N;

    vector<int> A(N), maxA(N);
    for(int i=0; i<N; i++){
        cin >> A.at(i);
    }

    maxA = A;

    sort(maxA.begin(), maxA.end());
    reverse(maxA.begin(), maxA.end());


    for(int i=0; i<N; i++){
        int maxNum =0;
        if(maxA.at(0) > A.at(i)){
            maxNum = maxA.at(0);
        }else{
            maxNum = maxA.at(1);
        }

        cout << maxNum <<endl;
    }
}


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

bool dfs(int lm,int rm,int le,int re){
	if(re>=5&&le>=5){
		return true;
	}
//	cout<<lm<<rm<<le<<re<<endl;
	if(rm<=4&&le<=4&&!dfs(le+rm,re,lm,rm))return true;
	if(rm<=4&&re<=4&&!dfs(le,re+rm,lm,rm))return true;
	if(lm<=4&&le<=4&&!dfs(le+lm,re,lm,rm))return true;
	if(lm<=4&&re<=4&&!dfs(le,re+lm,lm,rm))return true;
	else return false;

}	

int main(){
int  li,ri,ln,rn;
cin>>li>>ri>>ln>>rn;

if(dfs(li,ri,ln,rn)){
	cout<<"ISONO"<<endl;
}
else cout<<"NAKAJIMA"<<endl;

return 0;
}



Measured memory_bytes: 3108
N, A, B, C, D = map(int, input().split())
S = input()

if C > D:
    ai = A - 1
    bi = B - 1
    while ai < C - 1:
        if ai + 1 < C and S[ai + 1] == '.' and ai + 1 != bi:
            ai += 1
        else:
            if ai + 2 < C and S[ai + 2] == '.' and ai + 2 != bi:
                ai += 2
            else:
                if bi + 1 < D and S[bi + 1] == '.':
                    bi += 1
                elif bi + 2 < D and S[bi + 2] == '.':
                    bi += 2
                else:
                    print('No')
                    exit()
    while bi < D - 1:
        if S[bi + 1] == '.':
            bi += 1
        else:
            if bi + 2 < D and S[bi + 2] == '.':
                bi += 2
            else:
                print('No')
                exit()

else:
    bi = B - 1
    while bi < D - 1:
        if S[bi + 1] == '.':
            bi += 1
        else:
            if bi + 2 < D and S[bi + 2] == '.':
                bi += 2
            else:
                print('No')
                exit()

    ai = A - 1
    while ai < C - 1:
        if S[ai + 1] == '.':
            ai += 1
        else:
            if ai + 2 < C and S[ai + 2] == '.':
                ai += 2
            else:
                print('No')
                exit()

print('Yes')


Measured memory_bytes: 9536
N, K = map(int, input().split())
A = [int(c) for c in input().split()]
S = sum(A)
pls = []
for i in range(1,S):
  if i*i>S:
    break
  if S%i==0:
    pls += [i]
    pls += [S//i]
pls.sort(reverse=True)
for p in pls:
    B = []
    for i in range(N):
      B += [A[i]%p]
    B.sort()
    for j in range(N):
      if B[j]!=0:
        break
    m = j
    lim = N-1
    cnt = 0
    while m<lim:
      if B[m]<p-B[-1]:
        B[-1] += B[m]
        cnt += B[m]
        B[m] = 0
        m += 1
      elif B[m]>p-B[-1]:
        cnt += p-B[-1]
        B[m] -= p-B[-1]
        B.pop()
        lim -= 1
      else:
        B.pop()
        cnt += B[m]
        B[m] = 0
        m += 1
        lim -= 1
    if B[-1]==0 and cnt<=K:
      print(p)
      break

Measured memory_bytes: 45276