akhauriyash/Code-Regression huggingface dataset:
using System;

namespace abc057_c
{
    class Program
    {
        static void Main(string[] args)
        {
            long n = long.Parse(Console.ReadLine());
            int max = 0;
            for (int i = 1; i <= Math.Sqrt(n); i++)
            {
                if (n % i == 0)
                {
                    max = i;
                }
            }
            Console.WriteLine(Math.Max((n / max).ToString().Length, max.ToString().Length));
        }
    }
}

Measured memory_bytes: 13140
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();

		if((a==5 || a==7) && (b==5 || b==7) && (c==5 || c==7) && a+b+c==17) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}

		//(a==5 || a==7) && (b==5 || b==7) && (c==5 || c==7) &&
	}
}


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

using namespace std;

int main() {
	int n; 
	while (cin >> n && n) {
		vector<vector<int> > t(n, vector<int>(n + 1));
		for (int i = 0; i < n; ++i)
			for (int j = 0; j < n + 1; ++j)
				cin >> t[i][j];
		vector<int> dp(1 << n, 1e9); dp[0] = 0;
		for (int i = 0; i < (1 << n); ++i) {
			for (int j = 0; j < n; ++j) {
				if (i & (1 << j)) continue;
				int mini = t[j][0];
				for (int k = 0; k < n; ++k) {
					if (i & (1 << k)) mini = min(mini, t[j][k + 1]);
				}
				dp[i | (1 << j)] = min(dp[i | (1 << j)], dp[i] + mini);
			}
		}
		cout << dp[(1 << n) - 1] << endl;
	}

	return 0;
}


Measured memory_bytes: 3308
A = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(A[int(input())])

Measured memory_bytes: 2940
#include <stdio.h>

int main(void){
  int a, b;
  scanf("%d %d", &a, &b);
  if(a == 1) a = 14;
  if(b == 1) b = 14;
  if(a > b) printf("Alice\n");
  if(a < b) printf("Bob\n");
  if(a == b) printf("Draw\n");
  return 0;
}

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

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).begin(),(x).rend()

typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> PII;
typedef pair<long long,long long> PLL;

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

	int ma=0,mi=1e+5;
	for (int i = 0; i < m; ++i){
		int l,r;
		cin>>l>>r;
		ma=max(ma,l);
		mi=min(mi,r);
	}

	if(ma<=mi)
		cout<<mi-ma+1<<endl;
	else
		cout<<0<<endl;



	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define lp(i, n) for(int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define int long long
#define mod 1000000007

void solve() {
        int n; cin >> n;
        int cnt = 1;
        lp(i, n) {
                int a; cin >> a;
                if (a == cnt) cnt++;
        }
        cout << (cnt == 1? -1: n - cnt + 1)<< "\n";

        return;
}

int32_t main() {
ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
        int t = 1;
        //cin >> t;
        while ( t-- ) {
                solve();
        }
return 0;
}


Measured memory_bytes: 256
using System;
using System.Linq;

class Program
{
  static void Main(string[] args)
  {
    int N = int.Parse(Console.ReadLine());
    long[] A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
    Array.Sort(A);
    Array.Reverse(A);
    Console.WriteLine(Math.Abs(A[0] - A[A.Length - 1]));
  }
}

Measured memory_bytes: 28176
#include <cstdio>
using namespace std;
unsigned long long fib[45];
int main() {
    fib[0] = 1;
    fib[1] = 1;
    int n;
    scanf("%d", &n);
    for (int i = 2; i <= n; i++) {
    	fib[i] = fib[i - 1] + fib[i - 2];
	}
	printf("%lld\n", fib[n]);
    return 0;
}


Measured memory_bytes: 2760
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<queue>
#include<stack>
using namespace std;
using ll = long long;

int main(){
    ll A, B;
    cin >> A >> B;
    ll r;
    r = A % B;
    ll x = A * B;
    while(r!=0){
    A = B;
    B = r;
    r = A % B;
  }
    cout << x/B;
}

Measured memory_bytes: 256
#include <cstdio>
using namespace std;
const int N=105;
int n,m;
char map[N][N];
int sx,sy;
short sumr[N][N],sumv[N][N],f[N][N][N][N];
inline void upd(short &x,short y){
	(x<y)?x=y:0;
}
inline int max(int x,int y){
	return x>y?x:y;
}
inline int min(int x,int y){
	return x<y?x:y;
}
inline int get(short *a,int l,int r){
	return a[r]-a[l-1];
}
void readData(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++) scanf("%s",map[i]+1);
}
void init(){
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
			if(map[i][j]=='E'){
				sx=i;
				sy=j;
				break;
			}
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
			sumr[i][j]=sumr[i][j-1]+(map[i][j]=='o');
	for(int j=1;j<=m;j++)
		for(int i=1;i<=n;i++)
			sumv[j][i]=sumv[j][i-1]+(map[i][j]=='o');
}
void dp(){
	int ud=sx-1,dd=n-sx,ld=sy-1,rd=m-sy;
	for(int u=0;u<=ud;u++)
		for(int d=0;d<=dd;d++)
			for(int l=0;l<=ld;l++)
				for(int r=0;r<=rd;r++){
					int L=max(sy-l,r+1),R=min(sy+r,m-l);
					if(L<=R){
						upd(f[u+1][d][l][r],f[u][d][l][r]+(((sx-(u+1))>=d+1)?get(sumr[sx-(u+1)],L,R):0));
						upd(f[u][d+1][l][r],f[u][d][l][r]+(((sx+(d+1))<=n-u)?get(sumr[sx+(d+1)],L,R):0));
					}
					L=max(sx-u,d+1); R=min(sx+d,n-u);
					if(L<=R){
						upd(f[u][d][l+1][r],f[u][d][l][r]+(((sy-(l+1))>=r+1)?get(sumv[sy-(l+1)],L,R):0));
						upd(f[u][d][l][r+1],f[u][d][l][r]+(((sy+(r+1))<=m-l)?get(sumv[sy+(r+1)],L,R):0));
					}
				}
	printf("%hd\n",f[ud][dd][ld][rd]);
}
int main(){
	readData();
	init();
	dp();
	return 0;
}


Measured memory_bytes: 209152
#include<bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define ll long long
#define all(x) (x).begin(),(x).end()
#define rep(i, n) for(ll i = 0; i < n; i++)
const ll INF = 1LL << 60;

ll mpow(ll x, ll n, ll mod){//繰り返し二乗法 計算量O(logN)
    ll ans = 1;
    while(n != 0){
        if(n&1) ans = ans * x % mod;
        x = x * x % mod;
        n  = n >> 1;
    }
    return ans;
}


int main(){
    int K;
    cin >> K;
    ll tmp = 7;
    rep(i, 1000000){
        if(tmp%K == 0){
            cout << i + 1 << endl;
            return 0;
        }
        ll t = mpow(10, i + 1, K);
        t *= 7;
        tmp += t;
        t %= K;
    }
    cout << -1 << endl;
}

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

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

#define INF 2e9
#define ALL(v) v.begin(), v.end()

int func(int num){
  int sum=0;
  while (num>0){
    sum+=num%10;
    num/=10;
  }
  return sum;
}


int main(int argc, char const *argv[]) {
  int n,a,b;
  cin>>n>>a>>b;
  int total=0;
  for(int i=1;i<=n;++i){
    int sum=func(i);
    if (sum>=a && sum<=b)total+=i;
  }
  cout<<total<<endl;
  return 0;
}


Measured memory_bytes: 256
from itertools import accumulate

N, Q = map(int, input().split())
S = input()

t = [0] * N

for i in range(1, N):
    s = S[i - 1:i + 1]
    if s == 'AC':
        t[i] += 1

T = list(accumulate(t))

for i in range(Q):
    l, r = map(int, input().split())
    print(T[r - 1] - T[l - 1])


Measured memory_bytes: 8572
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n, m;
	int taro[100];
	int hanako[100];
	while (cin >> n >> m && n != 0 && m != 0)
	{
		int taroSum = 0;
		int hanakoSum = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> taro[i];
			taroSum += taro[i];
		}

		sort(taro, taro + n);

		for (int i = 0; i < m; i++)
		{
			cin >> hanako[i];
			hanakoSum += hanako[i];
		}

		sort(hanako, hanako + m);
		bool flag = false;
                int sum = 11451419;
		int minTaro = taro[n - 1];
		int minHanako = hanako[m - 1];
		for (int i = 0; i < n; i++)
		{
			for (int j = 0; j < m; j++)
			{
				if (taroSum + hanako[j] - taro[i] == hanakoSum + taro[i] - hanako[j] && taro[i] + hanako[j] < sum )
				{
					minTaro = taro[i];
					minHanako = hanako[j];
                                        sum = minTaro + minHanako;
					flag = true;
				}
			}
		}

		if (flag)
		{
			cout << minTaro << " " << minHanako << endl;
		}
		else
		{
			cout << -1 << endl;
		}

	}
	return 0;
}

Measured memory_bytes: 1180
import java.util.Scanner;

public class Main {
  private static class Counter {
    int val = 0;
  }
  private static void solve(int h, int w, boolean[][] cell) {
    Counter[][] horizontal = new Counter[h][w];
    for (int i = 0; i < h; i++) {
      Counter c = new Counter();
      for (int j = 0; j < w; j++) {
        if (cell[i][j]) {
          c.val += 1;
          horizontal[i][j] = c;
        } else {
          c = new Counter();
        }
      }
    }
    Counter[][] vertical = new Counter[h][w];
    for (int i = 0; i < w; i++) {
      Counter c = new Counter();
      for (int j = 0; j < h; j++) {
        if (cell[j][i]) {
          c.val += 1;
          vertical[j][i] = c;
        } else {
          c = new Counter();
        }
      }
    }
    int max = 0;
    for (int i = 0; i < h; i++) {
      for (int j = 0; j < w; j++) {
        if (cell[i][j]) {
          max = Math.max(max, horizontal[i][j].val + vertical[i][j].val - 1);
        }
      }
    }
    System.out.println(max);
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] hw = sc.nextLine().split(" ");
    int h = Integer.parseInt(hw[0]);
    int w = Integer.parseInt(hw[1]);
    boolean[][] cell = new boolean[h][w];
    for (int i = 0; i < h; i++) {
      String row = sc.nextLine();
      for (int j = 0; j < w; j++) {
        cell[i][j] = row.charAt(j) == '.';
      }
    }
    solve(h, w, cell);
    sc.close();
  }
}


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

using namespace std;

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

	if(a == b && b == c) printf("No\n");
	else if (a == b || b == c || a == c) printf("Yes\n");
	else printf("No\n");
	
	return 0;
}

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

int main(){
    string s,t;
    cin>>s>>t;
    int n=s.length();
    int m=t.length();
    string ans="UNRESTORABLE";
    for(int i=0;i<=n-m;i++){
        bool flag=true;
        string u=s;
        for(int j=0;j<m;j++){
            if(s[i+j]!=t[j]&&s[i+j]!='?') flag=false;
            u[i+j]=t[j];
        }
        if(flag){
            replace(u.begin(),u.end(),'?','a');
            ans=u;
        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 3612
#include<iostream>
using namespace std;
int main(){
  int n,x,r,i,j,k;
  cin >> n >>x;
  while(n!=0 || x!=0){
        r=0;
      for(i=1;i<=n;i++)
      {
          for(j=i+1;j<n;j++)
          {
              for(k=j+1;k<=n;k++)
              {
                  if(i+j+k==x)
                    r=r+1;
              }
          }
      }


    cout<<r<<endl;
    cin>>n>>x;
  }


  return 0;
}



Measured memory_bytes: 3092
#define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1000000007;

long long facctorialMethod(long long k){
    long long sum = 1;
    for (long long i = 1; i <= k; ++i)
    {
        sum = sum*i%MOD;
    }
    return sum;
}
int main(){
	long long N,M;
	cin >> N >> M;
	if(abs(N-M)>1)cout << 0 << endl;
	else if(abs(N-M)==1){
	cout << (facctorialMethod(N)*facctorialMethod(M))%MOD << endl;
	}
	else cout << ((facctorialMethod(N)*facctorialMethod(M))%MOD)*2%MOD << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
#define tii tuple<int,int,int>
signed main(){
  int N;
  cin>>N;
  string ans="second";
  rep(i,0,N){
    int X;
    cin>>X;
    if(X%2==1){
      ans="first";
      break;
    }
  }
  cout<<ans;
  }


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

const int MAX_N = 100001;

int n,m,s,t,d[MAX_N],a[MAX_N],b[MAX_N],dist[MAX_N];
vector<int> e[MAX_N];

typedef pair<int,int> P;

int cal(){

  priority_queue<P,vector<P>,greater<P> > Q;
  
  for(int i=0;i<n;i++)dist[i]=1e9;

  Q.push(P(0,s));
  dist[s]=0;


  int head=0;
  
  while(!Q.empty()){

    P tmp=Q.top();

    int pos=tmp.second,ct=tmp.first;

    //    cout<<pos<<" "<<ct<<endl;
    
    Q.pop();

    if(pos==t)return ct;

    for(int i=head;i<pos;i++){

     
      
      int nct=ct;
      
      if(nct<dist[i]){
	dist[i]=nct;
	Q.push(P(nct,i));
      }
    }
    
    head=max(head,pos);
    
    for(int i=0;i<e[pos].size();i++){

      int npos=e[pos][i];
      int nct=ct+d[npos];
      
      if(nct<dist[npos]){
	dist[npos]=nct;
	Q.push(P(nct,npos));
      }
    }
  
    
  }
  
  return -1;
}


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

  
  cin>>n>>m>>s>>t;

  s--,t--;
  
  for(int i=0;i<n;i++)cin>>d[i];

  for(int i=0;i<m;i++){

    cin>>a[i]>>b[i],a[i]--,b[i]--;

    e[a[i]].push_back(b[i]);

  }
  
  cout<<cal()<<endl;
  
  return 0;
}

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

int main(){
    // 制約見て！！！デカかったらlong longにすること！
    
    int N;
    cin >> N;

    vector<int> v{111, 222, 333, 444, 555, 666, 777, 888, 999, 1111};
    int a,b,c;
    a=N/100; int n = N%100;
    b =n/10;
    c =n%10;

    if(a==b && b==c){
        cout<<N<<endl;
    }else{
        rep(i,v.size()){
            if(v[i]>N){
                cout<<v[i]<<endl;
                return 0;
            }
        }
    }
}

Measured memory_bytes: 3632
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String T = sc.next();
    HashMap<String, String> m1 = new HashMap<String, String>();
    HashMap<String, String> m2 = new HashMap<String, String>();
    int p = 0;
    for(int i = 0; i < S.length(); i++) {
      String s = String.valueOf(S.charAt(i));
      String t = String.valueOf(T.charAt(i));
      if(m1.containsKey(s)) {
        if(!((m1.get(s)).equals(t))) p = 1;
      } else {
        m1.put(s, t);
      }
      if(m2.containsKey(t)) {
        if(!((m2.get(t)).equals(s))) p = 1;
      } else {
        m2.put(t, s);
      }
    }
    String ans = "Yes";
    if(p == 1) ans = "No";
    System.out.println(ans);
  }
}

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



int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    string str1,str2;
    cin>>str1>>str2;
    string str=str2+str1;
    cout<<str<<endl;
    

}


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

typedef long long ll;
typedef unsigned long long ull;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define RFOR(i,a,b) for(int i=(b-1);i>=(a);--i)
#define REP(i,n)   FOR(i,0,n)
#define RREP(i,n)   RFOR(i,0,n)
#define SORT(s) sort(s.begin(), s.end())
#define P pair<int, int>
#define mp make_pair
using namespace std;

template <typename _Ty>
ostream& operator << (ostream& ostr, const vector<_Ty>& v) {if (v.empty()) {ostr << "{ }"; return ostr;}
    ostr << "{" << v.front(); for (auto itr = ++v.begin(); itr != v.end(); itr++) {ostr << ", " << *itr;}
    ostr << "}";
    return ostr;}

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

int gcd(int a, int b){
   if (a%b == 0) return(b);
   else return(gcd(b, a%b));}

int lcm(int a, int b)
{return a * b / gcd(a, b);}

vector<int> uniq(vector<int> vec){
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
  return vec;}

vector<ll> divisor(ll n) {
vector<ll> ret;
for(int64_t i = 1; i * i <= n; i++) {
  if(n % i == 0) {
    ret.push_back(i);
    if(i * i != n) ret.push_back(n / i);
  }
}
  sort(begin(ret), end(ret));
  return (ret);
}
void permu(int n){
  vector<int> perm(n);
  REP(i, n) perm[i] = i;
do{
  cout << perm  << endl;
}
while (next_permutation(perm.begin(), perm.end()));
return;}

vector<pair<ll, int>> prime_div(ll n){
  vector<pair<ll, int>> res;
  for (ll i=2; i*i <= n;i++){
    if (n%i == 0){
      int a = 0;
      while(n%i == 0){
        n /= i;
        a++;
      }
      pair<ll, int> tmp;
      tmp.first = i;
      tmp.second = a;
      res.push_back(tmp);
    }
  }
  if (n != 1){
    pair<ll, int> now;
    now.first = n;
    now.second = 1;
    res.push_back(now);}
  return res;
}


// printf("%.10f\n" , ans);
int main(void){
  ios::sync_with_stdio(false);
  int n, x;
  cin >> n >> x;
  vector<int> a(n);
  REP(i, n) cin >> a[i];
  int ans = 0;
  ll now = 0;
  sort(a.begin(), a.end());
  REP(i, n){
    now += a[i];
    if (now > x) break;
    else{
      ans++;
    }
  }
  if (ans == n && now != x) ans--;
  cout << ans << endl;
  return 0;
}



Measured memory_bytes: 3668
import numpy as np
N,L=(int(i) for i in input().split())

list=np.arange(L,N+L,1)

num=0
if np.sum(np.min(np.abs(list))==list)==1:
  num=np.min(np.abs(list))
else:
  num=-np.min(np.abs(list))

score=np.sum(list)-num
#print(list)
print(score)

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

int main() {
	int n, m, c, b[21];
	cin>>n>>m>>c;
	for (int i=0; i<m; i++)
		cin>>b[i];
	int ans = 0;
	for (int i=0; i<n; i++) {
		long long tmp = 0;
		for (int j=0; j<m; j++) {
			int a;
			cin>>a;
			tmp += a*b[j];
		}
		if (tmp + c > 0)
			ans++;
	}
	cout<<ans<<endl;
	return 0;
}

Measured memory_bytes: 256
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
import heapq
INF = float("inf")
def mi(): return map(int, input().split())
def ii(): return int(input())
###template###

N = ii()
As = list(map(lambda x : int(x) - 1, input().split()))

print(sum(As))


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

int main(){
  int N;
  cin >> N;
  vector<int> vec(N);
  for(int i=0; i<N; i++){
    cin >> vec.at(i);
  }
  int64_t ans = 0;
  for(int i=0; i<N-1; i++){
    for(int j=i+1; j<N; j++){
      ans += vec.at(i)*vec.at(j);
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(){
  int x,y;
  int i,j,n;
  scanf("%d %d",&x,&y);
  if(y%2==1){
    printf("No");
  }else{
   if(2*x<=y&&y<=4*x)
     printf("Yes");
    else
     printf("No"); 
  }
  return 0;
}


Measured memory_bytes: 1732
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep2(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
const ll INF = 1LL<<60;
const ll MOD = 1e9+7;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n,m;cin>>n>>m;
    vector<vector<ll>> pts(8,vector<ll>(n,0));
    rep(i,n){
        ll x,y,z;cin>>x>>y>>z;
        rep(j,8){
            int s0 = (j&1)*2-1;
            int s1 = ((j>>1)&1)*2-1;
            int s2 = ((j>>2)&1)*2-1;
            ll s = x*s0+y*s1+z*s2;
            pts[j][i]=s;
        }
    }
    ll ans = 0;
    rep(j,8){
        sort(pts[j].rbegin(),pts[j].rend());
        ll pt = 0;
        rep(i,m){
            pt += pts[j][i];
        }
        ans = max(ans,pt);
    }
    cout<<ans<<endl;

    return 0;
}

Measured memory_bytes: 384
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) throws IOException {
		new Main().solve();
	}

	private void solve() throws IOException {
		try {
			solveA();
			//			 solveB();
			//			 solveC();
			//			 solveD();
			//			 solveE();
			//			 solveF();
		} finally {
			if (in != null) {
				in.close();
			}
			if (out != null) {
				out.flush();
				out.close();
			}
		}

	}

	private void solveA() {
		int numA = nextInt();
		int numB = nextInt();

		if (numA + numB >= 10) {
			out.println("error");
		} else {
			out.println(numA + numB);
		}

	}

	private void solveB() {
		int numN = nextInt();

		out.println("");
	}

	private void solveC() {
		int numN = nextInt();

		out.println("");
	}

	private void solveD() {
		int numN = nextInt();

		out.println("");
	}

	private void solveE() {
		int numN = nextInt();

		out.println("");
	}

	private void solveF() {
		int numN = nextInt();

		out.println("");
	}

	private final PrintWriter out = new PrintWriter(System.out);
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

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

	private void skipUnprintable() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
	}

	public boolean hasNext() {
		skipUnprintable();
		return hasNextByte();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

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

Measured memory_bytes: 20948
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(true){
            String a = sc.next();
            if(a.equals("-")){
                break;
            }
            int m = sc.nextInt();
            int h;
            for(int i = 0; i < m; i++){
                h = sc.nextInt();
                a = a.substring(h) + a.substring(0, h);
            }
            System.out.println(a);
        }
        sc.close();
    }
}


Measured memory_bytes: 26140
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#define len(X) ((int)(X).size())

#ifdef __LOCAL
#define DBG(X) cout << #X << "=" << (X) << '\n';
#define SAY(X) cout << (X) << '\n';
#else
#define DBG(X)
#define SAY(X)
#endif

#define M_PI       3.14159265358979323846

using namespace std;

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

const int INT_INF = (int)(2e9);
const ll  LL_INF = (ll)(2e18);

const int NIL = -1;
static mt19937 _g(time(nullptr));

std::string pad(int num)
{
    char buffer[4];
    std::snprintf(buffer, sizeof(buffer), "%03d", num);
    return buffer;
}

inline ll randint(ll a, ll b) { ll w = (_g() << 31LL) ^ _g(); return a + w % (b - a + 1); }
inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); };
template<typename T> inline T sign(T x) { return T(x > 0) - T(x < 0); }
template<typename T, typename S> inline ostream& operator<<(ostream& os, const pair<T, S> p) { cout << "[" << p.first << ";" << p.second << "]"; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const vector<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline T fetch() { T ret; cin >> ret; return ret; }
template<typename T> inline vector<T> fetch_vec(int sz) { vector<T> ret(sz); for (auto& elem : ret) cin >> elem; return ret; }

#ifdef _MSC_VER
#  include <intrin.h>
#  define __builtin_popcount __popcnt
#endif

string solve()
{
    vector<int> ant = fetch_vec<int>(5);
    
    int k;
    cin >> k;

    for (int i = 0; i < 5; ++i)
    {
        for (int j = 0; j < 5; ++j)
        {
            if (i == j) continue;

            if (std::abs(ant[i] - ant[j]) > k)
                return ":(";
        }
    }

    return "Yay!";
}

int main()
{
    std::cout << solve() << std::endl;

    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(void){
  int kai,han;
  int max = 0,min = 1000000000;
  scanf("%d",&kai);
  for(int i = 0;i < kai;i++){
    scanf("%d",&han);
    if(han > max)max = han;
    if(han < min)min = han;
  }
  printf("%d",max - min);
  return 0;
}

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

int main()
{
  string s;
  int n,i;
  cin>>s;
  n=s.size();
  bool pos=1;
  for(i=0;i<n;i++)
  {
    int po=i+1;
    if(po&1)
    {
      
      if(s[i]=='L')
      {
        pos=0;
        break;
      }
    }
    else if(s[i]=='R')
    {
      pos=0;
      break;
    }
  }
  if(pos)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
using namespace std;

typedef long long ll;
typedef double db;
typedef long double ldb;

template<class T> inline void checkmin(T &a,const T &b){if(b<a) a=b;}
template<class T> inline void checkmax(T &a,const T &b){if(b>a) a=b;}

const int inf=1e9+10;

ll n;
string s;

int main(){
	cin>>n;
	while(n>0){
		if(n%26ll==0) s+='z';
		else s+=char(n%26ll+'a'-1ll);
		if(n==26) n=0;
		else n=(n-1)/26ll;
	}
	reverse(s.begin(),s.end());
	cout<<s<<endl;
	return 0;
}


Measured memory_bytes: 3636
#include<stdio.h>

#define INFT 99999999
#define N 102

#define siro 0
#define hai 1
#define kuro 2

int iro[N],p[N],d[N];
int o;

void prim(int M[N][N]);

int main(){
  int M[N][N],i,j;
  int gou=0;
  scanf("%d",&o);
  for(i=0;i<o;i++){
    for(j=0;j<o;j++){
      scanf("%d",&M[i][j]);
    }
  }

  prim(M);
  
for(i=1;i<o;i++){
    gou+=d[i];
  }
   printf("%d\n",gou);
  return 0;
}
void prim(int M[N][N]){
  int i,mini,u;

  for(i=0;i<o;i++){
    
    iro[i]=siro;
    
    d[i]=INFT;
  }

  d[0]=0;
  p[0]=-1;

  while(1){
    mini=INFT;

    for(i=0;i<o;i++){
      if(iro[i]!=kuro && d[i]<mini){
        
        mini=d[i];
        
        u=i;
      }
    }

    if(mini==INFT) break;

    iro[u]=kuro;

    for(i=0;i<o;i++){
      if(iro[i]!=kuro && M[u][i]!=-1){
        if(d[i]>M[u][i]){
        d[i]=M[u][i];
        
        p[i]=u;
        
        iro[i]=hai;
        
      }
      }
    }
  }
}


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

int main(){
int K;
int b=0;
int a=1;
cin>>K;
for(int i=0;i<(K-1);i++){

if(i%2==0){
b++;
a=b*b;
}
else{
a=a+b;
}
}
cout<<a<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
long long n,val[16][16],sums[(1<<16)],dp[(1<<16)];

void tryy(int curr , int mk , int mask){
	if(curr == n){
		dp[mask^mk] = max(dp[mask^mk],dp[mask]+sums[mk]);
		return ;
	}
	tryy(curr+1,mk,mask);
	if(mask & (1 << curr)){
		tryy(curr+1,mk^(1<<curr),mask);
	}
}

void getsum(int mask){
	vector<int> pos;
	for(int i = 0 ; i < n ; i += 1){
		if(mask & (1 << i)){
			pos.push_back(i);
		}
	}
	long long ret = 0;
	for(int i = 0 ; i+1 < pos.size() ; i += 1){
		for(int j = i+1 ; j < pos.size() ; j += 1){
			ret += val[pos[i]][pos[j]];
		}
	}
	sums[mask] = ret;
}

int main(){
	cin >> n;
	for(int i = 0 ; i < n ; i += 1){
		for(int j = 0 ; j < n ; j += 1){
			cin >> val[i][j];
		}
	}
	for(int i = 1 ; i < (1<<n) ; i += 1){
		getsum(i);
	}
	for(int i = (1<<n)-1 ; i > 0 ; i -= 1){
		tryy(0,0,i);
	}
	cout << dp[0] << endl;
}

Measured memory_bytes: 1408
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

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

        if (A >= K) {
            point = K;
        } else if ((A + B) >= K) {
            point = A;
        } else {
            diff = K - (A + B);
            point = A - diff;
        }

        System.out.print(point);
    }
}

Measured memory_bytes: 35720
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import qualified Data.ByteString.Char8 as BS
import           Data.Maybe            (fromJust)

main :: IO ()
main = do
  n <- readLn
  txys <- map readInt3 . BS.lines <$> BS.getContents
  putStrLn $ if solve n txys then "Yes" else "No"

solve :: Int -> [(Int, Int, Int)] -> Bool
solve _ txys = all travelable $ zip ((0, 0, 0):txys) txys

travelable :: ((Int, Int, Int), (Int, Int, Int)) -> Bool
travelable ((t, x, y), (t', x', y')) = dx + dy <= dt && even (dt - dx - dy) where
  dx = x' - x
  dy = y' - y
  dt = t' - t

readInt :: BS.ByteString -> Int
readInt = fst . fromJust . BS.readInt

readInt3 :: BS.ByteString -> (Int, Int, Int)
readInt3 = (\[a, b, c] -> (a, b, c)) . map readInt . BS.words


Measured memory_bytes: 3836
import java.util.Scanner;
class Main
{
	public static void main(String args[])
	{
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
		int b=sc.nextInt();

		if(a==b){
			System.out.println(2*a);
		}
		else if(a>b){
		  	System.out.println(a+(a-1));
		}
		else{
		  	System.out.println(b+(b-1));
		}
	}
}

Measured memory_bytes: 23124
use std::io::{stdin, BufRead, BufReader};

fn main() {
    let input = BufReader::new(stdin());
    for line in input.lines() {
        let d = line.unwrap().parse::<u32>().unwrap();
        let mut s = 0;
        let mut x = d;
        while x < 600 {
            s += x * x * d;
            x += d;
        }
        println!("{}", s);
    }
}



Measured memory_bytes: 5024
// inputに入力データ全体が入る
function Main(input) {
	input = input.split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = parseInt(input[0], 10);
	var b = parseInt(input[1], 10);
	var c = a*b;
  	if (c % 2 === 1) {
      console.log('Odd');
    } else {
      console.log('Even');
    }
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


Measured memory_bytes: 7372
const input = require("fs").readFileSync("/dev/stdin", "utf8");


    value = parseInt(input, 10)
    var yomi = [
        'pon',// 0
        'pon',// 1
        'hon',// 2
        'bon',// 3
        'hon',// 4
        'hon',// 5
        'pon',// 6
        'hon',// 7
        'pon',// 8
        'hon'// 9
    ]
    console.log('%s', yomi[value % 10]);


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

int main(){
  int n;
  cin >> n;
  long long ans = 0;
  for(int i = 1;i <= n;i++){
    for(int j = 1;j <= n;j++){
      for(int k = 1;k <= n;k++){
        int g;
        g = gcd(i,j);
        g = gcd(g,k);
        ans += g;
      }
    }
  }
  cout << ans << endl;
  return 0;
}

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

using namespace std;

#define PB push_back
#define ALL(v) (v).begin(), (v).end()
#define SZ size()
#define FOR(i, a, b) for(int (i) = (a); (i) < (b); (i)++)
#define REP(i, n) FOR((i), 0, (n))
#define GET(a) cin >> (a)
#define GET2(a, b) cin >> (a) >> (b)
#define GET3(a, b, c) cin >> (a) >> (b) >> (c)
#define SHOW(v) cout << (v) << endl
#define SHOW2(a, b) cout << (a) << " " << (b) << endl
#define SHOW3(a, b, c) cout << (a) << " " << (b) << " " << (c) << endl
#define MOD 1000000007
template<class T> void GETV(T &v) { REP(i, v.size()) { GET(v[i]); } }
template<class T> void SHOWV(T &v) { REP(i, v.size()) { SHOW(v[i]); } }

typedef long long ll;

int main() {
	ll n;
	cin >> n;
	
	vector<ll> v(5);
	for(int i = 0; i < 5; i++) {
		cin >> v[i];
	}
	
	ll ans = (n / *min_element(ALL(v))) + (n % *min_element(ALL(v)) == 0 ? 0 : 1) + 4;
	cout << ans << endl;
	
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>  // sort, 二分探索, etc
#include <iomanip>  // setprecision (浮動小数点の出力の誤差)
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <cmath>

#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=a,i##_len=(b);i<i##_len;++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
#define cauto const auto&
#define UNIQUE(v) (v).erase( unique(all(v), (v).end() );
#define SZ(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(all(x))
#define MIN(x) *min_element(all(x))
#define INF 1000000000000
#define MOD 1000000007
#define perm(c) sort(all(c));for(bool c##p=1;c##p;c##p=next_permutation(all(c)))

using namespace std;
using ll = long long;
using ull = unsigned long long;

template<class T>bool chmax(T &a, const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a, const T &b){if(a>b){a=b;return true;}return false;}

const char newl = '\n';

ll qp(ll a,ull b){ll ans=1;do{if(b&1u)ans*=a;a*=a;}while(b>>=1u);return ans;}
ll qp(ll a,ull b,ll mod){ll ans=1;do{if(b&1u)ans=ans*a%mod;a=a*a%mod;}while(b>>=1u);return ans;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll comb(int n, int r) {
    vector<vector<ll> > v(n+1, vector<ll>(r+1, 0));
    for(int i=0;i<n+1;i++) {v[i][0]=1; if(i < r+1)v[i][i]=1; }
    for(int i=1;i<n+1;i++) {for(int j=1;j<min(i,r+1);j++) {v[i][j]=v[i-1][j-1]+v[i-1][j];}}
    return v[n][r];
}

// INT_MAX   = 2.1e+09 (2147483647)
// LONG_MAX  = 9.2e+18 (9223372036854775807)
// LLONG_MAX = 9.2e+18 (9223372036854775807)


int main() {
    ll n;
    cin >> n;
    vector<ll> vec;
    rep(i, n) {
        char x;
        cin >> x;
        vec.push_back(x == 'R' ? 1 : 0);
    }

    ll left, right;
    left = 0; right = n - 1;
    ll cnt = 0;
    while (true) {
        while (vec[left] == 1) {
            left++;
            if (left >= n) {
                break;
            }
        }
        while (vec[right] == 0) {
            right--;
            if (right < 0) {
                break;
            }
        }

        if (left > right) {
            break;
        }
        cnt += 1;
        left++;
        right--;
    }

    cout << cnt << newl;

    return 0;
}


Measured memory_bytes: 4960
/*+lmake
 * STD = c++14
 * DEFINE += WAAUTOMATON
 */
#include <bits/stdc++.h>
using namespace std;
using LL=long long;
using ULL=unsigned long long;
#ifdef WAAUTOMATON
     #define debug(args...)            {dbg,args; cerr<<endl;}
#else
    #define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger
{
    template<typename T> debugger& operator , (const T& v)
    {    
        cerr<<v<<" ";    
        return *this;    
    }
} dbg;
#define MAXN 100000
LL w[MAXN+10],w0[MAXN+10];
void solve(long long N, long long Q, vector<long long> q){
	deque<LL> b;
	q.insert(q.begin(),N);
	for(auto i=q.rbegin(); i!=q.rend(); ++i) {
		if (b.empty() || *i<b[0]) b.push_front(*i);	
	}	
	assert(b[0]<=N);
	w[b.size()-1]=1;
	for(int i=b.size()-1; i>=0; --i) {
		LL l=b[i];
		int j=i;
		while(l>b[0]) {
			j=std::lower_bound(b.begin(),b.end(),l)-b.begin()-1;
			w[j]+=(l/b[j])*w[i];
			l%=b[j];
		}
		w0[l]+=w[i];
	}
	for(int i=b[0]; i>=1; --i) {
		w0[i]+=w0[i+1];
	}
	for(int i=1; i<=N; ++i) {
		cout<<w0[i]<<' ';
	}
	cout<<endl;
}

int main(){	
#ifdef WAAUTOMATON
	freopen("in.txt","r",stdin);
#endif
	long long N;
	long long Q;
	scanf("%lld",&N);
	scanf("%lld",&Q);
	vector<long long> q(Q-1+1);
	for(int i = 0 ; i <= Q-1 ; i++){
		scanf("%lld",&q[i]);
	}
	solve(N, Q, q);
	return 0;
}



Measured memory_bytes: 5616
N=int(input())
S=list(map(int,input().split()))
S.sort()
S.reverse()
tmp=0
ans=0
if len(S)==2:
    print(S[0])
    
else:
    ans+=S[0]

    if (N-2)%2==0:
        for i in range((N-2)//2):
            ans+=S[i+1]*2
        #print("mohu1")    
        print(ans)
    else:
        for i in range((N-2)//2):
            
            ans+=S[i+1]*2
            tmp=i+1
        #print("mohu")
        print(ans+S[tmp+1])
        

Measured memory_bytes: 31756
N = int(input())
grid = [input(),input()]
MOD = 10**9 + 7

cnt = 3 if grid[0][0] == grid[1][0] else 6

for i in range(1,N):
    a,b = grid[0][i-1],grid[1][i-1]
    c,d = grid[0][i],grid[1][i]

    if a == b:
        cnt *= 2
    elif c != d and a != c:
        cnt *= 3
    cnt %= MOD

print(cnt)

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

int main() {
    int n, k, ok[10] = {0}, ans;
    cin >> n >> k;
    for(int i = 0; i < k; i++) {
        int x;
        cin >> x;
        ok[x] = 1;
    }
    ans = 1e7;
    for(int i = n; i < 1e6; i++) {
        int tt = i, h = 1;
        while(tt) {
            int tmp = tt % 10;
            if(ok[tmp])
                h = 0;
            tt /= 10;
        }
        if(h) {
            ans = i;
            break;
        }
    }
    cout << ans << endl;
    return 0;
}


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

using namespace std;

long long int fun(int n)
{
	if(n<2)
	return 0;
	return (n*(n-1))/2;
}
int main()
{
	int n,m;
	cin >> n>>m;
	cout << fun(n)+fun(m) ;
	return 0;
}

Measured memory_bytes: 256
import sys


def getN():
    return int(input())


def getNM():
    return map(int, input().split())


def getList():
    return list(map(int, input().split()))


def input():
    return sys.stdin.readline().rstrip()


#############
# Main Code #
#############

n, m = getNM()
ords = []
for _ in range(n):
    s = input()
    ords.append([[ord(x) for x in s]])
    ords[-1].append(s)

ords.sort(key=lambda x: x[0])

for _, s in ords:
    print(s, end='')


Measured memory_bytes: 63740
from collections import deque

n, q = map(int, (input().split()))

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

cnt = [0 for i in range(n + 1)]
for i in range(q):
    p, x = map(int, (input().split()))
    cnt[p] += x

d = deque()
d.append(1)
chked = set()
while d:
    stat = d.pop()
    chked.add(stat)
    for v in t[stat]:
        if v not in chked:
            d.append(v)
            cnt[v] += cnt[stat]

print(*cnt[1:])

Measured memory_bytes: 64224
S = input()
 
# S_0 = S_1 かつ S_2 = S_3
# S_0 = S_2 かつ S_1 = S_3
# S_0 = S_3 かつ S_1 = S_2
# S_0 = S_1 = S_2 = S_3 を除外

if S[0] == S[1] == S[2] == S[3]: print('No')
else:
  if (S[0] == S[1] and S[2] == S[3]) or (S[0] == S[2] and S[1] == S[3]) or (S[0] == S[3] and S[1] == S[2]): print('Yes')
  else: print('No')

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

using namespace std;

#define int long long

void solve() {
    int n;
    cin >> n;
    set <int> a;
    bool check = 0;
    for (int i = 0; i < n; ++i) {
        int t;
        cin >> t;
        if (a.find(t) != a.end()) {
            check = 1;
        }
        a.insert(t);
    }
    if (check) cout << "NO";
    else cout << "YES";
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    solve();
    return 0;
}


Measured memory_bytes: 9600
n = int(input())
d = [list(map(int,input().split())) for i in range(n)]

cnt = 0
for i in range(n):
    if d[i][0] == d[i][1]:
        cnt += 1
    else:
        cnt = 0
    if cnt >= 3:
        print('Yes')
        exit()
print('No')


Measured memory_bytes: 9172
a,b = map(int,(input().split()))

count = 1
if b == 1:
    print("0")
    exit()
while True:
    if count ==1:
        temp = a * count 
    else:
        temp = a + ((a-1) * (count -1))
    if temp >= b:
        print(count)
        exit()
    else:
        count += 1

Measured memory_bytes: 3060
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <algorithm>
using namespace std;
typedef pair<int,int> P;
P A[100000],B[100000];
int N,a[100000],b[100000];
bool ok(int M) {
	int both=0,differ=0;
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	for(int i=0;i<N;i++) {
		if(abs(A[N-1].first-A[i].first)>M && abs(A[i].first-A[0].first)>M)
			return false;
		if(abs(A[i].first-A[0].first)>M)
			a[A[i].second]=1;
		if(abs(A[N-1].first-A[i].first)>M)
			a[A[i].second]=2;
	}
	for(int i=0;i<N;i++) {
		if(abs(B[N-1].first-B[i].first)>M && abs(B[i].first-B[0].first)>M)
			return false;
		if(abs(B[i].first-B[0].first)>M)
			b[B[i].second]=1;
		if(abs(B[N-1].first-B[i].first)>M)
			b[B[i].second]=2;
	}
	for(int i=0;i<N;i++) {
		if(a[i]==0||b[i]==0) both++; else if(a[i]!=b[i]) differ++; 
	}
	return (differ==0||both+differ==N);
}

int main() {
	int x,y;
	scanf("%d",&N);
	for(int i=0;i<N;i++) {
		scanf("%d %d",&x,&y);
		A[i].first=x+y,A[i].second=i;
		B[i].first=x-y,B[i].second=i;
	}
	sort(A,A+N); sort(B,B+N);
	int lower=0,upper=1<<20;
	while(upper-lower>5) {
		int mid=(upper+lower)/2;
		if(ok(mid)) upper=mid; else lower=mid; 
	}
	while(ok(--upper));
	printf("%d\n",upper+1);
}

Measured memory_bytes: 3380
#include <iostream>
using namespace std ;
int main ()
{
   int n , k ,x ;
   int sum = 0;

   cin>> n >>k ;
   for(int i=0 ;i<n ; i++)
   {
       cin>> x ;
       if(x>=k){sum+=1 ;}
   }

    cout<< sum ;
    return 0 ;
}


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

using namespace std;

int main(int argc, char const *argv[])
{
    int x, n, max;
    string s;

    max = 0;
    cin >> n;
    cin >> s;
    x = 0;

    for (int i = 0; i < n; i++) {
        char c = s[i];
        if (c == 'I') {
            x++;
        } else if (c == 'D') {
            x--;
        }
        if (x > max) {
            max = x;
        }
    }

    cout << max << endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
using namespace std;

int main()
{
	int a, b;
	cin >> a >> b;
	if ((a*b) % 2 == 0)
		cout << "Even" << endl;
	else
		cout << "Odd" << endl;
	return 0;
}

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

int main(){
    int N;
    cin >> N;
    int a[100001];
    int dp[100001];

    rep(i, N) {
        cin >> a[i];
    }
    dp[0] = 0;
    dp[1] = abs(a[0] - a[1]);
    for (int i = 2; i < N; i++)
    {
        dp[i] = min(dp[i - 1] + abs(a[i - 1] - a[i]), dp[i - 2] + abs(a[i - 2] - a[i]));
    }
    cout << dp[N - 1] << endl;
    
}

Measured memory_bytes: 4400
/*
このコード、と～おれ!
Be accepted!
∧＿∧　
（｡･ω･｡)つ━☆・*。
⊂　　 ノ 　　　・゜+.
　しーＪ　　　°。+ *´¨)
 　　　　　　　　　.· ´¸.·*´¨) ¸.·*¨)
		  　　　　　　　　　　(¸.·´ (¸.·'* ☆
					*/

#include <stdio.h>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>

#pragma GCC optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define rep2(i, n) for(int i = 2; i < (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define reprm(i, n) for(int i = n - 1; i >= 0; --i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.50lf\n", a)//少数出力
#define printdbd(a) printf("%.16lf\n", a)//少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str())//string出力
#define all(x) (x).begin(), (x).end()
#define allsum(a, b, c) ((a + b) * c / 2)//等差数列の和、初項,末項,項数
#define pb push_back
#define priq priority_queue
#define rpriq priq<int, vector<int>, greater<int>>
#define deg_to_rad(deg) (((deg)/360.0)*2.0*PI)
#define rad_to_deg(rad) (((rad)/2.0/PI)*360.0)
#define Please return
#define AC 0

using ll = long long;

constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1000000007;
const double PI = acos(-1);

using namespace std;

void scans(string& str) {
	char c;
	str = "";
	scanf("%c", &c);
	if (c == '\n')scanf("%c", &c);//最初の改行対策
	while (c != '\n' && c != -1) {
		str += c;
		scanf("%c", &c);
	}
}

void scanc(char& str) {
	char c;
	scanf("%c", &c);
	if (c == -1)return;
	while (c == '\n') {
		scanf("%c", &c);
	}
	str = c;
}

double acot(double x) {
	return PI / 2 - atan(x);
}

/*-----------------------------------------ここからコード-----------------------------------------*/


int main() {
	
	int n, m;
	scanf("%d%d", &n, &m);
	printf("%d\n", (n + m) % 24);
	
	Please AC;
}


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

using namespace std;
using ll = long long;


int main()
{
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for(auto &i : a)cin >> i;
    cout << count_if(a.begin(), a.end(), [&](int a){return a >= k;}) << endl;
}

Measured memory_bytes: 3708
import java.io.*;
import java.nio.CharBuffer;
import java.util.NoSuchElementException;

public class Main {

    public static void main(String[] args) {
        SimpleScanner scanner = new SimpleScanner(System.in);
        PrintWriter writer = new PrintWriter(System.out);

        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] links = new int[m][];
        for (int i = 0; i < m; ++i) {
            int k = scanner.nextInt();
            links[i] = new int[k];
            for (int j = 0; j < k; ++j) {
                links[i][j] = scanner.nextInt() - 1;
            }
        }
        int[] p = new int[m];
        for (int i = 0; i < m; ++i)
            p[i] = scanner.nextInt();
        int ans = 0;
        for (int x = 0; x < (1 << n); ++x) {
            int valid = 1;
            for (int i = 0; i < m; ++i) {
                int num = 0;
                for (int j = 0; j < links[i].length; ++j)
                    if ((x & (1 << links[i][j])) > 0)
                        ++num;
                if ((num & 1) != (p[i] & 1)) {
                    valid = 0;
                    break;
                }
            }
            ans += valid;
        }
        writer.println(ans);
        writer.close();
    }

    private static class SimpleScanner {

        private static final int BUFFER_SIZE = 10240;

        private Readable in;
        private CharBuffer buffer;
        private boolean eof;

        SimpleScanner(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
            buffer = CharBuffer.allocate(BUFFER_SIZE);
            buffer.limit(0);
            eof = false;
        }


        private char read() {
            if (!buffer.hasRemaining()) {
                buffer.clear();
                int n;
                try {
                    n = in.read(buffer);
                } catch (IOException e) {
                    n = -1;
                }
                if (n <= 0) {
                    eof = true;
                    return '\0';
                }
                buffer.flip();
            }
            return buffer.get();
        }

        void checkEof() {
            if (eof)
                throw new NoSuchElementException();
        }

        char nextChar() {
            checkEof();
            char b = read();
            checkEof();
            return b;
        }

        String next() {
            char b;
            do {
                b = read();
                checkEof();
            } while (Character.isWhitespace(b));
            StringBuilder sb = new StringBuilder();
            do {
                sb.append(b);
                b = read();
            } while (!eof && !Character.isWhitespace(b));
            return sb.toString();
        }

        int nextInt() {
            return Integer.valueOf(next());
        }

        long nextLong() {
            return Long.valueOf(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }

}

Measured memory_bytes: 23124
require 'prime'

primes =[]
Prime.each(10000){|i|
primes.push(i)
}

n = gets.to_i
nums = []

n.times{
nums.push(gets.to_i)
}

cnt = n

nums.each{|val|
primes.each{|i|
break if val == i

if val%i == 0
cnt -=1
break
end
}
}

puts (cnt)

Measured memory_bytes: 9104