akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;

// template {{{  0 
// using {{{ 1
using ll = long long int;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vii = vector<pii>;
using vll = vector<pll>;
// }}} 1
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x,y) scanf("%d%d", &x, &y)
#define Scd3(x,y,z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%lld", &x)
#define Scll2(x,y) scanf("%lld%lld", &x, &y)
#define Scll3(x,y,z) scanf("%lld%lld%lld", &x, &y, &z)
#define Scc(c) scanf("%c", &c);
#define Scs(s) scanf("%s", s);
#define Scstr(s) scanf("%s", &s);
// }}} 2
// constants {{{ 2
#define EPS (1e-7)
#define INF (2e9)
#define PI (acos(-1))
// }}} 2
// systems {{{ 2
#define Repe(x,y,z) for(ll x = z; x < y; x++)
#define Rep(x,y) Repe(x,y,0)
#define RRepe(x,y,z) for(ll x = y-z-1; x >= 0; x--)
#define RRep(x,y) RRepe(x,y,0)
// }}} 2
// output {{{ 2
#define YesNo(a) (a)?printf("Yes\n"):printf("No\n")
#define YESNO(a) (a)?printf("YES\n"):printf("NO\n")
// }}} 2
// }}} 1
// input {{{ 1
// }}} 1
// }}} 0

int main() {

    int N;
    cin >> N;
    vector<string> s(N);
    vi t(N);
    Rep(i,N) { cin >> s[i] >> t[i]; }

    string X;
    cin >> X;

    int ans = 0;
    bool tr = false;
    Rep(i,N){
        if( tr ) ans += t[i];
        if( s[i] == X ) tr = true;
    }

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

    return 0;
}



Measured memory_bytes: 256
#include<stdio.h>
#include<math.h>
#include <stdlib.h>
int main()
{
  int a,b,c,d,e,k;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  scanf("%d", &d);
  scanf("%d", &e);
  scanf("%d", &k);
  
  if(e-a>k){
    printf(":(");
  } else {
    printf("Yay!");
  }
  return 0;

}

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

using namespace std;

using ll = long long;

int main()
{
    int n;
    cin >> n;
    ll a[87] = {0};
    a[0] = 2;
    a[1] = 1;
    for(int i = 2; i <= 86; i ++) {
        a[i] = a[i - 1] + a[i - 2];
    }
    cout << a[n];
    cout << "\n";
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
      int n,t=0;
      cin>>n;
      int arr[2*n];
      priority_queue<int,vector<int>,greater<int>> q;
      for(int i=0;i<2*n;i++)
      {
            int k;
            cin>>k;
            q.push(k);
      }
      for(int i=0;i<n;i++)
      {
            int x=q.top();
            q.pop();
            int y=q.top();
            q.pop();
            t=t+min(x,y);
      }
      cout<<t;
}


Measured memory_bytes: 3604
H, W = [int(s) for s in input().split()]
map = []
for i in range(H):
    map.append(input())

op = [[0 for i in range(W)] for j in range(H)]
op[0][0] = int(map[0][0] == '#')
for i in range(1, W):
    op[0][i] = op[0][i-1] + int(map[0][i] == '#' and map[0][i-1] == '.')
for i in range(1, H):
    op[i][0] = op[i-1][0] + int(map[i][0] == '#' and map[i-1][0] == '.')
for i in range(1, H):
    for j in range(1, W):
        op[i][j] = min(op[i-1][j] + int(map[i][j] == '#' and map[i-1][j] == '.'),
                       op[i][j-1] + int(map[i][j] == '#' and map[i][j-1] == '.'))
print(op[H-1][W-1])

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

using ll = long long;
using pii = pair<int, int>;

template<class T>
using max_heap = priority_queue<T>;
template<class T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;

template<class T,class U> void chmax(T& a, U b) {if(a<b)a=b;}
template<class T,class U> void chmin(T& a ,U b) {if(b<a)a=b;}

#define rep(i, j) for (int i = 0; i < j; i++)
#define all(obj) (obj).begin(), (obj).end()
#define rall(obj) (obj).rbegin(), (obj).rend()
#define debug(x) cerr << #x << ": " << x << endl;
#define int ll

const ll mod = 1e9 + 7;
const ll inf = (1LL << 50);

void solve(long long H, long long N, std::vector<long long> A, std::vector<long long> B){
    vector<ll> dp(H + 10001, inf);
    dp[0] = 0;
    rep(i, N) {
        rep(h, dp.size()) {
            if (h - A[i] < 0) continue;
            dp[h] = min(dp[h], dp[h - A[i]] + B[i]);
        }
    }

    ll ans = inf;
    for(int i = H; i < dp.size(); i++) chmin(ans, dp[i]);
    cout << ans << endl;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(10);
    cout << fixed;

    long long H;
    scanf("%lld",&H);
    long long N;
    scanf("%lld",&N);
    std::vector<long long> A(N);
    std::vector<long long> B(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&A[i]);
        scanf("%lld",&B[i]);
    }
    solve(H, N, std::move(A), std::move(B));
    return 0;
}


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

if (a-b)%2==0:
    print(abs(a-b)//2)
else:
    a,b=min(a,b),max(a,b)
    can1=(a)+((b-a)-1)//2
    a,b=n-b+1,n-a+1
    can2=(a)+((b-a)-1)//2
    print(min(can1,can2))

Measured memory_bytes: 9112
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String nl = System.getProperty("line.separator");
		StringBuilder p = new StringBuilder(500);
		StringBuilder d = new StringBuilder(".");
		StringBuilder s = new StringBuilder("#");
		Scanner r = new Scanner(System.in);
		int h, w, i, j, ww;
		String t, u;
		for (i = 0; i < 4; ++i) {
			d.append(d);
			s.append(s);
		}
		ww = d.length();
		while ((h = r.nextInt()) + (w = r.nextInt()) > 0) {
			while (w > ww) {
				d.append(d);
				s.append(s);
				ww += ww;
			}
			p.append(u = s.substring(0,w));
			p.append(nl);
			t = d.substring(0, w - 2);
			for (i = 2; i < h; ++i) {
				p.append('#');
				p.append(t);
				p.append('#');
				p.append(nl);
			}
			p.append(u);
			p.append(nl);
			p.append(nl);
		}
		System.out.print(p);
	}
}

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

int const MAXN = 2e5;
int N, B[MAXN+1];

int main() {
  std::cin >> N;
  std::fill_n(B, N+1, 0);
  for(int i = 2; i <= N; ++i) {
    int A; std::cin >> A;
    ++B[A];
  }
  for(int i = 1; i < N; ++i) std::cout << B[i] << std::endl;
  std::cout << "0" << std::endl;
  return 0;
}


Measured memory_bytes: 4360
N,M=map(int, input().split())
peaks=list(map(int, input().split()))
flag=[1]*N
a=0
b=0
for i in range(M):
  a,b=map(int,input().split())
  a-=1
  b-=1
  if peaks[a]<=peaks[b]:
     flag[a]=0
  if peaks[a]>=peaks[b]:
     flag[b]=0
ans=0
for i in flag:
  ans+=i
print(ans)

Measured memory_bytes: 20048
#include<stdio.h>
int main()
{
	int n,x;
	scanf("%d%d",&n,&x);
	long long a,b,ans=0;
	scanf("%lld",&a);
	if(a>x){
		ans+=a-x;
		a=x;
	}
	for(int i=1;i<n;i++)
	{
		scanf("%lld",&b);
		if((a+b)>x)
		{
			ans+=a+b-x;
			a=x-a;
		}
		else a=b;
	}
	printf("%lld\n",ans);
	return 0;
}

Measured memory_bytes: 128
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
s = [input() for i in range(2)]
prev = 0 #0:横 1:縦
if s[0][0] == s[1][0]:
    res = 3
    i = 1
    prev = 1
else:
    res = 6
    i = 2
while i < n:
    if s[0][i] == s[1][i]:
        if prev:
            res = (res*2) % mod
        i += 1
        prev = 1
    else:
        if prev:
            res = (res*2) % mod
        else:
            res = (res*3) % mod
        i += 2
        prev = 0
print(res)

Measured memory_bytes: 64364
N, M = map(int, input().split())
MOD = 10 ** 9 + 7


factorial = [1, 1]
inverse = [1, 1]
invere_base = [0, 1]
for i in range(2, N + M + 1):
    factorial.append((factorial[-1] * i) % MOD)
    invere_base.append((-invere_base[MOD % i] * (MOD // i)) % MOD)
    inverse.append((inverse[-1] * invere_base[-1]) % MOD)


def nCr(n, r):
    if not (0 <= r <= n):
        return 0
    return factorial[n] * inverse[r] * inverse[n - r] % MOD


def nPr(n, r):
    if not (0 <= r <= n):
        return 0
    return nCr(n, r) * factorial[r] % MOD


ans = pow(nCr(M, N) * factorial[N], 2, MOD)
for r in range(1, N + 1):
    p = nCr(M, r) * pow(nCr(M - r, N - r), 2, MOD) * nCr(N, r) * factorial[r] * factorial[N - r] * factorial[N - r] % MOD
    p *= ((-1) ** ((r % 2) ^ 1))
    ans -= p
    ans %= MOD

print(ans)


Measured memory_bytes: 215132
// J'aime
// Chemise Blanche

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

#define int long long

#define ii pair<int,int>
#define fi first
#define sc second

#define all(x) (x).begin(),(x).end()
#define dbg(x) cerr << __LINE__ << " > " << #x << " = " << (x) << endl

void MAIN() {
  int n; cin >> n;
  vector<int> a(2 * n);
  for (auto &i : a) cin >> i;
  sort(all(a));
  int ans = 0;
  for (int i = 0; i < 2 * n; i += 2) {
    ans += min(a[i], a[i + 1]);
  }
  cout << ans << '\n';
}

signed main() {
#ifdef _DEBUG
  // freopen("in" , "r", stdin );
  // freopen("out", "w", stdout);
#endif
  ios::sync_with_stdio(0); cin.tie(0);
  int T = 1;
  // cin >> T;
  while (T--) MAIN();
}


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

int main()
{
	long double pi = std::acos(-1);
	long double a, b, x;
	scanf("%Lf%Lf%Lf", &a, &b, &x);
	x /= a;
	long double ans;
	if (2 * x >= a * b)
		ans = std::atan2(b - (2 * x / a - b), a);
	else
		ans = std::atan2(b, 2 * x / b);
	ans = 180 * (ans / pi);
	printf("%Lf\n", ans);

	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,t;cin >> n >> t;
  vector<int> a(n),b(n);
  vector<pair<int,int>> c(n);
  for(int i=0;i<n;i++){
    cin >> a[i] >> b[i];
  }
  int dp[n+1][t][2];
  for(int i=0;i<=n;i++){
    for(int j=0;j<t;j++){
      dp[i][j][0]=0;
      dp[i][j][1]=0;
    }
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<t;j++){
      dp[i+1][j][0]=max(dp[i+1][j][0],dp[i][j][0]);
      dp[i+1][j][1]=max(dp[i+1][j][1],dp[i][j][1]);
      if(j+a[i]<t){
        dp[i+1][j+a[i]][0]=max(dp[i+1][j+a[i]][0],dp[i][j][0]+b[i]);
        dp[i+1][j+a[i]][1]=max(dp[i+1][j+a[i]][1],dp[i][j][1]+b[i]);
      }
      dp[i+1][j][1]=max(dp[i+1][j][1],dp[i][j][0]+b[i]);
    }
  }
  int ans=0;
  for(int i=0;i<t;i++){
    ans=max(ans,max(dp[n][i][0],dp[n][i][1]));
  }
  cout << ans << endl;
}

Measured memory_bytes: 70656
from collections import deque

def bfs(h,w,s,sx,sy):
    dx = [1,0,-1,0]
    dy = [0,1,0,-1]
    d = [[-1] * w for _ in range(h)]
    d[sx][sy] = 0
    que = deque()
    que.append((sx,sy))
    
    while que:
        x,y = que.popleft()
        for i in range(4):
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx < h and 0 <= ny < w and s[nx][ny] != '#' and d[nx][ny] == -1:
                que.append((nx,ny))
                d[nx][ny] = d[x][y] + 1
    
    md = 0
    for i in range(h):
        for j in range(w):
            md = max(md,d[i][j])
    return md

h,w = [int(_) for _ in input().split()]
s = [0] * h
for i in range(h):
    s[i] = list(input())
    
ans = 0

for i in range(h):
    for j in range(w):
        if s[i][j] == '.':
            ans = max(ans,bfs(h,w,s,i,j))
            
print(ans)

Measured memory_bytes: 3316
import java.io.*;
import java.util.*;
import java.math.BigDecimal; 
 
public class Main {
 
	void submit() {
	    int X = nextInt();
	    int A = nextInt();
 
	    if(X<A){
	        out.println(0);	        
	    }else{
	        out.println(10);	        
	    }
	}
 
	void preCalc() {
 
	}
 
	void stress() {
 
	}
 
	void test() {
 
	}
 
	Main() throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		preCalc();
		submit();
		//stress();
		//test();
		out.close();
	}
 
	static final Random rng = new Random();
 
	static int rand(int l, int r) {
		return l + rng.nextInt(r - l + 1);
	}
 
	public static void main(String[] args) throws IOException {
		new Main();
	}
 
	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;
 
	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}
 
	String nextString() {
		try {
			return br.readLine();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}
 
	int nextInt() {
		return Integer.parseInt(nextToken());
	}
 
	long nextLong() {
		return Long.parseLong(nextToken());
	}
 
	double nextDouble() {
		return Double.parseDouble(nextToken());
	}
}

Measured memory_bytes: 21076
#include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
const double PI=acos(-1);

template<typename T>
istream& operator>> (istream& is, vector<T> &vec){
    for(T& x: vec) is >> x;
    return is;
}

int main(){
    ll n; string s;
    cin >> n >> s;
    ll l = 0, r = 0;
    rep(i, n){
        if(s[i] == '(') l++;
        else{
            if(l > 0) l--;
            else r++;
        }
    }
    string ans = "";
    
    rep(i, r) ans += '(';
    ans += s;
    rep(i, l) ans += ')';

    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3624
cin = open(0).read().strip().split('\n')
n = int(cin[0])
v = [list(map(lambda x: int(x)-1, a.split(' ')[2:])) for a in cin[1:]]

import queue
q = queue.Queue()
q.put(0)

dist = [-1]*n
dist[0] = 0
seen = [False]*n
while not q.empty():
    num = q.get()
    seen[num] = True
    for a in v[num]:
        if dist[a] != -1: continue
        dist[a] = dist[num] + 1
        q.put(a)

for idx, num in enumerate(dist):
    print(idx+1, num)


Measured memory_bytes: 7040
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

const int MAXN = 200005;
const int INF = 1001001001;

int a[MAXN];

int n;

int main()
{
	ios::sync_with_stdio(false);
	cin >> n;
	for (int i = 1; i <= n; i++)
		cin >> a[i];
	sort(a + 1, a + n + 1);
	int v = -1, d = INF;
	for (int i = 1; i < n; i++)
		if (abs(2 * a[i] - a[n]) < d)
			d = abs(2 * a[i] - a[n]), v = a[i];
	cout << a[n] << " " << v << endl;
	return 0;
}


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

int main() {
  int n;
  cin>>n;
  int a[n];
  for(int i=0;i<n;i++) cin>>a[i];
  for(int i=0;i<n;i++){
    int v=a[i];
    int j=i-1;
    while(j>=0 && a[j]>v){
      a[j+1]=a[j];
      j--;
    }
    a[j+1]=v;
    for(int k=0;k<n;k++) {
    if (k<n-1) cout<<a[k]<<' ';
    else cout<<a[k];
    }
    cout<<endl;
  }
  return 0;
}



Measured memory_bytes: 3100
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)

int main() {
  int n;
  cin >> n;
  vector<int> A(n + 1), B(n);

  rep(i, n + 1) cin >> A[i];
  rep(i, n) cin >> B[i];

  long long killed = 0;

  rep(i, n) {
    int l = min(A[i], B[i]);
    int r = min(A[i + 1], B[i] - l);

    A[i + 1] -= r;
    killed += l + r;
  }

  cout << killed << endl;
  return 0;
}

Measured memory_bytes: 1024
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String n = scanner.next();
        boolean good = true;
        for (int i = 0; i < n.length() - 2; i++) {
            if (n.charAt(i) != n.charAt(i + 1)) good = false;
        }
        if (!good){
            good = true;
            for (int i = 1; i < n.length() - 1; i++) {
                if (n.charAt(i) != n.charAt(i + 1)) good = false;
            }
        }
        System.out.println(good?"Yes":"No");
    }
}


Measured memory_bytes: 24148
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//#include <math.h>
#include <algorithm>
#include <vector>
#pragma warning(disable:4996)

typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define MOD 1000000007
using namespace std;

long a[200005];

int main(int argc, char* argv[])
{
    long n;
    scanf("%ld", &n);

    long i;
    for(i=0; i<n; i++) {
        scanf("%ld", &(a[i]));
    }

    ll   ans=0;
    ll   sum=0;
    ll   sumx=0;
    long left=0;
    long right=0;
    for(right=0; right<n; right++) {
        sum +=a[right];
        sumx^=a[right];
        while(sum!=sumx) {
            sum -= a[left];
            sumx ^= a[left];
            left++;
        }
        ans += (right-left+1);
    }
    
    printf("%lld\n", ans);
    return 0;
}


Measured memory_bytes: 1664
#include<stdio.h>
main(){
  int h1,h2,t,a1=0,a2=0;
  while(scanf("%d,%d,%d",&h1,&h2,&t)!=EOF){
    if(h1==h2){
      a1++;
    }
    if(h1*h1+h2*h2==t*t){
      a2++;
    }
  }
  printf("%d\n%d\n",a2,a1);

  return 0;
}

Measured memory_bytes: 0
#include <iostream>
#include <iomanip>

using namespace std;

int main() {
	int num;
	while(cin>>num, !cin.eof()) {
		if(num==0) break;
		int table[num][num];
		int col_num[num];

		//initialize
		for(int i=0; i<num; i++){
			for(int j=0; j<num; j++){
				table[i][j] = 0;
			}
			col_num[i] = 0;
		}

		for(int i=0; i<num; i++){
			for(int j=0; j<num; j++){
				cin>>table[i][j];
			}
		}
		int all_sum = 0;
		for(int i=0; i<num; i++){
			int row_sum = 0;
			for(int j=0; j<num; j++){
				cout<< setw(5)<<right <<table[i][j];
				row_sum +=table[i][j];
				col_num[j] += table[i][j];
			}
			cout<< setw(5)<<right<< row_sum<<endl;
			all_sum += row_sum;
		}

		for(int i=0; i<num; i++){
			cout<< setw(5)<<right<< col_num[i];
		}
		cout<< setw(5)<<right <<all_sum<<endl;
	}
	return 0;
}

Measured memory_bytes: 1176
n=gets.to_i
d,x=gets.split.map(&:to_i)
a=Array.new(n)
n.times do |i|
    a[i]=gets.to_i
end

day=1
count=0
n.times do |i|
    day=1
    while day<=d
        day+=a[i]
        count+=1
    end
end
puts count+x


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

int main() {
    int A, B;
    cin >> A >> B;
    
    if(A>13 || A==13) {
        cout << B << endl;
    }
    else if(A<5 || A==5) {
        cout << 0 << endl;
    }
    else cout<<B/2<<endl;
}

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

int main() {
	int n;
	cin >> n;
	int count = 0;
	for (int i = 0, h, max = 0; i < n; i++) {
		cin >> h;
		if (h >= max) {
			count++;
			max = h;
		}
	}
	cout << count << endl;
}



Measured memory_bytes: 256
#include <iostream>
#include <bitset>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <regex>
using namespace std;
using ll = long long int;
using dd = long double;
const ll MOD = 1e9 + 7;

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

int main()
{
    ll K;
    cin >> K;

    ll odd = (K + 1) / 2;
    ll even = K / 2;

    cout << (odd * even) << endl;
}

Measured memory_bytes: 256
import sys
input = sys.stdin.readline

s = list(input())



if s[0] != 'A':
    print('WA')
    exit()

cnt = 0

for i in range(2, len(s)-2):
    if s[i]=='C':
        index = i
        cnt += 1


if cnt != 1:
    print('WA')
    exit()



del(s[index])
del(s[0])


s = ''.join(s)

if s.islower():
    print('AC')
else:
    print('WA')

Measured memory_bytes: 3064
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <map>

using namespace std;
using llong = long long;
const int MOD=1000000007;


int main(int argc, char**argv){
    int n;
    cin >> n;
    vector<int> p(n);
    for (int i = 0; i < n; i++) {
        cin >> p[i];
    }
    sort(p.begin(), p.end());
    cout << accumulate(p.begin(), p.end(), 0) - p[n-1]/2 << endl;

    return 0;
}















Measured memory_bytes: 256
import java.io.*;
import java.util.*;

public class Main {

    private static FastReader in = new FastReader(System.in);
    private static PrintWriter out = new PrintWriter(System.out);

    private static final long MOD = (long) 1e9 + 7;

    public static void main(String[] args) {
        solve();
        out.flush();
    }

    private static void solve() {
        int[] a = in.nextIntArray(3);
        Map<Integer, Integer> map = new HashMap<>();
        for (int i : a) {
            map.put(i, map.getOrDefault(i, 0) + 1);
        }

        out.println(map.size() == 2 ? "Yes" : "No");
    }

    // https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader(InputStream inputStream) {
            br = new BufferedReader(new
                    InputStreamReader(inputStream));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException  e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        // https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb
        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
    }
}


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

int main(){
	int r,c;
	int A[101][101];
	cin >> r >> c;

	for(int i=0; i<=r; i++){  
		for(int j=0; j<=c; j++){
			A[i][j]=0;
		}
	}

	
	for(int i=0; i<r; ++i){
		for(int j=0; j<c; ++j){
			cin >> A[i][j];
			A[i][c] += A[i][j];
			A[r][j] += A[i][j];
			A[r][c] += A[i][j];
		}
	}


	for (int i = 0; i<=r; i++) {
        for (int j = 0; j<c; j++) {
            cout << A[i][j] << ' ';
        }
		cout << A[i][c] << "\n";
    }

	return 0;
}

Measured memory_bytes: 1200
#include<bits/stdc++.h>
typedef long long ll;
#define INF 0x3f3f3f3f
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
using namespace std;
const int sz=1001, mod=1e9+7;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    int n,i,x;
    cin>>n;
    vector<pair<int,int>> v;
    for(i=0;i<n;i++){
        cin>>x;
        v.eb(x,i);
    }
    sort(v.begin(),v.end(),greater<>());
    for(i=0;i<n;i++){
        if(v[0].yy==i)cout<<v[1].xx<<"\n";
        else cout<<v[0].xx<<"\n";
    }

}


Measured memory_bytes: 3312
#include<cstdio>
#include<iostream>

using namespace std;


const int N = 111;

int main(){
	
	
	int n;
	int a,b,c,d;
	
	cin>>n>>a>>b>>c>>d;
	
	printf("%d\n", n - max((a-1)/c+1, (b-1)/d+1));
}

Measured memory_bytes: 1144
#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.txt"


int main() {
	int N; cin >> N;
	while (N--) {
		string st; cin >> st;
		sort(st.begin(), st.end());
		int a = stoi(st);
		reverse(st.begin(), st.end());
		int b = stoi(st);
		cout << abs(a-b) << endl;
	}
	return 0;
}

Measured memory_bytes: 3108
use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<i32> = procon_read();
	let h = v[0];
	let w = v[1];
	let mut p:Vec<Vec<char>> = Vec::new();
	for i in 0..(h+2) {
		p.push(Vec::new());
	}
	let v1 = vec!['#'; (w+2) as usize];
	let v2 = v1.clone();
	p[0] = v2;
	for i in 1..(h+1) {
		p[i as usize].push('#');
		let mut buf = String::new();
		io::stdin().read_line(&mut buf).expect("");
		let v:Vec<char> = buf.trim().chars().collect();
		for j in v {
			p[i as usize].push(j);
		}
		p[i as usize].push('#');
	}
	let v2 = v1.clone();
	p[(h+1) as usize] = v2;
	for i in p {
		for j in i {
			print!("{}", j);
		}
		println!("");
	}
}

Measured memory_bytes: 4352
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <locale>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()

using namespace std;

using ll = long long;
using ld = long double;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template <typename T> int len(const T &x) { return x.size(); }

template<typename T>
vector<T> table(int n, T v) { return vector<T>(n, v); }

template <class... Args>
auto table(int n, Args... args) {
  auto val = table(args...);
  return vector<decltype(val)>(n, move(val));
}

struct yes_no : numpunct<char> {
  string_type do_truename()  const { return "Yes"; }
  string_type do_falsename() const { return "No"; }
};

vector<ll> value[4];
vector<ll> value_sum[4];

void solve(ll N, ll W, vector<ll> w, vector<ll> v) {
  REP(i,4) value_sum[i].push_back(0);
  REP(i,N) {
    int ind = w[i] - w[0];
    value[ind].push_back(v[i]);
  }
  REP(i,4) sort(value[i].rbegin(), value[i].rend());
  REP(i,4) {
    for (ll j: value[i]) {
      value_sum[i].push_back(value_sum[i].back() + j);
    }
  }
  ll res = 0;
  REP(i,value[0].size() + 1) {
    REP(j,value[1].size() + 1) {
      REP(k,value[2].size() + 1) {
        ll weight = w[0] * i + (w[0] + 1) * j + (w[0] + 2) * k;
        if (weight > W) continue;
        int l = min(ll(value[3].size()), (W - weight) / (w[0] + 3));
        ll sum = value_sum[0][i] + value_sum[1][j] + value_sum[2][k] + value_sum[3][l];
        chmax(res, sum);
      }
    }
  }
  cout << res << endl;
}

int main() {
  locale loc(locale(), new yes_no);
  cout << boolalpha << setprecision(12) << fixed;
  cout.imbue(loc);
	ll N;
	ll W;
	scanf("%lld", &N);
	vector<ll> v(N-1+1);
	vector<ll> w(N-1+1);
	scanf("%lld", &W);
	for (int i = 0 ; i <= N-1 ; i++) {
	  scanf("%lld", &w[i]);
	  scanf("%lld", &v[i]);
	}
	solve(N, W, w, v);
	return 0;
}


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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod (ll)(1e9+7)

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

struct T {
  int c, k;
};

signed main() {
  int n, m;
  int x[100001], y[100001];
  T ans[100001] = {};
  cin >> n >> m;

  ans[1] = {1, 1};

  rep(i, 2, n + 1) ans[i] = {0, 1};
  rep(i, 0, m) cin >> x[i] >> y[i];

  rep(i, 0, m) {
    if(ans[x[i]].c) {
      ans[x[i]].k--;
      if(ans[x[i]].k <= 0) ans[x[i]].c = 0;
      ans[y[i]].k++;
      ans[y[i]].c = 1;
    }else {
      ans[x[i]].k--;
      ans[y[i]].k++;
    }
  }

  int count = 0;

  rep(i, 1, n + 1) {
    if(ans[i].c) count++;
  }

  cout << count << endl;
}


Measured memory_bytes: 1792
#include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<string.h>
#include<string>
#include<set>
#include<map>
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
typedef queue<P> Q;

#define _CRT_SECURE_NO_WARNINGS

int N, M = 0;
int a[100010];
int ans=0;
map<int, int> pos;
int main() {
	cin >> N;
	for (int i = 0; i < N;i++) {
		cin >> a[i];
		pos[a[i]] = i;
	}
	sort(a, a + N);
	for (int i = 0; i < N;i++) {
		if (pos[a[i]]%2 != i%2) {
			ans++;
		}
	}
	cout << ans / 2 << endl;
	return 0;
}

Measured memory_bytes: 5376
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
#include <string>
#include <ctime>
#include <map>
#include <stack>
#include <sstream>

using namespace std;

int main(void) {
	int N, M, a, b;
	int *count;
	cin >> N >> M;

	count = (int *)calloc(N + 1, sizeof(int));

	for (int i = 0; i < M; i++)
	{
		cin >> a >> b;
		count[a]++;
		count[b]++;
	}

	for (int i = 1; i <= N; i++)
	{
		cout << count[i] << endl;
	}
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <vector>

#define FOR(i, a, b) for (int i = a; i < b; i++)
#define FORN(i, a, b) for (int i = a; i <= b; i++)
#define P(s) cout << s << endl
#define PC(condition, _true, _false) if (condition) _true; else _false;
#define toInt(_char) _char - '0'

using namespace std;
//
// Created by karayuu on 2018-12-18.
//

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

    int s[4][14] = {0};
    FOR(i, 0, n) {
        char c;
        int num;
        cin >> c >> num;

        if (c == 'S') {
            s[0][num] = 1;
        } else if (c == 'H') {
            s[1][num] = 1;
        } else if (c == 'C') {
            s[2][num] = 1;
        } else {
            s[3][num] = 1;
        }
    }

    FORN(i, 0, 3) {
        FORN(j, 1, 13) {
            if (s[i][j] == 0) {
                char c;
                if (i == 0) {
                    c = 'S';
                } else if (i == 1) {
                    c = 'H';
                } else if (i == 2) {
                    c = 'C';
                } else {
                    c = 'D';
                }
                cout << c << " " << j << endl;
            }
        }
    }
}


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

ll inf=9223372036854775806;

int main()
{
	//freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
	ios_base::sync_with_stdio(false); cin.tie(0);
	int n,m;
	cin>>n>>m;
	cout<<(n-1)*(m-1);
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define ifaxb(a, x, b) if (a < x && x < b)  // 比較は昇順
#define vi vector<int>
#define vii vector<vi>
#define vs vector<string>
#define vss vector<vs>
#define all(x) x.begin(), x.end()
#define pi 3.1415926536
#define ff first
#define ss second
#define pq priority_queue
#define ipair pair<int, int> s
#define lpair pair<LL, LL>
#define MP make_pair
#define INF 2147483647
#define _INF -2147483647
#define MM multimap
#define PB push_back
#define MAXN 100004
using namespace std;
typedef long long ll;

int main() {
    int N, X;
    cin >> N >> X;
    vi D(N + 1);
    D[0] = 0;
    rep(i, 0, N) {
        int x;
        cin >> x;
        D[i + 1] = D[i] + x;
    }
    int ans = 0;
    rep(i, 0, N + 1) {
        if (D[i] <= X) {
            ans++;
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
	using namespace std;

	int main() {
		int a, b, c, d, e;
		cin >> a >> b >> c >> d >> e;

		if (a == 0) {
			cout << 1 << endl;
		}

		else if (b == 0) {
			cout << 2 << endl;
		}

		else if (c == 0) {
			cout << 3 << endl;
		}

		else if (d == 0) {
			cout << 4 << endl;
		}

		else if (e == 0) {
			cout << 5 << endl;
		}
	}
		


Measured memory_bytes: 3568
// Ryo Kamoi

#include<iostream>
#include<math.h>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<queue>
#include<set>

using namespace std;

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

typedef long long ll;

typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;

int INF = 1000000000;

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


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

int main(){
  int n;
  cin >> n;
  int ans=0;
  int a[100001]={};
  for(int i=0;i<n;i++){
     int q;
     cin >> q;
    a[q]++;}
  for(int i=0;i<=100000;i++){
    if(a[i]>=1){ans++;}
  }
  if(ans%2==0){cout << ans-1 << endl;}else{cout << ans << endl;}
}

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

#define REP(i,n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int, int> pint;
template <class T> inline void chmax(T &a, const T b) { a = max(a, b); }
template <class T> inline void chmin(T &a, const T b) { a = min(a, b); }
template <class T> void pp(T v, int n) { REP(i,n) cout<<v[i]<< ' '; cout << endl; }

void inline TorF(bool tf, const string &trueMessage, const string &falseMessage) { 
  cout << (tf ? trueMessage : falseMessage) << endl;
}
void inline YESNO(bool tf) { TorF(tf, "YES", "NO"); }
void inline YesNo(bool tf) { TorF(tf, "Yes", "No"); }

int main() {
  vector<int> A(5);
  REP(i,5) cin>>A[i];
  REP(i,5) {
    if(A[i] == 0){
      cout <<  i+1 << endl;
      return 0;
    }
  }
  return 0;
}


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

#define ll long long
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
// pll pp; -> (pp.first,pp.second)
// vector<vl> pp(n,vl(2)); sort(pp.begin(),pp.end(),[](vl a,vl b){return a[0]<b[0];});

#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define RREP(i,n) for(ll (i)=(n)-1;(i)>=0;(i)--)
#define FOR(i,a,b) for(ll (i)=(a);(i)<(b);(i)++)
#define FORR(i,a,b) for(ll (i)=(b)-1;(i)>=(a);(i)--)
#define DEBUG(x) cout << #x << ": " << x << endl
#define CHMAX(a,b) a=max((a),(b))
#define CHMIN(a,b) a=min((a),(b))
/*}}}*/
int main() {
  string s;
  cin >> s;
  string latest = "";
  string cand = "";
  ll count = 0;
  while(s.length()>0){
    cand += s[0];
    s = s.substr(1);
    if(cand != latest){
      //DEBUG(cand);
      latest = cand;
      cand = "";
      count++;
      //DEBUG(count);
      //cout << endl;
    }
  }
  cout << count << endl;
  return 0;
}


Measured memory_bytes: 884
#include <bits/stdc++.h>
using namespace std;
//型に気を付けよう
//a=0x61=97 '0'=0x30=48
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long  ll;
typedef long double  ld;
typedef string str;
typedef pair<int,int> pairii;
typedef vector<char> vecc;
const double pi=3.1415926535;
const ll  mod=1000000007;bool f=1;

void no(){f=0;return;}
void judge(char t){if(t<48||t>57)no();}
//桁数指定　cout << fixed << setprecision(2)
int main() {
  char t;
  int a,b;
  cin>>a>>b;vecc x(a+b+1,0);
  rep(i,a){t=0;cin>>t;x[i]=t;judge(t);}
  cin>>t;x[a]=t;if(t!='-')no();
  rep(j,b){t=0;cin>>t;x[a+j+1]=t;judge(t);}
  t=0;cin>>t;rep(k,a+b+1)cerr<<x[k];
  if(t)no();if(!(x[a+b]))no();
  if(f)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(){
  int N,Wsum[100]={0};
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> Wsum[i];
    if(i>0)Wsum[i]+=Wsum[i-1];
  }
  int ans=1e5;
  for(int i=0;i<N;i++){
    ans=min(ans,abs(Wsum[N-1]-2*Wsum[i]));
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 384
#if defined(__GNUC__)
#include <bits/stdc++.h>
#define __int32 __int32_t
// __GNUC__
#else
#include "bits/stdc++.h"
#endif
using namespace std;

#define int long long

#define itn __int32
#define REP(i, n) for(itn (i) = 0; (i) < (n); ++(i))
#define REP2(i, x, n) for(itn (i) = x; (i) < (n); ++(i))
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define SORT(x) std::sort(ALL(x))
#define RSORT(x) std::sort(ALL(x), greater<decltype(x)::value_type>())
#define RSORT2(x, T) std::sort(ALL(x), greater<T>())
#define REVERCE(x) std::reverce(ALL(x))
#define ACM(x, y) std::accumulate(ALL(x), y)

#define INT_POW(x, y) [](int a, int b) -> int {int c = a; REP(i, b - 1){c *= a;} return c;}(x, y)
#define INT_POWM(x, y, m) [](int a, int b, int m) -> int {int c = a; REP(i, b - 1){c *= a; c %= m;} return c;}(x, y, m)
#define FCT(x) [](int a) -> int {int r = 1; REP(i, a){r *= i;} return r;}(x)

itn main() {
	std::ios::sync_with_stdio(false);

	string a, b;

	cin >> a >> b;

	if (a[0] == b[2] && a[1] == b[1] && a[2] == b[0]) {
		cout << "YES";
	}
	else {
		cout << "NO";
	}

	return 0;
}


Measured memory_bytes: 256
from math import factorial
def combinations_count(n, r):
    if n <= 1:
        return 0
    else:   
        return factorial(n) // (factorial(n - r) * factorial(r))
N,W = map(int,input().split())
even = combinations_count(N,2)
odd = combinations_count(W,2)
print(odd+even)


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

using namespace std;


void solve() {
    int n; cin >> n;
    vector<int> a(n);
    for (auto& x: a) {
        cin >> x;
    }
    sort(a.begin(), a.end());
    int i = n/2-1, j = n/2;
    int res = a[j] - a[i];
    cout << res;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    cout << endl;
}


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

int main() {
  int x,a,b;
  cin >> x >> a >> b;
  if(b<=a){
    cout << "delicious" << endl;
  }else{
    if(b-a>x){
      cout << "dangerous" << endl;
    }else{
      cout << "safe" << endl;
    }
  }
}


Measured memory_bytes: 256
sx, sy, tx, ty = map(int, input().split())

dx = tx - sx
dy = ty - sy
ans = ""

ans += 'U' * dy + 'R' * dx
ans += 'D' * dy + 'L' * dx
ans += 'L' + 'U' * (dy+1) + 'R' * (dx+1) + 'D'
ans += 'R' + 'D' * (dy+1) + 'L' * (dx+1) + 'U'

print(ans)


Measured memory_bytes: 3060
#include<bits/stdc++.h>
using namespace std ;
#define ll long long
#define ld long double
#define ff first
#define ss second
const ll mod =   1e9 +7  ;
ll multiply(ll a, ll b ){ return ((a % mod) * (b % mod)) % mod; }
ll add(ll a, ll b) {     return ((a % mod) + (b % mod)) % mod; }
ll sub(ll a, ll b) { return ((a%mod) - (b % mod)+ mod) % mod ; }
////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
void solve(){
    ll a , b ;
    cin >> a >> b ;
    cout << a*b ;

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


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

int main(){
    int N; cin >> N;
    string S; cin >> S;
    for(int i = 0;i < S.size();++i){
        char s;
        if(S[i] + N > 'Z'){
            s = S[i] + N -26;
        }else s = S[i] + N;
        cout << s;
    }
    cout << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 1e9
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
ll GCD(ll a,ll b){return b?GCD(b,a%b):a;}
ll LCM(ll a,ll b){return (a*b)/GCD(a,b);}
 
//const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
//const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};

int main()
{
	int x, a;
	cin >> x >> a;
	if (x < a) cout << 0 << endl;
	else cout << 10 << endl;
}


Measured memory_bytes: 256
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    A=LI()
    B=LI()
    cnt1=0
    cnt2=0
    cnt3=0
    for a,b in zip(A,B):
        if a>b:
            cnt1 += a-b
        else:
            cnt2 += b-a
            if (b-a)&1:
                cnt3+=1
    # print(cnt1,cnt2,cnt3)
    if cnt1*2+cnt3<=cnt2:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

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

void solve(){
    int n, x, ans=0;
    map<int, int> mp;
    cin >> n;
    while(n--){
        cin >> x;
        if(!mp[x]){
            mp[x]=1;
            ans++;
        }else mp[x]=0, ans--;
    }
    cout << ans << endl;
}
int main(){
   solve();
}


Measured memory_bytes: 8108
#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stdlib.h>

int main() {

	char n[5];

	scanf("%s", &n);

	for (int i = 0; i < 4; i++) {
		n[i] -= '0';
	}

	for (int op = 0; op < 8; op++) {
		int a = n[0];
		for (int i = 0; i < 3; i++) {
			if ((op >> i) & 1) a += n[i + 1];
			else a -= n[i + 1];
		}
		if (a == 7) {
			printf("%d", n[0]);
			for (int i = 0; i < 3; i++) {
				if ((op >> i) & 1) printf("+");
				else printf("-");
				printf("%d", n[i + 1]);
			}
			printf("=7\n");
			return 0;
		}
	}

	return 0;
}

Measured memory_bytes: 128
#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>

const int MaxN = 1e5;
using namespace std;

char c[8] , d[8];
int a,b ;
int y = 0;

int main()
{
	cin >> a >> b;
	for(int i = a;i <= b;i++)
	{
		int f = i;
		sprintf(c,"%d",f);
		if(c[0] == c[4] && c[1] == c[3])
		{
			y++;
		}
	}
	cout << y << endl;
	return 0;
}


Measured memory_bytes: 256
n = gets.to_i
a = gets.split.map(&:to_i)
ap = true
n.times do |i|
  if a[i] % 2 == 0
    if a[i] % 3 != 0 && a[i] % 5 != 0
      ap = false
    end
  end
end
puts ap ? 'APPROVED' : 'DENIED'


Measured memory_bytes: 1788
#include <bits/stdc++.h>
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector < vi >
#define pii pair<int,int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001
#define all(c) c.begin(),c.end()
#define mp(x,y) make_pair(x,y)
#define mem(a,val) memset(a,val,sizeof(a))
#define eb emplace_back
#define pb push_back
#define f first
#define s second
#define fast_cin ios_base::sync_with_stdio(false);cin.tie(NULL);
#define precise fixed(cout);cout<<setprecision(16);
#define OUT(x) for(auto a:x) cout << a << " "; cout << endl;
#define OK cout << "ok" <<endl;

using namespace std;

int main()
{
	fast_cin
	int n;
	cin >> n;
	cout << 1LL*(n-1)*(n)/2 << endl;

}


Measured memory_bytes: 256
#include <iostream>

int main(void) {
	int A, B;
	std::cin >> A >> B;
	if (13 <= A) {
		std::cout << B << std::endl;
	}
	else if (6 <= A&&A <= 12) {
		std::cout << B / 2 << std::endl;
	}
	else if (A <= 5) {
		std::cout << 0 << std::endl;
	}
	return 0;
}

Measured memory_bytes: 256
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
typedef long long LL;
const int MaxN = 1e6;

int W, a, b;
int main()
{
	while(scanf("%d %d %d", &W, &a, &b) != EOF)
	{
		if(a + W <= b) printf("%d\n", b - a - W);
		else if(b + W <= a) printf("%d\n", a - b - W);
		else if(a + W > b || b + W > a) printf("0\n");
	}
	return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <string>
#include <array>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <iomanip>

#define FOR(i, a, b) for(decltype(b) i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;

using namespace std;

#ifdef INPUT
#include <sstream>
stringstream input(R"(
8
1
2
3
4
5
6
7
8
)");
#define cin input
#endif

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

	vector<int> ct(n, 0);

	REP (i, n)
	{
		int p;
		cin >> p;
		--p;

		ct[p] = p ? ct[p - 1] + 1 : 1;
	}

	cout << n - *max_element(ct.begin(), ct.end()) << endl;

	return 0;
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
 
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,n) for(int i=1;i<=(n);i++)
#define lol long long
#define SUM(n) ((n)+1)*(n)/2 //1〜nまでの総和を求める式
#define mp make_pair
#define fi first
#define se second
#define pu push_back
#define SYOU(x) fixed<<setprecision(x+1) //小数点桁数を指定する
#define abs(x,y) max(x,y)-min(x,y)
#define all(v) v.begin(),v.end()
#define UPDight(a,b) (a+b-1)/b //小数点切り上げ 
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const int MOD=int(1e9)+7; 
using namespace std;
using pii = pair<int, int>;
typedef vector<int> vit;

//最大公約数
lol gcd(lol x, lol y){
  if(x < y) swap(x, y);
  lol r = x % y;
  while(r != 0){
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}

//最小公倍数
lol lcm(lol x, lol y){
  lol a = x * y;
  return (a / gcd(x, y));
}

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

  int a, b, c, d;
  cin >> a >> b >>c >> d;
  if(UPDight(a, d) >= UPDight(c, b)){
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  return 0;
}


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

int main(int argc, char const *argv[])
{
	int n;
	cin>>n;
	if (n%2==0)
	{
		cout<<n/2;
		/* code */
	}
	else{
		cout<<(n/2)+1;
	}
	return 0;
}

Measured memory_bytes: 256
#include<map>
#include<queue>
#include<utility>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<numeric>
#include<functional>
#include<string>
#include<iostream>
using namespace std;
const long long int one = 1;
const long long int big = (one<<40);
typedef long long int llint;

map<int,llint> cost[100];
llint dike(int from,int to){
	priority_queue<pair<llint,int>,vector<pair<llint,int> >,greater<pair<llint,int> > > que;
	pair<llint,int> p,b;
	llint nedan[100];
	llint sokane;
	int doko;
	int i=0;
	
	for(i=0;i<100;i++){
		nedan[i]=big;
	}
	que.push(make_pair((llint)0,from));
	while(!que.empty()){
		p=que.top();
		sokane=p.first;
		doko=p.second;
		que.pop();
		if(nedan[doko]<big){continue;}
		for(auto it=cost[doko].begin();it!=cost[doko].end();it++){
			que.push(make_pair(sokane+it->second,it->first));
		}
		nedan[doko]=sokane;
	}
	return nedan[to];
}
int solve(int Q){
	int h,i,j,a,b,info;
	llint c;
	for(i=0;i<100;i++){
		cost[i].clear();
	}
	for(h=0;h<Q;h++){
		scanf("%d",&info);
		if(info==1){
			scanf("%d %d %lld",&a,&b,&c);
			a--;b--;
			if(cost[a].count(b)==1){
				cost[a][b]=min(c,cost[a][b]);
				cost[b][a]=min(c,cost[a][b]);
			}
			else{
				cost[a][b]=c;
				cost[b][a]=c;
			}
		}
		else{
			scanf("%d %d",&a,&b);
			a--;b--;
			c=dike(a,b);
			if(big<=c){c=-1;}
			printf("%lld\n",c);
		}

	}
	return 0;
}
int main(void){
	int a,Q;
	while(-1){
		scanf("%d %d",&a,&Q);
		if(a==0){
			return 0;
		}
		solve(Q);
	}
	return 0;
}

Measured memory_bytes: 3308