akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
using namespace std;

#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}
#define pq_pair_tB priority_queue <pair<ll,ll>, vector<pair<ll,ll> > , greater<pair<ll,ll> > >
#define pq_pair_ts priority_queue <pair<ll,ll> > //第二成分の大きさが関係ない
template<typename X> bool exist(vector<X> vec, X item){return find(all(vec), item)!=vec.end();}
ll gcd(ll a, ll b){if(b==0)return a;return gcd(b,a%b);}
ll lcm(ll a, ll b){return a/gcd(a,b)*b;}


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

	ll A, B ;
	cin >> A >> B ;

	cout << A  +  B/2 << endl;

	//cout << fixed << setprecision(16) << ans << endl;
	return 0;
}


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

int a[1024];

int main()
{
	int n,m;
	while(cin >> n >> m, n||m)
	{
		queue<int> q;
		for(int i=0; i<n; i++) q.push(i+1);


		for(int i=1; q.size()!=1; i++)
		{
			int t=q.front(); q.pop();

			if(i%m!=0)
			{
				q.push(t);
			}
		}
		cout << q.front() << endl;;
	}
}

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

#define ef(e, a, b) ((e) ? (a) : (b))

using namespace std;

int main ( void )
{
	int n, m;
	
	vector<int> x;

	while ( cin >> n >> m, (n | m) )
	{
		vector<int> v(n);
		int ans = 0;
		
		for (int i = 0; i < n; ++i)
		{
			cin >> v[i];
		}
		
		for (int i = 0; i < n; ++i)
			for (int j = i; j < n; ++j)
			{
				v.push_back(v[i] + v[j]);
			}
			
		sort(v.begin(), v.end());
		
		for (int i = 0, sz = v.size(); i < sz; ++i)
		{
			if (v[i] > m) break;
			
			int t = m - v[i];
			
			vector<int>::iterator it = lower_bound(v.begin(), v.end(), t);
			if (t >= *it)
			{
				ans = max(ans, v[i] + *it);
			}
			else
			{
				--it;
				ans = max(ans, v[i] + *it);
			}
		}
		cout << ans << endl;
	}
	return 0;
}

Measured memory_bytes: 5032
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
      int X = nextInt();
      X -= nextInt();
      myout(X % nextInt());
	}
	//Method addition frame start



	//Method addition frame end
}


Measured memory_bytes: 33004
#include <cstdio>
#include <algorithm>

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

using namespace std;

int a, b;

int correct(int x){
  return x != 1 ? x : 14;
}

int main(){
  scanf("%d%d", &a, &b);
  a = correct(a);
  b = correct(b);
  if(a == b){
    puts("Draw");
  }
  else{
    printf("%s\n", a > b ? "Alice" : "Bob");
  }
  return 0;
}

Measured memory_bytes: 128
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <algorithm>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
const int mod= 1e+9+7;


int main(){
    ll n,c,k;cin>>n>>c>>k;
    vector<vector<ll>>t(n,vector<ll>(2));
    rep(i,n){
        cin>>t[i][0];
        t[i][1]=t[i][0]+k;
    }
    sort(t.begin(),t.end());
    ll l=0,r=mod;
    ll cnt=0,ans=0;
    rep(i,n){
            l=max(l,t[i][0]);r=min(r,t[i][1]);
            if(l>r){
                ans++;
                cnt=1;
                l=t[i][0];r=t[i][1];
            }
            else if(cnt==c-1){
                 ans++;
                cnt=0;
                l=0,r=mod;
            }
            else cnt++;
        }
    if(cnt!=0)ans++;
    cout<<ans<<endl;

}








Measured memory_bytes: 5760
#include<stdio.h>
#include<math.h>
typedef struct endPoint{
  double x;
  double y;
}endpoint;
void knock(int,endpoint,endpoint);
int main(){
  int n;
  endpoint p1,p2;
  p1.x=0.0;
  p1.y=0.0;
  p2.x=100.0;
  p2.y=0.0;

  scanf("%d",&n);
  printf("%.8f %.8f\n",p1.x,p1.y);
  knock(n, p1, p2);
  printf("%.8f %.8f\n",p2.x,p2.y);
  return 0;
}
void knock(int n,endpoint p1,endpoint p2){
  endpoint s,l,u;
  if(n==0)
    return ;

  s.x =(2*p1.x+1*p2.x)/3.0;
  s.y =(2*p1.y+1*p2.y)/3.0;
  l.x =(1*p1.x+2*p2.x)/3.0;
  l.y =(1*p1.y+2*p2.y)/3.0;
  u.x=(l.x-s.x)*cos(M_PI/3)-(l.y-s.y)*sin(M_PI/3)+s.x;
  u.y=(l.x-s.x)*sin(M_PI/3)+(l.y-s.y)*cos(M_PI/3)+s.y;

  knock(n-1,p1,s);
  printf("%.8f %.8f\n",s.x, s.y);
  knock(n-1,s,u);
  printf("%.8f %.8f\n",u.x, u.y); 
  knock(n-1,u,l);
  printf("%.8f %.8f\n",l.x, l.y);
  knock(n-1,l,p2);
}

Measured memory_bytes: 640
from itertools import combinations, chain

def eval_str(string):
    s = string.split("+")
    return int(reduce(lambda x,y: int(x)+int(y), s))

mystr = raw_input()
allsubsets = lambda n: list(chain(*[combinations(range(1,n), ni) for ni in range(n+1)]))
l = allsubsets(len(mystr))
#for i in xrange(len(l)):
#    l[i] = list(l[i])
mylist = []
#print l
for x in l:
    s = ""
    prev = 0
    for y in x:
        s += mystr[prev:int(y)]
        s += "+"
        prev = int(y)
    s += mystr[prev:]
    mylist.append(s)
#print mylist
tot = 0
for x in mylist:
    tot += eval_str(x)
print tot

Measured memory_bytes: 2820
using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;

namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve(new ConsoleInput(Console.In, ' '));
        }

        public void Solve(ConsoleInput cin)
        {
            int N = cin.ReadInt;
            int M = cin.ReadInt;

            if ( M == N)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }

        }
    }

    public class ConsoleInput
    {
        private readonly System.IO.TextReader _stream;
        private char _separator = ' ';
        private Queue<string> inputStream;
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
            inputStream = new Queue<string>();
        }
        public string Read
        {
            get
            {
                if (inputStream.Count != 0) return inputStream.Dequeue();
                string[] tmp = _stream.ReadLine().Split(_separator);
                for (int i = 0; i < tmp.Length; ++i)
                    inputStream.Enqueue(tmp[i]);
                return inputStream.Dequeue();
            }
        }
        public string ReadLine { get { return _stream.ReadLine(); }}
        public int ReadInt { get { return int.Parse(Read); }}
        public long ReadLong { get { return long.Parse(Read); }}
        public double ReadDouble { get { return double.Parse(Read); }}
        public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret;}
        public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret;}
        public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret;}
    }
}

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

#define mod 1000000007
#define all(x) (x).begin(), (x).end()
#define pb push_back

const long double PI = acos(-1);
 
ll gcd(ll a,ll b){return b ? gcd(b,a%b) : a;}
ll lcm(ll a,ll b){return a / gcd(a,b) * b;}
ll GetDigit(ll num) {return log10(num)+1;}

int main(){
    ll n, k;
    cin >> n >> k;
    vector<pair<ll, ll>> p(n);
    for(ll i = 0; i < n; i++){
        ll a, b;
        cin >> a >> b;
        p[i] = make_pair(a, b);
    }
    sort(all(p));
    ll cnt = 0;
    for(ll i = 0; i < n; i++){
        cnt += p[i].second;
        if(cnt >= k){
            cout << p[i].first << endl;
            return 0;
        }
    }
    return 0;
}

Measured memory_bytes: 1792
using System;

namespace abc098A
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split();
            int A = int.Parse(str[0]);
            int B = int.Parse(str[1]);
            int Sum = A + B;
            int C = A - B;
            int D = A * B;
            if (Sum < C)
                Sum = C;
            if (Sum < D)
                Sum = D;
            Console.WriteLine(Sum);
        }
    }
}


Measured memory_bytes: 11092
/*
 AUTHOR : ANSHU BABU RAJPUT
 
    JAI MAA SARASWATI
    OM NAMAH SHIVAY
    JAI SHRI KRISHNA
    JAI SHRI RAM
    BHARAT MATA KI JAI

    #PKMKB	
    #CKMKB
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define int  long long 
#define endl    ("\n")
#define ff       first
#define ss      second
#define pb   push_back
#define pf  push_front
#define ppb   pop_back
#define ppf  pop_front
#define mp   make_pair
#define mod 1000000007

#define L(x)    x.length()
#define B(x)     x.begin()
#define E(x)       x.end()
#define F(x)     x.front()
#define SZ(x)     x.size()
#define CLR(x)   x.clear()

#define all(x)                      x.begin(),x.end()
#define sortD(x) sort(x.begin(),x.end(),greater<int>)
#define rev(x)             reverse(x.begin(),x.end())

#define intV vector<int>

#define PI          (3.141592653589)
#define PMAX     priority_queue<int>
#define PMIN             priority_queue<int,vi,greater<int>>
#define setbits(x)                   __builtin_popcountll(x)
#define zrobits(x)                        __builtin_ctzll(x)

#define KING(i, n) for (int(i) = 0; (i) < n; (i)++)
#define MAHAKAL(i, n) for (int(i) = n-1; (i) >= 0; (i)--)

#define Anshu        int t; cin>>t; while(t--)
#define SITARAM(n,type) type* input=new type[n]

mt19937                          rng(chrono::steady_clock::now().time_since_epoch().count());
 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;


void ViLiFY_KiNG()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt","w",stderr);
#endif
}
 
int32_t main()
{
    ViLiFY_KiNG();
    int a; cin>>a;
  	string b; cin>>b;
  	int c = 100*(b[0]-'0')+10*(b[2]-'0')+(b[3]-'0');
  	int ans = a*c;
  	ans = ans/100;
  	cout<<ans;
    return 0;
}

Measured memory_bytes: 3644
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <vector>
#include <iterator>
#include <algorithm>

using namespace std;

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

	char C = S[0];
	uint16_t flag = 0;
	for (int i = 1; i < S.size(); ++i){
		if(C == S[i]){
			flag = 1;
			break;
		}
		C = S[i];
	}
	if(flag)
		cout << "Bad" << endl;
	else
		cout << "Good" << endl;

	return 0;
}



Measured memory_bytes: 256
fn solve() {
    let s = std::io::stdin();
    let mut sc = Scanner { stdin: s.lock() };
    let x = vec![
        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,
    ];
    let k: usize = sc.read();
    println!("{}", x[k - 1]);
}

fn main() {
    std::thread::Builder::new()
        .stack_size(64 * 1024 * 1024) // 64MB
        .spawn(|| solve())
        .unwrap()
        .join()
        .unwrap();
}
pub mod utils {
    const DYX: [(isize, isize); 8] = [
        (0, 1),   //right
        (1, 0),   //down
        (0, -1),  //left
        (-1, 0),  //top
        (1, 1),   //down right
        (-1, 1),  //top right
        (1, -1),  //down left
        (-1, -1), //top left
    ];

    pub fn try_adj(y: usize, x: usize, dir: usize, h: usize, w: usize) -> Option<(usize, usize)> {
        let ny = y as isize + DYX[dir].0;
        let nx = x as isize + DYX[dir].1;
        if ny >= 0 && nx >= 0 {
            let ny = ny as usize;
            let nx = nx as usize;
            if ny < h && nx < w {
                Some((ny, nx))
            } else {
                None
            }
        } else {
            None
        }
    }
}

//snippet from kenkoooo
pub struct Scanner<R> {
    stdin: R,
}

impl<R: std::io::Read> Scanner<R> {
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .stdin
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn read_line(&mut self) -> String {
        use std::io::Read;
        let buf = self
            .stdin
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b'\n' || b == b'\r')
            .take_while(|&b| b != b'\n' && b != b'\r')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }

    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}


Measured memory_bytes: 8572
#include <bits/stdc++.h>
using namespace std;
 
int main(){
 
  int N;
  cin >> N;
  long X[N],L[N],s[N],t[N];
  for(int i=0; i<N; i++){
    cin >> X[i]>>L[i];
    s[i]=X[i]-L[i]; t[i]=X[i]+L[i];
  }
  
  pair<long, long> itv[N];
  
  for(int i=0; i<N; i++){
  	itv[i].first=t[i];
    itv[i].second=s[i];
  }
  sort(itv, itv+N);
  
  int ans=0,T=-1000010000;
  for(int i=0; i<N; i++){
  	if(T<=itv[i].second){
    	ans++;
      T=itv[i].first;
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 4992
#include<bits/stdc++.h> 
//compiling code: g++ test.cpp(file) -o script(output) -std=c++11(version) -O2(make it 2x faster)
using namespace std;

int main(){
    int A;
    int B;
    int C;

    cin >> A;
    cin >> B;
    cin >> C;

    if (C + B == A){
        cout << 0;
    } else if (C + B > A){
        cout << C + B - A;
    } else if (C + B < A){
        cout << 0;
    } 

    return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	    // input A B C
        // A = B not C || A = C not B || B = C not A
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        String retStr = "No";
        if(a == b){
            if(a == c){
            } else {
                retStr = "Yes";
            }
        } else {
            if(a == c || b == c){
                retStr = "Yes";
            }
        }
        System.out.println(retStr);
    }
}


Measured memory_bytes: 23252
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#pragma comment(linker, "/STACK:16777216")
#pragma warning( disable : 6031)
#include <climits>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <iostream>
#include <map>
#include <stack>
#include <set>
#include <queue>
#include <numeric>
#include <algorithm>
#include <utility>
#include <bitset>
#include <cmath>
#include <sstream>
#include <functional>
#include <iomanip>
#include <limits>

#define all(a) (a).begin(),(a).end()
#define sz(a) (int)(a).size()
#define eps (1e-9)
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector< vi > vvi;
typedef vector<double> vd;
typedef vector< vd > vvd;
typedef vector< string > vs;
typedef pair< int, int > pii;
typedef vector< pii > vpii;
typedef tuple<int, int, int> tiii;


int main()
{
#ifdef LOCAL_MACHINE
	freopen("input.txt", "rt", stdin);
	freopen("output.txt", "wt", stdout);
#endif
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	string s;
	cin >> s;
	vector<string> weather = { "Sunny", "Cloudy", "Rainy" };
	for (int i = 0; i < sz(weather); i++)
		if (weather[i] == s)
		{
			cout << weather[(i + 1) % sz(weather)];
			return 0;
		}
	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
   
using namespace std;
  
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define Fixed fixed << setprecision(14)
#define int int64_t
using pii = pair<int,int>;
constexpr int INF  = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod1 = 1e9+7; 
constexpr int mod2 = 998244353;
 
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
 
template <class T> using min_heap = priority_queue<T,vector<T>,greater<T> >;
template <class T> using max_heap = priority_queue<T>;
template <class A,class B> using umap = unordered_map<A,B>;
   
int gcd(int a,int b){ return b ? gcd(b,a % b) : a;}
int lcm(int a,int b){ return a / gcd(a,b) * b;}

signed main(void){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);

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

  vector<int> h(n);
  rep(i,n){
    cin >> h[i];
  }
  sort(all(h));

  int minv = INF;

  for(int i = 0; i + k <= n; ++i){
    chmin(minv,abs(h[i+k-1]-h[i]));
  }

  cout << minv << '\n';

  return 0;
}

Measured memory_bytes: 1024
#include<cstdio>
#include<algorithm>
int main(){
	int n;
	scanf("%d",&n);
	int dp[100001]={};
	for(int i=0;i<=100000;i++){
		dp[i]=i;
	}
	for(int i=0;i<=100000;i++){
		int p=1;
		for(int j=1;true;j++){
			if(i+p>100000)break;
			else dp[i+p]=std::min(dp[i+p],dp[i]+1);
			p=6*p;
		}
		p=1;
		for(int j=1;true;j++){
			if(i+p>100000)break;
			else dp[i+p]=std::min(dp[i+p],dp[i]+1);
			p=9*p;
		}
	}
	printf("%d\n",dp[n]);
	return 0;
}
	

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

char T[27] = "abcdefghijklmnopqrstuvwxyz";

string S, V;
int n;
int x[26];

int main() {
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		S = "";
		while (S == "") {
			getline(cin, S);
		}
		for (int j = 0; j < 26; j++)
		{
			for (int k = 0; k < 26; k++)
			{
				for (int l = 0; l < 26; l++)
				{
					x[l] = -1;
				}
				for (int l = 0; l < 26; l++)
				{
					if (x[(j*l + k) % 26] == -1)
					{
						x[(j*l + k) % 26] = l;
					}
					else
					{
						goto E;
					}
				}
				V = "";
				for (int l = 0; l < S.size(); l++)
				{
					for (int m = 0; m < 26; m++)
					{
						if (T[m] == S[l])
						{
							V += T[x[m]];
							goto G;
						}
					}
					V += S[l];
				G:;
				}
				for (int i = 0; i < S.size() - 3; i++)
				{
					if (V.substr(i, 4) == "this" || V.substr(i, 4) == "that")
					{
						cout << V << endl;
						goto H;
					}
				}
			E:;
			}
		}
	H:;
	}
	return 0;
}

Measured memory_bytes: 1220
import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		UnionFindTree uft = new UnionFindTree(n);
		for (int i = 0; i < m; i++) {
		    int left = sc.nextInt() - 1;
		    int right = sc.nextInt() - 1;
		    int dist = sc.nextInt();
		    if (uft.same(left, right)) {
		        if (uft.getDist(left, right) != dist) {
		            System.out.println("No");
		            return;
		        }
		    } else {
		        uft.unite(left, right, dist);
		    }
		}
		System.out.println("Yes");
    }
    
    static class UnionFindTree {
        int[] parents;
        int[] dists;
        
        public UnionFindTree(int size) {
            parents = new int[size];
            dists = new int[size];
            for (int i = 0; i < size; i++) {
                parents[i] = i;
            }
        }
        
        public int find(int x) {
            if (parents[x] == x) {
                return x;
            }
            int ret = find(parents[x]);
            dists[x] += dists[parents[x]];
            parents[x] = ret;
            return ret;
        }
        
        public boolean same(int x, int y) {
            return find(x) == find(y);
        }
        
        public void unite(int left, int right, int dist) {
            int xx = find(left);
            int yy = find(right);
            if (xx == yy) {
                return;
            }
            int leftDist = dists[left];
            int rightDist = dists[right];
            parents[yy] = xx;
            dists[yy] = leftDist - rightDist + dist;
            find(right);
        }
        
        public int getDist(int left, int right) {
            find(left);
            find(right);
            return dists[right] - dists[left];
        }
    }
}



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

int main() {
    int n, s = 0;
    cin >> n;

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

    cout << (n % s == 0 ? "Yes" : "No") << endl;
}

Measured memory_bytes: 256
#![allow(unused_imports)]
// use itertools::Itertools;
use proconio::{input, marker::*};

fn main() {
    input! {
        a: usize,
        b: usize,
        x: usize
    };
    let right = b / x;
    let left = if a % x == 0 { a / x } else { a / x + 1 };
    println!("{}", 1 + right - left);
}


Measured memory_bytes: 2156
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {
	private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static void main(String[] args) throws Exception {
		int n = Integer.parseInt(br.readLine());
		
		Plot start = new Plot(0, 0);
		Plot end = new Plot(100, 0);
		
		List<Plot> plots = new ArrayList<>();
		plots.add(start);
		plots.add(end);
		List<Plot> result = solve(start, end, n);
		result.add(end);
		result.forEach(p -> {
			System.out.println(p.x + " " + p.y);
		});
	}
	
	static List<Plot> solve(Plot start, Plot end, int depth){
		List<Plot> result = new ArrayList<>();
		
		if(depth == 0){
			result.add(start);
			return result;
		}
		
		double deltaX = end.x - start.x;
		double deltaY = end.y - start.y;
		
		Plot s = new Plot(start.x + deltaX / 3.0, start.y + deltaY / 3.0);
		Plot t = new Plot(start.x + deltaX * 2.0 / 3.0, start.y + deltaY * 2.0 / 3.0);
		Plot u = new Plot(0, 0);
		double rad = Math.PI / 3.0;
		u.x = deltaX / 3.0 * Math.cos(rad) - deltaY / 3.0 * Math.sin(rad) + s.x;
		u.y = deltaX / 3.0 * Math.sin(rad) + deltaY / 3.0 * Math.cos(rad) + s.y;

		List<Plot> plots = Arrays.asList(start, s, u, t, end);
		
		for(int i = 0; i < plots.size() - 1; i++){
			result.addAll(solve(plots.get(i), plots.get(i + 1), depth - 1));
		}
				
		return result;
	}
	
	static class Plot{
		double x = 0.0;
		double y = 0.0;
		public Plot(double x, double y) {
			this.x = x;
			this.y = y;
		}
		
	}
}


Measured memory_bytes: 34452
#define _GLIBCXX_DEBUG //エラーを出すためのおまじない
#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
//#include <cstdlib>  // abs() for integer
#include <cmath>    // abs() for float, and fabs()
#include <math.h>
using namespace std;
#define coYES cout << "YES" << endl
#define coNO cout << "NO" << endl
#define coYes cout << "Yes" << endl
#define coNo cout << "No" << endl
#define coyes cout << "yes" << endl
#define cono cout << "no" << endl
//#define cocount cout << count << endl;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n); i++)
#define Cinint(n) int n;\
cin >> n;
#define Cinvecint(a, n) vector<int> a(n);\
for (int i = 0; i < (int)(n); i++) {\
  int num;\
  cin >> num;\
  a.at(i) = num;\
}
#define Cinstring(s) string s;\
cin >>s;


int main() {
  long long n, x, m;
  cin >> n >> x >> m;
  map<long, long> mapx;
  for(long long i = 0; i < m; i++){
    mapx[i] = 0;
  }
  long long sum = 0;
  long long a = x;
  mapx[x] = 1;
  vector<long long> retu(1);
  retu.at(0) = x;
  for(long long i = 0; i < n-1; i++){
    a = (a*a)%m;
    if (mapx[a] == 0) {
      mapx[a] = 1;
      retu.push_back(a);
    }
    else {
      retu.push_back(a);
      break;
    }
  }
  long long size = retu.size();
  long long numm;
  bool flag = false;
  for(long long i = 0; i < size-1; i++){
    if (retu.at(i) == retu.at(size-1)) {
      numm = i;
      flag = true;
      break;
    }
    else {
      sum += retu.at(i);
    }
  }
  if (!flag) {
    cout << sum+retu.at(size-1) << endl;
  }
  else {
    vector<long long> kurikae(1);
    kurikae.at(0) = retu.at(numm);
    for(long long i = numm+1; i<size-1; i++) {
      kurikae.push_back(retu.at(i));
    }
    long long kurikaesum = 0;
    long long ksize = kurikae.size();
    for(long long i = 0; i < ksize; i++){
      kurikaesum += kurikae.at(i);
    }
    sum += kurikaesum*((n-numm)/ksize);
    if ((n-numm)%ksize == 0) {
      cout << sum << endl;
    }
    else {
      for(long long i = 0; i < (n-numm)%ksize; i++){
        sum += kurikae.at(i);
      }
      cout << sum << endl;
    }
  }
  
}
    
  
    
      
      
      
      
    
    


Measured memory_bytes: 10436
#include <queue>
#define REP(i,n) for(int i=0; i<(int)(n); i++)

#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s; }

#include <iostream>
#include <set>

using namespace std;

int dp[64][64][10];

int main(){
  const int n = getInt();
  const int m = getInt();
  const int bad = -100000000;

  vector<int> a(n);
  vector<int> b(n);
  vector<int> c(n);

  REP(i,64) REP(j,64) REP(k,10)
    dp[i][j][k] = bad;

  dp[0][m][0] = 0;

  REP(i,n){
    a[i] = getInt();
    b[i] = getInt();
    c[i] = getInt();
  }

  REP(i,n) REP(j,m + 1) REP(k,9) if(dp[i][j][k] != bad){
    REP(l,min(j + 1, 9)){
      const int next1 = k + l == 0 ? dp[i][j][k] + c[i] :
        dp[i][j][k] + min(l, 8 - k) * a[i] + k * b[i];
      const int next2 = l == 0 ? dp[i][j][k] + c[i] :
        dp[i][j][k] + l * a[i];
      const int next3 = k == 0 ? dp[i][j][k] + c[i] :
        dp[i][j][k] + k * b[i];
      const int next4 = dp[i][j][k] + c[i];
      const int next5 = k + l == 0 ? dp[i][j][k] + c[i] :
        dp[i][j][k] + l * a[i] + min(k, 8 - l) * b[i];
      const int next6 = k > 0 ? dp[i][j][k] + b[i] :
        dp[i][j][k] + c[i];
      const int next7 = l > 0 ? dp[i][j][k] + a[i] :
        dp[i][j][k] + c[i];

      const int next = max(max(next6, next7),
                           max(next5, max(max(next1, next2), max(next3, next4))));

      dp[i + 1][j - l][l] =
        max(dp[i + 1][j - l][l], next);
    }
  }

  int ans = bad;

  REP(i,m + 1) REP(j, 9)
    ans = max(ans, dp[n][i][j]);

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

  return 0;
}

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

int main()
{
	int n, k;
	while (1){
		cin >> n >> k;
		if (n == 0 and k == 0) return 0;
		string s[n];
		set<string> s_perm;;
		for (int i = 0; i < n; i++) cin >> s[i];

		sort(s, s+n);

		do {
			string tmp;
			for (int i = 0; i < k; i++) tmp += s[i];
			s_perm.insert(tmp);
		} while (next_permutation(s, s+n));

		cout << (int)s_perm.size() << endl;
	}
}



Measured memory_bytes: 3260
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();

		if (N % K == 0) {
			System.out.println("0");
		} else {
			System.out.println("1");
		}
	}

}

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

int N, M, X;

int DFS(vector<vector<int>> board, vector<int> score, int i){
    for(int i=0; i<M; i++){
        if(score[i] < X) break;
        else if(i == M-1){
            return 0;
        }
    }

    if(i == N) return 10000000;

    int use, unuse;

    //i番目の参考書を使わない場合
    unuse = DFS(board, score, i+1);

    //使う場合
    for(int j=1; j<=M; j++){
        score[j-1] += board[i][j];
    }
    use = DFS(board, score, i+1) + board[i][0];

    int ans = min(use, unuse);

    return ans;
}

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

    vector<vector<int>> board(N, vector<int>(M+1));

    for(int i=0 ;i<N; i++){
        for(int j=0; j<M+1; j++){
            cin >> board[i][j];
        }
    }

    vector<int> score(M, 0);

    int ans = DFS(board, score, 0);

    if(ans >= 10000000){
        cout << -1 << endl;
        return 0;
    }

    cout << ans << endl;

    
    
}	

Measured memory_bytes: 3628
s = input()
t = input()
ans = ""

for i in range(min(len(s),len(t))):
  ans = ans + s[i] + t[i]

if len(s) > i+1:
  ans = ans + s[i+1:]
elif len(t) > i+1:
  ans = ans + t[i+1:]

print(ans)

Measured memory_bytes: 38256
/*Lucky_Glass*/
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

#define cs const int &
const int MOD=1e9+7;
inline int Add(cs a,cs b){return a+b>=MOD? a+b-MOD:a+b;}
inline int Mul(cs a,cs b){return 1ll*a*b%MOD;}

struct MATRIX{
	int mat[3][3];
	void Init(bool one=false){
		for(int i=0;i<3;i++)
			for(int j=0;j<3;j++)
				mat[i][j]=int(one&&i==j);
	}
	int* operator [](const int &i){return mat[i];}
	friend MATRIX operator *(MATRIX A,MATRIX B){
		MATRIX ret;
		ret.Init();
		for(int i=0;i<3;i++)
			for(int j=0;j<3;j++)
				for(int k=0;k<3;k++)
					ret[i][j]=Add(ret[i][j],Mul(A[i][k],B[k][j]));
		return ret;
	}
	MATRIX Pow(int b){
		MATRIX ret,a=*this;
		ret.Init(true);
		while(b){
			if(b&1) ret=ret*a;
			a=a*a;
			b>>=1;
		}
		return ret;
	}
}abl,una,res;

int main(){
	abl[0][0]=1,abl[0][1]=0,abl[0][2]=1;
	abl[1][0]=2,abl[1][1]=1,abl[1][2]=2;
	abl[2][0]=1,abl[2][1]=1,abl[2][2]=2;
	una[0][0]=1,una[0][1]=0,una[0][2]=0;
	una[1][0]=2,una[1][1]=1,una[1][2]=0;
	una[2][0]=1,una[2][1]=1,una[2][2]=1;
	int n,m,las=0;
	scanf("%d%d",&n,&m);
	res.Init(true);
	for(int i=1;i<=m;i++){
		int pos;scanf("%d",&pos);
		res=una*abl.Pow(pos-las-1)*res;
		las=pos;
	}
	res=abl.Pow(n-1-las)*res;
	//res=abl*una*una*abl;
	printf("%d\n",Add(Add(res[2][0],res[2][2]),Add(res[2][1],res[2][1])));
	return 0;
}

Measured memory_bytes: 1696
#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e10;

int main(){
    long long N, K, Q;
    cin >> N >> K >> Q;
    vector<long long> A(N, K - Q);
    for(long long i = 0; i < Q; i++){
        long long a;
        cin >> a;
        --a;
        ++A[a];
    }
    
    for(long long i = 0; i < N; i++){
        if(A[i] > 0)cout << "Yes" << endl;
        else cout << "No" << endl;
    }
    return 0;
}

Measured memory_bytes: 1408
import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, core.bitop;

enum inf3 = 1_001_001_001;
enum inf6 = 1_001_001_001_001_001_001L;
enum mod = 1_000_000_007L;




void main() {
    int N;
    scan(N);
    auto h = readln.split.to!(int[]);
    h[0]--;

    bool ok = true;

    foreach (i ; 1 .. N) {
        if (h[i] < h[i - 1]) {
            ok = false;
            break;
        }
        if (h[i] > h[i - 1]) {
            h[i]--;
        }
    }

    writeln(ok ? "Yes" : "No");
}




















int[][] readGraph(int n, int m, bool isUndirected = true, bool is1indexed = true) {
    auto adj = new int[][](n, 0);

    foreach (i; 0 .. m) {
        int u, v;
        scan(u, v);
        if (is1indexed) {
            u--, v--;
        }
        adj[u] ~= v;
        if (isUndirected) {
            adj[v] ~= u;
        }
    }

    return adj;
}

alias Edge = Tuple!(int, "to", int, "cost");

Edge[][] readWeightedGraph(int n, int m, bool isUndirected = true, bool is1indexed = true) {
    auto adj = new Edge[][](n, 0);

    foreach (i; 0 .. m) {
        int u, v, c;
        scan(u, v, c);
        if (is1indexed) {
            u--, v--;
        }
        adj[u] ~= Edge(v, c);
        if (isUndirected) {
            adj[v] ~= Edge(u, c);
        }
    }

    return adj;
}

void yes(bool b) {
    writeln(b ? "Yes" : "No");
}

void YES(bool b) {
    writeln(b ? "YES" : "NO");
}

T[] readArr(T)() {
    return readln.split.to!(T[]);
}

T[] readArrByLines(T)(int n) {
    return iota(n).map!(i => readln.chomp.to!T).array;
}

void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}

void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

bool chmin(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x > arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}

bool chmax(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x < arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}


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

using namespace std;

const int N = 1000000, A = 1000000;

int aa[N], kk[1 + A];

int gcd(int a, int b) {
	return b == 0 ? a : gcd(b, a % b);
}

int main() {
	int n; cin >> n;
	for (int i = 0; i < n; i++)
		cin >> aa[i];
	int d = 0;
	for (int i = 0; i < n; i++)
		d = gcd(d, aa[i]);
	if (d != 1) {
		cout << "not coprime\n";
		return 0;
	}
	for (int i = 0; i < n; i++) {
		int x = aa[i];
		for (int a = 2; a <= x / a; a++) {
			if (x % a == 0)
				kk[a]++;
			while (x % a == 0)
				x /= a;
		}
		if (x > 1)
			kk[x]++;
	}
	for (int a = 2; a <= A; a++)
		if (kk[a] > 1) {
			cout << "setwise coprime\n";
			return 0;
		}
	cout << "pairwise coprime\n";
	return 0;
}


Measured memory_bytes: 11456
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for(int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());

  if(a[0] == 1) {
    if(n > 1 && a[1] == 1) {
      cout << 0 << endl;
    } else {
      cout << 1 << endl;
    }
    return 0;
  }
  vector<int> x(1000000 + 10, 0);
  for(int i = 0; i < n; i++) {
    if(i > 0 && a[i] == a[i - 1]) {
      continue;
    }
    for(int j = a[i] * 2; j <= 1000000; j += a[i]) {
      x[j] = 1;
    }
  }
  int ans = n;
  for(int i = 0; i < n; i++) {
    if(x[a[i]] == 1) {
      ans--;
    } else if(x[a[i]] == 2) {
      ans -= 2;
      x[a[i]] = 1;
    } else {
      x[a[i]] = 2;
    }
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 7956
#include<stdio.h>

int main() {
	char s[100000];
	scanf("%s", s);
	int i = 0;
	while(s[i]!='\0'){
		if (i % 2 == 0) {
			printf("%c", s[i]);
		}
		i++;
	}
	printf("\n");
	
	return 0;
}

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

struct Fast {Fast(){cin.tie(0);ios::sync_with_stdio(0);}} fast;
using intpair = pair<int, int>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
#define ceiv(a, b) ((int)((a) + (b) - 1)/(int)(b))
//#define int long long

signed main(){
    int n, ans = INT_MAX;
    cin >> n;
    rep(i,n){
        int a; cin >> a;
        int t = 0;
        while(a % 2 == 0){
            a /= 2;
            t++;
        }
        ans = min(ans, t);
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define all(V) V.begin(),V.end()
using ll = long long;
const ll MOD = 1000000007;

bool out[1000010], in[1000010], arr[1000010];

void MP(vector<int>& V, string S) {
	V[0] = -1;
	int j = -1, ss = S.size();
	for (int i = 0;i < ss;i++) {
		while (j >= 0 && S[i] != S[j])j = V[j];
		j++;
		V[i + 1] = j;
	}
}

int main() {
	string S, SS, T;
	cin >> S >> T;
	SS = S;
	while (S.size() < T.size())S += SS;

	T += 'X';

	int sz = S.size(), tz = T.size();
	vector<int> mpt(tz + 1);
	MP(mpt, T);

	for (int i = 0, st = 0;st < sz;) {
		if (T[i] == S[(st + i) % sz]) {
			i++;
		}
		else {
			if (T[i] == 'X')
				out[st] = 1, in[(st + i) % sz] = 1;
			st = st + i - mpt[i];
			if (i > 0)i = mpt[i];
		}
	}

	int ans = -1;
	bool roop = 0;
	tz--;
	for (int i = 0;i < sz;i++) {
		if (arr[i])continue;
		if (out[i] && in[i])roop = 1;
		if (out[i] && !in[i]) {
			int f = i, c = 0;
			while (out[f]) {
				arr[f] = 1;
				f = (f + tz) % sz;
				c++;
			}
			ans = max(c, ans);
		}
	}
	if (roop) {
		cout << ans << endl;
	}
	else {
		cout << max(ans, 0) << endl;
	}
}

Measured memory_bytes: 7196
#include <bits/stdc++.h>
#define L "\n"
#define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define de(a) cout << #a << "  ------>  " << a << "\n"
#define SIZE 23
#define MOD 1000000007
#define INF INT_MAX
#define rep(i, n) for (i = 1; i <= n; i++)
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL)

using namespace std;
int a[SIZE][SIZE];

ll dp[23][4100000];
bool flag[23][2100000];

vi w;
int n;

ll f(int men, int num){
    if(men == n + 1) return 1;
    int now = 0, j;
    rep(j, n){
        if(a[men][j] == 0 || w[j] == 0) continue;
        w[j] = 0;
        num |= 1 << (j - 1);
        if(flag[men + 1][num]) now = (now + dp[men + 1][num]) % MOD;
        else now = (now + f(men + 1, num)) % MOD;
        w[j] = 1;
        num &= ~(1 << (j - 1));
    }
    flag[men][num] = 1;
    return dp[men][num] = now;
}

void solve()
{
    int i, j; cin >> n;
    w.assign(n + 1, 1);
    rep(i, n) {
        rep(j, n) {
            cin >> a[i][j];
        }
    }
    cout << f(1, 0) << L;
}
int main()
{
    FASTIO;
    // #ifndef ONLINE_JUDGE
    //     freopen("in.txt", "r", stdin);
    // #endif
    int t;
    // cin >> t;
    // while (t--)
    solve();
    return 0;
}

Measured memory_bytes: 375040
#include <bits/stdc++.h>
using namespace std;
int main(){
  int a, b, k;
  cin >> a >> b >> k;
  if(a+k-1>=b-k+1){
    for (int i=0;i<b-a+1;i++){
      cout << a+i << endl;
    }
  }
  else{
      for (int i=1;i<k+1;i++){
        cout << a+i-1 << endl;
        }
      for (int i=1;i<k+1;i++){
        cout << b-k+i << endl;
      }
  }
}

Measured memory_bytes: 256
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int k = sc.nextInt();
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i <= Math.max(a, b); i++) {
            if (a % i == 0 && b % i == 0) {
                list.add(i);
            }
        }
        System.out.println(list.get(list.size() - k));
    }

}


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

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


}

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

int main() {
    long long n; cin >> n;
    map<long long, long long> dict;

    long long e;
    bool flg = true;
    while (cin >> e) {
        ++dict[e];
    }

    for (long long i = (n & 1) + 1; i < n; i += 2) {
        if (dict[i] != 2) {
            flg = false;
            break;
        }
    }
    if (n & 1 == 0 && dict[0] != 1) {
        flg = false;
    }
    long long ans = 1;
    for(int i = 0; i < n / 2; ++i) {
        ans = (ans << 1)% 1000000007ll ;
    }

    cout << (flg ? ans : 0 )<< endl;
}


Measured memory_bytes: 7088
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <deque>
#include <set>
#include <iomanip>
#include <utility>
typedef long long ll;
typedef long double ld;
using namespace std;

int main() {
	int X;
	cin >> X;
	cout << (X>=30 ? "Yes": "No") << endl;
	return 0;
}


Measured memory_bytes: 3640
N,Q=map(int,input().split())
S=input()
B=[0]*N
for i in range(1,N):
    if S[i-1]=='A' and S[i]=='C':
        B[i]=B[i-1]+1
    else:
        B[i]=B[i-1]
for i in range(Q):
    l,r=map(int,input().split())
    print(B[r-1]-B[l-1])

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

int main() {
  int N;
  cin >> N;
  
  string ans = "No";
  
  for (int i = 1; i < 10; i++) {
    for (int j = 1; j < 10; j++) {
      if (i * j == N) {
        ans = "Yes";
      }
    }
  }
  
  cout << ans << endl;
    
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define MOD 1000000007
using namespace std;
int main() {
    ll n;
    cin >> n;
    vector<ll> a(n);
    map<ll, ll> mp;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        mp[a[i]]++;
    }
    ll ans = 0;
    for(auto e : mp) {
        ans += e.second * (e.second - 1) / 2;
    }
    for(int i = 0; i < n; i++) {
        cout << ans - (mp[a[i]] - 1) << endl;
    }
}

Measured memory_bytes: 11008
#include <bits/stdc++.h> 
using namespace std; 
#define for_(i, s, e) for (int i = s; i < e; i++)
#define for__(i, s, e) for (ll i = s; i < e; i++)
#define SSTR(x) static_cast<std::ostringstream&>((std::ostringstream() << std::dec << x)).str()
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
#define endl '\n'


int main() {
	#ifndef ONLINE_JUDGE
	freopen("test.in", "r", stdin);
	#endif
	
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	int n; cin >> n;
	string s; cin >> s;
	int r = 0, w = 0;
	for_(i, 0, n) if (s[i] == 'R') r += 1;
	for_(i, 0, r) if (s[i] == 'W') w += 1;
	cout << w << endl;

	return 0;
}


Measured memory_bytes: 3760
#include <iostream>
#include <iomanip>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <utility>
#include <string>
#include <cmath>
#include <cstdlib>
#include <cstring>

using namespace std;

typedef uint64_t u64;
typedef int64_t s64;
typedef uint32_t u32;
typedef int32_t s32;

#define MAX(x, y) ((x) < (y) ? (y) : (x))
#define MIN(x, y) ((x) > (y) ? (y) : (x))

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

#define CEIL(x, y) (((x) + (y) - 1) / (y))
#define MOD 1000000007ULL

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

    int n, q;
    int *S;
    int T;

    cin >> n;
    S = new int[n];
    rep (i, n)
    {
        cin >> S[i];
    }

    int ret = 0;
    int j;
    cin >> q;
    rep (i, q)
    {
        cin >> T;
        for (j = 0; j < n && S[j] != T; ++j);
        if (j < n)
        {
            ++ret;
        }
    }

    cout << ret << "\n";

    return 0;
}



Measured memory_bytes: 3204
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)
#define num  50111

using namespace std;




int main(void){
 
int innum;
 
	bool Find[num] ; // 探索リスト
    for(int i = 2; i <= num; i++){
        Find[i] = true;
        if(i%2==0) Find[i] = false;
    }
    for(int i = 2; i*i < num; i++){
        if(Find[i] == false) continue; // すでに除いた数は飛ばす
        for(int j = i * 2; j< num; j += i) {
            if(Find[j]) Find[j] = false;
        }
    }
    Find[2]= true;
//	rep(i,200) if(Find[i]) cout << i << " ";
    while(cin >> innum){
    	for(int i=innum-1;;i--){
    		if(Find[i]){
    			cout << i << " "; 
             	break;  }
        }
    	for(int i=innum+1;;i++){
    		if(Find[i]){
    			cout << i ; 
            	break; }
        }
		cout << endl;
    }
    return 0;
}

Measured memory_bytes: 1208
from collections import defaultdict

INF = 10 ** 9 + 7
N = int(input())
S = input()

d = defaultdict(int)
for key in S:
    d[key] += 1

ans = 1
for i in d.items():
    ans *= (i[1] + 1)
    ans %= INF

print((ans - 1))

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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int MAXN = 1e5;

int N, M;
pii A[MAXN+10];
vector<int> V[MAXN+10];
ll ans;

int main()
{
    int i, j;

    scanf("%d%d", &N, &M);
    for(i=1; i<=N; i++)
    {
        int a, b;
        scanf("%d%d", &a, &b);
        V[a].push_back(b);
    }

    priority_queue<int> PQ;
    for(i=1; i<=M; i++)
    {
        for(int it : V[i]) PQ.push(it);
        if(!PQ.empty()) ans+=PQ.top(), PQ.pop();
    }
    printf("%lld", ans);
}


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

using namespace std;

class Solution {
public:
	void solve() {
		int n;
		string s;
		cin >> n >> s;
		vector<int> sum(n + 1);
		for (int i = 0; i < n; i++) sum[i + 1] = sum[i] + (s[i] == 'R');
		cout << sum[n] - sum[sum[n]] << endl;

		return;
	};
};

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	Solution solution;
	solution.solve();
	return 0;
}

Measured memory_bytes: 4352