akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <limits>
#include <algorithm>
#include <functional>

using namespace std;

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

	int X, Y, Z;
	cin >> X >> Y >> Z;

	swap(X, Y);
	swap(X, Z);

	cout << X << " " << Y << " " << Z;

	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
#include<sstream>
using namespace std;
typedef  long long int lint;
typedef pair<int, int> IP;
typedef pair<lint, lint> LLP;
typedef pair<char, char>CP;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
#define llower(v,hoge) *lower_bound(v.begin(), v.end(), hoge)
#define lupper(v,hoge) *upper_bound(v.begin(), v.end(), hoge)
#define toupper(S) transform(S.begin(),S.end(),S.begin(),toupper)
#define tolower(S) transform(S.begin(),S.end(),S.begin(),tolower)
//const lint MOD = pow(10, 9) + 7;

int main() {
	vector < vector<int>>A(3, vector<int>(3));
	rep(i, 3) {
		rep(j, 3) {
			cin >> A[i][j];
		}
	}
	int N;
	cin >> N;
	vector<int>B(N);
	rep(i, N) {
		cin >> B[i];
	}
	vector<vector<bool>>V(3, vector < bool>(3));
	rep(i, 3) {
		rep(j, 3) {
			V[i][j] = false;
		}
	}
	rep(i, N) {
		rep(j, 3) {
			rep(k, 3) {
				if (A[j][k] == B[i]) {
					V[j][k] = true;
				}
			}
		}
	}
	bool ans = false;
	rep(i, 3) {
		if (V[i][0] == true && V[i][1] == true && V[i][2] == true) {
			ans = true;
		}
	}
	rep(i, 3) {
		if (V[0][i] == true && V[1][i] == true && V[2][i] == true) {
			ans = true;
		}
	}
	if (V[0][0] == true && V[1][1] == true && V[2][2] == true) {
		ans = true;
	}
	if (V[ 0 ][2] == true && V[1][1] == true && V[2][0] == true) {
		ans = true;
	}

	/*rep(i, 3) {
		rep(j, 3) {
			cout << V[i][j];
		}
		cout << endl;
	}*/

	if (ans == true) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}


Measured memory_bytes: 256
#include <iostream>
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int min_cost(int *arr,int n,int k)
{
  int *dp = new int[n+1];
  for(int i=0;i<=n;i++)
  {
      dp[i]=INT_MAX;
  }
  dp[1]=0;
  dp[2]=abs(arr[1]-arr[0]);
  for(int i=3;i<=n;i++)
  {
      for(int j=1;j<=k;j++)
      {
          if(i-j>0)
          {
              dp[i] = min(dp[i],dp[i-j]+abs(arr[i-1]-arr[i-1-j]));
          }
      }
  }
  return dp[n];
}
int main()
{
  int n,k;
  cin>>n>>k;
  int * arr = new int[n];
  for(int i=0;i<n;i++)
  {
    cin>>arr[i];
  }
  cout<<min_cost(arr,n,k)<<endl;
  delete [] arr;
  return 0;
}


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

int main(){
    int A[3][3];
    bool B[3][3]; 
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            cin >> A[i][j];
            B[i][j] = false;
        }
    }
    int N; cin >> N;
    for (int i = 0; i < N; i++) {
        int b; cin >> b;
        bool flag = false;
        for (int j = 0; j < 3; j++) {
            for (int k = 0; k < 3; k++) {
                if (A[j][k] == b) {
                    B[j][k] = true;
                    flag = true;
                    break;
                }
            }
            if (flag) break;
        }
    }
    for (int i = 0; i < 3; i++) {
        int a = 0,b = 0;
        for (int j = 0; j < 3; j++) {
            if (B[i][j]) a++;
            if (B[j][i]) b++;
        }
        if (a == 3 || b == 3) {
            cout << "Yes";
            return 0;
        }
    }
    int x = 0, y = 0;
    for (int i = 0; i < 3; i++) {
        if (B[i][i]) x++;
        if (B[i][2-i]) y++;
    }
    if (x == 3 || y == 3) {
        cout << "Yes";
        return 0;
    }
    cout << "No";
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,k,n) for(ll i= (ll) k;i< (ll) n;i++)
#define all(v) (v).begin(), (v).end()
#define SZ(v) (int)((v).size())
#define pb push_back
#define ft first
#define sd second
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const long long INF = 1e18L + 1;
const int IINF = 1e9 + 1;

using namespace std;

template<class TH> void _dbg(const char *sdbg, TH h){ cerr<<sdbg<<'='<<h<<endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
  while(*sdbg!=',')cerr<<*sdbg++;cerr<<'='<<h<<','; _dbg(sdbg+1, a...);
}

#ifdef LOCAL
#define DBG(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define DBG(...) (__VA_ARGS__)
#define cerr if(0)cout
#endif

int n;
string ins, revs;
const ll p = 2129, P = 	1000000033;

pair<ll, ll> get_hash(string& s, int mask) {
	ll lh = 0, rh = 0;
	rep (i, 0, n) {
		if (mask & (1 << i)) {
			lh = (lh * p + s[i]) % P;
		} else {
			rh = (rh * p + s[i]) % P;
		}
	}
	return {lh, rh};
}
			

int main() {
	#ifndef LOCAL
    ios_base::sync_with_stdio(0);
    cin.tie(0);
	#endif
	cin >> n;
	cin >> ins;
	revs = ins;
	reverse(all(revs));
	map<pair<ll, ll>, pair<ll, ll>> m;
	rep (mask, 0, (1 << n)) {
		m[get_hash(ins, mask)].ft++;
		m[get_hash(revs, mask)].sd++;
	}
	ll wyn = 0;
	for (auto& pp: m) {
		wyn += pp.sd.ft * pp.sd.sd;
	}
	cout << wyn;
}


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

#define rep(i, s, n) for(int i = s; i < n; ++i)
#define rrep(i, n) for(int i = n - 1; i > -1; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using namespace std;
const long long INF = 1000000000;
const int MOD = 1000000007;
typedef long long ll;
typedef pair<int, int> P;

int main() {
    string s;
    cin >> s;
    if(s[2] == s[3] && s[4] == s[5]){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}


Measured memory_bytes: 256
N = int(input())
MOD = 10**9 + 7
def power(x, y, p) : 
    res = 1     # Initialize result 
  
    # Update x if it is more 
    # than or equal to p 
    x = x % p  
      
    if (x == 0) : 
        return 0
  
    while (y > 0) : 
          
        # If y is odd, multiply 
        # x with result 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
  
        # y must be even now 
        y = y >> 1      # y = y/2 
        x = (x * x) % p 
          
    return res 
a = pow(10,N,MOD)
b = pow(9,N,MOD)
c = pow(8,N,MOD)
print((a-2*b+c)%MOD)

Measured memory_bytes: 9196
#include <cstdio>
#include <string>
#include <iostream>
#include <vector>
#include <stack>
#include <algorithm>
#include <queue>
using namespace std;
const long long int mod=1e9+7;
int n,m;
long long int x[100001],y[100001];
long long int w,h,ans;
int main(){
  cin >> n >> m;
  for(int i=1;i<=n;i++)cin >> x[i];
  for(int i=1;i<=m;i++)cin >> y[i];

  for(int i=1;i<=n;i++){
    w+=((i-1)*x[i]-(n-i)*x[i]);
    w%=mod;
  }

  for(int i=1;i<=m;i++){
    h+=((i-1)*y[i]-(m-i)*y[i]);
    h%=mod;
  }
  ans=(w*h)%mod;
  cout << ans;
  return 0;
}


Measured memory_bytes: 1792
# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
a, b, c = map(int, input().split())

#空のリスト作成
list = []
list.append(a)
list.append(b)
list.append(c)

#昇順ソート
list.sort()

if(list[0] == 5 and list[1] == 5 and list[2] == 7):
  print("YES")
else:
  print("NO")



Measured memory_bytes: 2940
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
string s;
cin >>s;
int mx=0;
int value =0;
for(int i=0;i<n;i++){
if(s[i]=='I'){
value++;
}else{
value--;
}
mx=max(mx,value);
}
cout<<mx<<endl;
}

Measured memory_bytes: 3616
N = int(input())
A = [int(i) for i in input().split()]
Odd = 0
Even = 0
for i in range(N):
    if A[i]%2==0:
        Even += 1
    else:
        Odd += 1
Even += Odd//2
Odd = Odd%2
if Odd == 1:
    print("NO")
else:
    print("YES")


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


int main(void){
  int64_t N,ans=0;
  cin >> N;
  vector<int64_t> P(1000000,0),W(1000000,0);
  P.at(0)=2;
  int64_t t=0;
  for(int64_t i=3;i<=1000000;i++){
    int a=0;
    for(int64_t j=0;j<=t;j++){
      if(P.at(j)*P.at(j)>i){
        break;
      }
      if(i%P.at(j)==0){
        a=1;
        break;
      }
    }
    if(a==0){
      t++;
      P.at(t)=i;
    }
  }
  for(int64_t i=0;i<=t;i++){
    while(N%P.at(i)==0){
      N/=P.at(i);
      W.at(i)++;
    }
    int64_t x=1;
    while(W.at(i)>0){
      if(W.at(i)>=x){
        ans++;
        W.at(i)-=x;
        x++;
      }else{
        W.at(i)=0;
      }
    }
  }
  if(N!=1){
    ans++;
  }
  cout << ans << endl;
  
  
}


Measured memory_bytes: 18836
N = int(input())
P = [int(i) for i in input().split()]
M = [int(i+1) for i in range(N)]
# print(N,P,M)
diff = 0
for i in range(N):
    if not P[i]==M[i]:
        diff+=1

# print(diff)
if diff >2:
    print("NO")
else:
    print("YES")

Measured memory_bytes: 3060
{-# LANGUAGE BangPatterns #-}
import Control.Monad
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as VM
import qualified Data.ByteString.Char8 as BS

main = do
  n <- readLn
  let loop 0 !a !b !c = return (a,b,c)
      loop i !a !b !c = do
        [a',b',c'] <- map (read . BS.unpack) . BS.words <$> BS.getLine
        -- a,b,c <= 10^4
        loop (i - 1) (max b c + a') (max a c + b') (max a b + c')
  (a,b,c) <- loop n 0 0 0
  print (max a (max b c))


Measured memory_bytes: 1020
#include <bits/stdc++.h>
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define rrep(i,n) for (int i=(n-1);i >= 0;i--)
#define all(v) v.begin(),v.end()
#define sz(v) (int)((v).size())
#define MAX(v) *max_element(all(v))
#define MIN(v) *min_element(all(v))
using namespace std; using ll = long long; using P = pair<int,int>;
using vl = vector<ll>; using vvl = vector<vl>;
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cout << H << " ";
    debug_out(T...);
}
#ifdef _DEBUG
#define debug(...) debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif
template <typename T>
std::ostream& operator<<(std::ostream& os, std::vector<T> vec) {
    for (std::size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
    return os;
}
inline void IN(void){return;}
template <typename First, typename... Rest>
void IN(First& first, Rest&... rest){cin >> first;IN(rest...);return;}
template<class T>bool chmax(T &a, const T &b) {if(a<b){a=b; return 1;} return 0;}
template<class T>bool chmin(T &a, const T &b) {if(b<a){a=b; return 1;} return 0;}
const ll INF = 1LL << 60;
const int dx[8] = {1,0,-1,0,1,1,-1,-1}; const int dy[8] = {0,1,0,-1,1,1,-1,-1};

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    string s; cin >> s;
    ll n = sz(s);
    ll ans = 1+n*(n-1)/2;
    map<char,int> mp;
    rep(i,n){
        mp[s[i]]++;
    }
    for(P p : mp){
        ll v = p.second;
        debug(v);
        ans -= v*(v-1)/2;
    }
    cout << ans << endl;
}

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

int main()
{
    int N,a[1010];

    cin >> N;
    for(int i=0; i<N; i++){
        cin >> a[i];
    }
    sort(a,a+N,greater<int>());
    cout << a[0] - a[N-1] << endl;
    return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
    static void Main(string[] args)
    {
            // 入力
            string[] sS = Console.ReadLine().Split(' ');
            int iA1 = int.Parse(sS[0]);
            int iB2 = int.Parse(sS[1]);
            int iKK = int.Parse(sS[2]);

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();

            // 解析
            int iA2 = iA1 + iKK - 1 > iB2 ? iB2 : iA1 + iKK - 1;
            int iB1 = iB2 - iKK + 1 < iA1 ? iA1 : iB2 - iKK + 1;
            List<int> lstC = new List<int>();
            for (int i = iA1; i <= iA2; i++) { lstC.Add(i); }
            for (int i = iB1; i <= iB2; i++) { lstC.Add(i); }
            lstC = lstC.Distinct().ToList();

            // 出力
            for (int i = 0; i < lstC.Count; i++) { Console.WriteLine("{0}", lstC[i].ToString().Trim()); }

            sw.Stop();
#if DEBUG
            Console.WriteLine();
            Console.WriteLine("{0}", sw.Elapsed.ToString());
            Console.WriteLine("続行するには何かキーを押してください．．．");
            Console.ReadKey();
#endif
    }
}


Measured memory_bytes: 13280
#include <stdio.h>

void swap(int* a, int* b);
int findGcd(int a, int b);

int main(void)
{
	int a, b;
	int gcd;
	scanf("%d %d", &a, &b);

	if (a < b)
		swap(&a, &b);

	gcd = findGcd(a, b);

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

void swap(int* a, int* b)
{
	int temp;
	temp = *a;
	*a = *b;
	*b = temp;
}

int findGcd(int a, int b)
{
	if (b == 0)
		return a;
	int c = a % b;
	return findGcd(b, c);
}


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

#define N	100
#define M	100
#define N_	(1 + N + M + 1)
#define M_	(2 + N * M + 2)

int *oh[N_], oo[N_], n_;
int ij[M_], cc[M_ * 2], m_;

void link(int i, int h) {
	int o = oo[i]++;

	if (o >= 2 && (o & o - 1) == 0)
		oh[i] = (int *) realloc(oh[i], o * 2 * sizeof *oh[i]);
	oh[i][o] = h;
}

void link_(int i, int j, int c1, int c2) {
	int h = m_++;

	ij[h] = i ^ j, cc[h << 1] = c1, cc[h << 1 | 1] = c2;
	link(i, h << 1), link(j, h << 1 | 1);
}

int dd[N_];

int bfs(int s, int t) {
	static int qu[N_];
	int i, head, cnt;

	for (i = 0; i < n_; i++)
		dd[i] = n_;
	head = cnt = 0;
	dd[s] = 0, qu[head + cnt++] = s;
	while (cnt) {
		int d, o;

		i = qu[cnt--, head++], d = dd[i] + 1;
		for (o = 0; o < oo[i]; o++) {
			int h_ = oh[i][o];

			if (cc[h_]) {
				int h = h_ >> 1, j = i ^ ij[h];

				if (dd[j] > d) {
					dd[j] = d;
					if (j == t)
						return 1;
					qu[head + cnt++] = j;
				}
			}
		}
	}
	return 0;
}

int dfs(int i, int t) {
	int d, o;

	if (i == t)
		return 1;
	d = dd[i] + 1;
	for (o = 0; o < oo[i]; o++) {
		int h_ = oh[i][o];

		if (cc[h_]) {
			int h = h_ >> 1, j = i ^ ij[h];

			if (dd[j] == d && dfs(j, t)) {
				cc[h_]--, cc[h_ ^ 1]++;
				return 1;
			}
		}
	}
	dd[i] = n_;
	return 0;
}

int dinic(int s, int t) {
	int sum;

	sum = 0;
	while (bfs(s, t))
		while (dfs(s, t))
			sum++;
	return sum;
}

int main() {
	static char cc[N][M + 1];
	int n, m, i, j, is, js, it, jt;

	scanf("%d%d", &n, &m), n_ = 1 + n + m + 1;
	for (i = 0; i < n; i++)
		scanf("%s", cc[i]);
	for (i = 0; i < n_; i++)
		oh[i] = (int *) malloc(2 * sizeof *oh[i]);
	is = js = it = jt = 0;
	for (i = 0; i < n; i++)
		for (j = 0; j < m; j++) {
			if (cc[i][j] == '.')
				continue;
			link_(1 + i, 1 + n + j, 1, 1);
			if (cc[i][j] == 'S')
				is = i, js = j;
			else if (cc[i][j] == 'T')
				it = i, jt = j;
		}
	if (is == it || js == jt) {
		printf("-1\n");
		return 0;
	}
	link_(0, 1 + is, n * m + 1, 0);
	link_(0, 1 + n + js, n * m + 1, 0);
	link_(1 + it, n_ - 1, n * m + 1, 0);
	link_(1 + n + jt, n_ - 1, n * m + 1, 0);
	printf("%d\n", dinic(0, n_ - 1));
	return 0;
}


Measured memory_bytes: 1896
/***"In the name of Allah(swt), the most gracious, most merciful. Allah(swt) blesses with knowledge whom he wants."***/
/*** "ALHAMDULILLAH for Everything..." ***/
#include<bits/stdc++.h>
using namespace std;
#define  fastt       ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define  ll         long long
#define  debug      printf("Come here!")
#define  inf        1000000000000000000
#define  pb         push_back
#define  mp         make_pair
#define  sz(a)      a.size()
#define  mem(a,b)   memset(a,b,sizeof(a))
#define  clr(x)     x.clear()
#define  ff         first
#define  ss         second
#define  case(x)    cout << "Case " << x <<": "

#define  md         998244353
#define  pi         acos(-1.0)
#define  cos(a)     cos(a*pi/180)
#define  sin(a)     sin(a*pi/180)
#define  tan(a)     tan(a*pi/180)
#define  cosi(a)    acos(a)/(pi/180)
#define  sini(a)    asin(a)/(pi/180)
#define  tani(a)    atan(a)/(pi/180)

#define  vl         vector <ll>
#define  vs         vector <string>
#define  vc         vector <char>
#define  vpll       vector < pair <ll, ll> >
#define  vpsl       vector < pair <string, ll> >
#define  vpls       vector < pair <ll, string> >
#define  pql        priority_queue<ll>
#define  minpql     priority_queue<ll,vector<ll>,greater<ll> >

#define  setbits(x)     __builtin_popcountll(x)
#define  zerobits(x)    __builtin_ctzll(x)

#define toll(a) atoll(a.c_str())
string tostr(ll a) {stringstream rr;rr<<a;return rr.str();}
ll pow(ll c,ll d){return d==0?:c*pow(c,d-1);}
ll gcd(ll a,ll b) {return b==0? a:gcd(b,a%b);}
ll lcm(ll a,ll b) {return ((a*b)/gcd(a,b));}

/* mpp.max_load_factor(0.25); mpp.reserve(1024); */
/* cout << fixed << setprecision(12);*/

ll power(ll a, ll b){
    if(b==0)return 1;
    else if(b%2==1){
        return ((a%md)*(power(a, b-1)%md))%md;
    }
    else{
        ll x = power(a, b/2)%md;
        return (x*x)%md;
    }
}

int main()
{
    fastt;
    ll n, m, k, i, j, x, y, p=0, s=0, h, f=0, hh;
    cin>>n;
    vl v;
    map<ll, ll>mpp;
    map<ll, ll>:: iterator it;
    for(i=0; i<n; i++){
        cin>>x;
        if(i>0 && x==0)f=1;
        mpp[x]++;
    }
    if(mpp[0]==0 || f==1){
        cout<<0<<endl;
    }
    else{
        s=1;
        h=-1;

        for(it=mpp.begin(); it!=mpp.end(); it++){
            x=it->ff;
            y=it->ss;
            if(x!=h+1){
                f=1;
                break;
            }
            if(x>1){
                p=power(hh, y);
                s*=p;
                s%=md;
            }
            h=x;
            hh=y;

        }

        if(f==1)cout<<0<<endl;
        else cout<<s<<endl;

    }

    return 0;
}



Measured memory_bytes: 9872
def main():
	W, H, x, y = map(int, input().split())
	a = W*H/2
	p = 0
	if x==W//2 and y==H//2 and W%2==0 and H%2==0:
		p = 1
	print(" ".join([str(a), str(p)]))


if __name__ == '__main__':
	main()

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

int gcd(int x,int y){
    if(y==0)return x;
    x=x%y;
    gcd(y,x);
}

int digitPoor(int n)
{
    if (n < 10)         return 1;
    else if (n < 100)        return 2;
    else if (n < 1000)       return 3;
    else if (n < 10000)      return 4;
    else if (n < 100000)     return 5;
    else if (n < 1000000)    return 6;
    else if (n < 10000000)   return 7;
    else if (n < 100000000)  return 8;
    else if (n < 1000000000) return 9;
    else if (n < 10000000000) return 10;
    else if (n < 100000000000) return 11;
    else if (n < 1000000000000) return 12;
    else if (n < 10000000000000) return 13;
    else if (n < 100000000000000) return 14;
    else if (n < 1000000000000000) return 15;
    else if (n < 10000000000000000) return 16;
    else if (n < 100000000000000000) return 17;
    else if (n < 1000000000000000000) return 18;
}

main()
{
    int n;
    cin>>n;
    int ans=n%100;
    int ans2=(n-ans)/100;
    int count1=0;
    while(ans>4){
        ans-=5;
        count1++;
    }
    while(ans>3){
        ans-=4;
        count1++;
    }
    while(ans>2){
        ans-=3;
        count1++;
    }
    while(ans>1){
        ans-=2;
        count1++;
    }
    while(ans>0){
        ans-=1;
        count1++;
    }
    if(count1>ans2){
        cout<<0<<endl;
    }else{
        cout<<1<<endl;
    }
}

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

int main() {
  string s;
  cin >> s;
  if (s == "SUN") {
    cout << 7 << endl;
  } else if (s == "MON") {
    cout << 6 << endl;
  } else if (s == "TUE") {
    cout << 5 << endl;
  } else if (s == "WED") {
    cout << 4 << endl;
  } else if (s == "THU") {
    cout << 3 << endl;
  } else if (s == "FRI") {
    cout << 2 << endl;
  } else {
    cout << 1 << endl;
  }
  return 0;
}

Measured memory_bytes: 256
#include <iostream>

 

using namespace std;

 

int main() 
{
    int a, b, c;
    
    cin >> a >> b >> c;
    if (a <= b && b <= c)
        cout << a << " " << b << " " << c << endl;
    else if(a <= c && c <= b)
        cout << a << " " << c << " " << b << endl;
    else if(c <= a && a <= b)
        cout << c << " " << a << " " << b << endl;
    else if(c <= b && b <= a) 
        cout << c << " " << b << " " << a << endl;
    else if(b <= c && c <= a) 
        cout << b << " " << c << " " << a << endl;
    else
        cout << b << " " << a << " " << c << endl;
}


Measured memory_bytes: 3104
#include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>

#include <limits.h>

using namespace std;

typedef long long ll;

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;
}

vector<tuple<int, int, int, int>> conds;

int calc(const vector<int> &acc, const int N, const int M, const int Q) {
    // for (int i = 0; i < (int) acc.size(); i++) {
    //     cout << acc[i] << " ";
    // }
    // cout << endl;

    int ans = 0;
    for (auto &cond : conds) {
        int a, b, c, d;
        tie(a, b, c, d) = cond;
        if (acc[b] - acc[a] == c) {
            ans += d;
        }
    }

    // printf("calculated: %d\n", ans);

    return ans;
}

void solve(int cur_val, int cur_pos, vector<int> &acc, int &cand, const int N, const int M, const int Q) {
    if (cur_pos == N) {
        chmax(cand, calc(acc, N, M, Q));
        return;
    }

    for (int i = cur_val; i <= M; i++) {
        acc.push_back(i);
        solve(i, cur_pos + 1, acc, cand, N, M, Q);
        acc.pop_back();
    }
}

int main(void) {
    int N, M, Q;
    cin >> N >> M >> Q;

    conds.resize(Q);
    for (int i = 0; i < Q; i++) {
        int a, b, c, d;
        cin >> a >> b >> c >> d;
        a--;
        b--;
        conds[i] = tie(a, b, c, d);
    }

    int ans = 0;
    vector<int> acc;
    solve(1, 0, acc, ans, N, M, Q);
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 3632
import sys
readline = sys.stdin.readline

# dp[i][smaller][d] : i桁目で、K未満で、そこまでの総和をDで割った余り = 個数

K = readline().rstrip()
D = int(readline())
DIV = 10 ** 9 + 7
keta = len(K)

dp = [[[0] * D for i in range(2)] for j in range(keta)]

x0 = int(K[0])
dp[0][0][x0 % D] = 1
bef = x0 % D # 未満じゃないときに直前に値が入っているmodを記録しておく
for i in range(x0):
  dp[0][1][i % D] += 1
  
for i in range(1, keta):
  x = int(K[i])
  
  # 未満じゃない -> 未満じゃない
  dp[i][0][(bef + x) % D] = 1
  
  # 未満じゃない -> 未満
  # 0~x-1の値を取り得る
  for j in range(x):
    dp[i][1][(bef + j) % D] += dp[i - 1][0][bef]
  
  for j in range(D):
    dp[i][1][j] %= DIV
  
  bef = (bef + x) % D # 未満じゃないときに値が入っているmodを記録
  
  # 未満 -> 未満
  for j in range(D):
    for k in range(10): # 0~9のすべてを取れる
      dp[i][1][(k + j) % D] += dp[i - 1][1][j]
      
  for j in range(D):
    dp[i][1][j] %= DIV

print((dp[-1][0][0] + dp[-1][1][0] - 1) % DIV) # 0を数えないので引く

Measured memory_bytes: 91528
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <cstdio>
#include <tuple>
#include <numeric>
using namespace std; using ll = long long; using ld = long double;  using pll = pair<ll, ll>;
using vl = vector<ll>; using vll = vector<vl>; using vpll = vector<pll>;
using vs = vector<string>; using tll = tuple<ll, ll, ll>; using vtll = vector<tll>;
const ld PI = 3.1415926535897932;
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define co(i) cout << i << endl;
#define co2(i,j) cout << i << " " << j << endl;
#define co3(i) cout << i << " ";
#define po(i) cout << i.first << " " << i.second << endl;
void in() {}
void debug_out() { cerr << endl; }
template<typename Head, typename... Tail>
void debug_out(Head h, Tail... t) {
	cerr << " " << h;
	if (sizeof...(t) > 0) cerr << " :";
	debug_out(t...);
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> vec) {
	for (size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
	return os;
}
ll ctoi(char c) {
	switch (c) {
	case '0': return 0; case '1': return 1; case '2': return 2;
	case '3': return 3; case '4': return 4; case '5': return 5;
	case '6': return 6; case '7': return 7; case '8': return 8;
	case '9': return 9;  default: return 0;
	}
}
bool pairCompare(const pll firstElof, pll secondElof)
{
	return firstElof.first > secondElof.first;
}
//**Snippetリスト**//
//rep, vin, all, iteLoop, bitSearch, bitList, nod//
//gcdlcm, isPrime, eratos, primeFactorize, Npow, combination, divisor, modinv, doubling, digitDP//
//dfs, bfs, dijkstra, WarshallFloyd, BellmanFord, UnionFind, Kruskal, RMQ, LCA//
ll i, j, k, l; ll N, M, K, H, W, L, X, Y, Z, R, Q;
ll MOD = 1000000007, INF = 1LL << 60, ans = 0, z = 0, o = 1;
vl flag, D; vpll path;
//***********//
int main() { 
	cin >> X >> Y;
	for (i = 0; i <= X; i++) {
		if (i * 2 + (X - i) * 4 == Y) {
			cout << "Yes";
			exit(0);
		}
	}
	cout << "No";
}

Measured memory_bytes: 3636
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n,k = map(int,readline().split())
lst1 = [0]*n

for i in range(k):
    d = int(readline())
    lst2 = list(map(int,readline().split()))
    for j in lst2:
        lst1[j-1] += 1

ans = 0
for i in lst1:
    if i == 0:
        ans += 1

print(ans)

Measured memory_bytes: 66576
#include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<string>
#include<utility>
#include<numeric>
#include<algorithm>
#include<cmath>
#include<climits>
using namespace std;

using ll = long long;

void read();
template<typename First, typename... Rest> void read(First& first, Rest&... rest);
void write();
template<typename First, typename... Rest> void write(First first, Rest... rest);
template<typename T> void write_vec(vector<T>& v, char divider);

constexpr int MOD = 1000000007;
ll modpow(ll n, ll r, ll mod) {
    if(r == 0) return 1;
    if(n == 0) return 0;
    if(r % 2 == 0) {
        ll tmp = modpow(n, r / 2, mod);
        return tmp * tmp % mod;
    }
    else {
        return n * modpow(n, r - 1, mod) % mod;
    }
}

int main(){
    int A, B;
    read(A, B);
    int ans = 0;
    if(A >= 13){
        ans = B;
    }
    else if(A >= 6){
        ans = B / 2;
    }
    write(ans);
    return 0;
}

//配列以外の入力を受け取る
void read(){

}
template<typename First, typename... Rest>
void read(First& first, Rest&... rest){
    cin >> first;
    read(rest...);
}
//
//配列以外を出力する
void write(){

}
template<typename First, typename... Rest>
void write(First first, Rest... rest){
    cout << first << " ";
    write(rest...);
}
//
//配列を区切って出力する
template<typename T>
void write_vec(vector<T>& v, char divider){
    for(size_t i = 0; i < v.size(); i++){
        cout << v[i] << divider;
    }
}
//

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

#define ran 3033

struct modular_arithmetic{
	int mod;

	modular_arithmetic(){
		mod = 998244353;
	}
	//No specific settings.
	int add(int x,int y){return (x+=y)<mod?x:x-mod;}
	int sub(int x,int y){return (x-=y)>=0?x:x+mod;}
	int mul(int x,int y){return (int)((long long int)x*y%mod);}
	int pw(int base, int p) {
		int res = 1, mu = base%mod;
		for(;p>0;p/=2) {
			if (p&1) res = mul(res, mu);
			mu = mul(mu, mu);
		}
		return res;
	}
	int rev(int x) {return pw(x, mod-2);}
};
modular_arithmetic ma;

int n, s;
int a[ran];
int f[ran];

int main() {
	scanf("%d%d", &n, &s);
	for(int i=1;i<=n;i++) scanf("%d", &a[i]);
	
	memset(f, 0, sizeof f);
	f[0] = ma.pw(2, n);
	int rev2 = ma.rev(2);
	
	for(int i=1;i<=n;i++)
	for(int j=s;j>=a[i];j--)
		f[j] = ma.add(f[j], ma.mul(f[j-a[i]], rev2));
	printf("%d\n", f[s]);
	
	return 0;
}

Measured memory_bytes: 3836
a, b, c = gets.split.map(&:to_f)

puts 1.0/2.0 * a * b * Math::sin(c/180*Math::PI)
puts a + b + Math::sqrt(a**2 + b**2 - 2.0*a*b*Math::cos(c/180*Math::PI))
puts b * Math::sin(c/180*Math::PI)

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder sb = new StringBuilder();

            string input;

            while (!string.IsNullOrEmpty(input = Console.ReadLine()))
            {
                int[] cards = Array.ConvertAll(input.Split(','), int.Parse);

                int[] memo = new int[14];
                int max = 0;

                for (int i = 0; i < 5; i++)
                {
                    memo[cards[i]]++;
                    max = Math.Max(max, memo[cards[i]]);
                }

                if (max == 4)
                {
                    sb.AppendLine("four card");
                }
                else if (max == 3)
                {
                    if (memo.Contains(2)) sb.AppendLine("full house");
                    else sb.AppendLine("three card");
                }
                else if (max == 2)
                {
                    int count = memo.Where(a => a == 2).Count();

                    if (count == 2) sb.AppendLine("two pair");
                    else sb.AppendLine("one pair");
                }
                else
                {
                    bool isStraight = false;

                    if (memo[1] > 0)
                    {
                        if (memo[10] > 0 && memo[11] > 0 && memo[12] > 0 && memo[13] > 0)
                        {
                            sb.AppendLine("straight");
                            isStraight = true;
                        }
                    }

                    if (!isStraight)
                    {
                        int s = Array.IndexOf(memo, 1);

                        if (memo[s + 1] > 0 && memo[s + 2] > 0 && memo[s + 3] > 0 && memo[s + 4] > 0)
                        {
                            sb.AppendLine("straight");
                        }
                        else sb.AppendLine("null");
                    }
                }
            }
            Console.Write(sb);
        }
    }
}

Measured memory_bytes: 9684
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define ff first
#define ss second
using namespace std;
/*ll power(ll x,ll y)
{
    ll res=1;
    while(y>0)
    {
        if(y%2==1)
            res=(res*x)%mod;
        x=(x*x)%mod;
        y=y/2;
    }
    return res;
}*/
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n,k,i,j,r;
cin>>n>>k;
r=(n-2)*(n-1);
r=r/2;
if(k>r)
{
    cout<<-1<<"\n";
    return 0;
}
vector<pair<ll,ll> >v;
for(i=2;i<=n;i++)
v.pb({1,i});
//ll f=0;
for(i=2;i<=n;i++)
{
    if(r==k)
        break;
    for(j=i+1;j<=n;j++)
    {
        v.pb({i,j});
        r--;
        if(r==k)
            break;
    }
    if(r==k)
        break;
}
cout<<v.size()<<"\n";
for(i=0;i<v.size();i++)
    cout<<v[i].ff<<" "<<v[i].ss<<"\n";
}


Measured memory_bytes: 512
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())


r = ni()

print(3 * r * r)

Measured memory_bytes: 3064
n = int(input())
list1 = list(map(int,input().split()))

list2 = [0]*n
dai1kou = 0
dai1kou += sum(list1[::2])
dai1kou -= sum(list1[1::2])
dai1kou = abs(dai1kou)
list2[0] = dai1kou
for i in range(1,n):
	list2[i] = (list1[i-1]-list2[i-1]//2)*2
print(" ".join(map(str,list2)))
	

Measured memory_bytes: 84324
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n,k;
	while(1)
	{
		cin>>k;
		if(k==0)
			break;
		k=1000-k;
		n=k/500+k%500/100+k%500%100/50+k%500%100%50/10+k%500%100%50%10/5+k%500%100%50%10%5;
		cout<<n<<endl;
	}
	return 0;
}
	

Measured memory_bytes: 3092
macro_rules! input {
    ($ttype:ty) => {
        {
            let mut input = String::new();
            let _= std::io::stdin().read_line(&mut input);
            input.trim().parse::<$ttype>().unwrap()
        }
    };

    ($($ttype:ty),*) => {
        {
            use std::io::BufRead;
            let mut input = String::new();
            let stdin = std::io::stdin();
            let _ = stdin.lock().read_line(&mut input);
            let mut iter = input.trim().split_whitespace();
            (
                $(iter.next().unwrap().parse::<$ttype>().unwrap(),)*
            )
        }
    };

    ($ttype:ty; $x:expr) => {
        {
            use std::io::BufRead;
            let mut input = String::new();
            let stdin = std::io::stdin();
            let _ = stdin.lock().read_line(&mut input);
            let v: Vec<$ttype> = input
                .trim()
                .split_whitespace()
                .map(|x| x.parse().unwrap())
                .collect();
            v
        }
    };

    ($ttype:ty; $x:expr; $y:expr) => {
        {
            use std::io::BufRead;
            let mut matrix = Vec::with_capacity($y);
            for _ in 0..$y {
                let mut input = String::new();
                let stdin = std::io::stdin();
                let _ = stdin.lock().read_line(&mut input);
                let v: Vec<$ttype> = input
                    .trim()
                    .split_whitespace()
                    .map(|x| x.parse().unwrap())
                    .collect();
                matrix.push(v);
            }
            matrix
        }
    };
}

fn main() {
    let n = input!(usize);
    let mut s: Vec<i64> = Vec::with_capacity(n);

    for _ in 0..n {
        s.push(input!(i64));
    }
    s.sort();

    let total = s.iter().sum::<i64>();
    if total % 10 != 0 {
        println!("{}", total);
        return;
    } else {
        for &score in s.iter() {
            if (total - score) % 10 != 0 {
                println!("{}", total - score);
                return;
            }
        }
        println!("0");
    }
}


Measured memory_bytes: 4352
#include <iostream>
#include <deque>
#include <algorithm>
using namespace std;
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	deque<int> ans;
	for (int i = 1; i <= n; i++)
	{
		int x;
		cin >> x;
		if (i & 1)
			ans.push_back(x);
		else
			ans.push_front(x);
	}
	if (n & 1)
		reverse(ans.begin(), ans.end());
	for (int i : ans)
		cout << i << ' ';
	cout << endl;
	return 0;
}

Measured memory_bytes: 3072
n = int(input())
if n==1:
    print(0)
    exit()
a = [0]*(n+1)
def pf(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
for i in range(2,n+1):
    x = pf(i)
    for j in x:
        a[j] += 1
b = [0]*5 #3,5,15,25,75
for i in a:
    if (i>=74):
        b[4]+=1
    elif (i>=24):
        b[3]+=1
    elif (i>=14):
        b[2]+=1
    elif (i>=4):
        b[1]+=1
    elif (i>=2):
        b[0]+=1
for i in range(4):
    b[3-i] += b[4-i]
ans = 0
ans += b[1]*(b[1]-1)//2*(b[0]-2)
ans += b[2]*(b[1]-1)
ans += b[3]*(b[0]-1)
ans += b[4]
print(ans)

Measured memory_bytes: 9260
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;

int main(){
    int N;
    cin >> N;
    int a[N];

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

    int box[N];
    for(int i = 0; i < N; i++)
        box[i] = 0;
    
    int M = 0;
    for(int i = N-1; i >= 0; i--){
        int cnt = 0; 
        for(int j = i; j < N; j += (i+1)){
            if(box[j])
                cnt++;
        }
        if(a[i] == (cnt%2)){
            box[i] = 0;
        }else{
            box[i] = 1;
            M++;
        }
    }
    
    cout << M << "\n";
    for(int i = 0; i < N; i++){
        if(box[i])
            cout << i+1 << "\n";
    }
    return 0;
}


Measured memory_bytes: 2432
#include <bits/stdc++.h>
#define int int64_t
#define rp(i, N) for(int i=0; i<N; i++);
using namespace std;
using pair = pair<int, int>;
using tup  = tuple<int, int, int>;
using vec  = vector<int>;
using vvec = vector<vec>;
const int INF = 100000000;
// " ", ' '

// プロトタイプ宣言
// int myfunc(int, vvec);

// グローバル変数
// int N, M;
// vvec data(N, vec(M));

// 関数：

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int N; cin >> N;
	map<string, int> mp;
	for(int i=0; i<N; i++) {
		string s;
		cin >> s;
		sort(s.begin(), s.end());
		mp[s] += 1;
	}

	int counter = 0;
	for(auto p=mp.begin(); p!=mp.end(); p++) {
		int vl = p->second;
		counter += vl*(vl-1)/2;
	}
	cout << counter << endl;
	 
}


Measured memory_bytes: 11264
#include <algorithm>
#include <iostream>

int main(int argc, char *argv[]) {
  std::string s;
  std::cin >> s;

  bool findC = false;
  for (size_t i = 0; i < s.size(); ++i) {
    if (i == 0) {
      if (s.at(i) != 'A') {
        std::cout << "WA" << std::endl;
        return 0;
      }
      continue;
    }
    if (2 <= i && i < s.size() - 1 && s.at(i) == 'C') {
      if (findC) {
        std::cout << "WA" << std::endl;
        return 0;
      }
      findC = true;
      continue;
    }
    if ('a' <= s.at(i) && s.at(i) <= 'z')
      continue;
    std::cout << "WA" << std::endl;
    return 0;
  }

  if (findC)
    std::cout << "AC" << std::endl;
  else
    std::cout << "WA" << std::endl;
}


Measured memory_bytes: 256
#include "iostream"
#include "algorithm"
#include "string"
#include "vector"
#include "cmath"
#include "bitset"
#include "queue"
#include "functional"
#include "map"
#include "unordered_map"
#include "set"
#include "stack"

#define lp(n) for (int i = 0; i < n; i++)
#define LP(n,i) for (int i = 0; i < n; i++)
#define mod 1000000007
#define sp ' '
#define intmax 2147483647
#define llmax 9223372036854775807
#define nyan "(=^･ω･^=)"
#define mkp make_pair
typedef long long ll;
using namespace std;

int n, X, x, ans;

ll gcd(ll x, ll y) {
if (y == 0) return x;
return gcd(y, x%y);
}

ll lcm(ll x, ll y) {
ll g = gcd(x, y);
return x / g * y;
}
int main() {
	cin >> n >> X >> x;
	ans = abs(X - x);
	lp(n-1) {
		cin >> x;
		ans = gcd(abs(X - x), ans);
	}
	cout << ans << endl;
	return 0;
}


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

p_list=[]
ok_list=[]

hate_list.append(10)
s=0
for x in hate_list:
    while x>s:
        ok_list.append(s)
        s+=1
    s+=1
ok_list.append(10)

# print(ok_list)

# nの桁をリスト化
ndgts=[]
while n>0:
    ndgts.append(n%10)
    n//=10

flag=0 #necessality of a comparison
for y in reversed(ndgts):
    if flag>0:
        p_list.append(0)
        continue
    for x in range(11-k):
        if y==ok_list[x]:
            p_list.append(x)
            break
        elif y< ok_list[x]:
            p_list.append(x)
            flag=1
            break


# print(p_list)
p_list.reverse()
for x in range(len(p_list)-1):
    if p_list[x]==10-k:
        p_list[x]=0
        p_list[x+1]+=1

if p_list[-1]==10-k:
    p_list[-1]=0
    if ok_list[0]==0:
        p_list.append(1)
    else:
        p_list.append(0)
payment=0
# print(p_list)
for x in reversed(p_list):
    payment=10*payment + ok_list[x]
print(payment)



Measured memory_bytes: 9192
#include <vector>
#include <iostream>
#include <cmath>
#include <iomanip>
#include <string>
#include <utility>
#include <stack>
#include <numeric>
#include <random>
#include <algorithm>
#include <queue>
#include <functional>
#include <iterator>
#include <list>
#include <unordered_map>
using namespace std;

#define rep(i, b, e) for(i = b; i < e; ++i)
#define repr(i, b, e) for (i = b; i >= e; --i)
#define ull unsigned long long int
#define ll long long int
#define pint pair<int, int>

#define M_DEBUG 1
#define PI 3.141592653589793

#define E '\n'

#define print(x) cout << (x) << endl;
#define printa(x,n) for(int i = 0; i < n; i++){ cout << (x[i]) << " ";} cout << endl;
#define INF (1e18)

const ll MAX = 1000000000;
const ll MOD = 1e9 + 7;

ll a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;

int main(void) {
    string ss;
    cin >> ss;
    rep(i, 0, ss.size()) {
        ss[i] = 'x';
    }

    cout << ss << endl;
    
    return 0;
}



Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include <iostream> 
#include <algorithm> 
#include<string>
#include<queue>
#include<utility>
#include<fstream>
#include<queue>
#include<set>
#include<stack>
#include<map>
#include<bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
#define I(a) scanf("%d",&a)
#define I2(a,b) scanf("%d%d",&a,&b)
#define I3(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define L(a) scanf("%lld",&a)
#define L2(a,b) scanf("%lld%lld",&a,&b)
#define L3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define PI(a) printf("%d",a)
#define PL(a) printf("%lld",a)
#define PT(t) printf("Case %d: ",t)
#define PB push_back
#define x first
#define y second
#define xx first.first
#define xy first.second
#define yx second.first
#define yy second.second
#define SC scanf
#define PC printf
#define NL printf("\n")
#define SET(a) memset(a,0,sizeof a)
#define SETR(a) memset(a,-1,sizeof a)
#define SZ(a) ((int)a.size())-1
#define f(i,a,b) for(int i=a;i<=b; i++)
#define fr(i,a,b) for(int i=a;i<=b; i++)
#define frr(i,a,b) for(int i=a;i>=b; i--)
#define frv(i,a)  for(int i=0;i<a.size();i++)
#define pi 2.0*acos(0.0)
#define R(a) freopen(a, "r", stdin);
#define W(a) freopen(a, "w", stdout);
#define CB(x) __builtin_popcount(x)
#define STN(a) stringtonumber<ll>(a)
#define lol printf("BUG\n")
#define Endl "\n"
#define mk make_pair
using namespace std;
template <class T> inline T BM(T p, T e, T M)
{
    ll ret = 1;
    for(; e > 0; e >>= 1)
    {
        if(e & 1) ret = (ret * p) % M;
        p = (p * p) % M;
    }
    return (T)ret;
}
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 mdINV(T a, T M)
{
    return BM(a, M - 2, M);
}
template <class T> inline T PW(T p, T e)
{
    ll ret = 1;
    for(; e > 0; e >>= 1)
    {
        if(e & 1) ret = (ret * p);
        p = (p * p);
    }
    return (T)ret;
}
 
 
template <class T>bool ISLEFT(T a, T b, T c)
{
    if(((a.xx - b.xx) * (b.yy - c.yy) - (b.xx - c.xx) * (a.yy - b.yy)) < 0.0)return 1;  //Uporer dike //A,b,c, x okkher ordera sorted
    else return 0;
}
 
 
typedef pair<int,int >P;
//////////////////////////
/////////////////////////
int main(){
    
    int n;
    I(n);
    map<string,int>mp;
    set<string>s;
    for(int i=1;i<=n;i++){
        string x;
        cin>>x;
        mp[x] ++;
        s.insert(x);
    }
    vector<pair<int,string > > ans;

    for(auto it = s.begin();it!=s.end();it++){
        ans.push_back(mk(-mp[*it], *it));
    }
    sort(ans.begin(),ans.end());
  
    for(int i = 0;i<ans.size();i++){
        if(ans[i].x == ans[0].x)
        cout<<ans[i].y<<endl;}

    return 0;
}

Measured memory_bytes: 38772
#include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
  char c;
  cin>>c;
  switch(c){
    case 'A':
      cout<<"T"<<endl;
      break;
    case 'T':
      cout<<"A"<<endl;
      break;
    case 'C':
      cout<<"G"<<endl;
      break;
    case 'G':
      cout<<"C"<<endl;
      break;
  }
  return 0;
}


Measured memory_bytes: 256
n, x, y = map(int, input().split())

cnt = [0]*(n-1)

for i in range(1, n):
  for j in range(i+1, n+1):
    cnt[min(j-i, abs(j-y)+abs(i-x)+1)-1] += 1

for out in cnt:
  print(out)

Measured memory_bytes: 3444
#include <bits/stdc++.h>
using namespace std;
const int N=1<<21;
int f[N][22],n,K;char str[N];
int main(){
    scanf("%d%d",&n,&K);
    for(int i=0;i<=n;i++){
        scanf("%s",str);
        for(int j=0;j<(1<<i);j++)
            f[(1<<i)|j][i]=str[j]=='1';
    }
    for(int i=n,F,s1,s2,k,S;i>=1;i--)
        for(int s=0;s<(1<<i);s++)
            for(int j=i;j>=0;j--)
                if(F=f[(1<<i)|s][j]){
                    s1=s>>j,s2=s&((1<<j)-1);
                    if(j) f[(1<<(i-j))|s1][0]+=F;
                    if(s2){
                        k=j-1;while(!((s2>>k)&1))k--;
                        S=(1<<(i-((j-1)-k)))|(s1<<(k+1))|(s2&((1<<k)-1));
                        f[S|(1<<k)][k]+=F;
                    }
                    if(s2^((1<<j)-1)){
                        k=j-1;while((s2>>k)&1)k--;
                        S=(1<<(i-((j-1)-k)))|(s1<<(k+1))|(s2&((1<<k)-1));
                        f[S][k]+=F;
                    }
                }
    for(int i=n;i>=0;i--)
        for(int j=0;j<(1<<i);j++)
            if(f[(1<<i)|j][0]>=K){
                for(int k=i-1;k>=0;k--)
                    printf("%d",(j>>k)&1);
                return 0;
            }
    return 0;
}

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

using ll=long long;
const int inf=100000000;

int in(){
  int a;
  cin >> a;
  return a;
}//int型関数の受け取り

void forin(int* x,int y){
  for (int i=0;i<y;i++){
    cin >> x[i];
  }
}//(x,y) int型配列x[y]の受け取り

int intpow(int x,int y){
  double a=x,b=y;
  return pow(a,b);
}//(x,y) xをy乗

int intfabs(int x){
  double a=x;
  return fabs(a);
}//(x) xの絶対値

int fact(int x){
  if (x == 1) return 1;
  return x*fact(x-1);
}//(x) x!

int fib(int x){
  if (x <= 2) return x;
  int a[x];
  a[0]=1;
  a[1]=2;
  for (int i=2;i<x;i++){
    a[i]=a[i-1]+a[i-2];
  }
  return a[x-1];
}//(x) フィボナッチ数列のx番目

int div1(ll x){
  return x%1000000007;
}

main(){
    string s;
    cin >> s;
    if (s.at(0)==s.at(1) || s.at(1)==s.at(2) || s.at(2)==s.at(3)) cout << "Bad" << endl;
    else cout << "Good" << endl; 
}


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

using i32 = std::int_fast32_t;
using i64 = std::int_fast64_t;
template <typename T>
constexpr T INF = numeric_limits<T>::has_infinity ? numeric_limits<T>::infinity() : numeric_limits<T>::max() / 4;

#define REP(i, stop) FOR(i, 0, stop)
#define FOR(i, start, stop) for (int i = start, i##_len = stop; i < i##_len; ++i)
#define RREP(i, n) for (int i = n; i-- > 0;)
#define ALL(v) (v).begin(), (v).end()

template<typename T, typename U> istream& operator>>(istream& in, pair<T, U>& a) { cin >> a.first >> a.second; }
template<typename T> istream& operator>>(istream& in, vector<T>& a) { for (T& x : a) cin >> x; }

void LOG(const int& x) { cerr << x << "\n"; }
void LOG(const vector<int>& a) { for (int x : a) cerr << x << " "; cerr << "\n"; }

int ceil(int a, int b) { return (a - 1) / b + 1; }
i64 gcd(i64 a, i64 b) { while (b != 0) { i64 t = b; b = a % b; a = t; } return a; }
i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }
i64 gcd(const vector<i64>& v) { return accumulate(ALL(v), 1LL, static_cast<i64(*)(i64, i64)>(gcd)); }
i64 lcm(const vector<i64>& v) { return v.empty() ? 0LL : accumulate(v.begin() + 1, v.end(), v[0], static_cast<i64(*)(i64, i64)>(lcm)); }

#define COMP(key) [](const auto& a, const auto& b) { return a.key < b.key; }

class UnionFind { private: vector<int> par; vector<int> rnk; int find(int x) { return par[x] == x ? x : par[x] = find(par[x]); } public: UnionFind(int size) { par.resize(size); rnk.resize(size); REP(i, size) par[i] = i, rnk[i] = 0; } void unite(int x, int y) { x = find(x); y = find(y); if (x == y) return; if (rnk[x] < rnk[y]) { par[x] = y; } else { par[y] = x; if (rnk[x] == rnk[y]) rnk[x]++; } } bool same(int x, int y) { return find(x) == find(y); } };

struct InitCpp { InitCpp() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); } } initCpp;

signed main() {
  int n;
  cin >> n;
  vector<int> a(n);
  cin >> a;
  int s = 0;
  i64 c = 0;
  int f = 0;
  for (int x : a) {
    f ^= 1;
    s += x;
    if (f) {
      if (s <= 0) c += 1 - s, s = 1;
    } else {
      if (s >= 0) c += 1 + s, s = -1;
    }
  }
  s = 0;
  i64 d = 0;
  f = 1;
  for (int x : a) {
    f ^= 1;
    s += x;
    if (f) {
      if (s <= 0) d += 1 - s, s = 1;
    } else {
      if (s >= 0) d += 1 + s, s = -1;
    }
  }
  cout << min(c, d) << endl;
}

Measured memory_bytes: 640