akhauriyash/Code-Regression huggingface dataset:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DKi solver = new DKi();
        solver.solve(1, in, out);
        out.close();
    }

    static class DKi {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int q = in.nextInt();
            Graph g = new Graph(n);
            for (int i = 0; i < n - 1; i++) {
                g.addUnDirectedEdge(in.nextInt() - 1, in.nextInt() - 1);
            }
            for (int i = 0; i < q; i++) {
                g.addCost(in.nextInt() - 1, in.nextInt());
            }

            // 0から順にdfsをする.
            g.dfs(0, g.getCost(0));

            for (int i = 0; i < n; i++) {
                out.println(g.getCost(i));
            }

        }

    }

    static class Graph {
        private int n;
        private ArrayList<Integer>[] adj;
        private int[] cost;
        private boolean[] visited;

        public Graph(int size) {
            n = size;
            cost = new int[n];
            visited = new boolean[n];
            Arrays.fill(visited, false);
            adj = new ArrayList[n];
            for (int i = 0; i < n; i++) {
                adj[i] = new ArrayList<>();
            }
        }

        public void addEdge(int from, int to) {
            adj[from].add(to);
        }

        public void addUnDirectedEdge(int from, int to) {
            addEdge(from, to);
            addEdge(to, from);
        }

        public void addCost(int index, int value) {
            cost[index] += value;
        }

        public void dfs(int index, int cost) {
            if (visited[index]) {
                return;
            }
            visited[index] = true;
            this.cost[index] = cost;
            ArrayList<Integer> nxtAl = adj[index];
            for (int nxt : nxtAl) {
                dfs(nxt, cost + getCost(nxt));
            }
        }

        public int getCost(int i) {
            return cost[i];
        }

    }
}



Measured memory_bytes: 217316
#include<stdio.h>
int main()
{
    int a,i;
    scanf("%d",&a);
    if(a%2!=0)
    {
        i=a/2+1;
        printf("%d\n",i);
    }
    else
    {
        i=a/2;
        printf("%d\n",i);
    }
    return 0;
}


Measured memory_bytes: 128
fun main(args:Array<String>){
    val n = readLine()!!.toInt()
    val list = readLine()!!.split(" ").map { it.toInt() }.toList()
    val set = list.toSet()
    if(list.count() == set.count()) {
        println("YES")
    } else {
        println("NO")
    }
}

Measured memory_bytes: 80892
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<queue>
#include<bitset>
#include<complex>
using namespace std;
template<typename __T>
inline void read(__T &x)
{
    x=0;
    int f=1;char c=getchar();
    while(!isdigit(c)){if(c=='-')	f=-1;c=getchar();}
    while(isdigit(c))	{x=x*10+c-'0';c=getchar();}
    x*=f;
}
int w[100005];
int tot=0;
int dp[200105];
int main()
{
	memset(dp,23,sizeof(dp));
	dp[0]=0;
	int n;
	int gg=9;
	for(;gg<=100000;gg*=9)
		w[tot++]=gg;
	gg=6;
	for(;gg<=100000;gg*=6)
		w[tot++]=gg;
	read(n);
	for(int i=0;i<n;i++)
	{
		dp[i+1]=min(dp[i+1],dp[i]+1);
		for(int j=0;j<tot;j++)
			dp[i+w[j]]=min(dp[i+w[j]],dp[i]+1);
	}
	cout<<dp[n]<<endl;
	return 0;
}

Measured memory_bytes: 1024
void main()
{
    long n = readln.chomp.to!long;

    long total;
    for (long i = 1; i * i < n; ++i)
    {
        if (n % i == 0)
        {
            long d = n / i;
            if (i == n % (d - 1)) total += d - 1;
        }
    }

    total.writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;

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

int main(){
	int h1,h2,m1,m2,s1,s2;

	while( cin >> h1 >> m1 >> s1 >> h2 >> m2 >> s2 ){
		int t = (h2-h1)*60*60 + (m2-m1)*60 + s2-s1;
		int h = t/60/60;
		int m = (t%3600) / 60;
		int s = t%60;
		cout << h << " " << m << " " << s << endl;
	}
}

Measured memory_bytes: 0
#include <stdio.h>
 
int main(void){
  int A,B;
  scanf("%d",&A);
  scanf("%d",&B);
  
  if(B % A == 0){
    printf("%d\n",A + B);
  }
  else {
    printf("%d\n",B - A);
    }
    return 0;
    }

Measured memory_bytes: 128
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include <climits>
#include <iomanip>

using namespace std;

int main()
{
  int N, K;
  long double ans;
  cin >> N >> K;
  int v;
  ans = 0;
  if(N == 1 && K == 1){
    cout << 1.0 << endl;
    return 0;
  }
  for(int i=1; i<=N; ++i){
    if(i == K){
      ans += static_cast<long double>(N-i+1)/static_cast<long double>(N);
      break;
    }
    for(int j=0; j < 18; ++j){
      if((i * (1 << j)) >= K){
        v = j;
        break;
      }
    }
    ans += static_cast<long double>(1.0/(static_cast<long double>(N)*static_cast<long double>(1<<v)));
  }
  cout << fixed << setprecision(15) << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>

using namespace std;

#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(a,x,b) ((a)<=(x)&&(x)<=(b))
#define ALL(v) (v).begin(), (v).end()
#define LENGTHOF(x) (sizeof(x) / sizeof(*(x)))
#define AFILL(a, b) fill((int*)a, (int*)(a + LENGTHOF(a)), b)
#define SQ(x) ((x)*(x))
#define Mod(x, mod) (((x)+(mod)%(mod))
#define MP make_pair
#define PB push_back
#define Fi first
#define Se second
#define INF (1<<29)
#define EPS 1e-10
#define MOD 1000000007

typedef pair<int, int> pi;
typedef pair<int, pi> pii;
typedef vector<int> vi;
typedef queue<int> qi;
typedef long long ll;


int N,M,P;
int d[]={0,1,-1};

int main(){
  while(1){
    cin >> N >> M >> P;
    if(N==0&&M==0&&P==0) break;
    vector<int> G[8][8]; // 0:black 1:white
    rep(i,P){
      int x, y;
      cin >> y >> x; x--; y--;
      G[y][x].push_back(i%2);
      rep(j,N) rep(k,N) rep(l,G[j][k].size()){
	if(G[j][k][l]!=i%2) continue;
	//	cout << "start "<< j << " " << k << " " << l << endl;
	for(int dx=-1;dx<2;dx++) for(int dy=-1;dy<2;dy++) for(int dz=-1;dz<2;dz++){
	      if(dx==0&&dy==0&&dz==0) continue;
	      int ny = j, nx = k, nz = l;
	      int cnt=1;
	      while(1){
		ny += dy, nx += dx, nz += dz;
		if(nx<0||nx>=N||ny<0||ny>=N||nz<0) break;
		if(G[ny][nx].empty()||nz>=G[ny][nx].size()||G[ny][nx][nz]!=(i%2)) break;
		//		cout << ny << " " << nx << " " << nz << endl;
		cnt++;
		//		cout << cnt << endl;
		if(cnt>=M){
		  //		  cout << j << " " << k << " " <<l << endl;;
		  cout << (i%2?"White ":"Black ") << i+1 << endl;
		  while(++i < P){
		    cin >> x >> y;
		  }
		  goto e;
		}
	      }
	    }
      }
    }
    cout << "Draw\n";
  e:;
  }
  return 0;
}

Measured memory_bytes: 1216
import itertools
import math

def kj(k):
  if k==1:
    return 1
  else:
    return k*kj(k-1)
  return 0


n=int(input())

x=[]
y=[]

for i in range(n):
  a,b=map(int,input().split())
  x.append(a)
  y.append(b)

l=[i for i in range(n)]
dis=0

for v in itertools.permutations(l):
  for i in range(n-1):
    d=((x[v[i]]-x[v[i+1]])*(x[v[i]]-x[v[i+1]])) + ((y[v[i]]-y[v[i+1]])*(y[v[i]]-y[v[i+1]]))
    dis+=math.sqrt(d)

print(dis/kj(n))

Measured memory_bytes: 40684
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<time.h>
#include<set>
#include<map>
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define REP(i,a,b) for(int i=a;i>b;i--)
#define vint vector<int> 
#define vvint vector<vint>
#define ct(a) cout<<a<<endl
using namespace std;
typedef long long ll;
const ll INF = 1e17;
const int MOD = 1e9 + 7;

string A;
int n,cnt;
char cur;
bool flag = false;
int mae,ima;

int main(void) {
	
	cin >> A;
	n = A.length();
	FOR(i, 0, n) {
		if (A[i] == '0')cnt++;
		else cnt--;
	}
	ct(n-abs(cnt));


	return 0;
}

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

#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl
#define doublecout(a) cout<<fixed<<setprecision(15)<<a<<endl;
#define Cerr(x) cerr<<(x)<<endl
#define fi first
#define se second
#define P pair<ll,ll> 
#define m_p make_pair
#define V vector<ll> 
#define U_MAP unordered_map<ll,ll>

ll n,cnt,ans,a[ohara],b,c,d,tmp,tmpp,m,h,w,x,y,sum,pos,k;
ld doua;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
//int dy[]={-1,0,1,-1,1,-1,0,1};
//int dx[]={-1,-1,-1,0,0,1,1,1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

//------ 自分を天才だと信じる ------

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

    cin>>n;
    rep(i,n)cin>>a[i];
    a[0]--;
    rrep(i,1,n){
        if(a[i]==a[i-1])continue;
        a[i]--;
    }
    int ok=1;
    rep(i,n-1){
        if(a[i]>a[i+1])ok=0;
    }
    if(ok)Cout("Yes");
    else Cout("No");
    return 0;
}


Measured memory_bytes: 1024
#include <iostream>

using namespace std;

int main()
{
	int k,a,b;
	cin>>k>>a>>b;
	int tf = 0;
	for(size_t i = a; i<b+1; i++)
	{
		if(i%k==0)
		{
			tf = 1;
		}
	}
	if(tf==1)
	{
		cout<<"OK"<<endl;
	}
	else
	{
		cout<<"NG"<<endl;
	}
	return 0;
}

Measured memory_bytes: 3636
#include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define rep(N) for (int i = 0; i < N; ++i)
#define Rep(a, b) for (int i = a; i < b; ++i)
#define For(i, N) for (int i = 0; i < N; ++i)
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()
#define makei(N) int N; cin >> N;
#define makel(N) ll N; cin >> N;
#define makes(s) string s; cin >> s;
#define maked(d) double d; cin >> d;
#define makev(v, N) vi v(N); rep(N)cin >> v[i];
#define mod 1000000007
#define re return 0
#define distance(x1,y1,x2,y2) sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2));

using namespace std;
using ll = long long int;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vs = vector<string>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using msi = map<string, int>;

template<typename T>
void say(T s) {
	cout << s << "\n";
}

template<typename T>
void say(vector<T> s) {
	auto itr = s.begin();
	cout << *(itr++);
	while (itr != s.end()) {
		cout << " " << *(itr++);
	}
	cout << "\n";
}

void yn(bool b) {
	if (b)say("Yes");
	else say("No");
}

void YN(bool b) {
	if (b)say("YES");
	else say("NO");
}

template<typename T>
void maxi(T &a, T b) {
	a = max(a, b);
}

template<typename T>
void mini(T &a, T b) {
	a = min(a, b);
}

void exact_say(double x) {
	cout << setprecision(numeric_limits<double>::max_digits10) << x << endl;
}

int main() {
	makes(s);
	int ans = 10000;
	rep(s.size() - 2) {
		mini(ans, abs(753 - stoi(s.substr(i, 3))));
	}
	say(ans);
}

Measured memory_bytes: 256
#import<bits/stdc++.h>
using namespace std;int i,k=1,p,t,a[2040];string s;main(){for(cin>>s,i=s.size();i--;k=k*10%2019)a[p=(p+k*(s[i]-48))%2019]++;for(t=*a;++i<2019;)t+=a[i]--*a[i]/2;cout<<t;}

Measured memory_bytes: 3720
#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
using namespace std;

int main() {
int A, B, C;
cin >> A >> B >> C;
  if (A == B){
    cout << C << endl;
  }
  else if(B == C){
    cout << A << endl;
  }
  else{
    cout << B << endl;

}
}




Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
  long long n,k,i,ans=0;
  string s;
  cin>>n>>k>>s;
  for(i=1;s[i];i++) {if(s[i]==s[i-1]) ans++;}
  ans+=k*2;
  if(ans>=n) ans=n-1;
  cout<<ans;
}

Measured memory_bytes: 512
#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 = 1e5 + 5;

int32_t main()
{
	IOS;
	int n;
	cin >> n;
	int ans = 0;
	for(int i = 2; i *i <= n; i++)
	{
		if(n % i)
			continue;
		int ct = 0;
		while(n % i == 0)
		{
			n /= i;
			ct++;
		}
		int cur = 1;
		while(cur <= ct)
		{
			ans++;
			ct -= cur;
			cur++;
		}
	}
	if(n > 1)
		ans++;
	cout << ans;
	return 0;
}

Measured memory_bytes: 3652
import math
N,M = list(map(int,input().split()))

if abs(N-M) <= 1:
    if (N+M) % 2 == 0:
        tmp = math.factorial(N) * math.factorial(N)
        pt = 2*tmp
    else:
        tmp = math.factorial(min(N,M)) * math.factorial(min(N,M)+1)
        pt = tmp
else:
    pt = 0

print(pt % 1000000007)


Measured memory_bytes: 5180
#include <iostream>
#include <string>

int main(){
    std::string a, b, c;
    int a_num, b_num;

    // 入力
    std::cin >> a >> b;
    std::cin >> a_num >> b_num;
    std::cin >> c;

    if(a.compare(c) == 0) a_num--;
    else if(b.compare(c) == 0) b_num--; 

    std::cout << a_num << " " << b_num << std::endl;

    return 0;
}

Measured memory_bytes: 256
def can_be_month(n):
    return 1 <= n <= 12


s = input().strip()
f = int(s[:2])
l = int(s[2:])

if can_be_month(f):
    print('AMBIGUOUS' if can_be_month(l) else 'MMYY')
else:
    print('YYMM' if can_be_month(l) else 'NA')

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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	int ans=0;
	for(int i=0;i<n;++i){
		int a; cin>>a;
		ans+=a-1;
	}
	cout<<ans<<"\n"s;
}

Measured memory_bytes: 256
N = input()

N0 = N[0]
N1 = N[1]
N2 = N[2]


if N0 == "7":
    print("Yes")
else:
    if N1 == "7":
        print("Yes")
    else:
        if N2 == "7":
            print("Yes")
        else:
            print("No")


Measured memory_bytes: 9100
#include <stdio.h>
int main(void){
    int a[11]={0};
    int n;
    int i;
    
    while(scanf("%d",&n) != EOF){
        if(n==0){
            printf("%d\n",a[0]);
            for(i=0;i<=10;i++){
                a[i]=a[i+1];
            }
        }
        
        else{
            for(i=10;i>=1;i--){
                a[i]=a[i-1];
            }
            a[0]=n;
        }
    }
    
    return 0;
}

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

int main() {
  int n;
  cin>>n;
  long long x[n], l[n];
  for (int i=0; i<n; i++) cin>>x[i]>>l[i];
  pair<long long, int> right[n];
  for (int i=0; i<n; i++) {
    right[i].first = x[i] + l[i];
    right[i].second = i;
  }
  sort(right, right + n);
  int cnt = 1;
  int prev = 0;
  for (int i=1; i<n; i++) {
    int j = right[i].second;
    if (right[prev].first <= x[j] - l[j]) {
      ++cnt;
      prev = i;
    }
  }
  cout<<cnt<<endl;
}

Measured memory_bytes: 3328
import std.stdio;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.functional;
import std.bigint;
import std.numeric;
import std.array;
import std.math;
import std.range;
import std.container;

void main() {
    int maxN = 10^^6;
    int[] f, f_odd;
    for(int n=1; ;n++) {
        f ~= func(n);
        if (f.back > maxN) break;
        if (f.back%2!=0) f_odd~= f.back;
    }
    int INF = 1<<30;

    int[] ary = new int[maxN+1];
    ary[] = INF;
    ary[0] = 0;
    foreach(int i; 0..maxN) {
        for(int n=0; n<f.length; n++) {
            if (i+f[n]<=maxN) {
                ary[i+f[n]] = min(ary[i+f[n]], ary[i]+1);
            } else {
                break;
            }
        }
    }
    int[] _ary = new int[maxN+1];
    _ary[] = INF;
    _ary[0] = 0;
    foreach(int i; 0..maxN) {
        for(int n=0; n<f_odd.length; n++) {
            if (i+f_odd[n]<=maxN) {
                _ary[i+f_odd[n]] = min(_ary[i+f_odd[n]], _ary[i]+1);
            } else {
                break;
            }
        }
    }

    while(true) {
        int N = readln.chomp.to!int;
        if (N==0) break;
        writeln(ary[N], " ", _ary[N]);
    }
}
int func(int n) {
    return n*(n+1)*(n+2)/6;
}

Measured memory_bytes: 10048
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    s=input()
    len_s=len(s)
    i=0
    cunt_a=0
    ans=0
    while i<len_s:
        if s[i]=='A':  
            cunt_a+=1
        elif i<len_s-1 and s[i:i+2]=="BC" and cunt_a>0:
            ans+=cunt_a
            i+=1
        else:
            cunt_a=0
        i+=1
    print(ans)
if __name__=='__main__':
    main()

Measured memory_bytes: 3500
using System;

class ACBC1124_B
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        string line = Console.ReadLine();
        string result = "";
        for (int i = 0;i < line.Length;i++)
        {
            int c = Convert.ToInt32(line[i]) + n;
            if (c > 90) c -= 26;
            result += (char)c;
        }
        Console.WriteLine(result);
    }
}

Measured memory_bytes: 34772
n, m = map(int, input().split())
h_list = list(map(int, input().split()))
loads = [[0] for i in range(n)]
count = 0
for k in range(m):
    start, end = map(int, input().split())
    loads[start-1].append(h_list[end-1])
    loads[end-1].append(h_list[start-1])

for k in range(n):
    if h_list[k] > max(loads[k]):
        count += 1

print(count)

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

int main(){
    int x,y,z;
    cin >> x >> y >> z;
    cout << z << ' ' << x << ' ' << y;
    return 0;
}

Measured memory_bytes: 256
/* ex2_3
   KKOO  */

#include <stdio.h>

int main(void) {
    int ALL,WHITE;

    //マス目の一辺の入力
    scanf("%d",&ALL);

     //白いマスの入力
    scanf("%d",&WHITE);

    //黒いマスの出力
    printf("%d\n",ALL*ALL-WHITE);

    return 0;
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr double eps = 1e-9;
constexpr ll MOD = 1000000007LL;
template <typename T> bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
};
template <typename T> bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
};
template <typename T> ostream &operator<<(ostream &os, vector<T> v) {
    for (int i = 0; i < v.size(); i++) {
        os << v[i] << (i + 1 == v.size() ? "\n" : " ");
    }
    return os;
}
template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) {
    t = v;
}
template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) {
    for (auto &e : t) {
        fill_v(e, v);
    }
};
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    int n = s.length();
    vector<int> l(n), r(n);
    l[0] = 0, r[n - 1] = n - 1;
    for (int i = 1; i < n; i++) {
        if (s[i] == s[i - 1]) {
            l[i] = l[i - 1];
        } else {
            l[i] = i;
        }
    }
    for (int i = n - 2; i >= 0; i--) {
        if (s[i] == s[i + 1]) {
            r[i] = r[i + 1];
        } else {
            r[i] = i;
        }
    }
    vector<int> ans(n);
    for (int i = 0; i < n; i++) {
        if (s[i] == 'L') {
            if ((i - l[i]) % 2 == 0) {
                ans[l[i]]++;
            } else {
                ans[l[i] - 1]++;
            }
        } else {
            if ((r[i] - i) % 2 == 0) {
                ans[r[i]]++;
            } else {
                ans[r[i] + 1]++;
            }
        }
    }
    cout << ans;
}


Measured memory_bytes: 2256
N = int(input())

import math

ans = [0,0,0]

for h in range(1,3501):
  for n in range(h,3501):
    if (4*n*h-N*n-N*h) > 0:
      if (N*h*n)%(4*n*h-N*n-N*h) == 0 :
        ans = [h,n,(N*h*n)//(4*n*h-N*n-N*h)]
    if ans[0] != 0:
      break
  if ans[0] !=0:
    break

print(" ".join(map(str,ans)))

Measured memory_bytes: 9132
type tree = Nil | Node of int * tree * tree

let create () = Nil

let insert x t =
  let rec doit = function
    | Nil -> Node (x, Nil, Nil)
    | Node (y, l, r) when x < y -> Node (y, doit l, r)
    | Node (y, l, r) -> Node (y, l, doit r)
  in doit t

let preorder f t =
  let rec doit = function
    | Nil -> ()
    | Node (x, l, r) -> (f x; doit l; doit r)
  in doit t

let inorder f t =
  let rec doit = function
    | Nil -> ()
    | Node (x, l, r) -> (doit l; f x; doit r)
  in doit t

let print t =
  let f e = print_string " "; print_int e in
  inorder f t;
  print_newline ();
  preorder f t;
  print_newline ()

let find x t =
  let rec doit = function
    | Nil -> false
    | Node (y, _, _) when x = y -> true
    | Node (y, l, _) when x < y -> doit l
    | Node (_, _, r) -> doit r
  in doit t

let delete x t =
  let rec dudu = function
    | Nil -> exit 1
    | Node (x, Nil, _) -> x
    | Node (_, l, _) -> dudu l
  and wa = function
    | Nil -> exit 1
    | Node (_, Nil, r) -> r
    | Node (x, l, r) -> Node (x, wa l, r)
  and doit = function
    | Nil -> exit 1
    | Node (y, l, r) when x = y ->
      if l = Nil then r
      else if r = Nil then l
      else Node (dudu r, l, wa r)
    | Node (y, l, r) when x < y -> Node (y, doit l, r)
    | Node (y, l, r) -> Node (y, l, doit r)
  in doit t

let split str delim =
  let open String in
  let rec doit s acc =
    match
      try Some (rindex s delim) with _ -> None
    with
    | None -> s :: acc
    | Some i ->
      let s1 = sub s 0 i in
      doit s1 (sub s (i + 1) (length s - length s1 - 1) :: acc)
  in doit str []

let () =
  let m = read_int () in
  let rec read i t =
    if i < m then begin
      match split (read_line ()) ' ' with
      | ["insert"; n] -> read (i + 1) (insert (int_of_string n) t)
      | ["find"; n] -> (print_endline (if find (int_of_string n) t then "yes" else "no"); read (i + 1) t)
      | ["delete"; n] -> read (i + 1) (delete (int_of_string n) t)
      | _ -> (print t; read (i + 1) t)
    end in
  read 0 (create ())

Measured memory_bytes: 25144
#include <iostream>
#include <cstdio>
#include <cmath>
#include <map>

using namespace std;

map < int, int > cmap[2];
int n, maxc[2], res;

int main() {
    cin >> n;
    for (int i = 0; i < n; ++i) {
        int x; scanf("%d", &x);
        if (cmap[i % 2][maxc[i % 2]] < ++cmap[i % 2][x])
            maxc[i % 2] = x;
    }
    res = n;
    for (int i = 1; i <= 1e5; ++i)
        for (int j = 0; j < 2; ++j)
            if (i != maxc[j]) 
                res = min(res, n - cmap[1 - j][i] - cmap[j][maxc[j]]);
    cout << res;
}


Measured memory_bytes: 9600
#include<iostream>
#include<vector>

void scan(std::vector<int>& a){
    for(auto i = 0; i < a.size(); i++){
        std::cin >> a.at(i);
    }
}

int main(){
    int N, ans = 0;
    std::cin >> N;
    std::vector<int> A(N), B(N), C(N - 1);
    scan(A);
    scan(B);
    scan(C);

    for(auto i = 0; i < N - 1; i++){
        ans += B.at(A.at(i) - 1);
        if(A.at(i) == A.at(i + 1) - 1){
            ans += C.at(A.at(i) - 1);
        }
    }
    ans += B.at(A.at(N - 1) - 1);

    std::cout << ans << std::endl;

    return 0;
}


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

int main() {
	int h, w, k;
	cin >> h >> w >> k;

	vector<string> s(h);
	for (int i = 0; i < h; i++) cin >> s[i];

	int ans = 0;
	for (int is = 0; is < 1 << h; ++is) {
		for (int js = 0; js < 1 << w; ++js) {
			int cnt = 0;
			for (int i = 0; i < h; ++i) {
				for (int j = 0; j < w; ++j) {
					if (is >> i & 1) continue;
					if (js >> j & 1) continue;
					if (s[i][j] == '#') cnt++;
				}
			}
			if (cnt == k) ans++;
		}
	}
	cout << ans << endl;
}

Measured memory_bytes: 3608
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#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 <bits/stdc++.h>
#include<queue>
#include <numeric>
using namespace std;
 
//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();}
 
//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
 template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
 
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
 
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define fore(i,a) for(auto &i:a)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
 
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
 
//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
 



int main(){
    long long H;
    cin >> H;
    long long tairyoku=H,res=0,ans=0;
    long long fig=1;
    while(tairyoku>0){
        tairyoku=tairyoku/2;
        ans+=fig;
        fig+=fig;
    }
    cout << ans;
    }

Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1<<30);
const ll INFLL = (1ll<<60);
const ll MOD = (ll)(1e9+7);

#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	a = (a<MOD)?a:(a-MOD);
	b = (b<MOD)?b:(b-MOD);
	a += b;
	a = (a<MOD)?a:(a-MOD);
}

int main(void){
	int a,b,i;
	string s,t;
	cin >> a >> b;
	for(i=0; i<a; ++i){
		s.push_back('0'+b);
	}
	for(i=0; i<b; ++i){
		t.push_back('0'+a);
	}
	cout << min(s,t) << endl;
	return 0;
}


Measured memory_bytes: 256
#include<algorithm>
#include<string.h>
#include<stdio.h>
using namespace std;
#define clr(a) memset(a,0,sizeof(a))
//--Container
//
typedef long long ll;
typedef pair<int,int> pi;

int n,ar[110];

void cl(){
	int i,j,k;scanf("%d",&n);for(clr(ar),i=0;i<n;++i){
		scanf("%d",&j);ar[j]=1;
	}
	for(j=0,i=1;i<=100;j+=ar[i++]);
	printf("%d\n",j);
};

int main(){
	cl();
	return 0;
};

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

int main() {
	string s, t;
	cin >> s >> t;
	for (int i = s.length() - t.length(); i >= 0; i--) {
		string ss = s.substr(i, t.length());//substr(開始位置,取り出す文字列の長さ)
		bool ac = true;
		for (int j = 0; j < t.length(); j++) {
			if (ss.at(j) != t.at(j)) {
				if (ss.at(j) != '?')ac = false;
			}
		}
		if (ac) {
			s = s.substr(0, i) + t + s.substr(i + t.length());
			for (int j = 0; j < s.length(); j++) {
				if (s.at(j) == '?')s.at(j) = 'a';
			}
			cout << s << endl;
			return 0;
		}
	}
	cout << "UNRESTORABLE" << endl;
}


Measured memory_bytes: 256
def F(x): # 0 から xまでの排他的論理和の和
    if x % 2 == 1:
        if (x + 1)  % 4 == 0:
            return 0
        else:
            return 1
    else:
        return F(x-1) ^ x


A,B = list(map(int,input().split(" ")))
print(F(A - 1) ^ F(B))



Measured memory_bytes: 2940
#include <iostream>
#include <set>
#include <queue>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
#include <numeric>
#include <functional>

using namespace std;
#define ALL(x)              (x).begin(),(x).end()
typedef long long           ll;
#define REP(i, n)           for (ll i = 0 ; i < (ll)n ; ++i)
#define REPN(i, m, n)       for (ll i = m ; i < (ll)n ; ++i)
#define INF                 (ll)2e9
#define MOD                 (1000 * 1000 * 1000 + 7)
#define Ceil(x, n)          (((((x))+((n)-1))/n))
#define CeilN(x, n)         (((((x))+((n)-1))/n)*n)
#define FloorN(x, n)        ((x)-(x)%(n))
#define IsOdd(x)            (((x)&0x01UL) == 0x01UL)
#define IsEven(x)           (!IsOdd((x)))
#define M_PI                3.14159265358979323846
typedef pair<ll, ll>	    P;

/*-----------------------------------------------------------------------------
　処理
 -----------------------------------------------------------------------------*/
int main()
{
	ll N;
	cin >> N;
	vector<P> A(N);
	REP(i, N) {
		cin >> A[i].first;
		A[i].second = i;
	}
	sort(ALL(A));
	reverse(ALL(A));

	vector<vector<ll>> dp(N + 1, vector<ll>(N + 1, -INF));
	dp[0][0] = 0;
	REP(i, N) {
		auto one = A[i];
		REP(j, i + 1) {
			ll lLim = j;
			ll rLim = (N - i - 1) + j;
			ll lVal = abs(lLim - one.second) * one.first;
			ll rVal = abs(rLim - one.second) * one.first;
			ll lPos = j;
			ll rPos = i - j;
			ll nowVal = dp[lPos][rPos];
			dp[lPos + 1][rPos] = max(dp[lPos + 1][rPos], nowVal + lVal);
			dp[lPos][rPos + 1] = max(dp[lPos][rPos + 1], nowVal + rVal);
		}
	}
	
	ll ans = 0;
	REP(i, N) {
		ll lPos = i;
		ll rPos = N - i;
		ans = max(ans, dp[lPos][rPos]);
	}

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


Measured memory_bytes: 34672
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>
#include<complex>

using namespace std;

#define ll long long
#define ld long double
#define INF 1e9
#define LINF (ll)INF*INF
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,a,n) for(int i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

#define int ll //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

const double PI=acos(-1);
const double EPS=1e-9; //うまくいかなかったらゆるめる

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef pair<pii,int> ppi;
typedef pair<int,pii> pip;
typedef vector<pii> vp;
typedef vector<vi> vvi;

int gcd(int a, int b){if(b==0) return a;return gcd(b,a%b);}
int lcm(int a, int b){return a/gcd(a,b)*b;}

int f(int a, int b, int x){
    int p = (a*x)/b;
    int q = x/b;
    return p - a*q;
}

signed main(void) {
    int a,b,n;
    cin >> a >> b >> n;
    if(n >= b-1){
        cout << f(a,b,b-1) << endl;
    }else{
        cout << f(a,b,n) << endl;
    }
}


Measured memory_bytes: 3160
#include<stdio.h>
#include<string.h>

int main(){
	int i;
	char str[21],rts[21];

	scanf("%s", str);
	for(i=0; i<strlen(str); i++){
		rts[i] = str[strlen(str)-i-1];
	}
	rts[strlen(str)] = '\0';
	printf("%s\n", rts);
	return 0;
}

Measured memory_bytes: 524
#include<bits/stdc++.h>
using namespace std;
int main(){
    cin.tie(0); ios_base::sync_with_stdio(0);
    int n; cin>>n;
    if(n%1000==0)cout<<0<<'\n';
    else cout<<((n/1000)+1)*1000-n<<'\n';
    return 0;
}

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

#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl
#define Cerr(x) cerr<<(x)<<endl
#define fi first
#define se second

ll n,cnt,ans,a,b,c,d,tmp,tmpp,m,h,w,x,y,sum,pos,k;
ld doua;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
//int dy[]={-1,0,1,-1,1,-1,0,1};
//int dx[]={-1,-1,-1,0,0,1,1,1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

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

    cin>>s;
    if(s[0]!='A')Cout("WA");
    else{
        rrep(i,2,Size(s)-1){
            if(s[i]=='C')cnt++;
        }
        if(cnt!=1)Cout("WA");
        else{
            rrep(i,1,Size(s)){
                if(2<=i&&i<=Size(s)-2&&s[i]=='C')continue;
                for(char c='A';c<='Z';c++){
                    if(s[i]==c){
                        Cout("WA");
                        return 0;
                    }
                }
            }
            Cout("AC");
        }
    }
    return 0;
}


Measured memory_bytes: 256
/**-------------------------
|--------From A.R.A--------|
-------------------------**/

#include <bits/stdc++.h>

#define ll            long long int
#define pb            push_back
#define ull           unsigned long long int
#define endl          "\n"
#define sz(c)         (c).size()
#define sall(c)       sort((c).begin(),(c).end())
#define rsall(c)      sort((c).rbegin(),(c).rend())
#define rev(c)        reverse((c).begin(),(c).end())
#define FOR(i,n)      for(ll i=0;i<n;i++)
#define max3(a,b,c)   max(max(a,b),c)
#define min3(a,b,c)   min(min(a,b),c)
#define input(a,i,n)  for(ll i=0;i<n;i++){      cin>>a[i];}
#define output(a,i,n) for(ll i=0;i<n;i++){cout<<a[i]<<" ";}

using namespace std;
int64_t R=1;
void solution(){
   /*int64_t n,k;
   cin>>n>>k;
   int64_t l=n,sum=0;
   while(l>0){
        sum+=l%10;
        l=l/10;
        if(sum>=k-1) break;
   }
   if(sum<=k-1){
        cout<<"0"<<endl;
   }
   else{

   }*/
}
int main()
{
    /*cin>>R;
    FOR(i,R){solution();}*/
    int64_t n,m,k;
    cin>>n>>m>>k;
    if(m*k>=n){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
    return 0;
}


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

using namespace std;

vector<int> ans;
int findVal(int x) {
    for (int i = 0; i < ans.size(); ++i) if (ans[i] == x) return i;
    return 0;
}
int main() {
    int a, x;
    scanf("%d %d", &a, &x);
    int N = 2 * a - 1;
    for (int i = 0; i <= N; ++i) ans.push_back(i);
    int mid = (N + 1) / 2;
    if (N <= x || x <= 1) {
        puts("No");
        return 0;
    }
    swap(ans[findVal(x)], ans[mid]);
    swap(ans[findVal(x - 1)], ans[mid - 1]);
    swap(ans[findVal(x + 1)], ans[mid + 1]);
    if (x + 2 <= N) {
        swap(ans[findVal(x + 2)], ans[mid - 2]);
    }
    else if (x - 2 > 0) {
        swap(ans[findVal(x - 2)], ans[mid - 2]);
    }

    ans.erase(ans.begin());
#ifdef test
    funct(x_, N, ans);
#endif

    printf("Yes\n");
    for (int a: ans) printf("%d\n", a);


    return 0;
}


Measured memory_bytes: 2420
DELTA = { 'N'=>[0, 1],
          'E'=>[1, 0],
          'S'=>[0, -1],
          'W'=>[-1, 0] }

loop{
  # ???????????´???
  n = readline.to_i
  exit if n == 0

  jewel_map = Array.new(21){ Array.new(21, 0) }
  n.times{
    x, y = readline.split.map(&:to_i)
    jewel_map[y][x] = 1
  }

  # pp jewel_map

  # ??????????????????
  jewel_count = n
  m = readline.to_i
  rx, ry = [10, 10]
  m.times{
    d, l = readline.split
    l.to_i.times{
      rx += DELTA[d][0]
      ry += DELTA[d][1]
      if jewel_map[ry][rx] == 1
        jewel_count -= 1
        jewel_map[ry][rx] = 0
      end
    }
  }
  if jewel_count == 0
    puts "Yes"
  else
    puts "No"
  end
}

Measured memory_bytes: 9068
#include <stdio.h>
#include <math.h>
 
typedef struct{
  double x;
  double y;
}Point;
 
int Ans(Point,Point,int);

int main(){
int n;
  Point p1,p2;
 
  p1.x=0.0;
  p1.y=0.0;
  p2.x=100.0;
  p2.y=0.0;
   
  scanf("%d",&n);
  printf("%f %f\n",p1.x,p1.y);
  Ans(p1,p2,n);
  printf("%f %f\n",p2.x,p2.y);
  return 0;
}
 
 
int Ans(Point p1,Point p2,int n){
  Point a,u,t;
 
  if(n==0)return 0;
 
  a.x=(p2.x-p1.x)/3.0+p1.x;
  a.y=(p2.y-p1.y)/3.0+p1.y;
   
  t.x=2*((p2.x-p1.x)/3.0)+p1.x;
  t.y=2*((p2.y-p1.y)/3.0)+p1.y;
 
  u.x=(t.x-a.x)*(1.0/2.0)-(t.y-a.y)*(sqrt(3.0)/2.0)+a.x;
  u.y=(t.x-a.x)*(sqrt(3.0)/2.0)+(t.y-a.y)*(1.0/2.0)+a.y;
 
  Ans(p1,a,n-1);
  printf("%f %f\n",a.x,a.y);
  Ans(a,u,n-1); 
  printf("%f %f\n",u.x,u.y);
  Ans(u,t,n-1);
  printf("%f %f\n",t.x,t.y);
  Ans(t,p2,n-1);
  
  return 0;
}



Measured memory_bytes: 2112
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <unordered_map>
#include <iterator>
#include <stack>
#include <unordered_set>
#include <iomanip>
#include <ctime>
#include <cstring>
#include <bitset>

#include <random>

#define all(x) (x).begin(), (x).end()
#define allp(x) (x)->begin(), (x)->end()

#define pb push_back


using namespace std;
void dout() { cerr << endl; }
typedef long long ll;
template <typename Head, typename... Tail>
void dout(Head H, Tail... T) {
    cerr << H << ' ';
    dout(T...);
}

#define debug(x) cout << #x " = " << (x) << endl


using ll = long long;
using pii = pair<ll, ll>;
using ld = long double;
using pll = pair<long long, long long>;

template <typename T>
void do_uniq(vector<T> vec){
    sort(all(vec));
    vec.resize(unique(all(vec)) - vec.begin());
}



//#define solvsh
//#define multi

#ifdef solvsh


#else

const int MAXN = 200 + 40;
const int MAXLOG = 20;


vector<int> v[10];

vector<int> t;
int n;

void init (int nn)
{
    n = nn;
    t.assign (n, 0);
}

int sum (int r)
{
    int result = 0;
    for (; r >= 0; r = (r & (r+1)) - 1)
        result += t[r];
    return result;
}

void inc (int i, int delta)
{
    for (; i < n; i = (i | (i+1)))
        t[i] += delta;
}

int sum (int l, int r)
{
    return sum (r) - sum (l-1);
}


void solve() {
    
    int n;
    cin >> n;
    int val = 0;
    
    while (val < n)
        val += 1000;
    
    cout << val - n;

}

#endif

void multisolve() {

    int t;
    cin >> t;

    int i = 1;
    while (t--) {
//        cout << "Case #" << (i++) << ": ";
        solve();
//        cout << "\n";
    }
}


#define int int
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    cout << fixed << setprecision(20);

#ifdef multi
    multisolve();
#else
    solve();
//    gen();
#endif

}

Measured memory_bytes: 3652
s = int(input())
fx = []
fx.append(s)
a = 0
i = 0
while a < 1:
    if fx[i] % 2 ==0:
        fx.append(fx[i]/2)
    else:
        fx.append(fx[i]*3+1)
    i = i+1
    for j in range(i):
        if fx[j] == fx[i]:
            ans = i
            a = 1
print(i+1)

Measured memory_bytes: 3064
#include <stdio.h>

int main(){
    int a,b,c,d,e,k;
    scanf ("%d%d%d%d%d%d", &a,&b,&c,&d,&e, &k);

    if (b-a > k){
        printf (":(\n");
        return 0;
    }
    if (c-a > k){
        printf (":(\n");
        return 0;
    }
    if (d-a > k){
        printf (":(\n");
        return 0;
    }
    if (e-a > k){
        printf (":(\n");
        return 0;
    }
    if (c-b > k){
        printf (":(\n");
        return 0;
    }
    if (d-b > k){
        printf (":(\n");
        return 0;
    }
    if (e-b > k){
        printf (":(\n");
        return 0;
    }
    if (d-c > k){
        printf (":(\n");
        return 0;
    }
    if (e-c > k){
        printf (":(\n");
        return 0;
    }
    if (d-e > k){
        printf (":(\n");
        return 0;
    }
    printf ("Yay!\n");
    
}

Measured memory_bytes: 128
use std::io;
use std::cmp::Ordering;

fn get_line() -> String {
    let mut line = String::new();
    io::stdin().read_line(&mut line).ok();
    line
}

fn main() {
    let line = get_line();
    let v:Vec<_> = line.trim().split(' ').collect();
    let a:i32 = v[0].parse().unwrap();
    let b:i32 = v[1].parse().unwrap();

    match a.cmp(&b) {
        Ordering::Less    => println!("a < b"),
        Ordering::Greater => println!("a > b"),
        Ordering::Equal   => println!("a == b"),
    }
}



Measured memory_bytes: 5028
package main

import "fmt"

func main() {
	var s, t string
	fmt.Scan(&s, &t)
	ans := com(s, t)
	fmt.Println(ans)
}

func com(s, t string) int {
	ans := 0
	for i:=0;i<3;i++ {
		if s[i] == t[i] {
			ans++
		}
	}
	return ans
}


Measured memory_bytes: 512
x,n = map(int, input().split())
if n ==0:
  num =[0]
else:
  num = input().split()
num = [int(x) for x in num]
min_num = min(num)
max_num = max(num)
num_list = list(range(min_num-1, max_num+2))
for de in range (len(num)):
  num_list.remove(num[de])
num_list.append(x)
num_list.sort()
tar = num_list.index(x)
if tar == 0:
  li = x
else:
  li = num_list[tar-1]
if tar == (len(num_list)-1):
  bi = x
else:
  bi = num_list[tar+1]
if x-li ==  bi - x:
  print(li)
elif x-li > bi-x:
  print(bi)
else:
  print(li)

Measured memory_bytes: 9236
#include<bits/stdc++.h>
#include<numeric>
#include <boost/math/common_factor.hpp> 
#define int long long
#define ld long double
#define all(x) x.begin(),x.end()
const int maxn=1000000;
#define what_is(x) cerr << #x << " is " << x << endl;
const int MOD = 1e9 + 7;
using namespace std;
string abc="abcdefghijklmnopqrstuvwxyz";
int powmod(int a, int b, int MOD = MOD){
    if(!a and !b)    return 1ll;
    if(!a)    return a;
    int res = 1ll;
    b %= (MOD - 1ll), a %= MOD;
    while(b){
        if(b%2 == 1)    res = (res * a) % MOD;
        a = (a * a) % MOD;
        b /= 2;
    }
    return res;
}
int popcount(uint32_t n)
{
    n = n - ((n >> 1) & 0x55555555);
    n = (n & 0x33333333) + ((n >> 2) & 0x33333333);
    return ((n + (n >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
}
bool check(int n) {return (((double)sqrt(n)-floor((double)sqrt(n)))==0);}
vector<bool> sieve(maxn + 1, true);
void fillprime() {
    sieve[0] = sieve[1] = false;
    for (int i = 2; i <= maxn; ++i) {
        if (sieve[i] && (int) i * i <= maxn) {
            for (int j = i * i; j <= maxn; j += i) {
                sieve[j] = false;
            }
        }
    }
}
const int nn=1e5+5;
void solve() {
       int a,b;
       cin>>a>>b;
       cout<<boost::math::lcm(a,b);
       
    
}
int32_t main() {
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    //fillprime();
    //int t;cin>>t;while(t--)
    solve();
}

Measured memory_bytes: 3784
#include <iostream>
#include <string>

using namespace std;

int main(){
  string map1[50];
  string map2[50];
  int M,N;
  cin >> N >> M;
  for(int i=0;i<N;i++){
    cin >> map1[i];
  }
  for(int i=0;i<M;i++){
    cin >> map2[i];
  }
  for(int i=0;i<=N-M;i++)
  {
    for(int j=0;j<=N-M;j++)
    {
      for(int k=0;k<M;k++)
      {
        for(int l=0;l<M;l++)
        {
          if(map1[i+l][j+k]!=map2[l][k])
          {
            goto A;
          }
        }
      }
      goto end;
A:;
    }
  }
  cout << "No"<<endl;
  return 0;
end:
  cout << "Yes" <<endl;
  return 0;
}


Measured memory_bytes: 256
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)

func main() {
	X := getStdinIntArr64()[0]

	var a int64
	var b int64
	for a = 0; a < 1000; a++ {
		for b = -1000; b < a; b++ {
			if a*a*a*a*a-b*b*b*b*b == X {
				fmt.Printf("%d %d", a, b)
				return
			}
		}
	}
}

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}

func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}

func readLine() string {
	buf := make([]byte, 0, 1024*1024*10)
	for {
		l, p, e := sc.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}


Measured memory_bytes: 2504
#include <stdio.h>
#define N 100000
struct Card
{
  char suit;
  int value;
  int key;
};

struct Card A[N];

int Partition(int p,int r)
{
  int x,i,j;
  struct Card tmp;
  x = A[r].value;
  i =p - 1;

  for(j=p;j<=r-1;j++){
    if(A[j].value <= x){
      i++;
      tmp = A[i];
      A[i] = A[j];
      A[j] = tmp;
    }
  }

  tmp = A[i+1];
  A[i+1] = A[r];
  A[r] = tmp;
  return i+1;
}

void Quicksort(int p,int r){
  int q;
  if(p<r){
    q = Partition(p,r);
    Quicksort(p,q-1);
    Quicksort(q+1,r);
  }
}

int main(){
  int n,i;
  char c;
  scanf("%d%c",&n,&c);
  for(i=1;i<=n;i++){
    scanf("%c%c%d%c",&A[i].suit,&c,&A[i].value,&c);
    A[i].key = i;
  }

  Partition(1,n);
  Quicksort(1,n);

  for(i=1;i<=n;i++){
    if(A[i].value == A[i+1].value&&A[i].key > A[i+1].key){
      printf("Not stable\n");
      break;
    }
  }

  if(i == n+1){
    printf("Stable\n");
  }
  for(i=1;i<=n;i++){
    printf("%c %d\n",A[i].suit,A[i].value);
  }
  return 0;
}

Measured memory_bytes: 1780
import java.util.*;
import java.lang.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long xa = xorsum(Math.max(a - 1, 0));
		long xb = xorsum(b);
		System.out.println(xa ^ xb);
	}
	static long xorsum(long n) {
		if (n % 2 == 0 && n / 2 % 2 == 0) {
			return n;
		} else if (n % 2 == 0 && n / 2 % 2 != 0) {
			return n + 1;
		} else if (n % 2 != 0 && n / 2 % 2 == 0) {
			return 1;
		} else {
			return 0;
		}
	}
}

Measured memory_bytes: 23892
#define _GLIBCXX_DEBUG//TLEの原因になるので注意！！！！！！！！！！！
#include<cmath>
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int,int> > qu2;
priority_queue<int> pq;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define rep2(i,n) for(int i=1; i<=(int)(n); i++)
#define mins(x,y) x=min(x,y)
#define maxs(x,y) x=max(x,y)
typedef set<int> set_t;
typedef set<string> set_g;
typedef complex<double> xy_t;
static const int NIL = -1;
static const int INF = 1000000007;
#define mp make_pair
#define sz(x) int(x.xise())
#define mod 1000000007
#define reps(i,s,n) for(int i = s; i < n; i++)
//#define int long long

//cerrはコメントアウトしなくても通る//ただしTLEを引き起こすことがある

int main(){
    int n;
    cin >> n;
    rep2(i,9){
        if(n%i==0){
            if(0<n/i&&n/i<10){
                cout<<"Yes"<<endl;
                return 0;
            }
        }
    }
    cout<<"No"<<endl;
    return 0;
}

Measured memory_bytes: 256