akhauriyash/Code-Regression huggingface dataset:
n=int(input())
plan=[[int(s) for s in input().split()] for j in range(n)]
now =[0 for j in range(3)]
plan.insert(0,now)
ans=0
for i in range(n):
    dt=abs(plan[i+1][0]-plan[i][0])
    dx=abs(plan[i+1][1]-plan[i][1])
    dy=abs(plan[i+1][2]-plan[i][2])
    if dt>=dx+dy:
        if dt%2 == (dx+dy)%2:
            ans+=1
print("Yes" if ans==n else "No")

Measured memory_bytes: 25556
import sys

sys.setrecursionlimit(10000000)
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue

# import fractions

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, M = il()
    A = set(iln(M))
    dp = [0]*(N+1)
    dp[0] = 1

    for n in range(1, N+1):
        if n in A:
            dp[n] = 0
        else:
            dp[n] = dp[n-1] + dp[n-2]
    print(dp[N]%MOD)


if __name__ == '__main__':
    main()


Measured memory_bytes: 460912
N = [int(c) for c in input()][::-1]
N.append(0)
ans = 0
for i in range(len(N)):
    c = N[i]
    if c <= 4:
        ans += c
    elif 6 <= c:
        ans += 10 - c
        N[i + 1] += 1
    else:
        if N[i + 1] < 5:
            ans += c
        else:
            ans += 10 - c
            N[i + 1] += 1
print(ans)

Measured memory_bytes: 20460
#include <iostream>
//#include <iomanip>
//#include <string>
#include <vector>
#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <deque>
//#include <bitset>
//#include <math.h>
using namespace std ;
using ll = long long ;
//using ld = long double ;
using vll = vector<ll> ;
using vvll = vector<vll> ;
//using vc = vector<char> ;
//using vvc = vector<vc> ;
//using vb = vector<bool> ;
//using vvb = vector<vb> ;
//using pll = pair<ll,ll> ;
//#define all(v) v.begin(),v.end()
//ll mod = 1000000007 ;
//long double pie = acos(-1) ;
ll INF = 1000000000000 ;

//void yorn(bool a){if(a) cout << "Yes" << endl ; else cout << "No" << endl ;}
//void YorN(bool a){if(a) cout << "YES" << endl ; else cout << "NO" << endl ;}
//ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;}
//ll lcm(long long a,long long b){return a/gcd(a,b)*b ;}
//ll sa(long long a,long long b){if(a>b) return a-b ; return b-a ;}
//void mysort(vector<long long> &a){sort(a.begin(),a.end()) ;}
//void myrev(vector<long long> &a){reverse(a.begin(),a.end()) ;}
//void fix_cout(){cout << fixed << setprecision(20) ;}

int main(){
	ll n,c ;
	cin >> n >> c ;
	vvll d(c,vll(c)) ;
	for(int i=0;i<c;i++) for(int j=0;j<c;j++) cin >> d.at(i).at(j) ;
	vvll s(n,vll(n)) ;
	for(int i=0;i<n;i++) for(int j=0;j<n;j++) cin >> s.at(i).at(j) ;
	vvll cnt(c,vll(3,0)) ;
//	cout << 1 << endl ;
	for(int i=0;i<c;i++){
		for(int j=0;j<n;j++){
			for(int k=0;k<n;k++){
//				cout << i << " " << j << " " << k << endl ;
				cnt.at(i).at((j+k)%3) += d.at(s.at(j).at(k)-1).at(i) ;
			}
		}
	}
//	cout << 2 << endl ;
	ll ans = INF ;
	for(int i=0;i<c;i++){
		for(int j=0;j<c;j++){
			for(int k=0;k<c;k++){
				if(i!=j&&j!=k&&k!=i){
					ans = min(ans,cnt.at(i).at(0)+cnt.at(j).at(1)+cnt.at(k).at(2)) ;
				}
			}
		}
	}
	cout << ans << endl ;
}


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

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define pb(i) push_back(i)
#define INF 100100100
#define EPS 1e-9
#define itn int
typedef long long ll;
typedef vector<int> vi;
typedef map<string, int> msi;
const int dx[] = {0, 1, 0, -1, -1, 1, 1, -1};  //座標移動用
const int dy[] = {1, 0, -1, 0, -1, 1, -1, -1};

int gcd(int a, int b) {return (b ? gcd(b, a%b) : a);}

int main()
{
    int n, x;
    int y[100000];
    int sa[100000];
    int gre = 1;

    cin >> n >> x;

    rep(i, n) cin >> y[i];

    rep(i, n) {
        if (x < y[i]) {
            sa[i] = y[i] - x;
        }
        else {
            sa[i] = x - y[i];
        }
    }

    gre = gcd(sa[0], sa[1]);

    FOR(i, 2, n) {
        gre = gcd(gre, sa[i]);
    }

    cout << gre << endl;



    return (0);
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
int main(){

  int N,k;
  cin >> N;
  k=0;
  vector<int> x(N), y(N);
  for (int i = 0; i < N; i++) {
    int a, b;
    cin >> a >> b;
    x[i] = a, y[i] = b;
  }

  for (int j = 0; j < N-2; j++){
    if(x[j]==y[j]){
      if(x[j+1]==y[j+1]){
        if(x[j+2]==y[j+2]){
          k=1;
        }
      }
    }
  }
  
  if(k==1){
    cout<<"Yes"<<endl;
  }
  else
    cout<<"No"<<endl;
  return 0;
}


Measured memory_bytes: 3624
package main

import (
	"fmt"
)

func main() {
	var N int
	ans := "No"

	fmt.Scan(&N)

	for i := 0; i <= 9; i++ {
		for j := 0; j <= 9; j++ {
			if i*j == N {
				ans = "Yes"
				break
			}
		}
	}
	fmt.Println(ans)
}


Measured memory_bytes: 512
using System;
using System.Linq;
using System.Collections.Generic;

namespace program
{
    class Program
    {
        static void Main()
        {
          ulong[] n = Input.ScanUlongArray();
          List<ulong> a = new List<ulong>();
          ulong last = Math.Min(n[1] - n[0], 2018);
          for(uint i=0; i<=last; i++)
            a.Add((i+n[0])%2019);
          
          ulong min = 2019;
          for(int i=0;i<a.Count;i++)
            for(int k=i+1;k<a.Count;k++)
              min = Math.Min(min, a[i]*a[k]%2019);
            
            Out(min);
        }
      
        static public void Out(object s) { Console.WriteLine(s); }
    }
    
    static class Input {
        static public int ScanInt() { return int.Parse(Console.ReadLine()); }
        static public uint ScanUint() { return uint.Parse(Console.ReadLine()); }
        static public double ScanDouble() { return double.Parse(Console.ReadLine()); }
        static public long ScanLong() { return long.Parse(Console.ReadLine()); }
        static public ulong ScanUlong() { return ulong.Parse(Console.ReadLine()); }
        static public int[] ScanIntArray() { return Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); }
        static public uint[] ScanUintArray() { return Console.ReadLine().Split().Select(x => uint.Parse(x)).ToArray(); }
        static public double[] ScanDoubleArray() { return Console.ReadLine().Split().Select(x => double.Parse(x)).ToArray(); }
        static public long[] ScanLongArray() { return Console.ReadLine().Split().Select(x => long.Parse(x)).ToArray(); }
        static public ulong[] ScanUlongArray() { return Console.ReadLine().Split().Select(x => ulong.Parse(x)).ToArray(); }

        static public string ScanStr() { return Console.ReadLine(); }
        static public string[] ScanStrArray() { return ScanStr().Split(); }
    }

    static class MyMath {
        public static int GCD(int a, int b)
        {
            Func<int, int, int> gcd = null;
            gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
            return a > b ? gcd(a, b) : gcd(b, a);
        }
        public static ulong GCD(ulong a, ulong b)
        {
            Func<ulong, ulong, ulong> gcd = null;
            gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
            return a > b ? gcd(a, b) : gcd(b, a);
        }
        public static int LCM(int a, int b)
        {
            return a * b / GCD(a, b);
        }
        public static ulong LCM(ulong a, ulong b)
        {
            return a * b / GCD(a, b);
        }
    }
}


Measured memory_bytes: 13396
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <array>
#include <cassert>
#include <bitset>
using namespace std;
using LL = long long;

string S;
int X, Y;

bool isOk(vector<int>&vec, int S, bool fist) {
	set<int>pool;
	pool.insert(0);
	int cnt = 0;
	for (int elm : vec) {
		set<int>next;
		for (int pee : pool) {
			next.insert(pee + elm);
			if (cnt == 0 && fist) {
				continue;
			}
			next.insert(pee - elm);
		}
		pool = next;
		++cnt;
	}
	for (int res : pool) {
		if (res == S) {
			return true;
		}
	}
	return false;
}

int main(void)
{
	cin >> S;
	cin >> X >> Y;
	int tam = 0;
	int sw = 0;
	vector<int>plat[2];
	S.push_back('T');
	bool es = (S[0] == 'F');
	for (char c : S) {
		if (c == 'F') {
			tam++;
		}
		else {
			if (tam)plat[sw].push_back(tam);
			sw++;
			sw %= 2;
			tam = 0;
		}
	}
	bool xok = isOk(plat[0], X, es);
	bool yok = isOk(plat[1], Y, false);
	if (xok && yok) {
		cout << "Yes\n";
	}
	else {
		cout << "No\n";
	}
	return 0;
}


Measured memory_bytes: 640
#include<iostream>
#include <cstdlib>
using namespace std;
int main()
{
  int A,B;
  cin >> A >> B;

  int x,y,z;
  x = A + B;
  y = A - B;
  z = A * B;

  if(x > y){
    if(z > x){
      cout << z;
    }else{
      cout << x;
    }
  }else {
    if(z > y){
      cout << z;
    }else{
      cout << y;
    }
  }

}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <climits>
#include <map>
#include <set>
#define FOR(ever) for(int i=0;i<n;i++)
#define FORE(i,m) for(int i=0;i<m;i++)
#define W(T) while(T--)
#define ll long long
#define pb push_back
 
 
//Author: Nilargha Roy (neel13)
using namespace std;
/*int minimumcost(int a[],int ind,ll dp,int n)
{
	int N=n;
	if(ind==N)
	return 0;
	if(dp[ind]!=-1)
		return dp[ind];
	int left= abs(a[ind]-a[ind+1])+minimumcost(a,ind+1,dp,n);
	int right=0;
	if((ind+2)<=N)
		right=abs(a[ind]-a[ind+2])+minimumcost(a,ind+2,dp,n);
	dp[ind]=min(left,right);

	return dp[ind];

}*/

int main() {
 
	ios_base::sync_with_stdio(false);
	cin.tie(0);
 
#ifdef __APPLE__
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	ll i,n;
    cin>>n;
    ll a[n];
    for(i=0;i<n;i++)
    cin>>a[i];//30 10 60 10 60 50
    ll dp[n];
    dp[0]=0;
    for(i=1;i<n;i++)
    {
        if(i>=2)
        dp[i]=min(dp[i-1]+abs(a[i]-a[i-1]),dp[i-2]+abs(a[i]-a[i-2]));
        else
        dp[i]=dp[i-1]+abs(a[i]-a[i-1]);
    }
    cout<<dp[n-1]<<endl;
    return 0;
}
	


Measured memory_bytes: 1792
#include <bits/stdc++.h>
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

using namespace std;

#define li long long int
#define ld long double
const int MX1=1e5+5;
const int MX2=1e6+5;
const li inf=4e18;
const li mod=1e9+7;

li power(li a,li b){li res=1;while(b){if(b%2)res=(res*a)%mod;
a=(a*a)%mod;b/=2;}return res;}

li mmi(li a){return power(a,mod-2);}

li cntbit(li n){li cnt=0;while(n){n&=(n-1);cnt++;}return cnt;}

void solve(){
	string s;
	cin>>s;
	sort(s.begin(),s.end());
	if(s=="abc"){
		cout<<"Yes";
	}else{
		cout<<"No";
	}
}

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

Measured memory_bytes: 768
from bisect import bisect as bl

N = int(input())
A = []
for i in range(N):
    A.append(int(input()))

def lds(X: list):
    L = [-X[0]]
    for x in X[1:]:
        if L[-1] <= -x:
            L.append(-x)
        else:
            L[bl(L, -x)] = -x
    return len(L)

print(lds(A))

Measured memory_bytes: 11880
// g++ -std=c++11 a.cpp
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<random>
#include<cstring>
#include<queue>
#include<stack>
#include<bitset>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#include<typeinfo>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
using namespace std;
//kaewasuretyuui
typedef long long ll;
//#define int ll
typedef int Def;
typedef pair<Def,Def> pii;
typedef vector<Def> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<Def,pii> pip;
typedef vector<pip>vip;
//#define mt make_tuple
//typedef tuple<int,int,int> tp;
//typedef vector<tp> vt;
template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}
template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}
//template<class C>constexpr int size(const C &c){return (int)c.size();}
//template<class T,size_t N> constexpr int size(const T (&xs)[N])noexcept{return (int)N;}
const double PI=acos(-1);
const double EPS=1e-9;
Def inf = sizeof(Def) == sizeof(long long) ? 2e18 : 1e9+10;
int dx[]={0,1,0,-1};
int dy[]={1,0,-1,0};
int main(){
	int n;
	cin>>n;
	vi in(n);
	rep(i,n)cin>>in[n-1-i];
	if(in[0]!=2){
		cout<<-1<<endl;
		return 0;
	}
	ll l=in[0],r=2*in[0]-1;
	loop(i,1,n){
		ll t=r/in[i]*in[i];
		r=t+in[i]-1;
		l=(l+in[i]-1)/in[i]*in[i];
	}
	if(l<=r)cout<<l<<" "<<r<<endl;
	else cout<<-1<<endl;
}









Measured memory_bytes: 640
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
        int c=sc.nextInt();
        int cop;
        
        if(a>b) {
            cop=a;
            a=b;
            b=cop;
            if(b>c) {
                cop=b;
                b=c;
                c=cop;
                if(a>b) {
                    cop=a;
                    a=b;
                    b=cop;
                    System.out.println(a+" "+b+" "+c);
                }else {
                    System.out.println(a+" "+b+" "+c);
                }
            }else {
                System.out.println(a+" "+b+" "+c);
            }
        }else if(b>c) {
            cop=b;
            b=c;
            c=cop;
            if(a>b) {
                cop=a;
                a=b;
                b=cop;
                System.out.println(a+" "+b+" "+c);
            }
            else {
                System.out.println(a+" "+b+" "+c);
            }
        }else {
            System.out.println(a+" "+b+" "+c);
        }
 
 
    }
 
}


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

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define endl '\n'

using namespace std;

typedef long long   ll;
typedef long double ld;

typedef pair<ll, ll>    pll;
typedef pair<ll, int>   pli;
typedef pair<int, int>  pii;

typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<ll>  vll;

const int Inf = (int) 1e9;
const ll  InfL = (ll)  1e18;

const int MaxN = (int) 1e5 + 5;

int a[MaxN], n;
pii ans;

int main() {

	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

#ifdef LOCAL
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif

    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i];

    sort(a, a + n);
    ans.ff = a[n-1];

    int pos = lower_bound(a, a + n, (double)a[n - 1]/2.0) - a;
    if ( fabs( (double)a[n - 1]/2.0 - a[pos - 1]) <= fabs( a[pos] - (double)a[n-1]/2.0) ) {
        ans.ss = a[pos - 1];
    }
    else {
        ans.ss = a[pos];
    }

    cout << ans.ff << " " << ans.ss << endl;
	return 0;
}


Measured memory_bytes: 640
s = input()

if s[0]  == 'A' and s[2:-1].count('C') == 1:
    for n in s[1:]:
        if n.islower():
            continue
        else:
            if n == 'C':
                continue
            else:
                print('WA')
                exit()
else:
    print('WA')
    exit()
print('AC')

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

//***********************************************************************
int MAXNUM = 5e3+5;
vector <int>vis(MAXNUM);
vector<int> pr;
void sieve() {
	pr.push_back(2);
	for(ll i=3;i<MAXNUM;i+=2) if(!vis[i]) {
		pr.push_back(i);
		for(ll j=i*i;j<MAXNUM;j+=2*i) vis[j]=true;
	}
}
//************************************************************************

void solve()
{
    int x,y,z;
    cin >> x >> y >> z;
    cout << z <<" "<< x <<" " << y << endl; 
 }


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

	return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(){
	int n,d[100],x,y=0;
	cin>>n;
    for(int i=1;i<=n;i++){
      cin>>d[i];
      if(i==1)x=d[i];
      else if(d[i]<x)x=d[i];
      if(d[i]>y)y=d[i];
      
    }
    cout<<y-x<<endl;
    return 0;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"
#include "math.h"
 
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<int> vin;
typedef pair<ll,ll> P;
typedef vector<P> vp;
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define drep(i,a,b) for(ll i=(a);i>=(b);--i)
#define SIZE(a) ll((a).size())
#define out(a) cout<<(a)<<endl;
const int inf=INT_MAX;
const int MAX = 510000;
const ll MOD = 1000000007;


int main(){
  ll n;cin>>n;
  vll a(n);
  rep(i,0,n){
    cin>>a[i];
  }
  ll ans=0;
  sort(a.begin(),a.end());
  rep(i,0,n){
    rep(j,0,i){
      auto it=lower_bound(a.begin()+i+1,a.end(),a[i]+a[j]);
      ans+=it-a.begin()-i-1;
    }
  }
  cout<<ans<<endl;
}



Measured memory_bytes: 3624
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_imports)]
fn main() {
    use std::cmp::max;
    use std::cmp::min;

    input!{
        n: usize,
        a: usize,
    }
    let ans = if n%500 <= a {
        "Yes"
    } else {
        "No"
    };

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


Measured memory_bytes: 4352
using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]A - Eating Symbols Easy
            var s = Console.ReadLine();
            int n = 0;

            foreach(var c in s)
            {
                if (c == '+')
                {
                    n++;
                }
                else
                {
                    n--;
                }
            }

            Console.WriteLine(n);
        }
    }
}

Measured memory_bytes: 13140
#54 A - Airport Bus
N,C,K = map(int,input().split())
T = [int(input()) for _ in range(N)]
T = sorted(T,reverse = False)
# 最後の一人をカウントするための番兵
T.append(10**10)

ans = 0
bus = 1
first = T[0]
for i in range(1,N+1):
    # T[i] がバスに乗ることができるとき
    if (bus < C) and (T[i] <= first + K):
        bus += 1
    # T[i] がバスに乗ることができないとき
    else:
        # 新しいバスの first になる
        ans += 1
        bus = 1
        first = T[i]
        
print(ans)


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

using namespace std;

int a[4];

int main(){
	for (int i = 0; i < 3; i++){
		scanf("%d", a + i);
	}
	sort(a, a + 3);
	if (a[0] + a[1] == a[2])
		puts("Yes");
	else 
		puts("No");
	return 0;
}


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

int keta(int n)
{
    int count = 0;

    while (n > 0)
    {
        n /= 10;
        count++;
    }

    return count;
}

int simo(int n)
{
    return n % 10;
}

int kami(int n)
{
    if (keta(n) == 1)
    {
        return n;
    }

    int ans = n;

    for (int i = 0; i < keta(n) - 1; i++)
    {
        ans /= 10;
    }

    return ans;
}

int main()
{
    /* ------- 宣言と入力 ------- */

    int N;

    cin >> N;

    /* ------- 計算 ------- */

    int comb[10][10] = {};
    int a, b, c;

    for (int i = 1; i <= N; i++)
    {

        if (i == 101)
        {
            a = keta(i);
            b = kami(i);
            c = simo(i);
        }
        comb[kami(i)][simo(i)]++;
    }

    int ans = 0;

    for (int i = 1; i < 10; i++)
    {
        for (int j = 1; j < 10; j++)
        {
            if (i == j)
            {
                ans += (int)pow(comb[i][j], 2);
            }
            else
            {
                if (max(10 * i + j, 10 * j + i) <= N)
                {
                    ans += comb[i][j] * comb[j][i];
                }
            }
        }
    }

    cout << ans << endl;

    return 0;
}


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

// types
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef vector<ll> vll;

// macros
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define FI first
#define SE second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define REP1(i,n) for(int i=1;i<((int)n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define PB push_back
#define EB emplace_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL

// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  ll n;
  cin >> n;

  vector<pll> a(n);
  REP(i, n){
    cin >> a[i].FI;
    a[i].SE = i+1;
  }

  sort(a.begin(), a.end());
  REP(i, n)
    cout << a[i].SE << " ";
  cout << endl;


  
  
}


Measured memory_bytes: 2432
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


N = inp()

A = inlist()
move = 0
m = 0
current = A[0]
for i in range(1, N):

    if A[i] <= current:
        m += 1
    else:
        m = 0
    if move < m:
        move = m
    # print(current, A[i], m, move)
    current = A[i]


print(move)


Measured memory_bytes: 14480
#include<iostream>
#include<string>
using namespace std;
int main()
{
	string a;
	cin>>a;
	int sz=a.size(),half=sz/2,ans=0;
	for (int i=0;i<half;i++)
		if (a[i]!=a[sz-i-1])
			ans++;
	printf("%d\n",ans);
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n); i++)
#define print(a) cout << (a) << endl; 
typedef long long ll;
const int MOD = 1000000007; 


int main() {
    int k, n;
    cin >> k >> n;
    vector<int> a(n);
    rep(i, n) cin >> a[i]; 
    int ml = 0; 
    rep(i, n-1) {
        ml = max(ml, a[i+1]-a[i]); 
    }
    ml = max(ml, k-a[n-1]+a[0]);
    cout << k - ml << endl;
    return 0;
}

Measured memory_bytes: 1152
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <deque>
#include <cstdio>
#include <cmath>
#include <complex>
#include <iostream>
#include <iterator>

using namespace std;

#define reps(i,f,t) for(int i=f ; i<int(t) ; ++i)
#define rep(i,n) reps(i, 0, n) 

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

int main()
{
	char str[16];
	while(scanf("%s", str), str[0]!='0'){
		int n = strlen(str);
		int ans = -1;
		set<string> visited;
		queue<pair<string, int> > Q;
		Q.push(make_pair(str, 0));
		while(!Q.empty()){
			pair<string, int> data = Q.front();
			Q.pop();
			if(visited.count(data.first))
				continue;
			if(count(data.first.begin(), data.first.end(), data.first[0]) == n){
				ans = data.second;
				break;
			}
			visited.insert(data.first);
			rep(i, n-1){
				char a = min(data.first[i], data.first[i+1]);
				char b = max(data.first[i], data.first[i+1]);
				if(a == b)
					continue;
				char nc;
				if(a == 'b')
					nc = b=='g' ? 'r' : 'g';
				else
					nc = 'b';
				string next = data.first;
				next[i] = next[i+1] = nc;
				Q.push(make_pair(next, data.second+1));
			}
		}
		if(ans == -1)
			puts("NA");
		else
			printf("%d\n", ans);
	}
	return 0;
}

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

int main()
{
  int N, M, C;
  cin >> N >> M >> C;
  int count = 0;
  int sum;
  int *a = new int[M];
  int *b = new int[M];
  for (int i = 0; i < M; i++)
  {
    cin >> b[i];
  }
  for (int i = 0; i < N; i++)
  {
    sum = C;
    for (int j = 0; j < M; j++)
    {
      cin >> a[j];
      sum += a[j] * b[j];
    }
    if (sum > 0) count++;
  }
  delete a;
  delete b;
  cout << count;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define mset(a, b) memset(a, b, sizeof(a))
#define mcpy(a, b) memcpy(a, b, sizeof(a))
using namespace std;
typedef long long LL;
const int MAXN = 2005;

template <typename T> inline void read(T &AKNOI) {
    T x = 0, flag = 1;
    char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') flag = -1;
        ch = getchar();
    }
    while (isdigit(ch)) {
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    AKNOI = flag * x;
}

template <typename T> inline void cmax(T &x, T y) {
    if (x < y) x = y;
}

int n, p[MAXN];
LL a[MAXN], dp[MAXN][MAXN];

bool cmp(int x, int y) {
    return (a[x] > a[y]);
}

void init() {
    read(n);
    for (int i = 1; i <= n; ++i) {
        read(a[i]);
        p[i] = i;
    }
    sort(p + 1, p + n + 1, cmp);
}

void solve() {
    for (int i = 1; i <= n; ++i) {
        int x = p[i];
        for (int j = 0; j <= i; ++j) {
            int k = i - j;
            if (j) cmax(dp[i][j], dp[i - 1][j - 1] + a[x] * (x - j));
            if (k) cmax(dp[i][j], dp[i - 1][j] + a[x] * (n - k + 1 - x));
        }
    }
    LL ans = 0;
    for (int i = 0; i <= n; ++i) {
        cmax(ans, dp[n][i]);
    }
    printf("%lld\n", ans);
}

int main() {
	init();
	solve();
	return 0;
}


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

using namespace std;

typedef long long ll;

#define MOD 1000000007

int main() {
  int n;
  cin >> n;
  n %= 10;
  if (n == 2 || n == 4 || n == 5 || n == 7 || n == 9) {
    cout << "hon" << endl;
  } else if (n == 3) {
    cout << "bon" << endl;
  } else {
    cout << "pon" << endl;
  }
  return 0;
}

Measured memory_bytes: 3636
x=int(input())
dp=[0]*(x+1)
dp[0]=1
for j in range(6):
    val=100+j
    #dp2=dp[:]
    for i in range(len(dp)):
        if i>=val:
            if dp[i-val]:
                dp[i]=1

if dp[-1]:
    print(1)
else:
    print(0)


Measured memory_bytes: 39920
#include <bits/stdc++.h>
using namespace std;
const int N = 4010;
const int MOD = 1e9 + 7;
int powi(int a, int b) {int c = 1; for (; b; b >>= 1, a = 1ll * a * a % MOD) if (b & 1) c = 1ll * c * a % MOD; return c;}
int n, f[N][N], g[N][N];
int fac[N * 2], inv[N * 2], ans;
int main()
{
    cin >> n;
    fac[0] = 1; for (int i = 1; i < N * 2; ++ i) fac[i] = 1ll * fac[i - 1] * i % MOD;
    inv[N * 2 - 1] = powi(fac[N * 2 - 1], MOD - 2); for (int i = N * 2 - 2; ~i; -- i) inv[i] = 1ll * inv[i + 1] * (i + 1) % MOD;
    for (int i = 1; i <= n; ++ i)
    {
        int x, y;
        cin >> x >> y;
        f[N / 2 - x][N / 2 - y] ++;
        g[N / 2 + x][N / 2 + y] ++;
        ans = (ans - 1ll * fac[x * 2 + y * 2] * inv[x * 2] % MOD * inv[y * 2] % MOD + MOD) % MOD;
    }
    for (int i = 1; i < N; ++ i)
        for (int j = 1; j < N; ++ j)
        {
            f[i][j] += f[i - 1][j] + f[i][j - 1];
            if (f[i][j] >= MOD) f[i][j] -= MOD;
            if (f[i][j] >= MOD) f[i][j] -= MOD;
            if (g[i][j]) ans = (ans + 1ll * f[i][j] * g[i][j]) % MOD;
        }
    ans = 1ll * ans * (MOD + 1) / 2 % MOD;
    cout << ans << endl;
}


Measured memory_bytes: 95232
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <algorithm>
#include <iomanip>
#include <string.h>

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

typedef long long lint;

using namespace std;

int main(){
  int N,K;
  cin>>N>>K;
  int x[N],y[N];
  REP(i,N)cin>>x[i]>>y[i];
  map<pair<int,int>,int> rec;
  REP(i,N)REP(j,N){
    int temp=0;
    REP(k,N){
      if(x[k]<=x[i] and y[k]<=y[j])temp++;
    }
    rec[make_pair(x[i],y[j])]=temp;
  }
  sort(x,x+N);
  sort(y,y+N);
  lint ans=9e18;
  REP(i,N)REP(ii,i)REP(j,N)REP(jj,j){
    int num=rec[make_pair(x[i],y[j])];
    if(ii==0 and jj==0)num=num;
    else if(ii==0)num-=rec[make_pair(x[i],y[jj-1])];
    else if(jj==0)num-=rec[make_pair(x[ii-1],y[j])];
    else num-=rec[make_pair(x[ii-1],y[j])]+rec[make_pair(x[i],y[jj-1])]-rec[make_pair(x[ii-1],y[jj-1])];
    if(num==K)ans=min(ans,lint(x[i]-x[ii])*(lint)(y[j]-y[jj]));
  }
  cout<<ans<<endl;
  return 0;
}


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

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

    int ans = N;
    for (int i = 0; i <= N; i++) {
        int cnt = 0;
        int tmp = i;
        while (tmp > 0) {
            cnt += tmp % 6;
            tmp /= 6;
        }
        tmp = N - i;
        while (tmp > 0) {
            cnt += tmp % 9;
            tmp /= 9;
        }
        ans = min(ans, cnt);
    }

    cout << ans << endl;
}

Measured memory_bytes: 256
n,m=map(int,input().split())
check=[0]*n
ans="IMPOSSIBLE"
for i in range(m):
    ai,bi=map(int,input().split())
    if ai==1:
        if check[bi-1]==1:
            ans="POSSIBLE"
            break
        else:
            check[bi-1]+=1
    elif bi==n:
        if check[ai-1]==1:
            ans="POSSIBLE"
            break
        else:
            check[ai-1]+=1
print(ans)

Measured memory_bytes: 4596
use std::io;


/// https://beta.atcoder.jp/contests/abc051/tasks/abc051_c
fn main() {
    let (sx, sy, gx, gy) = {
        let i = read::<isize>();
        (i[0], i[1], i[2], i[3])
    };

    let mut buf = MyStr::new();
    let dx = (gx - sx).abs();
    let dy = (gy - sy).abs();

    buf.append("U", dy);
    buf.append("R", dx); // (t_x, t_y)
    buf.append("U", 1);
    buf.append("L", dx + 1);
    buf.append("D", dy + 1);
    buf.append("R", 1); // (s_x, s_y)
    buf.append("R", dx);
    buf.append("U", dy); // (t_x, t_y)
    buf.append("R", 1);
    buf.append("D", dy + 1);
    buf.append("L", dx + 1);
    buf.append("U", 1); // (s_x, s_y)

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


struct MyStr {
    s: String,
}

impl MyStr {
    fn new() -> MyStr {
        MyStr { s: String::new(), }
    }

    fn append(&mut self, dir: &str, time: isize) {
        for _ in 0..time { self.s += dir; }
    }
}

impl std::fmt::Display for MyStr {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        write!(f, "{}", self.s)
    }
}

#[allow(dead_code)]
fn read<T>() -> Vec<T>
where T:
    std::str::FromStr,
    T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.split(' ')
        .map(|s| s.trim().parse().unwrap())
        .collect()
}

#[allow(dead_code)]
fn read_one<T>() -> T
where T:
    std::str::FromStr,
    T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.trim().parse().unwrap()
}

Measured memory_bytes: 4352
#include <cstdio>
int main(){
    int n;
    scanf("%d", &n);
    int a = n / 100, b = n % 100;
    if (1 <= a && a <= 12){
        if (1 <= b && b <= 12){
            printf("AMBIGUOUS\n");
        }else{
            printf("MMYY\n");
        }
    }else{
        if (1 <= b && b <= 12){
            printf("YYMM\n");
        }else{
            printf("NA\n");
        }
    }
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
#define vsort(v) sort(v.begin(), v.end())
#define rvsort(v) sort(v.begin(), v.end(), greater<ll>())
#define vfind(v, target) find(v.begin(), v.end(), target)
#define notFound(v, target) (vfind(v, target) == v.end())
#define maxIndex(v) max_element(v.begin(), v.end()) - v.begin()
#define maxElement(v) *max_element(v.begin(), v.end())
#define minIndex(v) min_element(v.begin(), v.end()) - v.begin()
#define minElement(v) *min_element(v.begin(), v.end())
#define ll long long
#define rep(i, s, g) for (ll i = (s); i < (g); i++)
#define MOD 1000000007
using namespace std;

int main()
{
  ll sx, sy, tx, ty;
  cin >> sx >> sy >> tx >> ty;
  ll dis_x = tx - sx;
  ll dis_y = ty - sy;
  string route = "";
  rep(i, 0, dis_y) route.push_back('U');
  rep(i, 0, dis_x) route.push_back('R');
  rep(i, 0, dis_y) route.push_back('D');
  rep(i, 0, dis_x + 1) route.push_back('L');
  rep(i, 0, dis_y + 1) route.push_back('U');
  rep(i, 0, dis_x + 1) route.push_back('R');
  route += "DR";
  rep(i, 0, dis_y + 1) route.push_back('D');
  rep(i, 0, dis_x + 1) route.push_back('L');
  route += "U";
  cout << route << endl;
}

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

int main(int argc, char *argv[])
{
  int a, b;
  char op;

  while((cin >> a >> op >> b) && op != '?') {
    switch (op) {
    case '+':
      cout << a + b << endl;
      break;
    case '-':
      cout << a - b << endl;
      break;
    case '*':
      cout << a * b << endl;
      break;
    case '/':
      cout << a / b << endl;
      break;
    }
  }
  return 0;
}



Measured memory_bytes: 3104
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1000000000; 

int main(){
  int a,b;
  cin >> a >> b;
  for(int i=0; i<2000; i++){
    double aa = i*0.08;
    double bb = i*0.1;
    if(floor(aa) == a && floor(bb) == b){
      cout << i << endl;
      return 0;
    }
  }
  cout << -1 << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;


int main() {
    int n;
    ll k;
    vector<pii> v;
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        int a, b;
        cin >> a >> b;
        v.push_back(pii(a, b));
    }
    sort(v.begin(), v.end());
    ll pos = 0;
    for (int i = 0; i < n; i++) {
        pos += v[i].second;
        if (k <= pos) {
            cout << v[i].first;
            break;
        }
    }


    return 0;
}


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

#define int long long
#define ll long long
#define vll vector<int>
#define mset(a) memset(a,0,sizeof(a))
#define pb push_back
#define range(c) c.begin() , c.end()
#define forn(i,n) for(ll i=0; i<(int)n; ++i)
#define for1(i,n) for(ll i=1; i<(int)n; ++i)
#define endl '\n'
#define MOD 1000000007
#define pii pair<int,int>
#define test ll t;cin>>t;while(t--)
using namespace std;

vector<bool> sieve(ll n){
    vector<bool>prime(n+1,true);
    prime[0]=prime[1]=false;
    for(ll i=2; i<=n; ++i){
        if(prime[i]&&(i*i)<=n)
        for(ll j=i*i; j<=n; j+=i)prime[j]=false;
    }
    return prime;
}

ll power(ll a, ll b, ll m = MOD) {
    a %= m;
    ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % m;
        a = a * a % m;
        b >>= 1;
    }
    return res;
}

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

int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    

    int n;cin>>n;
    vll a(n);
    map<int,int>f;
    forn(i,n) {
        cin>>a[i];
        f[a[i]]++;
    }    

    map<int,int>inc,exc;
    int s=0;
    for(auto it:f) {
        inc[it.first] = it.second*(it.second-1)/2;
        s+=inc[it.first];
        exc[it.first] = (it.second-1)*(it.second-2)/2;
    }

    forn(i,n) {
        cout<<s-inc[a[i]]+exc[a[i]]<<endl;
    }

    return 0;
}


Measured memory_bytes: 26880
#include <iostream>
#include<ctype.h>
#include<cstdio>

using namespace std;

int main()
{
    int a,b;
    while(cin>>a>>b)
    {
        //if(!isdigit(a))
           // cout<<a<<endl;
       // if(!isdigit(b))
            //cout<<b<<endl;
        if(!isdigit(a)&&!isdigit(b))
        {cout<<2*b-a<<endl;
        //cout<<a<<" "<<b;
        }
    }

    return 0;
}


Measured memory_bytes: 256
n, m = map(int, input().split())
NINF = -10**20
edge = []
dist = [NINF]*n
dist[0] = 0
for _ in range(m):
    a, b, c = map(int, input().split())
    edge.append((a-1, b-1, c))
for i in range(2*n):
    for a, b, c in edge:
        if dist[a]!=NINF and dist[b] < dist[a] + c:
            dist[b] = dist[a] + c
            if i>=n-1 and b==n-1:
                print('inf')
                exit()
print(dist[-1])

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

ll gcd(ll a, ll b){return b!=0 ? gcd(b, a%b) : a;}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}

int main(){
	string s;
	cin >> s;
	
	int n = s.size();
	for(int i = 2; i < n; i += 2){
		bool success = true;
		for(int j = 0; j < (n - i) / 2; ++j){
			if(s[j] == s[j + (n - i) / 2]) continue;
			success = false;
			break;
		}
		if(success){
			cout << n-i << endl;
			return 0;
		}
	}
	return 0;
}



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

#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 ANS(ans) cout << ans << endl
#define FLG(flg) if(flg) cout << "Yes" << endl; else cout << "No" << endl;
#define YES cout << "Yes" << endl;
#define NO cout << "No" << endl;
#define COUT(s) cout << s << endl;
#define AN vector<int> a(n); for(int i = 0; i < n; i++) cin >> a[i];
#define IN  int n;  cin >> n;
#define VI  vector<int> 
#define SS stringstream ss;
#define SOLVE cout << solve() << endl;

int main() {
    int n;
    cin >> n;
    int a[n]; 
    for(int i = 0; i < n; i++) cin >> a[i];
    sort(a,a+n);
    reverse(a,a+n);
    long long sum = 0;
    for(int i = 0; i < n; i++) {
        for(int j = i + 1; j < n; j++) {
            for(int h = j + 1; h < n; h++) {
                if (a[i] < a[j] + a[h]) sum += 1;
            }
        }
    }
    COUT(sum)
}


Measured memory_bytes: 256
import java.math.BigInteger;
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        for (int i=0;i<n;i++){
            String s1=sc.next();
            String s2=sc.next();
            if (s1.length()>80||s2.length()>80) {
                System.out.println("overflow");
                continue;
            }
            BigInteger b=new BigInteger(s1).add(new BigInteger(s2));
            if(b.toString().length()>80){
            	System.out.println("overflow");
            }else{
            	System.out.println(b);
            }
        }
    }
}

Measured memory_bytes: 17240
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
#define rep(i, n) for(ll i = 0;i < n;i++)
#define all(i) i.begin(), i.end()
template<class T, class U> bool cmax(T& a, U b) { if (a<b) {a = b; return true;} else return false; }
template<class T, class U> bool cmin(T& a, U b) { if (a>b) {a = b; return true;} else return false; }

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

  ll n, k, q;
  cin >> n >> k >> q;
  vi a(q);

  rep(i, q) {
    cin >> a[i];
  }

  vi c(n);
  rep(i, q) {
    c[a[i]-1]++;
  }

  rep(i, n) {
//    cerr << c[i] << endl;
    if (k-q+c[i] > 0) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
}


Measured memory_bytes: 1408
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n); for(int i = 0;i < (int)(n);i++)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
int main(){
    int n;
    cin >> n;
    vector<int>a(n);;
    rep(i,n)cin >> a[i];
    int A = 0,B = 0;
    sort(all(a));
    reverse(all(a));
    rep(i,n){
        if(i%2 == 0)A += a[i];
        else B += a[i];
    }
    cout << A - B << endl;
    return 0;
}

Measured memory_bytes: 256
// Last Change: 06/22/2019 21:19:07.
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

namespace NS {
void LoopUntilZeroInpput() {
  int hogegegege = 0;
  while (cin >> hogegegege && hogegegege != 0) {
  }
}
} // namespace NS

int main() {
  ll N, L;
  cin >> N >> L;

  ll ans = 0;
  pair<ll, ll> apple(300, 0);
  for (int i = 0; i < N; ++i) {
    ans += L + i;
    if (apple.first > abs(L + i)) {
      apple.first = abs(L + i);
      apple.second = L + i;
    }
  }

  ans -= apple.second;

  cout << ans << endl;

  //NS::LoopUntilZeroInpput();
}


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

int main(void){
  int n;
  cin >> n;
  for(int t = 0; t < n; t++){
    int s;
    cin >> s;
    cout << "Case " << t + 1 << ":" << endl;
    for(int i = 0; i < 10; i++){
      s *= s;
      string str = to_string(s);
      if(str.size() < 8){
        int c = 8 - str.size();
        for(int j = 0; j < c; j++) str.insert(str.begin(), '0');
      }
      s = stoi(string(str, 2, 4));
      cout << s << endl;
    }
  }
}

Measured memory_bytes: 1256
// inputに入力データ全体が入る
function Main(input) {

  // sに入力を1字ずつ区切ったものを入れる
  var s = input.split("");

  if(s[0] == s[1] && s[0] == s[2]) {
    console.log("No")
  } else {
    console.log("Yes")
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


Measured memory_bytes: 7372
#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define vii vector<ll> 
#define pb push_back
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
const int MOD = 1e9 + 7, N = 1e4 + 3;

int main(){
    fast;
    ll n;
    cin >> n;
    ll k = n/1000;
    ll a = n%1000;
    ++k;
    if(abs(n - (k*1000)) == 1000) cout << 0;
    else
        cout << abs(n - (k*1000));
    cerr << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " sec \n";
    return 0;
}

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

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

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

using namespace std;
typedef long long LL;

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

	string S;
	cin >> S;

	int near = 999;
	int ans = 0;
	for(int i=0; i<S.size()-2; i++){
		char c[4] = {0};
		for(int j=0; j<3; j++){
			c[j] = S[i+j];
		}
		int d = atoi(c);
		if(abs(d - 753) < near){
			near = abs(d - 753);
			ans = d;
		}
	}
	printf("%d\n", near);
	return 0;
}

Measured memory_bytes: 3736
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#include<map>
#include<iostream>
#include<math.h>
#include <algorithm>
#define ll long long
#define ld long double
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;


int main(){
    string s,t;
    cin >> s;
    cin >> t;
    int ans = 1000;
    for(int i = 0; i < s.size()-t.size()+1;i++){
        int tmp = 0;
        string sub = s.substr(i,t.size());
        for(int j = 0; j < t.size();j++){
            if(sub[j] != t[j]) tmp++;
        }
        ans = min(ans,tmp);
    }
    cout << ans << endl;
}

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

int main(void) {
    int a,b,c;cin>>a>>b>>c;
    int result = 1;
    if (a != b) {
        result++;
        if (a != c && b != c) result++;
    } else {
        if (a != c) result++;
    }
    cout << result << endl;

    return 0;
}

Measured memory_bytes: 3144
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
using namespace std;
using lint = int64_t;

struct WeightedUnionFind {
    vector<int> par, wei;
    WeightedUnionFind (int N) : par(N, -1), wei(N, 0) {}
    int root(int x) {
        if (par[x] < 0) {
            return x;
        } else {
            int rx = root(par[x]);
            wei[x] += wei[par[x]];
            return par[x] = rx;
        }
    }
    bool same(int x, int y) {
        return root(x) == root(y);
    }
    int weight(int x) {
        root(x);
        return wei[x];
    }
    int diff(int x, int y) {
        return weight(y) - weight(x);
    }
    bool unite(int x, int y, int w) {
        int rx = root(x);
        int ry = root(y);
        if (rx == ry) return diff(x, y) == w;
        w += wei[x];
        w -= wei[y];
        if (par[rx] > par[ry]) {
            swap(rx, ry);
            w = -w;
        }
        par[rx] += par[ry];
        par[ry] = rx;
        wei[ry] = w;
        return true;
    }
};

int main() {
    int N, M;
    cin >> N >> M;
    WeightedUnionFind WUF(N);
    rep(i, M) {
        int L, R, D;
        cin >> L >> R >> D;
        --L;
        --R;
        if (!WUF.unite(L, R, D)) {
            cout << "No\n";
            return 0;
        }
    }
    cout << "Yes\n";
    return 0;
}


Measured memory_bytes: 1024
#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: 1156
#include <stdio.h>
#include <string.h>

int main()
{

	char str[256];
	while(scanf("%s", str), strcmp(str, "-"))
	{
		int m, h, len, ofs = 0;
		scanf("%d", &m);
		for(int i = 0; i < m; ++i)
		{
			scanf("%d", &h);
			ofs += h;
		}

		len = strlen(str);
		for(int i = 0; i < len; ++i)
		{
			putchar(str[(i + ofs) % len]);
		}
		putchar('\n');
	}
	return 0;
}


Measured memory_bytes: 2044
#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <stack>
#include <math.h>
#define rep(i, n) for(int i = 0; i < (n); ++i)
using namespace std;

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


const long long INF = 1LL << 60;

//bucket1
// bool ch[10] = {0};
// bool check(int n){
//     while(n!=0){
//         if(ch[n%10]) return false;
//         n /= 10;
//     }
//     return true;
// }



// --------write my code!!!!!----------//


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

    if(a==b && b==c) cout << "Yes" << endl;
    else cout << "No" << endl;
}


Measured memory_bytes: 256