akhauriyash/Code-Regression huggingface dataset:
//Sale Result
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

vector<string> order;//入力された順番
map<string, ll> mp;

int main(){
  int n;
  while(cin>>n){
    if(n==0)break;
    vector<string>::iterator it;
    order.clear();
    mp.clear();
    for(int i=0; i<n; i++){
      string p;
      ll u, a;
      cin>>p>>u>>a;
      it=find(order.begin(), order.end(), p);
      if(it==order.end()){
        order.push_back(p);
        mp.insert(make_pair<string, ll>(p, 0));
      }
      mp[p]+=u*a;
    }
    bool flag=true;
    for(it=order.begin(); it!=order.end(); it++){
      if(mp[*it]>=1000000){
        cout<<*it<<endl;
        flag=false;
      }
    }
    if(flag)cout<<"NA"<<endl;
  }
  return 0;
}

Measured memory_bytes: 1336
//C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#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>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// 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>

#if __cplusplus >= 201103L
#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>
#endif

//ここまで毎回include
//以下プログラム

using namespace std;

int main() {
	string s;
	cin >> s;
	int result = 0;
		for (int i = 0; i < s.size() / 2; i++) {
			if (s.at(i) != s.at(s.size() - 1 - i))
				result++;
		}
	cout << result << endl;
}

Measured memory_bytes: 256
/*
      HET PAGHADAR
      DA-IICT
      @HET262
*/
 
#include<bits/stdc++.h>
using namespace std;
 
typedef long double ld;
typedef long long ll;
 
typedef vector<ll> vec;
#define INF LLONG_MAX
 
#define P pair<ll,ll>
#define int long long int
 
#define ff first
#define ss second
 
#define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
 
#define N 100005
#define MOD 1000000007

ll n,kk;
ll a[105];
ll dp[N][2];

ll solve(ll k,bool curr)
{
      if(k<0)
            return true;
      if(a[1]>k)
            return false;
            
      ll &ans=dp[k][curr];
      if(ans!=-1)
            return ans;
      
      ans=0;
      for(int i=1;i<=n;i++)
      {
            bool flag=solve(k-a[i],1^curr);
            if(!flag)
                  return ans=1;
      }
      
      return ans;
}

signed main()
{
      FAST;
      
      cin>>n>>kk;
      
      for(int i=1;i<=n;i++)
            cin>>a[i];
            
      memset(dp,-1,sizeof(dp));  
      bool ans=solve(kk,0);
      
      if(ans==1)
            cout<<"First\n";
      else
            cout<<"Second\n";
}

Measured memory_bytes: 6528
#include<stdio.h>

int A[100000], n;

int binarySearch(int key){
  int left = 0, right = n;
  int mid;
  while (left < right){
    mid = (left + right) / 2;
    if (A[mid] == key) return 1;
    if (A[mid] > key) right = mid;
    else if (A[mid] < key) left = mid + 1;
  }
  return 0;
}

int main(){
  int i, q, key, sum = 0;
  scanf("%d", &n);
  for (i=0; i<n; i++){
    scanf("%d", &A[i]);
  }

  scanf("%d", &q);
  for (i=0; i<q; i++){
    scanf("%d", &key);
    if ( binarySearch(key) ) sum++;
  }

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

  return 0;
}



Measured memory_bytes: 2108
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>
#include<functional>
#include<stack>
#include<utility>
#include<map>

using namespace std;

int main() {
	int n, d[1000], a[100000]{ 0 }, ord = 10, cnt = 1;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> d[i];
		a[d[i]]++;
	}
	while (1) {
		for (int i = 0; i < ord; i++) {
			if (a[i] == 0) {
				cout << i << endl;
				return 0;
			}
		}
		for (int i = 0; i < n - cnt; i++) {
			int tmp = 0;
			for (int j = 0; j <= cnt; j++) {
				int z = 1;
				for (int k = 0; k < j; k++)z *= 10;
				tmp += d[i + cnt - j] * z;
			}
			a[tmp]++;
		}
		ord *= 10;
		cnt++;
	}
}

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

int main() {
  string A,B,C;
  cin >> A >> B >> C;
  
  char a = A.at(0);
  char b = B.at(0);
  char c = C.at(0);
  
  cout << a << b << c << endl;
}


Measured memory_bytes: 3600
def gcd(m, n):
    while n:
        m, n = n, m % n
    return m


N = int(input())
A = list(map(int, input().split()))

left = [0]
right = [0]

# 累積GCDを使う

for i in range(N):
    left.append(gcd(left[-1], A[i]))
    right.append(gcd(right[-1], A[N-1-i]))  # Aの後ろからアクセス

right.reverse()

gcd_list = [gcd(left[i], right[i+1]) for i in range(N)]
print(max(gcd_list))


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            String aa = "", bb = "";
            for (int i = 0; i < a; i++) {
                aa += b;
            }
            for (int i = 0; i < b; i++) {
                bb += a;
            }
            String ans = aa;
            if (bb.compareTo(aa) < 0) {
                ans = bb;
            }
            out.println(ans);
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

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

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

    }
}



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

int main() {
  int N;
  cin >> N;
  vector<int>a(N);
  for(int i=0; i<N; i++)cin >> a.at(i);
  
  int count = 1;
  int ans = 0;
  
  for(int i=0; i<N; i++){
    if(a.at(i)==count)count++;
    else ans ++;
  }
  
  if(ans==N)ans=-1;
  cout << ans << endl;
}

Measured memory_bytes: 3956
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef tree<ll,null_type,less<ll>,rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define int ll
#define endl "\n"
#define all( x ) x.begin(), x.end()
#define rev_all( x ) x.rbegin(), x.rend()
#define fast ios::sync_with_stdio(0);cin.tie(0);

typedef unsigned long long ull;

const int inf = 1e9 + 5;
const long double PI = 3.141592653589793;

void solve(){
  int n, m, k, ans = 0;
  cin >> n >> m >> k;
  vector<vector<char>> grid(n, vector<char>(m));
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m; j++){
      cin >> grid[i][j];
    }
  }
  /*for(auto v:grid){
    for(char c:v){
      cout << c;
    }
    cout << endl;
  }*/
  for(int i = 0; i < (1 << n); i++){
    for(int j = 0; j < (1 << m); j++){
      auto cop = grid;
      for(int bit1 = 0; bit1 < n; bit1++){
        for(int bit2 = 0; bit2 < m; bit2++){
          if( i & (1 << bit1)){
            for(int x = 0; x < m; x++){
              cop[bit1][x] = 'r';
            }
          }
          if( j & (1 << bit2)){
            for(int x = 0; x < n; x++){
              cop[x][bit2] = 'r';
            }
          }
        }
      }
      int cnt = 0;
      for(auto v:cop){
        for(char c:v){
          if(c == '#'){
            cnt++;
          }
        }
      }
      if(cnt == k)ans++;
    }
  }
  cout << ans << endl;
  return;
}  
signed main(){
  fast;
  int t;
  t = 1;
  //cin>>t;
  while(t--){
    solve();
  }
}

Measured memory_bytes: 3604
using System;
using System.Collections.Generic;
using System.Text;

namespace AtTest.D_Challenge
{
    class ABC_043
    {
        static void Main(string[] args)
        {
            Method(args);
            Console.ReadLine();
        }

        static void Method(string[] args)
        {
            string s = Read();
            for (int i = 0; i < s.Length - 1; i++)
            {
                if (i < s.Length - 2 && s[i] == s[i + 2])
                {
                    Console.WriteLine((i + 1) + " " + (i + 3));
                    return;
                }
                else if (s[i] == s[i + 1])
                {
                    Console.WriteLine((i + 1) + " " + (i + 2));
                    return;
                }
                else
                {
                    continue;
                }
            }
            Console.WriteLine("-1 -1");
        }

        private static string Read() { return Console.ReadLine(); }
        private static int ReadInt() { return int.Parse(Read()); }
        private static long ReadLong() { return long.Parse(Read()); }
        private static double ReadDouble() { return double.Parse(Read()); }
        private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }
        private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }
        private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }
    }
}


Measured memory_bytes: 13396
#include<bits/stdc++.h>
using namespace std;
#define MAX 100000
typedef long long ll;

struct edge{
  ll to,cost;
  edge(ll to,ll cost):to(to),cost(cost) {}
};

int N;
vector< edge > G[MAX];
ll dist[MAX];
int depth[MAX];
int parent[MAX];
int dp[30][MAX];

int lca(int a,int b){
  if(depth[a]>depth[b])swap(a,b);
  int x=depth[b]-depth[a];
  for(int i=0;i<30;i++)
    if(x>>i&1)b=dp[i][b];
  if(a==b)return a;
  for(int i=29;i>=0;i--){
    if(dp[i][a]!=dp[i][b]){
      a=dp[i][a];
      b=dp[i][b];
    }
  }
  return parent[a];
}

ll solve(int a,int b){
  int c=lca(a,b);
  return dist[a]+dist[b]-dist[c]*2LL;
}

void dfs(int pos,int prev,int d){
  depth[pos]=d;
  parent[pos]=prev;
  for(edge e:G[pos]){
    if(e.to==prev)continue;
    dist[e.to]=dist[pos]+e.cost;
    dfs(e.to,pos,d+1);
  }
}

int main(){
  cin>>N;
  for(int i=0;i<N-1;i++){
    ll a,b,cost;
    cin>>a>>b>>cost;
    a--,b--;
    G[a].push_back( edge(b,cost) );
    G[b].push_back( edge(a,cost) );
  }
  
  dist[0]=0;
  dfs(0,-1,0);

  for(int i=0;i<N;i++)dp[0][i]=parent[i];
  
  for(int i=1;i<30;i++){
    for(int v=0;v<N;v++){
      int w=dp[i-1][v];
      if(w!=-1)w=dp[i-1][w];
      dp[i][v]=w;
    }
  }
  
  int Q,K;
  cin>>Q>>K;
  K--;
  
  while(Q--){
    int a,b;
    cin>>a>>b;
    a--,b--;
    cout<< solve(a,K)+solve(K,b) <<endl;
  }
  return 0;
}


Measured memory_bytes: 29312
#include <iostream>
#include <string>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <ctime>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <assert.h>
#include <iomanip>
#include <bitset>
using namespace std;
#define vi vector<int>
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define SZ(x) (int)(x.size())
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,a,b) for(int i=b-1;i>=a;i--)
#define inf 1000000007
#define mod 1000000007
#define x first
#define y second
#define pi acos(-1.0)
#define DBG(x) cerr<<(#x)<<"="<<x<<"\n";
//#define dprintf(...)
#define hash _hash
//#define dprintf(...) fprintf(outFile,__VA_ARGS__)

#define FOREACH(it,x) for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define ull unsigned long long
#define ll long long
#define N 500010

template <class T,class U>inline void Max(T &a,U b){if(a<b)a=b;}
template <class T,class U>inline void Min(T &a,U b){if(a>b)a=b;}

//FILE* outFile;

inline void add(int &a,int b){a+=b;while(a>=mod)a-=mod;}

int pow(int a,int b){
    int ans=1;
    while(b){
        if(b&1)ans=ans*(ll)a%mod;
        a=(ll)a*a%mod;b>>=1;
    }
    return ans;
}

int cnt[1<<19], dp[1<<19][2], bit[1<<19];
vector<pii> g[20];
int dfs(int u, int t, int fa = -1){
    if(u == t)return 0;
    for(auto &o : g[u]){
        if(o.x == fa)continue;
        int ret = dfs(o.x, t, u);
        if(ret >= 0)return (1<<o.y)|ret;
    }
    return -1;
}
int main(){
    int j,k,i,T,ca=0,K=0,m, n;
    scanf("%d%d", &n, &m);
    rep(i, 0, n-1){
        scanf("%d%d", &j, &k);j--,k--;
        g[j].pb({k, i}), g[k].pb({j, i});
    }
    rep(i, 0, m-(n-1)){
        scanf("%d%d", &j, &k);j--, k--;
        K = dfs(j, k);
        cnt[K]++;
    }
    int sz = n - 1;
    rep(i, 0, sz){
        rep(j, 0, (1<<sz))if(j >> i & 1)cnt[j] += cnt[j^(1<<i)];
    }
    rep(i, 1, (1<<sz)){
        bit[i] = bit[i>>1] + (i&1);
    }
    dp[0][0] = 1;
    int msk = (1<<sz) - 1;
    rep(j, 0, m - sz + 1){
        rep(s, 0, (1<<sz))if(dp[s][0] || dp[s][1]){
            int t = msk ^ s;
            int v = j + bit[s] + 1;
            int w = (1LL * dp[s][0] * v + dp[s][1] ) % mod;
            for(k = (t & -t); k; t -= k, k = t & -t){
                (dp[k | s][0] += dp[s][0]) %= mod;
                (dp[k | s][1] += w) %= mod;
            }
        }
        if(j == m - sz)break;
        rep(s, 0, (1<<sz))if(cnt[s] >= j){
            dp[s][0] = 1LL * dp[s][0] * (cnt[s] - j) % mod;
            dp[s][1] = 1LL * dp[s][1] * (cnt[s] - j) % mod;
        }
    }
    printf("%d\n", dp[msk][1]);
    return 0;
}


Measured memory_bytes: 8448
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,a,b) for(int i=(a); i<(b); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
int main(){
    int n,k; cin >> n >> k;
    vector<int> v(n);
    rep(i, n) cin >> v[i];
    int ans = 0;
    for(int l = 0; l <= k; l++){
        for(int r = 0; r <= k-l; r++){
            if(l+r>n) break;
            int d = k-l-r;
            int tmp = 0;
            vector<int> c;
            rep(i,l){
                tmp += v[i];
                c.push_back(v[i]);
            }
            FOR(i,n-r,n){
                tmp += v[i];
                c.push_back(v[i]);
            }
            sort(ALL(c));
            int len = c.size();
            rep(i,d){
                if(i>=len) break;
                if(c[i] >= 0) break;
                tmp -= c[i];
            }
            ans = max(ans,tmp);
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
# coding: utf-8
# Your code here!
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
    
a, b, c, d = map(int,input().split())
def cal(i, j, k):
    return i // j + i // k - i // lcm(j, k)

if a % c == 0 or a % d == 0:
    print(b - a - (cal(b, c, d) - cal(a, c, d)))
else:
    print(b - a - (cal(b, c, d) - cal(a, c, d)) + 1)

Measured memory_bytes: 5048
import sys
from collections import Counter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n=int(input())
a=sorted(lmp(),reverse=True)
i=0
l=[]
while i<n-1:
    if a[i]==a[i+1]:
        l.append(a[i])
        i+=1
    i+=1
if len(l)>=2:
    print(l[0]*l[1])
else:
    print(0)

Measured memory_bytes: 14628
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
using namespace std;
 
int main(){
  int n;
  cin >> n;
  int a[n];
  rep(i,n)cin >> a[i];
  sort(a,a+n);
  int ans=0;
  rep(i,a[n-1]+1){
    int x=upper_bound(a,a+n,i+1)-lower_bound(a,a+n,i-1);
   ans=max(ans,x);
  }
  cout << ans << endl;
  return 0;}

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

typedef pair<int,int> P;
typedef pair<P,string> PP;

int main(void)
{

	int n;
	bool k = false;

	while(cin >> n,n){
		if(k)
			cout << endl;
	int win,lost,draw;
	PP team[10] = {};
	for(int i = 0; i < n; i++){
		cin >> team[i].second;
		cin >> win >> lost >> draw;
		team[i].first.first = win*3+draw;
		team[i].first.second= 10-i;
	}
	sort( team, team+10 );

	for(int i = 9; 10-i <= n; i--)
		cout << team[i].second << ',' << team[i].first.first << endl;


		k = 1;
	}


	return 0;
}

Measured memory_bytes: 1216
//00
#include<vector>
#include<iostream>
#include<cstdlib>
#include<string>

using namespace std;

int main(){
  for(int m,n;cin>>m>>n,m|n;){
    vector<int> v(m);
    for(int i=0;i<m;i++){
      v[i]=i+1;
    }
    int p=0;
    for(int i=1;i<=n;i++){
      string s;
      cin>>s;
      if(v.size()>1){
	bool f;
	if(i%15==0){
	  f=s=="FizzBuzz";
	}else if(i%3==0){
	  f=s=="Fizz";
	}else if(i%5==0){
	  f=s=="Buzz";
	}else{
	  f=atoi(s.c_str())==i;
	}
	if(f){
	  p=(p+1)%v.size();
	}else{
	  v.erase(v.begin()+p);
	  p=p%v.size();
	}
      }
    }
    for(int i=0;i<v.size();i++){
      cout<<v[i]<<((i==v.size()-1)?'\n':' ');
    }
  }
  return 0;
}

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

const int CM = 1 << 17, CL = 12;
char cn[CM + CL], * ci = cn + CM + CL, * owa = cn + CM, ct;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	ll tmp = *(ll*)ci;
	int dig = 68 - __builtin_ctzll((tmp & ma0) ^ ma0);
	tmp = tmp << dig & ma1;
	tmp = tmp * 10 + (tmp >> 8) & ma2;
	tmp = tmp * 100 + (tmp >> 16) & ma3;
	tmp = tmp * 10000 + (tmp >> 32) & ma4;
	ci += 72 - dig >> 3;
	return tmp;
}
const int dm = 1 << 20;
char dn[dm], * di = dn;
inline void putint(int X) {
	int keta = 0;
	char C[10];
	while (X) {
		*(C + keta) = '0' + X % 10;
		X /= 10;
		keta++;
	}
	for (int i = keta - 1; i >= 0; i--)* di++ = (*(C + i));
	*di++ = '\n';
}

int to[400004], ne[400004], he[100001];
int kotae[100001], Q[100001];
int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	int N = getint(), M = getint();
	int k = 1;
	rep(i, M) {
		int a = getint(), b = getint();
		to[k] = b;
		ne[k] = he[a];
		he[a] = k++;
		to[k] = a;
		ne[k] = he[b];
		he[b] = k++;
	}

	int q = 0;
	Q[q++] = 1;
	kotae[1] = 1;
	rep(i, N) {
		int u = Q[i];
		for (int v = he[u]; v; v = ne[v]) {
			int To = to[v];
			if (!kotae[To]) {
				kotae[To] = u;
				Q[q++] = To;
			}
		}
	}
	printf("Yes\n");

	for (int i = 2; i <= N; i++) putint(kotae[i]);
	fwrite(dn, 1, di - dn, stdout);

	Would you please return 0;
}

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

int main()
{
    string w;
    cin >> w;

    map<char, int> count;
    for (int i = 0; i < w.size(); i++)
    {
        count[w[i]]++;
    }

    for (auto itr = count.begin(); itr != count.end(); itr++)
    {
        if (itr->second % 2 != 0)
        {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<string.h>
#include<string>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<math.h>
#include<queue>
#include<set>
#include<map>
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int,int> pii;
const int N=10000;
const db pi=acos(-1.0);
#define lowbit(x) (x)&(-x)
#define sqr(x) (x)*(x)
#define rep(i,a,b) for (register int i=a;i<=b;i++)
#define per(i,a,b) for (register int i=a;i>=b;i--)
#define fir first
#define sec second
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define maxd 998244353
#define eps 1e-8
int n,a[300300],b[300300],sum[300300],m,cnt[300300],ans[300300];

int read()
{
    int x=0,f=1;char ch=getchar();
    while ((ch<'0') || (ch>'9')) {if (ch=='-') f=-1;ch=getchar();}
    while ((ch>='0') && (ch<='9')) {x=x*10+(ch-'0');ch=getchar();}
    return x*f;
}

bool chk(int k,int tim)//每次选k个减1，能否减tim次 
{
	//cout << k << " " << tim << " " << sum[tim-1] << " " << (k-cnt[tim])*tim << endl;
	return sum[tim-1]>=1ll*(k-cnt[tim])*tim;
}

int main()
{
	n=read();
	rep(i,1,n) a[read()]++;
	rep(i,1,n)
		if (a[i]) b[++m]=a[i];
	sort(b+1,b+1+m);
	//rep(i,1,m) cout << b[i] << " ";cout << endl;
	rep(i,1,m) sum[b[i]]+=b[i];
	rep(i,1,n) sum[i]+=sum[i-1];
	rep(i,1,m) cnt[b[i]]++;
	per(i,n,1) cnt[i]+=cnt[i+1];
	rep(i,1,n)
	{
		int l=1,r=n;
		//cout << i << endl;
		while (l<=r)
		{
			int mid=(l+r)>>1;
			if (chk(i,mid)) {ans[i]=mid;l=mid+1;}
			else r=mid-1;
		}
	}
	rep(i,1,n) printf("%d\n",ans[i]);
	return 0;
}


Measured memory_bytes: 6528
#include <iostream>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <map>
#include <string>

using namespace std;

int main(void) {
  int a, b;
  cin >> a >> b;
  int x1, x2;
  if (a >= b) {
    x1 = b;
    x2 = a;
  } else {
    x1 = a;
    x2 = b;
  }
  for (int i = 0; i < x2; i++) {
    cout << x1;
  }
  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;
using P = pair<int, int>;
using vi = vector<int>;
using vs = vector<string>;
using vll = vector<long long>;
using vvi = vector<vector<int>>;
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 (b<a) {a=b; return 1;} return 0;}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int n;
    cin >> n;
    vll a(n);
    rep(i, n) cin >> a[i];
    map<ll, int> mp;
    rep(i, n) mp[a[i]]++;
    sort(a.rbegin(), a.rend());
    a.erase(unique(a.begin(), a.end()), a.end());
    vll ans;
    bool flag = false;
    
    rep(i, a.size()) {
        rep(j, mp[a[i]]/2) ans.push_back(a[i]);

        if (ans.size() >= 2) {
            flag = true;
            break;
        }
    }

    if (flag) {
        cout << ans[0] * ans[1] << endl;
    } else {
        cout << 0 << endl;
    } 
}

Measured memory_bytes: 7296
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define vi vector<int>
#define ff first
#define ss second
#define file_se_input  freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define pp long long int
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define pb push_back
#define mp make_pair
#define pi 3.141592653589793238
#define eb emplace_back
#define rep(i,a,b) for (int i = a; i <= b; i++)
#define zip(i,a,b) for(int i=a;i<b;i++)
#define rzip(i,a,b) for(int i=a;i>=b;i--)
#define ll unsigned long long int
#define test int t;cin>>t; while(t--)
#define um unordered_map
#define en '\n'
#define us unordered_set
typedef pair<int, int>     pii;
typedef pair<char, int>    pci;
typedef pair<char, char>   pcc;
typedef vector<pii>       vii;
typedef long double ld;
#define all(v) v.begin(), v.end()
#define INF (1e18+5)
#define inf (1e9+5)
#define mod 1000000007


bool check_prime(long long n)
{
	int flag = 0;
	for (long long i = 2; i * i <= n; i++)
	{
		if (n % i == 0)
		{
			flag = 1;
			break;
		}
	}
	if (n == 1)
		return false;
	else if (flag == 0 || n == 2 || n == 3)
	{
		return true;
	}
	else
	{
		return false;
	}

}

int BE(int x, int n, int m) //function to calculate x raise to power n modulo m
{
	int result = 1;
	while (n > 0)
	{
		if (n % 2 == 1)
			result = result * x % m;
		x = x * x % m;
		n = n / 2;
	}
	return result;
}

int32_t main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(0);
#ifndef ONLINE_JUDGE
	if (fopen("input.txt", "r"))
	{
		freopen ("input.txt" , "r" , stdin);
		freopen ("output.txt" , "w" , stdout);
	}
#endif
	//_______________________________-code starts-_______________________________________________

	int n;
	cin >> n;
	int a[n];
	zip(i, 0, n)
	{
		cin >> a[i];
	}
	int flag = 0;
	int i = 0;
	int ans = 1e9;
	int x = 0;
	zip(i, 0, n)
	{
		if (a[i] == x + 1)
		{
			x++;
		}
	}
	if (x == 0)
		cout << -1 << en;
	else
		cout << (n - x) << en;
	// while (i < n)
	// {
	// 	if (a[i] == 1)
	// 	{
	// 		flag = 1;
	// 		int x = 0;
	// 		while (a[i] == x + 1)
	// 		{
	// 			i++;
	// 			x++;
	// 		}
	// 		ans = min(n - x, ans);
	// 	}
	// 	else
	// 	{
	// 		i++;
	// 	}
	// }
	// if (flag == 0)
	// 	cout << -1 << en;
	// else
	// 	cout << ans << en;


	return 0;
}



Measured memory_bytes: 5164
/**
 *		author:  zvm
 *		created: 28.09.2020 10:18:12
**/

#include <bits/stdc++.h>

using namespace std ;

const int mxN = 16001 ;

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

	string s ;
	cin >> s ;
	
	int x, y ;
	cin >> x >> y ;

	int n = s.size();
	vector<vector<int>> move(2);

	int dir = 0, steps = 0 ;
	for( int i = 0 ; i < n ; ++i ) {
		if( s[i] == 'T' ) {
			move[dir].push_back(steps);
			steps = 0 ;
			dir ^= 1 ;
		}
		else {
			steps++ ;
		}
	}
	move[dir].push_back(steps);

	int N = move[0].size();
	int M = move[1].size();
	
	bitset<mxN> dpx ;
	bitset<mxN> dpy ;

	dpx[n+move[0][0]] = true ;
	dpy[n] = true ;

	for( int i = 2 ; i <= N ; ++i ) {
		dpx = (dpx<<move[0][i-1]) | (dpx>>move[0][i-1]) ;
	}
	for( int i = 1 ; i <= M ; ++i ) {
		dpy = (dpy<<move[1][i-1]) | (dpy>>move[1][i-1]) ;
	}

	cout << ( dpx[n+x] && dpy[n+y] ? "Yes" : "No" ) << endl ;
}


Measured memory_bytes: 3676
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            char a = in.next().charAt(0);
            char b = in.next().charAt(0);
            String ans = "=";
            if (a > b) ans = ">";
            else if (a < b) ans = "<";
            out.println(ans);
        }

    }
}



Measured memory_bytes: 21844
import java.util.*;
public class Main{
   public static void main(String[] args) {
     Scanner sc = new Scanner(System.in);
     int N = sc.nextInt();
     int K = sc.nextInt();
     String str = sc.next();
     String[] s = new String[N];
     String ans ="";
     String[] strArraySub = str.split("");
     String A = "A", B = "B",C = "C";
     String[] strArray = new String[str.length()];

     for (int i = 1; i < strArraySub.length; i++) {
      strArray[i - 1] = strArraySub[i];
     }
          if(strArraySub[K-1].equals(A)){
            strArraySub[K-1] ="a";
         }else if(strArraySub[K-1].equals(B)){
            strArraySub[K-1] ="b";
         }else if(strArraySub[K-1].equals(C)){
            strArraySub[K-1] = "c";
         }else{
           strArraySub[K-1] = "e";
         }

     for(int j =0;j<N;j++){
       ans += strArraySub[j];
     }
     System.out.println(ans);
   }
}


Measured memory_bytes: 21844
H,W=map(int,input().split())
delh=[]
delw=[]

sq=[list(input()) for i in range(H)]

for j in range(H):
    temp=0
    for k in range(W):
        if sq[j][k]==".":
            temp+=1
    if temp==W:
        delh.append(j)

for l in range(W):
    temp=0
    for m in range(H):
        if sq[m][l]==".":
            temp+=1
    if temp==H:
        delw.append(l)

for n in range(len(delh)):
    del sq[delh[n]]
    for q in range(len(delh)):
        delh[q]-=1
H-=len(delh)

for o in range(len(delw)):
    for p in range(H):
        del sq[p][delw[o]]
    for r in range(len(delw)):
        delw[r]-=1
        
for s in range(H):
    print("".join(sq[s]))


Measured memory_bytes: 9208
#include<bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
	string s, t, u;
	int a, b;
	cin >> s >> t >> a >> b >> u;
	if (s == u)--a;
	if (t == u)--b;
	cout << a << " " << b << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pint = pair<int,int>;
ll mod = 1000000007;
int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,1,-1,1,-1};
void chmin(long long &a, long long b) { if (a > b) a = b; }
const long long INF = 1LL<<60;
ll gcd(ll a,ll b){
    if(b == 0) return a;
    else return gcd(b,a%b);
}
int main() {
    int n,ans = 0;
    cin >> n;
    vector<ll> L(n);
    for (int i = 0; i < n; ++i) {
        cin >> L[i];
    }
    sort(L.begin(),L.end());

    for (int i = 0; i < n; ++i) {
        for (int j = i+1; j < n; ++j) {
            int k = lower_bound(L.begin(),L.end(),L[i]+L[j]) - L.begin();
            if(k-(j+1) > 0) ans += k-(j+1);
        }
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
using namespace std;
 //for study
int n, a[100005];
string s;
////////////////////////////////////////////////////////////////////////////////////////
int main() {
////////////////////////////////////////////////////////////////////////////////////////
	int i, k;
	cin>>s;
////////////////////////////////////////////////////////////////////////////////////////
	n = s.size();
////////////////////////////////////////////////////////////////////////////////////////
	for(i=0; i<n; i++) {
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
		if(s[i]=='R') k = i;
		else a[k + (i-k)%2]++;
////////////////////////////////////////////////////////////////////////////////////////
	}
////////////////////////////////////////////////////////////////////////////////////////
	for(i=n-1; i>=0; i--) {
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
		if(s[i]=='L') k = i;
////////////////////////////////////////////////////////////////////////////////////////
		else a[k - (k-i)%2]++;
	}
	for(i=0; i<n; i++) cout<<a[i]<<" ";
	return 0;
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define For(i,n,k) for(int i=(n);i<(k);i++)
#define ALL(a)  (a).begin(),(a).end()
ll ans=0;
void Main(){
    ll n;cin>>n;
    set<string> st;
    For(i,0,n){
        string s;cin>>s;
        st.insert(s);
    }
    cout<<st.size()<<endl;
}
int main(){
    Main();
    /*
    東方風神録は神が出てくるので当然神ゲー
    */
    return 0;
}

Measured memory_bytes: 19224
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int t = sc.nextInt();
        
        int time = t/a;
        int ab = b * time;
        
        System.out.println(ab);
    }
}

Measured memory_bytes: 21716
N, M = map(int, input().split())
STUDENTS = [tuple(map(int, input().split())) for _ in range(N)]
CHECKPOINTS = [tuple(map(int, input().split())) for _ in range(M)]
for student in STUDENTS:
	L = 10 ** 10
	for i, checkpoint in enumerate(CHECKPOINTS):
		l = abs(checkpoint[0] - student[0]) + abs(checkpoint[1] - student[1])
		if l < L:
			nc = i + 1
			L = l
	print(nc)


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

int main(){
    int H,W;
    cin >> H >> W;
    vector <string> S(H);
    vector <vector <string> > s(H, vector<string>(W));
    for(int i=0; i<H; i++){
        cin >> S[i];
    }

    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            s[i][j] = S[i][j];
        }
    }

    int ok=0;
    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            int okij=0;
            if(s[i][j] == "#"){
                if(0 <= i-1){
                    if(s[i-1][j] == "."){
                        okij++;
                    }
                }
                if(i+1 <= H-1){
                    if(s[i+1][j] == "."){
                        okij++;
                    }
                }
                if(0 <= j-1){
                    if(s[i][j-1] == "."){
                        okij++;
                    }
                }
                if(j+1 <= W-1){
                    if(s[i][j+1] == "."){
                        okij++;
                    }
                }
            }
            if(okij == 4){
                ok ++;
                break;
            }   
        }
        if(ok != 0){
            break;
        }
    }
    if(ok == 0){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
}

Measured memory_bytes: 384
def down_score(d, c, last_d, score):
    sum = 0
    for i in range(26):
        sum += c[i]*(d-last_d[i])
        
    return (score - sum)

def main():
    D = int(input())

    c = list(map(int, input().split()))

    s = [list(map(int, input().split())) for i in range(D)]

    #print(c)

    #print(s)

    last_d = [0 for i in range(26)]
    
    ans = []
    
    score = 0
    
    for i in range(D):
        max = 0
        idx = 0
        for j in range(26):
            if max < (s[i][j] + c[j] * (i-last_d[j])):
                max = s[i][j] + c[j] * (i-last_d[j])
                idx = j
        last_d[idx] = i+1
        score += s[i][j]
        down_score(i+1,c,last_d,score)
        
        ans.append(idx)

    for i in range(D):
        print(ans[i]+1)

if __name__ == "__main__":
    main()

Measured memory_bytes: 9532
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int>A(N);
  vector<int>B(N);
  int MaxA = 0;
  int Max;
  for (int i = 0; i < N; i++) {
    cin >> A.at(i) >> B.at(i);
    if (MaxA < A.at(i)){
      MaxA = A.at(i);
      Max = A.at(i) + B.at(i);
    }
  }
  cout << Max << endl;
}



Measured memory_bytes: 4044
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a) for(int i=0; i<(a); i++)
typedef long long ll;
template<typename T>
struct edge {
  int src, to;
  T cost;
  edge(int to, T cost) : src(-1), to(to), cost(cost) {}
  edge(int src, int to, T cost) : src(src), to(to), cost(cost) {}
  edge &operator=(const int &x) {
    to = x;
    return *this;
  }
  operator int() const { return to; }
};
template<typename T>
using Edges = vector<edge<T>>;
template<typename T>
using WeightedGraph = vector<Edges<T>>;
using UnWeightedGraph = vector<vector<int>>;
template<typename T>
using Matrix = vector<vector<T>>;

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

const ll inf = 1LL<<60;

int main()
{
  string s;
  cin >> s;
  string t;
  cin >> t;
  ll ans = 0;
  ll n = s.size();
  for (int i=0; i<n; i++) {
    if (s[i] != t[i]) ans++;
  }
  cout << ans << endl;

  return 0;
}


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

int main() {
  string s;
  int w;
  cin >> s >> w;
  for(int i = 0;i < s.size();i += w) cout << s[i];
  cout << "" << endl;
}

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

typedef long long ll;

int main() {
	int N, M;
	cin >> N >> M;
	vector<ll> a[3];
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 3; j++) {
			ll n; cin >> n;
			a[j].push_back(n);
		}
	}
	ll res=0;
	for (int bit = 0; bit < (1 << 3); bit++) {
		vector<ll> b;
		for (int i = 0; i < N; i++) {
			ll tmp=0;
			for (int j = 0; j < 3; j++) {
				if(bit & (1<<j)) tmp += a[j][i];
				else tmp -= a[j][i];
			}
			b.push_back(tmp);
		}
		sort(b.begin(), b.end(), greater<ll>());
		ll sum=0;
		for (int i = 0; i < M; i++) {
			sum += b[i];
		}
		res = max(res, sum);
	}

	cout << res << endl;
}

Measured memory_bytes: 256
from scipy.sparse.csgraph import floyd_warshall
N, M = map(int, input().split())

inf = float("inf")
graph = [[inf for _ in range(N)] for _ in range(N)]
edge = []
for i in range(M):
    a, b, c = map(int, input().split())
    graph[a-1][b-1] = c
    graph[b-1][a-1] = c
    edge.append([a-1, b-1])
w_graph = floyd_warshall(graph)

count = 0
for e in edge:
    e_s = e[0]
    e_e = e[1]
    used = False
    for i in range(N):
        if w_graph[i][e_e] == w_graph[i][e_s] + graph[e_e][e_s]:
            used = True
    if not used:
        count += 1

print(count)


Measured memory_bytes: 17572
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) {for(auto i: x){cout << i << " ";} cout << endl;}
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  // 全部入れてからsort
  int K;
  cin >> K;
  queue<ll> que;
  for (int i = 1; i < 10; i++) {
    que.push(i);
  }
  rep(i, K-1) {
    ll x = que.front(); que.pop();
    int first = x % 10;
    if (first >= 1) que.push(x*10 + first - 1);
    que.push(x*10 + first);
    if (first <= 8) que.push(x*10 + first + 1);
  }
  ll ans = que.front();
  cout << ans << '\n';
  return 0;
}

Measured memory_bytes: 5048
#include <stdio.h>

int main()
{
  int n,q,i,j,onaji=0;

  scanf("%d",&n);
  int S[n+1];
  for(i=0;i<n;i++)scanf("%d",&S[i]);

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

  for(j=0;j<q;j++)
    {
      i=0;
      S[n]=T[j];
      while(S[i]!=T[j])
	{
	  i++;
	}
      if(i!=n)onaji++;
    }

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

  return 0;
}



Measured memory_bytes: 2108
#include <bits/stdc++.h>
#include <algorithm>
#define rep(i, n) for (int i=0; i<n; ++i)
#define all(obj) (obj).begin(),(obj).end()
using namespace std;
typedef long long ll;
long long GCD(long long x, long long y) { return y ? GCD(y, x%y) : x; }

int main(){
    int N, M;
    cin >> N >> M;
    cout << (N==M ? "Yes": "No") << endl;
    return 0;
}


Measured memory_bytes: 3628
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 10000000000
using namespace std;
using ll = long long;
int main()
{
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,n){
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    auto it1 = lower_bound(a.begin(), a.end(), a[n - 1]/2);
    auto it2 = it1-1;
    cout << a[n - 1] << endl;
    if(*it2 < (a[n-1]-*it1)){
        swap(it2, it1);
    }
    cout << *it2 << endl;
}


Measured memory_bytes: 640
#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;}

constexpr int atcoder_mod = 1e9+7;

using namespace std;
using ll = long long;

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)...);}

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

	int A=in(),B=in();
	if(A>B) out("a > b");
	else if(A<B) out("a < b");
	else out("a == b");
	
	return 0;
}



Measured memory_bytes: 3156
#include <stdio.h>

int main(void) {
	int n, x, j, s, c;
	for(;;) {
		scanf("%d %d", &n, &x);
		if (n+x==0) exit(0);
		for (c=0,s=x-n; n>2; s=x- --n) {
			for (s-=(j=n-1); (s<j)&(j>1); s++,j--) {
				if ((s>0)&(s<j)) {
					c++;
				}
			}
		}
		printf("%d\n", c);
	}
}

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

{
	int n,k,i=1,g,h;
	cin>>n>>k;
	set<int>p;
	while(n--)
	{
		p.insert(i);
		i++;
	}
	while(k--)
	{
		cin>>g;
		while(g--)
		{
			cin>>h;
			if(p.count(h)==1)
			p.erase(h);
		}
	}
	cout<<p.size();
}


Measured memory_bytes: 3576
#include<stdio.h>

#define MAXLENGTH 10000
int main(void)
{
	int i = 0, j, n, x, xx = 0, a = 1, b = 2, c = 3;
	int count[MAXLENGTH];

	while (1)
	{
		count[i] = 0;

		scanf("%d %d", &n, &x);

		if ((n == 0) && (x == 0))
			break;
		for (a = 1; a <  (x / 3); a++)
		{
			for (b = a + 1; b <= n; b++)
			{
				for (c = b + 1; c <= n; c++)
				{
					xx = a + b + c;
					if (xx == x)
						count[i] += 1;
					if (xx > x)
					{
						xx = 0;
						break;
					}
				}
			}
		}
		i++;
	}
	for (j = 0; j < i; j++)
	{
		printf("%d\n", count[j]);
	}
}


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

long long m(long long n){
    if(n==0) return 1;
    else{
        
        long long z=2*m(n-1)+3;
        return z;
    }
}
long long f(long long n,long long x){
    if(x==0) return 0;
    else if (n==0) return 1;
    else if (x<=m(n-1)+1){
        long long a=f(n-1,x-1);
        return a;
    }
    else if(x<m(n)){
        long long b=f(n-1,m(n-1))+1+f(n-1,x-m(n-1)-2);
        return b;
    }
    else{
        long long c=2*f(n-1,m(n-1))+1;
        return c;
    }
}
int main() {
	long long n,k;
	cin>>n>>k;
	
	cout<<f(n,k);
	return 0;
}


Measured memory_bytes: 256
a,b,c,x,y=list(map(int,input().split()))
money=a*x+b*y

for i in range(max(2*x+1,2*y+1)):
    a_money=max(a*(x-i),0)
    b_money=max(b*(y-i),0)
    money=min(money,a_money+b_money+i*c*2)

print(money)

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;

int main() {
int N,X;
cin >> N >> X;
vector<int> vec(N);
int count = 0;
int mini = INF;
for (int i = 0;i < N;i++) {
  cin >> vec.at(i);
if (vec.at(i) < mini) mini = vec.at(i);
X -= vec.at(i);
count++;
}
count += X/mini;

cout << count << endl;
return 0;
}


Measured memory_bytes: 256
import java.util.*;

public class Main {

	public static void main(String[] args) {
		// make new Scanner.
		Scanner sc = new Scanner(System.in);
//		int n = Integer.parseInt(sc.next());
		
		String s = sc.next();
		String t = sc.next();
		boolean flag = false;
		
		if (s.equals(t)) {
			System.out.println("Yes");
		} else {
			String[] str = s.split("");
			List<String> list=Arrays.asList(str);
			for (int a=0;a<list.size();a++) {
				for (int b=0;b<list.size()-1;b++) {
					Collections.swap(list, b, b+1);
				}
				if (String.join("", list).equals(t)) {
					System.out.println("Yes");
					flag =true;
					break;
				}
			}
			if (!flag) {
				System.out.println("No");
			}
			
		}
		
		
//		
//
//		List<Integer> list = new ArrayList<Integer>();
//		
//		list = inList(sc,3);
//		
//		Collections.sort(list, Comparator.reverseOrder());
//		
//		int a = list.get(0) - list.get(1) + list.get(1) - list.get(2);
//		
//		System.out.println(a);
		

		// close Scanner
		sc.close();

	}

	
	/**
	 *  入力した数字を配列に格納するメソッド.
	 * @param sc
	 * @param n
	 * @return
	 */
	public static List<Integer> inList(Scanner sc, int n) {
		List<Integer> list = new ArrayList<Integer>();
		for (int a=0;a<n;a++) {
			list.add(sc.nextInt());
		}
		return list;
	}
	
	/**
	 *  入力した数字を配列に格納するメソッド.
	 * @param sc
	 * @param n
	 * @return
	 */
	public static List<Long> inLongList(Scanner sc, int n) {
		List<Long> list = new ArrayList<Long>();
		for (int a=0;a<n;a++) {
			list.add(sc.nextLong());
		}
		return list;
	}
	
	
	/**
	 *   リストの数字の美しさを求める.
	 */
	public static int beautyList(List<Integer> list, int d) {
		int a=0;
		for (int b=0;b<= list.size(); b++) {
			if (Math.abs(list.get(b) - list.get(b+1)) ==d) {
				a++;
			}
		}
		return a;
	}
	
	public static String judge(List<Long> list) {
		Long a =list.get(0);
		Long b =list.get(1);
		Long c =list.get(2);
		Long d =list.get(3);
		
		if (a < b
				|| b > d)
				{
			return "No";
		}
		if (a-b < b) {
			if (a-b > c) {
				return "No";
			} else if (b ==d) {
				return "Yes";
			}
		}
		if (b % 2 == 0) {
			if (b*2 <= c+d) {
				return "Yes";
			} else {
				return "No";
			}
		} else {
			if (b*2 < c+d) {
				return "Yes";
			} else {
				return "No";
			}
		}
	}

}

Measured memory_bytes: 21844
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include <cmath>
using namespace std;

bool is_integer( double x ){
  return floor(x)==x;
}

int main() {
    int n;
  
 
   cin >> n;
  
   //cout << n << endl;
  
   int x = 0;
  
   for(int i = n; i > 0 ; i--) {
        // ルート
     
     
        x = pow(i, 0.5);
     
     //  printf("%dのルートは%f\n", i , x);
   //  printf("%dのルートは%f\n", i , x*x);
     
      if(x*x == i){
        
        cout << i << endl;
        
        break;
      }
     
     
    }
 

  
  return 0;
}


Measured memory_bytes: 512
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <utility>
#define endl '\n'
#define fi first
#define se second
#define pb push_back
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
const int MOD = 1e9 + 7;
const int maxn = 1e6 + 5;
const int inf = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-8;
double pi = 3.14159265358979323846;
int main() {
   	double ans = 0;
   	double r; 
   	cin >> r;
   	ans = 2 * pi * r;
   	printf("%.20lf\n", ans);
	return 0;
} 

Measured memory_bytes: 3760