akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>

using namespace std;
typedef long long i64;
typedef long double ld;
typedef pair<int, int> P;
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); ++(i))
/* include file*/
#include <functional>
#include <vector>
using namespace std;

struct Segment {
  vector<int> node;
  int ide = 1e9;
  int n = 1;

  int bin_f(int a,int b){return min(a,b);}
  int update_f(int node,int x){
    return x;
  }

  Segment()
  {
    int sz = 101010;
    while (n < sz)
      n *= 2;
    node.assign(n * 2 - 1, ide);
  }

  void update(int i, int x) {
    i += n - 1;
    node[i] = update_f(node[i], x);
    while (i) {
      i = (i - 1) / 2;
      node[i] = bin_f(node[i * 2 + 1], node[i * 2 + 2]);
    }
  }

  int get_inter(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0)
      r = n;
    if (a <= l && r <= b)
      return node[k];
    if (r <= a || b <= l)
      return ide;

    int lm = get_inter(a, b, k * 2 + 1, l, (l + r) / 2);
    int rm = get_inter(a, b, k * 2 + 2, (l + r) / 2, r);
    return bin_f(lm, rm);
  }
};
int n;
int p[202020];

int idx[202020];
vector<Segment> segs(2);

using P2 = pair<P,P>;
using P3 = pair<int,P2>;


P3 getp(int l ,int r){
  int i = idx[segs[l % 2].get_inter(l / 2,r / 2)];
  int j = idx[segs[(l + 1) % 2].get_inter((i + 1) / 2,(r + 1) / 2)];
  return {p[i],{{i,j},{l,r}}};
}
int main() {
  cin >> n;
  rep(i, 0, n - 1) {
     cin >> p[i]; 
     idx[p[i]] = i;
     segs[i % 2].update(i/ 2,p[i]);
  }
  priority_queue<P3,vector<P3>,greater<P3>> que;
  que.push(getp(0,n));
  while(!que.empty()){
    auto p = que.top().second;
    que.pop();

    int i = p.first.first;
    int j= p.first.second;
    int l = p.second.first;
    int r= p.second.second;

    cout << ::p[i] << " " << ::p[j] << " ";

    if(l < i)
      que.push(getp(l,i));
    if(i + 1 < j){
      que.push(getp(i + 1,j));
    }
    if(j + 1 < r){
      que.push(getp(j + 1,r));
    }
  }

  cout << endl;
}


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

#define ll long long

using namespace std;

int main() {
    string s;
    cin >> s;
    bool flag = false;
    for(int i = 0;i < s.size();i++){
        if(s[i] == 'C'){
            flag = true;
        }

        if(flag && s[i] == 'F'){
            cout <<  "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;

	return 0;
}        


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

int main(){
    int N ,T;
    int ans = 100000000;
    cin >> N >> T;
    vector<int> c(N);
    vector<int> t(N);
    for(int i = 0; i < N; i++)cin >> c[i] >> t[i];
    for(int i = 0; i < N; i++){
        if(t[i] <= T ){
           ans = min(ans,c[i] );
        }
    }
    if(ans == 100000000){
        cout << "TLE" << endl;
    }
    else cout << ans << endl;
}


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

int main()
{
    ll N;
    cin >> N;
    vector<ll> X(N);
    rep(i, N){
        cin >> X[i];
    }
    vector<ll> X_(X);
    sort(X.begin(), X.end());

    rep(i, N){
        ll ans = 0;
        if (X_[i] <= X[N/2-1]){
            ans = X[N/2];
        }else{
            ans = X[N/2-1];
        }
        cout << ans << endl;
    }

    return 0;
}


Measured memory_bytes: 6228
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define pi acos(-1)
#define mod 1000000007
#define all(x) x.begin(), x.end()
using namespace std;

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

    int tc = 1;
    //cin >>  tc;
    while(tc--){
        int n;
        cin >> n;
        set<int> s;
        map<int, int> mp;
        ll sum = 0;
        for(int i = 0; i < n; i++){
            int x;
            cin >> x;
            s.insert(x);
            mp[x]++;
            sum += x;
        }
        int q;
        cin >> q;
        while(q--){
            int b, c;
            cin >> b  >> c;
            ll cnt = mp[b];
            mp[c] += mp[b];
            mp[b] = 0;
            sum -= cnt * b;
            sum += cnt * c;
            cout << sum << endl;
        }
    }
}



Measured memory_bytes: 11072
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define speed ios_base::sync_with_stdio(0); cin.tie(0);
#define FL(i,a,n) for(ll i=a;i<n;i++)
#define even(x) (((x)%(2))==(0))
#define odd(x) (((x)%(2))==(1))
#define meme(x) memset(x, 0, sizeof(x))
#define mod 1000000007

#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define Pi 3.14159265


int main() {
    
    string s;int k;
    cin>>k;cin>>s;
    if(s.length()<=k)cout<<s;
    else
    {
    	for(int i=0;i<k;i++)
    	{
    		cout<<s[i];
		}
		cout<<"...";
	}
    
	return 0;
}

Measured memory_bytes: 3628
#include<bits/stdc++.h>
using namespace std;
long long a[100010];
int main(){
	int n;
	cin>>n;
	long long cnt=0;
	long long res=1e10;
	bool flag=false;
	int ans=0;
	for(int i=0;i<n;i++){
		cin>>a[i];
		if(a[i]<0)ans++;
		cnt=cnt+abs(a[i]);
		res=min(res,abs(a[i]));
		if(a[i]==0)flag=true;
	}
	if(flag||ans%2==0){
		cout<<cnt<<endl;
		return 0;
	}
	else if(!flag){
		cout<<cnt-res*2<<endl;
		return 0;
	}
	return 0;
}

Measured memory_bytes: 1024
n,k = map(int, input().split())
ps = list(map(int, input().split()))

tmp = sum(ps[:k])
max_ps = tmp
start = 0

for i in range(1,n-k+1):
    tmp = tmp-ps[i-1]+ps[i+k-1]
    if tmp >= max_ps:
        max_ps = tmp
        start = i

print(sum([(i*(i+1))/ (2*i) for i in ps[start:start+k]]))

Measured memory_bytes: 24812
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class AtCoderA
{
    static void Main()
    {
        var sc = new Scanner();

        int x1 = sc.NextInt();
        int y1 = sc.NextInt();
        int x2 = sc.NextInt();
        int y2 = sc.NextInt();

        int x3 = x2 - (y2 - y1);
        int y3 = y2 + (x2 - x1);

        int x4 = x3 - (x2 - x1);
        int y4 = y3 - (y2 - y1);

        string answer = x3 + " " + y3 + " " + x4 + " " + y4;

        Console.WriteLine(answer);
    }

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            while (_index >= _line.Length)
            {
                _line = Console.ReadLine().Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            _line = Console.ReadLine().Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}

Measured memory_bytes: 11220
#include <bits/stdc++.h>
#define REP(i, m, n) for(int (i) = (m); (i) < (n); ++i)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
using namespace std;
using Graph = vector<vector<int>>;
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; }
typedef long long ll;
typedef pair<ll, ll> P;
const int INF = 1e9+7;
const ll LINF = 1LL<<60;

int main()
{
    cin.tie(0);
    ios_base::sync_with_stdio(0);
    int n;
    cin >> n;
    vector<int> d(n, 0);

    rep(i, n - 1) {
        int a;
        cin >> a;
        --a;
        d[a]++;
    }

    rep(i, n) {
        cout << d[i] << endl;
    }


    return 0;
}

Measured memory_bytes: 3988
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <queue>
//#include <boost/foreach.hpp>
using namespace std;
int main(){
    int n;
    cin >> n;
    vector<int> vec(2*n);
    for(int i=0;i<2*n;i++){
        cin>>vec[i];
    }
  //  cout<<vec[3]<<endl;
    sort(vec.begin(),vec.end());
   // cout<<vec[1]<<endl;
    int c=0;
    for(int i=0;i<n;i++){
        c += vec[i*2];
      //  cout<<vec[i*2]<<endl;
    }
    cout<<c<<endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

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

int main(){
	int N;
	char fld[255][255];
	while(cin>>N,N){
		for(int i=0;i<N;i++)for(int j=0;j<N;j++) scanf(" %c",&fld[i][j]);
		int ans = 0;
		for(int i=0;i<N;i++){
			for(int j=0;j<N;j++){
				for(int d=0;d<8;d++){
					int t = 0;
					for(;;t++){
						int ny = i+dy[d]*t, nx = j+dx[d]*t;
						if(ny<0 || N<=ny || nx<0 || N<=nx || fld[ny][nx]=='0') break;
					}
					ans = max(ans,t);
				}
			}
		}
		printf("%d\n",ans);
	}
	return 0;
}

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

int main(void){
    int n, ac=0, wa=0, tle=0, re=0;
    cin >> n;
    vector<string> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    for(string s : a){
        if(s == "AC") ac++;
        else if(s == "WA") wa++;
        else if(s == "TLE") tle++;
        else if(s == "RE") re++;
    }
    cout << "AC x " << ac << endl;
    cout << "WA x " << wa << endl;
    cout << "TLE x " << tle << endl;
    cout << "RE x " << re << endl; 
    
    return 0;
}

Measured memory_bytes: 6424
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int a, b;
        a = in.nextInt();
        b = in.nextInt();

        int res = 0, sum = 1;

        while (sum < b){
            sum--;
            sum = sum + a;
            res++;
        }

        out.println(res);
        out.close();

    }




    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}


Measured memory_bytes: 22996
#include <stdio.h>

int main(void) {
    
    char char_input[4];

    scanf("%s", &char_input);

    if (char_input[0] == char_input[1] && char_input[1] == char_input[2] && char_input[0] == char_input[2])
    {
        printf("No");
    } else
    {
        printf("Yes");
    }
    
}

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

int main(){
	string N;
  cin >> N;
  
  int s = N.size() - 1;
  
  if(N.at(s) == '3') cout << "bon" << endl;
  else if(N.at(s) == '0'|| N.at(s) == '1'|| N.at(s) == '6' || N.at(s) == '8') cout << "pon"<< endl;
  else cout << "hon" << endl;
  
}

Measured memory_bytes: 3628
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

void sieve(int n, vector<int> &primes)
{
    vector<bool> v(n / 2 + 1, true);

    // check
    for (int i = 3, end = sqrt(n); i <= end; i += 2) {
        if (!v[i / 2])
            continue;
        for (int j = i * i / 2; j <= n / 2; j += i)
            v[j] = false;
    }

    primes.push_back(2);
    for (int i = 3; i <= n; i += 2)
         if (v[i / 2])
            primes.push_back(i);
}

int main()
{
    vector<int> primes;
    vector<int> inputs;
    int n;
    int count = 0;

    cin >> n;
    for (int x; n-- && cin >> x;)
        inputs.push_back(x);

    sieve(*max_element(inputs.begin(), inputs.end()), primes);

    for (int x: inputs)
        if (binary_search(primes.begin(), primes.end(), x))
            count++;

    cout << count << endl;

    return 0;
}

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

int f[200005];

int main()
{
	int n;
	cin>>n;
	int k=1;
	int t=0;
	for(int i=1;i<=n;i++)
	{
		cin>>f[i];
	}
	for(int i=1;i<=n;i++)
	{
		if(f[i]==k)
		{
			t++;
			k++;
		}
	}
	if(t) cout<<n-t;
	else cout<<"-1";
	
	return 0;
}

Measured memory_bytes: 1024
#include <array>
#include <deque>
#include <forward_list>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <iterator>
#include <algorithm>
#include <cfenv>
#include <random>
#include <numeric>
#include <cmath>
#include <iosfwd>
#include <iostream>
#include <ios>
#include <streambuf>
#include <istream>
#include <ostream>
#include <iomanip>
#include <sstream>
#include <fstream>

typedef long long ll;

using namespace std;

ll euc(ll a, ll b){
    ll n = a;  
    ll m = b;
    if(n > m){
        ll tmp = m;
        m = n;
        n = tmp;
    }
    while(n != 0){
        ll tmp = n;
        n = m % n;
        m = tmp;
    }
    return m;
}


int main(){
    ll n;
    ll sum=0;
    cin >> n;
    for(ll i = 1 ; i <= n ; i++){
        for(ll j = 1 ; j <= n ; j++){
            for(ll k = 1 ; k <= n ; k++){
                sum += euc(euc(i,j),k);
            }
        }
    }
    cout << sum;
    return 0;
}

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

int main() {
    int s_num, t_num;
    string S, T, U;
    cin >> S >> T;
    cin >> s_num >> t_num;
    cin >> U;

    if (S==U){
        s_num --;
    }else{
        t_num--;
    }
    cout << s_num << ' ' << t_num << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FIN ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
 
typedef long long ll;
 
int main() {FIN
      			
	ll n, a, b, d;
	cin >> n >> a >> b;
	d = (n / (a + b));
	d = (d * a) + (min(a, n % (a + b)));
	cout << d << "\n";
	return 0; 
}


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

int main()
{
  int m, f, r;
  while (true) {
    cin >> m >> f >> r;
    if (m == -1 && f == -1 && r == -1) return 0;

    //中間、期末いずれかを欠席したらF
    if (m == -1 || f == -1) {
      cout << 'F' << endl;
    } else if (m + f >= 80) {
      cout << 'A' << endl;
    } else if (m + f >= 65) {
      cout << 'B' << endl;
    } else if (m + f >= 50) {
      cout << 'C' << endl;
    } else if (m + f >= 30 && r >= 50) {
      cout << 'C' << endl;
    } else if (m + f >= 30) {
      cout << 'D' << endl;
    } else {
      cout << 'F' << endl;
    }

  }
  return 0;
}


Measured memory_bytes: 3072
#include<iostream>

using namespace std;

const int INF = 1000000000;

int N;
char A[555][555];
int row_count[555], col_count[555];

int main(){
	cin>>N;
	for(int i=0;i<N;i++)cin>>A[i];
	for(int i=0;i<N;i++){
		row_count[i] = 0;
		for(int j=0;j<N;j++)row_count[i] += (A[i][j]=='#');
	}
	for(int j=0;j<N;j++){
		col_count[j] = 0;
		for(int i=0;i<N;i++)col_count[j] += (A[i][j]=='#');
	}
	int full_col = 0;
	bool valid = false;
	for(int j=0;j<N;j++){
		if(col_count[j]==N)full_col++;
		if(col_count[j] > 0)valid = true;
	}
	if(not valid){
		cout<<-1<<endl;
		return 0;
	}
	if(full_col==N){
		cout<<0<<endl;
		return 0;
	}
	int ans = INF;
	for(int i=0;i<N;i++){
		int a = 0;
		if(col_count[i] == 0)a++;
		a += min(ans,N-full_col+N-row_count[i]);
		ans = min(ans, a);
	}
	cout<<ans<<endl;
	return 0;
}



Measured memory_bytes: 512
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define pi pair<int,int>
#define endl "\n"
using namespace std;
int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	double n;
	cin>>n;
	double res= 2*acos(-1)*n;
	cout<<res;
}


Measured memory_bytes: 3828
package main

import "fmt"

func main() {
	var S, T string
	fmt.Scan(&S)
	fmt.Scan(&T)
	if len(S)+1 == len(T) && S == T[:len(T)-1] {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


Measured memory_bytes: 1756
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<vector>
#include<queue>
#include<map>
#include<iomanip>
#include<set>
#include<assert.h>
#define rep(index,num) for(int index=0;index<num;index++)
#define rep1(index,num) for(int index=1;index<=num;index++)
#define brep(index,num) for(int index=num-1;index>=0;index--)
#define brep1(index,num) for(int index=num;index>0;index--)
#define scan(argument) cin>>argument
#define prin(argument) cout<<argument<<endl
#define kaigyo cout<<endl
#define eps 1e-7
#define mp(a1,a2) make_pair(a1,a2)
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef long long ll;
typedef long double ld;
using namespace std;
typedef pair<ll,ll> pll;
typedef pair<int,int> pint;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<pint> vpint;
typedef vector<pll> vpll;
ll INFl=1e+18+1;
int INF=1e+9+1;
int main(){
	int N;
	ll A[100001];
	ll Axor=0;
	scan(N);
	rep(i,N){
		scan(A[i]);
		Axor^=A[i];
	}
	rep(i,N) A[i] &= ~Axor;
	ll rank=0;
	int top[100001]={};
	brep(j,61){
		int i=rank;
		int flag=0;
		for(;i<N;i++){
			if((A[i]>>j)&1){
				swap(A[i],A[rank]);
				flag=1;
				break;
			}
		}
		if(flag==0) continue;
		top[rank]=j;
		rep(k,N){
			if(rank==k) continue;
			if((A[k]>>j)&1){
				A[k]^=A[rank];
			}
		}
		rank++;
	}
	ll x=0;
	brep(j,61){
		ll nx=x|(1LL<<j);
		ll b=nx;
		rep(i,rank){
			if(b>>top[i]&1) b^=A[i];
		}
		if((b&nx)==0){
			x=nx;
		}
	}
	ll ans=Axor+x*2;
	prin(ans);
	return 0;
}


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

typedef long long ll;

#define int ll
#define all(v) v.begin(), v.end()
#define reps(__i, a, b) for (int __i = a; i < b; i++)
#define rep(__i, n) reps(__i, 0, n)

const ll INF = (1ll << 60);
const ll MOD = (ll)1e9 + 7;

int n;
double dp[310][310][310]; // dp[i][j][k] ... 1個の皿i枚,2個の皿j枚,3個の皿k枚となる操作回数の期待値

void init()
{
    for (int i = 0; i < 310; i++)
        for (int j = 0; j < 310; j++)
            for (int k = 0; k < 310; k++)
                dp[i][j][k] = -1;
}

double rec(int one, int two, int three)
{
    if (dp[one][two][three] >= 0)
        return dp[one][two][three];
    if (one == 0 && two == 0 && three == 0)
        return 0.;

    double ret = 0.;
    {
        if (one > 0)
            ret += rec(one - 1, two, three) * one;
        if (two > 0)
            ret += rec(one + 1, two - 1, three) * two;
        if (three > 0)
            ret += rec(one, two + 1, three - 1) * three;

        ret += n;
        ret *= 1. / (one + two + three);
    }
    return dp[one][two][three] = ret;
}

signed main()
{
    map<int, int> m;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        int tmp;
        cin >> tmp;
        m[tmp]++;
    }
    init();
    // cout << m[1] << "," << m[2] << "," << m[3] << endl;
    double ret = rec(m[1], m[2], m[3]);
    printf("%.15f\n", ret);
}

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

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

  if ( A + B > C + D ) {
    cout << "Left" << endl; 
  }
  else if ( A + B < C + D) {
    cout << "Right" << endl;
  }
  else {
      cout << "Balanced" << endl; 
  }
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#ifdef ENABLE_DEBUG
#define dump(a) cerr<<#a<<"="<<a<<endl
#define dumparr(a,n) cerr<<#a<<"["<<n<<"]="<<a[n]<<endl
#else
#define dump(a) 
#define dumparr(a,n) 
#endif
#define FOR(i, a, b) for(ll i = (ll)a;i < (ll)b;i++)
#define For(i, a) FOR(i, 0, a)
#define REV(i, a, b) for(ll i = (ll)b-1LL;i >= (ll)a;i--)
#define Rev(i, a) REV(i, 0, a)
#define REP(a) For(i, a)
#define SIGN(a) (a==0?0:(a>0?1:-1))

typedef long long int ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef pair<ll, ll> pll;
typedef pair<ll,pll> ppll;
typedef vector<ll> vll;
typedef long double ld;
typedef pair<ld,ld> pdd;

const ll INF=(1LL<<60);
#if __cplusplus<201700L
ll gcd(ll a, ll b) {
  a=abs(a);
  b=abs(b);
  if(a==0)return b;
  if(b==0)return a;
  if(a < b) return gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
#endif
template<class T>
bool chmax(T& a,const T& b){
  if(a<b){
    a=b;
    return true;
  }
  return false;
}
template<class T>
bool chmin(T& a,const T& b){
  if(a>b){
    a=b;
    return true;
  }
  return false;
}
template<class S,class T>
std::ostream& operator<<(std::ostream& os,pair<S,T> a){
  os << "(" << a.first << "," << a.second << ")";
  return os;
}
template<class T>
std::ostream& operator<<(std::ostream& os,vector<T> a){
  os << "[ ";
  REP(a.size()){
    os<< a[i] << " ";
  }
  os<< " ]";
  return os;
}

const string YES = "Yes";
const string NO = "No";

void solve(long long X, long long Y){
  if((Y-2*X)>=0&&(4*X-Y)>=0&&(Y-2*X)%2==0&&(4*X-Y)%2==0){
    cout<<YES<<endl;
  }
  else cout<<NO<<endl;
}

int main(){
  cout<<setprecision(1000);
    long long X;
    scanf("%lld",&X);
    long long Y;
    scanf("%lld",&Y);
    solve(X, Y);
    return 0;
}


Measured memory_bytes: 3676
#include <iostream>
#include <string> 
using namespace std;
int main(void) {
    string x,xx;
    cin >> x;
    xx = x[0];
    xx += x[0];
    xx+= x[0];
    if(x == xx) { 
        cout<<x;
        return 0;
    }
    else { 
        int y,yy;
        y = atoi(x.c_str());
        yy = atoi(xx.c_str());
        if(y - yy < 0) cout<<xx;
        else cout<<yy+111;
    }
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define EPS 1e-10
#define setNil(x) memset((x),0,sizeof(x))
#define setINF(x) memset((x),63,sizeof(x))
#define setNegINF(x) memset((x),192,sizeof(x)) //NegINF=-INF-1
#define setNeg1(x) memset((x),255,sizeof(x))
#define PB push_back
using namespace std;
typedef long long ll;
typedef pair<ll,int> pii;
const int N=100005;
int n,m,s,t;
ll dy[N],dz[N];
vector<int> g[N],y[N],z[N];
ll ans[N];
priority_queue<pii,vector<pii>,greater<pii> > q;
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>n>>m>>s>>t;
	for(int i=0;i<m;i++){
		int u,v,cy,cz;
		cin>>u>>v>>cy>>cz;
		g[u].PB(v);g[v].PB(u);
		y[u].PB(cy);y[v].PB(cy);
		z[u].PB(cz);z[v].PB(cz);
	}
	fill(dy+1,dy+n+1,1e15);
	dy[s]=0;
	q.push(pii(0,s));
	while(!q.empty()){
		int u=q.top().second,cost=q.top().first;
		q.pop();
		if(dy[u]<cost)continue;
		for(int i=0;i<g[u].size();i++){
			int v=g[u][i],c=y[u][i];
			if(dy[u]+c<dy[v]){
				dy[v]=dy[u]+c;
				q.push(pii(dy[v],v));
			}
		}
	}
	fill(dz+1,dz+n+1,1e15);
	dz[t]=0;
	q.push(pii(0,t));
	while(!q.empty()){
		int u=q.top().second,cost=q.top().first;
		q.pop();
		if(dz[u]<cost)continue;
		for(int i=0;i<g[u].size();i++){
			int v=g[u][i],c=z[u][i];
			if(dz[u]+c<dz[v]){
				dz[v]=dz[u]+c;
				q.push(pii(dz[v],v));
			}
		}
	}
	for(int i=n;i;i--)ans[i]=max(ans[i+1],ll(1e15)-dy[i]-dz[i]);
	for(int i=1;i<=n;i++)cout<<ans[i]<<endl;
	return 0;
}

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

using namespace std;

int main(){
 ios::sync_with_stdio(false);
 cin.tie(0);
 string s, t;
 cin >> s >> t;
 int ans = 0;
 for(int i=0; i<3; i++)
  if(s[i] == t[i]) ans++;
 cout << ans << endl; 
 return 0;
}


Measured memory_bytes: 256
from collections import defaultdict

N, M = map(int, input().split())
IPY = []
for i in range(1, M + 1):
    p, y = map(int, input().split())
    IPY.append((i, p, y))
IPY.sort(key=lambda ipy: ipy[2])

ids = {}
nums = defaultdict(int)
for i, p, y in IPY:
    nums[p] += 1
    ids[i] = '{:06d}{:06d}'.format(p, nums[p])
for i in range(1, M + 1):
    print(ids[i])

Measured memory_bytes: 41720
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<vector>
#include<functional>
#include<algorithm>
#include<stdlib.h>
#include<string>
#include<string.h>
#define _USE_MATH_DEFINES
#include<math.h>
#include<deque>
#include<set>
#include<map>
#include<iostream>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(auto i=a;i<b;i++)
#define all(_x) _x.begin(), _x.end()
#define r_sort(_x) sort(_x.begin(), _x.end(), std::greater<int>())
#define vec_cnt(_a, _n) (upper_bound(all(_a), _n) - lower_bound(all(_a), _n))
ll gcd(ll a, ll b) { return a % b == 0 ? b : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int main() {
	int n, k;
	cin >> n >> k;
	printf("%d\n", (n - 2) / (k - 1) + 1);
	return 0;
}


Measured memory_bytes: 256
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

X,Y = inpl()
ans = 0
if X == 1 and Y == 1:
    ans += 400000

if X == 3 :
    ans +=100000
if X== 2:
    ans +=200000
if X == 1:
    ans +=300000
if Y == 3 :
    ans +=100000
if Y== 2:
    ans +=200000
if Y == 1:
    ans +=300000

print(ans)

Measured memory_bytes: 4080
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define reps(i,a,b) for(int i=a;i<b;++i)
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
using namespace std;
using ll = long long;
using P = pair<int, int>;
template<typename T> inline bool chmax(T &a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T> inline bool chmin(T &a,T b){if(b<a){a=b;return 1;}return 0;}
template<typename T> vector<T> make_vec(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>
auto make_vec(size_t a,Ts... ts){return vector<decltype(make_vec<T>(ts...))>(a,make_vec<T>(ts...));}
template<typename T,typename U,typename... V>
typename enable_if<is_same<T,U>::value>::type fill_v(U &u,const V... v){u=U(v...);}
template<typename T,typename U,typename... V>
typename enable_if<!is_same<T,U>::value>::type fill_v(U &u,const V... v){for(auto &e:u)fill_v<T>(e,v...);}

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

    double x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    cout << fixed << setprecision(15) << hypot(x2 - x1, y2 - y1) << endl;
}



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

if a > 0:
    result = "Positive"
elif a == 0:
    result = "Zero"
else:
    if b >= 0:
        result = "Zero"
    else:
        c = b - a
        if c % 2 == 0:
            result = "Negative"
        else:
            result = "Positive"
            
print(result)

Measured memory_bytes: 3060
#include <iostream>
#include <math.h>
#include <iomanip>
#include <algorithm>
#include <limits.h>

using namespace std;

int main()
{
    double p;
    int n,i;
    double s1=0,s2=0,s3=0,x[100],y[100],max=INT_MIN;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>x[i];
    }
    for(i=1;i<=n;i++)
    {
        cin>>y[i];
    }
    for(i=1;i<=n;i++)
    {
        if(x[i]<y[i]) swap(x[i],y[i]);
        s1+=(x[i]-y[i]);
        s2+=(x[i]-y[i])*(x[i]-y[i]);
        s3+=(x[i]-y[i])*(x[i]-y[i])*(x[i]-y[i]);
        if(x[i]-y[i]>max) max=x[i]-y[i];
    }
    p = (double) 1/3;
    cout<<fixed<<setprecision(7)<<s1<<"\n"<<sqrt(s2)<<endl;
    cout<<pow(s3,p)<<"\n"<<max;
    return 0;
}



Measured memory_bytes: 3416
n,m = map(int,input().split())

s_li=[0]*m
l_li=[0]*m
for i in range(m):
    s_li[i],l_li[i] = map(int,input().split())

for i in range(1000):
    string = str(i)
    if len(string)!=n:
        continue
    flag=True
    for j in range(m):
        if int(string[s_li[j]-1])==l_li[j]:
            continue
        flag=False
        break
    if flag:
        print(string);exit()
print(-1)
    




Measured memory_bytes: 3064
//C
#include <cassert>
//#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>

//ここまで標準include

using namespace std;

long aCb(long a, long b) {
	long out = 1;
	for (long i = 1; i <= b; i++) {
		out = out * (a + 1 - i) / i;
	}
	return out;
}

long long gcd(long long a, long long b) {
	long long r = -1;
	if (a < b) {
		swap(a, b);
	}
	while (r != 0) {
		r = a % b;
		if (r == 0) {
			return b;
		}
		else {
			a = b;
			b = r;
		}
	}
}

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

int main() {
	int a, b, c;
	cin >> a >> b >> c;
	cout << min({ a + b,b + c,a + c }) << endl;
}


Measured memory_bytes: 256
<?php
fscanf(STDIN, "%d %d", $a, $b);
$ave = ($a + $b) / 2;
$dec = ($a + $b) / 2;
$n = 0;

while($dec >= 1) {
	$dec = $dec -1;
}
if($dec > 0) {
	$n = $ave - $dec + 1;
	echo $n."\n";
} else {
	$n = $ave - $dec;
	echo $n."\n";
}
?>


Measured memory_bytes: 4604
#!/usr/bin/env python3

K, S = map(int, input().split())
AB = []
ret = 0
for i in range(K+1):
    for j in range(K+1):
        AB.append(i+j)

for i in range(len(AB)):
    if 0 <= S - AB[i] <= K:
        ret += 1

print(ret)


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

int main() {
    int D, G, p[20], c[20], ans = 1e9, score, jmax = 0, res;
    cin >> D >> G;
    for (int i = 0; i < D; ++i) {
        cin >> p[i] >> c[i];
    }

    for (int i = 0; i < (1 << D); ++i) {
        score = 0;
        res = 0;
        for (int j = 0; j < D; ++j) {
            if (i & (1 << j)) {
                score += 100 * (j + 1) * p[j] + c[j];
                res += p[j];
            }
            else {
                jmax = j;
            }
        }
        if (G - score > 100 * (jmax + 1) * p[jmax]) {
            continue;
        }
        else {
            while (score < G) {
                score += 100 * (jmax + 1);
                ++res;
            }
            ans = min(ans, res);
        }
    }
    cout << ans << endl;
    
    return 0;
}

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

int main(){
    int N, M;
    cin >> N >> M;
    vector<pair<long, int>> D(N);
    for (int i = 0; i < N; i++) {
        pair<long, int> P;
        cin >> P.first >> P.second;
        D[i] = P;
    }
    sort(D.begin(), D.end());
    long long res = 0;
    for (int i=0; i< N; i++) {
        long long  a = D[i].first, b = D[i].second;
        if (b <= M) {
            M -= b;
            res += a * b;
        } else {
            res += a * M;
            break;
        }
    }
    cout << res << endl;
    return 0;
}

Measured memory_bytes: 1792
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	//	"strings"
)

func main() {
	sc := NewScanner()

	n := sc.NextInt()

	ans := 1000000001

	for i := 0; i < n; i++ {
		tmp := sc.NextInt()
		cnt := 0
		for {
			if tmp%2 != 0 {
				break
			} else {
				tmp /= 2
				cnt++
			}
		}
		if cnt < ans {
			ans = cnt
		}
	}
	fmt.Printf("%+v\n", ans) // output for debug
}

type Scanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewScanner() *Scanner {
	rdr := bufio.NewReaderSize(os.Stdin, 1000)
	return &Scanner{r: rdr}
}
func (s *Scanner) Next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}
func (s *Scanner) NextLine() string {
	s.pre()
	start := s.p
	s.p = len(s.buf)
	return string(s.buf[start:])
}
func (s *Scanner) NextInt() int {
	v, _ := strconv.Atoi(s.Next())
	return v
}

func (s *Scanner) NextIntArray() []int {
	s.pre()
	start := s.p
	result := []int{}
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			v, _ := strconv.Atoi(string(s.buf[start:s.p]))
			result = append(result, v)
			start = s.p + 1
		}
	}
	v, _ := strconv.Atoi(string(s.buf[start:s.p]))
	result = append(result, v)

	return result
}

func (s *Scanner) NextMap() map[int]bool {
	s.pre()
	start := s.p
	mp := map[int]bool{}
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			v, _ := strconv.Atoi(string(s.buf[start:s.p]))
			mp[v] = true
			start = s.p + 1
		}
	}
	v, _ := strconv.Atoi(string(s.buf[start:s.p]))
	mp[v] = true

	return mp
}

func (s *Scanner) pre() {
	if s.p >= len(s.buf) {
		s.readLine()
		s.p = 0
	}
}
func (s *Scanner) readLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, e := s.r.ReadLine()
		if e != nil {
			panic(e)
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}


Measured memory_bytes: 640
#include <cstdio>
using namespace std;

int main() {
  int a[5], tmp;
  for (int i = 0; i < 5; ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < 5; ++i) {
    for (int j = i + 1; j < 5; ++j) {
      if (a[i] < a[j]) {
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  printf("%d %d %d %d %d\n", a[0], a[1], a[2], a[3], a[4]);
}


Measured memory_bytes: 2668
#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
const bool debug=false;
#define DEBUG if(debug==true)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
ll W,H,x,y;
int main(void) {
    cin >> W >> H >> x >> y;
    // if(W%2==1&&H%2==1){
    //     cout << W*H/2 << ".5" << " ";
    // }
    // else cout << W*H/2 << " ";
    double res = double((int(W)))*double(int(H))/2;
    DEBUG{printf("%lf\n", double((int(W)))*double(int(H))/2);}

    cout <<res << " ";
    if(abs(W-x*2)==0&&abs(H-y*2)==0)cout << "1" << endl;
    else cout << "0" << endl;
    
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long
#define ld long double
#define mp make_pair
#define pb push_back
#define fo(i,n) for(ll i=0;i<n;i++)
#define fo1(i,n) for(ll i=1;i<=n;i++)
#define loop(i,a,b)for(ll i=a;i<=b;i++)
#define loopr(i,a,b)for(ll i=b;i>=a;i--)
#define all(x) x.begin(), x.end()
#define sz(x) (ll)(x).size()
#define vll vector<ll> 
#define vvl vector<vll>
#define vpll vector<pll>
#define pll pair<ll,ll>
#define F first
#define S second
#define MOD 1000000007
ll max(ll a,ll b){if (a>b) return a; else return b;}
ll gcd(ll a, ll b){if(b==0)return a;return gcd(b, a%b);}
ll lcm(ll a, ll b){return a*b/gcd(a, b);}
ll fexp(ll a, ll b){ll ans = 1;while(b){if(b&1) ans = ans*a%MOD; b/=2;a=a*a%MOD;}return ans;}
ll inverse(ll a, ll p){return fexp(a, p-2);}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll T=1;
	//cin >> T;
	ll t=0;
	while(t++<T){
		ll x;
		cin>>x;
		if(x>=30)cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
		
	}
return 0;
}


Measured memory_bytes: 3648
import sys

def gcd(a, b):
  if b == 0:
    return a
  else:
    return gcd(b, a%b)

def main():
  input = sys.stdin.readline
  N = int(input())
  A = list(map(int, input().split()))
  ans = A[0]
  for a in A:
    ans = gcd(ans, a)
  print(ans)


if __name__ == '__main__':
  main()

Measured memory_bytes: 14252
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <bitset>
#include <cstring>
#include <map>
#include <math.h>
#include <queue>
#include <set>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i,n) for (int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fi first
#define se second
#define pb push_back
#define mp make_pair
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF = 1<<30;
const ll LINF = 1LL<<58;
const int mod = 1000000007;


int main(){
    string s;
    cin >> s;
    int n = s.size();
    s+="#";
    int i = 0;
    int ans[100010] = {0};
    while(1){
        int r = 0, l = 0;
        while(s[i] == 'R'){r++;i++;}
        int b = i;
        while(s[i] == 'L'){l++;i++;}
        ans[b-1] += (r+1)/2 + l/2;
        ans[b] += r/2 + (l+1)/2;
        if(s[i] == '#')break;
    }
    rep(i,n){
        if(i)cout << " ";
        cout << ans[i];
    }
    cout << endl;
    return 0;
}


Measured memory_bytes: 1024
import numpy as np
from itertools import combinations

n,d = map(int,input().split())

vec_L = []

for val in range(n):
    a_vec = list(map(int,input().split()))
    vec_L.append(a_vec)

a = list(range(n))

comb = list(combinations(a,2))

counter_L = []


for val in comb:
    
    vec1 = np.array(vec_L[val[0]])
    vec2 = np.array(vec_L[val[1]])
    ans = np.linalg.norm(vec1 - vec2)
    counter_L.append(ans.is_integer())

print(counter_L.count(True))

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

int main(){
    int x;
    int y;
    
    while(1){
        cin>> x >> y;
        if(x == 0 && y == 0)break;
        else if (x <= y){
            cout << x <<" "<< y <<endl;
        }
        else {
            cout << y <<" "<< x <<endl;
        }
    }
    return 0;
}


Measured memory_bytes: 3016
#pragma region Macros
#include <bits/stdc++.h>
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define sz(v) (int)(v).size()

using namespace std;
typedef long long ll;
#pragma endregion
int main()
{
	cin.tie(0);
	ios_base::sync_with_stdio(false);

	string a, b, c;
	cin >> a >> b >> c;
	int x = 0, y = -1, z = -1; // stringの位置
	int al = sz(a), bl = sz(b), cl = sz(c); // string長さ
	int af = 1, bf = 0, cf = 0; // flag
	while (true)
	{
		if (af == 1)
		{
			af = 0;
			if (x == al)
			{
				cout << 'A' << '\n';
				break ;
			}
			if (a[x] == 'a')
			{
				af = 1;
				x++;
			}
			else if (a[x] == 'b')
			{
				bf = 1;
				y++;
			}
			else if (a[x] == 'c')
			{
				cf = 1;
				z++;
			}
		}
		else if (bf == 1)
		{
			bf = 0;
			if (y == bl)
			{
				cout << 'B' << '\n';
				break ;
			}
			if (b[y] == 'a')
			{
				af = 1;
				x++;
			}
			else if (b[y] == 'b')
			{
				bf = 1;
				y++;
			}
			else if (b[y] == 'c')
			{
				cf = 1;
				z++;
			}
		}
		else if (cf == 1)
		{
			cf = 0;
			if (z == cl)
			{
				cout << 'C' << '\n';
				break ;
			}
			if (c[z] == 'a')
			{
				af = 1;
				x++;
			}
			else if (c[z] == 'b')
			{
				bf = 1;
				y++;
			}
			else if (c[z] == 'c')
			{
				cf = 1;
				z++;
			}
		}
	}
	return 0;
}


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

using namespace std;
using lli = int_fast64_t;
using ulli = uint_fast64_t;
#define debug(x) cerr << #x << " : " << x << endl
#define debugv(x) cerr << #x << " : {";for(auto value_of_x:x){ cerr << value_of_x << ", ";}cerr << endl
#define debugst(x) auto xt = x;cerr << #x << " : {";for(int i=0;i<x.size();i++){ cerr << xt.top() << ", ";xt.pop();}cerr << endl
#define debugvp(x) cerr << #x << " : {";for(auto value_of_x:x){ cerr << value_of_x.first << " : " << value_of_x.second << ", ";}cerr << endl

const lli MOD = 1000000007;
const lli LIMIT = 1000000000000000000 * 5;
const int tenfive = 100000;

int main() {
	int N;
	cin >> N;
	vector<int> v(N);
	for (int i = 0; i < N; i++) {
		cin >> v[i];
	}
	map<int,int, greater<>> se;
	for (int i = 0; i < N; i++) {
		int change = -1;
		auto it = se.upper_bound(v[i]);
		if (it != se.end()) {
			change = (*it).first;
		}
		if (change != -1) {
			se[change]--;
			if (se[change] == 0) {
				se.erase(change);
			}
		}
		se[v[i]]++;
	}

	int ans = 0;
	for (auto a : se) {
		ans += a.second;
	}
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 5248
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#define LL long long
using namespace std;
const int maxn=2e5+10;
LL a[maxn],ans;
int n;
LL c[4];
void work(LL o,LL p,LL q){
//    cout<<o<<" "<<p<<" "<<q<<" "<<endl;
    if (o<1||o>=p) return;
    if (q<=p||p>=n) return;
    c[0]=a[o];c[1]=a[p]-a[o];c[2]=a[q]-a[p];c[3]=a[n]-a[q];
    sort(c,c+4);
//    cout<<" ok "<<o<<" "<<p<<" "<<q<<" "<<c[3]-c[0]<<endl;
    ans=min(ans,c[3]-c[0]);
}
int main(){
    cin>>n;
    for (int i=1;i<=n;i++) {cin>>a[i];a[i]+=a[i-1];}
//    for (int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
    ans=a[n];
    for (int i=2;i+1<n;i++){
//        cout<<"i="<<i<<"  a[i]="<<a[i]<<endl;
        int p=lower_bound(a+1,a+1+n,(a[i]+1)/2)-a;
        int q=lower_bound(a+1,a+1+n,a[i]+(a[n]-a[i]+1)/2)-a;
//        printf("p=%d q=%d\n",p,q);
        work(p,i,q);
        work(p-1,i,q);
        work(p,i,q-1);
        work(p-1,i,q-1);
    }
    cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 1792
#include <iostream>
#include <vector>
#include <string>

int main() {
  int H, W, N;
  std::cin >> H >> W >> N;

  int Sr, Sc;
  std::cin >> Sr >> Sc;

  std::string S, T;
  std::cin >> S >> T;

  int SlackL = Sc - 1;
  int SlackR = W - Sc;
  int SlackU = Sr - 1;
  int SlackD = H - Sr;

  bool judge = true;

  // std::cerr << "SlackL: " << SlackL << ", "
  //           << "SlackR: " << SlackR << ", "
  //           << "SlackU: " << SlackU << ", "
  //           << "SlackD: " << SlackD << std::endl;

  for (int i=0; i<N; i++) {
    if (S[i] == 'L') {
      if (SlackL == 0) {
        judge = false;
        break;
      } else if (T[i] != 'R') {
        SlackL--;
      }
    } else if (T[i] == 'R') {
      SlackL = std::min(W-1, SlackL+1);
    }

    if (S[i] == 'R') {
      if (SlackR == 0) {
        judge = false;
        break;
      } else if (T[i] != 'L') {
        SlackR--;
      }
    } else if (T[i] == 'L') {
      SlackR = std::min(W-1, SlackR+1);
    }

    if (S[i] == 'U') {
      if (SlackU == 0) {
        judge = false;
        break;
      } else if (T[i] != 'D') {
        SlackU--;
      }
    } else if (T[i] == 'D') {
      SlackU = std::min(H-1, SlackU+1);
    }

    if (S[i] == 'D') {
      if (SlackD == 0) {
        judge = false;
        break;
      } else if (T[i] != 'U') {
        SlackD--;
      }
    } else if (T[i] == 'U') {
      SlackD = std::min(H-1, SlackD+1);
    }

    // std::cerr << S[i] << "-" << T[i] << '\t'
    //           << "SlackL: " << SlackL << ", "
    //           << "SlackR: " << SlackR << ", "
    //           << "SlackU: " << SlackU << ", "
    //           << "SlackD: " << SlackD << std::endl;
  }

  std::cout << (judge ? "YES" : "NO") << std::endl;

  return 0;
}


Measured memory_bytes: 776
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
#include <bitset>
#include <string>
#include <cmath>
#include <set>
#include <map>
#define Rep(i, x, y) for (int i = x; i <= y; i ++)
#define Dwn(i, x, y) for (int i = x; i >= y; i --)
#define RepE(i, x) for (int i = pos[x]; i; i = g[i].nex)
#define ev g[i].y
#define eps 1e-10
using namespace std;
typedef long long ll;
typedef double db;
const int N = 100005, mod = 1000000007;
int n, m, T, q, pos[N], sz, s[N], f[N], mn = 1 << 30, rt;
ll ans;
struct edge { int y, nex, z; } g[N * 2];
void init(int x, int y, int z) { g[++ sz] = (edge) { y, pos[x], z }, pos[x] = sz; }
void dfs(int x, int fa, ll z) {
	// if (z > mx) { mx = z; q = x; }
	s[x] = 1;
	ans += 2 * z;
	RepE(i, x) if (ev != fa) {
		dfs(ev, x, z + g[i].z);
		s[x] += s[ev];
	}
}
void get(int x, int fa) {
	s[x] = 1;
	RepE(i, x) if (ev != fa) {
		get(ev, x), s[x] += s[ev];
		f[x] = max(f[x], s[ev]);
	}
	f[x] = max(f[x], n - s[x]);
	if (f[x] < f[rt]) rt = x;
}
int main()
{
	scanf ("%d", &n);
	Rep(i, 1, n - 1) {
		int x, y, z;
		scanf ("%d%d%d", &x, &y, &z);
		init(x, y, z), init(y, x, z);
	}
	f[0] = n + 1;
	get(1, 0);
	dfs(rt, 0, 0);
	RepE(i, rt) {
		if (n % 2 != 0 || f[rt] < n / 2 || s[ev] == n / 2) mn = min(mn, g[i].z);
	}
	cout << ans - mn << endl;

	return 0;
}

Measured memory_bytes: 7808
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b;
	cin>>a>>b;
	
	if(a==1 && b==2) cout<<"3";
	if(a==1 && b==3) cout<<"2";
	if(a==2 && b==3) cout<<"1";
	
	if(a==2 && b==1) cout<<"3";
	if(a==3 && b==1) cout<<"2";
	if(a==3 && b==2) cout<<"1";
	
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
// type alias
typedef long long LL;
typedef pair<int,int> II;
typedef tuple<int,int,int> III;
typedef vector<int> VI;
typedef vector<string> VS;
typedef unordered_map<int,int> MAPII;
typedef unordered_set<int> SETI;
template<class T> using VV=vector<vector<T>>;
// minmax
template<class T> inline T SMIN(T& a, const T b) { return a=(a>b)?b:a; }
template<class T> inline T SMAX(T& a, const T b) { return a=(a<b)?b:a; }
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// collection
#define ALL(c) (c).begin(),(c).end()
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// stdout
#define println(args...) fprintf(stdout, ##args),putchar('\n');
// debug cerr
template<class Iter> void __kumaerrc(Iter begin, Iter end) { for(; begin!=end; ++begin) { cerr<<*begin<<','; } cerr<<endl; }
void __kumaerr(istream_iterator<string> it) { (void)it; cerr<<endl; }
template<typename T, typename... Args> void __kumaerr(istream_iterator<string> it, T a, Args... args) { cerr<<*it<<"="<<a<<", ",__kumaerr(++it, args...); }
template<typename S, typename T> std::ostream& operator<<(std::ostream& _os, const std::pair<S,T>& _p) { return _os<<"{"<<_p.first<<','<<_p.second<<"}"; }
#define __KUMATRACE__ true
#ifdef __KUMATRACE__
#define dump(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); __kumaerr(_it, args); }
#define dumpc(ar) { cerr<<#ar<<": "; FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }
#define dumpC(beg,end) { cerr<<"~"<<#end<<": "; __kumaerrc(beg,end); }
#else
#define dump(args...)
#define dumpc(ar)
#define dumpC(beg,end)
#endif

// $ cp-batch StationAndBus | diff StationAndBus.out -
// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG -fsanitize=address StationAndBus.cpp && ./a.out

/*
 
 3/8/2020
 
 20:30-
 
 */

string S;

void solve() {
  set<char> s(ALL(S));
  cout<<(SZ(s)>1?"Yes":"No")<<endl;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout<<setprecision(12)<<fixed;
  
  cin>>S;
  solve();
  
  return 0;
}


Measured memory_bytes: 256