akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <vector>
#include <string>
#include <cctype>
#include <cmath>
#include <iomanip>
#include <climits>
#include <cfloat>
#include <algorithm>
#include <memory>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef unsigned uint;
typedef long double l_double;

#define vtr vector
#define PB push_back
#define EB emplace_back
#define gcd __gcd
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define st_ct static_cast // <>
#define TEST uint _ {}; cin >> _; while (_--)
#define PI (3.1415926535897932384626433832795)
#define MOD st_ct<int>(1e9 + 7)
#define EPS 1e-9
#define deb1(x) cerr << #x << " -> " << x << endl;
#define deb2(x,y) cerr << "(" << #x << ", " << #y << ") -> (" << x << ", " << y << ")" << endl;
#define deb3(x,y,z) cerr << "(" << #x << ", " << #y << ", " << #z << ") -> (" << x << ", " << y << ", " << z << ")" << endl;
#define debVV(V) cerr << #V << ":\n" << V << endl; // 2D

// 1D
template<typename T>
istream& operator>>(istream &is, vector<T> &A) {
    for (T &v: A)
        is >> v;
    return is;
}

template <typename T>
ostream& operator<<(ostream &os, const vector<T> &A) {
    for (T const &v: A)
        os << v << " ";
    return os;
}

template<typename T>
void vtrV(const vector<T> &A)
{ for (T const &val: A) cout << val << endl; }

// 2D
template<typename T>
istream& operator>>(istream &is, vector<vector<T>> &A) {
    for (vector<T> &i: A)
        for (T &j: i)
            is >> j;
    return is;
}

template <typename T>
ostream& operator<<(ostream &os, const vector<vector<T>> &A) {
    for (vector<T> const &i: A) {
        for (T const &j: i)
            os << j << " ";
        os << endl;
    }
    return os;
}

template<typename T>
void vvtrNS(const vector<vector<T>> &A) {
    for (vector<T> const &i: A) {
        for (T const &j: i)
            cout << j;
        cout << endl;
    }
}

template<typename T>
T cntDigits(const T &N) { return (floor(log10(N)) + 1); }

template<typename T>
bool isPowOfTwo(const T &N) { return (N && (!(N&(N-1)))); }

template<typename T>
T lcm(T a, T b) { return ((a*b)/gcd(a, b)); }
/* -------------------------------------------------------- */
/* -------------------------------------------------------- */

//

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    // cout.setf(std::ios::boolalpha);
    cout<<std::fixed;
    cout<<std::setprecision(6); // default
    /* -------------------------------- */

    string s {};
    cin >> s;

    if (s == "ABC")
    	cout << "ARC" << endl;
    else
    	cout << "ABC" << endl;
    return 0;
}

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

int main() {
	int n,a;
	cin >> n;
	int arr[100];
	for (int i = 0;i<n;i++) {
		cin >> a;
		arr[i] = a;
	}
	for (int i = n - 1; i >= 0; i--) {
		if (i == 0)cout << arr[i];
		else cout << arr[i] << " ";
	}
	cout << endl;
	return 0;
}

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

int main() {
	int n; cin >> n;
	long l[90];
	l[0]=2; l[1]=1;
	for(int i=2; i<=n; ++i) l[i]=l[i-1]+l[i-2];
	cout << l[n] << endl;
	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define sortv(a) sort(a.begin(),a.end())
#define sorta(a,n) sort(a,a+n);

 
int main(){
	int n;
	cin>>n;
	cout<<n*n;
}

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

typedef long long ll;

using namespace std;

int main() {
    string S, T;
    cin >> S >> T;
    string t = T.substr(0, S.size());
    cout << (S == t ? "Yes" : "No") << endl;
    return 0;
}



Measured memory_bytes: 3596
N = int(input())
A = list(map(int, input().split()))
c , boo = 0, 1
while boo:
    boo = 0
    for n in range(N-1):
        if A[n+1] < A[n]:
            A[n+1],A[n] = A[n],A[n+1]
            c += 1
            boo = 1
print(*A)
print(c)





Measured memory_bytes: 5608
#include<algorithm>
#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,x,n) for(int i=x;i<n;i++)
#define int long long
using namespace std;
const int INF=1000000007;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

signed main(){
  int v[3];
  rep(i,3){
    cin>>v[i];
  }
  sort(v,v+3);
  cout<<v[0]+v[1]<<endl;
  return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<cstdio>
#include<stack>
#include<queue>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<tuple>
#include<string.h>
#include <numeric> 
#include<unordered_map>
using namespace std; 
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define pp1(...) "\033[1;47;35m" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define dg(x) debug() << pp1(x)
#define dg1(x) debug() << pp(x)
#define dg2(x,y) debug() << pp(x) pp(y)
#define dg3(x,y,z) debug() << pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << pp(w) pp(x) pp(y) pp(z)
#define int long long
#define all(x) x.begin() , x.end()
#define clr(x) memset(x , 0 , sizeof x);
#define sz(x) (int)x.size()
template<typename T> void db(T x ){ debug() <<">>> " <<  x; }
template<typename T> void db(T x , T y){ debug() <<">>> " <<  x <<" , "<< y; }
template<typename T> void db(T x , T y , T z){ debug() <<">>> "<< x <<" , "<< y <<" , "<< z; }
template<typename T> void db(T x , T y , T z , T a){ debug() <<">>> "<< x <<" , " << y <<" , "<< z <<" , "<< a; }
const int xx = 2e5;
const int Mod = 1e9 + 7;
const int inf = 1e18;
const int Maxn = 20010;
double cal(vector<int> &a) {
  int n = sz(a);
  if(n % 2) {
    return a[(int) n / 2];
  } else{
    return ( (a[(int) n / 2] + (a[(int) n/2 - 1])) / 2.0 );
  }
}
signed main(){
  ios::sync_with_stdio(false);cin.tie(0);

  int N;
  cin >> N;
  vector<int> a , b;
  for(int i = 0; i < N; i++) {
    int x , y;
    cin >> x >> y;
    a.push_back(x);
    b.push_back(y);
  }
  sort(a.begin() , a.end());
  sort(b.begin() , b.end());
  double l = cal(a);
  double r = cal(b);
  dg2(l , r);
  if(N % 2) {
    int ans = r - l + 1;
    cout << ans << '\n';
   } else{
     int ans = (r - l) * 2;
     cout << ans + 1 << '\n';
   }
}

Measured memory_bytes: 6296
def main():
    s = input()
    len_s = len(s)
    
    if s[0] == "A" and \
       s[2:-1].count("C") == 1 and \
       sum(s[i].islower() for i in range(len_s)) == len_s - 2:
       print("AC")
    else:
       print("WA")


main()

Measured memory_bytes: 9128
#include <bits/stdc++.h>
#include <iostream>
//#include <vector>
#define ALL(l)  (l).begin(),(l).end()
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
using namespace std;
typedef long long ll;
ll mod = 1000000007;
ll maxn = 1000000000;

//---------------------------------------------------------------------------------------------------
 

 
 
int main(){
    
    ll n,minans=1000000007,ans=-1000000007,x;
    cin>>n;
    cin>>x;
    minans=min(minans,x);
    rep(i,n-1){
        cin>>x;
        ans=max(ans,x-minans);
        minans=min(minans,x);
    }
    cout<<ans<<endl;
}
  


Measured memory_bytes: 3116
#include<iostream>
#include<string.h>
using namespace std;
int main(){
	char a[100000];
	bool n[26];
	for(int i=1;i<27;i++){
		n[i-1]=0;
	}
	cin>>a;
	for(int i=1;i<=strlen(a);i++){
		n[int(a[i-1])-97]=1;
	}
	for(int i=1;i<27;i++){
		if(n[i-1]==0){
			cout<<char(i+96);
			return 0;
		}
	}
	cout<<"None";
	return 0;
}

Measured memory_bytes: 384
#!/usr/bin/env python3
import re


def mm(s):
    return re.match(r'01|02|03|04|05|06|07|08|09|11|12', s)


def solv(s):
    a = s[0:2]
    b = s[2:]
    if mm(a):
        if mm(b):
            return 'AMBIGUOUS'
        else:
            return 'MMYY'
    else:
        if mm(b):
            return 'YYMM'
        else:
            return 'NA'


if __name__ == '__main__':

    s = input()
    ans = solv(s)

    print(ans)


Measured memory_bytes: 3188
from collections import deque

N = int(input())
amari = []

if N <= 26:
    print(chr(96+N))

else:
    while True: 
        N -= 1

        am = N % 26
        N = N // 26 
        amari.append(am)
        if N == 0:
            break

    answer = deque()
    for i in amari:
        answer.appendleft(chr(97+i))

    for i in answer:
        print(i, end='')

Measured memory_bytes: 9376
import sys
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

N = int(input())

d = defaultdict(int)
for i in range(N):
    S = input()
    d[S] += 1

print('AC x ' + str(d['AC']))
print('WA x ' + str(d['WA']))
print('TLE x ' + str(d['TLE']))
print('RE x ' + str(d['RE']))


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

using namespace std;

int n, x, m;
int l[11], r[11], s[11];
vector<int> ans, cur;
int maxsum;

bool isok() {
	for (int i = 0; i < m; i++) {
		int sum = 0;
		for (int j = l[i]; j <= r[i]; j++) {
			sum += cur[j];
		}
		if (sum != s[i]) return false;
	}
	return true;
}

void rec(int level) {
	if (level >= n) {
		if (isok()) {
			int sum = 0;
			for (int i = 0; i < n; i++) {
				sum += cur[i];
			}
			if (sum > maxsum) {
				maxsum = sum;
				for (int i = 0; i < n; i++) ans[i] = cur[i];
			}
		}
		return;
	}
	
	for (int i = 0; i <= x; i++) {
		cur[level] = i;
		rec(level + 1);
	}
}

int main() {
	cin >> n >> x >> m;
	
	cur.assign(n, 0);
	ans.assign(n, 0);
	maxsum = -1;
	
	for (int i = 0; i < m; i++) {
		cin >> l[i] >> r[i] >> s[i];
		l[i]--; r[i]--;
	}	
	
	rec(0);
	
	if (maxsum == -1) {
		cout << -1 << endl;
		return 0;
	}
	
	for (int i = 0; i < n - 1; i++) {
		cout << ans[i] << " ";
	}
	cout << ans[n - 1] << endl;
	
  	return 0;
}

Measured memory_bytes: 1196
#include <stdio.h>

int main(void){
  int A,B;
  int coins;
  int max;

  scanf("%d %d",&A,&B);

  max = A + (A -1);

  coins = A + B;

  if(coins > max){max = coins;}

  coins = B + (B-1);

  if(coins > max){max = coins;}

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

  return 0;
}


Measured memory_bytes: 128
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(I, a, b) for (int i = (a); i < (b); ++i)
using namespace std;
using ll = long long;

int main() {
  string s1,s2;
  cin >> s1 >> s2;
  
  s2.pop_back();
  
  
  if(s1 == s2){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}

Measured memory_bytes: 3580
import java.util.*;

public class Main {
    
    public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
       int a = sc.nextInt();
       int b = sc.nextInt();
       int area = a * b;
       int perimeter = 2 * (a + b);
       System.out.printf("%d %d\n",area, perimeter);
    }
    
}


Measured memory_bytes: 26428
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

int h, w, s;
int u[40][40];
int sum[40][40];
pair<int, int> memo[40][40][40][40];

pair<int, int> calc(int lx, int ly, int rx, int ry) {
  int area = sum[h][w] - (sum[ry][rx] - sum[ry][lx] - sum[ly][rx] + sum[ly][lx]);
  if (memo[lx][ly][rx][ry].first != -1) { return memo[lx][ly][rx][ry]; }
  pair<int, int> ret(-100, -100);
  if (area <= s) {
    ret = make_pair(1, s - area);
  }
  FOR(x, lx + 1, rx) {
    pair<int, int> lret = calc(lx, ly, x, ry);
    pair<int, int> rret = calc(x, ly, rx, ry);
    ret = max(ret, make_pair(lret.first + rret.first, min(lret.second, rret.second)));
  }
  FOR(y, ly + 1, ry) {
    pair<int, int> lret = calc(lx, ly, rx, y);
    pair<int, int> rret = calc(lx, y, rx, ry);
    ret = max(ret, make_pair(lret.first + rret.first, min(lret.second, rret.second)));
  }
  return memo[lx][ly][rx][ry] = ret;

}
int main() {
  while (scanf("%d %d %d", &h, &w, &s), h|w|s) {
    MEMSET(sum, 0);
    MEMSET(memo, -1);
    REP(y, h) {
      REP(x, w) {
        scanf("%d", &u[y][x]);
        sum[y + 1][x + 1] = sum[y + 1][x] + sum[y][x + 1] - sum[y][x] + u[y][x];
      }
    }
    pair<int, int> ans = calc(0, 0, w, h);
    printf("%d %d\n", ans.first, ans.second);
  }
}

Measured memory_bytes: 20000
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;

#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(ll i=(n)-1;i>=0;i--)
#define range(i,a,n) for(ll i=(a);i<(n);i++)

#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (998244353ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI 3.1415926535897932384

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};

template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S acm(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}
int sgn(const double&r){return (r>EPS)-(r<-EPS);} // a>0  : sgn(a)>0
int sgn(const double&a,const double&b){return sgn(a-b);} // b<=c : sgn(b,c)<=0

ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}
template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1; for(auto s:t){os<<(a?"":" ")<<s;a=0;} return os;}

ll dp[3002][3002][3];
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n,s;
	cin>>n>>s;
	vl v(n);
	rep(i,n)cin>>v[i];
	dp[0][0][0]=1;
	rep(i,n){
		rep(j,s+1){
			(dp[i+1][j][0]+=dp[i][j][0])%=MOD;
			(dp[i+1][j][1]+=dp[i][j][0]+dp[i][j][1])%=MOD;
			(dp[i+1][j][2]+=dp[i][j][0]+dp[i][j][1]+dp[i][j][2])%=MOD;
			if(j-v[i]<0)continue;
			(dp[i+1][j][1]+=dp[i][j-v[i]][1]+dp[i][j-v[i]][0])%=MOD;
			(dp[i+1][j][2]+=dp[i][j-v[i]][1]+dp[i][j-v[i]][0])%=MOD;
		}
	}
	puta(dp[n][s][2]);
}


Measured memory_bytes: 211328
use std::io::prelude::*;

fn input<T>() -> T
where
    T: std::str::FromStr,
{
    let stdin = std::io::stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}

fn main() {
    let n: usize = input();
    let k: usize = input();
    let v: Vec<i32> = (0..n).map(|_| input()).collect();

    let mut ans = i32::min_value();
    for i in 0..k + 1 {
        for j in 0..k + 1 {
            if i + j > k {
                break;
            }
            if i + j > v.len() {
                continue;
            }

            let mut temp = vec![];
            if i + j == v.len() {
                temp = v.clone();
            } else {
                let mut l = 0;
                while l < i {
                    temp.push(v[l]);
                    l += 1;
                }
                l = n - 1;
                while l > n - j - 1 {
                    temp.push(v[l]);
                    l -= 1;
                }
            }

            let mut ans_temp = temp.iter().sum::<i32>();
            if i + j < k {
                temp.sort();
                let cnt = k - i - j;
                let mut l = 0;
                while l < cnt && l < temp.len() {
                    if temp[l] < 0 {
                        ans_temp -= temp[l];
                    } else {
                        break;
                    }
                    l += 1;
                }
            }

            ans = std::cmp::max(ans, ans_temp);
        }
    }

    println!("{}", ans);
}


Measured memory_bytes: 4352
#include <iostream>
#include <string>
#include <queue>
#include <vector>
#include <algorithm>
#include <math.h>
#include <map>
#include <iomanip>
#include <queue>


using namespace std;

int main() {
    string S, ans;
    long long int K;
    cin >> S >> K;

    if (S[0] != '1') {
        ans = S[0];
    }
    else{
        for (int i = 0; i < K; i++) {
            if (S[i] == '1') {
                if (i == K - 1) {
                    ans = '1';
                }
                else {
                    continue;
                }
            }
            else {
                ans = S[i];
                break;
            }            
        }
    }

    cout << ans;

    return 0;

}



Measured memory_bytes: 256
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
		ArrayList<String> s = nextCharArray();
		Collections.sort(s);
		String check = myconv(s, 0);
		if(check.equals("abc")){
			myout("Yes");
		}else{
			myout("No");
		}
	}
	//Method addition frame start



	//Method addition frame end
}


Measured memory_bytes: 33248
package main

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

func lowerBound(a []int, x int) int {
	// (l, r]
	n := len(a)
	l := -1
	r := n
	for r-l > 1 {
		mid := (l + r) / 2
		if x <= a[mid] {
			r = mid
		} else {
			l = mid
		}
	}
	return r
}

func main() {
	var n int
	fmt.Scan(&n)
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	a := make([]int, n)
	for i := range a {
		sc.Scan()
		a[i], _ = strconv.Atoi(sc.Text())
	}
	sc.Scan()
	q, _ := strconv.Atoi(sc.Text())
	for i := 0; i < q; i++ {
		sc.Scan()
		k, _ := strconv.Atoi(sc.Text())
		fmt.Println(lowerBound(a, k))
	}
}



Measured memory_bytes: 5904
n=int(input())
H=list(map(int,input().split()))
flag=0
for i in range(1, n):
    if H[i] -H[i-1]>0:
        H[i]-=1
    elif H[i]==H[i-1]:
        H[i]+=0
    else:
        flag=1
        break
print('No' if flag else 'Yes')

Measured memory_bytes: 14396
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int D;
vector<int> C;
vector<vector<int>> S;

long long getTime() {
	timespec ts;
	clock_gettime(CLOCK_REALTIME_COARSE, &ts);
	long long r = ts.tv_sec;
	r *= 1000000000;
	r += ts.tv_nsec;
	return r;
}

ll calcScore(const vector<int>& T) {
	vector<int> last(26, -1);
	ll score = 0;
	for (int i = 0; i < D; ++ i) {
		last[T[i]] = i;
		score += S[i][T[i]];
		for (int j = 0; j < 26; ++ j) {
			score -= C[j] * (i - last[j]);
		}
	}
	return score;
}

int hoge(const vector<int>& T) {
	vector<int> last(26, -1);
	vector<ll> pena(26);
	for (int i = 0; i < D; ++ i) {
		last[T[i]] = i;
		for (int j = 0; j < 26; ++ j) {
			pena[j] += C[j] * (i - last[j]);
		}
	}
	int r = 0, cnt = 1;
	for (int j = 1; j < 26; ++ j) {
		if (pena[j] > pena[r]) {
			r = j; cnt = 1;
		} else if (pena[j] == pena[r]) {
			if (rand() % ++cnt == 0) { r = j; }
		}
	}
	return r;
}

int main() {
	auto startTime = getTime();

	cin >> D;
	C.resize(26);
	for (auto& x : C) cin >> x;
	S = vector<vector<int>>(D, vector<int>(26));
	for (auto& x : S) for (auto& y : x) cin >> y;

	ll maxScore = -(1LL<<60);
	vector<int> ans;
	vector<int> res(D);
	for (int i = 0; i < D; ++ i) {
		res[i] = 0;
		for (int j = 1; j < 26; ++ j) {
			if (S[i][j] > S[i][res[i]]) res[i] = j;
		}
	}
	auto s = calcScore(res);
	if (s > maxScore) { maxScore = s; ans = res; }
	for (int tt = 1; ; ++ tt) {
		if (tt % 1024 == 0 && getTime() - startTime >= 1900000000) break;
		int i = rand() % D;
		int tmp = res[i];
		if (getTime() - startTime < 500000000 || tt % 2 == 0) {
			res[i] = hoge(res);
		} else {
			res[i] = rand() % 26;
		}
		if (tmp == res[i]) continue;
		auto s1 = calcScore(res);
		if (s1 > s) { s = s1; cerr << s << endl; }
		else { res[i] = tmp; }
		if (s1 > maxScore) { maxScore = s1; ans = res; }
	}
	for (auto x : ans) cout << x + 1 << endl;
}


Measured memory_bytes: 3680
#include <iostream> // cin, cout, cerr
#include <algorithm> // minmax, sort, swap
#include <numeric> // iota
#include <cstdio> // printf, scanf
#include <string> // string, stoi, to_string
#include <vector> // vector
#include <queue> // queue, priority_queue
#include <deque> // deque
#include <map> // key-value pairs sorted by keys
#include <set> // set
#include <iomanip> // cout<<setprecision(n)
#include <functional> // function<void(int)>
#include <cmath>

#ifdef DEBUG
#include "debug.hpp"
#else
#define debug(...)
#endif

#define int long long // at least int64 > 9*10^18
#define ENDL '\n'
#define rep(i,n) for(int i = 0; i < (n); i++)
#define print(i) std::cout << std::setprecision(10) << (i) << '\n'
#define all(v) (v).begin(), (v).end()
/* libraries */

signed main() {
	int n;
	std::cin >> n;
	std::vector<int> a(n);
	rep(i,n) std::cin >> a[i];
	// dp[i][j][k] plates with 1:i, 2:j, 3:k
	std::vector<int> count(4,0);
	rep(i,n) count[a[i]]++;
	debug(count);
	std::vector<std::vector<std::vector<double> > > dp(n+1,std::vector<std::vector<double> >(n+1,std::vector<double>(n+1,-1)));
	std::function<double(int,int,int)> f = [&] (int i, int j, int k) -> double {
		debug(i,j,k);
		if(i==0&&j==0&&k==0) return 0;
		if(i<0||j<0||k<0) return 0;
		if(i>n||j>n||k>n) return 0;
		if(dp[i][j][k]!=-1) return dp[i][j][k];
		return dp[i][j][k]=((n+f(i-1,j,k)*i+f(i+1,j-1,k)*j+f(i,j+1,k-1)*k)/(double)(i+j+k));
	};
	print(f(count[1],count[2],count[3]));
	debug(dp);

	return 0;
}


Measured memory_bytes: 216960
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

ans = 0
for i in [a, b, c, d, e]:
    for j in [a, b, c, d, e]:
        if abs(i-j) > k:
            ans += 1
print("Yay!" if ans == 0 else ":(")

Measured memory_bytes: 38256
n=int(input())
t=[]
for _ in range(n):
  t.append(int(input()))
import fractions
# 最小公倍数
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

# n個の数字の最小公倍数
import functools
def lcmn(nums):
        return functools.reduce(lcm, nums)
print(lcmn(t))

Measured memory_bytes: 5076
#include <cstdio>
#include <algorithm>
#include <functional>

int k, n;
int l[50];
int ans;

int main(){
	scanf("%d %d", &n, &k);
	for(int i=0; i<n; ++i) scanf("%d", &l[i]);
	std::sort(l, l+n, std::greater<int>() );
	for(int i=0; i<k; ++i) ans += l[i];
	printf("%d\n", ans);
}

Measured memory_bytes: 128
N = int(input())
v = list(map(int, input().split()))

first = {}
second = {}

for x in range(N):
    if x % 2 == 0:
        first.setdefault(v[x], 0)
        first[v[x]] += 1
    else:
        second.setdefault(v[x], 0)
        second[v[x]] += 1

first_sorted = sorted(first.items(), key=lambda x: x[1], reverse=True)
second_sorted = sorted(second.items(), key=lambda x: x[1], reverse=True)
sum_change_1 = 0

first_value = 0
for y in range(len(first_sorted)):
    if y == 0:
        first_value = first_sorted[y][0]
    if y != 0:
        sum_change_1 += first_sorted[y][1]

for z in range(len(second_sorted)):
    if first_value != second_sorted[0][0]:
        if z != 0:
            sum_change_1 += second_sorted[z][1]
    else:
        if z != 1:
            sum_change_1 += second_sorted[z][1]

sum_change_2 = 0

first_value = 0
for v in range(len(second_sorted)):
    if v == 0:
        first_value = second_sorted[v][0]
    if v != 0:
        sum_change_2 += second_sorted[v][1]

for w in range(len(first_sorted)):
    if first_value != first_sorted[0][0]:
        if w != 0:
            sum_change_2 += first_sorted[w][1]
    else:
        if w != 1:
            sum_change_2 += first_sorted[w][1]

print(min(sum_change_1, sum_change_2))


Measured memory_bytes: 66052
/*
 * Problem: Prime Numbers
 * Author: Khan
 * Date: 11th October, 2017
 */
#include <stdio.h>

int cnt = 0;

int isPrime(int x)
{
    if(x < 2)
        return 0;
    else if(x == 2)
        return 1;
    if(x % 2 == 0)
        return 0;
    for (int i = 3; i * i <= x; i += 2)
    {
        if(x % i == 0)
            return 0;
    }
    return 1;
}

int main(int argc, char const *argv[])
{
    //freopen("sample.txt", "r", stdin);
    int N, a;
    scanf("%d", &N);
    for (int i = 0; i < N; ++i)
    {
        scanf("%d", &a);
        if(isPrime(a))
            cnt++;
    }
    printf("%d\n", cnt);
    return 0;
}

Measured memory_bytes: 1724
K,N = map(int, input().strip().split())
A = sorted(list(map(int, input().strip().split())))
sum_d = 0
max_d = 0
for i in range(N-1):
  d = A[i+1] - A[i]
  sum_d += d
  max_d = max(max_d, d)
d = (K - A[-1]) + A[0]
sum_d += d
max_d = max(max_d, d)

print(sum_d - max_d)


Measured memory_bytes: 78540
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <bitset>
#include <vector>
#include <queue>
#include <ctime>
#include <numeric>
#include <cstdlib>

using namespace std;

typedef long long ll;
#define FOR(i,a,b)   for(ll i = (a); i < (b); i++ )
#define REP(i, n)    FOR(i,0,n)
typedef pair< ll, ll >   cp2;
typedef pair< ll, cp2 >   cp3;
#define fi first
#define se second
#define sec  se.fi
#define thr  se.se
const ll mod = 1000000007;
//              123456789

 
///////////////////////////////////////////////
//
//
///////////////////////////////////////////////

////////////////////////////////////////////////
////////////////////////////////////////////////

int N;
int A;
bool jadge = false;
bool ans = true;
bool coner = true;

int main(){
	
	cin>>N>>A;

	if( N == 1){
		if( A % 2 ) puts("first");
		else{	  puts("second");}
	}
	else{
		if( A == 1 ) coner = false;
		if( A % 2 ) jadge = true;
		REP( i, N-1 ){
			scanf("%d", &A);
			if( A == 1 ) coner = false;
			if( A % 2 != jadge ) ans = false;
		}
		
		if( !ans || !coner ) puts("first");
		else{	 puts("second");}
	}
		
	return 0;
	
}

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

// varibable settings
#define infile "../test/sample-1.in"
#define int long long //{{{
const int INF=1e18;
const int MOD=1e9+7; //}}}

// define basic macro {{{
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define _rrep(i,n) rrepi(i,0,n)
#define rrepi(i,a,b) for(int i=(int)((b)-1);i>=(int)(a);--i)
#define rrep(...) _overload3(__VA_ARGS__,rrepi,_rrep,)(__VA_ARGS__)
#define each(i,a) for (auto&& i : a)
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define pb(a) push_back(a)
#define mp(a, b) make_pair(a, b)
#define uni(x) sort(all(x));x.erase(unique(all(x)),x.end())
#define ub upper_bound
#define lb lower_bound
#define posl(A, x) (lower_bound(all(A), x)-A.begin())
#define posu(A, x) (upper_bound(all(A),x)-A.begin())
template<class T> inline void chmax(T &a, const T &b) { if((a) < (b)) (a) = (b); }
template<class T> inline void chmin(T &a, const T &b) { if((a) > (b)) (a) = (b); }

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long double ld;
typedef pair<int,int> pii;
typedef tuple<int,int,int> iii;

template<typename T> using PQ = priority_queue<T, vector<T>, greater<T>>;
struct Fast { Fast(){ std::cin.tie(0); ios::sync_with_stdio(false); } } fast;

#if defined(PCM) || defined(LOCAL)
  #include "lib/dump.hpp"
#else
  #define dump(...) 42
  #define dump_1d(...) 42
  #define dump_2d(...) 42
#endif
//}}}

int solve(){
  int n;cin>>n;
  vector<int> p(n);
  rep(i, n) {
    cin>>p[i];
  }
  dump(p);

  int res=0;
  rep(i, 1, n-1){
    if (p[i]<p[i-1] and p[i]>p[i+1]){ res++; }
    if (p[i]<p[i+1] and p[i]>p[i-1]){ res++; }
  }
  cout << res << endl;
  return 0;
}

signed main() { //{{{
#ifdef INPUT_FROM_FILE
  std::ifstream in(infile);
  std::cin.rdbuf(in.rdbuf());
#endif
  solve();
  return 0;
} //}}}


Measured memory_bytes: 256
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#define SIZE 200005

using namespace std;
typedef long long int ll;

int left[SIZE],right[SIZE];
int A[SIZE];

int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++) scanf("%d",&A[i]);
	vector <int> vec;
	for(int i=0;i<n;i++)
	{
		left[i]=0;
		while(!vec.empty())
		{
			int id=vec[vec.size()-1];
			if(A[id]>A[i])
			{
				right[id]=i;
				vec.pop_back();
			}
			else
			{
				left[i]=id+1;
				break;
			}
		}
		vec.push_back(i);
	}
	while(!vec.empty())
	{
		int id=vec[vec.size()-1];
		right[id]=n;
		vec.pop_back();
	}
	ll ret=0;
	for(int i=0;i<n;i++)
	{
		ret+=(ll) A[i]*(ll) (i-left[i]+1)*(ll) (right[i]-i);
	}
	printf("%lld\n",ret);
	return 0;
}


Measured memory_bytes: 3444
#include "bits/stdc++.h"
#define MAXN 100009
#define INF 1000000007
#define mp(x,y) make_pair(x,y)
#define all(v) v.begin(),v.end()
#define pb(x) push_back(x)
#define wr cout<<"----------------"<<endl;
#define ppb() pop_back()
#define tr(ii,c) for(__typeof((c).begin()) ii=(c).begin();ii!=(c).end();ii++)
#define ff first
#define ss second
#define my_little_dodge 46
#define debug(x)  cerr<< #x <<" = "<< x<<endl;
using namespace std;

typedef long long ll;
typedef pair<int,int> PII;
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
char s[MAXN];
int main(){
    //~ freopen("file.in", "r", stdin); 
	scanf("%s",s+1);
	int n=strlen(s+1);
	vector<int>pos;
	for(int i=1;i<=n;i++)
		if(s[i]!='x')
			pos.pb(i);		
	int sz=pos.size();		
	if(!sz)
		return puts("0")*0;
	//~ tr(it,pos)
		//~ cout<<*it<<" ";
	//~ cout<<endl;	
	for(int i=0;i<sz;i++)
		if(s[pos[i]]!=s[pos[sz-1-i]])
			return puts("-1")*0;
	int ans=abs((pos[0]-1)-(n-pos[sz-1]));
	for(int i=0;i<sz;i++){
		if(i+1>=sz-i-1)
			break;
		int a=pos[i+1]-pos[i];
		int b=pos[sz-i-1]-pos[sz-i-2];
		ans+=abs(a-b);
	}
	printf("%d\n",ans);
	return 0;
}


Measured memory_bytes: 1020
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a+b == 15){
            System.out.println("+");
        }
        else if(a*b== 15){
            System.out.println("*");
        }
        else{
            System.out.println("x");
        }
    }
}



Measured memory_bytes: 21972
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define ll long long

int gcd(int a,int b){
  while(b){
    a%=b;
    swap(a,b);
  }
  return a;
}

int main(){
  int N;
  cin>>N;
  vector<int> A(N);
  rep(i,N) cin>>A[i];
  vector<int> L(N),R(N);
  L[0]=A[0];
  R[N-1]=A[N-1];
  rep(i,N) if(i) L[i]=gcd(L[i-1],A[i]);
  rep(i,N) if(i) R[N-1-i]=gcd(R[N-i],A[N-1-i]);
  int ans=max(L[N-2],R[1]);
  rep(i,N) if(i&&(N-1-i)) ans=max(ans,gcd(L[i-1],R[i+1]));
  cout<<ans<<endl;
}

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

int x[110000];
int nxt[20][110000];

inline int calc(int L, int n) {
	for (int i = 0; i < 20; i++) if (n & (1 << i)) L = nxt[i][L];
	return L;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	int n; cin >> n;
	for (int i = 1; i <= n; i++) cin >> x[i];
	int L; cin >> L;
	for (int i = 1; i <= n; i++) {
		nxt[0][i] = upper_bound(x + 1, x + n + 1, x[i] + L) - x - 1;
	}
	for (int i = 1; i < 20; i++) for (int j = 1; j <= n; j++) nxt[i][j] = nxt[i - 1][nxt[i - 1][j]];
	int Q; cin >> Q;
	for (int i = 1; i <= Q; i++) {
		int L, R; cin >> L >> R;
		if (R < L) swap(L, R);
		int st = 0, en = 200000;
		while (en - st > 1) {
			int mid = st + en >> 1;
			if (calc(L, mid) >= R) en = mid;
			else st = mid;
		}
		cout << en << "\n";
	}
	return 0;
}



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

#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int INF = pow(2,29);
const int MOD = 1000000007;

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

  rep(i,s.length()) {
    int num = 26 - (s[i]-'a');
    if (i!=s.length()-1 && num<=K && s[i]!='a') { K-=num; s[i]='a'; }
    else if (i==s.length()-1) s[i] = 'a' + (s[i]-'a'+K)%26;
  }
  cout << s << endl;
  return 0;
}

Measured memory_bytes: 512
A, B = $stdin.gets.chomp.split(' ').map(&:to_i)
a = A - 1
b = B - 1
width = 100
height_a = [(a / 50.0).ceil * 2, 2].max
height_b = [(b / 50.0).ceil * 2, 2].max
height = height_a + height_b

print height, ' ', width, "\n"

100.times do |i|
    if i % 2 == 1
        print '#' * 100, "\n"
        break if a == 0
    else
        100.times do |j|
            if j % 2 == 0 && a > 0
                print '.'
                a -= 1
            else
                print '#'
            end
        end
        print "\n"
    end
end

100.times do |i|
    if i % 2 == 0
        print '.' * 100, "\n"
    else
        100.times do |j|
            if j % 2 == 0 && b > 0
                print '#'
                b -= 1
            else
                print '.'
            end
        end
        break if b == 0
        print "\n"
    end
end

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

#define rep(i, n) for(int i = 0; i<(n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef long long ll;

const int mod = 1000000007;

struct mint {
    ll x; // typedef long long ll;
    mint(ll x = 0) : x(x % mod) {}

    mint &operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }

    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }

    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }

    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }

    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const {
        return pow(mod - 2);
    }

    mint &operator/=(const mint a) {
        return (*this) *= a.inv();
    }

    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
};

struct combination {
    vector<mint> fact, ifact;

    combination(int n) : fact(n + 1), ifact(n + 1) {
        fact[0] = 1;
        for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
        ifact[n] = fact[n].inv();
        for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
    }

    mint operator()(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n] * ifact[k] * ifact[n - k];
    }
} comb(100005);

mint f(int n, int k) {
    if (n < 0) return 0;
    // nPk = nCk * k!
    mint res = comb(n, k);
    res *= comb.fact[k];
    return res;
}

int main() {
    int N, M;
    cin >> N >> M;
    vector<ll> x(N), y(M);
    rep(i, N) cin >> x[i];
    rep(i, M) cin >> y[i];

    sort(x.begin(), x.end());
    sort(y.begin(), y.end());
    
    mint sumX = 0; // x方向の距離の総和
    rep(i, N) {
        sumX += mint(i) * mint(x[i]);
        sumX -= mint(N - 1 - i) * mint(x[i]);
    }

    mint sumY = 0; // y方向の距離の総和
    rep(i, M) {
        sumY += mint(i) * mint(y[i]);
        sumY -= mint(M - 1 - i) * mint(y[i]);
    }

    cout << (sumX * sumY).x << endl;
}

Measured memory_bytes: 3328
from heapq import *
N = int(input())
A = list(map(int,input().split()))
L,C,R = A[:N],A[N:2*N],A[2*N:]
F = [sum(L)]
heapify(L)

for c in C:
  F.append(F[-1]+c-heappushpop(L,c))

R = [-r for r in R]
B = [sum(R)]
heapify(R)

for c in reversed(C):
  B.append(B[-1]-c-heappushpop(R,-c))

print(max(f+b for f,b in zip(F,reversed(B))))

Measured memory_bytes: 42868
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}

int main(){
    int a, b; cin >> a >> b;
    if(a<=12 && a>=6) b/=2;
    if(a<=5) b= 0;
    cout << b <<endl;
}

Measured memory_bytes: 256
fun main(args: Array<String>) {
    val mod = 1000000007L
    val (X, Y) = readInputLine().split(" ").map { it.toLong() }
    
    var topPos = Pair(0L, 0L)
    var nowCnt = 0
    
    while (true) {
        if (topPos.first + topPos.second > X + Y) {
            println(0)
            return
        }
        if (topPos.first + topPos.second == X + Y) {
            if (Y < topPos.second) {
                println(0)
                return
            }
            if (Y - topPos.second <= nowCnt) {
                break
            }
            println(0)
            return
        }
        
        nowCnt++
        topPos = Pair(topPos.first + 2L, topPos.second + 1L)
    }

    val factorial = LongArray(nowCnt + 1)
    val inverse = LongArray(nowCnt + 1)
    val factorialInverse = LongArray(nowCnt + 1)

    factorial[0] = 1L
    factorial[1] = 1L
    inverse[0] = 1L
    inverse[1] = 1L
    factorialInverse[0] = 1L
    factorialInverse[1] = 1L
    for (i in 2..nowCnt) {
        factorial[i] = (factorial[i - 1] * i.toLong() % mod)
        inverse[i] = (mod - inverse[mod.toInt() % i] * (mod / i.toLong()) % mod)
        factorialInverse[i] = (factorialInverse[i - 1] * inverse[i] % mod)
    }
    println(factorial[nowCnt] * (factorialInverse[nowCnt - (Y - topPos.second).toInt()] * factorialInverse[(Y - topPos.second).toInt()] % mod) % mod)
}

fun readInputLine(): String {
    return readLine()!!
}



Measured memory_bytes: 54488
#include<iostream>
#include<set>
#include<vector>
using namespace std;

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

void Main() 
{
	set<int> st;
	rep(i, 3) {
		int x;
		cin >> x;
		st.insert(x);
	}
	if (st.size() != 2) {
		cout << "No" << endl;
	}
	else {
		cout << "Yes" << endl;
	}
}

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

Measured memory_bytes: 256
package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"sort"
	"strconv"
)

func main() {
	n := readInt()
	a := readIntSlice(n)

	// unique
	d := make(map[int]bool)
	// 複数ある
	m := make(map[int]bool)

	for i := 0; i < n; i++ {
		if _, ok := d[a[i]]; ok {
			// 2つ以上ある場合は割れる数がある
			m[a[i]] = true
		} else {
			d[a[i]] = false
		}
	}

	// fmt.Println("debug:", d)

	keys := []int{}

	for i := range d {
		keys = append(keys, i)
	}

	sort.Ints(keys)

	for _, v := range keys {
		// fmt.Println("v", v, "dv", d[v])

		//チェック済み
		if d[v] == true {
			continue
		}

		for j := 2; j*v <= keys[len(keys)-1]; j++ {
			// fmt.Println("jv", j*v)
			if _, ok := d[j*v]; ok {
				d[j*v] = true
			}
		}

	}

	//重複は true
	for i := range m {
		d[i] = true
	}
	// fmt.Println("d", d)
	answer := 0
	for _, v := range d {
		if v == false {
			answer++
		}
	}

	fmt.Println(answer)
}

var (
	scanner *bufio.Scanner
)

func init() {
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
}

func readInt() int {
	var t string

	if scanner.Scan() {
		t = scanner.Text()
	}

	n, err := strconv.Atoi(t)
	if err != nil {
		log.Fatal(err)
	}

	return n

}

func readIntSlice(n int) []int {
	s := make([]int, n)
	var t string

	for i := 0; i < int(n); i++ {
		if scanner.Scan() {
			t = scanner.Text()
		}

		num, err := strconv.Atoi(t)
		if err != nil {
			log.Fatal(err)
		}
		s[i] = num
	}

	return s
}


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

int main() {
  int N,k=0;
  cin>>N;
  int t = N;
  while(t>0){
    k =  k+t%10;
    t /= 10;
  }
  	if(N % k == 0) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;

}


Measured memory_bytes: 256
#include <stdio.h>

#define SIZE 3

int main() {
    int data[SIZE];
    int temp, i;
    int cnt5 = 2;
    int cnt7 = 1;

    temp = scanf("%d %d %d", &data[0], &data[1], &data[2]);

    for (i = 0; i < SIZE; i++)
    {
        if (data[i] == 5)
        {
            cnt5--;
        }
        else if (data[i] == 7)
        {
            cnt7--;
        }
    }
    if (cnt5 == 0 && cnt7 == 0) {
        puts("YES");
    }
    else {
        puts("NO");
    }
}

Measured memory_bytes: 128
import math

a, b, h, m = map(int,input().split())

h_ang = h*360/12+m*30/60
m_ang = m*360/60

if h_ang - m_ang > 180:
  ang = m_ang-h_ang
  if ang < 0:
    ang += 360
else:
  ang = h_ang-m_ang
  if ang < 0:
    ang += 360
    
ans = a*a+b*b-2*a*b*math.cos(math.radians(ang))
    
print(math.sqrt(ans))

Measured memory_bytes: 62372
#include <bits/stdc++.h>
        #define SpeeD ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
        #define ll long long
        //pair<int, int> *p=new pair<int, int>[n];
        //std::vector<pair<int,int>> vp;
        //v.push_back(make_pair(x,y))
        //pair<int, int> p[1001];
        //string *s=new string [n];
         
        //int freq[e];
        //freq[a[i]-'a']++; freq[a[i]]++;
        using namespace std;  
            ll t,n,c1,c2,c3,sum,m,mn,k,r;
           
     
        int main(void)
        {
            SpeeD;  
            cin>>n>>r;
            if (n<=10)
           cout<<(r+1000) - (100*n);
           else cout<<r;
        }
        

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <complex>
#include <utility>
#include <vector>
#include <string>
#include <queue>
#include <tuple>
#include <cmath>
#include <bitset>
#include <cctype>
#include <set>
#include <map>
#include <numeric>
#include <functional>
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(ll i=ll(a);i<ll(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
#define PRINT(V) cout << V << "\n"
#define SORT(V) sort((V).begin(),(V).end())
#define RSORT(V) sort((V).rbegin(), (V).rend())
using namespace std;
using ll = long long;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
inline void Yes(bool condition){ if(condition) PRINT("Yes"); else PRINT("No"); }
template<class itr> void cins(itr first,itr last){
    for (auto i = first;i != last;i++){
        cin >> (*i);
    }
}
template<class itr> void array_output(itr start,itr goal){
    string ans = "",k = " ";
    for (auto i = start;i != goal;i++) ans += to_string(*i)+k;
    if (!ans.empty()) ans.pop_back();
    PRINT(ans);
}
ll gcd(ll a, ll b) {
    return a ? gcd(b%a,a) : b;
}
const ll INF = 1e18;
const ll MOD = 1000000007;
typedef pair<ll,ll> P;
const ll MAX = 20000;
constexpr ll nx[8] = {1,0,-1,0,-1,-1,1,1};
constexpr ll ny[8] = {0,1,0,-1,-1,1,-1,1};
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n,m;
    cin >> n >> m;
    vector<ll> s(n),t(m);
    cins(all(s));
    cins(all(t));
    vector<vector<ll>> dp(n+1,vector<ll>(m+1,0));
    rep(i,n+1) dp[i][0] = 1;
    rep(i,m+1) dp[0][i] = 1;
    rep(i,1,n+1){
        rep(j,1,m+1){
            if (s[i-1] == t[j-1]){
                dp[i][j] += (dp[i-1][j]+dp[i][j-1])%MOD;
            }
            else{
                dp[i][j] += (dp[i-1][j]+dp[i][j-1]+MOD-dp[i-1][j-1])%MOD;
            }
        }
    }
    PRINT(dp[n][m]);
}



Measured memory_bytes: 31616
#include <bits/stdc++.h>
using namespace std;
#define loop(i,b,e) for(int i=b;i<=e;i++)
#define loop2(i,e,b) for(int i=e;i>=b;i--)
#define io ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define fi first
#define se second
typedef long long ll;
typedef unsigned long long ull;
const int N = 1e6 + 5;
const ll mod = 1e9 + 7;
const int oo = 1e9;

string s;

int main() {
	int ans = 700;
	cin >> s;
	for (int i = 0; i < s.length(); ++i){
		if(s[i]=='o') ans+=100;
	}
	cout << ans;
}

Measured memory_bytes: 256