akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define INF (1LL<<59)
#define MV 200001
#define LMV 21
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#define emp emplace
#define whoami(x) cerr<<#x<<" "<<x<<"\n";
#define mp make_pair
#define ins insert
#define sz size

void FLASH() {ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);}
void SETF() {cout.ios_base::setf(ios_base::fixed);}
void UNSETF() {cout.ios_base::unsetf(ios_base::fixed);}

typedef long long ll;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
typedef pair<PII, int> PPII;
typedef pair<PLL, ll> PPLL;
typedef map<int, int> MII;

const int MOD = 1000000007;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

struct h_llint {
  static uint64_t splitmix64(uint64_t x) {    // http://xorshift.di.unimi.it/splitmix64.c
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};

struct h_pair{
  size_t operator()(const PLL&x)const{
    return hash<ll>()(((ll)x.ff)^(((ll)x.ss)<<32));
  }
};

typedef map<ll, ll> MLL;
typedef map<PII, int> MPII;
typedef map<PLL, ll> MPLL;
typedef set<int> SI;
typedef set<ll> SL;
//ordered_set = order_of_key(.)
//ordered_set = find_by_order(.)
typedef ordered_set<int> OSI;
typedef ordered_set<ll> OSL;
typedef ordered_multiset<int> MOSI;
typedef ordered_multiset<ll> MOSL;
typedef unordered_map<ll, int, h_llint> UMLI;
typedef unordered_map<ll, ll, h_llint> UMLL;
typedef unordered_map<PLL, int, h_pair> UMPI;
typedef unordered_map<PLL, ll, h_pair> UMPL;

int ar[MV];
ll arr[MV];

void solve(int T)
{
	int n;
	cin>>n;
	bool ok = 0;
	while(n)
	{
		if((n % 10) == 7)
		ok = 1;
		n /= 10;	
	}
	if(ok)
	cout<<"Yes\n";
	else cout<<"No\n";
	return;	
}

int main(void)
{
	FLASH();
	int T;
	T = 1;

// #ifndef ONLINE_JUDGE
// 	time_t time_t1, time_t2;
// 	time_t1 = clock();
// #endif

	//cin>>T;
	while(T--)
	solve(T);

// #ifndef ONLINE_JUDGE
// 	time_t2 = clock();
// 	SETF();
// 	cout<<"Time taken: "<<setprecision(7)<<(time_t2 - time_t1)/(double)CLOCKS_PER_SEC<<"\n";
// 	UNSETF();
// #endif

	return 0;
}

Measured memory_bytes: 3640
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    sx,sy,tx,ty=map(int,input().split())
    ans=''
    ans+='R'*(tx-sx)+'U'*(ty-sy)
    ans+='L'*(tx-sx)+'D'*(ty-sy)
    ans+='D'+'R'*(tx-sx+1)+'U'*(ty-sy+1)+'L'
    ans+='U'+'L'*(tx-sx+1)+'D'*(ty-sy+1)+'R'
    print(ans)
    

if __name__ == '__main__':
    main()


Measured memory_bytes: 38384
#include <bits/stdc++.h>
using namespace std;
 
int main() {
    string a;
    cin >> a;
    if(a == "a"||a == "b"||a == "c"||a == "d"||a == "e"||a == "f"||a == "g"||a == "h"||a == "i"||a == "j"||a == "k"||a == "l"||a == "m"||a == "n"||a == "o"||a == "p"||a == "q"||a == "r"||a == "s"||a == "t"||a == "u"||a == "v"||a == "w"||a == "x"||a == "y"||a == "z"){
      cout << "a" << endl;
    }else{
     cout << "A" << endl; 
    }
}

Measured memory_bytes: 3624
N = int(input())
d = {}
for i in range(N):
    s = input()
    if s not in d:
        d[s] = 1
    else:
        d[s] += 1

list = sorted(d.values())
max_value = max(list)
sorted_list = sorted(d.items(), key=lambda x: x[0])

for i, j in sorted_list:
    if j == max_value:
        print(i)

Measured memory_bytes: 48092
#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <map>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
#include <vector>
//const int maxn = 1e5+5;
#define ll long long
#define MAX INT_MAX
#define FOR(i,a,b) for( int i = a;i <= b;++i)

using namespace std;
char c;

int main()
{
    cin>>c;
    if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
    {
        printf("vowel");
    }
    else
    {
        printf("consonant");
    }

}



Measured memory_bytes: 256
#include "stdio.h"

int main(void){
  int x,y,z,d,r;
  double f,a,b;
  scanf("%d %d", &x, &y);
  d = x / y;
  r = x % y;
  a = x;
  b = y;
  f = a / b;
  printf("%d %d %f\n", d,r,f);
}



Measured memory_bytes: 2108
#include <bits/stdc++.h>
#define mst(a,b) memset(a,b,sizeof(a))
#define ALL(x) x.begin(),x.end()
#define pii pair<int,int>
#define eps 1e-3
inline int lowbit(int x){ return x & -x; }
const int N = 2e6 + 10;
const int mod = (int) 1e9 +7;
const int INF = 0x3f3f3f3f;
const long long LINF = (1LL << 62);
typedef long long LL;
typedef unsigned long long ULL;
const double PI = acos(-1.0);
using namespace std;

char buf[100000],*p1=buf,*p2=buf;
inline char nc(){
  return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
inline bool read(int & x){
  char c=nc();x=0;
  if(c==EOF) return false;
  bool flag = false;
  for(;!isdigit(c);c=nc()) flag = true;
  for(;isdigit(c);x=x*10+c-'0',c=nc());
  if(flag) x *= -1;
  return true;
}
inline bool readL(LL & x){
  char c=nc();x=0;
  if(c==EOF) return false;
  bool flag = false;
  for(;!isdigit(c);c=nc()) flag = true;
  for(;isdigit(c);x=x*10+c-'0',c=nc());
  if(flag) x *= -1;
  return true;
}

int _x1, _x2, _y1, _y2;


int main(){
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
//    freopen("out.txt","w",stdout);
#endif
  scanf("%d%d%d%d", &_x1, &_y1, &_x2, &_y2);
  int X = _x2 - _x1;
  int Y = _y2 - _y1;
  printf("%d %d %d %d\n",_x2 - Y, _y2 + X, _x1 - Y, _y1 + X);
  return 0;
}


Measured memory_bytes: 256
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
import java.util.*;
public class Main {
	static class Pair{
    	public final int x,y;
    	Pair(int x,int y){this.x=x;this.y=y;}
    }
    public static void main(String[] $) {
        int n = sc.nextInt();
        int[] x=new int[n];
        int[] y=new int[n];
        for (int i = 0; i < n; i++) {
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        List<Pair> list=new ArrayList<>();
        for(int i=0;i<n;i++){
        	for(int j=0;j<n;j++){
            	if(i==j)continue;
              	list.add(new Pair(x[i]-x[j],y[i]-y[j]));
            }
        }
        int ans = n;
      	for(Pair pair:list){
          		int p=pair.x;
          		int q=pair.y;
                int t = 0;
                if (p == 0 && q == 0) continue;
                for (int i = 0; i < n; i++) {
                    for (int j = 0; j < n; j++) {
                        if(i==j)continue;
                        if (x[i] - x[j] == p && y[i] - y[j]== q) t++;
                    }
                }
                if(ans>n-t)ans=n-t;
          
        }
        out.println(ans);
        out.close();
    }

    static PrintWriter out = new PrintWriter(System.out);

    static class sc {
        static Scanner s = new Scanner(System.in);

        static String next() {
            return s.next();
        }

        static String nextLine() {
            return s.nextLine();
        }

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

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

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

        static boolean hasNext() {
            return s.hasNext();
        }

        static boolean hasNextInt() {
            return s.hasNextInt();
        }

    }

}


Measured memory_bytes: 24148
#include <bits/stdc++.h>
using namespace std;
int n,xmod;
int main() {
    cin >> n;
    if(n % 1000 == 0){
        cout << 0 << endl;
        return 0;
    }
    for(int i =0;i<100;i++){
        if(i * 1000 > n){
            cout << i * 1000 - n << endl;
            return 0;
        }
    }
    return 0;
}

Measured memory_bytes: 3620
#include <string>
#include <vector>
#include <map>
#include <set>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <list>

using namespace std;


int main(int argc, char * argv [] ) {
    int N = 0;
    cin >> N;

    vector<int> rabits(N + 1);
    for (int i = 1; i <= N; ++i) {
        cin >> rabits.at(i);
    }
    int cnt = 0;
    for (int i = 1; i <= N; ++i) {
        int love1 = rabits.at(i);
        if (love1 != -1) {
            int love2 = rabits.at(love1);
            if (love2 == i) {
                ++cnt;
                rabits.at(love1) = -1;
            }
            rabits.at(i) = -1;
        }
    }
    cout << cnt << endl;
	return 0;
}


Measured memory_bytes: 640
N,M=map(int,input().split())
AB=[[0,0] for i in range(M)]
for i in range(M):
    AB[i][0],AB[i][1]=map(int,input().split())
AB.sort(key=lambda x:x[0])
l=AB[0][0]
r=AB[0][1]
c=0
for i in range(1,M):
    if AB[i][0]<r:
        l=AB[i][0]
        if AB[i][1]<r:
            r=AB[i][1]
    else:
        c+=1
        l=AB[i][0]
        r=AB[i][1]
print(c+1)





Measured memory_bytes: 21292
#include<iostream>
#include<map>
#include<vector>
#include<algorithm>

using namespace std;

const int MAX = 1001;

typedef struct{
  int sum;
  int flg;
}Info;

Info data[MAX];
string in;
int name,day;
char trash;
vector<int> V;
map <int,int> M;

void convert(string str){
  int i = 0,rev = 1;
  name = day = 0;
  reverse(str.begin(),str.end());
  str += "\n";
  while(1){
    if(str[i] >= '0' && str[i] <= '9') day += (str[i]-'0')*rev;
    else break;
    rev *= 10;
    i++;
  }
  rev = 1;
  while(1){
    i++;
    if(str[i] >= '0' && str[i] <= '9') name += (str[i]-'0')*rev;
    else break;
    rev *= 10;
  }
}

int main(){

  while(getline(cin,in)){
    if(in == "")break;
    convert(in);
    data[name].flg = 1;
    data[name].sum++;
  }
  
  while(getline(cin,in)){
    convert(in);
    if(data[name].flg) data[name].flg = 2;
    data[name].sum++;
  }

  for(int i = 0; i < MAX; i++){
    if(data[i].flg == 2) cout << i << " " << data[i].sum << endl;
  }
  return 0;
}

Measured memory_bytes: 0
def main():
    from builtins import int, map, list, print, sorted
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    abc = sorted(input_number_list())
    print(abc[0] + abc[1] + abc[2] * 10)


if __name__ == '__main__':
    main()


Measured memory_bytes: 9112
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <map>
#define rep(i,n) for (int i=0; i<n;++i)
#define rep_down(i,n) for (int i=n-1; i>=0;--i)
#define ALL(a)  (a).begin(),(a).end()
typedef long long ll;
using namespace std;
const ll MOD = 1000000007LL;
const int INF = 1000000007;
int N;
map<ll, int> Mp;

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

  cin >> N;
  ll a;
  rep(i, N){
    cin >> a;
    Mp[a]++;
  }
  ll sm = 0ll;
  ll la = 0ll;
  ll ans = 0ll;
  for(auto p: Mp){
    if (p.second>=4){
        sm = p.first;
        la = p.first;
        ans=sm*la;
    } else if (p.second>=2){
      if (!la) la = p.first;
      else{
        sm = la;
        la = p.first;
        ans=sm*la;
      }
    }
  }


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

Measured memory_bytes: 6528
#include <bits/stdc++.h>
#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define in(x,y,h,w) x >= 0 && x < h && y >= 0 && y < w
using namespace std;

#define int long long
//typedef    long long          ll;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      P;
 
const int INF=1e+9;
const double EPS=1e-9;
const int MOD=1000000007;
 
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

int mod_inv(int X){
	int a = X, b = MOD, u = 1, v = 0;
	while(b) {
		int t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	if(u < 0) u += MOD;
	return u;
}

vector<int> fact,factinv;

void nCr_init(int N){
	N = min(N,(int)MOD);
	fact.resize(N + 1);
	factinv.resize(N + 1);
	fact[0] = 1;
	for(int i = 1;i <= N;i++) fact[i] = fact[i - 1] * i % MOD;
	factinv[N] = mod_inv(fact[N]);
	for(int i = N;i >= 1;i--) factinv[i - 1] = factinv[i] * i % MOD;
}

int nCr(int ncr_n,int ncr_r){
	if(ncr_n >= MOD) return nCr(ncr_n % MOD, ncr_r % MOD) * nCr(ncr_n / MOD, ncr_r / MOD) % MOD;
	return ncr_r > ncr_n ? 0 : fact[ncr_n] * factinv[ncr_n - ncr_r] % MOD * factinv[ncr_r] % MOD;
}

signed main(){
	int n,a[100010],cnt[100000] = {},x = -1,y;
	cin >> n;
	nCr_init(n + 1);
	for(int i = 0;i <= n;i++){
		cin >> a[i]; a[i]--;
		cnt[a[i]]++;
	}
	for(int i = 0;i <= n;i++){
		if(cnt[a[i]] == 2){
			if(x == -1) x = i;
			else y = i;
		}
	}
	for(int i = 1;i <= n + 1;i++){
		cout << (nCr(n + 1,i) + MOD - nCr(n - (y - x),i - 1)) % MOD << endl;
	}
	return 0;
}

Measured memory_bytes: 4352
A, B, K = map(int, input().split())
N = min(A, B)
list_gcd = [] 

for i in range(1, N+1):
  if A % i == 0 and B % i == 0:
    list_gcd.append(i)
    
if N == 1:
  Y = max(A,B)
  if Y == 1:
    list_gcd.append(1)
  else:
    for i in range(1, Y):
      if Y % i == 0:
        list_gcd.append(i)

print(list_gcd[-K])

Measured memory_bytes: 38420
def composite(d,n,s):
    for a in (2,3,5,7):
        p = False
        if pow(a,d,n) == 1:
            continue
        for i in range(s):
            if pow(a, 2**i * d, n) == n-1:
                p = True
                break
        if not p:
            return True
    return False
  
def is_prime(n):
    if n in (2,3,5,7):
        return True
    else:
        d,s = n-1, 0
        while not d%2:
            d,s = d>>1,s+1
        return not composite(d,n,s)
r = []
n = int(input())
for i in range(n):
  n = int(input())
  if is_prime(n):
    r.append(n)
  
print(len(r))

Measured memory_bytes: 7656
# abc087_b.py
a = int(input())
b = int(input())
c = int(input())
X = int(input())
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if X == i*500 + j*100 + k*50:
                ans += 1

print(ans)

Measured memory_bytes: 3060
#include<stdio.h>
#include<math.h>

int main(void){
    int i,j,n;
    double ans,x[1001],y[1001];

    scanf("%d",&n);
    for(i = 0;i < n;i++)
        scanf("%lf",&x[i]);

    for(i = 0;i < n;i++)
        scanf("%lf",&y[i]);

    ans = 0.0;
    for(i = 0;i < n;i++)
        ans += fabs(x[i] - y [i]);
    printf("%lf\n",ans);
    ans = 0.0;
    for(i = 0;i < n;i++)
        ans += (x[i] - y[i]) * (x[i] - y[i]);

    printf("%lf\n",sqrt(ans));
    ans = 0.0;
    for(i = 0;i < n;i++)
        ans += fabs(x[i] - y [i]) * fabs(x[i] - y [i]) * fabs(x[i] - y [i]);

    printf("%lf\n",pow(ans,1.0/3.0));

    ans = 0.0;
    for(i = 0;i < n;i++)
        if(ans < fabs(x[i] - y [i]))
            ans = fabs(x[i] - y [i]);

    printf("%lf\n",ans);
    return 0;

}

Measured memory_bytes: 704
n = int(input())
A = list(map(int, input().split()))

count = 0

def merge(A, left, mid, right):
    global count
    n1 = mid - left
    n2 = right - mid
    L = [0] * (n1 + 1)
    R = [0] * (n2 + 1)

    for i in range(n1):
        L[i] = A[left + i]
    for i in range(n2):
        R[i] = A[mid + i]
    L[n1] = 1.0e+9 + 1
    R[n2] = 1.0e+9 + 1
    i = 0
    j = 0
    for k in range(left, right):
        count += 1
        if L[i] <= R[j]:
            A[k] = L[i]
            i = i + 1
        else:
            A[k] = R[j]
            j = j + 1


def mergeSort(A, left, right):
    if left + 1 < right:
        mid = int((left + right) / 2)
        mergeSort(A, left, mid)
        mergeSort(A, mid, right)
        merge(A, left, mid, right)

mergeSort(A, 0, len(A))

print(" ".join(map(str, A)))
print(count)



Measured memory_bytes: 66540
import sys

sys.setrecursionlimit(10 ** 9)


# map(int, sys.stdin.read().split())


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


def main():
    mod = 10 ** 9 + 7
    H, W = map(int, input().split())
    A = [[] for _ in range(H)]
    for i in range(H):
        A[i] = list(input())

    dp = [[0] * W] * H
    for i in range(H):
        for j in range(W):
            if i == 0 and j == 0:
                dp[i][j] = 1
                continue
            if A[i][j] == "#":
                dp[i][j] = 0
                continue
            if i == 0:
                dp[i][j] = dp[i][j - 1]
            elif j == 0:
                dp[i][j] = dp[i - 1][j]
            else:
                dp[i][j] = (dp[i][j - 1] + dp[i - 1][j]) %mod

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

    pass


if __name__ == "__main__":
    main()


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

using namespace std;

#define mz 1000000007
#define pq priority_queue

int main()
{
    int n,a,b;
    scanf("%d%d%d",&n,&a,&b);
    if(abs(a-b)%2)
        printf("Borys\n");
    else
        printf("Alice\n");
    return 0;
}


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

int main() {
	int n, k;
	string s;
	char sm;
	cin >>n >> s >>k ;
	sm = s[k-1];
	for (int i = 0; i < n; i++) {
		if (s[i] != sm) {
			s[i] = '*';
		}
	}
	cout << s << endl;

	
	
}

Measured memory_bytes: 256
#![allow(unused_variables, dead_code, clippy::many_single_char_names, non_upper_case_globals, unused_imports, unused_macros)]
use std::{
    collections::{BTreeMap, HashSet, HashMap, VecDeque},
    io::{stdin, stdout, StdinLock, StdoutLock, BufReader, BufWriter, prelude::*},
    mem::swap,
    str::FromStr,
};

struct Reader<'a> {
    stdin: BufReader<StdinLock<'a>>
}

#[cfg(not(debug_assertions))]
macro_rules! yubi {
    () => { unsafe { std::hint::unreachable_unchecked() } }
}

#[cfg(debug_assertions)]
macro_rules! yubi {
    () => { panic!() }
}

impl<'a> Reader<'a> {
    fn new(stdin: BufReader<StdinLock<'a/*'*/>>) -> Self {
        Self {stdin}
    }
    fn read_str(&mut self) -> String {
        let mut s = String::with_capacity(100);
        self.stdin.read_line(&mut s).unwrap();

        if s.ends_with('\n') { s.pop(); if s.ends_with('\r') { s.pop(); } }
        s
    }
    fn read_int<T: FromStr>(&mut self) -> T {
        match self.read_str().parse::<T>() {
            Ok(n) => n,
            _ => yubi!()
        }
    }
    fn read_vec(&mut self) -> Vec<String> {
        let t = self.read_str();
        t.split(' ').map(|x| x.to_owned()).collect()
    }
    fn read_vec_int<T: FromStr>(&mut self) -> Vec<T> {
        let t = self.read_str();
        t.split(' ').map(|x| match x.parse::<T>() {Ok(n) => n, _ => yubi!()}).collect()
    }
}

macro_rules! pipe_read {
    ($r: expr, str, $($x: ident),+) => {
        let t = $r.read_str();
        let mut it = t.split(' ');
        $($x = it.next().unwrap();)+
    };
    ($r: expr, $t: ty, $($x: ident),+) => {
        let t = $r.read_str();
        let mut it = t.split(' ').map(|x| x.parse::<$t>().unwrap());
        $($x = it.next().unwrap();)+
    }
}

macro_rules! pipe {
    ($r: expr, str, $($x: ident),+) => {
        pipe_read!($r, str, $($x),+);
    };
    (declare $r: expr, str, $($x: ident),+) => {
        $(let $x: &str;)+
        pipe_read!($r, str, $($x),+);
    };
    ($r: expr, $t: ty, $($x: ident),+) => {
        pipe_read!($r, $t, $($x),+);
    };
    (declare $r: expr, $t: ty, $($x: ident),+) => {
        $(let $x: $t;)+
        pipe_read!($r, $t, $($x),+);
    };
}

const M: usize = 1_000_000;

fn main() {
    let stdin = stdin();
    let stdout = stdout();
    
    solve(&mut Reader::new(BufReader::with_capacity(M, stdin.lock())), &mut BufWriter::with_capacity(M, stdout.lock()));
}

fn solve(r: &mut Reader, w: &mut BufWriter<StdoutLock>) {
    let mut count = 0;
    for _ in 0..r.read_int() {
        pipe!(declare r, u8, a, b);

        if a == b {
            count += 1;
        } else {
            count = 0;
        }

        if count > 2 {
            writeln!(w, "Yes").unwrap();
            return;
        }
    }
    writeln!(w, "No").unwrap();
}


Measured memory_bytes: 2184
#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<cstdio>

using namespace std;
int a[100010];
int b[100010];
int times,dmg;
int main(){
    int n,hp;
    cin>>n>>hp;
    for(int i=0;i<n;i++){
        cin>>a[i]>>b[i];
    }
    sort(a,a+n);
    sort(b,b+n);
    for(int i=n-1;b[i]>a[n-1];i--){
        times++;
        dmg+=b[i];
        if(dmg>=hp){
            cout<<times<<endl;
            return 0;
        }
    }
    hp-=dmg;
    cout<<hp/a[n-1]+(hp%a[n-1]>0)+times<<endl;
    return 0;
}

Measured memory_bytes: 1024
#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <utility>
#define llint long long
#define inf 1e18
#define rep(x, s, t) for(llint (x) = (s); (x) < (t); (x)++)
#define Rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))

using namespace std;
typedef pair<llint, llint> P;

llint n;
llint x[55], y[55];
map<P, llint> mp;

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n;
	for(int i = 1; i <= n; i++) cin >> x[i] >> y[i];
	
	for(int i = 1; i <= n; i++){
		for(int j = 1; j <= n; j++){
			if(i == j) continue;
			mp[P(x[i]-x[j], y[i]-y[j])]++;
		}
	}
	
	llint ans = 0;
	for(auto it = mp.begin(); it != mp.end(); it++)
	{
		ans = max(ans, it->second);
	}
	ans = n - ans;
	cout << ans << endl;
	
	return 0;
}

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

typedef long long ll;
#define pii pair<int , int>
#define _FastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define MAXX 1005

int n , m , X , Y;
int x[MAXX];
int y[MAXX];

int main()
{
    _FastIO;
    int a , b;
    cin >> n >> m >> X >> Y;
    for(int i = 0; i < n; i++){
        cin >> x[i];
        if(i) a = max(a , x[i]);
        else    a = x[0];
    }
    for(int i = 0; i < m; i++){
        cin >> y[i];
        if(i)   b = min(b , y[i]);
        else    b = y[0];
    }
    int tp = max(X + 1 , a + 1);
    int yp = min(Y , b);
    if(tp > yp){
        cout << "War" << endl;
        return 0;
    }
    cout << "No War" << endl;
    return 0;
}


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

#define rep(i, n) for(int i=0; i < (n); ++i)
#define ll long long

const int mod = 1000000007;
//const int mod = 998244353;

struct mint {
    ll x; // typedef long long ll;
    mint(ll x=0):x((x%mod+mod)%mod){}
    mint operator-() const { return mint(-x);}
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod-a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
    mint operator+(const mint a) const { return mint(*this) += a;}
    mint operator-(const mint a) const { return mint(*this) -= a;}
    mint operator*(const mint a) const { return mint(*this) *= a;}
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const { return pow(mod-2);}
    mint& operator/=(const mint a) { return *this *= a.inv();}
    mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}


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

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

// combination mod prime
// https://www.youtube.com/watch?v=8uowVvQ_-Mo&feature=youtu.be&t=1619
struct combination {
    vector<mint> fact, ifact;
    combination(int n):fact(n+1),ifact(n+1) {
        assert(n < mod);
        fact[0] = 1;
        for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
        ifact[n] = fact[n].inv();
        for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
    }
    mint operator()(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n]*ifact[k]*ifact[n-k];
    }
};
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    string S; cin >> S;
    rep(i, S.size()) cout << 'x';
    cout << endl;
}


Measured memory_bytes: 384
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
from heapq import heapify, heappop, heappush
import math
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

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

S = input()
s_n = len(S)
T = input()
t_n = len(T)

ans = float('inf')
for i in range(s_n - t_n + 1):
    cnt = 0
    for j in range(t_n):
        if S[i + j] != T[j]:
            cnt += 1
    ans = min(ans, cnt)
print(ans)

Measured memory_bytes: 83616
#include <iostream>
#include <string>
#include <cmath>
#include <stdio.h>
using namespace std;

signed main() {
    double x1, x2, y1, y2;
    double p;
    cin >> x1 >> y1 >> x2 >> y2;
    
    p = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
    printf("%.10f\n", p);
    return 0;
}


Measured memory_bytes: 3284
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<utility>
#include<tuple>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>

using namespace std;

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

#define BIL ((ll)1e9)
#define MOD ((ll)1e9+7)
#define INF (1LL<<60)           //1LL<<63でオーバーフロー
#define inf (1<<29)             //1<<29でオーバーフロー

int main(int argc,char* argv[]){
    string s,t;
    cin >> s >> t;

    s += s;

    int count = 0;
    bool ans = false;
    for(int i=0;i<s.size();i++){
        if(s[i]==t[count]){
            count++;
        }else{
            count=0;
        }

        if(count==t.size()-1){
            ans = true;
        }
    }

    if(ans)cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}


Measured memory_bytes: 3596
B = 10**9 + 7
N, K = gets.chomp.split.map(&:to_i)
nums = (0..N).to_a

big = nums.slice((N-K+1)..N).sum
small = nums.slice(0..(K-1)).sum
diff = big - small + 1

((K+1)..(N+1)).each do |k|
  big += nums[-k]
  small += nums[k-1]
  diff += big - small + 1
  diff = diff.modulo(B)
end
puts diff


Measured memory_bytes: 16676
// E - Common Subsequence 500 youtube解説AC
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int mod = 1000000007;

struct mint {
    ll x;

    mint(ll x = 0) : x(x % mod) {}

    mint &operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }

    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }

    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }

    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }
};

mint dp0[2005][2005];
mint dp1[2005][2005];

int main() {
    int N, M;
    cin >> N >> M;
    vector<int> S(N + 1), T(M + 1);
    for (int i = 0; i < N; ++i) scanf("%d", &S[i]);
    for (int i = 0; i < M; ++i) scanf("%d", &T[i]);

    dp0[0][0] = 1;
    for (int i = 0; i < N + 1; ++i) {
        for (int j = 0; j < M + 1; ++j) {
            dp0[i + 1][j] += dp0[i][j];
            dp1[i][j] += dp0[i][j];
            dp1[i][j + 1] += dp1[i][j];
            if (S[i] == T[j]) {
                dp0[i + 1][j + 1] += dp1[i][j];
            }
        }
    }

    mint ans = dp1[N][M];
    cout << ans.x << endl;
    return 0;
}

Measured memory_bytes: 63104
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define IINF 100000000
#define INF 300000000000000000
#define MOD 1000000007
#define mod 1000000007
#define REP(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define REPE(i, a, n) for (ll i = a; i <= (ll)(n); i++)
#define rep(i,n)for (ll i = 0; i < (ll)(n); i++)
#define Endl endl
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<int,int>Pin;
typedef pair<ll,ll>Pll;
template<class T> using V=vector<T>;
long long GCD(long long a, long long b) {return b?GCD(b,a%b):a;}
long long LCM(long long a, long long b) {return a/GCD(a,b)*b;}
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int ddx[8]={-1,0,1,0,1,1,-1,-1};
int ddy[8]={0,-1,0,1,1,-1,1,-1};
ll cmp1(pair<ll,ll>a,pair<ll,ll> b){
        if(a.se!=b.se)
        return a.se<b.se;
        else
        return a.fi<b.fi;
}
//----------------------------------------------------------------------

//----------------------------------------------------------------------
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    //-------------------------------  
    //ll begin_time=clock();
    //-------------------------------
    /*int cnt=0;
    int t;cin>>t;
    while(t--){




        cout<<"Case #"<<++cnt<<": "<<ans<<endl;
    }*/

    ll a,b,c;cin>>a>>b>>c;
    if(a%2==0||b%2==0||c%2==0){
        cout<<0<<endl;
    }
    else
    cout<<mmin(a*b,mmin(a*c,b*c))<<endl;
    //-------------------------------  
    //ll end_time=clock();cout<<"time="<<end_time-begin_time<<"ms"<<endl;
    //-------------------------------
    return 0;
}
//----------------------------------------------------------------------

















































Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

int D[200001];
vector<int> E[200001];
void dfs(int A, int B) {
	if (D[A] == 0) {
		D[A] = B;
		for (int i : E[A]) {
			dfs(i, B + 1);
		}
	}
}


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


	int N;
	cin >> N;
	rep(i, N - 1) {
		int a, b;
		cin >> a >> b;
		E[a].pb(b);
		E[b].pb(a);
	}

	dfs(1, 1);

	int saidai = 0;
	int k;
	rep1(i, N) {
		if (saidai < D[i]) {
			saidai = D[i];
			k = i;
		}
	}
	rep1(i, N) D[i] = 0;

	dfs(k, 1);

	saidai = 0;
	rep1(i, N) {
		if (saidai < D[i]) {
			saidai = D[i];
		}
	}

	saidai++;

	if (saidai % 3 == 0) co("Second");
	else co("First");

	Would you please return 0;
}

Measured memory_bytes: 18176
#include <iostream>
#include <stdlib.h>
using namespace std;
#define MAX 100005
#define NIL -1

struct Node {int p, l, r;};

Node T[MAX];
int n, D[MAX];

void print(int u)
{
	int i, c;
	cout << "node " << u << ": ";
	cout << "parent = " << T[u].p << ", ";
	cout << "depth = " << D[u] << ", ";
	
	if(T[u].p == NIL) cout << "root, ";
	else if(T[u].l == NIL) cout << "leaf, ";
	else cout << "internal node, ";
	
	
	cout << "[";
	
	if(T[u].l != NIL)
	{
		cout << T[u].l;
		c = T[u].l;
		while(T[c].r != NIL)
		{
			cout << ", ";
			cout << T[c].r;
			c = T[c].r;
		}
	}
	
	cout << "]" << endl;
}

void rec(int u, int p)
{
	D[u] = p;
	if(T[u].r != NIL) rec(T[u].r, p);
	if(T[u].l != NIL) rec(T[u].l, p + 1); 
}


int main() {
	int i, j, v, d, t, c, root;
	cin >> n;
	for(i = 0; i < n; i++)
	{
		T[i].p = T[i].l = T[i].r = NIL;
	}
	
	for(i = 0; i < n; i++)
	{
		cin >> v >> d;
		for(j = 0; j < d; j++)
		{
			cin >> c;
			if(j == 0) T[v].l = c;
			else T[t].r = c;
			t = c;
			T[c].p = v; 
		}
	}
	
	for(i = 0; i < n; i++)
	{
		if(T[i].p == NIL) root = i;
	}
	
	rec(root, 0);
	
	for(i = 0; i < n; i++) print(i);
	
//	system("pause");
	return 0;
}


Measured memory_bytes: 7668
N = int(input())
a = list(map(int, input().split()))
odd = [i for i in a if i % 2 != 0]
even = [i for i in a if i % 2 == 0]
result = []
count = 0
while True:
  for i in even:
    if i != 0 and i % 2 == 0:
      result.append(i//2)
      count += 1
  if not result:
    print(count)
    exit()
  even = result
  result = []

Measured memory_bytes: 4212
#pragma GCC optimize ("O3")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int CM = 1 << 17, CL = 12;
char cn[CM + CL], * ci = cn + CM + CL, * owa = cn + CM, ct;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	int pn = 0;
	if (*ci == '-') {
		pn = 1;
		ci++;
	}
	//ll tmp = *(ll*)ci;
	//int dig = ((tmp & ma0) ^ ma0) ? 68 - __builtin_ctzll((tmp & ma0) ^ ma0) : 0;
	//tmp = tmp << dig & ma1;
	//tmp = tmp * 10 + (tmp >> 8) & ma2;
	//tmp = tmp * 100 + (tmp >> 16) & ma3;
	//tmp = tmp * 10000 + (tmp >> 32) & ma4;
	//ci += (64 - dig >> 3);
	int tmp = 0;
	while ((ct = *ci++) >= '0') tmp = tmp * 10 + ct - '0';
	if (pn) tmp = -tmp;
	return tmp;
}

ll A[200001];
void pakuri_sort(int N, ll A[]) {
	const int b = 8;
	ll tmp[200001];
	rep(k, 4) {
		int kazu[1 << b] = {}, kazu2[1 << b] = {};
		rep(i, N) kazu[A[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu[i + 1] += kazu[i];
		for (int i = N - 1; i >= 0; i--) tmp[--kazu[A[i] >> k * b & ((1 << b) - 1)]] = A[i];
		k++;
		rep(i, N) kazu2[tmp[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu2[i + 1] += kazu2[i];
		for (int i = N - 1; i >= 0; i--) A[--kazu2[tmp[i] >> k * b & ((1 << b) - 1)]] = tmp[i];
	}
}

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


	int N = getint();
	rep1(i, N) {
		A[i] = getint() + A[i - 1];
	}

	pakuri_sort(N + 1, A);

	ll kotae = 0;
	ll mae = 1e18;
	int kazu = 0;
	rep(i, N + 1) {
		if (mae != A[i]) {
			mae = A[i];
			kazu = 0;
		}
		kotae += kazu++;
	}

	printf("%lld\n", kotae);

	Would you please return 0;
}

Measured memory_bytes: 4804
#include <bits/stdc++.h>
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
using namespace std;

int a,b,c,d;

int main(){

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin>>a>>b>>c>>d;
    cout<<min(a,b)+min(c,d);


    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int>vec(n);
for(int i=0;i<n;i++){
cin >> vec.at(i);}
int cnt=0;
for(int i=1;i<n-1;i++){
if(vec.at(i)>vec.at(i-1) && vec.at(i)<vec.at(i+1)){
cnt++;}
else if(vec.at(i)<vec.at(i-1) && vec.at(i)>vec.at(i+1)){
cnt++;}
}
  cout << cnt <<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
using ld = long double;
template<typename T> using V = vector<T>;
template<typename T> using VV = vector<vector<T>>;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define all(v) (v).begin(),(v).end()
#define siz(v) (ll)(v).size()
#define rep(i,a,n) for(ll i=a;i<(ll)(n);i++)
#define repr(i,a,n) for(ll i=n-1;(ll)a<=i;i--)
#define lb lower_bound
#define ub upper_bound
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
const ll mod = 1000000007;
const ll INF = 1000000099;
const ll LINF = (ll)(1e18 +99);
vector<ll> dx={-1,1,0,0},dy={0,0,-1,1};
template<typename T,typename U> void chmin(T& t, const U& u){if(t>u)t=u;}
template<typename T,typename U> void chmax(T& t, const U& u){if(t<u)t=u;}
template<typename T>T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<typename T>T mpow(T a, T n) {
  T res = 1;
  for(;n;n>>=1) {
    if (n & 1) res = res * a;
    a = a * a;
  }
  return res;
}


signed main(){
  cin.tie(0);ios::sync_with_stdio(false);
  cout<<fixed<<setprecision(20);
  ll ans=0,n;cin>>n;
  vector<ll> l(n+1,0),r(n+1,0);
  rep(i,0,n){
    cin>>l[i]>>r[i];
  }
  sort(all(l));reverse(all(l));
  sort(all(r));

  rep(i,0,n+1){
      if(l[i]-r[i]<=0)break;
      ans+=2*(l[i]-r[i]);

  }
  cout<<ans<<endl;
}
//( ・ __ ・ ) KEEP BEING ORGANIZED
//CHECK overflow,vector_size,what to output?

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

ll a,b,c,n,m,q;
ll ans=100000000000;

string s;

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

  cin>>n>>m;
  vector<int> H(n);
  rep(i,n)cin>>H[i];
  vector<int> abL(n,0);  // 孤立
  vector<int> abH(n,0);  // 低い
  rep(i,m){
    cin>>a>>b;
    a--;
    b--;
    if(H[a]>H[b])abH[b]=1;
    else if(H[a]<H[b])abH[a]=1;
    else abH[b]=abH[a]=1;
    abL[a]=abL[b]=1;
  }
  //cout<<count(abL.begin(), abL.end(), 0)+count(abH.begin(), abH.end(), 0);
  ll ans=0;
  rep(i,n){
    if(abL[i]==0 || abH[i]==0)ans++;
  }
  cout<<ans;

  return 0;
}

Measured memory_bytes: 4520
#include <iostream>
#include<vector>

#include <algorithm>
using namespace std;

int main(){
int n;
int alice,bob,sum;
alice=0;
bob=0;
cin>>n;
vector<int> vec(n);  
  
for(int i=0;i<n;i++){
	cin>>vec.at(i);

}
sort(vec.begin(),vec.end());
reverse(vec.begin(),vec.end());
 
 
  
  
  
for(int i=0;i<vec.size();i++){
  if(i%2==0){
      alice+=vec.at(i);
      //cout<<vec.at(i)<<endl;
  }
  else {bob+=vec.at(i);
 // cout<<vec.at(i)<<endl;
  
  }
}
  //cout<<alice<<endl;
 //cout<<bob<<endl;
  
  sum=alice-bob;
  
  cout<<sum<<endl;
  
  
  
  
  return 0;
}


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

int main(){
    int N;
    cin >> N;
    int A[200][200];
    for (int i = 0; i < 2; i++){
        for (int j = 0; j < N; j++){
            cin >> A[i][j];
        }
    }
    int count[200] = {};

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

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
const ll INF = 1e18;

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

    ll int a,b;
    cin>>a>>b;
    ll int r=min(a,b),s=max(a,b);
    while(s!=0)
    {
    	cout<<r;
    	s--;
    }

}

Measured memory_bytes: 256
N,C=map(int,input().split())
D=[[int(x) for x in input().split()] for y in range(C)]
c=[[int(x)-1 for x in input().split()] for y in range(N)]

d=[[0 for x in range(C)] for y in range(3)]
for i in range(N):
  for j in range(N):
    d[(i+j)%3][c[i][j]] += 1

a=10**9
for c0 in range(C):
  for c1 in range(C):
    for c2 in range(C):
      if c0==c1 or c1==c2 or c0==c2:
        continue
      s=0
      for c in range(C):
        s += d[0][c]*D[c][c0]+d[1][c]*D[c][c1]+d[2][c]*D[c][c2]
      a=min(a,s)
print(a)


Measured memory_bytes: 5492
using ll=long long;using ull=unsigned long long;
#include<limits>
namespace pcl{template<typename T>constexpr T TNF=std::numeric_limits<T>::max()/2;constexpr int INF=TNF<int>;constexpr ll LNF=TNF<ll>;constexpr double DNF=TNF<double>;constexpr double EPS=1e-8;constexpr int P7=1'000'000'007;constexpr int DX[]={1,0,-1,0,1,1,-1,-1};constexpr int DY[]={0,1,0,-1,-1,1,1,-1};}
#include<algorithm>
#include<cmath>
#include<iostream>
namespace pcl{template<typename T>void updmax(T&a,T const&b){a=std::max(a,b);}template<typename T>void updmin(T&a,T const&b){a=std::min(a,b);}template<typename T,typename U,typename V>bool in_range(T const&begin,U const&mid,V const&end){return begin<=mid&&mid<end;}template<typename T,typename U,typename V>bool in_range(T const&begin,std::initializer_list<U>list,V const&end){auto p=std::minmax_element(list.begin(),list.end());return begin<=*p.first&&*p.second<end;}template<typename T,typename U,typename V>bool in_range_strict(T const&begin,std::initializer_list<U>list,V const&end){if(!std::is_sorted(list.begin(),list.end()))return false;return in_range(begin,list,end);}template<typename T>inline T cget(){T x;std::cin>>x;return x;}}
#include<iostream>
#include<vector>
namespace pcl{template<typename T>std::ostream&operator<<(std::ostream&os,std::vector<T>const&v){os<<'[';for(size_t i=0;i<v.size();i++){if(i!=0)os<<",";os<<v[i];}os<<']';return os;}template<typename T>std::istream&operator>>(std::istream&is,std::vector<T>&v){for(size_t i=0;i<v.size();i++)is>>v[i];return is;}}
#include<bits/stdc++.h>
using namespace std;using namespace pcl;int main(){string S;cin>>S;int res=INF;for(int s=0;s<2;s++){int c=s;int cnt=0;for(int i=0;i<(int)S.size();i++){if(S[i]!=c+'0')cnt++;c=!c;}updmin(res,cnt);}cout<<res<<endl;}


Measured memory_bytes: 512
#include <stdio.h>

int main(void){
  int i;
  int N;
  int L[100];
  int Lmax=0;
  int Lsum=0;
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d",&L[i]);
    if(Lmax<=L[i]){
      Lmax = L[i];
    }
    Lsum = Lsum + L[i];
  }
  Lsum = Lsum-Lmax;
  if(Lmax>=Lsum){
    printf("No\n");
  }else{
    printf("Yes\n");
  }

  return 0;
}




Measured memory_bytes: 256
import sys
n,m = map(int,input().split())
line = []
for _ in range(n):
    data = [int(i) for i in sys.stdin.readline().strip().split(" ")]
    line.append(data)
b = []
for _ in range(m):
    data = int(sys.stdin.readline().strip())
    b.append(data)

a = []
for i in range(n):
    result = 0
    for j in range(m):
        result += line[i][j] * b[j]
    print(result)


Measured memory_bytes: 6012
#include <bits/stdc++.h>
using namespace std;
const int N=200000+10;
const int INF=10000000;
int p1[N],p2[N];
map<pair<int,int>,int>m;
int find(int x,int *p)
{
    return p[x]==x?p[x]:p[x]=find(p[x],p);
}
void cha(int x,int y,int *p)
{
    int px=find(x,p);
    int py=find(y,p);
    if(px!=py)
    {
        p[px]=py;
    }
}
int main()
{
    int n,k,l;
    cin>>n>>k>>l;
    for(int i=1;i<=n;i++)
        p1[i]=i,p2[i]=i;
    for(int i=1;i<=k;i++)
    {
        int x,y;
        scanf("%d%d,",&x,&y);
        cha(x,y,p1);
    }
    for(int i=1;i<=l;i++)
    {
        int x,y;
        scanf("%d%d,",&x,&y);
        cha(x,y,p2);
    }
    for(int i=1;i<=n;i++)
    {
        find(i,p1);
        find(i,p2);
    }
    for(int i=1;i<=n;i++)
        m[make_pair(p1[i],p2[i])]++;
    for(int i=1;i<=n;i++)
        printf("%d ",m[make_pair(p1[i],p2[i])]);
    putchar('\n');
    return 0;
}

Measured memory_bytes: 13568
N, T = list(map(int, input().split()))
t_list = list(map(int, input().split()))
sum_time = 0
for i in range(1, N):
    t_delta = t_list[i] - t_list[i-1]
    if t_delta > T:
        sum_time += T
    else:
        sum_time += t_delta

sum_time += T

print(sum_time)



Measured memory_bytes: 25200
#include <stdio.h>
#include <stdlib.h>

int main (void)
{
  int N, i;
  unsigned long A;
  char *IND;
    
  scanf("%d", &N);
  
  IND = (char *)calloc(1000000000, sizeof(char));
  
  for (i = 0; i < N; i++) {
    scanf("%lu", &A);
    
    IND[A]++;
    
    if (IND[A] > 1) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  
  return 0;
  
}

Measured memory_bytes: 976768
#include <bits/stdc++.h>
using namespace std;
#define ll          long long
#define mp	    make_pair
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define x           first
#define y           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define MOD        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define gcd(a,b)    __gcd((a),(b))
#define lcm(a,b)    ((a)*(b)) / gcd((a),(b))
#define rep(i,a,b)  for(int i=a;i<b;i++)
ll mult(ll a,ll b, ll p=MOD){return ((a%p)*(b%p))%p;}
ll multbig(ll a,ll b,ll mod){
    if(a==0 or b==0) return 0;
    if(a==1 or b==1) return (a*b)%mod;
    ll cur=multbig(a,b/2,mod);
    cur=(2*cur)%mod;
    if(b%2) cur=(cur+a)%mod;
    return cur;
}
ll add(ll a, ll b, ll p=MOD){return (a%p + b%p)%p;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1LL) {if (k & 1LL) r = mult(r,n,p); n = mult(n,n,p);} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll inv_euclid(ll a, ll m = MOD){ll m0 = m;ll y = 0, x = 1;if (m == 1)return 0;while (a > 1){ll q = a / m;ll t = m;m = a % m, a = t;t = y;y = x - q * y;x = t;}if (x < 0)x += m0;return x;}
void solve(){
	int n, s= 0;
	cin>>n;
	set<int>ss;
	while(n!=0){
		int k=n%10;
		n/=10;
		s+=k;
		ss.insert(k);
	}
	if(sz(ss) == 2 && ss.find(0) != ss.end() && ss.find(1) != ss.end()) cout <<10<<endl;
	else cout<<s<<endl;
}
	
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
  t =1;
//     cin>>t;
    while(t--){
        solve();
    }
    return 0;
}


Measured memory_bytes: 256
use std::io::*;
use std::str::*;

fn read<T: FromStr>(s: &mut StdinLock) -> Option<T> {
    let s = s.by_ref().bytes().map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok()
}

fn main() {
    let s = stdin();
    let mut s = s.lock();
    let s = &mut s;

    let t = read::<String>(s).unwrap();
	let mut p = 0 as usize;
	
	for c in t.bytes() {
		p += (c - 48) as usize;
	}
	println!("{}", if p % 9 == 0 { "Yes"} else { "No" });
}


Measured memory_bytes: 2368