akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<vi> vvi;
const int inf = 0x3f3f3f3f;
const ll mod = 1000000007;
#define debug(x) cerr << #x << " = " << x << endl

int dp[100010][3];

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int n;
    cin >> n;
    vi a(n), b(n), c(n);
    for(int i = 0; i < n; i++){
        cin >> a[i] >> b[i] >> c[i];
    }
    for(int i = n-1; i >= 0; i--){
        dp[i][0] = max(dp[i+1][1] + b[i], dp[i+1][2] + c[i]);
        dp[i][1] = max(dp[i+1][0] + a[i], dp[i+1][2] + c[i]);
        dp[i][2] = max(dp[i+1][0] + a[i], dp[i+1][1] + b[i]);
    }
    cout << max(dp[0][0], max(dp[0][1], dp[0][2])) << "\n";
}

Measured memory_bytes: 2560
#include <bits/stdc++.h>
#define maxn 100005
using namespace std;

const int INF = 1e9;

int h[maxn], dp[maxn] = {};
int n, k;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> n >> k;
    for(int i = 1; i <= n; i++) {
        cin >> h[i];
    }
    for(int i = 2; i <= n; i++) {
        dp[i] = INF;
        for(int j = max(i - k, 1); j < i; j++) {
            dp[i] = min(dp[i], dp[j] + abs(h[i] - h[j]));
        }
    }
    cout << dp[n] << '\n';
    return 0;
}


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

int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  rep(i,n) cin >> a[i];
  ll s = 0;
  rep(i,n) s ^= a[i];
  ll ans = s;
  rep(i,n) a[i] &= ~s;

  int r = 0;
  vector<int> top(n);
  for (int i = 60; i >= 0; --i) {
    int j = r;
    for (; j < n; ++j) {
      if (a[j]>>i&1) {
        swap(a[r],a[j]);
        break;
      }
    }
    if (j == n) continue;
    top[r] = i;
    rep(k,n) {
      if (r == k) continue;
      if (a[k]>>i&1) a[k] ^= a[r];
    }
    ++r;
  }

  ll x = 0;
  for (int i = 60; i >= 0; --i) {
    ll nx = x|(1ll<<i);
    {
      ll b = nx;
      rep(j,r) {
        if (b>>top[j]&1) b ^= a[j];
      }
      if ((b&nx) == 0) {
        x = nx;
      }
    }
  }
  ans += x*2;
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 1408
#include<iostream>
#include<math.h>
#include<vector>
using namespace std;

int main(void){
    int n,d,j,c;
    c=0;
    cin >> n >> d;
    vector<vector<double>> data(n, vector<double>(2));
    for(int i = 0;i<n;i++){
        cin >> data[i][0] >> data[i][1];
        if(d>=sqrt(pow(data[i][0],2.0)+pow(data[i][1],2.0))) c++;
    }
    cout << c;
    return 0;
}

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

int main(){
  int64_t N, M;
  cin >> N >> M;
  vector<int64_t> A(M);
  int64_t sum = 0;
  
  for (int i = 0; i < M; i++){
    cin >> A.at(i);
  }
  
  for (int j = 0; j < M; j++){
    sum += A.at(j);
  }
  
  if (N - sum < 0){
    cout << "-1" << endl;
  }
  else{
    cout << N - sum << endl;
  }
}
  
  


Measured memory_bytes: 3708
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define MOD2 998244353
float PHI = 1.6180339;
const float  PI_F=3.14159265358979f;
#define MAX 1000 m
#define endl "\n"    
#define manhunt 32 
//typedef long long float;
#define int long long
typedef pair<int, int> pii;
//#define float unsigned long long
typedef pair<int, int> pii;
#define FAST ios_base::sync_with_stdio(false);cin.tie();cout.tie();
#define CHAR_SIZE 26 
#define pi pair<int,int> 

int modpow(int x, int n, int m) { if (n == 0) return 1%m; long long u = modpow(x,n/2,m); u = (u*u)%m; if (n%2 == 1) u = (u*x)%m; return u; } 


int add(int x, int y) 
{
	x += y;
	if (x >= MOD) return x - MOD;
	return x;
}
int sub(int x, int y) 
{
	x -= y;
	if (x < 0) return x + MOD;
	return x;
}
int inv(int a, int m = MOD)
{
	return modpow(a, m - 2, m);
}
int mul(int a, int b) 
{
	return (long long) a * b % MOD2;
}


int nCrModp(int n, int r, int p) 
{ 
    int C[r+1]; 
    memset(C, 0, sizeof(C)); 
  
    C[0] = 1; 
    for (int i = 1; i <= n; i++) 
    { 
        for (int j = min(i, r); j > 0; j--) 
            C[j] = (C[j] + C[j-1])%p; 
    } 
    return C[r]; 
} 

int isPalindrome(string a)
{
    string rev=a;
    reverse(a.begin(),a.end());
    if(a==rev)
    return 1;
    else
    return 0;
}


int32_t main()
{
    FAST
    cout << fixed << setprecision(2);
 
    string s;
    cin>>s;
    int n=s.length();
    int x=(n-1)/2;
    int y=(n+3)/2;
    int flag=0;
    if(isPalindrome(s))
    {
        string f="";
        for(int i=0;i<x;i++)
        {
            f+=s[i];
        }
        //cout<<f<<endl;
        if(isPalindrome(f))
        {
            string g="";
            for(int i=y-1;i<n;i++)
            {
                g+=s[i];
            }
            //cout<<g<<endl;
            if(isPalindrome(g))
            {
                flag=1;
            }
        }
    }
    if(flag==1)
    cout<<"Yes"<<endl;
    else
    cout<<"No"<<endl;

    return 0;
}


Measured memory_bytes: 256
N = int(input())
A = list(map(int, input().split()))
min_num = 10**9
cnt = 0
sum_num = 0
for idx in range(N):
  if A[idx] < 0:
    cnt += 1
  min_num = min(min_num, abs(A[idx]))
  sum_num += abs(A[idx])
if cnt%2 == 0:
  print(sum_num)
else:
  print(sum_num-min_num*2)


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

int main()
{
  ll n;
  cin >> n;
  
  ll d[n];
  rep(i,n) cin >> d[i];
  
  sort(d,d+n);
  
  int ans = 0;
  cout << d[n/2] - d[n/2-1] << endl;
}


Measured memory_bytes: 4336
package main

import "fmt"

func main() {
	var N int
	fmt.Scan(&N)

	flg := true
	var t, x, y int
	for i := 0; i < N; i++ {
		fmt.Scan(&t, &x, &y)

		if !check(t, x, y) {
			flg = false
		}
	}
	if flg {
		fmt.Println("Yes")
		return
	}
	fmt.Println("No")
}

func check(t, x, y int) bool {
	if (t-x-y) < 0 || (t-x-y)%2 != 0 {
		return false
	}
	return true
}

Measured memory_bytes: 5504
#include<iostream>
#include<cstdio>
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FOF(i,a,b) for(int i=a;i< b;i++)
using namespace std;
const int N=660,P=1e9+7;
int n,K,m,ans,x,y;
int lk[N],w[N],g[N][N],f[N][N];
bool in(int x,int l,int r){return l<=x && x<=r || l<=x+m && x+m<=r;}
int main(){
	//freopen("1.in","r",stdin);
	scanf("%d%d",&n,&K);
	m=n<<1;
	FOF(i,0,m) lk[i]=-1;
	FOR(i,1,K){
		scanf("%d%d",&x,&y);
		x--;y--;lk[x]=y;lk[y]=x;
	}
	w[0]=1;
	FOR(i,1,n) w[i]=1ll*w[i-1]*(2*i-1)%P;
	FOR(L,0,n)FOR(i,0,m){
		int j=i+2*L-1,ok=1;
		FOR(k,i,j)if(~lk[k%m]) ok&=in(lk[k%m],i,j),g[i][j]++;
		g[i][j]=ok*w[L-g[i][j]/2];
	}
	FOR(L,1,n)FOR(i,0,m-2*L){
		int j=i+2*L-1;f[i][j]=g[i][j];
		for(int k=i+1;k<j;k+=2) (f[i][j]+=P-1ll*f[i][k]*g[k+1][j]%P)%=P;
		(ans+=1ll*f[i][j]*g[j+1][i+m-1]%P)%=P;
	}
	cout<<ans<<'\n';
}

Measured memory_bytes: 3328
def main():
    n,s = map(int,input().split())
    a = list(map(int,input().split()))
    mod = 998244353
    dp = [[0]*(s+1) for i in range(n+1)]
    dp[0][0] = 1

    for i in range(n):

        for j in range(s+1):
        
            if j >= a[i]:
                dp[i+1][j] += (dp[i][j]*2+dp[i][j-a[i]])%mod
            else:
                dp[i+1][j] += (dp[i][j]*2)%mod

    print(dp[-1][-1])

if __name__ =="__main__":
    main()


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

int main()
{

	int x, a, b,c;
	int ans_cnt = 0;

	cin >> a >> b >> c;
	cin>> x;

	for (int i = 0; i <= a; i++) {
		for (int j = 0; j <= b; j++) {
			for (int k = 0; k <= c; k++) {
				if ((i * 500 + j * 100 + k * 50) == x)
					ans_cnt++;
			}
		}
	}

	cout << ans_cnt << endl;
	return 0;
}

Measured memory_bytes: 256
package main

import (
	"fmt"
	"io"
	"os"
)

func main() {
	sc := NewScanner(os.Stdin)
	n := sc.Int()
	a := make([]int, n)

	var max int
	for i := 0; i < n; i++ {
		a[i] = sc.Int()
		if a[i] > max {
			max = a[i]
		}
	}

	dp := make([]int, max+1)

	for _, n := range a {
		dp[n]++
		if dp[n] > 1 {
			continue
		}

		for v := n + n; v <= max; v += n {
			dp[v]++
		}
	}

	var count int
	for _, v := range a {
		if dp[v] == 1 {
			count++
		}
	}
	fmt.Println(count)
}

type Scanner struct {
	r     io.Reader
	buf   []byte
	delim byte
	size, eof,
	start, end int
}

func NewScanner(r io.Reader) *Scanner { return NewScannerSize(r, 4096) }
func NewScannerSize(r io.Reader, size int) *Scanner {
	return &Scanner{
		r:     r,
		buf:   make([]byte, size),
		delim: ' ',
		size:  size, start: size, end: size,
	}
}

func (s *Scanner) Int() int { return ParseInt(s.bytes()) }

func (s *Scanner) bytes() []byte { b, _ := s.next(); return b }
func (s *Scanner) next() (b []byte, size int) {
	for n := 0; ; {
		for i := s.end; i < s.size; i++ {
			if s.buf[i] == s.delim || s.buf[i] == '\n' || i == s.eof {
				b, size = s.buf[s.start:i], i-s.start
				s.start, s.end = i+1, i+1
				return
			}
		}
		s.end = s.size
		if n++; n == 2 {
			panic("lack of buffer size")
		}
		s.read()
	}
}
func (s *Scanner) read() {
	copy(s.buf, s.buf[s.start:s.end])
	s.end -= s.start
	s.start = 0
	n, _ := s.r.Read(s.buf[s.end:])
	s.eof = s.end + n
}

func ParseInt(b []byte) (n int) {
	var i int
	if b[0] == '-' {
		i++
	}
	for ; i < len(b); i++ {
		n *= 10
		n += int(b[i] - '0')
	}
	if b[0] == '-' {
		return -n
	}
	return
}


Measured memory_bytes: 11564
N = int(input())
A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))

wa1 = [0]*N
wa2 = [0]*N
wa1[0] = A1[0]
wa2[0] = A2[0]
ans = 0

for i in range(1,N):
    wa1[i] = wa1[i-1]+A1[i]
    wa2[i] = wa2[i-1]+A2[i]
    
for i in range(N):
    if i == 0:
        tmp = wa1[i] + wa2[-1]
    else:
        tmp  = wa1[i] + (wa2[-1]-wa2[i-1]) 
    ans = max(ans,tmp)
    
print(ans)

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

int main () {
	char a[100], b[100], c[100];
	scanf ("%s %s %s", a, b, c);
	int pnjgA = strlen(a);
	int pnjgB = strlen(b);
	for (int i = 0; i < 10; i++) {
		if (a[pnjgA-1] == b[0] && b[pnjgB-1] == c[0]) {
			puts ("YES");
			break;
		} 
		else
			puts ("NO");
			break;
	}
	
	return 0;
}	

Measured memory_bytes: 1644
#include<iostream>
#include<set>
using namespace std;
set<string> mys;
int main(){
  int N;
  cin>>N;
  for(int i=0; i<N; i++){
    string s;
    cin>>s;
    mys.insert(s);
  }
  cout<<mys.size()<<endl;
  return 0;
}


Measured memory_bytes: 19252
#include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;
typedef int64_t ll;

int main() {
    double a;
    cin >> a;
    cout << fixed << setprecision(10) << a * 2 * 3.141592 << endl;
}

Measured memory_bytes: 3784
#include <iostream>
#include <stdio.h> 
#include<string>

using namespace std;
int main(){
	string s1, s2, s3;
	cin>>s1>>s2>>s3;
	cout<<(char)toupper(s1[0])<<(char)toupper(s2[0])<<(char)toupper(s3[0])<<endl;
	return 0;

}

Measured memory_bytes: 256
n, k = map(int, input().split())
p = list(map(int, input().split()))
c = list(map(int, input().split()))

frag, loop, lcnt = set(), [], []
for i in range(n):
    if i in frag:
        continue
    now, tmpl, tmpc = i, [], 0
    while (now not in frag):
        frag.add(now), tmpl.append(now)
        now = p[now] - 1
        tmpc += c[now]
    else:
        loop.append(tmpl * 2)
        lcnt.append(tmpc)

lacc = []
for l in loop:
    tmp = [0]
    for li in l[1:]: 
        tmp.append(tmp[-1] + c[li])
    lacc.append(tmp)

ans = min(c)
for l, la, lc in zip(loop, lacc, lcnt):
    llen = len(l) // 2
    num = k % llen
    for cnt in range(1, min(llen + 1, k + 1)):
        for i in range(len(l) - cnt - 1):
            tmp = la[i + cnt] - la[i]
            tmp2 = tmp + lc * (k // llen - (cnt > num))
            ans = max(ans, tmp, tmp2)
print(ans)


Measured memory_bytes: 69216
#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(long long)(n);i++)
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
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; }
 
const ll MOD=1e9+7;
const ll INF=1e18;
const int MAX=510000;
const double pi=acos(-1);
int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,-1,1,1,-1};
// int d[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};


int main(){
  cin.tie(0);
  ios::sync_with_stdio(false); 
  
  int n;
  cin >> n;
  int m=1e6;
  vector<int>vec(m+1);
  rep(i,n){
    int a;
    cin >> a;
    vec[a]++;
  }
  int ans = 0;
  
  for(int i=0;i<=m;i++){
    if(vec[i]==0)continue;
    if(vec[i]==1)ans++;
    for(int j=i;j<=m;j+=i){
      vec[j]=0;
    }
  }
  cout << ans << endl;
  return 0;
}


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

using namespace std;

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

using ll = long long;

int main()
{
    ll A, B, K;
    cin >> A >> B >> K;

    if(A + B < K)
    {
        cout << 0 << " " << 0 << endl;
    }
    else if(A < K)
    {
        cout << 0 << " " << A + B - K << endl;
    }
    else
    {
        cout << A - K << " " << B << endl;
    }
    
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
using namespace std;
bool kt(char s1, char s2)
{
    if (s1 + 1 == s2) return true;
    return false;
}
int main()
{
    //freopen("test.inp","r",stdin);
    string s;
    int res = 0, n;
    cin >> n >> s;
    while (s.find("ABC") != string::npos)
    {
        res++;
        s.erase(s.find("ABC"), 3);
    }
    cout << res;
    return 0;
}


Measured memory_bytes: 256
# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
N = int(input())
A = list(map(int, input().split()))
mod =10**9 +7
sum_a =sum(A)
ans =0
for i in range(N-1):
    sum_a -=A[i]
    ans +=(A[i] *(sum_a)) %mod
ans %=mod        
print(ans)

Measured memory_bytes: 31376
import sys
import itertools
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
x=int(input())
l=[]
for a in range(-1000,1000):
	for b in range(-1000,1000):
		p=a**5-b**5
		if p==x:
			l.append([a,b])

print(l[0][0],l[0][1])

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

const long long INF = 1LL << 60;

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

int main(){

    long long H, W;
    cin >> H >> W;

    //scores, init as INF 
    vector<vector<long long>> score(H, vector<long long>(W, INF));

    int CH, CW; cin >> CH >> CW; CH--; CW--;
    int DH, DW; cin >> DH >> DW; DH--; DW--;

    vector<string> S(H);
    for(int h=0; h<H; ++h){
        cin >> S[h];
    }

    //x, y, cost
    deque<tuple<int, int, int>> que;
    que.emplace_back(CH, CW, 0);
    score[CH][CW] = 0;

    while(!que.empty()){
        int h, w, c;
        tie(h, w, c) = que.front();
        que.pop_front();

        if(c > score[h][w]) continue;

        //普通の移動
        for(int dir=0; dir<4; ++dir){
            int nh = h + dy[dir];
            int nw = w + dx[dir];

            if( nw < 0 || W <= nw || nh < 0 || H <= nh || S[nh][nw] == '#'  ){
                continue;
            }

            int nc = c;
            if(nc < score[nh][nw]){
                score[nh][nw] = nc;
                que.emplace_front(nh, nw, nc);
            }
        }
        
        //魔法
        for(int dh=-2; dh<=2; ++dh){
            for(int dw=-2; dw<=2; ++dw){
                int nh = h + dh;
                int nw = w + dw;
                if( nw < 0 || W <= nw || nh < 0 || H <= nh || S[nh][nw] == '#'  ){
                    continue;
                }
                int nc = c+1;
                if(nc < score[nh][nw]){
                    score[nh][nw] = nc;
                    que.emplace_back(nh, nw, nc);
                }
            }
        }
    }

    if(score[DH][DW] == INF){
        cout << -1 << endl;
    }else{
        cout << score[DH][DW] << endl;
    }
}


Measured memory_bytes: 13384
#include<bits/stdc++.h>
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")

using namespace std;

typedef long long ll;

//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>pb_ds;

#define pi pair<int,int>
#define F first
#define S second
#define pb push_back
#define pp pop_back
#define eps 10E-10
#define mod 998244353
#define pai acos(-1)
#define N 1000005



int main ()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
//   freopen("in.txt","r",stdin);
//   freopen("out.txt","w",stdout);
   int n;
   ll ar,ans=1ll,x=1000000000000000000;
   bool f=1,ok=1;
   cin>>n;
   for(int i=1;i<=n;i++){
      cin>>ar;
      if(ar==0) f=0;
      if(f&&ok){
         if(ans>x/ar) ok=0;
         if(ok) ans*=ar;
      }
   }
   if(!f) cout<<0;
   else if(!ok) cout<<-1;
   else cout<<ans;
   return 0;
}


Measured memory_bytes: 3604
#include<iostream>
#include<string>
using namespace std;
using ll = long long;

int main() {
	ll n;
	cin >> n;
	int a[1000000];
	ll ans = 0;
	cin >> a[0];
	for (int i = 0;i < n - 1;i++) {
		cin >> a[i + 1];
		if (a[i] == i + 1) {
			swap(a[i + 1], a[i]);
			ans++;
		}
	}
	if (a[n - 1] == n) ans++;
	cout << ans << endl;
}

Measured memory_bytes: 2688
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
  int n,id,i;
  cin >> n;
  vector<int> a(n),b(n),c(n);
  int tb;
  long long ans=0;
  for(i=0;i<n;i++){
    cin >> a[i];
  }
  for(i=0;i<n;i++){
    cin >> b[i];
  }
  for(i=0;i<n;i++){
    cin >> c[i];
  }
  sort(a.begin(),a.end());
  sort(c.begin(),c.end());
  for(int i=0;i<n;i++){
    auto pa = lower_bound(a.begin(),a.end(),b[i]);
    auto pc = upper_bound(c.begin(),c.end(),b[i]);
    size_t sa = distance(a.begin(),pa);
    size_t sc = distance(c.begin(),pc);
    ans += sa*(n-sc);
  }
  cout << ans<<endl;
}


Measured memory_bytes: 1408
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		String s="";
		int n,m;
		s=s+String.valueOf(S.charAt(0));
		s=s+String.valueOf(S.charAt(1));
		n=Integer.parseInt(s);
		s="";
		s=s+String.valueOf(S.charAt(2));
		s=s+String.valueOf(S.charAt(3));
		m=Integer.parseInt(s);
		if(1<=n&&n<=12){
			if(1<=m&&m<=12){
				System.out.println("AMBIGUOUS");
			}
			else{
				System.out.println("MMYY");
			}
		}
		else if(1<=m&&m<=12){
			System.out.println("YYMM");
		}
		else
			System.out.println("NA");
	}

}

Measured memory_bytes: 21460
s = list(input())
s.append('T')
X,Y =map(int, input().split())
curX = True
cnt = 0
X_s = []
Y_s = []
for i,c in enumerate(s):
    if c == 'T':
        if curX:
            X_s.append(cnt)
        else:
            Y_s.append(cnt)
        curX = not curX
        cnt=0
    else:
        cnt+=1

init = 0
if s[0] == 'F':
    init = X_s.pop(0)
X -= init

SETX = set([0])
SETY = set([0])

for TX in X_s:
    ADD = set()
    for SX in SETX:
        ADD.add(SX+TX)
    SETX.add(TX)
    SETX = ADD | SETX
for TY in Y_s:
    ADD = set()
    for SY in SETY:
        ADD.add(SY+TY)
    SETY.add(TY)
    SETY = ADD | SETY
# 合計から目的地の差
MODX = sum(X_s)-X
MODY = sum(Y_s)-Y
# print(SETX, SETY, MODX, MODY)
if MODX % 2 == 0 and MODX//2 in SETX and MODY % 2 == 0 and MODY//2 in SETY:
    print('Yes')
else:
    print('No')


Measured memory_bytes: 81396
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
#define p(x) cout<<(x)<<endl;
#define pv(v) for(auto a: v){ cout << a << endl; }

int main() {
  int n; cin >> n;
  vector <int> ls(n);
  rep(i, n){
    cin >> ls[i];
  }

  sort(ls.begin(), ls.end());
  p(ls[n-1] - ls[0]);
}


Measured memory_bytes: 256
#include<stdio.h>
 
int main()
{
    long long int b;
    scanf("%lld",&b);
    int i = 0;
    char str[100];
    
    while(b > 0)
	{
        int check = b % 26;
        
        if (check == 0)
		{
            str[i++] = 'z';
            b = (b/26) - 1;
        }
		else
		{
            str[i++] = (check - 1) + 'a';
            b /= 26;
        }
    }
    str[i] = '\0';
    
	int j;
    for(j = i - 1; j >= 0; j--)
	{
        printf("%c", str[j]);
    }
    
    return 0;
}

Measured memory_bytes: 1628
# 02-Getting_Started-Rectangle.py

# ????????¢?????¢?????¨??¨?????????
# ?????? a cm ?????? b cm ???????????¢?????¢?????¨??¨?????????????±???????????????°?????????????????????????????????

# Input
# a ??¨ b ????????????????????§????????????????????????????????????
# Output
# ??¢?????¨??¨?????????????????????????????§????????£????????????????????????????????????

# Sample Input
# 3 5
# Sample Output
# 15 16

# print("a??¨b?????\??????")
a,b=map(int,input().split())
# print("a=%d, b=%d."%(a,b))

# print("??¢??????%f ."%(a*b));
# print("??¨????????????%f ."%(2*a+2*b));
print("{0} {1}".format(a*b, 2*a+2*b));

Measured memory_bytes: 7576
import java.math.*;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		BigInteger a,b;
		Scanner cin = new Scanner(System.in);
		while(cin.hasNext()) {
			a = cin.nextBigInteger();
			b = cin.nextBigInteger();
			if(a.compareTo(b)==0)
				System.out.println("EQUAL");
			else if(a.compareTo(b)>0)
				System.out.println("GREATER");
			else 
				System.out.println("LESS");
				
		}
		cin.close();
	}

}

Measured memory_bytes: 23892
#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>

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

using namespace std;

namespace mp = boost::multiprecision;
using Bint = mp::cpp_int;

using ll = long long;
ll mod = pow(10, 9) + 7;

template <typename T> void output(T, ll);
ll gcd(ll, ll);
ll lcm(ll, ll);
Bint comb(Bint, Bint);
void prime_map(map<ll, ll> &, ll);

int main() {
    // source
    ll n, m;
    cin >> n >> m;
    ll ans = 0;
    if (n == 1) {
        if (m == 1) {
            ans = 1;
        } else {
            ans = m - 2;
        }
    } else {
        if (m == 1) {
            ans = n - 2;
        } else {
            ans = (n - 2) * (m - 2);
        }
    }
    cout << ans << endl;
    return 0;
}

Bint comb(Bint a, Bint b) {
    Bint ans = 1;

    if (a < b) {
        return 0;
    }

    rep(i, b) {
        ans *= a - i;
        ans /= i + 1;
    }

    return ans;
}

template <typename T> void output(T a, int precision) {
    if (precision > 0) {
        cout << setprecision(precision) << a << "\n";
    } else {
        cout << a << "\n";
    }
}

template <typename T> T min(T a, T b) {

    if (a < b) {
        return a;
    } else {
        return b;
    }
}

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

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

void prime_map(map<ll, ll> &m, ll num) {

    if (num == 1) {
        return;
    }
    ll cache = num;
    repd(i, 2, sqrt(num) + 2) {
        if (num % i == 0) {
            if (m[i] == 0) {
                m[i] = 1;
            } else {
                m[i]++;
            }

            num /= i;
            break;
        }
    }
    if (cache == num) {
        if (m[num] == 0) {
            m[num] = 1;
        } else {
            m[num]++;
        }

        return;
    }
    prime_map(m, num);
    return;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ul;
typedef signed long long ll;
ul over = 1000000007;

int main(void)
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed;
  string s;
  cin >> s;
  for (ll i = 0; i < s.size(); i+=2) cout << s[i];
  cout << endl;
  return 0;
}


Measured memory_bytes: 592
#include<cstdio>
using ll = long long;
using ull = unsigned long long;
const static int MOD = 1000000007;

ll RepeatSquaring(ll N, ull P){
	if(P == 0 || N == 1) return 1;
	if(N == -1) return P & 1 ? -1 : 1;
	if(!(P & 1)){
		ll t = RepeatSquaring(N, P >> 1);
		return t*t % MOD;
	}
	//Pが偶数のときN^(P/2)を求めてからそれの2乗を返す
	return N*RepeatSquaring(N, P - 1) % MOD;
	//Pが奇数のときN^((P - 1)/2)を求めてからそれの2乗を返す
}

ull Combination(ull n, ull r){
	ull ret = 1;
	if(n - r < r) r = n - r;
	for (int i = 0; i < r; ++i){
		ret = ret*(n - i) %MOD *RepeatSquaring(i+1, MOD-2) %MOD;
	}
	return ret;
}

int main(){
	ull n, a, b;
	scanf("%llu %llu %llu", &n, &a, &b);
	printf("%llu\n", (RepeatSquaring(2,n) + MOD*2 - Combination(n, a) - Combination(n, b) - 1) %MOD);
	return 0;
}

Measured memory_bytes: 128
#include<iostream>
using namespace std;
int main(){
    int a,b,c;
    cin >> a >> b >> c;
    
    if (a < b){
        if(b < c){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }else{
        cout << "No" << endl;
    }
    
    return 0;
}


Measured memory_bytes: 3088
#include <algorithm>
#include <iostream>
#include <cstring>
#include <vector>
using namespace std;

typedef long long ll;

const int MAX_N = 1e5 + 5, MOD = 1e9 + 7;
int n, m;

int main() {
	ios::sync_with_stdio(false), cin.tie(0);
	cin >> n >> m;
	if (n * 500 >= m)
		cout << "Yes";
	else
		cout << "No";
	

	return 0;
}

Measured memory_bytes: 256
//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
#include <bits/stdc++.h>
//#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<22,stdin),p1 == p2)?EOF:*p1++)
using namespace std ;
//char buf[(1 << 22)] , *p1 = buf , *p2 = buf ;
inline int read ()
{
    char c = getchar () ; int x = 0 , f = 1 ;
    while (c < '0' || c > '9') { if (c == '-') f = -1 ; c = getchar () ; }
    while (c >= '0' && c <= '9'){ x = x * 10 + c - '0' ; c = getchar () ; }
    return x * f ;
}
int a , b ;
int main ()
{
//    freopen (".in" , "r" , stdin) ; freopen (".out" , "w" , stdout) ;
	cin >> a >> b ;
	cout << max (0 , a - 2 * b) ; 
}




Measured memory_bytes: 256
#include <stdio.h>

//問題文より、入力されるデータの最大個数
#define MAXCOUNT 200000

int main(void)
{
	/*
	nは入力されるデータの個数を格納
	new_price - base_priceで利益を求め、diff_priceに代入する
	*/
	int i, n, base_price, new_price, diff_price;
	int price[MAXCOUNT];

	//データの個数を入力
	scanf("%d", &n);

	//データを入力
	for(i = 0; i < n; i++){
		scanf("%d", &price[i]);
	}

	//最大の利益を求める
	for(i = 0; i < (n - 1); i++){
		//ループの最初ならば初期値を代入
		if(i == 0){
			base_price = price[i];
			new_price = price[i + 1];
			diff_price = new_price - base_price;
		}
		//基準価格は最小にする
		else if(base_price > price[i]){
			base_price = price[i];
			new_price = price[i + 1];
			//最大利益が出るならば、更新する
			if(diff_price < (new_price - base_price)){
				diff_price = new_price - base_price;
			}
		}
		//変動後の価格は最大にする
		else if(new_price < price[i + 1]){
			new_price = price[i + 1];
			//最大利益が出るならば、更新する
			if(diff_price < (new_price - base_price)){
				diff_price = new_price - base_price;
			}
		}
	}

	//結果を出力
	printf("%d\n", diff_price);
	
	return 0;
}


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

int main(void){
    long long int A, B;
    cin >> A >> B;

    if(A%2 != B%2){
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }

    cout << (A + B) / 2 << endl;
    return 0;
}

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

#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MAXX 500005
#define INF INT_MAX

#define PI   3.14159265358979323846264338327950

#define PB push_back
#define PF push_front
#define F first
#define S second

#define fixx(n) fixed << setprecision(n)

#define ll 	 long long

#define mod  1000000007

vector<int> adj[MAXX];
int s = 0;
bool used[MAXX];

void DFS(int node){
    used[node] = true;
    s++;
    for(int i = 0; i < adj[node].size(); i++){
        int to = adj[node][i];
        if(!used[to]){
            DFS(to);
        }
    }
}


int main()
{
	FAST;
	int n, m;
	cin >> n >> m;
    for(int i = 0; i < m; i++){
        int x , y;
        cin >> x >> y;
        adj[x].push_back(y);
        adj[y].push_back(x);
    }
    memset(used , false , sizeof(used));
    int ans = 0;
    for(int i = 1; i <= n; i++){
        if(!used[i]){
            s = 0;
            DFS(i);
            ans = max(ans , s);
        }
    }
    cout << ans << endl;
	return 0;
}

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

ll rec(ll A, ll K) {
    if (A < K) return 0;
    if (A%K == 0) return A/K;
    if (A/K < K) {
        ll L = A/K+1;
        if ((A%K)%L == 0) return A/K;
        else return rec(A-A%K/L*L-L, K);
    }
    return rec(A-A/K-1, K);
}

int main() {
    int N;
    cin >> N;
    ll grundy = 0;
    for (int i = 0; i < N; i++) {
        ll A, K;
        cin >> A >> K;
        grundy ^= rec(A, K);
    }
    cout << ((grundy == 0) ? "Aoki" : "Takahashi") << endl;
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define debug(x) cout << '>' << #x << ':' << x << endl;
#define ll long long

int main() {
	int r, g, b, n, ans = 0;
	scanf("%d%d%d%d", &r, &g, &b, &n);
	for (int i = 0; i <= n; i++) {
		for (int j = 0; j <= n; j++) {
			int third = r * i + g * j;
			if (n - third >= 0 && (n - third) %b == 0) {
				ans++;
			}
		}
	}
	printf("%d", ans);
}


Measured memory_bytes: 3792
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9+7;
//const long long MOD = ;
const long long INF_LL = 1e18+3; const int INF_int = 1e9+3;
#define ll long long
#define rep(i,n) for(int i = 0;i<n;i++)
#define lrep(i,n) for(long long i = 0;i<n;i++)
#define All(a) a.begin(),a.end()
#define Debug_Output_ALL(a) for(auto itr = a.begin();itr!=a.end();itr++) cout << *itr << " ";cout << endl;
int main(){
    int a,b;
    cin >> a>> b;
    cout << a*b << endl;
}


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

#define rep(i,s,n) for (int i = (int)s; i < (int)n; i++)
#define ll long long
#define ld long double
#define pb push_back
#define eb emplace_back
#define All(x) x.begin(), x.end()
#define Range(x, i, j) x.begin() + i, x.begin() + j
#define lbidx(x, y) lower_bound(x.begin(), x.end(), y) - x.begin()
#define ubidx(x, y) upper_bound(x.begin(), x.end(), y) - x.begin()
#define llbidx(x, y, z) lower_bound(x.begin(), x.end(), z) - lower_bound(x.begin(), x.end(), y) // 二要素間の距離
#define deg2rad(deg) ((((double)deg)/((double)360)*2*M_PI))
#define rad2deg(rad) ((((double)rad)/(double)2/M_PI)*(double)360)
#define Find(set, element) set.find(element) != set.end()
#define Decimal(x) printf("%.10f\n", x) // 小数点を10桁まで表示
// debug用
#define PrintVec(x) for (auto elementPrintVec: x) { cout << elementPrintVec << " "; } cout << "\n";
#define debug(x) cerr << #x << ": " << (x) << "\n";
#define endl "\n"
// gcj print用
#define Case(x) printf("Case #%d: ", x);

typedef pair<int, int> PI;
typedef pair<ll, ll> PLL;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<vector<vector<int>>> vvvl;
typedef vector<PI> vpi;
typedef vector<vector<PI>> vvpi;
typedef vector<vector<vector<PI>>> vvvpi;
typedef vector<PLL> vpl;
typedef vector<vector<PLL>> vvpl;
typedef vector<vector<vector<PLL>>> vvvpl;

int POWINT(int x, int n) {
  int ret = 1;
  while (n > 0) {
    if (n & 1) ret *= x;
    x *= x;
    n >>= 1;
  }
  return ret;
};

ll POWLL(ll x, int n) {
  ll ret = 1;
  while (n > 0) {
    if (n & 1) ret *= x;
    x *= x;
    n >>= 1;
  }
  return ret;
};

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 main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  ll a, b, n;
  cin >> a >> b >> n;

  if (b > n) {
    cout << a * n / b << endl;
  } else {
    cout << a * (b-1) / b << endl;
  }

  return 0;
};


Measured memory_bytes: 3640
#include<bits/stdc++.h>
using namespace std;
bool cmp(double a, double b) {
    return a > b;
}
int main(){
    int N,K;cin>>N>>K;
    vector<double>p(N+1);
    p[0]=0;
    for(int i=1;i<N+1;i++){
        double m;cin>>m;
        p[i]+=(m+1.0)/2.0+p[i-1];
        //cout<<p[i]<<endl;
        
    }

    vector<double>q(N-K+1);
    for(int i=0;i<N-K+1;i++){
        q[i]=p[i+K]-p[i];
        //cout<<q[i]<<endl;

    }
    sort(q.begin(),q.end(),cmp);
    cout<<fixed<<setprecision(10)<<q[0]<<endl;
}

Measured memory_bytes: 3328
#include <bits/stdc++.h>
using namespace std;
  
int main() {
  int a,b,c;
  cin>>a>>b>>c;
  if(a==b || a==c || b==c){
    if(a==b && a==c && b==c){
      cout<<1<<endl;
    }
    else{
      cout<<2<<endl;
    }
  }
  else{
    cout<<3<<endl;
  }
}

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

int main() {
	string S;
    string T;
    cin >> S >> T;
	sort(S.begin(), S.end());
	sort(T.begin(), T.end());
	reverse(T.begin(), T.end());
	if(S < T) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}


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

int main(){
  string s;
  cin>>s;
  bool aw=false;
  for(int i=0;i<s.size();i+=2){
    if(s[i]=='L'){
      aw=true;
    }
  }
  for(int i=1;i<s.size();i+=2){
    if(s[i]=='R'){
      aw=true;
    }
  }
  if(aw) cout<<"No"<<endl;
  else   cout<<"Yes"<<endl;
}
  

      


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

#define ED return 0;
#define SORT(vec) sort(vec.begin(),vec.end());
#define DOUBLECHANGE(count) cout << setprecision(count);
#define REV(vec) reverse(vec.begin(),vec.end());
#define ipow(x,y) int(pow(x,y))
const long long mod = 1000000007;

int main() {
    int A, B;
    cin >> A >> B;
    if(A == 1){
        A = 14;
    }
    if(B == 1){
        B = 14;
    }
    if(A > B){
        cout << "Alice" << endl;
        ED
    }
    if(A < B){
        cout << "Bob" << endl;
        ED
    }
    cout << "Draw" << endl;
}


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

using namespace std;
using Graph = vector<vector<int>>;
using Grid= vector<vector<char>>;
using vin= vector<int>;
using ll=long long;
using vll= vector<ll>;
using vbl=vector<bool>;
using vch=vector<char>;
using pinin=pair<int ,int>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define sort(x) sort(x.begin(), x.end());
#define rese(x) reverse(x.begin(), x.end());

int main() {
    
   int n,m;
   cin>>n>>m;
   Graph g(n);
   rep(i,m){
       int a,b;
       cin>>a>>b;
       a--; b--;
       g[a].push_back(b);
       g[b].push_back(a);
       
   }
   vbl seen(n,0);
   
  
   
   int ans=0;
   rep(i,n){
       if(seen[i]){
           continue;
       }
       int k=0;
       queue<int> ma;
       seen[i]=1;
       ma.push(i);
       while(!ma.empty()){
           int j=ma.front();
           
           k++;
           ma.pop();
           for(int x:g[j]){
               if(seen[x]){
                   continue;
               }
               seen[x]=1;
               
               ma.push(x);
           }
       }
       if(ans<k){
           ans=k;
       }
   }
   cout<<ans<<endl;
}

Measured memory_bytes: 14860
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#define int long long
using namespace std;
signed main() {
	int a, b; cin >> a >> b;
	if (a < 6)cout << "0\n";
	else if (a < 13)cout << b / 2 << endl;
	else cout << b << endl;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int A = int.Parse(input[0]);
            int B = int.Parse(input[1]);
            int max = Math.Max(A + B, A - B);
            max = Math.Max(max, A * B);
            Console.WriteLine(max);
        }

    }
}


Measured memory_bytes: 13140
#include<bits/stdc++.h>
using namespace std;
///Welcome to Nasif's Code
#define bug printf("bug\n");
#define bug2(var) cout<<#var<<" "<<var<<endl;
#define co(q) cout<<q<<endl;
#define all(q) (q).begin(),(q).end()
#define pi acos(-1)
#define inf 1000000000000000LL
#define FastRead    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define MODADD(ADD_X,ADD_Y)  (ADD_X+ADD_Y)%MOD;
#define MODSUB(SUB_X,SUB_Y)  (SUB_X-SUB_Y)+MOD)%MOD;
#define MODMUL(MUL_X,MUL_Y)  (MUL_X*MUL_Y)%MOD;
#define LCM(LCM_X,LCM_Y) (LCM_X*LCM_Y)/__gcd(LCM_X,LCM_Y);
typedef long long int ll;
typedef unsigned long long int ull;
const int MOD = (int)1e9+7;
const int MAX = 1e6;
int dx[]= {1,0,-1,0,1,-1,1,-1};
int dy[]= {0,1,0,-1,1,-1,-1,1};
int arr[MAX],mx[MAX];
int main()
{
    FastRead
    //freopen("output.txt", "w", stdout);

    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>arr[i];
        mx[i]=arr[i];
    }
    sort(mx,mx+n);
    for(int i=0;i<n;i++){
        int ans=mx[n-1];
        if(arr[i]==mx[n-1])
        ans=mx[n-2];
    cout<<ans<<endl;
    }

    return 0;
}


Measured memory_bytes: 5176
#define _CRT_SECURE_NO_WARNINGS
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define true 1
#define false 0
#include <stdio.h>
#include <string.h>
#include <math.h>


int main() {
	int a, n, b;
	scanf("%d %d %d", &n, &a, &b);
	int ans = a * n;
	if (ans > b) {
		ans = b;
	}
	printf("%d\n", ans);
}


Measured memory_bytes: 128
input = input().split()
# input = '5 4 2 2 1'.split()

W = int(input[0])
H = int(input[1])
x = int(input[2])
y = int(input[3])
r = int(input[4])

circlePoints = [
    [x - r, y],
    [x + r, y],
    [x, y - r],
    [x, y + r]
]

isInRect = 'Yes'

for point in circlePoints:
    dx = point[0]
    dy = point[1]
    
    if (dx > W or dx < 0 or dy > H or dy < 0):
        isInRect = 'No'

print(isInRect)



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

using namespace std;
typedef long long ll;

#define MOD (long long)(1e9+7)
#define INF (1LL<<60)
#define rep(i,n) for(ll i = 0; i < (n); i++)
#define rep1(i,n) for(ll i = 1; i <= (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;
}


// 最大公約数
ll gcd(ll a, ll b)
{
  if(b == 0) return a;
  return gcd(b, a % b);
}

// mod m におけるa の逆元
ll modinv(ll a, ll m) {
  ll b = m, u = 1, v = 0;
  while (b) {
    ll t = a / b;
    a -= t * b; swap(a, b);
    u -= t * v; swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}

// 素因数分解
vector<pair<ll, ll>> prim;
void pf(ll n)
{
  ll s = sqrt(n);
  ll r = 0;
  for(ll i = 2; i <= s; i++) {
    if((n % i) == 0) {
      r = 0;
      do {
	r++;
	n = n / i;
      } while((n % i) == 0);
      prim.push_back({i, r});
    }
  }
  if(n > s) {
    prim.push_back({n, 1});
  }
}

void solve()
{
  // ll N; cin >> N;
  // ll N, K; cin >> N >> K;
  // ll x, y, z; cin >> x >> y >> z;
  // ll a, b, c; cin >> a >> b >> c;
  // string s; cin >> s;
  // vector<ll> a(N); rep(i, N) cin >> a[i];
  char a, b; cin >> a >> b;
  
  string ans = "=";
  if(a < b) ans = "<";
  if(a > b) ans = ">";
  // bool ok = false;

  cout << ans << endl;
  // cout << (ok?"Yes":"No") << endl;
}


int main(void)
{
  // ll t; cin >> t; rep(i, t)
  solve();
}


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

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second

typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;

void Main()
{
	int n;
	cin >> n;
  	vll a(n);
  	rep(i,n) cin >> a[i];
  	sort(all(a));
  	
	cout << a[n-1] - a[0] << endl;
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
	return 0;
}


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

// エイリアス
using  ll = long signed long;
using ull = long unsigned long;
using  ld = long double;
using   P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;

// 汎用マクロ
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define FOREACH(i,q) for (auto &i : q)
#define UNIQUE(v) do { sort((v).begin(), (v).end()); (v).erase(unique((v).begin(), (v).end()), (v).end()); } while (false)
#define SZ(x) ((int)(x).size())
template <class T>inline bool chmin(T &a, const T b) {if (a > b) { a = b; return true;} return false;}
template <class T>inline bool chmax(T &a, const T b) {if (a < b) { a = b; return true;} return false;}
template <class T>inline void line_out(const vector<T> vec) {int n = SZ(vec); rep(i, n) { cout << vec[i]; if(i < n-1) cout << " ";}cout << endl;}
const int di[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int dj[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int INF = 1 << 28;
const ll INF64 = 1ll << 60;
const int mod = 1000000007;
//const int mod = 998244353;
//const ll mod = 1777777777ll;
struct mint
{
  ll x; // typedef long long ll;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  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++()
  {
    if ((x += 1) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator--()
  {
    if ((x += mod - 1) >= mod)
      x -= mod;
    return *this;
  }
  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;
  }
};


int main()
{
  string s; cin >> s;
  int n = s.size();
  string ans = "";
  rep(i, n) if(i%2==0) ans.push_back(s[i]);
  cout << ans << endl;
}

Measured memory_bytes: 3724
open Batteries
(* 前からst文字を消す *)
let cut st str = String.init (String.length str - st) (fun a -> String.get str (a+st))
(* 後ろからed文字を消す *)
let back_cut ed str = String.init (String.length str - ed) (String.get str)
(* 文字列をcharのlistにする *)
let explode s = List.init (String.length s) (String.get s)


let s = read_line ()
let l = if String.length s mod 2 = 1 then (String.length s / 2) + 1 else String.length s / 2 

let front = back_cut l s |> explode |> List.rev
let back = cut l s |> explode

(* backをfrontに合わせる *)
let rec loop lst1 lst2 =
  if lst1 = [] && lst2 = [] then 0
  else if List.hd lst1 = List.hd lst2 then loop (List.tl lst1) (List.tl lst2)
  else 1 + loop (List.tl lst1) (List.tl lst2)

let _ = (if front = back || String.length s = 1 then 0 else loop front back) |> Printf.printf "%d\n"


Measured memory_bytes: 3072
'use strict';
function Main(inputString) {
  let input = inputString.split("\n");
  let string = input[0];
  let point = parseInt(input[1]);
  let which = 0;
  while(point){
    if (string.length - 1 == which) {
      point = point%26;
      var code = (string[which].charCodeAt(0) + point);
      if(code > 122){
        code += (- 122 + 97 - 1);
      }
      var lastLetter = String.fromCharCode(code);
      point = 0;
      string = string.slice(0, which) + lastLetter + string.slice(which+1);
    } else {
      if((27 - (string[which].charCodeAt(0) - 97 + 1)) <= point && !(string[which] == "a")){
        point = point - (27 - (string[which].charCodeAt(0) - 97 + 1));
        string = string.slice(0, which) + "a" + string.slice(which+1);
      }
      ++which;
    }
  }
  console.log(string);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Measured memory_bytes: 37732
pub fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

pub fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

pub fn read_vec2<T: std::str::FromStr>(n: usize) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}

pub fn read_col<T: std::str::FromStr>(n: usize) -> Vec<T> {
    (0..n).map(|_| read()).collect()
}

fn main() {
    let s: String = read();
    let l = s.len();
    let cv: Vec<usize> = s.chars().map(|c| c as usize - 'a' as usize).collect();

    for i in 1..l {
        if cv[i - 1] == cv[i] {
            println!("{} {}", i, i + 1);
            return;
        }
    }

    for i in 2..l {
        if cv[i - 2] == cv[i] {
            println!("{} {}", i - 1, i + 1);
            return;
        }
    }

    println!("-1 -1");
}


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

int gcd(int x,int y){
    int a;
    while(y!=0){
        a=x%y;
        x=y;
        y=a;
    }
    return x;
}

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

    vector<int> x(n+1);
    for(int i=0;i<n+1;i++) cin>>x.at(i);
    sort(x.begin(),x.end());
    reverse(x.begin(),x.end());

    ans=x.at(0)-x.at(1);
    for(int i=1;i<n;i++){
        ans=gcd(ans,x.at(i)-x.at(i+1));
    }

    cout<<ans<<endl;

}


Measured memory_bytes: 640
#include<iostream>
#include<algorithm>
#define INF (1e9)
#define N c[n-1]*2-1
using namespace std;
int main(){
  int n,c[50],k=0;
  while(cin>>n&&n){
    k++;
    for(int i=0;i<n;i++)cin>>c[i];
    cout<<"Case #"<<k<<": ";
    if(c[0]==1){
      int dp[2001]={};
      for(int i=1;i<=N;i++)dp[i]=INF;
      for(int i=0;i<n;i++)
	for(int j=c[i];j<=N;j++)
	  dp[j]=min(dp[j],dp[j-c[i]]+1);
      int f=0;
      for(int i=1;i<=N;i++){
	int a=0,s=i;
	for(int j=n-1;s!=0;j--){
	  a+=s/c[j];
	  s%=c[j];
	}
	if(a!=dp[i]){f=1;break;}
      }
      if(f)cout<<"Cannot use greedy algorithm"<<endl;
      else cout<<"OK"<<endl;
    }
    
    else cout<<"Cannot pay some amount"<<endl;
  }
  return 0;
}

Measured memory_bytes: 1168
#include <iostream>
#include <queue>

using namespace std;
struct dish
{
    long long A;
    long long B;
};

int main()
{
    // 整数の入力
    long long N, K, i, a_i, b_i, sumA, sumB;
    sumA = 0LL;
    sumB = 0LL;
    auto c = [](dish p1, dish p2) {
        return (p1.A + p1.B) < (p2.A + p2.B);
    };

    priority_queue<dish, vector<dish>, decltype(c)> q1(c);

    cin >> N;

    for (int i = 0; i < N; i++)
    {
        cin >> a_i >> b_i;
        q1.push({a_i, b_i});
    }

    for (int i = 0; i < N; i++)
    {
        if (i % 2 == 0)
        {
            dish d = q1.top();
            sumA += d.A;
            q1.pop();
        }
        else
        {
            dish d = q1.top();
            sumB += d.B;
            q1.pop();
        }
    }
    cout << sumA - sumB << endl;

    return 0;
}

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

int main() {

    ios::sync_with_stdio(0);
    cin.tie(NULL), cout.tie(NULL);

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

    long long ans = 0;

    for(int b=k+1; b<=n; b++)
    {
        int curr = (n + 1) / b * (b - k);
        curr += max((n + 1) % b - k, 0);

        ans += curr - (k == 0);
    }

    cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	long long ans = 0;
	while (n--) {
		int a;
		cin >> a;
		while (a % 2 == 0) {
			a /= 2;
			ans++;
		}
	}
	cout << ans << endl;
	return 0;	
}

Measured memory_bytes: 256
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int A[];
        A=new int[N];
        for(int i=0;i<N;i++) A[i]=sc.nextInt();
        Arrays.sort(A);
        double ans=A[0];
        for(int i=1;i<N;i++) ans=(ans+A[i])/2;
        System.out.printf("%.10f\n",ans);
    }
}

Measured memory_bytes: 35884
(declaim (optimize (speed 3) (debug 0) (safety 0)))

(let ((x (read)))
  (declare (type fixnum x))

  (defun solve (n &optional (i 0) (ans 1))
    (declare (type fixnum n i ans))
    (if (= i n)
      ans
      (solve n (the fixnum (1+ i)) (the fixnum (mod (* ans (1+ i)) (+ (expt 10 9) 7))))))

  (format t "~a~%"
          (solve x)))



Measured memory_bytes: 24284