akhauriyash/Code-Regression huggingface dataset:
import java.util.Scanner;
import java.util.HashMap;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;
import java.lang.Math;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int h = sc.nextInt();
        int w = sc.nextInt();
        String[] a = new String[h];
        for (int i = 0; i < h; i++) {
            a[i] = sc.next();
        }
        List<Integer> whiteRow = new ArrayList<Integer>();
        for (int i = 0; i < h; i++) {
            int row = 0;
            for (int j = 0; j < w; j++) {
                if (a[i].charAt(j) == '.') {
                    row++;
                    if (row == w) {
                        whiteRow.add(i);
                    }
                }
            }
        }
        List<Integer> whiteCol = new ArrayList<Integer>();
        for (int i = 0; i < w; i++) {
            int col = 0;
            for (int j = 0; j < h; j++) {
                if (a[j].charAt(i) == '.') {
                    col++;
                    if (col == h) {
                        whiteCol.add(i);
                    }
                }
            }
        }
        for (int i = 0; i < h; i++) {
            if (whiteRow.contains(i)) {
                continue;
            }
            for (int j = 0; j < w; j++) {
                if (whiteCol.contains(j)) {
                    continue;
                }
                System.out.print(a[i].charAt(j));
            }
            System.out.print("\n");
        }
    }

}


Measured memory_bytes: 27984
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

typedef long long ll;

#define MOD 1000000007

int main() {
  double r;
  cin >> r;
  printf("%.10f\n", 2.0 * r * M_PI);
  return 0;
}

Measured memory_bytes: 3788
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<cstdio>
#include<cmath>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<int,P> P1;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define rep(i,x) for(int i=0;i<x;i++)
#define rep1(i,x) for(int i=1;i<=x;i++)
#define rrep(i,x) for(int i=x-1;i>=0;i--)
#define rrep1(i,x) for(int i=x;i>0;i--)
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define uniq(vec) vec.erase(unique(vec.begin(),vec.end()),vec.end())
#define mp1(a,b,c) P1(a,P(b,c))

const int INF=1000000000;
const int dir_4[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
const int dir_8[8][2]={{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};

int f(vector<int> a,vector<int> b){
	int ret = a.size();
	int k = 0;
	for(int i = 0 ; i < a.size() ; i ++){
		if(k < b.size() && b[k] < a[i])k ++;
		ret = min ( ret , (int)a.size()-1-i+k );
	}
	return ret;
}

int main(){
	int n,t;
	int a[100010];
	scanf("%d%d",&n,&t);
	rep(i,n)scanf("%d",&a[i]);
	
	int MIN = 1000000000;
	int MAX = 0;
	rep(i,n){
		MAX = max ( MAX , a[i]-MIN );
		MIN = min ( MIN , a[i] );
	}
	
	map<int,vector<int>> MAP;
	rep(i,n){
		MAP[a[i]].pb(i);
	}
	int ret = 0;
	for(map<int,vector<int>>::iterator itr = MAP.begin() ; itr != MAP.end() ; itr++){
		ret += f(itr->sc,MAP[itr->fr-MAX]);
	}
	cout << ret << endl;
}



Measured memory_bytes: 19328
#include<iostream>
using namespace std;
int main(){
    int a,b;
    while(cin>>a>>b){
        if(a==0&&b==0)
            break;
        for(int i=0;i<a;i++)
            {
            for(int j=0;j<b;j++)
                {cout<<"#";}
                cout<<endl;
            }
            cout<<endl;

    }
    return 0;
}


Measured memory_bytes: 3092
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int main(void){

  string s;
  string s1="dream",s2="dreamer",s3="erase",s4="eraser";
  cin>>s;

  while(s.length()>4){

    if(s.substr(s.length()-5,5)==s1) s.erase(s.end()-5,s.end());
    else if(s.length()>6&&s.substr(s.length()-7,7)==s2) s.erase(s.end()-7,s.end());
    else if(s.substr(s.length()-5,5)==s3) s.erase(s.end()-5,s.end());
    else if(s.length()>5&&s.substr(s.length()-6,6)==s4) s.erase(s.end()-6,s.end());
    else break;
  }
  if(s.length()==0) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  return 0;
}

Measured memory_bytes: 640
#include <iostream>
#include <iosfwd>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <cassert>
#include <cctype>
#include <climits>
#include <vector>
#include <bitset>
#include <set>
#include <queue>
#include <stack>
#include <map>
#include <deque>
#include <string>
#include <list>
#include <iterator>
#include <sstream>
#include <complex>
#include <fstream>
#include <functional>
#include <numeric>
#include <utility>
#include <algorithm>
#include <assert.h>
#include <unordered_map>

using namespace std;
const int N = 1e6 + 50;
const long long mod = 1e9 + 7;
const long long INF = 1LL << 57;
const int LN = 22;
const int SN = 320;

long long n, m, u, v, k, t, q, x, d, p, a, b, c, s;


string str;

int main() {
   ios::sync_with_stdio(false);cin.tie(0);
   cin >> n;
   cin >> str;
   long long sol = 1;
   int open = 0;
   for (int i = 0; i < str.size(); ++i) {
      if (i % 2 == 0 and str[i] == 'W') {
         sol = (sol * open) % mod;
         open--;
         if (open < 0) open = 0;
      } else if (i % 2 == 0 and str[i] == 'B') {
         open++;
      } else if (i % 2 == 1 and str[i] == 'W') {
         open++;
      } else {
         sol = (sol * open) % mod;
         open--;
         if (open < 0) open = 0;
      }
   }
   
   if (open != 0) cout << 0 << endl;
   else {
      for (int i = 1; i <= n; ++i) {
         sol = (sol * i) % mod;
      }
      cout << sol << endl;
   }
}


Measured memory_bytes: 720
//verma_ankit484

#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

#define int long long
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define pb push_back
const int mod = (int) 1e9+7;

using namespace std;
//using namespace __gnu_pbds;

//#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>


int32_t main() {
  IOS
  #ifdef AV
  freopen("input.txt", "r", stdin);
  #endif
  int n;
  cin >> n;
  vector<int> vc(n);
  for (auto &i: vc) {
    cin >> i;
  }
  sort(vc.begin(), vc.end());
  vc.pb(INT_MAX);
  unordered_map<int, int> mp;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int c = 1;
    for (int j = 2; j * j <= vc[i]; j++) {
      int i1, i2;
      if (vc[i] % j == 0) {
        i1 = j;
        i2 = vc[i] / j;
        if (mp[i1] == 1 or mp[i2] == 1) {
          c = 0;
          break;
        }
      }
    }
    if (mp[vc[i]] == 1 or mp[1] == 1) c = 0;
    if (vc[i] != vc[i + 1])
    ans += c;
    mp[vc[i]] = 1;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 33208
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n, k = LI()
    h = sorted(LI())
    if k == 0:
        print(sum(h))
    else:
        print(sum(h[:-k]))
    return


# Solve
if __name__ == "__main__":
    solve()


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


Measured memory_bytes: 128
#include <algorithm>
#include <cctype>
#include <complex>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>

using std::cin;
using std::cout;
using std::endl;

using std::string;
using std::to_string;
using std::vector;
using std::set;
using std::queue;
using std::priority_queue;

using std::min;
using std::max;
using std::sort;
using std::abs;

int main() {
    int x;
    cin >> x;
    cout << (x < 1200 ? "ABC" : "ARC") << endl;
    return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>
#include <vector>
#include <limits>
#include <numeric>
#include <type_traits>
#include <iostream>

typedef long long ll;
typedef long long int lli;

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

template<class T>bool umax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool umin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

using namespace std;

struct py{
    int p;
    int y;
    int num;
};

int gcd(int a, int b){
    if(a==0)
        return b;
    return gcd(b%a,a);
}
int findGCD(int arr[], int n){
    int result = arr[0];
    for (int i=1; i < n; i++)
        result = gcd(arr[i], result);

    return result;
}
int main() {
    int N;
    int A[100000];
    cin >> N;
    rep(i,N){
        cin >> A[i];
    }
    sort(A, A+N);

    cout << findGCD(A, N)<<endl;
    return 0;
}



Measured memory_bytes: 640
#include<cstdio>
using namespace std;
typedef long long ll;
const int N=22,D=1<<19,P=1000000007;
int i,j,k,l,n,m,nm,K,ch,ff,ans;
int f[D];
int a[N][N];
void R(int &x) {
	ff=x=0;ch=getchar();
	while (ch<'0' || '9'<ch) { if (ch=='-') ff=1;ch=getchar();}
	while ('0'<=ch && ch<='9') x=x*10+ch-'0',ch=getchar();
	if (ff) x=-x;
}
int main() {
	R(n);R(m);R(K);
	n--;
	nm=1<<n;
	for (i=1;i<=m;i++)
		for (j=0;j<n;j++) a[i][j]=3;
	for (i=1;i<=K;i++) {
		int A,B,C;
		R(A);R(B);R(C);
		a[A][B-1]=1<<C;
	}
	f[0]=1;
	for (i=1;i<=m;i++) {
		for (j=0;j<n;j++) {
			for (k=nm-1;k>=0;k--) if (f[k]) {
				int F=f[k];
				f[k]=0;
				for (l=0;l<2;l++) if (a[i][j]&1<<l) {
					int t;
					if (k&1<<j) t=1;
					else t=0;
					if (t>l) continue;
					if (l>t) {
						int tt=k>>j<<j;
						if (tt) tt=k^(tt&-tt);
						else tt=k;
						tt|=1<<j;
						f[tt]=(f[tt]+F)%P;
					}
					else f[k]=(f[k]+F)%P;
				}
			}
		}
	}
	for (i=0;i<nm;i++) ans=(ans+f[i])%P;
	printf("%d\n",ans);
}

Measured memory_bytes: 2176
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
    cin >> n;
    long long a,b,c;
    a=2;
    b=1;
    for(int i=0;i<n-1;i++){
    	c=a+b;
        a=b;
        b=c;
    }
    cout << b <<endl;
}


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

// 💖 Hi, thanks for using ICIE! 💖
// 🔧 To use a custom code template, set it in Settings(Ctrl+,) in "Icie Template List" entry 🔧
// 📝 If you spot any bugs or miss any features, create an issue at https://github.com/pustaczek/icie/issues 📝
const int maxn=200000+10;
int n,a[maxn];
map<int,int> mp;
int main() 
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin>>n;
    bool flag=true;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        if(mp[a[i]])
        {
            flag=false;
            break;
        }
        mp[a[i]]++;
    }
    if(flag)
        cout<<"YES";
    else
        cout<<"NO";
    return 0;
}



Measured memory_bytes: 10368
#include<bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(), (obj).end()
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a); i >= (b); i--)
#define REP(i, n) for(int i = 0; i < (n); ++i)
#define RREP(i, n) for(int i = n; i >= n; i--)

#define ABS(a) ((a < 0) ? ((-1)*(a)) : (a))

#define endl "\n"
#define pb push_back
#define rtn return
#define elif else if

#define INF 2000000000	//int型は2 * 10^9ぐらいまで
#define MOD 1000000007
 
const int dx[]={1,0,-1,0}, dy[]={0,-1,0,1};

typedef long long ll;
typedef unsigned long long ull;

template <typename T>
inline T GCD(T a,T b){T c;while(b!=0){c=a%b;a=b;b=c;}return a;}
template <typename T>
inline T LCM(T a,T b){T c=GCD(a,b);a/=c;return a*b;}
template <typename T>
inline T nCr(T a,T b){T i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
template <typename T>
inline T nHr(T a,T b){return nCr(a+b-1,b);}
template <typename T>
inline T POW(T a,T b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}

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

	int n;
	string s, t;
	cin >> n >> s >> t;
	int ans = 2 * n;

	for(int i = 1;i <= n;i++){
		string ss = s.substr(n-i);
		string tt = t.substr(0, i);
		if(ss == tt && 2*n - i > n){
			ans = 2*n - i;
		}
	}
	if(s == t) ans = n;
	cout << ans << endl;
	
	rtn 0;
}

Measured memory_bytes: 256
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
import java.util.Map.Entry;
import java.util.function.DoubleToLongFunction;

import javax.naming.InitialContext;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.List;
import java.util.NoSuchElementException;

public class Main {
	
	public static void main(String[] args) throws IOException {
		FastScanner sc = new FastScanner(System.in);
		
		String S = sc.next();
		System.out.println((S.contains("AC")) ? "Yes" : "No");
	}
}



class FastScanner {
    private InputStream in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    public FastScanner(InputStream in) {
		this.in = in;
	}
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
    	if (hasNextByte()) return buffer[ptr++];
    	else return -1;
    }
    private static boolean isPrintableChar(int c){
    	return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
    	while(hasNextByte() && !isPrintableChar(buffer[ptr]))
    		ptr++; return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
}

Measured memory_bytes: 21076
n=int(input())
A=[[0 for i in range(9)] for j in range(9)]

for i in range(1,n+1):
    if i%10!=0:
        num=str(i)
        A[int(num[0])-1][int(num[-1])-1] +=1

cnt=0
for i in range(9):
    for j in range(9):
        cnt +=A[i][j]*A[j][i]

print(cnt)

Measured memory_bytes: 3064
# Stack - Reverse Polish Notation
sss = input().split(' ')
stck = []
for s in sss:
    if s == '+':
        b = stck.pop()
        a = stck.pop()
        stck.append(int(a+b))
    elif s == '-':
        b = stck.pop()
        a = stck.pop()
        stck.append(int(a-b))
    elif s == '*':
        b = stck.pop()
        a = stck.pop()
        stck.append(int(a*b))
    else: stck.append(int(s))
print(stck.pop())


Measured memory_bytes: 7672
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <climits>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;

int main() {
    priority_queue<int, vector<int>, greater<int> > q;
    for (int i = 0; i < 3; i++) {
        int tmp;
        cin >> tmp;
        q.push(tmp);
    }
    int K;
    cin >> K;
    int a = q.top(); q.pop();
    int b = q.top(); q.pop();
    int c = q.top();
    for (int i = 0; i < K; i++) {
        c = c * 2;
    }
    cout << a + b + c << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main() {
    int N, K;
    int cur = 1;
    cin >> N >> K;
    for (int i = 1; i <= N; i++) {
        if ((2 * cur) >= (cur + K)) {
            cur += K;
        }
        else {
            cur = cur * 2;
        }
    }
    cout << cur;
    return 0;
}


Measured memory_bytes: 256
N, M = map(int, input().split())
hlist = list(map(int, input().split()))
rlist=[]
i=0
while(i<M):
  a = input().split()
  rlist.append(a)
  i+=1
anslist=[0]*N
j=0
while(j<M):
  alist=rlist[j]
  a=int(alist[0])
  b=int(alist[1])
  if(hlist[a-1]<hlist[b-1]):
    anslist[a-1]=1
  elif(hlist[b-1]<hlist[a-1]):
    anslist[b-1]=1
  elif(hlist[a-1]==hlist[b-1]):
    anslist[a-1]=1
    anslist[b-1]=1
  j+=1
print(anslist.count(0))

Measured memory_bytes: 43152
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> sankaku = new ArrayList<Integer>();
		{
			int k = 1;
			while(true){
				int cur = k * (k + 1) / 2;
				
				if(cur > 1000000){
					break;
				}
				
				sankaku.add(cur);
				k++;
			}
		}
		
		while(true){
			System.gc();
			final int N = sc.nextInt();
			
			if(N == 0){
				break;
			}
			
			LinkedList<Integer> list = new LinkedList<Integer>();
			int sum_s = 0;
			
			for(int i = 0;i < N; i++){
				final int in = sc.nextInt();
				list.add(in);
				sum_s += in;
			}
			
			if(Collections.binarySearch(sankaku, sum_s) < 0){
				System.out.println(-1);
				continue;
			}
			
			int count = 0;
			while(true){
				int pur = 1;
				
				if(count > 10000){
					break;
				}
				
				boolean flag = false;
				for(int i : list){
					if(pur != i){
						flag = true;
						break;
					}
					
					pur++;
				}
				
				if(!flag){
					break;
				}
				
				//System.out.println(list);
				
				int sum = 0;
				for(ListIterator<Integer> iter = list.listIterator(); iter.hasNext(); ){
					int cur = iter.next();
					
					if(cur >= 1){
						sum++;
						if(cur > 1){
							iter.set(cur - 1);
						}else{
							iter.remove();
						}
					}else{
						iter.remove();
					}
				}
				
				list.add(sum);
				count++;
			}
			
			if(count > 10000){
				System.out.println(-1);
			}else{
				System.out.println(count);
			}
		}
	}

}

Measured memory_bytes: 166164
#include <bits/stdc++.h>
using namespace std;
#define lint long long
#define int long long

signed main(){
    int H, W;
    
    cin >> H >> W;
    
    if(H % 3 == 0 | W % 3 == 0){
        cout << 0 << endl;
        return 0;
    }
    
    lint ans = H * W;
    
    for(int i = W / 3; i < W / 3 + 2 && i < W; ++i){
        vector<lint> s;
        s.push_back(i * H);
        lint a = (W - i) * (H / 2);
        
        s.push_back(a);
        s.push_back((W - i) * H - a);
        sort(s.begin(),s.end());
        ans = min(ans, s[2] - s[0]);
        
        vector<lint> t;
        t.push_back(i * H);
        lint b = (W - i) / 2;
        
        t.push_back(b * H);
        t.push_back((W - b - i) * H);
        sort(t.begin(), t.end());
        ans = min(ans, t[2] - t[0]);
    }
    
    for(int i = H / 3; i < H / 3 + 2 && i < H; ++i){
        vector<lint> s;
        s.push_back(i * W);
        lint a = (H - i) * (W / 2);
        s.push_back(a);
        s.push_back((H - i) * W - a);
        sort(s.begin(),s.end());
        ans = min(ans, s[2] - s[0]);
        
        vector<lint> t;
        t.push_back(i * W);
        lint b = (H - i) / 2;
        
        t.push_back(b * W);
        t.push_back((H - b - i) * W);
        sort(t.begin(), t.end());
        ans = min(ans, t[2] - t[0]);
    }
    
    cout << ans << endl;
}


Measured memory_bytes: 256
eval"N,C,*D="+`dd`.split*?,
a=[],[],[]
(N*N).times{|i|a[(i/N+i%N)%3]<<D.pop-1}
r=*0...C
s,t,u=a.map{|e|r.map{|t|s=0;e.map{|f|s+=D[f*C+t]};s}}
p r.permutation(3).map{|x,y,z|s[x]+t[y]+u[z]}.min

Measured memory_bytes: 68344
/* Author : Pranav Deshmukh
            PICT,Pune
   Stay Focused!
*/

#include<bits/stdc++.h>
using namespace std;

// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")

#define int             long long
#define float           double
#define ms(s, n) 		memset(s, n, sizeof(s))
#define dip(type,var)   type var; cin>>var;
#define dipi(x)         int x; cin>>x;
#define dipi2(x,y)      int x,y; cin>>x>>y;
#define w(x)            int x; cin>>x; while(x--)
#define mka(type,arr,n) type *arr=new type[n];
#define fo(i,n)         for(int i=0;i<n;i++)
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mod             1000000007
#define inf             1e18
#define pi              3.141592653589793238
#define endl            "\n"
#define f               first
#define s               second
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >

// void c_p_c()
// {
// 	ios_base::sync_with_stdio(0);
// 	cin.tie(0);
// 	cin.tie(0);
// #ifndef ONLINE_JUDGE

// 	freopen("input.txt", "r", stdin);
// 	freopen("output.txt", "w", stdout);
// #endif
// }

int32_t main() {
	// c_p_c();
	int count = 0;
	dipi(n);
	mka(int, arr, n);
	fo(i, n) {
		cin >> arr[i];
	}
	for (int i = 0; i < n - 2; i++) {
		for (int j = i + 1; j < n - 1; j++) {
			for (int k = j + 1; k < n; k++) {
				if (arr[i] + arr[j] > arr[k] && arr[j] + arr[k] > arr[i] && arr[i] + arr[k] > arr[j] && arr[i] != arr[j] && arr[j] != arr[k] && arr[i] != arr[k]) {
					count++;
				}
			}
		}
	}
	cout << count << endl;
	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
	return 0;
}


Measured memory_bytes: 3780
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;

namespace Competitive
{
    internal class BinarySearch
    {
        public int[] S;
        public int N { get { return S.Length; } }

        public BinarySearch(int[] s)
        {
            S = s;
        }

        public bool Cond(int i, int x)
        {
            if (S[i] >= x) return true;
            return false;
        }

        // 左側がfalse, 右側がtrue
        // 初めてCondがtrueを返すindexを返す
        // 全て条件を満たさない場合はNを返す
        public int Search(int x)
        {
            int left = 0;
            int right = N;

            if (Cond(0, x)) return 0;
            if (!Cond(N - 1, x)) return N;

            while (left + 1 < right)
            {
                int mid = (left + right) / 2;
                if (!Cond(mid, x))
                {
                    left = mid;
                }
                else
                {
                    right = mid;
                }
            }
            return right;
        }
    }

    internal class Solution
    {
        public int n, q;
        public int[] S, T;

        public void Run()
        {
            n = Input.ReadInt();
            S = Input.ReadIntArray();
            q = Input.ReadInt();
            T = Input.ReadIntArray();

            var bs = new BinarySearch(S);
            int ret = 0;
            for (int i = 0; i < q; i++)
            {
                int t = T[i];
                int idx = bs.Search(t);
                if (S[idx] == t) ret++;
            }

            Console.WriteLine(ret);
        }

    }

    
    internal static class Input
    {
        public static int ReadInt()
        {
            string line = Console.ReadLine();
            return int.Parse(line);
        }

        public static int[] ReadIntArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(int.Parse).ToArray();            
        }

        public static double[] ReadDoubleArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(double.Parse).ToArray();
        }
    }

    internal class Program
    {
        public static void Main(string[] args)
        {
            var s = new Solution();
            s.Run();
        }
    }
}


Measured memory_bytes: 22824
#include <string>
#include <cstdlib>
#include <iostream>


int main(int argc, const char *argv[])
{
    int N;
    std::string S;
    int K;

    std::cin >> N >> S >> K;
    char c = S[K - 1];
    for (int i = 0; i < N; i++) if (S[i] != c) S[i] = '*';

    std::cout << S << std::endl;
}

Measured memory_bytes: 256
n, a, b = map(int,raw_input().split())
c = 0
if a == 0:
  print 0
else:
  if n%(a+b) == 0:
    print a * (n/(a+b)) 
  else:
    if a > n%(a+b):
      c = n%(a+b)
    else:
      c = a
    print a * (n/(a+b)) + c

Measured memory_bytes: 2568
def main():
    Odd = input()
    Even = input()
    ans = ''
    for i in range(len(Odd) + len(Even)):
        if (i + 1) % 2 == 1:
            ans += Odd[i // 2]
        else:
            ans += Even[i // 2]
    print(ans)


if __name__ == '__main__':
    main()


Measured memory_bytes: 38384
#include <stdio.h>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <iostream>
#include <math.h>
#include <bitset>
#include <iomanip>
#include <queue>
#include <cstring>
using namespace std;

const int MOD = 1000000007;

int main() {
	int N; cin >> N;
	vector<int> b(N),a(N,0);
	vector<bool> z(N, 0);
	for (int i = 0; i < N; i++)cin >> b[i];
	for (int i = 0; i < N; i++) {
		int x = N - i-1;
		for (int j = 0; j < N; j++) {
			if (z[N - 1 - j] == 1)continue;
			if (x+1 == b[N - j - 1]) {
				a[N-i-1] = b[N - 1 - j];
				z[N - 1 - j] = 1;
				break;
			}
			x--;
		}
		if (a[N-1-i] == 0) {
			cout << -1 << endl;
			return 0;
		}
	}
	for (int i = 0; i < N; i++)cout << a[i] << endl;
}





Measured memory_bytes: 256
#include<iostream>
using namespace std;
static const int MAX=100;

int main(){
    int v, N, A[MAX];
    cin>>N;
    for (int i=0; i<N; i++) cin>>A[i];

    for (int i=0; i<N;i++){
        if (i!=0){
            cout<<" "<<A[i];
        } else {
            cout<<A[i];
        }
    }
    cout<<endl;
    for (int i=1; i<N; i++){
        v=A[i];
        int j=i-1;
        while (j>=0 && A[j]>v){
            A[j+1]=A[j];
            j--;
        }
        A[j+1]=v;

    for (int i=0; i<N; i++){
        if (i!=0){
            cout<<" "<<A[i];
        }else{
            cout<<A[i];
        }
    }
    cout<<endl;
    }
}

Measured memory_bytes: 3056
#include<stdio.h>
int main()
{
    int n,k,a,b,f=0;
    scanf("%d %d %d %d",&n,&k,&a,&b);
    if(n>=k)
    {
        f=f+a*k;
        f=f+b*(n-k);
    }
    else
    {
        f=f+a*n;
    }
    printf("%d\n",f);
    return 0;
}


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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP0(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REP1(i,n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
#define RREP0(i,n) for(int i=n-1; i>=0; --i)
#define RREP1(i,n) for(int i=n; i>=1; --i)
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define FILL(c, v) fill((c).begin(),(c).end(), v)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define CLR(a) memset((a), 0 ,sizeof(a))

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

typedef long long LL;
typedef unsigned long long ULL;

const int INTINF = 2147483647;
const LL LLINF = 9223372036854775807;
int gcd(int a,int b){return b?gcd(b,a%b):a;}

typedef pair<int, int> pii; 

void solve() {
  int N; cin >> N;
  vector<pii> student(N);
  REP0(i, N) {
    int A_i; cin >> A_i;
    student[i] = pii(A_i, i);
  }
  
  SORT(student);

  REP0(i, N) {
    cout << student[i].second+1;
    if (i!=N-1) cout << " ";
  }
  cout << endl;

}

int main(int argc, char const *argv[])
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  std::cout<<std::fixed<<std::setprecision(10);
  solve();
  return 0;
}


Measured memory_bytes: 1664
class Combination():
    def __init__(self, n, mod):
        self.n = n
        self.mod = mod
        self.fact = self.make_fact(n)
        self.fact_inv = self.make_fact_inv(n)
    def make_fact(self, n):#0~nの階乗を求める
        res = [1]*(n+1)
        for i in range(1, n+1):
            res[i] = res[i-1]*i%self.mod
        return res
    def make_fact_inv(self, n):#0~nの階乗のmodに関する逆元を求める
        fact_inv = [1]*(n+1)
        fact_inv[n] = pow(self.fact[n], self.mod-2, self.mod)#フェルマーの小定理
        for i in range(n, 0, -1):
            fact_inv[i-1] = fact_inv[i]*i%self.mod
        return fact_inv
    def comb(self, m, k):
        return self.fact[m]*self.fact_inv[k]*self.fact_inv[m-k]%self.mod
mod = 10**9+7
r1, c1, r2, c2 = map(int, input().split())
comb = Combination(r2+c2+2, mod)
print((comb.comb(r2+c2+2, r2+1)-comb.comb(r2+c1+1, r2+1)-comb.comb(r1+c2+1, r1)+comb.comb(r1+c1, r1))%mod)


Measured memory_bytes: 70000
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

k = ii()
a,b = mi()

flag = 0
for i in range(a,b+1):
    if i % k == 0:
        flag = 1
if flag:
    print("OK")
else:
    print("NG")

Measured memory_bytes: 9192
#include <bits/stdc++.h>
using namespace std;
//Author: Ezio Sam
/* Shorthands */
#define ll long long
#define pb push_back 
#define mp make_pair
#define sp " "
#define cs "Case "
#define fi first
#define sn second 
#define po(x) x*x
/* STL */
#define vi vector<int>v
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mem(a,n) memset(a, n, sizeof(a));
#define all(x) x.begin(),x.end()
#define alr(x) x.rbegin(),x.rend()
#define sz(x)  (int)x.size()
#define mx(v)  *max_element(v.begin(),v.end())
#define mxi(v) distance(v.begin(),max_element(v.begin(),v.end()))
#define mxa(a) *max_element(a, a.size())
#define r(a) reverse(a.begin(),a.end())
/* loops */
#define fr(i,n)   for(__typeof(n) i=0;i<(n);i++)
#define fn(i,n)   for(__typeof(n)i=1;i<=(n);i++)
#define fa(i,a,n) for(int  i=a;i<=b;i++)
/*Special*/
#define Ezio ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define db(something)  cerr<<#something<<" - "<<something<<"\n";         

int main()
{
  
   Ezio
   ll t,m,n,x(0),a,b;
   string s;
   
   cin>>a>>b>>n;
   
   fa(i,a,b){
     if(i%n==0) x++;
   }
   cout<<x<<endl;
   return 0;
}
    

Measured memory_bytes: 3588
h,w,d = map(int,input().split())
hw = [[-1,-1]]*(h*w)
for i in range(h):
        ls = list(map(int,input().split()))
        for j in range(len(ls)):
                hw[ls[j]-1] = [j,i]
check = [0]*(h*w)
for i in range(h*w):
        if i + d > h*w-1:break
        check[i] = abs(hw[i][0]-hw[i+d][0]) + abs(hw[i][1]-hw[i+d][1])
ios = [0]*(w*h)
for i in range(d):
        c = 0;beforj = 0
        for j in range(h*w-1-i,-1,-d):
                if c == 0:c = 1;beforj = j;continue
                ios[j] = ios[beforj] + check[j]
                beforj = j
q = int(input())
for i in range(q):
        l,r = map(int,input().split())
        print(ios[l-1]-ios[r-1])

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

// union by size + path having
class UnionFind {
public:
    vector <ll> par; // 各元の親を表す配列
    vector <ll> siz; // 素集合のサイズを表す配列(1 で初期化)

    // Constructor
    UnionFind(ll sz_): par(sz_), siz(sz_, 1LL) {
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }
    void init(ll sz_) {
        par.resize(sz_);
        siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }

    // Member Function
    // Find
    ll root(ll x) { // 根の検索
        while (par[x] != x) {
            x = par[x] = par[par[x]]; // x の親の親を x の親とする
        }
        return x;
    }

    // Union(Unite, Merge)
    bool merge(ll x, ll y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        // merge technique（データ構造をマージするテク．小を大にくっつける）
        if (siz[x] < siz[y]) swap(x, y);
        siz[x] += siz[y];
        par[y] = x;
        return true;
    }

    bool issame(ll x, ll y) { // 連結判定
        return root(x) == root(y);
    }

    ll size(ll x) { // 素集合のサイズ
        return siz[root(x)];
    }
};

int main(){
	int n, m, k;
	cin >> n >> m >> k;
	vector<vector<int>> friends(n, vector<int>());
	vector<vector<int>> blocks(n, vector<int>());
	UnionFind uf(n);
	rep(i, m){
		int a, b;
		cin >> a >> b;
		a--;
		b--;
		friends[a].push_back(b);
		friends[b].push_back(a);
		uf.merge(a, b);
	}
	rep(i, k){
		int c, d;
		cin >> c >> d;
		c--;
		d--;
		blocks[c].push_back(d);
		blocks[d].push_back(c);
	}
	
	vector<int> ans(n);
	for(int i = 0; i < n; ++i){
		ll size = uf.size(i);
		for(auto itr : friends[i]){
			if(uf.issame(i, itr)){
				size--;
			}
		}
		for(auto itr : blocks[i]){
			if(uf.issame(i, itr)){
				size--;
			}
		}
		ans[i] = size - 1;	// 自分自身を引く
	}
	
	for(auto itr : ans){
		cout << itr << " ";
	}
	cout << endl;
	
	return 0;
}



Measured memory_bytes: 13816
if __name__ == '__main__':
    n = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0

    for i in range(n):
        s = input()
        if s == 'AC':
            ac += 1
        elif s == 'WA':
            wa += 1
        elif s == 'TLE':
            tle += 1
        elif s == 'RE':
            re += 1
        
    print('AC x '+ str(ac))
    print('WA x '+ str(wa))
    print('TLE x '+ str(tle))
    print('RE x '+ str(re))

Measured memory_bytes: 74416
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <algorithm>

#include <bits/stdc++.h>
#include <cmath>
#include <limits>

using namespace std;


int main(int argc, char* argv[]){
	cin.tie(0);
	ios::sync_with_stdio(false);

	int x;
	cin >> x;

	if(x < 1200){
		printf("ABC\n");
	}
	else{
		printf("ARC\n");
	}
	return 0;
}

Measured memory_bytes: 3604
#include <iostream>
#define debt 100000

using namespace std;

int main(void){

  int n;
  cin >> n;

  int total = debt;
  for( int i = 0 ; i < n ; i++ ){
    total = total * 5 / 100 + total; 
    if( total % 1000 > 0 ){
      total = total / 1000 * 1000 + 1000;
    }
  }
  
  cout << total << endl;

  return 0;
}

Measured memory_bytes: 1160
#include <queue>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <map>
#include <stdio.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for(int i = (a); i < (int)(b); i++)
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vint;
typedef vector<string> vstr;
typedef pair<ll, ll> pint;
unsigned long long inf = (1LL << 62);
ll MOD = (ll)pow(10.0, 9.0) + 7;
pint dx[4] = { {0, 1}, {0, -1}, {1, 0}, {-1, 0} };
char da[4] = { 'R', 'L', 'D', 'U' };
char dax[4] = { -1, 1, -1, 1 };
char dax2[4] = { 1, -1, 1, -1 };
ll min(ll a, ll b)
{

	return (a < b) ? a : b;
}
ll max(ll a, ll b) { return (a > b) ? a : b; }
ll num[10000];

bool compare_b(pair<string, ll> a, pair<string, ll> b) {

	if (a.first < b.first) {
		return true;
	}
	else if (a.first == b.first) {
		return a.second > b.second;
	}

	else
		return false;

}

int main() {
	vector<pair<string, ll>> A;

	ll n;

	cin >> n;
	A.resize(n);
	rep(i, n) {
		cin >> A[i].first >> A[i].second;
		num[A[i].second] = i + 1;
	}

	sort(A.begin(), A.end(), compare_b);

	rep(i, A.size()) {
		cout << num[A[i].second] << endl;
	}


	return 0;

}

Measured memory_bytes: 256
n, m = map(int, input().split())
drinks = []
for i in range(n):
    a, b = map(int, input().split())
    drinks.append([a, b])
sorted_drinks = sorted(drinks)

amount = 0
for price, num in sorted_drinks:
    if m <= num:
        amount += price*m
        break

    m -= num
    amount += price*num
print(amount)


Measured memory_bytes: 20840
#include <stdio.h>
 
int main(void) {
	int K, N;
	int A[200000];
	int max = 0;
	int i;
	
    scanf("%d %d", &K , &N);
	scanf("%d", &A[0]);
	
	for( i = 1; i < N; i++ ) {
		scanf("%d", &A[i]);
		if( (A[i] - A[i-1]) > max ) {
			max = A[i] - A[i-1];
		}
	}
	if( (K - A[N-1] + A[0]) > max ) {
		max = K - A[N-1] + A[0];
	}
 
	printf("%d", (K - max));
 
	return 0;
}


Measured memory_bytes: 896
#include <algorithm>
#include <array>
#include <iostream>
#include <numeric>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#include <atcoder/fenwicktree>
#include <atcoder/dsu>

using namespace std;
using namespace atcoder;
#define rep(i,l,r) for(int i = l; i < r; ++i)

#define fir first
#define sec second

int main() {
    int n;
    cin >> n;
    
    vector<int> xy(n);
    vector<int> memo(n);
    rep(i, 0, n) {
        int x, y;
        cin >> x >> y;
        --x;
        --y;
        xy[x] = y;
        memo[i] = x;
    }

    stack<pair<int, int>> s;
    s.push({xy[0], 0});
    fenwick_tree<int> ft(n);
    ft.add(xy[0], 1);
    dsu d(n);

    rep(i, 1, n) {
        int c = ft.sum(0, xy[i]);

        if (c == 0) {
            s.push({xy[i], i});
            ft.add(xy[i], 1);
        } else if (c == 1) {
            d.merge(s.top().sec, i);
        } else {
            auto t = s.top();
            s.pop();
            d.merge(t.sec, i);
            rep(j, 0, c-1) {
                auto u = s.top();
                s.pop();
                ft.add(u.fir, -1);
                d.merge(u.sec, i);
            }
            s.push(t);
        }
    }

    for(auto x : memo) cout << d.size(x) << endl;
}

Measured memory_bytes: 6432
using System;

namespace newEx
{
    class Program
    {
        static void Main(string[] args)
        {
            //string[] l = Console.ReadLine().Split(' ');
            //int p = int.Parse(l[0]);
            //int q = int.Parse(l[1]);
            //int r = int.Parse(l[2]);

            string l = Console.ReadLine();
            int r = int.Parse(l);
            l = Console.ReadLine();

            Console.WriteLine(Solve(r,l));
        }

        static string Solve(int a, string s)//修正200630
        {
            if (a >= 3200)
            {
                //Console.WriteLine(s);
                return s;　//修正200629
            }
            else
            //if (a < 3200)
            {
                //Console.WriteLine("red");
                return "red";　//修正200629
                // return"red";　//修正200629
            }
        }
    }
}


Measured memory_bytes: 27436
package main

import (
	"bufio"
	"container/list"
	"fmt"
	"os"
	"strconv"
)

func main() {
	var n, x, y int
	fmt.Scan(&n, &x, &y)

	type edge struct{ v, d int }
	ans := make([]int, n+1)
	for i := 1; i <= n; i++ {
		seen := make([]int, n+1)
		seen[i] = 1
		ls := list.New()
		ls.PushBack(i)
		for ls.Len() > 0 {
			v := ls.Remove(ls.Front()).(int)
			if nv := v - 1; nv >= 1 && seen[nv] == 0 {
				seen[nv] = seen[v] + 1
				ans[seen[nv]-1]++
				ls.PushBack(nv)
			}
			if nv := v + 1; nv <= n && seen[nv] == 0 {
				seen[nv] = seen[v] + 1
				ans[seen[nv]-1]++
				ls.PushBack(nv)
			}
			if v == x && seen[y] == 0 {
				seen[y] = seen[v] + 1
				ans[seen[y]-1]++
				ls.PushBack(y)
			}
			if v == y && seen[x] == 0 {
				seen[x] = seen[v] + 1
				ans[seen[x]-1]++
				ls.PushBack(x)
			}
		}
	}

	var wr = bufio.NewWriter(os.Stdout)
	for i := 1; i < n; i++ {
		wr.WriteString(strconv.Itoa(ans[i]/2) + "\n")
	}
	wr.Flush()
}


Measured memory_bytes: 5504
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++ (i))
#define ALL(x) begin(x), end(x)
using ll = long long;
using namespace std;

int main() {
    int n; cin >> n;
    unordered_map<string, int> f;
    REP (i, n) {
        string s; cin >> s;
        sort(ALL(s));
        ++ f[s];
    }
    ll cnt = 0;
    for (auto & it : f) {
        cnt += it.second * (it.second - 1ll) / 2;
    }
    cout << cnt << endl;
    return 0;
}


Measured memory_bytes: 10660
#define _USE_MATH_DEFINES 
#include<iomanip> 
#include<cmath>  
#include<iostream>
#include<fstream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<bitset>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<queue>
#include<deque>
#include<stack>
using namespace std;
typedef long long ll;
#define repi(i,a,b) for(ll i = (ll)(a) ; i < (ll)(b) ; i++)
#define repd(i,a,b) for(ll i = (ll)(a) ; i > (ll)(b) ; i--)
#define rd(x) cin >> x
#define wr(x)  cout << x
#define wrln(x) cout << x << endl

string s;
bool flag[30];

int main() {
	rd(s);
	repi(i, 0, s.length()) {
		int index = (int)(s[i] - 'a');
		flag[index] = true;
	}
	repi(i, 0, 26) {
		if (!flag[i]) {
			char ch = (char)('a' + i);
			wrln(ch);
			return 0;
		}
	}
	wrln("None");

	return 0;
}

Measured memory_bytes: 512
#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define setval(arr,v) memset(arr,v,sizeof(arr));
#define lli long long int
#define ll long long
#define mod 1000000009
#define v vector
#define pb push_back
#define pf pop_front;
#define fi first
#define se second
using namespace std;


void solve()
{
	int d,t,s;
	cin>>d>>t>>s;
	if(d <= s*t)
		cout<<"Yes\n";
	else
		cout<<"No\n";



    
}


int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int t = 1;
    // cin>>t;
    while(t--)
    {
        solve();

    }
    return 0;

}



Measured memory_bytes: 3524
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;

const int MOD = 1e+9 + 7;


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


    // Δx = 1 のときの y 方向の全通りに対する面積の和を求める
    int t = m-1, b = 0;
    long long areay = 0;
    while( m > 0 ){
        areay += (long long) (m - 1) * (y[t] - y[b]) % MOD;
        areay %= MOD;
        m -= 2;
        --t, ++b;
    }

    int l = 0, r = n-1;
    long long areax = 0;
    while( n > 0 ){
        areax += (long long) (n - 1) * (x[r] - x[l]) % MOD;
        areax %= MOD;
        n -= 2;
        ++l, --r;
    }
    /*
    // x 方向の幅をかけて実際の面積にして累積和をとっておく
    vector<long long> sumAreaX(n, 0);
    for( int i = 1; i < n; ++i ){
        sumAreaX[i] = area * (x[i] - x[i-1]) % MOD;
        sumAreaX[i] += sumAreaX[i-1] % MOD;
    }

    // sumAreaX について、上でやったのと似たことをする
    int l = 0, r = n-1;
    long long ans = 0;
    while( n > 0 ){
        ans += (long long) (n - 1) * (sumAreaX[r] - sumAreaX[l]) % MOD;
        n -= 2;
        ++l, --r;
    }
    */
    cout << areax * areay % MOD << endl;

    return 0;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
#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 sp(n) cout << fixed << setprecision(n)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long ll;
using namespace std;
int n;
void dfs(int i,int k,string s){
    if(i==n){
        cout<<s<<endl;
        return;
    }
    rep(j,k){
        char x=j+'a';
        string t=s;
        t.push_back(x);
        dfs(i+1,k,t);
    }
    char x=k+'a';
    s.push_back(x);
    dfs(i+1,k+1,s);
    return;
}
int main(void){
    cin>>n;
    dfs(0,0,"");
}

Measured memory_bytes: 3656
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pb push_back
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define reps(i, m, n) for (int i = m; i <= n; ++i)
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;

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

  ll l, r; cin >> l >> r;

  ll ans = LINF;

  for (ll i = l; i <= r; ++i) {

    ll x = i % 2019;
    if( i != l && x == l % 2019 ) break;

    for (ll j = i + 1; j <= r; ++j) {

      ll y = j % 2019;
      if( j != l && y == l % 2019 ) break;

      ans = min(ans, x * y % 2019);
    }
  }

  cout << ans << endl;

  return 0;
}

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(), (a).end()

using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;

int main() {
  int r, g, b;
  cin >> r >> g >> b;

  string num = to_string(r) + to_string(g) + to_string(b);
  string res = (stoi(num) % 4 == 0) ? "YES" : "NO";

  cout << res << endl;
}

Measured memory_bytes: 256