akhauriyash/Code-Regression huggingface dataset:
// abc061_b
#include <bits/stdc++.h>
#ifdef LOCAL
#include "../cxx-prettyprint/prettyprint.hpp"
#endif
using namespace std;

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

#define REP(i, n) for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n) for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define REP_REV(i, n) for (int (i) = (int)(n) - 1 ; (i) >= 0 ; --(i))
#define REPN_REV(i, m, n) for (int (i) = (int)(n) - 1 ; (i) >= m ; --(i))
#define ALL(x) x.begin(), x.end()

#define INF ((1 << 29)-1)
#define MOD (1000000007)

#define print2D(h, w, arr) REP(i, h) { REP(j, w) cout << arr[i][j] << " "; cout << endl; }
#define print_line(vec, n) {for(int i=0;i<(n-1);i++) cout << (vec)[i] << " "; cout << (vec)[(n)-1] << endl;}
template<class T> void print(const T& x){cout << x << endl;}
template<class T, class... A> void print(const T& first, const A&... rest) { cout << first << " "; print(rest...); }
struct PreMain {PreMain(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(20);}} premain;


struct Graph {

    int n;
    vector<vector<int>> edges;

    Graph(int n_) : n(n_), edges(n_) {}

    void add_edge(int u, int v) {
        edges[u].emplace_back(v);
        edges[v].emplace_back(u);
    }

};

int main() {
#ifdef LOCAL
    ifstream in("../arg.txt"); cin.rdbuf(in.rdbuf());
#endif

    int N, M;
    cin >> N >> M;
    Graph g(N);
    REP(i, M){
        int a,b;
        cin >> a >> b;
        a--; b--;
        g.add_edge(a, b);
    }

    REP(i, N){
        print(g.edges[i].size());
    }


    return 0;
}


Measured memory_bytes: 256
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10

    from time import perf_counter
    s = perf_counter()
    ans = 1
    num = 7
    K = II()
    if K % 2 == 0:
        print(-1)
        return
    while perf_counter() - s < 1.9:
        if num % K == 0:
            print(ans)
            return
        else:
            num = (num*10+7)%K
            ans += 1
    print(-1)
    dbg(len(str(num)))
    return
        


    
main()

Measured memory_bytes: 67844
/*author  ADITYA BANSAL
                 //~ MNNIT ALLAHABAD     */
        #include<bits/stdc++.h>
        using namespace std;
         #define ll long long
        //~ #define ll int
        ll power(ll,ll);
        ll ncr(ll,ll);
        ll add(ll a,ll b);
        void fact();
        ll mul(ll a,ll b);
        #define watch(x) cerr<<(#x)<<"is"<<x<<nl;
        #define fast  ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
        #define fi(a,b) for(ll i=a; i<b; i++)
        #define fk(a,b) for(ll k=a; k<b; k++)
        #define fri(a,b) for(ll i=a; i>b; i--)
        #define fj(a,b) for(ll j=a; j<b; j++)
        #define ffi(a,b) for(ll i=a;i*i<=b;i++)
        #define mp make_pair
        #define ff first 
        #define  tc ll t; cin>>t; while(t--)
        #define all(v) (v).begin(),(v).end()
        #define ss second
        #define pb push_back
        #define mem(v,a) memset((v),a,sizeof(v));
        #define pll pair<ll,ll>
        #define mll map<ll,ll>
        #define sll set<ll>
        #define vll vector<ll>
        #define max3(a,b,c) max(a,max(b,c))
        #define min3(a,b,c) min(a,min(b,c))
        #define nl endl
         int mod=1e9+7;
        const ll  N=100002LL;
        ll fac[N+2];
        ll inv[N+2];
     
      
        signed main(){  
    		fast
    	 //~ tc
    	
        {
		 
		 ll a,b;
		 cin>>a>>b;
		 cout<<max(a-2*b,0LL);	
			
		
	    }
            return 0;
        }
         
         
        /******************************************************************************/
         
        ll add(ll a,ll b){
			a+=b+mod;
		   if(a>=mod) a-=mod;
		   
		   return a;
		} 
         
        ll mul(ll a,ll b){
            return ((a)*1ULL*(b))%mod;
        }
         
        ll power(ll a,ll n){
          ll res=1;
          while(n){
              if(n&1) res= mul(res,a);
             n>>=1; 
             a= mul(a,a);
          }
            return res;
        }
        void fact(){
        	inv[0]=fac[0]=1;
        	fi(1,N){
        	 fac[i]=mul(fac[i-1],i);
        	inv[i]=power(fac[i],mod-2);
        }
        }
         
        ll ncr(ll n,ll r){
        	
        	if(r>n) return 0;
        	ll e=fac[n];
        	e=mul(e,inv[r]);
        	e=mul(e,inv[n-r]);
        	return e;
        }


Measured memory_bytes: 256
#include <iostream>
#include <cstdint>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <cassert>
#include <climits>
#include <string>
#include <bitset>
#include <cfloat>
#include <unordered_set>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef vector<pair<int, int>> vpii;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
typedef vector<vector<ll>> vvll;

#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rrep(i, n) for (ll i = 1; i <= (n); ++i)
#define irep(it, stl) for (auto it = stl.begin(); it != stl.end(); it++)
#define drep(i, n) for (ll i = (n)-1; i >= 0; --i)
#define mes(a) cout << (a) << endl
#define dmes(a, b) cout << (a) << " " << (b) << endl
#define re0 return 0
#define mp(p, q) make_pair(p, q)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define rSort(a) sort(a.rbegin(), a.rend())
#define Rev(a) reverse(a.begin(), a.end())
#define MATHPI acos(-1)
#define itn int
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
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;
}
struct io
{
    io()
    {
        ios::sync_with_stdio(false);
        cin.tie(0);
    }
};
const int INF = INT_MAX;
const ll LLINF = 1LL << 60;
const ll MOD = 1000000007;
const double EPS = 1e-19;



signed main() {
    ll n;
    cin >> n;
    
    vll a(n), b(n), c(n), d(n);
    
    rep(i, n) {
        cin >> a[i] >> b[i];
        
        c[i] = a[i] + b[i];
        d[i] = a[i] - b[i];
    }
    
    Sort(c);
    Sort(d);
    
    mes(max(abs(c[n-1]-c[0]), abs(d[n-1]-d[0])));
    
   
    
    
    
}
    
    
    
    
    


Measured memory_bytes: 9588
//的場梨沙★担当
//結城晴★副担当
//日野茜★副担当
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string.h>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <cctype>
#include <complex>
#include <regex>
#include <unordered_map>
#include <string>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <iostream>

using namespace std;

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

    if(A!=1&&B!=1){
        cout<<1<<endl;
    }
    else if(A!=2&&B!=2){
        cout<<2<<endl;
    }
    else if(A!=3&&B!=3){
        cout<<3<<endl;
    }
}

Measured memory_bytes: 256
#include <stdio.h>

int main (void){

	/*?????°?????£?¨???¨?????????*/

	int r = 0 ;
	int c = 0 ;			//r???c????????¨?????±???
	int sum = 0 ;		//????¨????????±?????????´?????????????????°

	int i = 0 ;
	int j = 0 ;			//???????????°



	/*r,c?????????*/
	scanf("%d" , &r);
	scanf("%d" , &c);

	/*r+1???c+1??????int???????¬???????????????£?¨?????????????*/
	int culc[r+1][c+1];

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

	/*??????culc?????¨?????????????´?????????????????????????????¨????*/

	for( i = 0; i < r ; i++){			//r+1????????????????????\????¨??????????????????????
		for(j = 0 ; j < c ; j++){		//c+1????????????????????\????¨??????????????´???????
			scanf("%d" , &culc[i][j]);
			sum += culc[i][j];
		}
		culc[i][c] = sum;				//c+1??????????¨???????????´????????¬??????????
		sum = 0 ;						//?¬???????????§??????????sum???????????????
	}

	/*r+1?????????????¨????*/
	for( j = 0 ; j < c+1 ; j++){
		for( i = 0 ; i < r ; i++){
			sum += culc[i][j];			//j+1??????1?????????r????????§???????¨?
		}
		culc[r][j] = sum;				//????¨???????r+1??????????´????????¬??????????
		sum = 0 ;						//?¬???????????§??????????sum???????????????
	}

	/*??????*/

	for( i = 0 ; i < r+1 ; i++){
		for( j = 0 ; j < c+1 ; j++){
			printf("%d" , culc[i][j]);
			if(j != c){
				printf(" ");
			}
		}
		printf("\n");
	}

	return 0;
}

Measured memory_bytes: 644
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

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

class ACirclePond {
 public:
  void solve(std::istream &in, std::ostream &out) {
      int r;
      in >> r;
      out << setprecision(12) << fixed << 2.0 * r * M_PI << '\n';
  }
};

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ACirclePond solver;
    std::istream &in(std::cin);
    std::ostream &out(std::cout);
    solver.solve(in, out);
    return 0;
}

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

int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  
  for (int i = 0; i < n; i++) {
    cin >> s.at(i);
  }
  
  int m;
  cin >> m;
  vector<string> t(m);
  
  for (int i = 0; i < m; i++) {
    cin >> t.at(i);
  }
  
  int max = 0;
  
  for (int i = 0; i < n; i++) {
    int sum = 0;
    
    for (int j = 0; j < n; j++) {
      if (s.at(i) == s.at(j))
        sum++;
    }
    
    for (int j = 0; j < m; j++) {
      if(s.at(i) == t.at(j))
        sum--;
    }
    
    if (sum >= max)
      max = sum;
  }
  
  cout << max << endl;
}

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

int dfs(int cur,int depth,vector<vector<int>>&g){
	if(depth==g.size())return 1;
	int res=0,temp=-1,temp2=-1;
	for(auto&&i:g.at(cur)){
		if(g.at(i).front()==-1)continue;
		swap(temp,i);
		swap(temp2,g.at(cur).front());
		res+=dfs(temp,depth+1,g);
		swap(temp2,g.at(cur).front());
		swap(temp,i);

	}
	return res;
}

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n,m; cin>>n>>m;
	vector<vector<int>>g(n);
	for(int i=0;i<m;++i){
		int a,b; cin>>a>>b; --a,--b;
		g.at(a).emplace_back(b);
		g.at(b).emplace_back(a);
	}
	cout<<dfs(0,1,g)<<"\n"s;
}


Measured memory_bytes: 3632
#include "bits/stdc++.h"
 
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define int ll
typedef pair<int,int> pii;
#define fi first
#define se second
#define Sort(a) sort(a.begin(),a.end())
#define rep(i,n) for(int i = 0;i < (n) ; i++) 
#define REP(i,n) for(int i = 0;i < (n) ; i++) 
#define MP(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define INF LLONG_MAX/4
#define INTINF INT_MAX/2
#define all(x) (x).begin(),(x).end()
#define debug(x) cerr<<#x<<": "<<x<<endl
#define debug_vec(v) cerr<<#v<<":";rep(i,v.size())cerr<<" "<<v[i];cerr<<endl
template<class T> inline bool chmax(T &a, T b){if(a < b){a = b;return true;}return false;}
template<class T> inline bool chmin(T &a, T b){if(a > b){a = b;return true;}return false;}
/*----------------------------------------------------------------*/
const int MOD = 998244353;
// const int MOD = 1000000007;

/*----------------------------------------------------------------*/
signed main(){

	
	string a,b;
	cin >> a >> b;
	if(a.size() > b.size()){
		cout << "GREATER" << endl;
		return 0;
	}
	if(a.size() < b.size()){
		cout << "LESS" << endl;
		return 0;
	}
	if(a > b)cout << "GREATER" << endl;
	if(a == b)cout << "EQUAL" << endl;
	if(a < b)cout << "LESS" << endl;


	return 0;
}
/*----------------------------------------------------------------*/

// g++ -std=gnu++17 code1.cpp
// sudo pip3 install --upgrade online-judge-tools
// rm -r -f test;oj dl https://code-festival-2018-quala.contest.atcoder.jp/tasks/code_festival_2018_quala_c
// rm -r -f test;oj dl https://abc059.contest.atcoder.jp/tasks/abc059_b

Measured memory_bytes: 3608
#include<bits/stdc++.h>
 
using namespace std;
 
 
#define mod(cans) cans%10**9+7
#define debug(x) cout << "Debug" << x << "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define cin_pl(n,x) rep(i,n){cin>>x[i];}
#define cins(s,n) rep(i,n)cin>>s.at[i];
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define prians(Answer) cout<<Answer<<"\n"
#define TF(X) X==1?cout<<"Yes\n":cout<<"No\n"
#define elcon else{continue;}
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<vector<int> > matrix;
typedef pair<int,int> pii;
typedef vector<pii> vpi;
typedef greater<int> gi;
typedef vector<unsigned> vu;


ll gcd(ll x, ll y) { return (y == 0) ? x : gcd(y, x % y); }
bool is_prime(const unsigned n){
    switch(n){
        case 0:
        case 1: return false;
        case 2: return true;
    }
 
 
    for(unsigned i=2;i<n;++i){
        if(n%i == 0) return false;
    }
 
    return true;
}

int main()
{
    string s,ans="";
    cin>>s;
    rep(i,s.size())
    {
        if(s[i]=='0')ans+='0';
        else if(s[i]=='1')ans+='1';
        else if(s[i]=='B'&&ans.size()>0){ans.pop_back();}
    }
    cout<<ans;
}


Measured memory_bytes: 256
#include<stdio.h>

int main()
{
    int n, t;   scanf("%d%d", &n, &t);
    int C[n], T[n];
    int i;
    int bkt[1001];
    int check = 0;

    for(i = 1; i < 1001; i++){
        bkt[i] = 1000;
    }

    for(i = 0; i < n; i++){
        scanf("%d", &C[i]);
        scanf("%d", &T[i]);
        bkt[C[i]] = T[i];
    }

    for(i = 1; i < 1001; i++){
        if(bkt[i] <= t){
            check = 1;
            printf("%d\n", i);
            break;
        }
    }

    if(check == 0){
        puts("TLE");
    }

    return 0;
}

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

	int main(){
        int X(0),tmp,x,ans,cnt(0);
    	cin >> X;
      	x = X;
      
      for(;;){
       if(X < tmp){
         X =  X - (tmp-500);
         cnt--;
         break;
       }
        cnt++;
        tmp = tmp + 500;
      }
      ans = cnt * 1000;
     
      cnt = 0;
      tmp = 0;
      for(;;){
        if(X < tmp){
          cnt--;
          ans += cnt * 5;
          cout << ans;
          break;
        }
        cnt++;
        tmp = tmp + 5;
      }
	}

Measured memory_bytes: 256
# coding: utf-8
# Your code here!
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read

#n = int(input())
n,m = [int(i) for i in readline().split()]
a = [int(i)//2 for i in read().split()]

from fractions import gcd

def num_of_2(x):
    c = 0
    while x%2 == 0:
        c += 1
        x//=2
    return c

a0 = num_of_2(a[0])
if any([num_of_2(i) != a0 for i in a]):
    print(0)
else:
    def lcm(x,y):
        return x//(gcd(x,y))*y
    
    c = 1
    INF = 10**18
    for i in a:
        c = lcm(c,i)
        if c >= INF: break
    
    
    ans = m//c    
    #print(m,c,ans)
    print((ans+1)//2)
    




    
        
    



        








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

using namespace std;

int main(int argc, const char *argv[]) {
  int a, b, c;
  cin >> a >> b >> c;
  int ans;
  if (a == b) {
    ans = c;
  } else if (a == c) {
    ans = b;
  } else if (b == c) {
    ans = a;
  }
  
  cout << ans << '\n';
  return 0;
}

Measured memory_bytes: 256
L, R = gets.chomp.split(" ").map(&:to_i)
l = L % 2019
r = R % 2019

if L / 2019 != R / 2019 || l == 0
    puts 0
elsif l < 4 && r > 672
    puts 0
else
    ary = (l..r).to_a.map{|a| a %= 2019}.sort
    min = 2019
    (ary.size - 1).times do |i|
        j = i + 1
        while j < ary.size do
            tmp = (ary[i] * ary[j]) % 2019
            min = tmp if tmp < min
            j += 1
        end
    end
    puts min
end


Measured memory_bytes: 1788
#include<stdio.h>
int main(void)
{
	int n,s[10001];
	int i;
	int max,maxp;
	int p[10001],d1,d2;
	
	scanf("%d",&n);
	while(n!=0){
		max=-1;
		for(i=0;i<n;i++){
			scanf("%d %d %d",&p[i],&d1,&d2);
			s[i]=d1+d2;
		}
		for(i=0;i<n;i++){
			if(s[i]>max){
				max=s[i];
				maxp=p[i];
			}
		}
		printf("%d %d\n",maxp,max);
		scanf("%d",&n);
	}
	return 0;
}

Measured memory_bytes: 676
#include <bits/stdc++.h>
using namespace std;
template<typename T1, typename T2>
inline bool cmn (T1& a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<typename T>
struct floyd_warshall {
  const int n;
  const T inf;
  vector<vector<T>> dst;
  void cal () {
    for (int k = 0; k < n; k++) {
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          if (dst[i][k] != inf && dst[k][j] != inf) {
            cmn(dst[i][j], dst[i][k] + dst[k][j]);
          }
        }
      }
    }
  }
  floyd_warshall (
      vector<vector<T>> adj,
      const T inf
    ) :
    n(adj.size()), inf(inf), dst(adj)
    {
      cal();
    }
  auto& result () {return dst;}
  const bool has_negative_cycle () {
    for (int i = 0; i < n; i++) if (dst[i][i] < 0) return true;
    return false;
  }
};
int main() {
  cin.tie(0); cin.sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  constexpr int inf = numeric_limits<int>::max();
  vector<vector<int>> adj(n, vector<int>(n, inf));
  for (int i = 0; i < n; i++) adj[i][i] = 0;
  for (int i = 0; i < m; i++) {
    int s, t, d;
    cin >> s >> t >> d;
    cmn(adj[s][t], d);
  }
  floyd_warshall<int> fw(adj, inf);
  if (fw.has_negative_cycle()) {
    cout << "NEGATIVE CYCLE" << endl;
  } else {
    auto dst = fw.result();
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (j) cout << " ";
        cout << (dst[i][j] == inf ? "INF" : to_string(dst[i][j]));
      }
      cout << endl;
    }
  }
  return 0;
}


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

constexpr ll Mod = 998244353;
constexpr ll mod = 1e9 + 7;
constexpr ll inf = 1LL << 60;

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

/*-------------------------------------------*/

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

    int n;
    ll x;
    cin >> n >> x;
    vector<ll> a(n), b(n, inf);
    ll ans = inf;
    rep(i, n) cin >> a[i];
    rep(i, n) {
        ll num = x * i;
        vector<ll> v(n);
        rep(j, n) num += (v[j] = min(b[j ? j - 1 : n - 1], a[j]));
        b = v;
        chmin(ans, num);
    }

    cout << ans << endl;

    return 0;
}

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

#include <cmath>    //floor ceil
#include <cstdlib>  //abs
#include <cstdio>
#include <climits>  //INT_MAX
#include <cstring>
#define endl "\n"
#define debug(x) cerr<<#x<<'='<<(x)<<endl;
#define lli long long int
#define lui long unsigned int
//#define int long long
#define MOD 1000000007
#define input(a,n) for (int i=0;i<n;i++) scanf("%d",&a[i]);
#define output(a,n) for (int i=0;i<n;i++) printf("%d ",a[i]);
#define rajnikant bool ios_base::sync_with_stdio(false); cin.tie(0);
#include <vector>
#define pb push_back
#define vi vector<int>
#include <map>
#define mp make_pair
#define mii map<int,int>
#include <set>
set<int>::iterator its;
#define f first
#define s second
/*---------------------------------------------------CODE STARTS FROM HERE---------------------------------------------------*/

int main () {
    int tt=1;
    //cin >> tt;
    while(tt--) {
        int x;
        cin >> x;
        if(x) cout<<0;
        else cout<<1;
    }
    return 0;
}

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

ll N;

int main() {
  cin >> N;

  for (int i = sqrt(N); i > 0; --i) {
    if (N % i == 0) {
      cout << (i + N / i - 2) << endl;
      return 0;
    }
  }
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <map>
#include <vector>
#include <cstring>
#include <algorithm>
//

using namespace std;
char s1[205],s2[205];
int main()
{
    scanf("%s%s",s1,s2);
    int len=strlen(s1);
    for(int i=0;i<len;i++)
    {
        bool flag=1;
        for(int j=0;j<len;j++)
        {
            if(s1[(i+j)%len]!=s2[j]) {flag=0;break;}
        }
        if(flag) {printf("Yes");return 0;}
    }
    printf("No");
    return 0;
}


Measured memory_bytes: 256
from math import ceil
from operator import itemgetter

def main():
    N = int(input())
    AB = [list(map(int,input().split())) for _ in range(N)]
    CD = [list(map(int,input().split())) for _ in range(N)]
    AB.sort( key = itemgetter(1))
    AB.sort(key = itemgetter(0))
    CD.sort( key = itemgetter(0))
    CD.sort(key = itemgetter(1))

    ans = 0
    used = [False]*N
    for i in range(N):
        c,d = CD[i]
        for j in range(N):
            a,b = AB[N - j - 1]
            if not(used[N - j - 1]) and a <= c and b <= d:
                ans += 1
                used[N - j - 1] = True
                break
    print(ans)
    return

if __name__ == "__main__":
    main()

Measured memory_bytes: 3064
n,x=map(int,input().split())
a=sorted(list(map(int,input().split())))
i=0
ans=0
while x>0 and i<n:
    if x>=a[i]:
        if i<n-1:
            x-=a[i]
            ans+=1
            i+=1
        else:
            if x==a[i]:
                ans+=1
            x-=a[i]
            i+=1

    else:
        break
print(ans)


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

const int N = 1e6 + 100;

int main() {
    // freopen("in.txt", "r", stdin);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int X;
    cin >> X;

    for(int k = 1;; k++) {
        int y = 360 * k;
        if(y % X == 0) {
            cout << y/X << endl;
            exit(0);
        }
    }
    return 0;
}



Measured memory_bytes: 3644
#include <cstdio>
#include <cstdint>
#include <algorithm>
#include <functional>
#include <vector>
using namespace std;

constexpr int MOD = 1000000007;

int main() {
  int H, W; scanf("%d%d", &H, &W);
  static char S[200][201];
  for(int i = 0; i < H; ++i) {
    scanf(" %200s", S[i]);
  }
  static bool has_parity[100][100];
  int count = 1;
  int H2 = H/2;
  int W2 = W/2;
  for(int i = 0; i < H2; ++i) {
    for(int j = 0; j < W2; ++j) {
      char chs[4] = {S[i][j], S[i][W-1-j], S[H-1-i][j], S[H-1-i][W-1-j]};
      sort(chs, chs+4);
      int arbity;
      bool hp = false;
      if(chs[0] == chs[1] && chs[1] == chs[2] && chs[2] == chs[3]) {
        arbity = 1;
      } else if(chs[0] == chs[1] && chs[2] == chs[3]) {
        arbity = 6;
      } else if(chs[1] == chs[2] && chs[2] == chs[3]) {
        arbity = 4;
      } else if(chs[0] == chs[1] && chs[1] == chs[2]) {
        arbity = 4;
      } else if(chs[0] == chs[1] || chs[1] == chs[2] || chs[2] == chs[3]) {
        arbity = 12;
      } else {
        arbity = 12;
        hp = true;
      }
      count = (int64_t)count * arbity % MOD;
      has_parity[i][j] = hp;
    }
  }
  if(H % 2 == 1) {
    bool hp = false;
    for(int j = 0; j < W2; ++j) {
      if(S[H/2][j] != S[H/2][W-1-j]) hp = true;
    }
    if(hp) count = (int64_t)count * 2 % MOD;
  }
  if(W % 2 == 1) {
    bool hp = false;
    for(int i = 0; i < H2; ++i) {
      if(S[i][W/2] != S[H-1-i][W/2]) hp = true;
    }
    if(hp) count = (int64_t)count * 2 % MOD;
  }
  vector<char> vis(H2+W2);
  function<void(int)> dfs = [&](int v) {
    if(vis[v]) return;
    vis[v] = true;
    if(v < H2) {
      int i = v;
      for(int j = 0; j < W2; ++j) {
        if(has_parity[i][j]) {
          dfs(H2+j);
        }
      }
    } else {
      int j = v-H2;
      for(int i = 0; i < H2; ++i) {
        if(has_parity[i][j]) {
          dfs(i);
        }
      }
    }
  };
  int resolvable_parities = H2+W2;
  for(int i = 0; i < H2; ++i) {
    if(!vis[i]) {
      --resolvable_parities;
      dfs(i);
    }
  }
  for(int j = 0; j < W2; ++j) {
    if(!vis[H2+j]) {
      --resolvable_parities;
      dfs(H2+j);
    }
  }
  for(int i = 0; i < resolvable_parities; ++i) {
    count = (int64_t)count * 2 % MOD;
  }
  printf("%d\n", count);
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for (long long i = 0; i < (n); ++i)
const int INF = 2147483647;//int max
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int,int>;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
//ミョ(-ω- ?)
int main() {
    int n,k;
    cin >> n >> k;
    vector<int> x(n,0);
    rep(i,n)cin >> x[i];
    ll ans = 0;
    for(int i = 1;i<=n;i++){
        ans += min(abs(x[i-1])*2 , abs(k-x[i-1])*2);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
//author: Harsh :)
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define F first
#define S second
const ll mod = 1e9 + 7;
const ll INF = 922337203685477;
#define pb push_back
#define deb(x) cout << '>' << #x << ':' << x << endl;
#define fastio ios_base::sync_with_stdio(0); cin.tie(0);
#define maxN 100007
using namespace std;
int main(){
  fastio;
  ll n=0;
  cin>>n;
  map<string,ll>mp;
  for(ll i=0;i<n;++i){
    string s;
    cin>>s;
    ++mp[s];
  }
  ll maxm=INT_MIN;
  for(auto i:mp){
    maxm=max(i.S,maxm);
  }

  //set<string>st;
  for(auto i:mp){
    if(i.S==maxm)
      cout<<i.F<<"\n";
  }
  //for(auto i:st) cout<<i<<"\n";
  return 0;
}


Measured memory_bytes: 19212
#include <bits/stdc++.h>
#include <math.h>
#include <iostream>
#include <stdlib.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define MOD (1000000007)
using namespace std;
 
int main(){
  string S;
  cin >> S;
  int i;
  char c = 'R';
  double r_count=0.0, l_count=0.0;
  int divide;

  size_t n = S.size();
  int children[(int)n];
  for(i=0;i<n;i++){
    children[i] = 0;
    if(c!=S[i]){
      c = S[i];
      if(c=='R'){
        children[divide] = (int)(ceil(r_count/2.0)+floor(l_count/2.0));
        children[divide+1] = (int)(floor(r_count/2.0)+ceil(l_count/2.0));
        r_count = 0.0; l_count = 0.0;
      }
      else{
        divide = i-1;
      }
    }
    if(c=='R'){
      r_count += 1.0;
    }else{
      l_count += 1.0;
      if(i==n-1){
        children[divide] = (int)(ceil(r_count/2.0)+floor(l_count/2.0));
        children[divide+1] = (int)(floor(r_count/2.0)+ceil(l_count/2.0));
      }
    }
  }

  REP(i,n) {printf("%d ",children[i]);}
  printf("\n");

  return 0;
}

Measured memory_bytes: 1024
mycode = r'''
# distutils: language=c++
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: infer_types=True
# cython: cdivision=True

# define 
ctypedef long long LL

# 読み込みはpython側で行う
import numpy as np
import sys
readline = sys.stdin.buffer.readline
read = sys.stdin.readline #文字列読み込む時はこっち


def ints(): return np.fromstring(readline(), sep=' ', dtype=np.int64)

cdef LL a,b
a,b=ints()
print('Odd' if (a*b)&1 else 'Even')
'''

import sys
if sys.argv[-1] == 'ONLINE_JUDGE':  # コンパイル時
    import os
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode


Measured memory_bytes: 26588
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
typedef long long ll;
template <typename T> void chkmax(T &x, T y) {x = max(x, y); }
template <typename T> void chkmin(T &x, T y) {x = min(x, y); } 
template <typename T> void read(T &x) {
	x = 0; int f = 1;
	char c = getchar();
	for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
	for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
	x *= f;
}
ll a[MAXN], l[MAXN], r[MAXN];
int main() {
	int n; read(n);
	for (int i = 0; i <= n; i++)
		read(a[i]);
	if (n == 0) {
		if (a[0] == 1) puts("1");
		else puts("-1");
		return 0;
	}
	for (int i = n; i >= 0; i--) {
		l[i] = a[i] + (l[i + 1] + 1) / 2;
		r[i] = a[i] + r[i + 1];
	}
	if (l[0] != 1) {
		puts("-1");
		return 0;
	}
	ll ans = 1, cur = 1;
	for (int i = 1; i <= n; i++) {
		cur -= a[i - 1];
		cur = min(r[i], cur * 2);
		ans += cur;
	}
	cout << ans << endl;
	return 0;
}


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

signed main(){
	int N, f = 1;
	string W[110];
	char m;
	set<string> s;
	
	cin>>N>>W[0];
	
	m = W[0][W[0].size()-1];
	s.insert(W[0]);
	
	for(int i = 1; i < N; i++){
		cin>>W[i];
		if(W[i][0] != m || s.count(W[i])) f = 0;
		m = W[i][W[i].size()-1];
		s.insert(W[i]);
	}
	
	cout<<(f?"Yes":"No")<<endl;
	
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main(void)
{
  int a, h, m, s;

  scanf("%d", &a);

  h = a / 3600;
  m = (a%3600)/60;
  s = (a%3600)%60;

  printf("%d:%d:%d\n", h,m,s);

  return 0;
}
  

Measured memory_bytes: 1848
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<limits.h>

#define rep(i,begin,end) for(int i=begin; i<end; i++)
#define revrep(i,begin,end) for(int i=begin; i>end; i--)
#define lld long long int

int main(){
    char s[100], t[100];
    int a, b;
    scanf("%d %d", &a, &b);
    rep(i, 0, b){
        s[i] = '0' + a;
    }
    s[b] = '\0';
    rep(i, 0, a){
        t[i] = '0' + b;
    }
    t[a] = '\0';
    printf("%s", strcmp(s, t)>=0 ? t: s);

    return 0;
}

Measured memory_bytes: 128
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
 
const int N = 51;
int d[N];
int p[N];
int foo[N];
int n;
int res;
 
void backtrack(int i) {
    if (i == n) {
        copy(foo, foo + n, p);
        sort(p, p + n);
        int s = 24;
        for (int i = 0, j = n - 1; i < n; j = i++) {
            s = min(s, min(abs(p[i] - p[j]), 24 - abs(p[i] - p[j])));
        }
        res = max(res, s);
    } else {
        for (int t = -1; t <= 1; t += 2) {
            foo[i] = d[i] * t;
            backtrack(i + 1);
            if (d[i] == 12 || d[i] == 0) break;
        }
    }
}
 
int main() {
    scanf("%d", &n);
	for (int i = 1; i <= n; ++i){
		scanf("%d",&d[i]);
	}
    foo[1] = d[1];
    ++ n;
    if (n > 24) {
        printf("0");
        return 0;
    }
    
    backtrack(2);
    printf("%d\n",res);	

	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include<queue>
#include<stack>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<bitset>
#include<unordered_map>

using namespace std;

#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define rep(i,j,n) for(ll (i)=(j);(i)<(n);(i)++)
#define FOR(i,c) for(decltype((c).begin())i=(c).begin();i!=(c).end();++i)
#define ll long long
#define ull unsigned long long
#define all(hoge) (hoge).begin(),(hoge).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
typedef pair<ll, ll> P;
const long long INF = 1LL << 60;
const long long MOD = 1e9 + 7;
typedef vector<ll> Array;
typedef vector<Array> Matrix;
const int loose = 0;
const int tight = 1;


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

//グラフ関連
struct Edge {//グラフ
	ll to, cap, rev;
	Edge(ll _to, ll _cap, ll _rev) {
		to = _to; cap = _cap; rev = _rev;
	}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

void add_edge(Graph& G, ll from, ll to, ll cap, bool revFlag, ll revCap) {
	G[from].push_back(Edge(to, cap, (ll)G[to].size()));
	if (revFlag)G[to].push_back(Edge(from, revCap, (ll)G[from].size() - 1));
}

ll dfs(ll n) {
	if (n == 1) return 1;
	return 2 * dfs(n / 2)+1;
}

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

	ll h;
	cin >> h;

	cout << dfs(h) << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for(int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    int n;
    cin >> n;
    int a[n];
    rep(i,n) cin >> a[i];
    sort(a,a+n);
    int ans = 0;
    rep(i,n){
        srep(j,i+1,n){
            srep(k,j+1,n){
                if(a[i]!=a[j]&&a[j]!=a[k]&&a[i]+a[j]>a[k])ans++;
            }
        }
    }
    cout << ans << endl;
    return 0;
}




Measured memory_bytes: 3596
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
#define rrep(i,n) for(int i=1; i<=(int)(n); i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define fi first
#define se second
#define bigger (char)toupper
#define smaller (char)tolower
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<char> vc;
typedef long long ll;
typedef unsigned long long ull;

int main() {
    int N,K;
    cin>>N>>K;
    vi A(N);
    rep(i,N) cin>>A[i];
    rep(i,N) A[i]--;
    vi v(N);
    rep(i,N) v[A[i]]++;
    sort(v.begin(),v.end(),greater<int>());
    //rep(i,N) cout<<v[i]<<" ";
    int answer=0;
    for(int i=K; i<N; i++) {
        answer+=v[i];
    }
    cout<<answer<<endl;
}

Measured memory_bytes: 1792
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<utility>
#include<algorithm>
#include<cstdio>
#include<iomanip>
#include<queue>
#include<stack>

#define ll int64_t
#define Rep(i, n) for (ll i = 0; i < n; i++)

using namespace std;

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

    string A;
    cin >> A;

    vector<ll> cnt(26, 0);
    for (char c : A) {
        cnt[c-'a']++;
    }

    ll ans = 0;
    ll n = A.size();
    Rep (i, n) {
        char c = A[i];
        cnt[c-'a']--;
        ans += n - i - 1 - cnt[c-'a'];
    }

    cout << ans + 1 << endl;
}

Measured memory_bytes: 720
n,m = map(int,input().split())
s = [0] * m
c = [0] * m
ans = [0] * n
flg = [0] * n
for i in range(m):
    s[i],c[i] = map(int,input().split())
for j in range(m):
    if flg[s[j]-1] == 1 and ans[s[j]-1] != c[j]:
        print(-1)
        exit()
    else:
        ans[s[j]-1] = c[j]
        flg[s[j]-1] = 1
    
if n > 1 and flg[0] == 1 and ans[0] == 0 :
    print(-1)
elif n > 1 and flg[0] == 0:
    ans[0] = 1
    print(''.join(map(str,ans)))
    exit()
else:
    print(''.join(map(str,ans)))

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

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

Measured memory_bytes: 4844
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007 

int main() {
	ll n;
	cin>>n;
	ll ans=n/11*2;
	n%=11;
	cout << ans+(n+6-1)/6;
}

Measured memory_bytes: 256
from collections import Counter
from itertools import accumulate
N = int(input())
S = [''.join(sorted(list(input()))) for i in range(N)]
S_counter = Counter(S)

acc = list(accumulate(list(range(10 ** 5 + 1))))

check = set()
ans = 0
for s_c in S_counter:
    if s_c not in check:
        x = S_counter[s_c]
        ans += acc[x - 1]
    check.add(s_c)

print(ans)


Measured memory_bytes: 28044
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(){
    char W[11]={};
    char H[1001]={};
    int i,cnt=0,nh;
    scanf("%s",W);
    
    while(1){
    scanf("%s",H);
    if(strcmp(H,"END_OF_TEXT")==0) break;
    
    for(i=0;i<1001;i++){
         H[i]=tolower(H[i]);
    }
    
    
  
    if(strcmp(W,H)==0) cnt++;
    }
    
    printf("%d\n",cnt);
    return 0;
}


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

int main() {

	int N, a, b;
	scanf("%d%d", &N, &a);
	for(int i = 1; i < N; i++) {
        scanf("%d", &b);
        if(a-b > 1) {
            printf("No");
            return 0;
        }
        else if(a-b == 1) b++;
        a = b;
	}
	printf("Yes");
    return 0;
}

Measured memory_bytes: 256
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
typedef long long ll;
const int N = 1e+5;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

void solve() {
    int n, h;
    int a[N], b[N];

    cin >> n >> h;
    rep(i, n) {
        cin >> a[i] >> b[i];
    }

    int maxval = 1;
    rep(i, n) {
        chmax(maxval, a[i]);
    }

    vint v(b, b+n);
    sort(ALL(v));
    reverse(ALL(v));

    int count = 0;
    rep(i, n) {
        if (v[i] > maxval) {
            h -= v[i];
            ++count;
            if (h <= 0) {
                cout << count << endl;
                return;
            }
        }
    }
    count += ceil((double)h / maxval);
    cout << count << endl;
}

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


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

int main(){
	string s;
	cin >> s;
	int ans=0, tmp=0;
	rep(i,s.length()){
		if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T'){
			tmp++;
		}else{
			ans = max(ans, tmp);
			tmp=0;
		}
	}
	ans = max(ans,tmp);
	cout << ans << endl;
	return 0;
}



Measured memory_bytes: 256
// finish date: 2018/01/21
#include <iostream>
#include <cmath>
#include <vector>
#include <bitset>
#include <algorithm>
#include <stack>
#include <map>
#include <climits>

using namespace std;

#define FOR(i, a, b) for(int (i)=a;(i)<(b);(i)++)
#define rep(i, n)  FOR(i,0,n)
#define ll long long
#define bigmod 1000000007
#define INF 500000000


int main() {
    int N;
    cin >> N;
    int l, r;
    int sum = 0;
    rep(i, N) {
        cin >> l >> r;
        sum += r - l + 1;
    }
    cout << sum << endl;

    return 0;
}


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

using namespace std;
using ll = long long;

int main() {
    vector<int> A(9);
    for (int i = 0; i < 9; i++) {
        cin >> A[i];
    }
    int N;
    cin >> N;
    vector<int> B(N);
    vector<int> bingo(9, 0);
    for (int i = 0; i < N; i++) {
        cin >> B[i];
        for (int j = 0; j < 9; j++) {
            if (A[j] == B[i]) bingo[j] = 1;
        }
    }

    bool yes = false;
    for (int i = 0; i < 3; i++) {
        if (bingo[i] && bingo[i + 3] && bingo[i + 6]) yes = true;
        if (bingo[3 * i] && bingo[3 * i + 1] && bingo[3 * i + 2]) yes = true;
        if (bingo[0] && bingo[4] && bingo[8]) yes = true;
        if (bingo[2] && bingo[4] && bingo[6]) yes = true;
    }
    if (yes)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;

    return 0;
}


Measured memory_bytes: 3616
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    a, b, x = LI()
    if a <= x <= a + b:
        print("YES")
    else:
        print("NO")
    return

#B
def B():
    return

#C
def C():
    n = II()
    x = LI()
    xb = x[::1]
    xb.sort()
    a = xb[n // 2 - 1]
    b = xb[n // 2]
    for i in range(n):
        if x[i] <= a:
            print(b)
        elif x[i] >= b:
            print(a)
        
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()


Measured memory_bytes: 38512
H,N=map(int,input().split())
dp = [10**10]*(H+1)
dp[0]=0
for _ in range(N):
    A,B=map(int,input().split())
    for idx in range(H):
        nidx = min(idx+A,H)
        dp[nidx]=min(dp[nidx],dp[idx]+B)
print(dp[-1])


Measured memory_bytes: 43740
#include<bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> //Policy Based Data Structure
// using namespace __gnu_pbds;              //Policy Based Data Structure
using namespace std;
// typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update> pbds; //Policy Based Data Structure
// #define gc              getchar_unlocked
// #define pqb             priority_queue<int>
// #define pqs             priority_queue<int, vi, greater<int> >
// #define mk(arr,n,type)  type *arr = new type[n]
#define fo(i,n)         for(i=0;i<n;i++)
#define Fo(i,k,n)       for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define int             long long
#define nn              '\n'
#define w(t)            cin>>tc; while(tc--)
#define deb(x)          cout << #x << "=" << x << endl
#define deb2(x,y)       cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb              push_back
#define mp              make_pair
#define F               first
#define S               second
#define all(x)          x.begin(), x.end()
#define clr(x)          memset(x, 0, sizeof(x))
#define sortall(x)      sort(all(x))
#define tr(it,a)        for(auto it = a.begin(); it != a.end(); it++)
#define ps(x,y)         fixed<<setprecision(y)<<x
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define PI              3.1415926535897932384626
#define inf             1e18
// mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());  //Random Shuffler
typedef pair<int, int>   pii;
typedef vector<int>     vi;
typedef vector<pii>     vpii;
typedef vector<vi>      vvi;
typedef map<int, int>    mii;
int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
// const int N = 3e5, M = N;
// vi g[N];
//=======================

void sol()
{
	int i, j, k, n, x, y, z, m, tc;
	string s;
	cin >> k;
	s = "ACL";
	fo(i, k)
	{
		cout << s;
	}
	cout << nn;
}

int32_t main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	sol();

	return 0;
}

int mpow(int base, int exp) {
	base %= mod;
	int result = 1;
	while (exp > 0) {
		if (exp & 1) result = (result * base) % mod;
		base = (base * base) % mod;
		exp >>= 1;
	}
	return result;
}

// void ipgraph(int n, int m){
//     int i, u, v;
//     while(m--){
//         cin>>u>>v;
//         g[u-1].pb(v-1);
//         g[v-1].pb(u-1);
//     }
// }
//
// void dfs(int u, int par){
//     for(int v:g[u]){
//         if (v == par) continue;
//         dfs(v, u);
//     }
// }


Measured memory_bytes: 3612
#include <stdio.h>

#define true 1
#define false 0

typedef int bool;

void swap(int *a, int *b) {
    int tmp = *a;
    *a = *b;
    *b = tmp;
}

int main(void) {

    int N; scanf("%d", &N);

    int a[N];
    for(int i = 0; i < N; i++) scanf("%d", &a[i]);

    int swp = 0;
    int tmp;
    bool fg = true;

    if(N >= 2) {
        
        while(fg) {

            for(int i = 1; i < N; i++) {
                if(a[i-1] > a[i]) {
                    swap(&a[i-1], &a[i]);
                    swp++;
                }

            }

            for(int i = 1; i < N; i++) {
                if(a[i-1] > a[i]) {
                    fg = true;
                    break;
                }else{
                    fg = false;
                }
            }


        }
    }


    for(int p = 0; p < N; p++) {
        if(p < N-1) {
            printf("%d ", a[p]);
        }else{
            printf("%d\n", a[p]);
        }
    }

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



    

    return 0;
}


Measured memory_bytes: 2104
#include <iostream>
#include <sstream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <cstring>
#include <bitset>
#include <functional>
#include <random>
#define REP(i,a,n) for(int i=a;i<=n;++i)
#define PER(i,a,n) for(int i=n;i>=a;--i)
#define hr putchar(10)
#define pb push_back
#define lc (o<<1)
#define rc (lc|1)
#define mid ((l+r)>>1)
#define ls lc,l,mid
#define rs rc,mid+1,r
#define x first
#define y second
#define io std::ios::sync_with_stdio(false)
#define endl '\n'
#define DB(a) ({REP(__i,1,n) cout<<a[__i]<<' ';hr;})
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int P = 1e9+7, INF = 0x3f3f3f3f;
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll qpow(ll a,ll n) {ll r=1%P;for (a%=P;n;a=a*a%P,n>>=1)if(n&1)r=r*a%P;return r;}
ll inv(ll x){return x<=1?1:inv(P%x)*(P-P/x)%P;}
inline int rd() {int x=0;char p=getchar();while(p<'0'||p>'9')p=getchar();while(p>='0'&&p<='9')x=x*10+p-'0',p=getchar();return x;}
//head



const int N = 1e6+50;
int n, l, q, x[N];
int f[21][N];

int main() {
	scanf("%d", &n);
	REP(i,1,n) scanf("%d",x+i);
	scanf("%d%d", &l, &q);
	int now = n;
	PER(i,1,n) { 
		while (x[now]-x[i]>l) --now;
		f[0][i] = now;
		REP(j,1,20) f[j][i]=f[j-1][f[j-1][i]];
	}
	REP(i,1,q) {
		int x, y;
		scanf("%d%d", &x, &y);
		if (x>y) swap(x,y);
		int ans = 0;
		PER(i,0,20) if (f[i][x]<y) {
			x = f[i][x];
			ans ^= 1<<i;
		}
		printf("%d\n", ans+1);
	}
}








Measured memory_bytes: 52480
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

N = int(readline())
AK = np.array(read().split(),np.int32)

A = AK[::2]; K = AK[1::2]

for _ in range(50000):
    q = A//K; r = A%K
    q += 1
    r += (-r)%q
    A -= r

A //= K #grundy
g = np.bitwise_xor.reduce(A)

answer = 'Takahashi' if g else 'Aoki'
print(answer)

Measured memory_bytes: 14440