akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#define rep(i,l,r) for (int i=l;i<=r;i++)
using namespace std;
int main(){
    string s;
    cin>>s;
    int op=0,op2=0;
    for (int i=0;s[i];i++) {
        if (s[i]=='N') op|=1;
        if (s[i]=='S') op|=2;
        if (s[i]=='E') op2|=1;
        if (s[i]=='W') op2|=2;
    }
    if (op==1||op==2||op2==1||op2==2) puts("No");
    else puts("Yes"); 
    return 0;
}

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

using namespace std;

int main() {
	int a, b, c;
	scanf("%d%d%d", &a, &b, &c);
	swap(a, b);
	swap(a, c);
	printf("%d %d %d\n", a, b, c);

	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define     mkp(a,b)    make_pair(a,b)
#define     PI          3.14159265359
#define     ll              long long
#define     ul              unsigned long long
#define     ld              long double
#define     mset(arr,val)   memset(arr,val,sizeof arr)
#define     MAXN            (long long)2e5+5
#define     eb              emplace_back
#define     mod             (long long)(1e9+7)
#define     FILE_READ       freopen("input.txt","r",stdin)
#define     FILE_WRITE      freopen("output.txt","w",stdout)
using namespace std;
using namespace __gnu_pbds;;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
//    FILE_READ;
//    FILE_WRITE;

    int n;
    cin>>n;
    ld a[n];
    for(int i=0;i<n;++i) {
        cin>>a[i];
    }
    sort(a,a+n);
    ld last=a[0];
    for(int i=1;i<n;++i)  {
        last = (last+a[i])/2.0;
    }
    cout<<fixed<<last;

    return 0;
}

Measured memory_bytes: 256
import math

n,m = map(int,input().split())
li = list(map(int,input().split()))
wa = 0
for i in li :
    wa+=i

for i in li :
    if i < math.ceil((wa/float(4*m))) :
        n -= 1

if n>=m:
    print("Yes")
else:
    print("No")


Measured memory_bytes: 3060
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <unordered_map>
#include <climits>
#include <set>
#include <unordered_set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <complex>
#include <regex>
#include <locale>
#include <random>
#include <type_traits>

using namespace std;

#define SHOW_VECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOW_MAP(v){std::cerr << #v << endl; for(const auto& xxx: v){std::cerr << xxx.first << " " << xxx.second << "\n";}}

using LL = long long;

//~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

int main() {

    int X, A;
    cin >> X >> A;

    if(X < A) cout << 0 << endl;
    else cout << 10 << endl;

}

































Measured memory_bytes: 256
#include <iostream>
#include <map>

using namespace std;

int main() {
    map<char,char> ans;
    ans['A'] = 'T';
    ans['T'] = 'A';
    ans['G'] = 'C';
    ans['C'] = 'G';

    char b;
    cin >> b;
    cout << ans[b] << endl;
}


Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
int main(void){
  int str[]={1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
  int k;
  scanf("%d",&k);

  printf("%d",str[k-1]);
  return 0;
  }

Measured memory_bytes: 1724
#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9+7;
const long long LINF = 1e18;
#define dump(x)  cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define FOREACH(x,a) for(auto& (x) : (a) )
typedef long long ll;
using namespace std;
typedef pair<ll, ll> P;

class combM {
private:
    vector<ll> fac;  //n!(mod M)
    vector<ll> ifac; //k!^{M-2} (mod M)
public:
    ll mpow(ll x, ll n);
    combM();
    ll com(ll a, ll b);
};

// x^n(mod M)
ll combM::mpow(ll x, ll n) {
    ll ans = 1ll;
    while(n != 0){
        if (n&1) ans = ans*x%MOD;
        x = x*x%MOD;
        n = n >> 1;
    }
    return ans;
}

// aCb をmod計算
ll combM::com(ll a, ll b) {
    if (a == 0 && b == 0) return 1;
    if (a < b || a < 0) return 0;
    ll tmp = ifac[a-b]*ifac[b]%MOD;
    return tmp*fac[a]%MOD;
}

combM::combM() {
    fac.resize(300001);
    ifac.resize(300001);
    fac[0] = 1;
    ifac[0] = 1;
    for (ll i = 0; i < 300000; ++i) {
        fac[i+1] = fac[i]*(i+1)%MOD;
        ifac[i+1] = ifac[i]*mpow(i+1, MOD-2)%MOD;
    }
}

int main(int argc, char const *argv[]) {
    int n, m, k;
    cin >> n >> m >> k;
    combM C;
    ll x = 0ll;
    for (ll i = 1; i < n; ++i) {
       x += i*(n-i)%MOD*m*m%MOD;
       x %= MOD;
    }

    for (ll i = 1; i < m; ++i) {
        x += i*(m-i)%MOD*n*n%MOD;
        x %= MOD;
    }

    ll ans = x*C.com(n*m-2, k-2)%MOD;

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


Measured memory_bytes: 4992
#include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
#define INF 0x3f3f3f3f
std::string s;
int len;
int ans=INF;
int main(){
	std::cin>>s;
	len=s.size();
	for(int i=0;i<len;i++){
		if(s[i]!=s[i-1]) ans=std::min(ans,std::max(i,len-i));
	}
	printf("%d\n",ans);
	return 0;
}

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

long long f1[10];
long long f2[10][10];
long long f3[10][10][10];

signed main(){
	int N; cin >> N;
	string S; cin >> S;
	for(int i=0; i< N; ++i){
		for(int j=0; j< 10; ++j)
			for(int k=0; k< 10; ++k)
				f3[S[i]-'0'][k][j] += f2[k][j];
		for(int j=0; j< 10; ++j)
			f2[S[i]-'0'][j] += f1[j];
		++f1[S[i]-'0'];
	}
	int ans = 0;
	for(int i=0; i< 10; ++i)
		for(int j=0; j< 10; ++j)
			for(int k=0; k< 10; ++k)
				if(f3[i][j][k] > 0LL) ++ans;
	cout << ans;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <stdio.h>
#include <string>
#include <queue>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll mod = 1000000007;
ll n, a[100010], k, dp[110][100010];
const ll INF = 1000000000000000;

ll pow(ll x, ll y)
{
	if (y == 0) return 1;
	if (y % 2)
	{
		return pow(x, y - 1) * x % mod;
	}
	else
	{
		ll yyy = pow(x, y / 2);
		return yyy * yyy % mod;
	}
}

ll div(ll x)
{
	return pow(x, mod - 2);
}

int main(void)
{
	cin >> n >> k;
	dp[0][0] = 1;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j <= k; j++)
		{
			(dp[i + 1][j] += dp[i][j]) %= mod;
			if (j + a[i] < k)
			{
				(dp[i + 1][j + a[i] + 1] += mod - dp[i][j]) %= mod;
			}
		}
		for (int j = 0; j < k; j++)
		{
			(dp[i + 1][j + 1] += dp[i + 1][j]) %= mod;
		}
	}
	cout << dp[n][k] << endl;
	cin >> n;
}


Measured memory_bytes: 81408
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using st=string;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
st abc="abcdefghijklmnopqrstuvwxyz";
st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
struct edge{ll to,cost;};

int main() {
  ll n;
  cin >> n;
  vl a(n);
  ll sum=0;
  rep(i,n){
    cin >> a[i];
    sum+=a[i];
  }
  ll D=INF;
  ll ans;
  rep(i,n){
    if(D>abs(sum-n*a[i])){
      D=abs(sum-n*a[i]);
      ans=i;
    }
  }
  cout << ans << endl;
}


Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Diagnostics;
using System.Threading.Tasks;



class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }
    

    Scanner cin;

    void calc()
    {
        cin = new Scanner();
        int N = cin.nextInt();
        int P = cin.nextInt();
        int[] A = cin.ArrayInt(N);

        long[] dp = new long[2];
        dp[0] = 1;
        for (int i = 0; i < N; i++)
        {
            long[] ndp = (long[])dp.Clone();
            for (int j = 0; j < 2; j++)
            {
                ndp[(j + A[i]) % 2] += dp[j];
            }

            dp = ndp;
        }

        Console.WriteLine(dp[P]);

    }

    //swap
    void swap<T>(ref T a, ref T b)
    {
        T c = a;
        a = b;
        b = c;
    } 

}




class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return next();
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }
    public int[] ArrayInt(int N, int add = 0)
    {
        int[] Array = new int[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextInt() + add;
        }
        return Array;
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public long[] ArrayLong(int N, long add = 0)
    {
        long[] Array = new long[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextLong() + add;
        }
        return Array;
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }


    public double[] ArrayDouble(int N, double add = 0)
    {
        double[] Array = new double[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextDouble() + add;
        }
        return Array;
    }
}



Measured memory_bytes: 11092
#include<bits/stdc++.h>
using namespace std;
int main(){
	long long sum=0,n;
	int d;
	double z;
	cin>>n;	
	for(int i=n;i>=0;i--){
		d=sqrt(i);
		z=sqrt(i);
		if(d==z){
		cout<<i;
		return 0;	
		}
	}
	return 0;
  }

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
const int maxn=3009;

int n,m,K;

int a[maxn][maxn];

long long f[maxn][maxn][4];

int main(){
	cin>>n>>m>>K;
	while(K--){
		int x,y,z;scanf("%d%d%d",&x,&y,&z);
		a[x][y]=z;
	}
	for(int i=1;i<=n;++i){
		for(int j=1;j<=m;++j){
			for(int k=0;k<=3;++k){
				long long t=max(max(f[i-1][j][0],f[i-1][j][1]),max(f[i-1][j][2],f[i-1][j][3]));
				f[i][j][k]=max(f[i][j-1][k],t);
				if(k)f[i][j][k]=max(f[i][j-1][k-1]+a[i][j],f[i][j][k]);
				if(k)f[i][j][k]=max(f[i][j][k],t+a[i][j]);
			}
		}
	}
	printf("%lld",max(max(f[n][m][0],f[n][m][1]),max(f[n][m][2],f[n][m][3])));
}

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

using namespace std;
typedef pair<int, int> P;
char c[5] = {'A', 'B', 'C', 'D', 'E'};

void solve()
{
	vector<int> Vec(5);
	int a, b;
	while(cin >> a >> b, a || b)
	{
		Vec[0] = a + b;
		for(int i = 1; i < 5; ++i)
		{
			cin >> a >> b;
			Vec[i] = a + b;
		}
		int max_shop = 0;
		int max_sell_num = Vec[0];
		for(int i = 0; i < 5; ++i)
		{
			if(max_sell_num < Vec[i])
			{
				max_sell_num = Vec[i];
				max_shop = i;
			}
		}
		cout << c[max_shop] << " " << Vec[max_shop] << endl;
	}
}

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

Measured memory_bytes: 1192
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define usecppio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define all(x) ((x).begin()),((x).end())
using pii = pair <int, int>;
#define int ll
#define INF 0x7f7f7f7f7f7f7f7f
using D = long double;
const bool debug = false;
const D PI = acos(-1.0);
struct point
{
    D x, y;
    int index;
    point(D a, D b, int ind)
    {
        x = a, y = b;
        index = ind;
    }
};
class convex_hull
{
public:
    int n;
    int ccw (point &a, point &b, point &c)
    {
        D v = (b.x - a.x) * (c.y - a.y) - (b.y-a.y)*(c.x-a.x);
        if (v > 0) return 1;
        if (!v) return 0;
        return -1;
    }
    static bool compy (point &a, point &b)
    {
        if (a.y == b.y) return a.x < b.x;
        return a.y < b.y;
    }
    static bool compang(point &a, point &b)
    {
        if (a.y*b.x == a.x*b.y) return compy(a, b);
        return a.y*b.x < a.x*b.y;
    }
    vector <point> pt;
    vector <point> convex;
    void graham_scan()
    {
        sort(all(pt),compy);
        point down = pt[0];
        for (int i = 0; i<n; i++)
        {
            pt[i].x -= down.x;
            pt[i].y -= down.y;
        }
        sort(all(pt), compang);
        convex.push_back(pt[0]);
        convex.push_back(pt[1]);
        for (int i = 2; i<n; i++)
        {
            while(convex.size() > 1)
            {
                point tp = convex.back();
                convex.pop_back();
                point tptp = convex.back();
                if (ccw(tptp,tp,pt[i]) > 0)
                {
                    convex.push_back(tp);
                    break;
                }
            }
            convex.push_back(pt[i]);
        }
    }
};

convex_hull CV;
int n;
D prob[120];
struct vt
{
    D dx = 0, dy = 0;
    D inner(vt a)
    {
        return dx*a.dx+dy*a.dy;
    }
    D norm()
    {
        return sqrt(dx*dx+dy*dy);
    }
};
int32_t main()
{
    usecppio
    cin >> n;
    CV.n = n;
    for (int i = 0; i<n; i++)
    {
        D x, y;
        cin >> x >> y;
        CV.pt.push_back({x, y, i});
    }
    CV.graham_scan();
    CV.convex.push_back(CV.convex[0]);
    CV.convex.push_back(CV.convex[1]);
    int m = CV.convex.size();
    for (int i = 1; i<m-1; i++)
    {
        point a = CV.convex[i];
        point b = CV.convex[i-1];
        point c = CV.convex[i+1];
        //printf("%.2lf %.2lf, %.2lf %.2lf, %.2lf %.2lf\n",a.x,a.y,b.x,b.y,c.x,c.y);
        vt A = {b.x-a.x, b.y-a.y};
        vt B = {c.x-a.x, c.y-a.y};
        //printf("Vector %.2lf %.2lf and %.2lf %.2lf\n",A.dx,A.dy,B.dx,B.dy);
        D cth = A.inner(B)/(A.norm()*B.norm());
        D tha = acos(cth);
        if (tha < 0) tha = 0;
        if (tha > PI) tha = PI;
        //printf("%.4lf angle\n",tha*180/PI);
        prob[a.index] = (PI-tha)/(2*PI);
    }
    for (int i = 0; i<n; i++)
    {
        cout << fixed << setprecision(20)<< prob[i] << '\n';
    }
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n;
	cin>>n;
	long long int arr[n],sum=0;
	for(long long int i=0;i<n;i++)
      cin>>arr[i];
for(long long int i=0;i<n-1;i++)
  {
  	  if(arr[i]>arr[i+1])
  	    {
  	        sum=sum+(arr[i]-arr[i+1]);
  	        arr[i+1]=arr[i];
		  }
  	   
	  }	
	cout<<sum<<endl;
	
}

Measured memory_bytes: 5064
#include <string>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <functional>
#include <queue>
using namespace std;
const int INT_INF = 500000000;
const long long LONG_LONG_INF = (long long)pow(10, 18);
const int MOD = pow(10, 9) + 7;
/* contest template */
string s;
int ans;

int main()
{
    cin >> s;
    if (s[0] != '9')
    {
        for (int i = 1; i < s.size(); i++)
        {
            if (s[i] != '9')
            {
                ans += s[0] - '0' - 1;
                ans += (s.size() - 1) * 9;
                cout << ans << endl;
                return 0;
            }
        }
        ans = s[0] - '0' + (s.size() - 1) * 9;
        cout << ans << endl;
    }
    else
    {
        for (int i = 0; i < s.size(); i++)
        {
            if (s[i] != '9')
            {
                ans = (s.size() - 1) * 9 + 8;
                cout << ans << endl;
                return 0;
            }
        }
        ans = s.size() * 9;
        cout << ans << endl;
    }
    return 0;
}

Measured memory_bytes: 256
/***********************
*  Author: xuziyuan    * 
***********************/

#include <bits/stdc++.h>

#define rt0 return 0
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
#define replet(c) for(char c='a';c<='z';c++) 
#define LL long long
#define pii pair <int,int>
#define pb push_back
#define fi first
#define se second
#define mpr make_pair
#define sqr(a) ((a)*(a))

using namespace std;

const LL MOD=1e9+7;

int n;
vector <int> a,ans;
bool ok;

int main()
{
	cin>>n;
	rep(i,n)
	{
		int x;
		cin>>x;
		a.pb(x);
	}
	while(!a.empty())
	{
		ok=false;
		for(int i=a.size()-1;i>=0;i--)
		{
			if(a[i]==i+1)
			{
				ok=true;
				ans.pb(a[i]);
				a.erase(a.begin()+i);
				break;
			}
		}
		if(!ok) puts("-1"),exit(0);
	}
	for(int i=ans.size()-1;i>=0;i--) cout<<ans[i]<<endl;
	rt0;
}

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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pullull;
typedef pair<ll, int> plli;
typedef pair<int, pii> pipii;
typedef vector<vector<int> > mati;
typedef vector<vector<double> > matd;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<vector<vector<ll>>> vvvll;
typedef vector<bool> vb;
typedef vector<vector<bool>> vvb;
typedef vector<vector<vector<bool>>> vvvb;
typedef vector<pll> vpll;

#define FOR(i,x,y) for(ll i=(ll)x; i<(ll)y; ++i)
#define REP(i,y) FOR(i, 0, y)
#define RFOR(i,x,y) for(ll i=(ll)x; i>=(ll)y; --i)
#define RREP(i,x) RFOR(i, x, 0)
#define ALL(a) a.begin(), a.end()
#define pb push_back

inline void IN(void){
  return;
}

template <typename First, typename... Rest>
void IN(First& first, Rest&... rest){
  cin >> first;
  IN(rest...);
  return;
}

inline void OUT(void){
  cout << "\n";
  return;
}

template <typename First, typename... Rest>
void OUT(First first, Rest... rest){
  cout << first << " ";
  OUT(rest...);
  return;
}

constexpr int INF = (1<<30);
constexpr ll INFLL = 1LL<<62;
constexpr long double EPS = 1e-12;
constexpr ll MOD = (ll)((1E+9)+7);

int main(){
  ll N;
  IN(N);
  vll v(N);
  REP(i,N) IN(v[i]);
  sort(ALL(v));
  reverse(ALL(v));
  double ans = 0.0;
  ll tmp = 2;
  REP(i,N-1){
    ans += (double)v[i]/(double)tmp;
    tmp *= 2;
  }
  tmp /= 2;
  ans += (double)v[N-1]/(double)tmp;

  printf("%.12lf\n", ans);

  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <cassert>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;

typedef pair<string, string> pss;
pss hoge(string s) {
  int a = s.find_first_of('[');
  string sa = s.substr(0, a);
  string sb = s.substr(a+1, s.size()-a-2);
  return pss(sa,sb);
}

map<string, int> size;
typedef pair<string, int> psi;
map<psi, int> mp;

int expression(string s) {
  if (isdigit(s[0])) {
    return atoi(s.c_str());
  }
  pss a = hoge(s);
  string name = a.first;
  int num = expression(a.second);
  if (num == -1) return -1;
  if (num >= size[name]) return -1;
  if (mp.count(psi(name, num)))
    return mp[psi(name,num)];
  else
    return -1;
}

bool ok(string s) {
  int p = s.find('=');
  if (p == -1) {
    pss a = hoge(s);
    string name = a.first;
    int num = atoi(a.second.c_str());
    size[name] = num;
    return 1;
  } else {
    pss a = hoge(s.substr(0, p));
    string name = a.first;
    int num = expression(a.second.c_str());
    if (num == -1 || num >= size[name]) return 0;
    int val = expression(s.substr(p+1));
    if (val == -1) return 0;
    mp[psi(name,num)] = val;
    return 1;
  }
}

int main() {
  while(1) {
    vector<string> lines;
    string s;
    while(cin >> s, s!=".") lines.push_back(s);
    if (lines.size() == 0) break;

    size.clear();
    mp.clear();
    int ans = 0;
    REP(i, lines.size()) {
      if (!ok(lines[i])) {
        ans = i+1;
        break;
      }
    }
    cout << ans << endl;
    // FOR(it, mp) {
    //   psi p = it->first;
    //   printf("(%s,%d)->%d\n", p.first.c_str(), p.second, it->second);
    // }
  }
}

Measured memory_bytes: 0
import sys
n = int(input())
l = list(map(int,input().split()))
l.sort()
count = 1
for i in l:
    count= count*i
    if count == 0:
        print("0")
        sys.exit()
    elif count > 10**18:
        print("-1")
        sys.exit()
if count > 10**18:
    print("-1")
    sys.exit()
print(count)

Measured memory_bytes: 21472
import sys

def main():

    input = sys.stdin.buffer.readline
    n = int(input())
    x = list(map(int, input().split()))
    x.sort()
    mt = 10**10
    for ii in range(x[0],x[-1]+1):
        ans = 0
        for i in x:
            ans += (i-ii)**2
        mt = min(mt,ans)
    print(mt)    
    
if __name__ == "__main__":
    main()

Measured memory_bytes: 9192
#include <bits/stdc++.h>
using namespace std;
#define finish(x) return cout << x << endl, 0
#define ll long long

const int N = 701;

int n, m, v[N][N], vis[N], dp[N][N], cnt[2];

int f(int x){
    return x * (x - 1) / 2;
}
void dfs(int node){
    cnt[vis[node]]++;
    for(int i = 1 ; i <= n ; i++){
        if(v[node][i] == 0) continue;
        if(vis[i] != -1 && vis[i] == vis[node]){
            cout << "-1\n";
            exit(0);
        }
        if(vis[i] != -1) continue;
        vis[i] = vis[node] ^ 1;
        dfs(i);
    }
}
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    memset(vis, -1, sizeof vis);
    cin >> n >> m;
    for(int i = 0 ; i < m ; i++){
        int x, y;
        cin >> x >> y;
        v[x][y] = v[y][x] = 1;
    }
    for(int i = 1 ; i <= n ; i++){
        for(int j = 1 ; j <= n ; j++){
            if(i == j) continue;
            v[i][j] ^= 1;
        }
    }
    vector <pair <int, int> > g;
    for(int i = 1 ; i <= n ; i++){
        if(vis[i] != -1) continue;
        cnt[0] = cnt[1] = 0;
        vis[i] = 0;
        dfs(i);
        g.push_back(make_pair(cnt[0], cnt[1]));
    }
    int s = g.size();
    dp[0][g[0].first] = dp[0][g[0].second] = 1;
    for(int i = 1 ; i < s ; i++){
        for(int j = 0 ; j <= n ; j++){
            if(j - g[i].first >= 0) dp[i][j] |= dp[i - 1][j - g[i].first];
            if(j - g[i].second >= 0) dp[i][j] |= dp[i - 1][j - g[i].second];
        }
    }
    int ans = 1e9;
    for(int i = 0 ; i <= n ; i++){
        if(dp[s - 1][i] == 0) continue;
        int j = n - i;
        ans = min(ans, f(i) + f(j));
    }
    cout << ans << endl;
}


Measured memory_bytes: 4096
#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
using namespace std;

int main()
{
  int n,a;
  int i,j;
  int b[5005]={};

  while(1){
    priority_queue<int> pq;
    cin>>n;
    if(n==0)break;
    for(i=1;i<=n;i++){
      cin>>a;
      b[i]=b[i-1]+a;
      for(j=i-1;j>=0;j--)
	pq.push(b[i]-b[j]);
    }
    cout<<pq.top()<<endl;
  }
}

Measured memory_bytes: 35648
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,m = readInts()
m_ = 1 << m
seikou = 1900 * m + 100 * (n-m)
print(m_ * seikou)


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

int main() {
  int num = 0;
  char c;
  cin >> num;
  for (int i = 0; i < num; i++) {
    cin >> c;
    if(c == 'Y'){
      cout << "Four";
      break;
    }else if(i == num -1) {
      cout << "Three";
      break;
    }
  }
}

Measured memory_bytes: 256
#include<iomanip>
#include <string>
#include<iostream>
#include<vector>
#include <bits/stdc++.h>
#include <stdio.h>
#include <numeric>
#include<math.h>
#include <ctype.h>
#include <algorithm> // sort
#include <map> // pair
using namespace std;
#define nin(n) int n; cin >> n;
#define kin(k) int k; cin >> k;


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

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

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

#define MAX 1145141919810

int main(){
        int v,e;
        cin>>v>>e;
        vector<vector<ll> >graph(v,vector<ll>(v,MAX));
        vector<ll>s(e),t(e),d(e);
        for(ll i=0;i<v;i++)graph[i][i]=0;
        for(ll i=0;i<e;i++){
                cin>>s[i]>>t[i]>>d[i];
                graph[s[i]][t[i]]=d[i];
        }
        for(ll k=0;k<v;k++){
                for(ll i=0;i<v;i++){
                        for(ll j=0;j<v;j++){
                                if(graph[i][k]!=MAX&&graph[k][j]!=MAX)graph[i][j]=min(graph[i][j],graph[i][k]+graph[k][j]);
                                if(i==j&&graph[i][j]<0) return !(cout<<"NEGATIVE CYCLE"<<endl);
                        }
                }
        }

        for(ll i=0;i<v;i++){
                for(ll j=0;j<v;j++){
                        if(graph[i][j]==MAX)cout<<"INF";
                        else cout<<graph[i][j];
                        if(j!=v-1)cout<<" ";
                        else cout<<endl;
                }
        }
        return 0;
}



Measured memory_bytes: 3300
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    A,B,C,x,y = map(int, readline().split())

    ans = 0
    if A + B > C * 2:
        ans += min(x, y) * C * 2
        if x > y:
            ans += (x - y) * min(A, C*2)
        else:
            ans += (y - x) * min(B, C*2)
    
    else:
        ans += A * x + B * y
    
    print(ans)


if __name__ == "__main__":
    main()


Measured memory_bytes: 3064
/*
    Author:zeke
    
    pass System Test!
    GET AC!!
*/
#include <iostream>
#include <queue>
#include <vector>
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <map>
#include <iomanip>
#include <utility>
#include <stack>
#include <bitset>
using ll = long long;
using ld = long double;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define rep3(var, min, max) for (ll(var) = (min); (var) < (max); ++(var))
#define repi3(var, min, max) for (ll(var) = (max)-1; (var) + 1 > (min); --(var))
#define Mp(a, b) make_pair((a), (b))
#define F first
#define S second
#define Icin(s) \
    ll(s);      \
    cin >> (s);
#define Scin(s) \
    ll(s);      \
    cin >> (s);
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef vector<V> VV;
typedef vector<P> VP;
ll mod = 1e9 + 7;
ll MOD = 1e9 + 7;
ll INF = 1e18;
V vec;
set<ll> st;
void dfs(ll now,ll depth){
  //  cout<<now<<" "<<depth<<endl;
    vec.push_back(now);
    st.insert(now);
    if(depth==0){
        
        return;
    }
    ll a=now%10;
    now*=10;
    if(a==0){
        dfs(now+1,depth-1);
        dfs(now,depth-1);
    }else if(a==9){
        dfs(now+8,depth-1);
        dfs(now+9,depth-1);
    }else{
        dfs(now+a-1,depth-1);
        dfs(now+a,depth-1);
        dfs(now+a+1,depth-1);
    }
}
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll k;
    cin>>k;
    rep(i,10){
        dfs(i,10);
    }
    sort(all(vec));
   // cout<<st.size()<<endl;
    auto itr = st.begin();
    for(int i = 0; i < k; ++i)
        ++itr;
    cout<<*itr<<endl;
}


Measured memory_bytes: 34792
N = int(input())

ed = [ [ int(it) for it in input().split() ] for i in range(N-1) ]
Q,K = [ int(it) for it in input().split() ]
qu = [ [ int(it)-1 for it in input().split() ] for i in range(Q) ]

K = K-1
down = [ [] for i in range(N) ]
for a,b,c in ed:
  down[a-1].append( (b-1,c) )
  down[b-1].append( (a-1,c) )

dist = [10000000000000000000000]*N
dist[K] = 0

now = [K]
for i in range(100000000000000):
  if ( len(now) == 0 ):
    break
  n = now.pop()
  for d,c in down[n]:
    dist[d] = min( dist[d] , dist[n] + c )
    now.append(d)
  down[n] = []
  
for a,b in qu:
  print ( dist[a]+dist[b] )



Measured memory_bytes: 113240
#include <bits/stdc++.h>
using namespace std;
int n;
map <string,int> Map;
signed main()
{
        cin>>n;
        for (int i=1; i<=n; i++) {
                string s1;
                cin>>s1;
                Map[s1]++;
        }
        cout<<"AC x "<<Map["AC"]<<endl;
        cout<<"WA x "<<Map["WA"]<<endl;
        cout<<"TLE x "<<Map["TLE"]<<endl;
        cout<<"RE x "<<Map["RE"]<<endl;
        return 0;
}


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

int main(){    
  ll a,b,c,d,e,k;
  cin >> a >> b >> c >> d >> e >> k;
  
  if (e - a <= k) cout << "Yay!" << endl;
  else cout << ":(" << endl;
}


Measured memory_bytes: 256
#include "bits/stdc++.h"
#define DEBUG(x) cout<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cout<<#v<<":";for(int i=0;i<v.size();i++) cout<<" "<<v[i]; cout<<endl
#define vi vector<int>
#define vl vector<ll>
#define vii vector< vector<int> >
#define vll vector< vector<ll> >
#define vs vector<string>
#define pii pair<int,int>
#define pis pair<int,string>
#define psi pair<string,int>
#define pll pair<ll,ll>
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define MOD 1000000007
#define mod 1000000009
#define pi 3.14159265358979323846
#define Sp(p) cout<<setprecision(15)<< fixed<<p<<endl;
int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };

int dx2[8] = { 1,1,0,-1,-1,-1,0,1 }, dy2[8] = { 0,1,1,1,0,-1,-1,-1 };
typedef long long ll;
const int inf = 1000000001;
const ll INF = 1e18 * 4;
using namespace std;

int main(){
    int N, K;
    int h[100001];
    cin >> N >> K;
    rep(i, 0, N) cin >> h[i];    
    int dp[100001];
    rep(i, 0, 100001) dp[i] = inf;
    dp[0] = 0;
    for(int i=0; i<N; i++){
        for(int k=1; k<=K; k++){
            if(i-k >= 0){
                dp[i] = min(dp[i], dp[i-k] + abs(h[i] - h[i-k]));
            }
        }
    }
    /*    
    dp[0] = 0;
    for(int i=1; i<N; i++){
        int minCost = dp[i-1] + abs(h[i] - h[i-1]);
        for(int k=1; k<=K; k++){
            if(i-k >= 0){
                minCost = min(minCost, dp[i-k] + abs(h[i] - h[i-k])); 
            }
        } 
        dp[i] = minCost;
    }
    */
    cout << dp[N-1] << endl;
    return 0;
}




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

using namespace std;

int main(){
   int a,b;
    int counter=0;
   cin>>a>>b;

    int d[b+5];
    int k[a+5];
    int A[a+5]={};

    for(int i=0;i<b;i++){
        cin>>d[i];
        for(int j=0;j<d[i];j++){
            cin>>k[j];
            A[k[j]]++;
        }
    }

    for(int i=0;i<a+5;i++){
        if(A[i]!=0){
            counter++;
        }
    }

    cout<<a-counter<<endl;
}


Measured memory_bytes: 3596
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repo(i,n) for(int i = 1; i < (int)(n); i++)
#define pb push_back
#define np next_permutation
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define mod 1000000007
#define pi acos(-1.0)
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
//intの最大値2147483647 ≒ 2×10^9
//long longの最大値9223372036854775807 ≒ 9×10^18
//'0'+=16;        で大文字に
//'大文字'+=32;    で小文字に
//s[i]-'0'でchar文字→int数に;
//string s = to_string(int数);
//int n = stoi(string文字列)
//cout << fixed << setprecision (20);   小数点以下2０桁まで
//実行時間制約2秒では２×10^8回くらいまで計算できる


int main() {
  int a,b,c;
  cin >> a>>b>>c;
 
  rep(i,a+1){
    rep(j,b+1){
      if((a-i)*j+(b-j)*i==c) {
      cout << "Yes" << endl;
      return 0;  
      }
    }
  }
  
  cout << "No" << endl;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc1 = new Scanner(System.in);

		int a = sc1.nextInt();
		int b = sc1.nextInt();
		int ans = 0;

		if (a > b) {
			ans += a;
			a--;
		}
		else {
			ans += b;
			b--;
		}

		if (a > b) {
			ans += a;
			a--;
		}
		else {
			ans += b;
			b--;
		}

		System.out.println(ans);

		sc1.close();

	}

}

Measured memory_bytes: 23252
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
#define ll long long

const int Mod=1e9+7;
struct Edge{
	ll x,y,z;
	inline bool operator<(const Edge&a)const{
		return z<a.z;
	}
}o[2015];
struct edge{
	ll to,cost;
	edge(ll to,ll cost):to(to),cost(cost){}
};
ll n,m,f[2015],num,mx[2011][2011];
ll k,ans,sum1,sum2;
vector<edge>e[2015];
int gf(int x){
	return x==f[x]?x:f[x]=gf(f[x]);
}
inline int pow(int a,int b){
	int sum=1;
	while(b){
		if(b&1)sum=1ll*sum*a%Mod;
		a=1ll*a*a%Mod,b>>=1;
	}
	return sum;
}
void dfs(int x,int f,int d,int s){
  mx[x][s]=d;
  for(int i=0;i<e[x].size();++i)
    if(e[x][i].to!=f) dfs(e[x][i].to,x,max((ll)d,e[x][i].cost),s);
}
inline int calc(ll x){
  int cnt=m;
  for(int i=1;i<=m;i++)
    if(ans+o[i].z-mx[o[i].x][o[i].y]<x) cnt--;
  int p=1; cnt=cnt==m?cnt:cnt+1;
  for(int i=1;i<=cnt;i++) p=2LL*p%Mod;
  return p;
}
int main(void){
	ll i,x,y,z;
	scanf("%lld%lld%lld",&n,&m,&k);
	for(i=1;i<=n;++i)f[i]=i;
	for(i=1;i<=m;++i)scanf("%lld%lld%lld",&o[i].x,&o[i].y,&o[i].z);
	sort(o+1,o+m+1);
	for(i=1;i<=m;++i){
		x=o[i].x,y=o[i].y;
		if(gf(x)==gf(y))continue;
		ans+=o[i].z,f[gf(x)]=gf(y),e[x].push_back(edge(y,o[i].z)),e[y].push_back(edge(x,o[i].z));
	}
	for(i=1;i<=n;++i)
		dfs(i,0,0,i);
  	printf("%d\n",(calc(k)+Mod-calc(k+1))%Mod);
	return 0;
}

Measured memory_bytes: 16256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T> vector<T> makev(T* b, T* e) {
    vector<T> vec;
    for (auto i = b; i != e; ++i) vec.push_back(*i);
    return vec;
}
struct err {
    err& operator <<(string s) { cerr << s; return *this; }
    template<class T1, class T2> err& operator <<(pair<T1, T2> x) { return *this << "(" << x.first << ", " << x.second << ")"; }
    template<class T> typename enable_if<is_scalar<T>::value == 1, err&>::type operator <<(T a) { cerr << boolalpha << a; return *this; }
    template<class T> typename enable_if<is_scalar<T>::value == 0, err&>::type operator <<(T a) {
        *this << "{";
        for (auto i = begin(a); i != end(a); ++i)
            *this << ", " + 2 * (i == begin(a)) << *i;
        return *this << "}";
    }
};
#define aty(...) "[ " << #__VA_ARGS__ << " : " << __VA_ARGS__ << " ]\n"




int32_t main() {
    int a, b;
    scanf("%d%d", &a, &b);
    if (a <= 9 && b <= 9)
        printf("%d\n", a * b);
    else
        printf("-1\n");
}


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

import re

n = input()
n = re.split(" ",n)

if(int(n[0]) > int(n[1])):
    if(int(n[1]) > int(n[2])):
        print("No")
    elif(int(n[2]) > int(n[0])):
        print("No")
    else:
        print("Yes")
else:
    if(int(n[1]) < int(n[2])):
        print("No")
    elif(int(n[2]) < int(n[0])):
        print("No")
    else:
        print("Yes")


Measured memory_bytes: 3188
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;



int main(void) {
	string Sd,T;
	cin >> Sd;
	cin >> T;

	for(int i= Sd.size() - T.size(); i>=0; i--) {
		bool success = true;
		for(int j=0; j< T.size(); j++) {
			if( Sd[i+j] == T[j] || Sd[i+j] == '?') {
			}else {
				success = false;
				break;
			}
		}
		if( success ) {
			for(int j=0; j< T.size(); j++) {
				if( Sd[i+j] == '?') {
					Sd[i+j] = T[j];
				}
			}
			for(int j=0; j< Sd.size(); j++) {
				if( Sd[j] == '?') {
					cout << 'a';
				}else {
					cout << Sd[j];
				}
			}
			cout << endl;
			return 0;
		}
	}

	cout << "UNRESTORABLE" << endl;
	return 0;
}

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

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

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

	int Q=in();
	vector<int> V;
	REP(i,Q){
		int q=in();
		switch(q){
		case 0:
			V.push_back(in());
			break;
		case 1:
			out(V[in()]);
			break;
		default:
			V.pop_back();
		}
	}

	return 0;
}


Measured memory_bytes: 3888
import java.util.Scanner;

public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a < b && b < c) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}



Measured memory_bytes: 26348
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b = na()
s = str(a)*b
t = str(b)*a
if s < t:
    print(s)
else:
    print(t)


Measured memory_bytes: 3064
import sys

def solve():
    input = sys.stdin.readline
    N, K = map(int, input().split())
    A = [int(a) for a in input().split()]
    mod = 7 + 10 ** 9
    fact = [1] * (N + 1)
    revfact = [1] * (N + 1)
    for i in range(N):
        fact[i+1] = ((i+1) * fact[i]) % mod
    revfact[N] = pow(fact[N], mod - 2, mod)
    for i in reversed(range(N)):
        revfact[i] = ((i + 1) * revfact[i + 1]) % mod

    minus = 0
    plus = 0
    A.sort()
    
    for i, a in enumerate(A):
        if N - i >= K:
            minus += (a * (fact[N - i - 1] * revfact[N - i - K] * revfact[K - 1]) % mod ) % mod
            minus %= mod
       
        if i >= K - 1:
            plus += (a * (fact[i] * revfact[i - K + 1] * revfact[K - 1]) % mod) % mod
            plus %= mod
          

    print((plus - minus) % mod)

    return 0

if __name__ == "__main__":
    solve()

Measured memory_bytes: 15312
#include <iostream>
#include <vector>
#include <algorithm>

int main() {
  unsigned int N;
  std::cin >> N;

  std::vector<int> H_array(N);
  for (unsigned int i = 0; i < N; ++i) {
    std::cin >> H_array.at(i);
  }

  unsigned int max = 0;
  unsigned int current = 0;

  for (unsigned int i = 0; i < N - 1; ++i) {
    const unsigned int h = H_array.at(i);
    const unsigned int next = H_array.at(i + 1);
    if (h >= next) {
      current += 1;
    } else {
      max = std::max(max, current);
      current = 0;
    }
  }

  std::cout << std::max(max, current) << std::endl;

  return 0;
}


Measured memory_bytes: 640
#include <stdio.h>

int main(void){
    char s[5];
    int memo[26] = {};
    int i,j=0;
    scanf("%s", s);
    
    for(i = 0; i < 4; i++){
        memo[s[i] - 'A']++;
    }
    
    for(i = 0; i < 26; i++){
        //printf("%d:%d\n", i, memo[i]);
        if(memo[i] == 2){
            j++;
        }
    }
    
    if(j == 2){
        puts("Yes");
    }else{
        puts("No");
    }
    
    return 0;
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 1000

int N,num_query;
vector<int> V[NUM];

int main(){

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

	int command,A,B;

	for(int loop = 0; loop < num_query; loop++){

		scanf("%d",&command);

		switch(command){
		case 0:

			scanf("%d %d",&A,&B);
			V[A].push_back(B);
			break;

		case 1:

			scanf("%d",&A);
			if(V[A].size() == 0){

				printf("\n");

			}else{

				printf("%d",V[A][0]);

				for(int i = 1; i < V[A].size(); i++){
					printf(" %d",V[A][i]);
				}
				printf("\n");
			}

			break;
		case 2:
			scanf("%d",&A);
			V[A].clear();
			break;
		}
	}

	return 0;
}




Measured memory_bytes: 5792
#include<bits/stdc++.h>
 
#define rep(i,n) for(ll i = 0;i < n;++i)
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
typedef pair<int,int> P;
 
const int INF = 1001001001;
const long double PI = (acos(-1));
const int mod = 1e9+7;
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};


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

    int h1,m1,h2,m2,k;
    cin >> h1 >> m1 >> h2 >> m2 >> k;
    h1 *= 60;
    h1 += m1;
    h2 *= 60;
    h2 += m2;
    int ans = h2 - k;
    ans -= h1;
    cout << ans << endl;

    
    cout << endl;
    return 0;
}


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

typedef long long ll;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll K, N;
    cin >> K >> N;
    vector<int> v(N);
    for(int i = 0; i < N; i++){
    cin >> v[i];
    }

    ll ans = v[N-1] - v[0];
    for(int i = 1; i < N; i++){
    ans = min(ans, v[i-1]+K-v[i]);
    }

    cout << ans;
    return 0;
}


Measured memory_bytes: 1024
//by xxj
#include<bits/stdc++.h>
using namespace std;
#define fst first
#define snd second
#define mp make_pair
#define ll long long
#define pii pair<int,int>
#define lowbit(x) x&-x
const int inf=1e9+7;
const double eps=1e-10;
const ll linf=1e18+7;
const ll hh=523;
//const int mod=;
vector<int> G[10007];
int cnt=0;
int c[10007],ans[10007];
void dfs(int v,int p){
	for (int i=0;i<G[v].size();i++){
		int u=G[v][i];
		if (u==p){
			continue;
		}
		dfs(u,v);
	}
	ans[v]=c[cnt++];
}
int main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	int n;
	scanf("%d",&n);
	for (int i=0;i<n-1;i++){
		int x,y;
		scanf("%d%d",&x,&y);
		x--;
		y--;
		G[x].push_back(y);
		G[y].push_back(x);
	}
	int sum=0;
	for (int i=0;i<n;i++){
		scanf("%d",c+i);
		sum+=c[i];
	}
	sort(c,c+n);
	sum-=c[n-1];
	dfs(0,-1);
	printf("%d\n",sum);
	for (int i=0;i<n;i++){
		if (i==n-1){
			printf("%d\n",ans[i]);
		}
		else{
			printf("%d ",ans[i]);
		}
	}
	return 0;
}
/*
input:
*/


Measured memory_bytes: 1536
N, Y =  map(int, input().split())
x, y, z = -1, -1, -1
for i in range(N + 1):
    for j in range(N + 1):
        k = N - i - j
        if k >= 0 and 10000 * i + 5000 * j + 1000 * k == Y:
            x, y, z = i, j, k
print(x, y, z)

Measured memory_bytes: 3060
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<queue>
#include<stack>
#include<cmath>	

using namespace std;


int main() {
	vector<long long> A;
	vector<long long> step;
	long long N;
	long long M;
	long long preStep = 0;
	cin >> N;
	cin >> M;

	long long sumCount = 1;

	for (long long i = 0; i <= M; ++i) {
		long long stepCount = 0;
		vector<long long> count;
		count.push_back(1);
		count.push_back(1);
		long long step;
		if (i == M) {
			step = N + 1;
		}
		else {
			cin >> step;
		}
		if (step == preStep) {
			cout << 0 << endl;
			return 0;
		}
		for (long long j = preStep; j < step; ++j) {
			if (stepCount <= 1) {
				++stepCount;
			}
			else {
				count.push_back((count[count.size() - 2] + count[count.size() - 1]) % 1000000007);
			}
		}
		sumCount *= count[count.size() - 1];
		sumCount %= 1000000007;
		preStep = step + 1;

	}
	cout << sumCount % 1000000007 << endl;


	return 0;
}

Measured memory_bytes: 1400
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define all(v) v.begin(),v.end()
#define repf(i,a,b) for(ll i=a;i<b;i++)
#define repb(i,a,b) for(ll i=a;i>=b;i--)
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mod 1000000007
#define MOD 998244353 

using namespace std;
using namespace __gnu_pbds;

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

ordered_set<ll> ors;

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

ll power(ll a, ll n, ll m)
{
    ll ans=1;
    while(n)
    {
        if(n&1) ans=(ans*a)%m;
        n>>=1;
        a=(a*a)%m;
    }
    return ans;
}

ll invmod(ll a, ll m)
{
    return power(a,m-2,m);
}

ll lp[10000001];

void prime()
{
    repf(i,1,10000001) lp[i]=i;
    repf(i,2,10000001)
    {
        if(lp[i]==i)
        {
            for(ll j=2*i;j<10000001;j+=i)
            {
                if(lp[j]==j) lp[j]=i;
            }
        }
    }
}

ll w(ll a, ll b) {
    ll res=(b/2)*(a/2)+ceil((ld)b/2)*ceil((ld)a/2);
    return res;
}

ll W(ll a, ll b, ll c, ll d) {
    return w(c,d)-w(a-1,d)-w(c,b-1)+w(a-1,b-1);
}

ll B(ll a, ll b, ll c, ll d) {
    return (c-a+1)*(d-b+1)-W(a,b,c,d);
}

ll fr[100001];

void solve(ll tt) {
    ll n;
    cin>>n;
    ll a[n],sum=0;
    repf(i,0,n) {
        cin>>a[i];
        sum+=a[i];
        fr[a[i]]++;
    }
    ll q;
    cin>>q;
    // cout<<sum<<endl;
    while(q--) {
        ll b,c;
        cin>>b>>c;
        sum-=fr[b]*b;
        sum+=fr[b]*c;
        fr[c]+=fr[b];
        fr[b]=0;
        cout<<sum<<endl;
    }
}

int main()
{
    IOS;
    ll t;
    // cin>>t;
    t=1;
    repf(tt,1,t+1) {
        solve(tt);
    }
}     

Measured memory_bytes: 5124