akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <queue>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <bitset>
#include <set>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define all(i,n) (i),(i+n)

int dx4[4]={1,0,-1,0};
int dy4[4]={0,-1,0,1};
int dx8[8]={1,0,-1,1,-1,1,0,-1};
int dy8[8]={1,1,1,0,0,-1,-1,-1};
int dx9[9]={0,1,0,-1,1,-1,1,0,-1};
int dy9[9]={0,1,1,1,0,0,-1,-1,-1};

typedef pair<int, int> P;
typedef pair<string, int> SP;
typedef long long ll;
typedef pair<ll, ll> PLL;

const int INF = 1e9;
const ll LLINF = 1e18;
const int MAX_V = 1e6+1;
const ll mod = 1000000007;

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

  cin >> n;

  cout << fixed << setprecision(2) << (n * 2.0 * 3.14159) << endl;
}


Measured memory_bytes: 3800
#define _LIBCPP_DEBUG 0

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int ans = -999999999;

    int n;
    cin >> n;

    int R;
    int minR = 1000000000;

    cin >> R;
    if (R < minR)
    {
        minR = R;
    }
    
    for (int i = 1; i < n; i++)
    {
        cin >> R;
        
        if (R - minR >= ans)
        {
            ans = R - minR;
        }
            
        if (R < minR)
        {
            minR = R;
        }
        
        

    }

    cout << ans << "\n";

}



Measured memory_bytes: 3116
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Edge = pair<int, int>;
using Graph = vector<vector<Edge>>;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
const ll MOD = 1000000007;
const ll nmax = 8;
const ll INF = 1e9;
bool graph[nmax][nmax];
vector<vector<ll>> dist = vector<vector<ll>>(nmax, vector<ll>(nmax, INF));
void warshall_floyd(ll n)
{
    for (size_t i = 0; i < n; i++)
    {
        for (size_t j = 0; j < n; j++)
        {
            for (size_t k = 0; k < n; k++)
            {
                dist[j][k] = min(dist[j][k], dist[j][i] + dist[i][k]);
            }
        }
    }
}

class UnionFind
{
public:
    vector<ll> Parent;

    UnionFind(ll N)
    {
        Parent = vector<ll>(N, -1);
    }
    ll find(ll A)
    {
        if (Parent[A] < 0)
            return A;
        return Parent[A] = find(Parent[A]);
    }

    ll size(ll A)
    {
        return -Parent[find(A)];
    }

    bool Union(ll A, ll B)
    {
        A = find(A);
        B = find(B);
        if (A == B)
        {
            return false;
        }
        if (size(A) < size(B))
            swap(A, B);

        Parent[A] += Parent[B];
        Parent[B] = A;

        return true;
    }
};

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll lcm(ll a, ll b)
{
    ll g = gcd(a, b);
    return a / g * b;
}

ll mulMod(ll a, ll b)
{
    return (((a % MOD) * (b % MOD)) % MOD);
}

ll powMod(ll a, ll p)
{
    if (p == 0)
    {
        return 1;
    }
    else if (p % 2 == 0)
    {
        ll half = powMod(a, p / 2);
        return mulMod(half, half);
    }
    else
    {
        return mulMod(powMod(a, p - 1), a);
    }
}

ll ceil(ll a, ll b)
{
    return (a + b - 1) / b;
}

void solve(std::string S)
{
    ll pre = 0;
    ll post = S.size() - 1;
    ll ans = 0;

    while (pre < post)
    {
        if (S[pre] == S[post])
        {
            pre++;
            post--;
            continue;
        }
        else
        {
            if (S[pre] == 'x')
            {
                ans++;
                pre++; 
            }
            else if (S[post] == 'x')
            {
                ans++;
                post--;
            }
            else
            {
                cout << -1 << endl;
                return;
            }
        }
    }

    cout << ans << endl;
}

int main()
{
    std::string s;
    std::cin >> s;
    solve(s);
    return 0;
}


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

typedef long long ll;
typedef long double ld;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vstr;

typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define asd cout << "ok" << endl;

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define trav(it, m) for(auto it = m.begin(); it it!= m.end(); it++)

const char nl = '\n';
const int MOD = 1e9 +7;
const ll INF = 1e19;
const ld PI = acos((ld)-1);
const int MX = 2e5 + 5;

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

  int a, b, k;
  cin >> a >> b >> k;
  int cnt = 0;
  for(int i = min(a,b); i >=1; i--)
  {
    if(a%i || b%i) continue;
    cnt++;
    if(cnt==k){
      cout << i <<nl;
      return 0;
    }
  }



  return 0;
}




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

typedef long long int ll;
ll powk(ll a, ll n = 2){
    ll r = 1;
    for(ll i = 0;i < n;i++){
        r *= a;
    }

    return r;
}

int main()
{
    ll n;
    cin >> n;
    string s;
    cin >> s;
    vector<ll> w(n + 1), e(n + 1);

    for(ll i = 0;i < n;i++){
        if(s[i] == 'W'){
            if(i != 0){
                w[i + 1] = w[i];
            }
            w[i + 1]++;
        }
        else if(i != 0){
            w[i + 1] = w[i];
        }
        if(s[n - i - 1] == 'E'){
            if(i != 0){
                e[n - i - 1] = e[n - i];
            }
            e[n - i - 1]++;
        }
        else if(i != 0){
            e[n - i - 1] = e[n - i];
        }
    }

    ll ans = w[0] + e[0];

    for(ll i = 0;i < n + 1;i++){
        ans = min(ans, w[i] + e[i]);
    }

    cout << ans;

    return 0;
}

Measured memory_bytes: 5380
#pragma GCC optimize("O2,unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2,ssse3,fma")
#include<bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
using namespace std;
using ll = long long;
using vi = vector<ll>;
using pi = pair<ll, ll>;
using vpi = vector<pi>;
const int maxn = 3022, mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n;
	cin >> n;
	vector<array<int, 2>> a(n);
	for(auto &i : a) cin >> i[0] >> i[1];
	int cnt = 0;
	for(int i = 0; i < n; i++) {
		cnt = (cnt+1)*(a[i][0] == a[i][1]);
		//cout << cnt << endl;
		if(cnt > 2) return cout << "Yes\n", 0;
	}
	cout << "No\n";
}


Measured memory_bytes: 3652
def alp(c):
    return chr(c+64)

def Base10to(n,k):
    if(int(n/k)):
        if n%k ==0 and n/k==1:
            return str(alp(26))
        elif n%k ==0:
            return Base10to(int((n/k)-1),k)+str(alp(26))
        else:
            return Base10to(int(n/k),k)+str(alp(n%k))
    return str(alp(n%k))

n = int(input())
k = 26

ans = Base10to(n,k)
print(ans.lower())

Measured memory_bytes: 9172
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include<limits.h>
#include<iomanip>
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, m, n) for(int i = m; i < n; i++)
#define ALL(v) v.begin(),v.end()
#define RALL(v) v.rbegin(),v.rend()
#define check(v) rep(i,v.size()) cout << v[i] << " ";\
cout << endl
#define INF 1e8
typedef long long ll;
using namespace std;
//オーバーフローに気をつけろよおおおおおお
//確認忘れるなよおおおおおお

int main() {
    int n, k; cin >> n >> k;
    vector<int> v(n);
    rep(i,n) cin >> v[i];
    if((n-1)%(k-1)==0){
        cout << (n-1)/(k-1) << endl;
    }else{
        cout << (n-1)/(k-1)+1 << endl;
    }
    return 0;
}

Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
signed main()
{
	int k;
	cin>>k;
	string s;
	cin>>s;
	string ans;
	if(s.length()<=k)
	{
		cout<<s<<endl;
	}
	else
	{
		ans=s.substr(0,k);
		ans+="...";
		cout<<ans<<endl;
	}
	return 0;
}

Measured memory_bytes: 3640
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  // AGC034A -Kenken Race
  // '.'と'#'からなるN文字の文字列S（マス）
  // 1マスか2マス移動できる
  // '#'とすぬけ君、ふぬけ君がいる場所には移動不可
  // A → C、B → Dへ移動できるか
  // C<Dのとき（追い越しがない場合）
  // (A+1)〜(D-1)の範囲内に、連続する'#'がないこと
  // D<Cのとき（追い越しがある場合）
  // (B-1)〜(D+1)の範囲内に、3連続の'.'が1つ以上あること
  // (A+1)〜(C-1)の範囲内に、連続する'#'がないこと
  int N, A, B, C, D;
  cin >> N >> A >> B >> C >> D;
  A--; B--; C--; D--;
  string S;
  cin >> S;
  if(C < D){
    for(int i = A+1; i <= D-2; i++){
      if(S.substr(i, 2) == "##"){
        cout << "No" << endl;
        return 0;
      }
    }
  }else{
    for(int i = A+1; i <= C-2; i++){
      if(S.substr(i, 2) == "##"){
        cout << "No" << endl;
        return 0;
      }
    }
    int cnt = 0;
    for(int i = B-1; i <= D-1; i++){
      if(S.substr(i, 3) == "..."){
        cnt++;
      }
    }
    if(cnt == 0){
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}

Measured memory_bytes: 720
#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
#define FOR(i,a,n) for(ll i=(ll)a;i<(ll)n;i++)
#define RFOR(i,a,n) for(ll i=(ll)n-1;i >= (ll)a;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,0,n)
#define ALL(v) v.begin(), v.end()
#define bra(first,second) '(' << first << ',' << second << ')'
//constexpr ll MOD = 1000000007;
constexpr ll MOD = 998244353;
ll INF = 6001001001001001001;
long double EPS = 1e-11;
long double PI = 3.141592653589793238;
template<typename T>
void remove(std::vector<T>& vector, unsigned int index){
    vector.erase(vector.begin() + index);
}

using Graph = vector<vector<ll>>;

ll N;

void dfs(string S,ll m){
    if(S.size() == N){
        cout << S << endl;
        return ;
    }
    rep(i,m+2){
        dfs(S+char('a'+i),max(i,m));
    }
    return ;
}
 
int main(){
   cin >> N;
   dfs("a",0);
}

Measured memory_bytes: 1536
#include<bits/stdc++.h>
#include <math.h>
#include <cmath>
#include <limits>
#include <iostream>
#include <assert.h>

#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
const ll INF=1000000000000000001;
struct edge{int to,cost;};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};

int d[200001];
ll c[200001];
int main(){

	ll m;
	cin>>m;

	ll total=0,ans=0;
	rep(i,m){
		cin>>d[i]>>c[i];
		total+=(c[i]*d[i]);
		ans+=c[i];
	}
	ans--;
	while(total>9){
		ans+=total/10;
		total=total%10+total/10;
	}
	cout<<ans<<endl;
	return 0;

}


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

int main() {
	
	int n, k;
	cin >> n >> k;
	std::vector<int> arr(n) ;
	std::vector<int> dp(n) ;
	
	for(int i = 0; i < n; ++i)
	cin >> arr[i];
	dp[0] = 0;
	dp[1] = abs(arr[1]-arr[0]);
	for(int i = 2; i < n; ++i)
	    dp[i] = INT_MAX;
	for(int i = 2; i < n; ++i)
	{
	    for(int j = i - 1, jump = 0; jump < k && j >= 0; --j, ++jump)
	    {
	        dp[i] = min(dp[i], dp[j] + abs(arr[i]- arr[j]));
	    }
	}
// 	for(int i = 0; i < n; ++i)
// 	    cout << dp[i] << " ";
	cout << dp[n-1];
	
	return 0;
}


Measured memory_bytes: 4064
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <stack>
#include <set>
#include <map>
typedef long long ll;
using namespace std;

int main(){
  string s, t;
  cin >> s >> t;
  int cnt = 0;
  for(int i = 0; i < 3; i++){
    if(s[i] == t[i]) cnt++;
  }

  cout << cnt << endl;
  return 0;
}


Measured memory_bytes: 256
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

sum = 0
for i in range(n):
    if a[i] >= b[i]:
        sum += b[i]
    elif a[i+1] < b[i] - a[i]:
        sum += a[i] + a[i+1]
        a[i+1] = 0
    else:
        sum += b[i]
        a[i+1] -= b[i] - a[i]

print(sum)


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

using namespace std;
using ll = long long;
using ld = long double;

//#define int long long
//signed main(){
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    for(int i = 1; i <= n; i++) {
        int cnt=0;
        for(int x = 1; x <= 100; x++) {
            for(int y = 1; y <= 100; y++) {
                for(int z = 1; z <= 100; z++) {
                    int tmp=x*x+y*y+z*z+x*y+y*z+z*x;
                    if(tmp>i) break;
                    if(i==tmp) cnt++;
                }
            }
        }
        cout << cnt << "\n";
    }

    return 0;
}


Measured memory_bytes: 3580
#include<iostream>
#include<iomanip>
#include<limits>
#include<string>
#include<vector>
#include<algorithm>
#include<stdio.h>
#include<cmath>

#define big ((long long)(1e9)+7)

using namespace std;

typedef unsigned long long ull;
typedef long long ll;

int main()
{
  ll n,a,b;
  cin >> n >> a >> b;
  ll min = big;
  if(a%2 == b%2)
  {
    min = (b-a)/2;
  }
  else
  {
    min = a-1;
    if(min > n-b)
      min = n-b;
    min++;
    min += (b-a-1)/2;
  }
  cout << min << endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <map>
#include <vector>
//#include <unordered_map>
//#include <unordered_set>
#include <stack>
#include <set>
#include <queue>
#include <list>
#define LL long long
#define N 100100
#define M 110
#define MOD 1000000007
#define FOR(i,l,r) for (int i = (l); i <= (r); i ++)
#define CLR(a,x) memset(a,x,sizeof(a))
#define INF 0x3f3f3f3f
#define ALL(x) x.begin(),x.end()
#define pb push_back
#define X first
#define Y second
using namespace std;
const int maxn=100005;
int main()
{
    int n;
    cin>>n;
    int su=0;
    int x,y;
    while(n--)
    {
        cin>>x>>y;
        su+=y-x+1;
    }
    cout<<su<<endl;
	return 0;
}


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

using namespace std;

#define INF 1000000009
#define INP "input.txt"
#define OUT "output.txt"

int n, m;
char arr[10][10];

bool solution() {
	int cnt = 0;
	for(int i = 0; i < n; i++) 
		for(int j = 0; j < m; j++) {
			if(arr[i][j] == '#') cnt++;
		}	
	if(cnt != n + m - 1) return false;

	int i, j;
	i = j = 0;
	if(arr[i][j] != '#') return false;

	while(i != n - 1 && j != m - 1) {
		if(i + 1 < n && arr[i + 1][j] == '#') i++;
		else if(j + 1 < m && arr[i][j + 1] == '#') j++;
		else return false;
	}
	return true;
}

int main () {
	 //freopen(INP, "r", stdin);
	 //freopen(OUT, "w", stdout);

	 scanf(" %d %d ", &n, &m);
	 for(int i = 0; i < n; i++) {
	 	scanf("%s", &arr[i]);
	 }

	 if(solution()) printf("Possible\n");
	 else printf("Impossible\n");

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repI(i, d, n) for (int i = (d); i < (n); ++i)
#define reps1(i, n) for (int i = 1; i < (n); ++i)
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

using ll = long long;
using P = pair<int, int>;
using Pl = pair<ll, ll>;
using M = map<int, int>;
using Ml = map<ll, ll>;
ll const INF = 1ll<<61;
double pi = 3.141592653589793238;

int main() {
  string alpha = "abcdefghijklmnopqrstuvwxyz";
  ll n;
  cin >> n;

  string ans = "";

  while((n-1) / 26 != 0) {
    n--;
    ans += alpha[n % 26];
    n /= 26;
  }
  n--;
  ans += alpha[n % 26];

  reverse(ans.begin(), ans.end());

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 3620
#include <stdio.h>

int main( ){
  int a,b,c,d;
  scanf("%d %d %d",&a,&b,&c);
    if ( a > b ){
      d = a;
      a = b;
      b = d;
  }
  if ( b > c ){
      d = b;
      b = c;
      c = d;
  }
  if ( a > b ){
      d = a;
      a = b;
      b = d;
  }
  printf("%d %d %d\n",a,b,c);

    return 0;
}

Measured memory_bytes: 596
#include <iostream>

using namespace std;

int calc(int* _a,int n,int i,int j)
{
	int a[3]={_a[0],_a[1],_a[2]};
	for(int res=0;;res++){
		if(i==0) i++,j++;
		else     i--,j--;
		if(a[0]==(1<<n)-1 || a[2]==(1<<n)-1)
			return res;
		int bit=a[i]&&a[j]?min(a[i]&-a[i],a[j]&-a[j]):max(a[i]&-a[i],a[j]&-a[j]);
		a[i]^=bit; a[j]^=bit;
	}
	return -1;
}

int main()
{
	for(int n,m;cin>>n>>m,n|m;){
		int a[3]={};
		for(int i=0;i<3;i++){
			int j; cin>>j;
			while(j--){
				int x; cin>>x;
				a[i]|=1<<n-x;
			}
		}
		
		if(a[0]==(1<<n)-1 || a[2]==(1<<n)-1){
			cout<<0<<endl;
			continue;
		}
		
		int res=m+1;
		for(int i=0,j=1;i<2;i++,j++){
			int bit=a[i]&&a[j]?min(a[i]&-a[i],a[j]&-a[j]):max(a[i]&-a[i],a[j]&-a[j]);
			a[i]^=bit; a[i+1]^=bit;
			res=min(res,1+calc(a,n,i,i+1));
			a[i]^=bit; a[i+1]^=bit;
		}
		cout<<(res<=m?res:-1)<<endl;
	}
	
	return 0;
}

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

using namespace std;

struct Data {
  long long need;
  long long limit;
};

bool cmp(const Data& need, const Data& b)
{
  return need.limit > b.limit;
}
int main()
{
  long long N;
  cin >> N;
  vector<Data> D;
  for (int i = 0; i < N; ++i) {
    Data data;
    cin >> data.need >> data.limit;
    D.push_back(data);
  }

  sort(D.begin(), D.end(),cmp);
  for (auto d : D) {
    //cerr << d.need << " : " << d.limit << endl;
  }

  long long  now = D[0].limit;
  for (auto d : D) {
    if (now > d.limit) {
      now = d.limit;
    }
    //cerr << " now =" << now << endl;
    //cerr << "limit=" << d.limit << endl;
    //cerr << " need=" << d.need << endl;
    //cerr << endl;
    now -= d.need;
    if (now < 0) {
      cout << "No";
      return 0;
    }
  }

  cout << "Yes";


  return 0;
}

Measured memory_bytes: 6512
#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
#define vec(s) vector

#define vvec(s) vector<vector
>
typedef vector<lli> vi;
typedef vector<vi> vvi;
typedef pair<lli,lli> pii;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Yes(x) cout<<(x?"Yes":"No")<<endl;
#define YES(x) cout<<(x?"YES":"NO")<<endl;
#define out(s) cout<<s<<endl;
#define pb(s) push_back(s);
#define sp " " 
#define INF 10000000000
#define LINF 9000000000000000000
#define all(s) s.begin(),s.end()
void vout(vi v){
    for(lli i=0;i<v.size();i++)
    cout<<v.at(i)<<endl;
}
int main(){
    cout << std::fixed << std::setprecision(10);
    long double n;
    cin>>n;
    if(((lli) n)%2!=0){ 
        out((n+1)/(2*n));
    }
    else{ 
        out((long double )1/2);
    }
}

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

int main(){
	int H,W,i,j;
	
	while(1){
		cin>>H>>W;
		if(H==0 && W==0){
			break;
		}
		for(i=0;i<H;i++){
			for(j=0;j<W;j++){
				if((i+j)%2==0){
					cout<<'#';
				}else{
					cout<<'.';
				}
			}
		cout<<endl;
		}
	cout<<endl;
	}
	return 0;
}

Measured memory_bytes: 3048
use std::io;
use std::str::FromStr;

fn main() {
    let stdin = io::stdin();
    let mut buf = String::new();
    stdin.read_line(&mut buf).ok();

    let mut it = buf.split_whitespace().map(|n| String::from_str(n).unwrap());
    let (a, b) = (it.next().unwrap(), it.next().unwrap());

    if a == b {
        println!("H");
    } else {
        println!("D");
    }
}


Measured memory_bytes: 4352
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<tuple>
#include<algorithm>
using namespace std;
//#define int long

signed main() 
{
	int N;
	string S, T;
	cin >> N >> S >> T;
	for (int i = 0; i < N; i++)
	{
		cout << S[i] << T[i];
	}
}

Measured memory_bytes: 256
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <valarray>
#include <iterator>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) container.begin(), container.end()
#define RALL(container) container.rbegin(), container.rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

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 (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int n;
vi eratosthenes_sieve(int n){
	vi res(n+1);
	if(n<2) return res;
	res[2]=1;
	for(int i=3;i<=n;i+=2){
		if(i*i<=n && !res[i]) for(int j=i+i+i;j<=n;j+=i+i) res[j]=1;
		res[i]=!res[i];
	}
	return res;
}
main(){
	vi pf = eratosthenes_sieve(1299710);
	while(cin >> n, n){
		int ans = 0;
		for(int i=0;!pf[n+i];i++) ans ++;
		for(int i=0;!pf[n+i];i--) ans ++;
		cout << ans << endl;
	}
	return 0;
}

Measured memory_bytes: 6220
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main() {
  int a[5];
  for (int i=0; i<5; i++) cin >> a[i];
  int k;
  cin >> k;
  
  if (a[4] - a[0] <= k) {
    cout << "Yay!" << endl;
  }
  else cout << ":(" << endl;
}

Measured memory_bytes: 256
#include <stdio.h>

int main(void){

  int A, B, C;

  scanf("%d %d %d", &A, &B, &C );
  if(A==B && A!=C){
    printf("Yes");
  }
  else if(A==C && A!=B){
    printf("Yes");
  }
  else if(B==C && A!=B){
    printf("Yes");
  }
  else printf("No");

  return 0;

}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
 
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n'
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
template<class T> inline void printv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');}
template<class T> inline void printvv(vector<vector<T>>& v) {for (auto u : v) printv(u);}
template<class T> inline void printlnv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << endl;}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
 
void solve();
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(numeric_limits<double>::max_digits10);
    solve();
    return 0;
}

template<typename T>
T calc_mod(string s, T d) {
    T r = 0;
    int n = sz(s);
    REP(i, n) r = (r * 10 + (s[i] - '0')) % d;
    return r;
}

void solve() {
    ll a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    ll z = min(a * x + b * y, 2 * c * max(x, y));
    if (y > x) chmin(z, x * 2 * c + (y - x) * b);
    if (y < x) chmin(z, (x - y) * a + y * 2 * c);
    cout << z << endl;
}


Measured memory_bytes: 256
N, M = map(int, input().split())

import networkx as nx

G=nx.Graph()

for i in range (1, N+1):
	G.add_node(i)

for i in range (0, M):
	A, B, C = map(int, input().split())
	G.add_edge(A,B)

print(nx.number_connected_components(G))

Measured memory_bytes: 166892
A,B,C = map(int,input().split())
mod0=A%B
def main():
  i=1
  while True:
    i+=1
    mod=(A*i)%B
    if mod==C:
      print("YES")
      break
    if mod==mod0:
      print("NO")
      break
if __name__=="__main__":
  main()

Measured memory_bytes: 2940
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <cmath>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <iostream>
#include <random>
#include <map>
#include <iomanip>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include <fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>
using namespace std;

using ll = long long;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using qll = queue<ll>;
using vb = vector<bool>;
using mll = map<ll, ll>;
using sll = stack<ll>;
#define REP(i,n) for(ll i(0);(i)<(n);(i)++)
#define rep(i,n) for(ll i(0);(i)<(n);(i)++)
#define ALL(a) a.begin(), a.end()
#define enld endl //* missspell check
const ll INF = 1LL << 60;

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

void solve(std::string S){
    ll N = S.length();
    string S1 = S.substr(0, N/2);
    string S2 = S.substr((N+1)/2, N/2);
    string S1inv = S1, S2inv = S2;
    reverse(ALL(S1inv)); reverse(ALL(S2inv));
    if(S1 == S1inv && S2 == S2inv && S1 == S2)
        cout<<YES<<endl;
    else
        cout<<NO<<endl;
}

int main(){
    std::string S;
    std::cin >> S;
    solve(S);
    return 0;
}


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

//#include <vector>
#define ALL(l)  (l).begin(),(l).end()
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
using namespace std;
typedef long long ll;
ll mod = 1000000007;
ll maxn = 1000000000;

//---------------------------------------------------------------------------------------------------
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vll = vector<ll>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける
using vs = vector<string>; // stringの1次元の型に vs という別名をつける
using pii = pair<int, int>; // これ以降 pii という型名はpair<int, int> と同じ意味で使える
//---------------------------------------------------------------------------------------------------


 
int main(){
    int n,q,ans=0;
    
    cin>>n;
    vll s(n);
    rep(i,n)cin>>s.at(i);
    
    cin>>q;
    vll t(q);
    rep(i,q)cin>>t.at(i);
    
    rep(i,q){
        rep(j,n){
            if(t.at(i)==s.at(j)){
                ans++;
                break;
            }
        }
    }
    
    cout<<ans<<endl;
}
  


Measured memory_bytes: 3180
#include <stdio.h>
int main()
 {
int i;
int K,A,B;
A = 0;
B = 0;
K = 0;
scanf("%d",&K); scanf("%d",&A); scanf("%d",&B);
 
for(i=A;i<=B+1;i++){
if(i%K==0){
printf("OK");
break;
}
if(i==B){
printf("NG");
break;
}
}
 
return 0;
}

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

int main(){
	long long int n,m;
	cin>>n>>m;
	long long int a=1900*m+100*(n-m);
	long long int ms=1;
	for(int i=0;i<m;i++)ms*=2;
	cout<<a*ms<<endl;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean hasNext = true;
		while (hasNext) {
			int h = in.nextInt();
			int w = in.nextInt();
			if (w == 0 && h == 0) {
				hasNext = false;
			} else {
				char[][] map = new char[h][w];
				for (int y = 0; y < h; y++) {
					char[] line = in.next().toCharArray();
					map[y] = line;
				}
				int x = 0, y = 0;
				boolean isLoop = false;
				while (map[y][x] != '.' && !isLoop) {
					char c = map[y][x];
					map[y][x] = '#';
					if (c == '>') {
						x++;
					} else if (c == '<') {
						x--;
					} else if (c == 'v') {
						y++;
					} else if (c == '^') {
						y--;
					} else if (c == '#') {
						isLoop = true;
					}
				}
				if (isLoop) {
					System.out.println("LOOP");
				} else {
					System.out.print(x);
					System.out.print(' ');
					System.out.print(y);
					System.out.println();
				}
			}
		}
	}
}

Measured memory_bytes: 12000
import sys
from pprint import pprint

def solve(n, m, p, s):
    wrong = [0] * n
    solved = {}
    for i in range(n):
        solved[i] = False

    n_ac = 0
    n_wa = 0
    for i in range(m):
        if not solved[p[i]-1] and s[i] == "WA":
            wrong[p[i]-1] += 1
        if not solved[p[i]-1] and s[i] == "AC":
            n_ac += 1
            solved[p[i]-1] = True
            n_wa += wrong[p[i]-1]
    print(n_ac, n_wa)


if __name__ == '__main__':
    n, m = map(int,sys.stdin.readline().strip().split(" "))
    p = [0] * m
    s = [""] * m
    for i in range(m):
        p_i, s[i]  = sys.stdin.readline().strip().split(" ")
        p[i] = int(p_i)
    
    solve(n, m, p, s)

Measured memory_bytes: 56284
n=int(input())
a=list(map(int,input().split()))
sign=[1 if i<0 else 0 for i in a]
a_abs=[abs(i) for i in a]
if sum(sign)%2==0:
    print(sum(a_abs))
else:
    print(sum(a_abs)-2*min(a_abs))

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

using namespace std;

int ap[26];
int32_t main() {


  string s;
  cin >> s;
  long long ans = 0;
  for(int i = 0; i < s.size(); ++i)
  {
      ++ap[s[i] - 'a'];
      ans += (i + 1) - ap[s[i] - 'a'];
  }
  cout << ans + 1;
}


Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007

int main() {

  int H,W,M;
  cin >> H >> W >> M;

  vector<int> g(H),r(W);
  map<pair<int,int>,int> mp;
  int gm = 0,rm = 0;
  
  for(int i = 0;i < M;i++) {
    int h,w;
    cin >> h >> w;
    g[h-1]++;
    r[w-1]++;
    mp[make_pair(h-1,w-1)]++;
    gm = max(gm,g[h-1]);
    rm = max(rm,r[w-1]);
  }
  
  vector<int> cg(0),cr(0);
  for(int i = 0;i < H;i++) {
    if(g[i] == gm) cg.push_back(i);
  }


  for(int i = 0;i < W;i++) {
    if(r[i] == rm) cr.push_back(i);
  }
  
  

  int ans = 0;
  for(int G:cg) {
    for(int R:cr) {
      ans = max(ans,gm+rm-mp[make_pair(G,R)]);
      if(!mp[make_pair(G,R)]) break;
    }
  }

  cout << ans << endl;



}


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

// int/long:		-2,147,483,648 - 2,147,483,648 (-2^31 <= int < 2^31)
// long/long long:	-9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 (-2^63 <= long < 2^63)

#define	INF (1<<29)
//536,870,912

// lower_bound(A.begin(), A.end(), N)
// upper_bound(...

// A.erase(unique(A.begin(), A.end()), A.end())

// bit: &/and, |/or, ^/xor, ~/not

// getline(cin, String)

// Graph
// Warshall-Floyd: Distance between each node, N^3
// Dijkstra: Distance from the start node, N^2
// DFS(Depth-First Search)

#define	MOD 1000000007

int	main() {
	long T1, T2, A1, A2, B1, B2;
	cin >>T1 >>T2 >>A1 >>A2 >>B1 >>B2;
	if (A1>B1) {
		swap(A1, B1);
		swap(A2, B2);
	}
	long SA=A1*T1+A2*T2;
	long SB=B1*T1+B2*T2;
	if (SA==SB) {
		cout <<"infinity" <<endl;
		return 0;
	}
	if (SA<SB) {
		cout <<0 <<endl;
		return 0;
	}
	long N;
	//N=(A1*T1*(A2-B2)+(B1-A1)*T1*A2)/(SA-SB);
	N=(B1-A1)*T1/(SA-SB)*2+1;
	if ((((B1-A1)*T1)%(SA-SB))==0)
		N--;
	cout <<N <<endl;
	return 0;
}



Measured memory_bytes: 256
x = int(input())
f = [i**5 for i in range(1000)]

for i in range(1000):
    for j in range(1000):
        if f[i] - f[j] == x:
            print(i,j)
            exit()
        if f[i] + f[j] == x:
            print(i,-j)
            exit()
            

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

int readInt(){
  int ret = 0;
  char c;
  while((c=getchar()) && '0' <= c && c <= '9'){
    ret = ret * 10 + (c-'0');
  }
  return ret;
}

main(){
  int n,s;
  while(true){
    n = readInt();
    if (n==0)break;
    s = readInt();

    int r[101]={0};
    for(int i=0;i<n;i++){
      int tmp;tmp=readInt();r[tmp]++;
    }
    int ans = 0;
    for(int i=0;i<101;i++){
      if (i+i > s && r[i])ans += (r[i]*(r[i]-1))/2;
      for(int j=i+1;j<101;j++){
	if (i+j > s)ans += r[i]*r[j];
      }
    }
    printf("%d\n",ans);
  }
}

Measured memory_bytes: 0
#include <iostream>
#include <cstring>
#include <cstdlib>

using namespace std;

    int A, B;
    string S;

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

    bool ans;

    if (S[A] == '-'){
        for (int i = 0; i < A; i++){
            ans = ((S[i] >= '0') && (S[i] <= '9')) ? true : false;
            if (!ans){
                cout << "No" << endl;
                return 0;
            }
        }
        for (int i = A + 1; i < A + B + 1; i++){
            ans = ((S[i] >= '0') && (S[i] <= '9')) ? true : false;
            if (!ans){
                cout << "No" << endl;
                return 0;
            }
        }
    }else{
        cout << "No" << endl;
        return 0;
    }
    cout << "Yes" << endl;
}

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

#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define repr(x,fr,to) for(int (x)=(fr);(x)>=(to);(x)--)
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()

using namespace std;
typedef long long ll; typedef vector<int> VI; typedef pair<ll,int> pii;
const int MD = (int)1e9 + 7; typedef vector<ll> VL;
void dbg(){ cerr << "\n"; }  template <class T, class ...T2>
void dbg(const T& fst, const T2&...rst){ cerr << fst << ": "; dbg(rst...); }


int main() {
	cin.tie(0); ios_base::sync_with_stdio(false);
	int n, t;
	cin >>n >>t;
	vector<pii> vp(n);
	rep(i, n) cin >>vp[i].first >>vp[i].second;
	sort(all(vp));
	VL dp(6020);
	
	rep(i, n) repr(j, t-1, 0) {
		dp[j + vp[i].first] = max(dp[j+vp[i].first], dp[j] + vp[i].second);
	}
	
	//for(auto x :dp) cerr<<x<<" "; cerr<<"\n";
	
	cout << *max_element(all(dp)) <<"\n";
	return 0;
}


Measured memory_bytes: 384
import java.util.Scanner;
 
public class Main {
    private static Scanner scan;
 
    public static void main(String[] args) {
        scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        double d = 1.0 * a/b;
        System.out.println(a/b + " " + a%b + " " + String.format("%.5f", d));
    }
}

Measured memory_bytes: 17364
#include<iostream>
#include<cstdlib>
#include<string>
 
using namespace std;
 
struct Node{
    int key;
    Node *parent,*left,*right;
};
 
Node *root,*NIL;//????????????NULL???§????????????????????????
 
void insert(int k);
void inorder(Node *u);
void preorder(Node *u);
Node* find(Node *x,int key);
 
int main(){
    int m; cin>>m;
    int key;
    string command;
    for(int i=0;i<m;i++){
        cin>>command;
        if(command=="insert"){
            cin>>key;
            insert(key);
        }else if(command=="print"){
            inorder(root);
            cout<<endl;
            preorder(root);
            cout<<endl;
        }else if(command=="find"){
            Node *x;
            cin>>key;
            x = find(root,key);
            if(x==NULL){
                cout<<"no"<<endl;
            }else if(x->key==key){
                cout<<"yes"<<endl;
            }
        }
    }
}
 
void insert(int k){
    Node *x,*y,*z;
    x = root,y = NIL;
    z = (Node *)malloc(sizeof(Node));
    z->key = k; z->left = z->right = NIL;
 
    while(x!=NIL){
        y = x;
        if(z->key<x->key)
            x = x->left;
        else
            x = x->right;
    }
 
    z->parent = y;
 
    if(y==NIL) root = z;
    else
        if(y->key>z->key)
            y->left = z;
        else
            y->right = z;
}
 
Node* find(Node *x,int key){
    while(x!=NIL&&x->key!=key){
        if(key<x->key){
            x = x->left;
        }else{
            x = x->right;
        }
    }
    return x;
}
 
void inorder(Node *u){
    if(u==NIL) return ;
    inorder(u->left);
    cout<<" "<<u->key;
    inorder(u->right);
}
 
void preorder(Node *u){
    if(u==NIL) return ;
    cout<<" "<<u->key;
    preorder(u->left);
    preorder(u->right);
}

Measured memory_bytes: 21844
sx, sy, tx, ty = map(int, input().split())

dx, dy = tx-sx, ty-sy

path1 = 'U'*dy + 'R'*dx
path2 = 'D'*dy + 'L'*dx
path3 = 'L' + 'U'*(dy+1) + 'R'*(dx+1) + 'D'
paht4 = 'R' + 'D'*(dy+1) + 'L'*(dx+1) + 'U'

ans = path1 + path2 + path3 + paht4
print(ans)

Measured memory_bytes: 38384
#include<cstdio>
#include<queue>
//#include<iostream>
using namespace std;
int n,a[210000],ans[210000],Log2[210000],ODD[21][210000],EVEN[21][210000];
struct node{
	int x,y,l,r;
	bool operator<(const node &b) const{ return a[x]>a[b.x];}
} u;
priority_queue<node> que;
void init(){
	int m=(n>>1);
	for (int i=1;i<=m;i++){
		ODD[0][i]=(i<<1)-1;
		EVEN[0][i]=(i<<1);
	}
	for (int j=1;(1<<j)<=m;j++)
		for (int i=1;i+(1<<j)-1<=m;i++){
			if (a[ODD[j-1][i]]<a[ODD[j-1][i+(1<<(j-1))]]) ODD[j][i]=ODD[j-1][i];
			else ODD[j][i]=ODD[j-1][i+(1<<(j-1))];
			if (a[EVEN[j-1][i]]<a[EVEN[j-1][i+(1<<(j-1))]]) EVEN[j][i]=EVEN[j-1][i];
			else EVEN[j][i]=EVEN[j-1][i+(1<<(j-1))];
		}
}
int query(int (*now)[210000],int l,int r){
	int k=Log2[r-l+1];
	if (a[now[k][l]]<a[now[k][r-(1<<k)+1]]) return now[k][l];
	else return now[k][r-(1<<k)+1];
}
int getmin(int l,int r,bool x){
	if (x) return query(ODD,(l+1)>>1,(r+1)>>1);
	else return query(EVEN,l>>1,r>>1);
}
void pushin(int l,int r){
	if (l>r) return;
	int t1=getmin(l,r,l&1),t2=getmin(t1+1,r,r&1);
	que.push((node){t1,t2,l,r}); //cout << t1 << ' ' << t2 << ' ' << l << ' ' << r << endl;
}
int main(){
	Log2[0]=-1;
	for (int i=1;i<=200000;i++) Log2[i]=Log2[i>>1]+1;
	scanf("%d",&n);
	for (int i=1;i<=n;i++) scanf("%d",&a[i]);
	init(); pushin(1,n);
	int cnt=0;
	while (!que.empty()){
		u=que.top(); que.pop();
		ans[++cnt]=a[u.x]; ans[++cnt]=a[u.y];
		pushin(u.l,u.x-1); pushin(u.x+1,u.y-1); pushin(u.y+1,u.r);		
	}
	for (int i=1;i<cnt;i++) printf("%d ",ans[i]);
	printf("%d\n",ans[cnt]);
	return 0;
}


Measured memory_bytes: 34164
a,b,c,d=map(int,input().split())
if b<=c or a>=d:
  t=0
else:
  if a<=c:
    if b<d:
      t=b-c
    else:
      t=d-c
  else:
    if b<d:
      t=b-a
    else:
      t=d-a
print(t)
  

Measured memory_bytes: 38256
package main

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

func main() {
	stdin := bufio.NewScanner(os.Stdin)

	stdin.Scan()
	stdin.Scan()
	text := stdin.Text()
	nums := strings.Split(text, " ")
	min := -1
	for _, num := range nums {
		v := 0
		for i, _ := strconv.Atoi(num); i%2 == 0; i /= 2 {
			v++
		}
		if min < 0 || v < min {
			min = v
		}
	}

	fmt.Printf("%v\n", min)
}


Measured memory_bytes: 640
import queue
import math
"""
N = int(input())
#S = input()
# (N,M) = (int(i) for i in input().split(" "))
# A = [int(i) for i in input().split()]
A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""
(a,b,x) = (int(i) for i in input().split(" "))
mn = 0
mx = 100
while mx-mn > .0000000001:
	md = (mx+mn)/2
	al = b/math.tan(md*math.pi/180)
	if al < a:
		n = a*al*b/2
	else:
		n=(b-b*a/al/2)*a*a
	if n < x:
		mx = md
	else:
		mn = md
print(md)

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

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef pair<ll, ll> pll;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define ALL(c) (c).begin(),(c).end()

const int MN = 131072;

int d[MN];
pii ch[2][MN];
int N;
vector<pll> vec[MN];

void dfs(int v, ll x)
{
	if (d[v] == 0) {
		vec[v].eb(0LL, 0LL);
		return ;
	}
	int a = ch[0][v].fi, c1 = ch[0][v].se;
	int b = ch[1][v].fi, c2 = ch[1][v].se;
	dfs(a, x);
	dfs(b, x);

	if ((int)vec[a].size() == 0 || (int)vec[b].size() == 0) return ;

	if (vec[a].size() > vec[b].size()) {
		swap(a, b);
		swap(c1, c2);
	}

	int i = 0, i2 = 0;

	vector<pll> v1, v2;

	for (pll &p : vec[a]) { //a,b
		ll c = x - c1 - c2 - p.se;

		while (i+1 < vec[b].size() && vec[b][i+1].fi <= c) {
			++i;
		}

		if (vec[b][i].fi <= c) {
			v1.eb(p.fi + c1, vec[b][i].se + c2);
		}
	}

	for (pll &p : vec[a]) { //b,a
		ll c = x - c1 - c2 - p.fi;

		while (i2 < vec[b].size() && vec[b][i2].se > c) {
			++i2;
		}

		if (i2 < vec[b].size()) {
			v2.eb(vec[b][i2].fi + c2, p.se + c1);
		}
	}

	int num = v1.size() + v2.size();
	v1.eb(LLONG_MAX, -1LL); v2.eb(LLONG_MAX, -1LL);
	i = i2 = 0;

	rep(tt, num) {
		pll t;
		if (v1[i] < v2[i2]) t = v1[i++];
		else t = v2[i2++];

		if (vec[v].size() == 0 || vec[v].back().se > t.se) {
			vec[v].eb(t);
		}		
	}
}

bool f(ll x)
{
	rep(i, MN) vec[i].clear();
	dfs(0, x);
	return (int)vec[0].size() > 0;
}

int main() {
	cin >> N;

	rep(i, N-1) {
		int a, v;
		cin >> a >> v;
		--a;
		ch[d[a]++][a] = mp(i + 1, v);
	}

	ll ng = -1, ok = 1e11;

	while (ok - ng > 1) {
		ll m = (ok + ng) / 2;
		if (f(m)) {
			ok = m;
		} else {
			ng = m;
		}
	}

	cout << ok << endl;

	return 0;
}

Measured memory_bytes: 30420
//
//  main.cpp
//  contest
//
//  Created by TmpGuest on 2020/4/18.
//  Copyright © 2020 TmpGuest. All rights reserved.
//

#include <bits/stdc++.h>
#define endl '\n'

using namespace std;

int main() {
ios_base::sync_with_stdio(false);
    
    int num;
    string s;
    cin>>num;
    cin>>s;
    if(s.length()>num) {
        for(int i=0;i<num;i++)
            cout<<s[i];
        cout<<"...\n";
    }
    else
        cout<<s<<endl;
    
    
    
    return 0;
}


Measured memory_bytes: 3640
#!/usr/bin/env python3
import sys
INF = float("inf")
MOD = 1000000007  # type: int


def solve(N: int, M: int, S: "List[int]", T: "List[int]"):

    DP = [[1]*(N+1) for _ in range(M+1)]
    for j in range(1, M+1):
        for i in range(1, N+1):
            DP[j][i] = DP[j-1][i] + DP[j][i-1] - \
                DP[j-1][i-1]
            DP[j][i] %= MOD

            if S[i-1] == T[j-1]:
                DP[j][i] += DP[j-1][i-1]
                DP[j][i] %= MOD
    # print(*DP, sep="\n")
    print(DP[M][N])


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    S = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    T = [int(next(tokens)) for _ in range(M)]  # type: "List[int]"
    solve(N, M, S, T)


if __name__ == '__main__':
    main()


Measured memory_bytes: 73308
#include<bits/stdc++.h>
using namespace std;
int main(){
	string s,t; cin>>s>>t;vector<int>ss(26),tt(26);
	for(auto&&i:s)++ss.at(i-'a'); for(auto&&i:t)++tt.at(i-'a');
	sort(ss.begin(),ss.end()); sort(tt.begin(),tt.end());
	cout<<(ss==tt?"Yes"s:"No"s)<<endl;
}

Measured memory_bytes: 3924
#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define Mod 1000000007
#define ll long long
#define dd double
#define pb push_back
#define ff first
#define ss second
#define Mp make_pair
#define INF 999999999999999999
#define NN (ll)(1e6+5)
int mod(string s,int a) 
{ 
    int ans=0; 
    for (int i=0;i<s.length();i++) 
         ans=(ans*10+(int)s[i]-'0')%a; 
    return ans; 
}
ll min(ll x,ll y){if(x<y) return x;return y;}
ll max(ll x,ll y){if(x>y) return x;return y;}
ll power(ll x,unsigned ll y) 
{ 
    if (y==0) 
        return 1; 
    else if (y%2==0) 
        return power(x,y/2)*power(x,y/2); 
    else
        return x*power(x,y/2)*power(x,y/2); 
}
ll hcf(ll a,ll b) 
{ 
    if(b==0) 
        return a; 
    return hcf(b,a%b);  
}
int main()
{
   fio;
   /*#ifndef ONLINE_JUDGE 
    	freopen("input.txt", "r", stdin); 
    	freopen("output.txt", "w", stdout); 
    	freopen("error.txt", "w", stderr); 
   #endif*/
   ll TT=1;
   //cin>>TT;
   while(TT--)
   {    
       ll k,a,b,i;
       cin>>k>>a>>b;
       for(i=a;i<b+1;i++)
       {
           if(i%k==0)
           {
               cout<<"OK";
               return 0;
           }
       }
       cout<<"NG";
   }
}

Measured memory_bytes: 3652
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define pb push_back
#define fi first
#define se second

#define MAX_V 10101
#define INF 1e9

struct edge{int to,cost;};
typedef pair<int,int> P;
int d[MAX_V];
int V;
vector<edge> G[MAX_V];

edge makeedge(int t,int c){
    edge e;
    e.to=t;
    e.cost=c;
    return e;
}

void addedge(int s,int t,int c){
    G[s].push_back(makeedge(t,c));
    //G[t].push_back(makeedge(s,cost));
}

void dijkstra(int s){
    priority_queue<P, vector<P>, greater<P> > que;
    fill(d,d+V,INF);
    d[s]=0;
    que.push(P(0,s)); 

    while(!que.empty()){
        P p=que.top(); que.pop();
        int v=p.second;
        if(d[v]<p.first) continue;
        for(int i=0;i<G[v].size();i++){
            edge &e=G[v][i];
            if(d[e.to]>d[v]+e.cost){
                d[e.to]=d[v]+e.cost;
                que.push(P(d[e.to],e.to));
            }
        }
    }
}


int main(){
    int i,j,n;
    cin>>n;
    V=n;
    int u,k;
    int x,y;
    for(i=0;i<n;i++){
        cin>>u>>k;
        for(j=0;j<k;j++){
            cin>>x>>y;
            addedge(i,x,y);
        }
    }
    dijkstra(0);
    for(i=0;i<n;i++){
        cout<<i<<" "<<d[i]<<endl;
    }
    return 0;
}



Measured memory_bytes: 8016
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

#define roop(i,n) for(i=0;i<n;i++)

using ll = long long;
using ull = unsigned long long;

constexpr ull mod = 1e9+7;
constexpr int N = 13;
ull dp[100010][N];

int myPower(int a, int n) { // aのn乗の計算
	int x = 1;
	while (n > 0) { // 全てのbitが捨てられるまで
		if ( n & 1) { // 一番右のbitが１のとき
			x *= a;
		}
		a *= a;
		n >>= 1; // bit全体を右に1つシフトして一番右を捨てる
	}
	return x;
}

int main() {
	int a, b, k, i;
	cin >> a >> b >> k;
	for (i = min(a, b); i >= 1; i--) {
		if (a % i == 0 && b % i == 0) {
			--k;
			if (k == 0) {
				cout << i << endl;
				return 0;
			}
		}
	}
	return 0;
}

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

int main() {
	int a,b;
	int n;
	while(1){
		int aten = 0,bten = 0;
		cin >> n;
		if(n == 0){
					break;
				}
		for(int i = 0; i < n; i++){
		cin >> a >> b;
		if(a > b){
			aten = aten + a + b;
		}
		else if(a == b){
			aten = aten + a;
			bten = bten + a;
		}
		else{
			bten = bten + b + a;
	}
		}
	cout << aten << " " << bten << endl;
	}
	return 0;
}

Measured memory_bytes: 1160
#include<bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define lper(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9;
const ll INF=4e18;
const ll dy[4]={1,0,-1,0};
const ll dx[4]={0,-1,0,1};
int main() {
int N;
 string s;
  cin >>s;
  int x=s.size();
  cout<<s.at(0)<<x-2<<s.at(x-1)<< endl;
}
  
  

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

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

using ll = long long;
using P = pair<ll,ll>;
using graph = vector<vector<int>>;

const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ll INF = 1LL<<60;
const ll mod = 1000000007LL;

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

int col[100005];
graph g;
bool color(int x){
  bool ok = true;
  for(auto nx:g[x]){
    if(col[nx]!=-1) {
      if(col[nx]==col[x]) ok = false;
      else continue;
    }
    else {
      col[nx] = 1-col[x];
      if(!color(nx)) ok = false;
    }
  }
  return ok;
}

int main() {
  ll N,M;
  cin>>N>>M;
  g.resize(N);
  rep(i,100005) col[i] = -1;
  col[0]=0;
  rep(i,M){
    int x,y;
    cin>>x>>y;
    x--;
    y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  bool can = color(0);
  if(!can) cout<<N*(N-1)/2-M<<endl;
  else{
    ll cnt0 = 0,cnt1 = 0;
    rep(i,N) {
      if(col[i]==0) cnt0++;
      if(col[i]==1) cnt1++;
    }
    cout<<cnt0*cnt1-M<<endl;
  }
}

Measured memory_bytes: 10048