akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define FSP(x) fixed << setprecision(x)
using namespace std;
using ll = long long;
constexpr ll INF = LLONG_MAX;
//constexpr ll P = 1e9 + 7;
//constexpr ll P = 998244353;
constexpr long double PI = acosl(-1);
void Yes() {cout << "Yes\n";}
void No() {cout << "No\n";}
void YES() {cout << "YES\n";}
void NO() {cout << "NO\n";}

struct union_find {
	long long N;					// the number of nodes
	long long M;					// the number of trees
	std::vector<long long> parent;	// parent[i] := the direct parent of i
	std::vector<long long> size;	// size[i] := the number of nodes in the tree containing i

	union_find(long long n) : N(n), M(n) {
		parent.resize(n, -1);
		size.resize(n, 1);
	}

	long long root(long long i) {
		queue<long long> q;
		while (parent[i] != -1) {
			q.push(i);
			i = parent[i];
		}
		while (q.size() > 1) {
			parent[q.front()] = i;
			q.pop();
		}
		return i;
	}

	bool is_united(long long i, long long j) {
		return (root(i) == root(j));
	}

	// true : unite succeeded
	bool unite(long long i, long long j) {
		i = root(i); j = root(j);
		if (i == j) return false;
		if (size[i] < size[j]) std::swap(i, j);
		parent[j] = i;
		size[i] += size[j];
		M--;
		return true;
	}
};

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

	ll n, m;
	cin >> n >> m;
	union_find uf(n);
	while (m--) {
		ll a, b;
		cin >> a >> b;
		uf.unite(a - 1, b - 1);
	}
	ll ans = 0;
	for (auto i : uf.size) ans = max(ans, i);
	cout << ans << endl;
}

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

/* BFSで解く */
int main() {
  int n, x, y;
  std::cin >> n >> x >> y;
  
  /* グラフ */
  std::vector<std::vector<int>> G(n);

  /* 隣接リスト表現 */
  G[x-1].push_back(y-1);
  G[y-1].push_back(x-1);

  for (int i = 0; i < n-1; ++i) {
    G[i].push_back(i+1); // i=>i+1の辺 
    G[i+1].push_back(i); // i+1=>iの辺
  }


  std::vector<int> d(n, 0); // d[i]には距離がiの数を格納
  
  /* 0~n-1のすべての頂点に関してBFSでそこからの最短距離を計算する */
  for (int i = 0; i < n; ++i) {
    std::vector<int> dist(n, -1); // 出発点からの距離と未発見かどうかを管理 -1=>未発見
    std::queue<int> q;        // 訪問予定の頂点を入れる
    
    dist[i] = 0; // 出発点iの距離は0
    q.push(i);  // iを訪問予定にする

    /* qが空になるまで続ける */
    while (!q.empty()) {
      int v = q.front();
      q.pop();

      /* vと隣接する頂点で未訪問の頂点をqに加える */
      for (int nv : G[v]) {
        /* 訪問済みの頂点はskip */
        if (dist[nv] != -1) continue;

        /* 訪問予定の頂点をqに加える */
        dist[nv] = dist[v] + 1;
        q.push(nv);

        /* 距離をカウント */
        d[dist[nv]]++; 
      }
    }
  }

  /* ダブリを削除 */
  for (size_t i = 1; i < d.size(); ++i) 
    d[i] /= 2;
  
  /* 結果表示 */
  for (size_t i = 1; i < d.size(); ++i)
    std::cout << d[i] << std::endl;

  return 0;
}


Measured memory_bytes: 3740
import math

A, B, H, M = map(int, input().split())

ka_a = ((H/12) * 360) + (30*(M/60))
ka_b = M/60 * 360

kakudo = max(ka_a, ka_b) - min(ka_a, ka_b)
kakudo = min(kakudo, (360-kakudo))
cos = math.cos(math.radians(kakudo))

if kakudo==180:
    print(A+B)
    exit()

ans = A**2 + B**2 - 2*A*B*cos

print(math.sqrt(ans))

Measured memory_bytes: 9460
#include <bits/stdc++.h>
#include <math.h>
#include <cmath>
 
using namespace std;
using std::cout;
using ll =long long;
bool is_int_lround(double x){
  return std::lround(x)==x;
}
int ketasuu(int x){
  int n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}
ll gcd11(ll x, ll y){
  long long a= max(x,y), b=min(x,y), c=a%b;
  while( c!=0){
    a =b;
    b =c;
    c = a%b;
  }
  return b;
}

int ab(int x, int y){
  if(x>=y){
    return x-y;
  }
  else if(y>x){
    return y-x;
  }
}
int main(){
  int K;
  cin>>K;
  cout<< (K/2) *(K-K/2)<<endl;
 

}


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

using namespace std;

int main(){
 int n,x;
  cin >> n >> x;
  int a[n];
  for(int i=0;i<n;i++) cin >> a[i];
  
  sort(a,a+n);
  
  int sum=0;
  int res=0;
  for(int i=0;i<n;i++){ sum+=a[i];
   if(sum>x) break;
   else res++;
   }                   
  if(res==n && sum==x)  cout << n << endl;
  else if(res==n && sum<x) cout << n-1 << endl;
  else cout << res << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int n ;
int a[305];
int dp[301][90001];
int g[301][90001];
const int mod = 998244353 ;
int fpow(int a,int b)
{
    int ans = 1;
    while(b) {
        if(b & 1)ans = (1LL * a * ans) %mod;
        a = (1LL*a*a)%mod ; b >>= 1;
    }
    return ans;
}
int main()
{
    scanf("%d",&n) ;
    for(int i = 1;i <= n;i++) {
        scanf("%d",&a[i]) ;
    }
    int s = 0;
    dp[0][0] = fpow(2 , n) ;g[0][0] = 1;
    int rv = fpow(2 , mod - 2);
    for(int i = 1;i <= n;i++) {
        s += a[i] ;
        for(int j = 0;j <= s;j++) {
            dp[i][j] = dp[i - 1][j] ; g[i][j] = g[i - 1][j];
            if(j >= a[i]) {dp[i][j] = (dp[i][j] + 1LL*rv*dp[i - 1][j - a[i]]) % mod;g[i][j] = (g[i][j] + g[i-1][j-a[i]]) % mod;}
        }
    }
    int ans = fpow(3 , n) ;
    for(int j = s/2 + s %2;j <= s;j++) {
        ans = (ans - 3LL*dp[n][j]%mod + mod) % mod;
        if(j*2 == s) ans = (ans + 3LL*g[n][j] + mod) % mod;
    }
    cout << ans << endl;
    return 0;
}


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

#define PI acos(-1)
#define all(a) a.begin(), a.end()
#define full(a, n) a, a + n
#define ma(type, size) (type *)malloc(sizeof(type) * size)
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define MT make_tuple
#define f0(i, n) for (i = 0; i < (n); i++)
#define f1(i, n) for (i = 1; i < (n); i++)
#define f1n(i, n) for (i = 1; i <= (n); i++)
#define fab(i, a, b) for (i = (a); i <= (b); i++)
#define fr(i, b, a) for (i = (b); i >= (a); i--)

using namespace std;

/*
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,
	tree_order_statistics_node_update> indexed_set;
//*/
typedef long long int ll;
typedef long int lo;

typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tll;

//* utility function
inline bool compare(ll i, ll j)
{
    return i < j;
}
//*/

//* function prototypes
template< typename T>
T gcd(T a, T b);
template< typename T>
T modpow(T number, T power, T mod_value);
//*/

//int row, column;
//int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int dy[8] = {0, -1, -1, -1, 0, 1, 1, 1};
//int dx[4] = {1,  0, -1, 0};
//int dy[4] = {0, -1,  0, 1};
//ll p2[63] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904};
#ifdef DEBUG
#endif // DEBUG

int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ll number_of_test_case = 1, test_case;
    //cin >> number_of_test_case;
    for (test_case = 1; test_case <= number_of_test_case; test_case++)
    {
        string s;
        cin >> s;
        sort(all(s));
        if (s == "abc")cout << "Yes\n";
        else cout << "No\n";
    	//cout << "Test #" << test_case << ": ";
    	//cout << "Case " << test_case << ": ";
    }
    return 0;
}


template< typename T>
T gcd(T a, T b)
{
    if (b == 0)
        return a;
    return gcd(b, a%b);
}
template< typename T>
T modpow(T number, T power, T mod_value)
{
    if (power == 0)
        return 1%mod_value;
    ll u = modpow(number,power/2,mod_value);
    u = (u*u)%mod_value;
    if (power%2 == 1)
        u = (u*number)%mod_value;
    return u;
}


Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
int n,k,x;
int mar[200000];
int main() {
    ios_base::sync_with_stdio(0);
    cin >> n >> k;
    for (int i=1;i<=k;i++) {
        cin >> x;
        mar[x]=1;
    }
    for (int i=n;i<=1000000;i++) {
        int x=i;
        int bd=0;
        while (x!=0) {
            if (mar[x%10]==1) bd=1;
            x=x/10;
        }
        if (bd==0) {
            cout << i << "\n";
            break;
        }
    }
    return 0;
}


Measured memory_bytes: 256
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

class Main implements Runnable {
	public static void main(String[] args) {
		new Main().run();
	}

	class State {
		int i;
		int parent;
		int j;// in the next step,go into g[i][j]

		public State(int i_, int parent_, int j_) {
			i = i_;
			parent = parent_;
			j = j_;
		}
	}

	int strongly_connected_componets(ArrayList<Integer>[] g, int[] col) {
		int n = g.length;
		Arrays.fill(col, -1);
		int cols = 0;
		int[] low = new int[n];
		int[] ord = new int[n];
		boolean[] marked = new boolean[n];
		Arrays.fill(low, -1);
		Arrays.fill(ord, -1);
		int order = 0;
		ArrayDeque<State> stk = new ArrayDeque<>();
		ArrayDeque<Integer> pnd = new ArrayDeque<>();
		for (int ii = 0; ii < n; ++ii) {
			if (ord[ii] == -1) {
				stk.add(new State(ii, -1, 0));
			}
			while (!stk.isEmpty()) {
				State s = stk.pollFirst();
				if (ord[s.i] == -1) {
					low[s.i] = (ord[s.i] = order++);
					pnd.addFirst(s.i);
				}
				if (s.j > 0 && s.parent != g[s.i].get(s.j - 1) && !marked[g[s.i].get(s.j - 1)]) {
					if (low[g[s.i].get(s.j - 1)] == -1) {
						throw new AssertionError();
					}
					low[s.i] = Math.min(low[s.i], low[g[s.i].get(s.j - 1)]);
				}
				if (s.j == g[s.i].size() && low[s.i] == ord[s.i]) {
					while (true) {
						int v = pnd.pollFirst();
						col[v] = cols;
						marked[v] = true;
						if (v == s.i)
							break;
					}
					++cols;
					continue;
				}
				if (s.j == g[s.i].size())
					continue;
				int v = g[s.i].get(s.j);
				stk.addFirst(new State(s.i, s.parent, s.j + 1));
				if (ord[v] == -1) {
					stk.addFirst(new State(v, s.i, 0));
				} else if (!marked[v]) {
					low[s.i] = Math.min(low[s.i], low[v]);
				}
			}
		}
		return cols;
	}

	@SuppressWarnings("unchecked")
	public void run() {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		int V = sc.nextInt();
		int E = sc.nextInt();
		ArrayList<Integer>[] g = new ArrayList[V];
		for (int i = 0; i < V; ++i) {
			g[i] = new ArrayList<>();
		}
		for (int i = 0; i < E; ++i) {
			int s = sc.nextInt();
			int t = sc.nextInt();
			g[s].add(t);
		}
		int[] col = new int[V];
		strongly_connected_componets(g, col);
		int q = sc.nextInt();
		while (q-- > 0) {
			int u = sc.nextInt();
			int v = sc.nextInt();
			System.out.println(col[u] == col[v] ? "1" : "0");
		}
	}

	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}

}

Measured memory_bytes: 100196
#include <bits/stdc++.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d%d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y), &(Z))
#define DRI(X) int (X); scanf("%d", &X)
#define DRII(X, Y) int X, Y; scanf("%d%d", &X, &Y)
#define DRIII(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z)
#define RS(X) scanf("%s", (X))
#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define PII pair<int,int>
#define VI vector<int>
#define VL vector<long long>
#define VPII vector<pair<int,int> >
#define PLL pair<long long,long long>
#define VPLL vector<pair<long long,long long> >
#define F first
#define S second
typedef long long LL;
using namespace std;
const int MOD = 1e9+7;
const int SIZE = 1e6+10;
int a[SIZE];
int main(){
    DRI(N);
    REPP(i,1,N+1){
        RI(a[i]);
    }
    int an=0;
    REPP(i,1,N+1){
        if(a[i]==i){
            swap(a[i],a[i+1]);
            an++;
        }
    }
    printf("%d\n",an);
    return 0;
}


Measured memory_bytes: 640
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int64_t n;
    cin >> n;
    vector<int64_t> vs(5);
    for (auto& v : vs)
    {
        cin >> v;
    }
    const int64_t unit = *min_element(vs.begin(), vs.end());
    cout << ((n + unit - 1) / unit + 4) << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll> 
#define P pair<ll,ll>
#define rep(i,n) for(ll (i)=0; (i)<(n); ++(i))
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n,asum=0,bsum=0;cin>>n;
  lvector A(n,0),B(n,0);
  rep(i,n) {cin>>A[i]; asum+=A[i];}
  rep(i,n) {cin>>B[i]; bsum+=B[i];}
  ll sdiff=bsum-asum;
  if(sdiff<0) {print("No"); return 0;}
  else if(sdiff==0) {
    bool isok=true;
    rep(i,n) if(A[i]!=B[i]) {isok=false;break;}
    if(isok) puts("Yes");else puts("No");
  }
  else {
    ll val=0;
    rep(i,n) if(A[i]<B[i]) val+=(B[i]-A[i]+1)/2;
    if(val>sdiff) puts("No");else puts("Yes");
  }
  return 0;
}


Measured memory_bytes: 384
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define max0(a,b,c) max(max(a,b),c)
#define min0(a,b,c) min(min(a,b),c)
#define ft first
#define sc second
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define all(v) (v).begin(),(v).end()
#define mod 1000000007
using namespace std;
using Graph = vector<vector<int>>;
typedef long long lint;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ldouble;
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<ull> ulvec;
typedef vector<double> dvec;
typedef vector<pair<int,int>> pvec;
typedef vector<pair<ll,ll>> plvec;
typedef vector<tuple<ll,ll,ll>> tvec;
typedef vector<string> svec;

int main(){
    int n,x,cnt=0;
    cin>>n>>x;
    vec m(n);
    rep(i,n){
        cin>>m[i];
        cnt+=m[i];
    }
    sort(all(m));
    cout<<n+(x-cnt)/m[0]<<endl;
}

Measured memory_bytes: 256
/************************************************************/
//
//2????????´??°?????????????????????????°?????????????????????????????????°??????
//
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_C&lang=jp
/************************************************************/

#include<stdio.h>

#define MAX 10000
#define MIN 0
#define NUM 3000

int main()
{
	int x,y;
	char c;
	
	for(int i=0; i<NUM; i++)
	{
		if( scanf("%d %d%c", &x, &y, &c)==3 )
		{
			if((x==0) && (y==0))
			{
				break;
			}
			else
			{
				if(x<y)
				{
					printf("%d %d\n", x, y);
				}
				else
				{
					printf("%d %d\n", y, x);
				}
			}
		}
		else
		{
			break;
		}
	}
	
	return 0;
}

Measured memory_bytes: 1736
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)

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

	int cnt = 0, tmp = n;
	while (tmp > 0) {
		cnt += (tmp % 10);
		tmp /= 10;
	}

	if (n%cnt == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

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

int countDistinct(string arr[], int n) 
{ 
    // First sort the array so that all 
    // occurrences become consecutive 
    sort(arr, arr + n); 
  
    // Traverse the sorted array 
    int res = 0; 
    for (int i = 0; i < n; i++) { 
  
        // Move the index ahead while 
        // there are duplicates 
        while (i < n - 1 && arr[i] == arr[i + 1]) 
            i++; 
  
        res++; 
    } 
  
    return res; 
} 
int main(){
    int n;
    cin>>n;
    
    cin.ignore(numeric_limits<streamsize>::max(),'\n'); 
    
    string a[n];
    
    for(int i=0;i<n;i++){
    	getline(cin,a[i]);
	}
    
    cout << countDistinct(a, n); 
    
    
}

Measured memory_bytes: 9840
N = int(input())
data = []
sum = 0
x = 0
y = 1
for i in range(N):
    data.append( list(map(int,input().split())))
for i in range(N):
    for j in range(N):
        if(i==j):
            continue
        sum+=((data[i][x]-data[j][x])**2+(data[i][y]-data[j][y])**2)**0.5

print(sum/N)


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

int main(){
    unsigned long long N;
    cin >> N;
    vector<pair<unsigned long long, unsigned long long>> v;
    for(unsigned long long i = 1; i <= N; ++i)
        for(unsigned long long j = 1; j < i; ++j)
            if(j + i != N + !(N & 1))v.emplace_back(j, i);
    cout << v.size() << endl;
    for(const auto& i : v)cout << i.first << " " << i.second << endl;
}

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

using namespace std;

inline int ctoi(char c) { if(c < '0' || '9' < c) throw invalid_argument("ctoi error"); return c - '0'; }
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define REP(i, k, n) for(int i = (int)(k); i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()

template <typename T>
inline T gcd(T x, T y){
	if (x <= 0 || y <= 0) throw invalid_argument("gcd error: x <= 0 or y <= 0");
	
	if(x < y) swap(x, y);
	T r = x % y;

	while(r != 0){
		x = y;
		y = r;
		r = x % y;
	}

	return y;
}
template <typename T>
inline T lcm(T x, T y){
	if (x <= 0 || y <= 0) throw invalid_argument("lcm error: x <= 0 or y <= 0");

	return x * y / gcd(x, y);
}

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

	rep(i, s.length()){
		if(i % 2 == 0){
			if(s[i] == 'R' || s[i] == 'U' || s[i] == 'D') continue;
			else{
				cout << "No\n";
				return 0;
			}
		}
		else{
			if(s[i] == 'L' || s[i] == 'U' || s[i] == 'D') continue;
			else{
				cout << "No\n";
				return 0;
			}
		}
	}

	cout << "Yes\n";
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N = 305;

int n, m, k;
char a[N][N];
int ans[N][N];

int32_t main()
{
	IOS;
	cin >> n >> m >> k;
	for(int i = 1; i <= n; i++)
		for(int j = 1; j <= m; j++)
			cin >> a[i][j];
	int store = k;
	int c = 1, prvc = 1, color = 0;
	while(c <= m)
	{
		int r = 1;
		int prv = r;
		int cnt = 0;
		for(int cur = r; cur <= n; cur++)
		{
			if(a[cur][c] == '#')
				cnt++;
			if(cnt == 2)
			{
				++color;
				for(int i = prv; i <= cur - 1; i++)
				{
					for(int j = prvc; j <= c; j++)
						ans[i][j] = color;
				}
				prv = cur;
				cnt = 1;
				k--;
			}
		}
		if(cnt == 1)
		{
			++color;
			for(int i = prv; i <= n; i++)
			{
				for(int j = prvc; j <= c; j++)
					ans[i][j] = color;
			}
			k--;
			prvc = c + 1;
		}
		c++;
	}
	for(int i = 1; i <= n; i++)
	{
		for(int j = 1; j <= m; j++)
		{
			if(ans[i][j] == 0)
			{
				ans[i][j] = ans[i][j - 1]?ans[i][j - 1]:store;
			}
			cout << ans[i][j] << " ";
		}
		cout << endl;
	}
	return 0;
}

Measured memory_bytes: 1536
#include <bits/stdc++.h>
#define read(arr,n)	for(int i=0;i<n;i++) cin>>arr[i];
#define print(arr,n) for(int i=0;i<n;i++) cout << arr[i]<<' ';cout << endl;

using namespace std;

typedef long long ll;

void solve() {
	string s;	cin >> s;
	for (auto x: s)	cout << 'x';
	return;
}

int main() {
	int t = 1;
	//cin >> t;
	while (t--) {
		solve();	
	}
	return 0;
}


Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define DEBUG 1
using namespace std;
constexpr int kMod = 1000000007;
typedef long long LL;

int main() {
  int M, K; cin >> M >> K;
  int N = 1;
  for (int i = 0; i < M; ++i) N *= 2;
  if (K >= N) {
    cout << -1 << endl;
    return 0;
  }
  if (M == 1 && K == 1) {
    cout << -1 << endl;
    return 0;
  }

  if (K == 0) {
    for (int i = 0; i < N; ++i) {
      cout << i << " " << i << " ";
    }
    cout << endl;
    return 0;
  }

  for (int i = 0;  i < N; ++i) {
    if (i == K) continue;
    cout << i << " ";
  }
  cout << K << " ";
  for (int i = N - 1;  i >= 0; --i) {
    if (i == K) continue;
    cout << i << " ";
  }
  cout << K << " " << endl;;
}


Measured memory_bytes: 3616
while gets
  n, r = $_.split.map(&:to_i)
  a = gets.split.map(&:to_i)
  deck_a = (n/2...n).to_a
  deck_b = (0...n/2).to_a
  deck_c = Array.new
  r.times do |i|
    deck_c.clear
    c = a.shift
    while !(deck_a.empty? && deck_b.empty?)
      deck_c.concat(deck_a.slice!(0...c))
      deck_c.concat(deck_b.slice!(0...c))
    end
    deck_a = deck_c.slice(n/2...n)
    deck_b = deck_c.slice(0...n/2)
  end
  p deck_c.pop
end

Measured memory_bytes: 9148
#include <stdio.h>
#include <math.h>
int main(void){
  int i,n,t,a,h,p,ans=1,min=999999;
  scanf("%d%d%d",&n,&t,&a);
  for(i=1;i<=n;i++){
    scanf("%d",&h);
    p=abs((t*1000-h*6)-a*1000);
    if(min>p) {ans=i;min=p;}
  }
  printf("%d",ans);
  return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <string>
#include <queue>
#include <utility>
//#include <>
using namespace std;

queue<pair<int, int>>q;
int H, W, ans, bl = 0, cost[51][51];
char s[51][51];

int main() {
    cin >> H >> W;
    for(int i=0; i<H; i++)for(int j=0; j<W; j++){
        cin >> s[i][j];
        cost[i][j] = (1 << 30);
        if(s[i][j] == '#') { cost[i][j] = -1; bl++; }
    }
    cost[0][0] = 1;
    q.push({ 0, 0 });
    while(!q.empty()){
        pair<int, int> top = q.front();
        int i = top.first, j = top.second;
        q.pop();
        if(cost[i][j] == (1 << 30)) continue;
        if(((i) && (cost[i][j] + 1 < cost[i-1][j])) && (cost[i-1][j] != -1)){//up
            cost[i-1][j] = cost[i][j] + 1;
            q.push({ i-1, j });
        }
        if(((i+1 < H) && (cost[i][j] + 1 < cost[i+1][j])) &&  (cost[i+1][j] != -1)){//down
            cost[i+1][j] = cost[i][j] + 1;
            q.push({ i+1, j });
        }
        if(((j) && (cost[i][j] + 1 < cost[i][j-1])) && (cost[i][j-1] != -1)){//left
            cost[i][j-1] = cost[i][j] + 1;
            q.push({ i, j-1 });
        }
        if(((j+1 < W) && (cost[i][j] + 1 < cost[i][j+1])) && (cost[i][j+1] != -1)){//right
            cost[i][j+1] = cost[i][j] + 1;
            q.push({ i, j+1 });
        }
    }
    if(cost[H-1][W-1] == (1 << 30)) ans = -1;
    else ans = H * W - cost[H-1][W-1] - bl;
    cout << ans << endl;
    return 0;
}

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

using ll=long long;
const ll MOD=1e9+7;

ll powm(ll x,ll k){
    ll res=1;
    while(k>0){
        if(k&1) res=(res*x)%MOD;
        k>>=1;
        x=(x*x)%MOD;
    }
    return res;

}
ll modInv(ll x){
    return powm(x,MOD-2);
}
int main(){
    int n,x;
    cin>>n>>x;
    vector<int> s(n);
    for(int i=0;i<n;i++) cin>>s[i];
    sort(s.rbegin(),s.rend());
    
    vector<vector<ll>> dp(n+1,vector<ll>(x+1,0));
    vector<ll> sum(x+1);
    
    
    vector<ll> fact(n+1);
    fact[0]=1;
    for(int i=1;i<=n;i++) fact[i]=(fact[i-1]*i)%MOD;
    vector<ll> facti(n+1);
    for(int i=0;i<=n;i++) facti[i]=modInv(fact[i]);
    dp[0][x]=1;
    sum[x]=fact[n-1];
    for(int i=0;i<n;i++){
        for(int j=0;j<s[i];j++){
            for(int k=0;k*s[i]+j<=x;k++){
                (dp[i+1][j]+=sum[k*s[i]+j]*facti[n-i-1])%=MOD;
            }
        }
        
        if(i==n-1) break;
        for(int j=0;j<s[i] && j<=x;j++){
            (sum[j]+=dp[i+1][j]*fact[n-(i+1)-1])%=MOD;
        }
    }
    
    ll res=0;
    for(int i=0;i<=x;i++) (res+=dp[n][i]*i)%=MOD;
    cout<<res<<endl;
    
    return 0;
}

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

int main() {
  int w, h, x, y;
  cin >> w >> h >> x >> y;
  double ans = (double)w*h/2;
  int num = (w==x*2 && h==y*2) ? 1 : 0;
  printf("%.10f %d\n", ans, num);
  return 0;
}


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

using namespace std;

#define int long long 
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<int, P> Pi;
typedef pair<P, P> PP;

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

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

string s[100000];
int cnt[1 << 5] = {0};

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

    int N;
    cin >> N;
    string MARCH = "MARCH";
    for(int i = 0; i < N; ++i) {
        cin >> s[i];
        for(int j = 0; j < 5; ++j) {
            if(s[i][0] == MARCH[j]) ++cnt[1 << j];
        }
    }
    int res = 0;
    for(int i = 0; i < (1 << 5); ++i) {
        int bit = 0;
        for(int j = 0; j < 5; ++j) {
            if((i >> j) & 1) ++bit;
        }
        if(bit == 3) {
            int tmp = 1;
            for(int j = 0; j < 5; ++j) {
                if((i >> j) & 1) tmp *= cnt[1 << j];
            }
            res += tmp;
        }
    }
    cout << res << endl;
    return 0;
}


Measured memory_bytes: 5760
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

int main() {
  double t, x;
  cin >> t >> x;
  cout << t / x << endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <map>
#include <queue>
#include <functional>
#include <vector>
#include <stack>
#include <set>
#include <bitset>
using namespace std;
typedef  long long ll;
const int maxn=2e5+50;
const int inf=0x3f3f3f3f;
const int MOD=1e9+7;
const int HASH=131;

int a[maxn];
int main()
{
    int n;
    cin>>n;
    ll ans=0;
    for(int i=1;i<=n;i++)
    {
        int tmp;
        scanf("%d",&tmp);
        a[tmp]++;
        ans+=tmp;
    }
    int q;
    cin>>q;
    for(int i=1;i<=q;i++)
    {
        int b,c;
        scanf("%d %d",&b,&c);
        ans=ans-a[b]*b+a[b]*c;
        a[c]+=a[b];
        a[b]=0;
        cout<<ans<<endl;
    }

}


Measured memory_bytes: 3504
#include <iostream>
using namespace std;
int main() {
    int n, i,a[100];
    cin >> n;
    for(i=0; i<n; i++) {
        cin >> a[i];
    }
    for(i=n-1; i>0; i--) {
        cout << a[i] << " ";
    }
    cout << a[0] << endl;
}

Measured memory_bytes: 1160
import java.util.Scanner;

/**
 * Main
 */
public class Main {

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

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int K = sc.nextInt();

        sc.close();

        if(K < A){
            System.out.println(K);
        }
        else if(K <= A + B){
            System.out.println(A);
        }else{
            System.out.println(A-(K-A-B));
        }
    }
}

Measured memory_bytes: 27036
INF = 999999999999999999L
try:
    inFile = open("A.txt")
except:
    inFile = None

def read():
    if inFile:
        return inFile.readline().strip()
    else:
        return raw_input().strip()

def read_ints():
    return map(int,read().split())

s = read()
if s.startswith("YAKI"):
    print "Yes"
else:
    print "No"

Measured memory_bytes: 2568
import sys
input=sys.stdin.readline
import fractions

n,k = map(int, input().split())
a = list(map(int, input().split()))

h = {}
for i in a:
    if i in h:
        h[i] += 1
    else:
        h[i] = 1
h = sorted(h.items(), key=lambda x:x[1])

x = 0
for i in range(len(h)-k):
    x += h[i][1]
print(x)


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

#define F first 
#define S second

using namespace std;

typedef long long LL;
typedef pair<int, int> PII;
typedef priority_queue<int> HI;
typedef priority_queue<int, vector<int>, greater<int> > HDI;

const int N = 100010, M = 2 * N;

int n;
int h[N], w[M], e[M], ne[M], idx;
int color[N];

void add(int a, int b, int c)
{
	e[idx] = b, w[idx] = c, ne[idx] = h[a], h[a] = idx ++ ;
}

void dfs(int u, int fa, int d)
{
	for (int i = h[u]; ~i; i = ne[i])
	{
		int j = e[i];
		if (j == fa) continue;
		
		int td = d + w[i];
		color[j] = td & 1;
		dfs(j, u, td);
	}
}

int main()
{
	memset(h, -1, sizeof h);
	scanf("%d", &n);
	for (int i = 0; i < n; i ++ )
	{
		int a, b, c;
		scanf("%d%d%d", &a, &b, &c);
		add(a, b, c), add(b, a, c);
	}
	
	dfs(1, -1, 0);
	
	for (int i = 1; i <= n; i ++ ) printf("%d\n", color[i]);
    return 0;
}

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

int main() {
	int n;
	cin >> n;
	vector<int> h(n);
	for (int i = 0; i < n; i++) {
		cin >> h.at(i);
	}

	int ans = 0, cnt = 0;
	for (int i = 0; i < n - 1; i++) {
			if (h.at(i) >= h.at(i + 1)) {
				cnt++;
			} else {
				ans = max(ans, cnt);
				cnt = 0;
			}
	}
	ans = max(ans, cnt);
	cout << ans << endl;
}

Measured memory_bytes: 640
#include <iostream>
using namespace std;
int main(void){
    int a,b;
    cin>>a>>b;
    if(a<b){cout<<"a < b"<<endl;
    }
    else if (a>b){cout<<"a > b"<<endl;}
    
    else if(a==b){cout<<"a == b"<<endl;}
    
}



Measured memory_bytes: 3068
# ABC061 B - Counting Roads
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

N,M = nm()
G = [[] for _ in range(N)]

for i in range(M):
    a,b = map(int,input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)

for g in G:
    print(len(g))



Measured memory_bytes: 3060
// g++ temp.cpp
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <cstring>
#include <set>
#include <map>
#include <string>
#include <climits>
using namespace std;

#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define EACH(itr,v) for(auto itr:v)
#define pb(s) push_back(s)
#define mp(a,b) make_pair(a,b)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
const unsigned long long MOD = 100000000000000000;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> PPI;

#define INF INT_MAX/3
#define MAX_N 1000
void solve(){
  int alpha[26]={0};
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    alpha[s[i]-'a']++;
  }
  for(int i=0;i<26;i++){
    if(alpha[i]%2==1){
      cout<<"No"<<endl;
      return;
    }
  }
   cout<<"Yes"<<endl;
}
int main(){
  solve();
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <iomanip>
#include <utility>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>

using namespace std;

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

    return gcd(y%x, x);
}

long long lcm(int x, int y){
    if ( y == 0 ){
        return x;
    }

    return x*y/gcd(x, y);
}

int min(int a, int b){
    return a > b ? b : a;
}

int max(int a, int b){
    return a > b ? a : b;
}

int main()
{
    cin.sync_with_stdio( false );
    int n;
    cin>>n;

    int m[15][15];
    for (int i=0;i<15;i++)
        for (int j=0;j<15;j++)
            m[i][j] = 0;

    for (int i=1;i<=n;i++){
        int a = i % 10;
        int b = i;

        while ( b >= 10 ){
            b/=10;
        }

        m[a][b]++;
    }

    int res = 0;
    for (int i=1;i<=n;i++){
        int a = i % 10;
        int b = i;

        while ( b >= 10 ){
            b/=10;
        }

        res+=m[b][a];
    }

    cout<<res<<endl;
}


Measured memory_bytes: 3600
#include <bits/stdc++.h>   
#define rep(i, n) for(long long int i = 0; i < n; i++)
#define _rep(i, m, n) for(long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll mod = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
     
ll gcd(ll A, ll B){
    if(B == 0)return A;
    return gcd(B, A % B);
}
ll lcm(ll A, ll B){
    return A * B / gcd(A, B);
}
using Graph = vector<vector<int>>;
Graph G;
/*------------------------------------------------------------------*/
int main(){
    int h, w; cin >> h >> w;
    vector<string> a(h);
    rep(i, h) cin >> a[i];
    int count = 0;
    rep(i, h){
        rep(j, w){
            if(a[i][j] == '#') count++;
        }
    }
    if(count == (h + w - 1)) cout << "Possible" << endl;
    else cout << "Impossible" << endl; 
}

Measured memory_bytes: 3616
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


def solve():
    N = Scanner.int()
    A = Scanner.map_int()
    M = [0 for _ in range(N)]
    for a in A:
        M[a - 1] += 1
    print(*M, sep='\n')


def main():
    # sys.stdin = open("sample.txt")
    solve()


if __name__ == "__main__":
    main()


Measured memory_bytes: 34680
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define mod 1000000007
#define string_mod 2549536629329_base_255
#define pb push_back
#define F first
#define S second
#define ff first
#define endl "\n"
#define ss second
#define all(v) v.begin(), v.end()
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
int power(int x, unsigned int y, int p)
{
  int res = 1;
  x = x % p;
  while (y > 0)
  {

    if (y & 1)
      res = (res * x) % p;

    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}

int lcm(int a, int b)
{
  return (a * b) / __gcd(a, b);
}  
int32_t main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tc;
  tc = 1;
  while (tc--)
  {
    int n, k;
    cin >> n >> k;
     if(n==k){
       cout << "Yes" << endl;
     }
     else{
       cout << "No" << endl;
     }
  }

  return 0;
}

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

#define 	pi 				3.1415926536
#define 	mod 			1000000007
#define 	ll  			long long int
#define 	rep(i, a, b) 	for(int i = a ; i < b ; i++)
#define 	mod1 			1000003
#define     mod2            998244353
#define 	hi   			"hello"
#define 	nl 				"\n"
#define 	ws 				" "
#define     sz              size()
#define 	F 				first
#define 	S 				second
#define 	PB 				push_back
#define 	MP				make_pair
#define 	B 				begin()
#define     RB              rbegin()
#define 	E 				end()
#define 	all(v) 			v.begin(), v.end()
#define 	reset(a, val) 	memset(a, val, sizeof(a))
#define 	vi 				vector<int>
#define     pii              pair<int, int>
#define     pll             pair<long long int, long long int>
#define     vll             vector<long long int>
#define 	vs 				vector<string>
#define     vc              vector<char>
#define 	print1(a) 		for(auto i : a)cout<<i<<" ";cout<<"\n"
#define 	print2(a) 		for(auto i : a)cout<<i;cout<<"\n"
#define 	boost 			ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

using namespace std;

//g++ -std=c++14
//fixed<<setprecision(9);
//max_element(mp.begin(), mp.end(), compare)
//greater<int>()
//__builtin_popcount(n)

bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) { return (a.second < b.second); }

bool compare(const pair<string, int>&a, const pair<string, int>&b){ return a.second<b.second; }

unsigned int logn(unsigned int n, unsigned int r) { return (n > r - 1) ? 1 + logn(n / r, r) : 0; }

ll pw[32];

void cal(){ pw[0] = 1; rep(i, 1, 32)pw[i] = 2*pw[i-1]; }


void solve()
{
    double a, b, c, d; cin>>a>>b>>c>>d;
    double s = ceil(c/b), w = ceil(a/d);
    // cout<<s<<ws<<w<<nl;
    cout<<(s>w?"No\n":"Yes\n");
}


int main()
{
    // boost;
    int t = 1, k = 1;
    // cin>>t;
    while(t--){
        // cout<<"Case #"<<k<<": ";
        solve();
        k++;
    }
}

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

#define rep(i, a, b) for (ll i = (a); i < (b); i++)
typedef uint64_t ull;
typedef int64_t ll;
typedef std::pair<ll, ll> PLL;

using namespace std;

signed main() {
  ll n,k;
  string s;
  cin>>n>>k>>s;
  s[k-1] = s[k-1] + 'a' - 'A';
  cout<<s<<endl;
  return 0;
}


Measured memory_bytes: 256
n,m = map(int,input().split())
mod = 1000000007

ans = 1
if n == m:
  for i in range(1,n+1):
    ans = (ans*i)%mod
  for i in range(1,m+1):
    ans = (ans*i)%mod
  ans = (2*ans)%mod
    
elif n-1 == m or m-1 == n:
  for i in range(1,n+1):
    ans = (ans*i)%mod
  for i in range(1,m+1):
    ans = (ans*i)%mod
    
else:
  ans = 0
print(ans)

Measured memory_bytes: 3064
#include<iostream>
#include<cstring>
using namespace std;
char s[101];
int i,k,j;
int main(){
	cin>>s;
	for(i=0;i<strlen(s);i++){
		if(s[i]=='C'){
			for(j=i+1;j<strlen(s);j++){
				if(s[j]=='F'){
                    cout<<"Yes";
                    return 0;
				}
			}
		}
	}
	cout<<"No";
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main(int argc, char const *argv[])
{
    int a, b, c, k;
    scanf("%d %d %d %d", &a, &b, &c, &k);

    if(k <= a) printf("%d\n", k);
    else if(k <= a+b) printf("%d\n", a);
    else printf("%d\n", a-(k-a-b));
    
    return 0;
}

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

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
//	ifstream cin("input.txt");
//	ofstream cout("output.txt");
	
	int n,l,t; cin >> n >> l >> t;
	vector<int> x(n), w(n);
	int aci=-1, cc=0;
	for(int i=0;i<n;i++){
		cin >> x[i] >> w[i];
		if(w[i]==2)
			aci=i;
		else
			cc++;
	}
	
	if(aci==-1 || cc==0){
		for(int i=0;i<n;i++){
			cout << ((x[i]+t*((w[i]==2)?-1:1))%l+l)%l << endl;
		}
		return 0;
	}
	
	
	vector<int> pot(n);
	for(int i=0;i<n;i++){
		if(w[i]==1){
			pot[i]=(1ll*x[i]+2*t)%l;
		}
		else{
			pot[i]=x[i];
		}
	}
	sort(pot.begin(),pot.end());
	
	int tot=2*t, fi=aci;
	long long nc=1ll*cc*(tot/l);
	
	tot%=l;
	
	for(int i=(aci-1+n)%n;i!=aci;i=(i-1+n)%n){
		if(w[i]==1){
			if(tot>=(x[aci]-x[i]+l)%l){
				nc++;
			}
			else{
				break;
			}
		}
	}
	nc%=n;
	while(nc--){
		fi=(fi-1+n)%n;
	}
	
	int st;
	for(int i=0;i<n;i++){
		if(pot[i]==x[aci]){
			st=i;
			break;
		}
	}
	
	vector<int> ans(n);
	for(int i=fi;;){
		ans[i]=pot[st];
		st=(st+1)%n;
		i=(i+1)%n;
		if(i==fi)
			break;
	}
	
	for(auto v:ans){
		cout << ((v-t+l)%l+l)%l << endl;
	}
	
	return 0;
}

Measured memory_bytes: 2816
#include <iostream>
using namespace std;
int main(void){
    int h, m, s, S;
    cin>>S;
    h=S/(60*60);
    m=(S/60)%60;
    s=S%(60);
    cout<<h;
    cout<<":";
    cout<<m;
    cout<<":";
    cout<<s;
    cout<<endl;
}


Measured memory_bytes: 3116
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>

using namespace std;

long gcd(long a, long b){
    if(b == 0) return a;

    return gcd(b, a%b);
}

int main(){
    long a, b;
    cin >> a >> b;
    long ans;
    ans = (a * b)/gcd(a, b);
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define Task "E"

using namespace std;
const int maxN = 5e3 + 5;
int n, dP[maxN][maxN];
string s;

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    cin >> n >> s;
    s = ' ' + s;
    int res = 0;
    for(int i = 1; i<=n; ++i)
        for(int j = i+1; j<=n; ++j){
            if (s[i] == s[j]) dP[i][j] = max(dP[i][j], dP[i-1][j-1] + 1);
            else dP[i][j] = 0;
            dP[i][j] = min(dP[i][j], j-i);
            res = max(res, dP[i][j]);
        }
    cout << res;

    return 0;
}


Measured memory_bytes: 96768
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string a;
  int b=0;
  cin >> a;
  
  for(int i=0; i<3; i++){
    if(a.at(i)=='A') b++;
    else if(a.at(i)=='B') b--;
  }
  
  if(abs(b)<3){
    cout << "Yes" << endl;
  }
  else if(abs(b)==3){
    cout << "No" << endl;
  }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repm(i, m, n) for (int i = m; i < (n); i++)
#define eps (1e-7)
#define inf (1e9)
#define pi (acos(-1))
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

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

    string s;
    cin >> s;

    for (char c = 'a'; c <= 'z'; c++)
    {
        bool isshow = true;
        rep(i, s.size())
        {
            if (c == s[i])
            {
                isshow = false;
                break;
            }
        }
        if (isshow)
        {
            cout << c << endl;
            return 0;
        }
    }

    cout << "None" << endl;

    return 0;
}

Measured memory_bytes: 512
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <complex>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cassert>
#include <iomanip>
using namespace std;

#define Rep(b, e, i) for(int i = b; i <= e; i++)
#define Repr(e, b, i) for(int i = e; i >= b; i--)
#define rep(n, i) Rep(0, n-1, i)
#define repr(n, i) Repr(n-1, 0, i)
#define all(v) (v).begin(), (v).end()
#define pb(v) push_back(v)
#define uniq(v) (v).erase(unique(all(v)),(v).end())
#define bitcnt(x) __builtin_popcount(x)
#define fst first
#define snd second
#define Pqaz(T) priority_queue<T,vector<T>,greater<T>>
#define Pqza(T) priority_queue<T>
#define put(x) cout << x;
#define putsp(x) cout << x << ' ';
#define putbd cout << "---------------------------------------------" << endl;
#define putln(x) cout << x << endl;
#define ENJYU std::ios::sync_with_stdio(false);std::cin.tie(0);

typedef long long ll;
typedef pair<ll, ll> llP;
typedef pair<int, int> intP;
typedef complex<double> comp;
typedef vector <int> vec;
typedef vector <ll> vecll;
typedef vector <double> vecd;
typedef vector <vec> mat;
typedef vector <vecll> matll;
typedef vector <vecd> matd;

//vector の中身を出力
template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

const int MAX = 200020;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<29;
const ll INFL = 1e18;
const int MOD = 1000000007;

int dx4[4]={1,0,-1,0};
int dy4[4]={0,1,0,-1};
int dx8[8]={1,0,-1,1,-1,1,0,-1};
int dy8[8]={1,1,1,0,0,-1,-1,-1};

//********************************template END****************************************//

void solve(void){

	int H, W;
	cin >> H >> W;
	vector <string> input(H), v, w;
	v = w = input;
	rep(H, i)
	{
		cin >> input[i];
	}

	rep(H, i) rep(W, j)
	{
		v[i].pb((i & 1 || j == 0) && j != W-1 ? '#' : '.');
	}

	rep(H, i) rep(W, j)
	{
		w[i].pb((!(i & 1) || j == W-1) && j != 0 ? '#' : '.');
	}

	rep(H, i) rep(W, j)
	{
		if (input[i][j] == '#')
		{
			v[i][j] = '#';
			w[i][j] = '#';
		}
	}


	rep(H, i)
	{
		cout << v[i] << endl;
	}

	putln("");

	rep(H, i)
	{
		cout << w[i] << endl;
	}

}

int main(void){
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Measured memory_bytes: 1536
#include<bits/stdc++.h>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef long  l;
typedef pair<int,int> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
const int INF=1000000001;
const double PI=3.141592653589;
const ll LMAX=1000000000000001;
ll gcd(ll a,ll b){if(a<b)swap(a,b);while((a%b)!=0){a=b;b=a%b;}return b;}
int dx[]={-1,0,1,0};
int dy[]={0,1,0,-1};



int main(){
  string o,e; cin>>o>>e;
  rep(i,o.size()){
    cout<<o[i];
    if(i<e.size())
    cout<<e[i];
  }

  cout<<endl;

  return 0;
}


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


#define rep(i,n) for(int i = 0; i < (n); ++i)


using namespace std;

int main(void){
  int H,W;
  string str[16];
  cin >> H >> W;
  rep(i,H)cin >> str[i];
  rep(i,H)str[i] += '.';
  int h,w;
  h = 0;
  w = 0;


  while(1){
//     rep(i,H+1){
//       rep(j,W+1){
//         if(i == h && w == j){
//           cout << "X";
//         }else{
//           cout << str[i][j];
//         }
//       }
//       cout << endl;
//     }

    if(str[h][w] == '.'){
      cout << "Impossible" << endl;
      return 0;
    }

    str[h][w] = '.';

    if(h == H-1 && w == W-1){
      rep(i,H)rep(j,W){
        if(str[i][j] == '#'){
          cout << "Impossible" << endl;
          return 0;
        }
      }
      cout << "Possible" << endl;
      return 0;
    }
    
    if(str[h][w+1] == '#'){
      w++;
      continue;
    }
    if(str[h+1][w] == '#'){
      h++;
      continue;
    }
    break;
  }
  cout << "Impossible" << endl;
  return 0;
}


Measured memory_bytes: 256
List = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(List[K-1])

Measured memory_bytes: 2940
#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define SZ(a) (int)((a).size())
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef double db;
typedef pair <int, int> Pii;
typedef pair <ll, int> Pli;
typedef unsigned long long ull;
const double eps = 1e-8;
const int mod = (int)(1e9) + 7;
const int inf = 0x7fffffff;
const int N = (int)(2e5) + 7;

ll d, t, s;
bool check() {
    return t * s >= d;
}

int main() {

    // freopen("in.in", "r", stdin);
    scanf("%lld%lld%lld", &d, &t, &s);
    puts(check() ? "Yes" : "No");

    return 0;
}

Measured memory_bytes: 3684
s=str(input())
a=int(s[0:2])
b=int(s[2:4])

if 1<=a<=12:
    if 1<=b<=12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if 1<=b<=12:
        print("YYMM")
    else:
        print("NA")

Measured memory_bytes: 3060