akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds ;
#define ll long long
#define ld long double
#define rep(i,a,b) for(ll i=a;i<b;i+=1)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define sz(a) int((a).size())
#define hell (ll)1000000007
#define f first
#define s second
#define sll(x) scanf("%lld",&x)
#define si(x) scanf("%d",&x)
typedef tree< ll , null_type , less<ll> , rb_tree_tag , tree_order_statistics_node_update > ordered_set ;
ll t = 1 ;
void solve()
{
    ll n ;
    cin >> n ;
    vector<ll> v(n+5,0) , pre(n+5,0) , suf(n+5,0) ;
    rep( i , 1 , n + 1 )
    {
        cin >> v[i] ;
        pre[i] = pre[i-1] + v[i] ;
    }
    for( ll i = n ; i>= 1 ; i-- )
    {
		suf[i] = suf[i+1] + v[i] ;
	}
    //cout << "\n" ;
    ll ans = v[n] + 66 ;
    rep( i , 1 , n + 1 )
    {
        ans = min( ans , abs(suf[i] - pre[i-1]) ) ;
    }
    cout << ans << "\n" ;
}
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    /*fact[0] = 1 ;
    rep( i , 1 , N )
        fact[i] = ( fact[i-1] * i ) % hell ;*/
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    //cin>>t;
    while(t--)
        solve() ;
    return 0 ;
}


Measured memory_bytes: 256
import java.util.*;

class Main {

    static ArrayList<Double> mountains;

    static void solve () {
        System.out.println( Collections.max(mountains) - Collections.min(mountains) );
    }

    public static void main (String [] args) {

        Scanner sc = new Scanner(System.in);
        
        mountains = new ArrayList<Double>();

        while(sc.hasNext()) {
            mountains.add(sc.nextDouble());
        }
        
        solve();
    }
}

Measured memory_bytes: 12000
#include <bits/stdc++.h>
#define _CRT_SECURE_NO_WARNINGS
#define ll long long
#define BUF 1e5
#define INF 1<<30
using namespace std;
ll MOD = 1e9 + 7;
ll A, B, C, D, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S;
ll ans = 0;

int main() {
	ll T;
	cin >> A >> B >> T;
	cout << T / A * B << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define inf LLONG_MAX
#define pll pair <ll,ll>
#define min_pq priority_queue <pll> ,vector <pll>, greater <pll> > > 
#define f first
#define s second

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


	ll n,k,s;
	cin>>n>>k>>s;
	for(ll i=0;i<k;i++)
		cout<<s<<' ';
	ll x=1e9-s;
	if(x==0)
		x++;
	for(ll i=0;i<n-k;i++)
	{
		cout<<x<<' ';
	}
	cout<<'\n';
}


Measured memory_bytes: 1280
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>
#include <cassert>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#define ALL(v) begin(v),end(v)
#else
#define ALL(v) (v).begin(),(v).end()
#endif

using namespace std;


namespace{
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
	v.assign(a, vector<T>(b, t));
}
template <class T> inline T &chmin(T &x, const T &y){ return x = min(x, y); }
template <class T> inline T &chmax(T &x, const T &y){ return x = max(x, y); }
template <class F, class T>
void convert(const F &f, T &t){
	stringstream ss;
	ss << f;
	ss >> t;
}


#define REP(i,n) for(int i=0;i<int(n);++i)
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8


void mainmain(){
	int n;
	string s;
	cin >> n >> s;
	int r = count(ALL(s), 'R');
	puts(r > n - r ? "Yes" : "No");
}



}
int main() try{
//	ios::sync_with_stdio(false); cin.tie(0);
	cout << fixed << setprecision(10);
	cerr << fixed << setprecision(4);
	mainmain();
}
catch(...){
	throw;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N;
  string str;
  cin >>N>>str;
  string S = str.substr(0, N/2);
  string T = str.substr((N/2),N);
  if(str.size() %2 == 1){
    cout << "No" << endl;
  }
  else
  {
    if(S==T){
    cout << "Yes" <<endl;
    }
    else{
      cout << "No"<<endl;
    }
  }


}

Measured memory_bytes: 256
def gcd(x,y):
    while(y): 
        x, y = y, x % y 
    return x
    

out = 0
K = int(input())
for i in range(1, K + 1):
    count = K//i
    val = 0
    for j in range(1,i + 1):
        if gcd(i,j) == 1:
            val += 1
    out += val * count * count * count
print(out)


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


void solve(long long N, long long T, std::vector<long long> A, std::vector<long long> B){
    vector<pair<long long, long long>> dish;
    for(int i = 0;i < N;i++){
        dish.push_back({A[i], B[i]});
    }
    sort(dish.begin(), dish.end());
    //reverse(dish.begin(), dish.end());
    vector<vector<long long>> dp(N+1, vector<long long>(6001, -1));
    dp[0][0] = 0;
    for(int i = 0;i < N;i++){
        for(int j = 0;j < 6001;j++){
            if(dp[i][j] == -1){
                continue;
            }
            dp[i+1][j] = max(dp[i+1][j], dp[i][j]);
            if(j >= T){
                continue;
            }
            dp[i+1][j + dish.at(i).first]  = max(dp[i+1][j + dish.at(i).first], dp[i][j] + dish.at(i).second);
        }
    }
    cout<<*max_element(dp.back().begin(), dp.back().end())<<endl;;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long N;
    scanf("%lld",&N);
    long long T;
    scanf("%lld",&T);
    std::vector<long long> A(N);
    std::vector<long long> B(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&A[i]);
        scanf("%lld",&B[i]);
    }
    solve(N, T, std::move(A), std::move(B));
    return 0;
}


Measured memory_bytes: 141184
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U> using Pa = pair<T, U>;
template <class T> using vec = vector<T>;
template <class T> using vvec = vector<vec<T>>;

constexpr ll mod = 1e9+7;
struct mint {
    ll x;
    mint(ll x=0):x((x%mod+mod)%mod){}
    
    friend ostream &operator<<(ostream& os,const mint& a){
        return os << a.x;
    }

    friend istream &operator>>(istream& is,mint& a){
        ll t;
        is >> t;
        a = mint(t);
        return (is);
    }

    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod-a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint a) const {
        mint res(*this);
        return res+=a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res-=a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res*=a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
        return a;
    }
    // for prime mod
    mint inv() const {
        return pow(mod-2);
    }
    mint& operator/=(const mint a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint a) const {
        mint res(*this);
        return res/=a;
    }
};

class combination{
public:
    vector<mint> fact,inv,finv;
    combination(int N){
        fact = inv = finv = vector<mint>(N+1);
        fact[0] = fact[1] = 1;
        inv[0] = inv[1] = 1;
        finv[0] = finv[1] = 1;
        for(ll i=2;i<=N;i++){
            fact[i] = fact[i-1]*i;
            inv[i] = (mint) mod - inv[mod%i]*(mod/i);
            finv[i] = finv[i-1]*inv[i];
        }
    }
    mint f(int i){
        return fact[i];
    }
    mint comb(int n,int k){
        if(n<k) return 0;
        if(n<0 || k<0) return 0;
        return fact[n]*finv[k]*finv[n-k];
    }
    mint hcomb(int n,int k){
        if(n==0 && k==0) return 1;
        return comb(n+k-1,k);
    }
};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N,A,B,C,D;
    cin >> N >> A >> B >> C >> D;
    combination choose(N);
    vvec<mint> fpow(N+1,vec<mint>(N+1));
    for(int j=1;j<=N;j++){
        for(int k=0;k<=N;k++){
            if(k==0) fpow[j][k] = 1;
            else fpow[j][k] = ((choose.fact[j]).pow(k)).inv();
        }
    }
    vec<mint> dp(N+1);
    dp[N] = 1;
    for(int j=A;j<=B;j++){
        vec<mint> ndp = dp;
        for(int i=1;i<=N;i++){
            for(int k=C;k<=D;k++){
                if(i-j*k<0) break;
                ndp[i-j*k] += dp[i]*choose.comb(i,j*k)*choose.fact[j*k]*choose.finv[k]*fpow[j][k];
            }
        }
        dp.swap(ndp);
    }
    cout << dp[0] << "\n";
}

Measured memory_bytes: 8192
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
using ll = long long;
using P  = pair<int,int>;
using v  = vector<int>;
using vv = vector<v>;
const int MOD = 1000000007;

vv dp(10001, v (1001, 1001001001));

//
//個数制限なしナップサック問題
//冗長に2次元バージョン
int main(){
    int h,n;
    cin >>h>>n;
    
    v a(n), b(n);
    rep(i,n)cin >> a[i] >> b[i];
    
    //前からi種類の魔法を見て
    //体力をh減らすのにかかる
    //最小のb
    dp[0][0]=0;
    for(int i=0; i<n; i++){
        for(int x=0; x<h+a[i]; x++){//範囲に注意//a[i]が無駄になる領域も見る
            int nx = min(h,x);
            if(x-a[i]>=0){
                dp[nx][i+1] = min(dp[nx][i+1], dp[nx][i]);
                dp[nx][i+1] = min(dp[nx][i+1], dp[x-a[i]][i+1]+b[i]);
            }
            //min(i番目を使わない, i番目をもう1個使う)
            else
                dp[nx][i+1] = dp[nx][i];
        }
    }
    
    cout << dp[h][n] << endl;
    
    return 0;
}

Measured memory_bytes: 39680
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] bit = new String[10];
		bit[0] = "0111111";
		bit[1] = "0000110";
		bit[2] = "1011011";
		bit[3] = "1001111";
		bit[4] = "1100110";
		bit[5] = "1101101";
		bit[6] = "1111101";
		bit[7] = "0100111";
		bit[8] = "1111111";
		bit[9] = "1101111";

		int n,x;
		String[] segment = new String[2];

		while(true){
				n = sc.nextInt();
				if(n == -1)break;

				segment[0] = "0000000";

				for(int i = 0; i < n; i++){
					//System.out.println(segment[0]);
					segment[1] = "";
					x = sc.nextInt();

					for(int j = 0; j < 7; j++) {
						segment[1] += String.valueOf(
								Integer.parseInt(String.valueOf(segment[0].charAt(j))) ^
								Integer.parseInt(String.valueOf(bit[x].charAt(j))));
					}

					System.out.println(segment[1]);
					segment[0] = bit[x];
				}
		}

	}
}

Measured memory_bytes: 20908
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define repr(i, n) REPR(i, n, 0)
#define REPR(i, s, e) for(int i=(int)(s-1); i>=(int)(e); i--)
#define pb push_back
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const ll INF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-8;

template<typename T> T chmax(T& a, const T& b){return a = (a > b ? a : b);}
template<typename T> T chmin(T& a, const T& b){return a = (a < b ? a : b);}

int main(){
    vi x(5);
    rep(i, 5) cin >> x[i];
    rep(i, 5) {
        if(x[i] == 0) {
            cout << i+1 << '\n';
        }
    }
    return 0;
}

Measured memory_bytes: 3628
#include <stdio.h>

int main(){
	int h,m,S,s,a;
	scanf("%d",&S);
	h=S/3600;
	a=S%3600;
	m=a/60;
	s=a%60;
	printf("%d:%d:%d\n",h,m,s);
	
	return 0;
}

Measured memory_bytes: 592
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  
  int N = S.size();
  int ans = 999;
  for(int i = 0; i <= N-3; i++){
    int num = (S.at(i)-'0')*100 + (S.at(i+1)-'0')*10 + S.at(i+2)-'0';
      ans = min(ans, abs(num-753));
  }
  
  cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
using namespace std;
const long long int INF = 1e18;
const long long int MOD = 1e9+7;

typedef pair<ll, ll> pairs;
typedef vector<pairs> p;

struct edge{
    ll to, cost;
};


ll gcd(ll a,ll b){
    if(b == 0){
        return a;
    }else{
        return gcd(b, a%b);
    }
}

ll lcm(ll a, ll b){
    return a / gcd(a, b) * b;
}

ll keta(ll N){
    int tmp{};
    while( N > 0 ){
        tmp += ( N % 10 );
        N /= 10;
    }
    N = tmp;
    return N;
}

// 素数
vector<bool> IsPrime;
void sieve(size_t max){
    if(max+1 > IsPrime.size()){
        IsPrime.resize(max+1,true);
    } 
    IsPrime[0] = false;
    IsPrime[1] = false;

    for(size_t i=2; i*i<=max; ++i){
        if(IsPrime[i]){
            for(size_t j=2; i*j<=max; ++j){
                IsPrime[i*j] = false;
            }
        }
    }
}

// べき乗の余り
ll modpow(ll a, ll n){
    ll res = 1;
    while(n){
        if(n & 1){
            res = res * a % MOD;
        }
        a = a * a % MOD;
        n = n >> 1;
    }
    return res;
}

// コンビネーション
ll MAXN = 2e5+10;
vector<ll> inv(MAXN);
ll nCk(ll n, ll k) {
	ll res = 1;
	for(ll i = 1; i <= k; i++) {
		res = res*(n-i+1) % MOD;
	}
 
	for(ll i = 1; i <= k; i++) {
		res = res*inv[i] % MOD;
	}
	return res;
}

// 回文
bool kai(string S){
    bool flag = true;
    for(ll i=0;i<S.size()/2;++i){
        if(S[i] != S[S.size()-i-1]){
            flag = false;
            break;
        }
    }
    return flag;
}
// ---------------------------------------------

int main(){
    ll n, d;
    cin>>n>>d;
    vector<ll> x(n), y(n);
    for(ll i=0;i<n;++i){
        cin>>x[i]>>y[i];
    }

    ll ans = 0;
    for(ll i=0;i<n;++i){
        if(x[i] * x[i] + y[i] * y[i] <= d * d){
            ans++;
        }
    }
    cout<<ans<<endl;

    return 0;
}

Measured memory_bytes: 8016
//make sure to make new file!
import java.io.*;
import java.util.*;

public class Main{
   
   public static void main(String[] args)throws IOException{
      BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
      PrintWriter out = new PrintWriter(System.out);
      
      int n = Integer.parseInt(f.readLine());
      
      StringTokenizer st = new StringTokenizer(f.readLine());
      
      int a = Integer.parseInt(st.nextToken());
      int b = Integer.parseInt(st.nextToken());
      
      if(a%n == 0 || b%n == 0 || b/n > a/n){
         out.println("OK");
      } else {
         out.println("NG");
      }
      
      
      
      
      
      
      
      
      out.close();
   }
   
      
}

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

using namespace std;

const int MAXN = 302;

int n;
double dp[MAXN][MAXN][MAXN];
bool vis[MAXN][MAXN][MAXN];

double solve(int x, int y, int z) {
  if(vis[x][y][z])
    return dp[x][y][z];
  vis[x][y][z] = 1;

  if(!x && !y && !z)
    return dp[x][y][z] = 0;

  double total = x + y + z;
  double tot = (n - total)/total;

  if(x != 0) tot += x*((solve(x-1,y,z) + 1)/total);
  if(y != 0) tot += y*((solve(x+1,y-1,z) + 1)/total);
  if(z != 0) tot += z*((solve(x,y+1,z-1) + 1)/total);
  return dp[x][y][z] = tot;
}

int main() {
  int a[4] = {0,0,0,0};
  cin >> n;
  for(int i=1; i<=n; ++i) {
    int x;
    cin >> x;
    ++a[x];
  }
  cout.precision(10);
  cout << solve(a[1],a[2],a[3]);
  return 0;
}


Measured memory_bytes: 241920
#include <iostream>
#include <array>
#include <map>
#include <algorithm>
#include <cmath>
#include <vector>
#include <fstream>
#include <string>
#include <random>
#include <queue>
#include <iomanip>
#include <functional>
#include <climits>
#include <tuple>
#include <unordered_map>
#include <limits>
#include <functional>
#include <cassert>
#include <numeric>
#include <bitset>
#include <set>

#define FOR(x,n) for(int x = 0; x < n; x++)
#define INPUT(x) scanf("%d",&x)
#define PUT(x) printf("%d\n",x)
#define DPUT(x) printf("%.15lf\n",x)
#define GET(x,y) std::get<x>(y)
#define CHMAX(x,y) x = std::max(x,y)
#define CHMIN(x,y) x = std::min(x,y)
#define SP_END (i != n - 1 ? ' ' : '\n') ;

using namespace std;

using ll = long long int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vll = std::vector<ll>;
using vpll = std::vector<pll>;
using vpii = std::vector<pii>;
using vi = std::vector<int>;
using vvi = std::vector<vi>;
using vvpii = std::vector<vpii>;
using vch = std::vector<char>;
using vvch = std::vector<vch>;
using tiii = std::tuple<int, int, int>;

const ll mod197 = 1000000007LL;
const ll INF = 10000000000LL;

const double PI11 = 3.14159265359;

const int dis[5] = { 0,1,0,-1,0 };

const int disD[4] = { 0,1,1,0 };
const int disLD[3] = { 0,1,0 };

const char disC[4] = { 'U','D','R','L' };
const char disY[4] = { -1,1,0,0 };
const char disX[4] = { 0,0,1,-1 };

int main(void) {

	ll a, b;
	cin >> a >> b;

	cout << max({a+b,a-b,a*b}) << endl;

	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(){
   int m, f, r;
   while(1){
       scanf("%d %d %d ", &m, &f, &r);
       if(m==-1&&f==-1&&r==-1)break;
       if(m==-1||f==-1){
           printf("F\n");
       }else if(m+f>=80){
           printf("A\n");
       }else if(m+f>=65){
           printf("B\n");
       }else if(m+f>=50){
           printf("C\n");
       }else if(m+f>=30){
           if(r>=50){
               printf("C\n");
           }else{
               printf("D\n");
           }
       }else{
           printf("F\n");
       }
   }
   return 0;
}


Measured memory_bytes: 2036
#include<iostream>
#include<iomanip>

using namespace std;

int main(){
  std::cin.tie(nullptr);                  // 標準入出力高速化
  std::ios_base::sync_with_stdio(false);  // SとS++の入出力出力を非同期
  string b;
  cin>>b;
  b=="A" ? cout<<"T"<<endl : b=="T" ? cout<<"A"<<endl : b=="C" ? cout<<"G"<<endl : cout<<"C"<<endl;

}

Measured memory_bytes: 256
//It doesn't matter how slow you go, Unless you don't stop.
#include<iostream>
#include<algorithm>
#include<bitset>
 
#include<cmath>
#include<cstring>
#include<climits>
 
#include<deque>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
 
#include<fstream>
#include<chrono>
using namespace std;
 
typedef long long LL;
typedef pair<LL,LL> p64;
typedef vector<LL> v64;
typedef map<LL,LL> mp64;
 
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define rep(i,s,e) for(long long i=s;i<=e;i++)
#define brep(i,s,e) for(long long i=s;i>=e;i--)
#define all(x) x.begin(),x.end()
#define mem(x,y) memset(x,y,sizeof(x))
#define DANGER std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
int binomialCoeff(int n, int k)  
{  
    if(n==0 || n==1)
    {
        return 0;
    }
    int res = 1;  
    if ( k > n - k )  
        k = n - k;  
    for (int i = 0; i < k; ++i)  
    {  
        res *= (n - i);  
        res /= (i + 1);  
    }  
    return res;  
} 
void solve()
{
     int n,m;cin>>n>>m;
     int res=0;
     res += binomialCoeff(n,2);
     res += binomialCoeff(m,2);
    cout<<res;
}
 
int main()
{
    DANGER;
    ofstream out("output.txt");
 
    auto start = chrono::high_resolution_clock::now();
    
    LL t = 1;
    // cin>>t;
    rep(test,1,t)
    {
        solve();
    }
    
    auto stop = chrono::high_resolution_clock::now();
    // auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start); 
    // cout << "Time taken by function: " << duration.count() << " milliseconds" << endl;
}

Measured memory_bytes: 256
object Main {
  def main(args: Array[String]): Unit = {
    val s = new Main()
    s.solve()
    s.out.flush()
  }
}

class Main {
  import java.io._
  import java.util.StringTokenizer

  import scala.collection.mutable
  import scala.util.Sorting
  import math.{abs, max, min}
  import mutable.{ArrayBuffer, ListBuffer}
  import scala.reflect.ClassTag

  val MOD = 1000000007
  val out = new PrintWriter(System.out)

  def solve(): Unit = {
    val H, W = ni()
    val A = Array.ofDim[Int](H, W)
    rep(H) { i =>
      rep(W) { j =>
        A(i)(j) = ni()
      }
    }

    val lines = ArrayBuffer[String]()
    rep(H) { i =>
      rep(W) { j =>
        if (!(i == H -1 && j == W - 1) && A(i)(j) % 2 == 1) {
          if (i < H - 1) {
            A(i + 1)(j) += 1
            lines += s"${i+1} ${j+1} ${i+2} ${j+1}"
          } else {
            A(i)(j + 1) += 1
            lines += s"${i+1} ${j+1} ${i+1} ${j+2}"
          }
        }
      }
    }

    out.println(lines.size)
    lines foreach out.println
  }


  class InputReader(val stream: InputStream) {
    private val reader = new BufferedReader(new InputStreamReader(stream), 32768)
    private var tokenizer: StringTokenizer = _

    def next(): String = {
      while (tokenizer == null || !tokenizer.hasMoreTokens)
        tokenizer = new StringTokenizer(reader.readLine)
      tokenizer.nextToken
    }

    def nextInt(): Int = next().toInt
    def nextLong(): Long = next().toLong
    def nextChar(): Char = next().charAt(0)
  }
  val sc = new InputReader(System.in)
  def ni(): Int = sc.nextInt()
  def nl(): Long = sc.nextLong()
  def nc(): Char = sc.nextChar()
  def ns(): String = sc.next()
  def ns(n: Int): Array[Char] = ns().toCharArray
  def na(n: Int): Array[Int] = map(n)(_ => ni())
  def nm(n: Int, m: Int): Array[Array[Char]] = map(n) (_ => ns(m))
  def rep(n: Int, offset: Int = 0)(f: Int => Unit): Unit = {
    var i = offset
    val N = n + offset
    while(i < N) { f(i); i += 1 }
  }
  def rep_r(n: Int, offset: Int = 0)(f: Int => Unit): Unit = {
    var i = n - 1 + offset
    while(i >= offset) { f(i); i -= 1 }
  }

  def map[@specialized A: ClassTag](n: Int)(f: Int => A): Array[A] = {
    val res = Array.ofDim[A](n)
    rep(n)(i => res(i) = f(i))
    res
  }
}

Measured memory_bytes: 68700
#include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <iterator>
#pragma warning(disable:4996)

typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define MOD 1000000007
using namespace std;

long p[100005];
long flag[100005];
vector<vector<long> > a;

void Get( long i, vector<long>& vv )
{
    if(flag[i]) return;
    
    flag[i]=1;
    vv.push_back(i);
    long k;
    for(k=0; k<(long)a[i].size(); k++) {
        Get(a[i][k], vv);
    }

    return;
}

int main(int argc, char* argv[])
{
    long n, m;
    scanf("%ld %ld", &n, &m);
    long i;
    for(i=0; i<n; i++) {
        scanf("%ld", &(p[i]));
        p[i]--;
    }

    a.resize(n);
    for(i=0; i<m; i++) {
        long x, y;
        scanf("%ld %ld", &x, &y);
        a[x-1].push_back(y-1);
        a[y-1].push_back(x-1);
    }
    
    long ans=0;
    for(i=0; i<n; i++) {
        if(flag[i]) continue;
        vector<long> tmp;
        Get(i, tmp);
        
        sort(tmp.begin(), tmp.end());
        vector<long> tmp2(tmp.size());
        long k;
        for(k=0; k<(long)tmp.size(); k++) {
            tmp2[k]=p[tmp[k]];
        }
        sort(tmp2.begin(), tmp2.end());

        vector<long> tmp3;
        set_intersection(tmp.begin(), tmp.end(), tmp2.begin(), tmp2.end(), back_inserter(tmp3));
        ans += (long)tmp3.size();
    }

    printf("%ld\n", ans);

    return 0;
}


Measured memory_bytes: 13428
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef long double ld;
const int inf=1e9+7;
const ll longinf=1LL<<60;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define F first
#define S second
constexpr char ln = '\n';

const int mx=100010;
const ll mod=1e9+7;

int main(){
  int n,m;
  cin >> n >> m;
  vector<int> v[n];
  rep(i,m){
    int x,y; cin >> x >> y; x--; y--;
    v[x].emplace_back(y);
  }

  vector<double> dp(n,0.0);
  for(int i=n-2; i>=0; i--){
    double now = 0;
    for(auto it:v[i]){
      now += dp[it];
    }
    now /= v[i].size();
    now += 1;
    dp[i] = now;
  }

  double ans = dp[0];
  for(int cf=0; cf<n-1; cf++){
    if(v[cf].size()==1){ continue; }
    int ct = v[cf][0];
    for(auto it:v[cf]){
      if(dp[ct]<dp[it]) ct = it;
    }

    double func = [&](){
      vector<double> dp(n,0.0);
      for(int i=n-2; i>=0; i--){
        double now = 0;
        for(auto it:v[i]){
          if(i==cf && it==ct) continue;
          now += dp[it];
        }
        int deg = v[i].size();
        if(i==cf) deg--;
        now /= deg;
        now += 1;
        dp[i] = now;
      }
      return dp[0];
    }();
    ans = min(ans, func);
  }
  cout << fixed << setprecision(10) << ans << ln;
  return 0;
}

Measured memory_bytes: 1408
import java.util.Scanner;

public class Main {

    // https://atcoder.jp/contests/abc158/submissions/10588295
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        if (S.equals("AAA") || S.equals("BBB")){
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
    }
}

Measured memory_bytes: 21332
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;

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

    int n, k;
    cin >> n >> k;

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

    vector<ll> s;
    for (int i = 0; i < n; i++) {
        ll t = 0;
        for (int j = i; j < n; j++) {
            t += a[j];
            s.push_back(t);
        }
    }
    int l = n * (n + 1) / 2;
    if (s.size() != (size_t)l) throw;

    vector<ll> s1(l);
    ll r = 0;
    for (int x = 45; x >= 0; x--) {
        l = s.size();
        if (l == 0) break;
        int c = 0;
        ll m = 1LL << x;
        for (int i = 0; i < l; i++) {
            if (s[i] & m) {
                c++;
            }
        }
        if (c < k) continue;
        r ^= m;
        int j = 0;
        for (int i = 0; i < l; i++) {
            if (s[i] & m) s1[j++] = s[i];
        }
        s1.resize(j);
        swap(s, s1);
    }

    cout << r << endl;

    return 0;
}

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

#define ll long long
#define ar array

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

#define F_OR(i, a, b, s) for (int i = (a); ((s) > 0 ? i < (b) : i > (b)); i += (s))
#define F_OR1(e) F_OR(i, 0, e, 1)
#define F_OR2(i, e) F_OR(i, 0, e, 1)
#define F_OR3(i, b, e) F_OR(i, b, e, 1)
#define F_OR4(i, b, e, s) F_OR(i, b, e, s)
#define GET5(a, b, c, d, e, ...) e
#define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1)
#define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__)

#define E_ACH2(x, a) for (auto& x: a)
#define E_ACH3(x, y, a) for (auto& [x, y]: a)
#define E_ACH4(x, y, z, a) for (auto& [x, y, z]: a)
#define E_ACHC(...) GET5(__VA_ARGS__, E_ACH4, E_ACH3, E_ACH2)
#define EACH(...) E_ACHC(__VA_ARGS__)(__VA_ARGS__)

const int M=1e9+7;
int n, k;
vector<ll> ap, an;

ll solve() {

	cin >> n >> k;
	FOR(n) {
		ll a;
		cin >> a;
		if(a>0)
			ap.push_back(a);
		else
			an.push_back(-a);
	}
	sort(all(ap));
	sort(all(an));
	if(k==n?an.size()%2==0:ap.size()||k%2==0) {
		reverse(all(ap));
		reverse(all(an));
		ll ans=1;
		int i=0, j=0;
		for(; k; --k) {
			if(i<ap.size()&&(j>=an.size()||ap[i]>an[j])) {
				ans=ans*ap[i]%M;
				++i;
			} else {
				ans=ans*an[j]%M;
				++j;
			}
		}
		if(j&1) {
			ans=1;
			if(i<ap.size()&&j-1>=0&&(j>=an.size()||i-1<0||ap[i]*ap[i-1]>an[j]*an[j-1])) {
				FOR(k, i+1)
					ans=ans*ap[k]%M;
				FOR(k, j-1)
					ans=ans*an[k]%M;
			} else {
				FOR(k, i-1)
					ans=ans*ap[k]%M;
				FOR(k, j+1)
					ans=ans*an[k]%M;
			}
		}
		return ans;
	}
	ll ans=1;
	for(int i=0, j=0; k; --k) {
		if(i<ap.size()&&(j>=an.size()||ap[i]<an[j])) {
			ans=ans*ap[i]%M;
			++i;
		} else {
			ans=ans*an[j]%M;
			++j;
		}
	}
	return (M-ans)%M;
}

int main(){
	cout<<solve();
}

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

#define debug(x) {cerr << #x << " = " << x << '\n';}
#define PR(a, n) {cerr << #a << " = "; for (int _=1; _<=n; ++_) cerr << a[_] << ' '; cerr << '\n';}
#define PR0(a, n) {cerr << #a << " = "; for (int _=0; _<n; ++_) cerr << a[_] << ' '; cerr << '\n';}
#define FILE_NAME "data"


const int P = 200003;


int64_t getPow(int n, int k) {
    if (k == 0) {
        return 1;
    }

    int64_t tmp = getPow(n, k / 2);

    if (k % 2 == 0) {
        return tmp * tmp % P;
    }
    return tmp * tmp % P * n % P;
}


using cd = complex<double>;
const double PI = acos(-1);

void fft(vector<cd> & a, bool invert) {
    int n = a.size();

    for (int i = 1, j = 0; i < n; i++) {
        int bit = n >> 1;
        for (; j & bit; bit >>= 1)
            j ^= bit;
        j ^= bit;

        if (i < j)
            swap(a[i], a[j]);
    }

    for (int len = 2; len <= n; len <<= 1) {
        double ang = 2 * PI / len * (invert ? -1 : 1);
        cd wlen(cos(ang), sin(ang));
        for (int i = 0; i < n; i += len) {
            cd w(1);
            for (int j = 0; j < len / 2; j++) {
                cd u = a[i+j], v = a[i+j+len/2] * w;
                a[i+j] = u + v;
                a[i+j+len/2] = u - v;
                w *= wlen;
            }
        }
    }

    if (invert) {
        for (cd & x : a)
            x /= n;
    }
}


vector<int64_t> multiply(vector<int> const& a, vector<int> const& b) {
    vector<cd> fa(a.begin(), a.end()), fb(b.begin(), b.end());
    int n = 1;
    while (n < a.size() + b.size()) 
        n <<= 1;
    fa.resize(n);
    fb.resize(n);

    fft(fa, false);
    fft(fb, false);
    for (int i = 0; i < n; i++)
        fa[i] *= fb[i];
    fft(fa, true);

    vector<int64_t> result(n);
    for (int i = 0; i < n; i++)
        result[i] = round(fa[i].real());
    return result;
}


int main() {
    #ifdef GLASSES_GIRL
        freopen(FILE_NAME".in", "r", stdin);
    #endif

    map<int, int> s;

    for (int i = 0; i + 1 < P; ++i) {
        s[getPow(2, i)] = i;
    }

    int n;
    cin >> n;

    vector<int> a(P - 1);
    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        // debug(s[x]);
        if (x != 0) {
            ++a[s[x]];
        }
    }
    
    vector<int64_t> b = multiply(a, a);

    int64_t res = 0;
    for (int i = 0; i < 2 * P; ++i) {
        res += getPow(2, i) * b[i]; 
        // if (b[i]) {
        //     cerr << i << ' ' << b[i] << '\n';
        // }
    }

    for (int i = 0; i + 1 < P; ++i) {
        res -= getPow(2, 2 * i) * a[i];
    }

    cout << res / 2 << '\n';
}


Measured memory_bytes: 34308
class BinaryIndexedTree(object):
    __slots__ = ["tree", "size"]

    def __init__(self, size: int):
        self.tree = [0]*(size+1)
        self.size = size+1

    def add(self, index: int, value: int):
        tree = self.tree

        while index < len(tree):
            tree[index] += value
            index += index & -index

    def sum(self, index: int):
        tree, result = self.tree, 0

        while index:
            result += tree[index]
            index -= index & -index

        return result


def solve(A):
    bit = BinaryIndexedTree(len(A)+1)
    ans = 0
    for i, n in enumerate(A):
        ans += i - bit.sum(n-1)
        bit.add(n, 1)

    return ans


if __name__ == "__main__":
    input()
    a = list(map(int, input().split()))
    d = {n: i for i, n in enumerate(sorted(a), start=1)}
    a = [d[n] for n in a]
    print(solve(a))


Measured memory_bytes: 38768
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>

#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

#include <stdexcept>

using namespace std;

// type alias
using ll = long long;
using ull = unsigned long long;

//conversion
//------------------------------------------
inline int toint(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class t> inline string tostring(t x) { ostringstream sout; sout << x; return sout.str(); }

//debug
#define DUMP(x)  cerr << #x << " = " << (x) << endl
#define DEBUG(x) cerr << #x << " = " << (x) << " (l" << __line__ << ")" << " " << __file__ << endl

inline ll floor(ll a, ull b)
{
	ll llb = b;
	if (a >= 0)
	{
		return a / llb;
	}
	else
	{
		return - ( (-a + llb - 1) / llb);
	}
}

inline ll ceil(ll a, ull b)
{
	ll llb = b;
	if (a >= 0)
	{
		return (a + llb - 1) / llb;
	}
	else
	{
		return - (-a / llb);
	}
}

inline ll getLowestOneBit(ll a)
{
	return a & (-a);
}

inline ll getHighestOneBit(ll a)
{
	while ((a & (a - 1)) != 0)
	{
		a = a & (a - 1);
	}
	return a;
}

inline bool isPower2(ull a)
{
	if (a == 0)
	{
		return false;
	}
	return !(a & (a - 1));
}

inline ll getSpecifiedBit(ll a, unsigned bit)
{
	return (a & (1LL << bit)) >> bit;
}

// computational complexity: o(log(max(a, b))) 
inline ull getGcd(ull a, ull b)
{
	if (b == 0)
	{
		return a;
	}
	return getGcd(b, a % b);
}

template<class Integer>
inline Integer getPower(Integer base, ull exponential)
{
	Integer result = 1;
	while (exponential >= 1)
	{
		if (exponential & 1)
		{
			result = result * base;
		}
		base = base * base;
		exponential >>= 1;
	}

	return result;
}

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

	bool is_good = true;
	for (ll i = 0; i < S.length(); ++i)
	{
		if ((i + 1) % 2 != 0)
		{
			if (S[i] == 'L')
			{
				is_good = false;
				break;
			}
		}
		else
		{
			if (S[i] == 'R')
			{
				is_good = false;
				break;
			}

		}
	}

	cout << (is_good ? "Yes" : "No") << endl;

	return 0;
}


Measured memory_bytes: 256
#include <iostream>      // cout, endl, cin
#include <string>        // string, to_string, stoi
#include <vector>        // vector
#include <algorithm>     // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility>       // pair, make_pair
#include <tuple>         // tuple, make_tuple
#include <cstdint>       // int64_t, int*_t
#include <cstdio>        // printf
#include <map>           // map
#include <queue>         // queue, priority_queue
#include <set>           // set
#include <stack>         // stack
#include <deque>         // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset>        // bitset
#include <cctype>        // isupper, islower, isdigit, toupper, tolower
#include <math.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)

int main()
{
    int n, q;
    cin >> n >> q;
    queue<pair<string, int>> list;

    rep(i, n)
    {
        string name;
        int proc;
        cin >> name >> proc;
        list.push(make_pair(name, proc));
    }

    int sum = 0;
    while (true)
    {
        auto ds = list.front();
        list.pop();
        if (ds.second <= q)
        {
            sum += ds.second;
            cout << ds.first << " " << sum << endl;
        }
        else
        {
            sum += q;
            ds.second -= q;
            list.push(ds);
        }
        if (list.empty())
        {
            return 0;
        }
    }
}



Measured memory_bytes: 6280
#include <bits/stdc++.h> 
using namespace std; 
int main() { 
	string str; 
	cin >> str; 
	int count = 0; 
	for (int i = 0; i < str.size(); i++) { 
		if (str.at(i) == 'x') { 
			count++; 
			} 
		} 
	if(count >= 8){
		cout << "NO" << endl;
	}else{
		cout << "YES" << endl;
	}
	}
		
	


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
int main() {
string S;
  cin >> S;
  if("SUN" == S)
    cout << 7 << endl;
  if("MON" == S)
    cout << 6 << endl;
  if("TUE" == S)
    cout << 5 << endl;
  if("WED" == S)
    cout << 4 << endl;
  if("THU" == S)
    cout << 3 << endl;
  if("FRI" == S)
    cout << 2 << endl;
if("SAT" == S) 
  cout << 1 <<endl;
}

Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;

typedef long long i64;
const int MAX_N = 100005;

int N, M, fa1[MAX_N], fa2[MAX_N << 1], ok[MAX_N], sz[MAX_N];
bool vis[MAX_N];

int find(int x, int *fa) {
  return fa[x] == x ? x : fa[x] = find(fa[x], fa);
}

bool merge1(int x, int y) {
  x = find(x, fa2), y = find(y, fa2);
  if (x == y) return false;
  fa2[x] = y;
  return true;
}

void merge2(int x, int y) {
  x = find(x, fa1), y = find(y, fa1);
  if (x == y) return;
  fa1[x] = y, sz[y] += sz[x], ok[y] &= ok[x];
}

int main() {
  scanf("%d%d", &N, &M);
  
  for (int i = 1; i <= N; ++i) {
    ok[i] = 1, sz[i] = 1;
    fa1[i] = fa2[i] = i, fa2[i + N] = i + N;
  }
  
  for (int i = 1, u, v; i <= M; ++i) {
    scanf("%d%d", &u, &v);
    merge2(u, v);
    if (u == v || find(u, fa2) == find(v, fa2) || find(u + N, fa2) == find(v + N, fa2)) {
      ok[find(u, fa1)] = 0;
    } else {
      merge1(u, v + N);
      merge1(u + N, v);
    }
  }

  i64 num1 = 0, num2 = 0, num3 = 0;
  
  for (int i = 1; i <= N; ++i) {
    int x = find(i, fa1);
    if (vis[x]) continue;
    
    vis[x] = 1;
    if (sz[x] == 1 && ok[x]) num1++;
    else if (ok[x]) num2++;
    else num3++;
  }

  i64 res = num1 * N * 2 - num1 * num1;
  res += num2 * num2 * 2 + num3 * num2 * 2 + num3 * num3;

  printf("%lld\n", res);
  
  return 0;
}


Measured memory_bytes: 2176
N = int(input())
P = list(map(float, input().split()))
dp = [[0]*(N+1) for _ in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for j in range(N):
        p = P[i]
        dp[i+1][j] += dp[i][j]*(1-p)
        dp[i+1][j+1] += dp[i][j]*p
print(sum(dp[-1][N//2+1:]))

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

int main() {
    ll X; cin >> X;
    vector<ll> a(1000000);
    a[0] = 100;
    for (int i = 1; i < a.size(); i++) {
        a[i] = a[i-1] + a[i-1]/100;
    }
    ll res = 0;
    for (int i = 0; i < a.size(); i++) {
        if (a[i] >= X) {
            res = i;
            break;
        }
    }
    cout << res << endl;
}

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

int main(void){
    int n = 0, k = 0;
//    int *p; 
    long int ans = 0;
    int p[1001];

    scanf("%d%d", &n, &k);

 //   p = (int *)malloc(n * sizeof(int)); 

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

//    std::sort( p.begin(), p.end() );
    sort(p, p + n);

    for(int i = 0; i < k; i++){
        ans += p[i];
    }

    printf("%ld\n", ans);
 //   free(p);

    return 0;

} 


Measured memory_bytes: 3832
#include<stdio.h>
int main()
{
	char s;
	while(scanf("%c",&s) != EOF)
	{
		getchar();
		if(s == 'a') printf("vowel\n");
		else if(s == 'e') printf("vowel\n");
		else if(s == 'i') printf("vowel\n");
		else if(s == 'o') printf("vowel\n");
		else if(s == 'u') printf("vowel\n");
		else 
		{
			printf("consonant\n");
		}
	}
	return 0;
}

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

//repetition
#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)

//container util
#define all(x) (x).begin(),(x).end()

//typedef
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VLL;
typedef vector<VLL> VVLL;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;

//const value
//const ll MOD = 1e9 + 7;
//const int dx[] = {0,1,0,-1};//{0,0,1,1,1,-1,-1,-1};
//const int dy[] = {1,0,-1,0};//{1,-1,0,1,-1,0,1,-1};

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

template <typename T1, typename T2> 
inline bool chmax(T1 &a, T2 b) {
  return a < b && (a = b, true);
}

template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
  return a > b && (a = b, true);
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  rep(i, s.size()) cout << 'x';
  cout << endl;
  return 0;
}


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

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (int i = int(n); i >= 0; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define repic(i, a, b) for (int i = int(a); i <= int(b); i++)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit32(x) (1 << (x))
#define bit64(x) (1ll << (x))

using namespace std;

using i32 = int;
using i64 = long long;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << '\n'; exit(0); }
inline void no() { cout << "No" << '\n'; exit(0); }
inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
inline i64 lcm(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); return a / gcd(a, b) * b; }
template <typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template <typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template <typename T> inline void amax(T &x, T y) { if (x < y) x = y; }
template <typename T> inline void amin(T &x, T y) { if (x > y) x = y; }
template <typename T> inline T exp(T x, i64 n, T e = 1) { T r = e; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template <typename T> istream& operator>>(istream &is, vector<T> &v) { each(x, v) is >> x; return is; }
template <typename T> ostream& operator<<(ostream &os, vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }

void solve() {
  int n;
  cin >> n;
  if (n == 3) {
    vi32 ans = {2, 5, 63};
    cout << ans << endl;
    return;
  }
  vi32 div2, div3, div6;
  reps(i, 30000) {
    if (i % 6 == 0) {
      div6.push_back(i);
    } else if (i % 2 == 0) {
      div2.push_back(i);
    } else if (i % 3 == 0) {
      div3.push_back(i);
    }
  }
  vi32 ans;
  if (n % 2 == 1) {
    ans.push_back(div6[0]);
    n--;
  }
  ans.push_back(div3[0]);
  ans.push_back(div3[1]);
  n -= 2;
  rep(i, min(n, (int) div2.size())) {
    ans.push_back(div2[i]);
  }
  n = max(n - (int) div2.size(), 0);
  repi(i, 2, min(n + 2, (int) div3.size())) {
    ans.push_back(div3[i]);
  }
  n = max(n - (int) div3.size() + 2, 0);
  if (ans[0] == div6[0]) {
    reps(i, n) {
      ans.push_back(div6[i]);
    }
  } else {
    rep(i, n) {
      ans.push_back(div6[i]);
    }
  }
  cout << ans << endl;
}


Measured memory_bytes: 640
import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n * 2];
		for (int i = 0; i < 2 * n; i++) {
		    arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		long total = 0;
		for (int i = 0; i < n; i++) {
		    total += arr[i * 2];
		}
		System.out.println(total);
   }
}


Measured memory_bytes: 21204
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

int main(){
	
	int n;
	
	int a[6];
	
	double d;
	
	cin >> n;
	
	for(int i = 0; i < 6; i++){
		a[i] = 0;
	}
	for(int i = 0; i < n; i++){
		cin >> d;
		if(d < 165){
			a[0]++;
		}else if(d < 170){
			a[1]++;
		}else if(d < 175){
			a[2]++;
		}else if(d < 180){
			a[3]++;
		}else if(d < 185){
			a[4]++;
		}else{
			a[5]++;
		}
	}
	for(int i = 0; i < 6; i++){
		printf("%d:", i + 1);
		for(int j = 0; j < a[i]; j++){
			printf("*");
		}
		printf("\n");
	}
	return 0;
}

Measured memory_bytes: 1220
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    return max(0, A - 2*B)


def main():
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()


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

int main() {
	int X;
	long long N;

	cin >> X;

	for (long long i = 0; i < 120; i++) {
		for (long long j = -70; j < i; j++) {
			N = i*i*i*i*i - j*j*j*j*j;
			if (N == X) {
				//cout << N << endl;
				cout << i << ' ' << j << endl;
				break;
			}
		}
		if (N == X) break;
	}

	return 0;
}


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

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

    string S;
    cin >> S;

    vector<int> l(Q), r(Q);
    for(int i = 0; i < Q; i++)
    {
        cin >> l[i] >> r[i];
    }

    vector<int> X(N, 0);
    for(int i = 1; i < N; i++)
    {
        if(S[i - 1] == 'A' && S[i] == 'C')
        {
            X[i] = X[i - 1] + 1;
        }

        else
        {
            X[i] = X[i - 1];
        }
    }

    for(int i = 0; i < Q; i++)
    {
        int ans = X[r[i] - 1] - X[l[i] - 1];
        cout << ans << endl;
    }
        
    return 0;
}


Measured memory_bytes: 2176
import java.util.ArrayDeque;
import java.util.Scanner;
class Main{
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}
	public static void main(String[]$){
		int n=getInt();
		ArrayDeque<Integer>a=new ArrayDeque<>(),b=new ArrayDeque<>();
		for(int i=0;i<n;++i) {
			int in=getInt();
			a.add(in);
			b.add(in);
		}

		System.out.println(Math.min(fal(a,true),fal(b,false)));
	}
	private static int fal(ArrayDeque<Integer>a,Boolean up){
		long v=up?-1:Long.MAX_VALUE;
		int c=1;
		while(!a.isEmpty()) {
			int poll=a.pollFirst();
			if(up==null) {
				if(v!=poll)
					up=v<poll;
			}else if(!((up&&v<=poll)||((!up)&&v>=poll))) {
				++c;
				up=null;
			}
			v=poll;
		}
		return c;
	}
}

Measured memory_bytes: 50376
from collections import Counter
n = int(input())
V = list(map(int, input().split()))
c1 = Counter(V[::2])
c2 = Counter(V[1::2])
c1[0] = 0
c2[0] = 0
(x, cx), (_, cxx) = c1.most_common(2)
(y, cy), (_, cyy) = c2.most_common(2)
if x == y:
    print(n - max(cx + cyy, cy + cxx))
else:
    print(n - cx - cy)

Measured memory_bytes: 18656