akhauriyash/Code-Regression huggingface dataset:
import java.util.*;

public class Main {    

    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);                                               
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        
        int five  = 0;
        int seven = 0;
        
        if(A == 7){
            seven++;   
        }else if(A == 5){
            five++;
        }
        
        if(B == 7){
            seven++;
        }else if(B == 5){
            five++;
        }
        
        if(C == 7){
            seven++;
        }else if(C == 5){
            five++;
        }
                  
        if(five == 2 && seven == 1){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
        
                        
    }      
    
}
        
        
        
        
        
        
        
        
        
        

Measured memory_bytes: 21844
#include<bits/stdc++.h>
using namespace std;
#define int long long

int gcd(int a,int b){
  if(a < b) swap(a,b);
  if(b == 0) return a;
  return gcd(b,a%b);
}

signed main(){

  int x,y; cin >> x >> y;
  cout << gcd(x,y) << endl;

  return 0;
}



Measured memory_bytes: 3124
#include <iostream>
#include <climits>
#include <string>
#include <stdlib.h>
#include <algorithm>

using namespace std;
 
int ascSort(const void* v1, const void* v2) {
    const int _v1 = *((const int*)v1);
    const int _v2 = *((const int*)v2);
 
    if ( _v1 < _v2 ) {
        return 1;
    } else if ( _v1 > _v2 ) {
        return -1;
    } else {
        return 0;
    }
}

int main() {
	int a;
	cin >> a;
	if(a<1200){
		cout << "ABC";
	}else{
		cout << "ARC";
	}
	return 0;
}

Measured memory_bytes: 256
from collections import deque



# for #!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
from bisect import bisect_left as bl
from math import log2,ceil
from heapq import heappush, heappop
from itertools import permutations 
def main():
    # for t in range(int(input())):
        n = int(input())
        d = dict()
        for i in range(n):
            s = input()
            if s in d:
                d[s]+=1
            else:
                d[s]=1
        l = ['AC', 'WA', 'TLE', 'RE']
        for k in l:
            if k in d:
                print(k, "x", d[k], sep = " ")
            else:
                print(k, "x", 0, sep = " ")
            # heappush(h, l[i])

        


        
        




# endregion

if __name__ == "__main__":
    main()



Measured memory_bytes: 69712
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<vector>
using namespace std;
const int MAXN=100010;
int n,K,x[MAXN];
vector<int>posi,negi;
#define pb push_back
int ans=2e9;
inline bool cmp(const int &A,const int &B){return abs(A)<abs(B);}
int main()
{
    scanf("%d%d",&n,&K);
    for(register int i=1;i<=n;i++)
        scanf("%d",x+i);
    for(register int i=1;i<=n;i++)
        if(x[i]>0)posi.pb(x[i]);
        else if(x[i]<0)negi.pb(x[i]);
        else K--;
    if(K<=0)
    {
        cout<<0<<endl;
        return 0;
    }
    sort(posi.begin(),posi.end(),cmp),sort(negi.begin(),negi.end(),cmp);
    if(!negi.size())
    {
        ans=min(ans,posi[K-1]);
        cout<<ans<<endl;
        return 0;
    }
    if(!posi.size())
    {
        ans=min(ans,abs(negi[K-1]));
        cout<<ans<<endl;
        return 0;
    }
    for(register int i=min((int)posi.size()-1,K-1);~i;i--)
    {
        int j=K-i-1;
        if(j>negi.size())break;
               // cout<<i<<" "<<j<<endl;
        if(j==0)ans=min(ans,posi[i]);
        else
        {
            ans=min(ans,posi[i]+2*abs(negi[j-1]));
            ans=min(ans,2*posi[i]+abs(negi[j-1]));
        }
    }
    if(negi.size()>=K)
        ans=min(ans,abs(negi[K-1]));
    cout<<ans<<endl;
}

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

int main()
{
    int n;
    cin >> n;
    
    int p[n];
    for (auto i = 0; i < n; i++)
    {
        cin >> p[i];
    }


    int ans = 0;
    int min = 200001;
    for (auto i = 0; i < n; i++)
    {
        if (p[i] < min)
        {
            min = p[i];
            ans++;
        }
    }

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


Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
 
 
int main()
{
 
    string a,b;
    cin>>a>>b;

    int64_t wk = stol(a+b);

    int64_t swk = sqrt(wk);
    if(swk*swk == wk){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
 
    return 0;
}   

Measured memory_bytes: 256
#include <stdio.h>
#define HOUR 3600
#define MINUTE 60

int main(void){
  int sec, sec_m, sec_s, h, m, s;
  scanf("%d", &sec);

  h = sec / HOUR;
  sec_m = sec % HOUR;

  m = sec_m / MINUTE;
  sec_s = sec_m % MINUTE;

  s = sec_s;

  printf("%d:%d:%d\n", h, m, s);

  return 0;
}

Measured memory_bytes: 592
a,b,k=gets.chomp.split(" ").map(&:to_i)
c=a+b

if c-k > 0
    if c-k > b
        a -= k
    else
        b=b-(k-a)
        a=0
    end
else #0以下
    a=0
    b=0
end

print a," ",b; p

Measured memory_bytes: 3836
import java.util.Scanner;


class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		final int T = (int)'t';
		final int[] CODE_THIS = {0,12,11,1};
		final int[] CODE_THAT = {0,12,19,0};
		final int[] CODE_THE = {0,12,15};
		final int MIN = 97;
		final int MAX = 122;
		final int MASS = 26;
		int caesar = 0;
		while((in.hasNext())){
			String MS = in.nextLine();
			String s = MS.replaceAll("\\.", "");
			String[] ss = s.split(" ");
			for(int i = 0 ; i < ss.length ; i++){
				if(ss[i].length() == CODE_THE.length){
					int tC = (int)ss[i].charAt(0);
					int[] cb = new int[ss[i].length()];
					for(int j = 0 ;j < ss[i].length();j++){
						int cs = tC - (int)ss[i].charAt(j);
						if(cs < 0){
							cs = cs + MASS;
						}
						cb[j] = cs;
					}
					if (cb[1] == CODE_THE[1] && cb[2] == CODE_THE[2]){
						caesar = T - tC;
						break;
					}			
				}
				else if(ss[i].length() == CODE_THIS.length){
					int tC = (int)ss[i].charAt(0);
					int[] cb = new int[ss[i].length()];
					for(int j = 0 ;j < ss[i].length();j++){
						int cs = tC - (int)ss[i].charAt(j);
						if(cs < 0){
							cs = cs + MASS;
						}
						cb[j] = cs;
					}
					if (cb[1] == CODE_THAT[1] && cb[2] == CODE_THAT[2] && cb[3] == CODE_THAT[3]){
						caesar = T - tC;
						break;
					}
					else if (cb[1] == CODE_THIS[1] && cb[2] == CODE_THIS[2] && cb[3] == CODE_THIS[3]){
						caesar = T - tC;
						break;
					}
				}
			}
			for(int i = 0; i < MS.length(); i++){
				int num = (int)MS.charAt(i);
				if(num < MAX+1 && num > MIN-1){
					int ans = num+caesar;
					if( ans < MIN){
						ans = ans + MASS;
					}
					else if(ans > MAX){
						ans = ans - MASS;
					}
					System.out.print(Character.toChars(ans)[0]);
				}
				else{
					System.out.print(MS.charAt(i));
				}
			}
			System.out.println();
			caesar = 0;
		}
	}
}

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

const ll INF = 1e18;
const ll MOD = 1000000007;
const ll MX = 0; //最大値

#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
#define ALL(x) (x).begin(),(x).end()
#define MAX(x) *max_element(ALL(x))
#define PB push_back
#define F first
#define S second

int main(){
    ll n; cin >> n;
    vector<ll> a(n), b(n);
    rep(i, n) cin >> a[i] >> b[i];
    
    int res = 0;
    rep(i, n){
        if(a[i] == b[i]) res++;
        else res = 0;

        if(res == 3){
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 3624
#include<bits/stdc++.h>
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
#define pb push_back

using namespace std;
const int N=2e6+5;
const int mod=1e9+7;

int n,val[N];
vi adj[N];

vi b,r; 
// bipartite

void dfs(int x,int p, int h=0){
    if(h%2) b.push_back(x);
    else r.push_back(x);
    for(auto xx: adj[x]) if(xx!=p){
        dfs(xx,x,h+1);
    }
}

vi c[3];
int fill(int i, int j, int k){
    int t;
    if(c[i].size()) t=c[i].back(),c[i].pop_back();
    else if(c[j].size()) t=c[j].back(),c[j].pop_back();
    else t=c[k].back(),c[k].pop_back();
    return t;
}

int main(){
    
    cin>>n;
    for(int i=1;i<n;i++) {
        int u,v;
        cin>>u>>v;
        adj[u].push_back(v);
        adj[v].push_back(u);
    }    

    for(int i=1;i<=n;i++) c[i%3].push_back(i);
    dfs(1,-1);

    if(b.size()<=n/3){
        for(auto x: b) val[x]=fill(0,1,2);
        for(auto x: r) val[x]=fill(1,2,0);
    }else if(r.size()<=n/3){
        for(auto x: r) val[x]=fill(0,1,2);
        for(auto x: b) val[x]=fill(1,2,0);
    }else{
        for(auto xx: b) val[xx]= fill(1,0,2);
        for(auto xx: r) val[xx]= fill(2,0,1);
    }
    for(int i=1;i<=n;i++) cout<<val[i]<<" ";
    return 0;
}

Measured memory_bytes: 66072
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using P = pair<ll,ll>;
const ll INF = ll(1e18)+5;
ll H,W;


int main() {
    cin >> H >> W;
    ll c[10][10];
    for(int i=0;i<10;i++)for(int j=0;j<10;j++){
        cin >> c[i][j];
    } 
    vector<ll> d(10,INF);
    d[1] = 0;
    priority_queue<P,vector<P>,greater<P>> pq;
    pq.push(P(0,1));
    while(!pq.empty()){
        P p = pq.top();
        pq.pop();
        if(p.first > d[p.second]){
            continue;
        }
        // cerr <<"pos="<< p.second <<"val="<< p.first << endl;
        for(int i=0;i<10;i++){
            if(i == p.second){
                continue;
            }
            if(d[i]>p.first + c[i][p.second]){
                // cerr <<"i="<<i<<"d[i]=" << d[i] << endl;
                d[i] = p.first + c[i][p.second];
                pq.push(P(d[i],i));
            }
        }
    }

    ll ans =0;
    for(int i=0;i<H;i++)for(int j=0;j<W;j++){
        ll a;
        cin >> a;
        if(a==-1){
            continue;
        }
        ans += d[a];
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define REP(i, start, end) for (ll i = start, i##Len = (end); i < i##Len; ++i)
#define REPR(i, start, end) for (ll i = start, i##Len = (end); i > i##Len; --i)
using ll = long long;
using namespace std;

int main()
{
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);

    int n;
    cin >> n;
    vector<ll> a(n);
    REP(i, 0, n)
    cin >> a[i];
    sort(a.begin(), a.end());
    ll ans = 0;
    REP(i, 0, n)
    REP(j, i + 1, n)
    REP(k, j + 1, n)
    {
        if (a[i] != a[j] && a[i] != a[k] && a[j] != a[k] && a[k] < a[i] + a[j])
            ++ans;
    }

    cout << ans << endl;
}


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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define IN freopen("perimetric_chapter_1_input.txt","r",stdin)
#define OUT freopen("output.txt","w",stdout)

#define pb push_back
#define mp make_pair
#define FOR(i,a,b) for(i=a ; i<=b ; i++)
#define DBG printf("Hi\n")
#define i64 long long int
#define ui64 unsigned long long int
#define xx first
#define yy second
#define ln 17
#define off 2002

#define sq(x) ((x)*(x))

#define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL)

using namespace __gnu_pbds;
using namespace std ;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef tree< i64, null_type, less<i64>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef pair<int,int> pii;

#define log 20
#define mod 1000000007LL
#define INF 1000000000000000000LL
#define maxn 300005

const long double eps = 1e-9 ;

char s[305] ;

int dp[305][305][305] ;

int f(int l, int r, int k)
{
    if( l>r ) return 0 ;
    if(l==r) return dp[l][r][k] = 1 ;
    if( dp[l][r][k] != -1 ) return dp[l][r][k] ;

    if(s[l]==s[r]) return dp[l][r][k] = f(l+1,r-1,k) + 2 ;
    int ret = max(f(l+1,r,k) , f(l,r-1,k)) ;
    if(k>0) ret = max( ret , f(l+1,r-1,k-1) + 2 ) ;
    return dp[l][r][k] = ret ;
}

int main()
{
    scanf("%s",s) ;
    int k ;

    scanf("%d",&k) ;

    memset(dp,-1,sizeof(dp)) ;

    int n = strlen(s) ;
    printf("%d\n", f(0,n-1,k)) ;

    return 0 ;
}


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

using namespace std;

int main(void) {

	int R;

	cin >> R;

	if (R < 1200)
		cout << "ABC" << endl;
	else if (R < 2800) 
		cout << "ARC" << endl;
	else
		cout << "AGC" << endl;

	return 0;

}

Measured memory_bytes: 256
#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <numeric>
#include <string>
#include <vector>

using namespace std;
int main() {
    int N, M;
    cin >> N >> M;
    cout << N * (N - 1) / 2 + M*(M - 1) / 2 << endl;
}


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

#define REP(i,n)   for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); i++)

typedef long long ll;

//------------------------------------------------------------------------------
ll mod_pow(ll x, ll n, ll mod) {
  ll res = 1;
  while (n > 0) {
    if (n & 1) {
      res = res * x % mod;
    }
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}

ll mod_inv(ll x, ll mod) {
  return mod_pow(x, mod - 2, mod);
}

ll mod_comb(ll n, ll m, ll mod) {
  ll a = 1, b = 1;
  while(m > 0) {
    a = a * n % mod;
    b = b * m % mod;
    n--;
    m--;
  }
  return a * mod_inv(b, mod) % mod;
}

//------------------------------------------------------------------------------
const int MOD = 1000000007;
const int WH_MAX = 100000;

int W, H;



int main() {
  int n,a,b;
  cin>>n>>a>>b;
  cout<<(
      (
      (mod_pow(2,n,MOD)-1+MOD)%MOD
      -mod_comb(n,a,MOD)+MOD)%MOD
      -mod_comb(n,b,MOD)+MOD)%MOD<<endl;
  return 0;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;
using ll = long long;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
int main()
{
    int h,w;
    cin >> h >> w;
    vector<vector<char> > s(h,vector<char>(w));
    int count = 0;
    for(int i = 0;i < h;i++)
    {
        for(int j = 0;j < w;j++)
        {
            cin >> s[i][j];
            if(s[i][j] == '#')
            {
                count++;
            }
        }
    }
    vector<vector<int> > dist(h,vector<int>(w,-1));
    dist[0][0] = 0;
    queue<pair<int,int> > que;
    que.push(make_pair(0,0));
    while(!que.empty())
    {
        pair<int,int> current_pos = que.front();
        int x = current_pos.first;
        int y = current_pos.second;
        que.pop();
        for(int direction = 0;direction < 4;direction++)
        {
            int next_x = x + dx[direction];
            int next_y = y + dy[direction];
            if(next_x < 0 || next_x >= h || next_y < 0 || next_y >= w)
            {
                continue;
            }
            if(s[next_x][next_y] == '#')
            {
                continue;
            }
            if(dist[next_x][next_y] == -1)
            {
                que.push(make_pair(next_x,next_y));
                dist[next_x][next_y] = dist[x][y] + 1;
            }
        }
    }
    if(dist[h - 1][w - 1] == -1)
    {
        cout << "-1\n";
    }
    else
    {
        cout << h * w - dist[h - 1][w - 1] - count - 1;
    }

    return 0;
}

Measured memory_bytes: 256
from collections import deque
import numpy as np
n,m,k = map(int,input().split())
A = deque(map(int,input().split()))
B = deque(map(int,input().split()))

a=[0]
b = [0]
for i in range(n):
    a.append(a[i]+A[i])
for i in range(m):
    b.append(b[i]+B[i])

x,j = 0,m
for i in range(n+1):
    if a[i]>k:
        break
    while b[j] > k-a[i]:
        j -=1
    x = max(x,i+j)
print(x)


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

int main(){
    int n;
    cin >> n;
    ll a[n];
    long long sum = 0,x = 0,ans = 1000000000000000;
    for(int i = 0; i < n; i++){
        cin >> a[i];
        sum += a[i];
    }
    for(int i = 0; i < n; i++){
        x += a[i];
        sum -= a[i];
        ans = min(ans,abs(sum-x)); 
    }
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 1792
N = int(input())
MOD = 10**9 + 7

if N <= 1:
    print(0)
else:
    all_A = pow(10, N, MOD) + MOD
    non_0_9_A = pow(8, N, MOD)
    non_0_A = pow(9, N, MOD)
    e_0_A = (all_A - non_0_A) % MOD
    e_0_or_9_A = (all_A - non_0_9_A) % MOD
    print((e_0_A * 2 - e_0_or_9_A) % MOD)


Measured memory_bytes: 9180
#include <iostream>
#include <vector>
using namespace std;
const int MAX = 300005;

template<class M> struct SegmentTree
{
	int n;
	int size;
	vector<M> data;
	const function<M(M, M)> op;
	const M ID;

	SegmentTree(int n, function<M(M, M)> op, M id, const vector<M> &init_vals=vector<M>()) : n(n), op(op), ID(id) {
		size = 1;
		while (size < n) size <<= 1;
		data.assign(size * 2, ID);
		for (int i = 0; i < init_vals.size(); i++) data[size+i] = init_vals[i];
		for (int i = size-1; i > 0; i--) data[i] = op(data[2*i], data[2*i+1]);
	}

	void init(const vector<M> &init_vals) {
		data.assign(size * 2, ID);
		for (int i = 0; i < init_vals.size(); i++) data[size+i] = init_vals[i];
		for (int i = size-1; i > 0; i--) data[i] = op(data[2*i], data[2*i+1]);
	}

	void update(int idx, M x) {
		idx += size;
		data[idx] = x;
		while (idx >>= 1) {
			data[idx] = op(data[2*idx], data[2*idx+1]);
		}
	}

	M query(int l, int r) {
		M L = ID, R = ID;
		for (l += size, r += size; l < r; l >>= 1, r >>= 1) {
			if (l & 1) L = op(L, data[l]), l++;
			if (r & 1) r--, R = op(data[r], R);
		}
		return op(L, R);
	}

	M query_all() {
		return data[1];
	}

	int find_max_right(int l, const function<bool(M)> &f) {
		if (l == n) return n;
		l += size;
		M s = ID;
		while (true) {
			while (l % 2 == 0) l >>= 1;
			if (!f(op(s, data[l]))) break;
			s = op(s, data[l]);
			l++;
			if ((l & -l) == l) return n;
		}
		while (l < size) {
			l = 2 * l;
			if (f(op(s, data[l]))) {
				s = op(s, data[l]);
				l++;
			}
		}
		return l - size;
	}

	int find_min_left(int r, const function<bool(M)> &f) {
		if (r == 0) return 0;
		r += size;
		M s = ID;
		while (true) {
			r--;
			while (r > 1 && (r % 2)) r >>= 1;
			if (!f(op(data[r], s))) break;
			s = op(data[r], s);
			if ((r & -r) == r) return 0;
		}
		while (r < size) {
			r = 2 * r + 1;
			if (f(op(data[r], s))) {
				s = op(data[r], s);
				r--;
			}
		}
		return r + 1 - size;
	}

	M val(int idx) {
		return data[size + idx];
	}

	vector<M> val_vec() {
		vector<M> res(n);
		for (int i = 0; i < n; i++) res[i] = data[size+i];
		return res;
	}
};

int main() {
	int n, k;
	cin >> n >> k;
	using M = int;
	auto op = [&](M a, M b) -> M {
		return max(a, b);
	};
	M id = -1;
	vector<int> ini(MAX, 0);
	SegmentTree<M> st(MAX, op, id, ini);

	for (int i = 0; i < n; i++) {
		int a;
		scanf("%d", &a);
		int l = max(a - k, 0);
		int r = min(MAX, a + k + 1);
		int m = st.query(l, r);
		st.update(a, m + 1);
	}
	int ans = st.query_all();
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 8136
process.stdin.resume();
process.stdin.setEncoding('utf8');
 
// inputに入力データ全体が入る
function Main(input) {
  // 1行目がline1, 2行目がline2, …に入る
  var arg   = input.split("\n");
  var line0 = arg[0].split(" ");
//  var line1 = arg[1].split(" ");
//  var line2 = arg[2].split(" ");
//  var line3 = arg[3].split(" ");

  var a = (line0[0]);
  var b = (line0[1]);
  var c = (line0[2]);
//  var d = Number(line1[1]);

  var ans = "initial_answer";
  //console.log( "[INPUT] "+ input1 +" "+ input2 +" "+ input3 + " " + input4 );
  
  // LOGIC //
  ans = "NO";
  var str = [a.charAt(0), b.charAt(0), c.charAt(0)];
  
  


  console.log(str.join( "" ));

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


Measured memory_bytes: 7628
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
#include <ctime>
#include <bitset>
#include <complex>
#include <chrono>
#include <random>
#include <functional>

using namespace std;

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
typedef long long ll;

using ipair = pair<int, int>;

ll INF = 1e16+7;
ll mod = 1e9+7;

bool operator>(const ipair a,const ipair b){return a.first > b.first;}


const double PI=3.14159265358979323846;

int main(){
  int N;
  cin >> N;
  for(int i=1; i<=9; i++){
    for(int j=1; j<=9; j++){
      if(N == i*j){
        cout << "Yes" << endl;
        return 0;
      }
    }
  }

  cout << "No" << endl;

  return 0;
}

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

int main(){
    string S;
    cin >> S;
    if (S[0]=='A') cout << "T";
    else if (S[0]=='T') cout << "A";
    else if (S[0]=='G') cout << "C";
    else if (S[0]=='C') cout << "G";
    return 0;
    
}

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

using namespace std;

const long long MOD = 1000000007LL;
long long GCD(long long a, long long b){return b == 0 ? a : GCD(b, a % b);}

vector<long long> a, b;

int main(){

    cin.sync_with_stdio(0); cin.tie(0); cout.tie(0);

    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int n;
    cin >> n;

    for(int i = 0; i < n; ++i){
        long long j;
        cin >> j;
        a.push_back(j);
    }

    for(int i = 0; i < n; ++i){
        long long j;
        cin >> j;
        b.push_back(j);
    }

    long long tot = 0;
    long long useful = 0;

    for(int i = 0; i < n; ++i){
        if(b[i] > a[i]){
            useful += (b[i] - a[i]) / 2;
        } else {
            tot += a[i] - b[i];
        }
    }

    if(tot > useful)
        cout << "No";
    else
        cout << "Yes";

    return 0;
}


Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
#define len(val) static_cast<long long>(val.size())
#define rep(i, n) for(int i=0; i<(n); i++)
typedef long long ll;
typedef pair<int, int> P;


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

    int N;
    cin >> N;
    int P[N];
    rep(i, N) cin >> P[i];

    sort(P, P+N);
    int ans = 0;
    rep(i, N){
        if(i == N-1) ans += P[i]/2;
        else ans += P[i];
    }
    cout << ans << endl;

}


Measured memory_bytes: 256
#include<stdio.h>
int n,n4,n2,now;
int main(){
	scanf("%d ",&n);

	for(int i = 1; i <= n ; i++)
	{
		scanf("%d",&now);
		if (now % 4 == 0)
			n4++;
		else if(now % 2 == 0)
			n2++;
	}
		if(n2 > 0)
			n2--;

		if(n4 >= (n-n2)/2)
			printf("Yes");
		else
			printf("No");	
}



Measured memory_bytes: 128
#define MYDEBUG
#include <iostream>
#include <vector>
#include <chrono>
#include <random>
#include <algorithm>
#include <map>
#include <unordered_map>

#ifdef MYDEBUG
#define debug(x) cout<<#x<<": "<<x<<endl
#else
#define debug(x)
#endif
#define ll long long
#define ull unsigned long long
#define eps 1e-14
#define all(x) x.begin(), x.end()
#define umap unordered_map
using namespace std;

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  out << "[";
  size_t last = v.size() - 1;
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i];
    if (i != last)
      out << ",";
  }
  out << "]";
  return out;
}

int main() {
  int N, M;
  cin >> N >> M;
  vector<pair<int, int> > pos;
  vector<pair<int, int> > ch;
  for (int i = 0; i < N; ++i) {
    int a, b;
    cin >> a >> b;
    pos.push_back(make_pair(a, b));
  }
  for (int i = 0; i < M; ++i) {
    int c, d;
    cin >> c >> d;
    ch.push_back(make_pair(c, d));
  }
  for (int i = 0; i < N; ++i) {
    int mindist = 1000000000;
    int chp = 1;
    int x1 = pos[i].first, y1 = pos[i].second;
    for (int k = 0; k < M; ++k) {
      int x2 = ch[k].first, y2 = ch[k].second;
      int dist = abs(x1 - x2) + abs(y1 - y2);
      if (dist < mindist) {
        mindist = dist;
        chp = k + 1;
      }
    }
    cout << chp << endl;
  }
}


Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
#include<bitset>
#define rep(i,n) for(int i=0;i<(n);++i)
using ll = long long;
#define _GLIBCXX_DEBUG

using namespace std;

int main() {
	int x;
	cin >> x;
	vector<int> v1;
	if (x == 2) {
		cout << x << endl; return 0;
	}
	while (1) {
		for (int i = 2; i < x; i++) {
			if (i == x - 1) {
				cout << x << endl;
				return 0;
			}
			if (x % i == 0) {
				break;
			}
		
		}
		
		++x;
	}
	
	
}

Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
#include <unordered_map>
#define maxn 100005
#define mod 1000000007
using namespace std;
typedef long long LL;
int main()
{
    int n,r;
    scanf("%d%d",&n,&r);
    int num=0;
    while(n>=r)
    {
        num++;
        n/=r;
    }
    printf("%d",num+1);
    return 0;
}


Measured memory_bytes: 760
#include <stdio.h>
#include <string.h>

int main(){
  char s[5];
  scanf("%s",s);
  for(int i=1; i<4; i++){
    if(s[i-1] == s[i]){
      printf("Bad\n");
      return 0;
    }
  }
  printf("Good\n");
}

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

int main (){
    int a,b,c;
    cin >> a >> b >> c;

    if(a==b&&b!=c || a==c&&a!=b || b==c&& c!=a){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }

}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(),x.end()
#define rep(i,j,n) for (int i = j; i < (int)(n); i++)
#define _GLIBCXX_DEBUG
#define MOD 1000000007
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; }
//name[i][j]-> vvl name(i,vl(j))
//map<int,int>mp
//余りを切り上げる =>  (a + b - 1) / b 
ll dp[110][100100]={0};

signed main(){
	ll n,m; cin>>n>>m;
	vl w(110),v(110);
	rep(i,0,n) cin>>w[i]>>v[i];
	rep(i,0,n){
		rep(j,0,m+1){
			if(j-w[i]>=0) chmax(dp[i+1][j],dp[i][j-w[i]]+v[i]);
			chmax(dp[i+1][j],dp[i][j]);
		}
	}
	cout<<dp[n][m];
	
	return 0;
}

Measured memory_bytes: 79360
#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<stack>
#include<set>
#include<map>
#define ll long long
#define PI acos(-1.0)
#define MAX 0x3fffffff
using namespace std;

int n, m, x;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin >> n >> m;
	int sum = 0;
	for (int i = 0; i < m; i++) {
		cin >> x;
		sum += x;
	}
	cout << (n >= sum ? n - sum : -1) << endl;
	return 0;
}

Measured memory_bytes: 3612
N = int(input())
h = list(map(int,input().split()))
def f(arr):
    if(sum(arr) == 0):
        return 0
    while(arr[0] == 0):
        arr.pop(0)
    while(arr[-1] == 0):
        arr.pop()
    if (min(arr) == 0):
        index = arr.index(0)
        return f(arr[0:index]) + f(arr[index: len(arr)])
    else:
        minval = min(arr)
        if (len(arr) == 1):
            return minval
        else:
            arr = list(map(lambda x: x- minval, arr))
            if(sum(arr)==0):
                return minval
            else:
                return f(arr) + minval
print(f(h)) 

Measured memory_bytes: 3064
def read_line():
    tokens = input().split()
    p = int(tokens[0])
    S = tokens[1]
    return p, S

N, M = map(int, input().split())

wa_counters = [0 for _ in range(N + 1)]
correct_answers = 0
penalties = 0
for _ in range(M):
    p, S = read_line()
    if wa_counters[p] == -1:
        continue

    if S == "AC":
        penalties += wa_counters[p]
        correct_answers += 1
        wa_counters[p] = -1
    else:
        wa_counters[p] += 1

print(correct_answers, penalties)


Measured memory_bytes: 3928
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
const int MOD = 1e9 + 7;
template<class T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<class T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template<class T>
istream& operator >> (istream& is, vector<T>& v)
{
	for (auto &i : v) is >> i;
	return is;
}
template<class T>
ostream& operator<<(ostream& os, vector<T>& v)
{
	const string delimiter = "\n";
	REP(i, v.size())
	{
		os << v[i];
		if (i != v.size() - 1) os << delimiter;
	}
	return os;
}
/*--------------------template--------------------*/

int main()
{
	cin.sync_with_stdio(false); cout << fixed << setprecision(10);
	ll k, a, b; cin >> k >> a >> b;
	if (b - a <= 2) cout << 1 + k << endl;
	else
	{
		if (a - 1 >= k) cout << 1 + k << endl;
		else
		{
			ll t = a;
			k -= a - 1;
			if (k % 2 == 1)
			{
				k--;
				t++;
			}
			t += k / 2 * (b - a);
			cout << t << endl;
		}
	}
	return 0;
}

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

/* typedef */
/* long系 */
typedef long long ll;   // long long
typedef long double ld; // long double
/* vector系 */
typedef vector<int> vi;                    // intのvector
typedef vector<double> vd;                 // doubleのvector
typedef vector<ll> vll;                    // llのvector
typedef vector<ld> vld;                    // ldのvector
typedef vector<pair<int, int>> vi_i;       // i_iのvector
typedef vector<pair<double, double>> vd_d; // d_dのvector
typedef vector<pair<ll, ll>> vl_l;         // l_lのvector
typedef vector<pair<ld, ld>> vld_ld;       // ld_ldのvector
typedef vector<string> vs;                 // stringのvector
/* pair系 */
typedef pair<int, int> i_i;       // int同士のpair
typedef pair<double, double> d_d; // double同士のpair
typedef pair<ll, ll> l_l;         // ll同士のpair
typedef pair<ld, ld> ld_ld;       // ld同士のpair

/* define */
#define all(v) v.begin(), v.end() // コンテナ全体
#define PI (acos(-1))             // 円周率pi

/* main */
void Main(void)
{
    while (true)
    {
        int a, b;
        cin >> a >> b;
        if (a == 0 && b == 0)
        {
            break;
        }
        else if (a > b)
        {
            swap(a, b);
        }
        cout << a << " " << b << endl;
    }
}

int main(int argc, char const *argv[])
{
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Main();

    return 0;
}



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

int a[100000];
int main() {
	int n, q; scanf("%d%d", &n, &q);
	rep(i, n)scanf("%d", &a[i]);
	rep(i, q) {
		ll x; scanf("%lld", &x);
		int g = 0; ll sum = 0, ans = 0;
		rep(j, n) {
			while (g < n&&sum <= x)sum += a[g++];
			ans += g - j; if (sum > x)ans -= 1;
			sum -= a[j];
		}
		printf("%lld\n", ans);
	}
}

Measured memory_bytes: 3548
#include "bits/stdc++.h"
using namespace std;
#define repr(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repr(i,0,n)
#define reprrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define reprev(i,n) reprrev(i,0,n)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define mp make_pair
#define mt make_tuple
#define MOD 1000000007
#define PI 3.1415926535
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<Pi> vPi;
typedef vector<Pll> vPll;
typedef vector<vector<int>> vvi;
typedef vector<vector<bool>> vvb;
typedef vector<vector<ll>> vvll;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
typedef vector<vector<double>> vvd;
typedef vector<vector<Pi>> vvPi;
typedef priority_queue<int, vector<int>, greater<int>> pqli;
typedef priority_queue<ll, vector<ll>, greater<ll>> pqlll;
typedef priority_queue<Pi, vector<Pi>, greater<Pi>> pqlP;
string YN(bool y) { return (y?"YES":"NO"); }
string yn(bool y) { return (y?"Yes":"No"); }
string ON(bool y) { return (y?"OK":"NG"); }
int main(void)
{
	int x, ans=1, min=1e9;

	cin>>x;

	repr(i, 2, x+1){
		int temp=i;
		while(temp<=x){
			temp*=i;
			if(temp<=x&&min>abs(x-temp)){
				min=x-temp; ans=temp;
			}
		}
	}
	cout<<ans<<endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define rrep(i, a, b) for (int i = a; i >= (b); i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
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;
}
void hr() {
   cerr << "--------------" << endl;
}
const int INF = 1001001001;
const int MOD = 1000000007;

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

   int n, m;
   cin >> n >> m;
   if (n % 2) {
      for (int l = 1, r = n - 1; l < r; l++, r--) {
         if (m > 0) {
            printf("%d %d\n", l, r);
            m--;
         }
      }
   } else {
      bool fg = false;
      for (int l = 1, r = n - 1; l < r; l++, r--) {
         if (!fg && r - l <= n / 2) {
            r--;
            fg = true;
         }
         if (m > 0) {
            printf("%d %d\n", l, r);
            m--;
         }
      }
   }

   return 0;
}

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

//--------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define LL long long
#define INF INT_MAX/3

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

//--------------------------------------------

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


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

int main()
{
	 int a,b;
    cin>>a>>b;
    
    if(a>b)swap(a,b);
    
    if(a==1 && b==2)
		cout<<3;
    if(a==1 && b==3)
		cout<<2;
    if(a==2 && b==3)
		cout<<1;

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=405;
const int mod=998244353;
int n,m,s1,s2,a[maxn],b[maxn];
ll f[maxn][maxn],g[maxn][maxn],h[maxn][maxn];
ll fac[maxn],inv[maxn],inv_fac[maxn],inv_pow[maxn][maxn];
inline ll fpow(ll a,ll b)
{
	ll ret=1;
	for(;b;b>>=1,a=a*a%mod)
		if(b&1) ret=ret*a%mod;
	return ret;
}
int main()
{
	fac[0]=fac[1]=inv[0]=inv[1]=inv_fac[0]=inv_fac[1]=1;
	for(int i=2;i<maxn;i++) fac[i]=fac[i-1]*i%mod;
	for(int i=2;i<maxn;i++) inv[i]=(mod-mod/i)*inv[mod%i]%mod;
	for(int i=2;i<maxn;i++) inv_fac[i]=inv[i]*inv_fac[i-1]%mod;
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d%d",&a[i],&b[i]),s1+=a[i],s2+=b[i];
	f[0][0]=-1;
	for(int i=1;i<=n;i++)
	{
		h[i][0]=1,h[i][1]=a[i];
		for(int j=2;j<=b[i];j++) h[i][j]=h[i][j-1]*h[i][1]%mod;
		for(int j=s1;j>=0;j--)
			for(int k=s2-1;k>=0;k--)
			{
				if(f[j][k])
				{
					for(int l=0;l<b[i];l++)
						(f[j+a[i]][k+l]-=f[j][k]*inv_fac[l]%mod*h[i][l])%=mod;
					(g[j+a[i]][k+b[i]-1]-=f[j][k]*inv_fac[b[i]-1]%mod*h[i][b[i]])%=mod;
				}
				if(g[j][k])
					for(int l=0;l<b[i];l++)
						(g[j+a[i]][k+l]-=g[j][k]*inv_fac[l]%mod*h[i][l])%=mod;
			}
	}
	ll ans=0;
	for(int i=1;i<=s1;i++)
	{
		inv_pow[i][0]=1,inv_pow[i][1]=inv[i];
		for(int j=2;j<=s2;j++) inv_pow[i][j]=inv_pow[i][j-1]*inv_pow[i][1]%mod;
		for(int j=0;j<s2;j++)
			(ans+=s1*inv[i]%mod*fac[j]%mod*g[i][j]%mod*inv_pow[i][j+1]%mod*(j+1)%mod)%=mod;
	}
	printf("%lld\n",(ans+mod)%mod);
	return 0;
}

Measured memory_bytes: 5376
#include <bits/stdc++.h>
using namespace std;
#define all(v) (v).begin(),(v).end()
const int INF = 1e9;
typedef long long ll;
typedef pair<ll, ll> P;

int N, M;
vector<int> visited;
vector<vector<int>> G;
int num_visited = 0;
int ans = 0;

void dfs(int now){
    visited[now] = 1;
    num_visited++;
    //すべての頂点を訪れたなら
    if(num_visited == N){
        ans++;
    }
    for(int i=0;i<G[now].size();i++){
        int next = G[now][i];
        if(!visited[next]) dfs(next);

    }
    visited[now] = 0;
    num_visited--;
}

int main() {
    cin >> N >> M;
    G = vector<vector<int>> (N); //サイズを確保する
    visited = vector<int> (N,0);
    for(int i=0; i<M; i++){
        int a, b;
        cin >> a >> b;
        a--;
        b--;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    //頂点番号0からDFSを始める
    dfs(0);
    cout << ans << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <climits>
#include <set>
#include <string>
#include <algorithm>
#include <vector>
#define MAX 1000000007


using namespace std;
#define ll long long
#define dbg if(0)
#define ISRANGE(val,lo,hi) ((lo<=val)&&(val<hi))



int main(){
    ll ans=0,n;
    cin>>n;
    //ll a[n];
    ll cnt=0;
    for(int i=0;i<n;i++){
        ll num=0;
        cin>>num;
        if(num==cnt+1){
            cnt++;
        }
    }
    if(cnt==0){
        ans=-1;
    }else{
        ans=n-cnt;
    }

    cout <<ans<<endl;

    return 0;

}

Measured memory_bytes: 256
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<iostream>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<map>
#include<queue>
#include<vector>
#include<stack>
#include<set>
#define pa pair<int,int>
#define INF 0x3f3f3f3f
#define inf 0x3f
#define fi first
#define se second
#define mp make_pair
#define ll long long
#define ull unsigned long long
#define pb push_back
#define pause system("pause")

using namespace std;

inline ll read()
{
    long long f=1,sum=0;
    char c=getchar();
    while (c<'0' || c>'9')
    {
        if (c=='-')	f=-1;
        c=getchar();
    }	
    while (c>='0' && c<='9')
    {
        sum=sum*10+c-'0';
        c=getchar();
    }
    return sum*f;
}
int main()
{
	ll l=read(),r=read();
	int ans=0;
	while (r>=l) l*=2,ans++; 
//	cout<<(int)log2((double)r/l)+1<<endl;
	cout<<ans;
    return 0;
}


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

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vint;
typedef vector<double> vdbl;
typedef vector<ll> vll;
typedef vector<string> vstr;
typedef vector<vector<int> > vvint;
typedef vector<pair<int, int> > vpii;
typedef vector<pair<ll, ll> > vpll;
typedef priority_queue<int, vector<int>, greater<int> > spqint; //小さい順に取り出し
typedef priority_queue<ll, vector<ll>, greater<ll> > spqll;     //小さい順に取り出し
typedef priority_queue<int, vector<int>, less<int> > bpqint;    //大きい順に取り出し
typedef priority_queue<ll, vector<ll>, less<ll> > bpqll;        //大きい順に取り出し

#define REP(i, n) for (int(i) = 0; (i) < (int)(n); i++)
#define FOR(i, a, b) for (int(i) = a; (i) < (int)b; i++)
#define IREP(i, v) for (auto i = v.begin(); i != v.end(); i++)
#define MOD 1000000007
#define NIL -1
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define PF push_front
#define TS to_string
#define BS binary_search
#define LB lower_bound
#define UB upper_bound
#define NP next_permutation
#define ALL(v) (v).begin(), (v).end()
#define SZ(x) (ll) x.size()
#define SP(x) setprecision((ll)x)

const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
const double PI = M_PI;
const int dx[8] = {1, -1, 0, 0, 1, -1, -1, 1};
const int dy[8] = {0, 0, 1, -1, 1, 1, -1, -1};
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } //最大公約数
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }     //最小公倍数

void yes()
{
    cout << "Yes" << endl;
}
void no()
{
    cout << "No" << endl;
}
//-----------------------------------------

//-----------------------------------------
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int h, w ;
    cin >> h >> w ;
    vstr str(h) ;
    REP(i,h){
        cin >> str[i] ;
    }
    vvint num1(h,vint(w,0)) ;
    vvint num2(h,vint(w,0)) ;
    int cnt ;
    
    REP(i,h){
        cnt = 1 ;
        REP(j,w){
            if(str[i][j]=='.'){
                num1[i][j] = cnt ;
                cnt++ ;
            }
            else{
                cnt = 1 ;
            }
        }
    }

    REP(i,h){
        REP(j,w-1){
            if(str[i][w-2-j]=='.'){
                num1[i][w-2-j] = max(num1[i][w-1-j],num1[i][w-2-j]) ;
            }
        }
    }



    REP(i,w){
        cnt = 1 ;
        REP(j,h){
            if(str[j][i]=='.'){
                num2[j][i] = cnt ;
                cnt++ ;
            }
            else{
                cnt = 1 ;
            }
        }
    }

    REP(i,w){
        REP(j,h-1){
            if(str[h-2-j][i]=='.'){
                num2[h-2-j][i] = max(num2[h-1-j][i],num2[h-2-j][i]) ;
            }
        }
    } 

    int ans = NIL ;

    REP(i,h){
        REP(j,w){
            ans = max(ans,num1[i][j]+num2[i][j]-1) ;
        }
    }

    cout << ans<<endl; 



    return 0;
}


Measured memory_bytes: 35968
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n],b[n],c[n];
	for(int i=0;i<n;i++)
	cin>>a[i]>>b[i]>>c[i];
	int dp[3]={0};
	int dp1[3]={0};
	for(int i=0;i<n;i++)
	{
		dp1[0]=a[i]+max(dp[1],dp[2]);
		dp1[1]=b[i]+max(dp[0],dp[2]);
		dp1[2]=c[i]+max(dp[0],dp[1]);
		dp[0]=dp1[0];
		dp[1]=dp1[1];
		dp[2]=dp1[2];
	}
	cout<<max(dp[0],max(dp[1],dp[2]));
	return 0;
}

Measured memory_bytes: 1408
#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define FAST ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);srand(time(NULL))
int main()
{
     ll n;
     cin>>n;
     pair<ll,ll> p[n];
     for(ll i=0;i<n;i++)
     {
          cin>>p[i].first;
          p[i].ss = i+1;
     }
     sort(p,p+n);
     for(ll i=0;i<n;i++)   cout<<p[i].ss<<" ";
}

Measured memory_bytes: 2432
use std::*;
use proconio::{input, fastout, marker::*};

#[fastout]
fn main() {
  input!{
    mut s:Chars
  }
  let mut ans = false;
  for i in 0..s.len() {
      for j in i..s.len() {
          if format!("{}{}",&s[..i].iter().collect::<String>(),&s[j..].iter().collect::<String>()) == "keyence" {
            ans = true;
          } 
      }
  }
  println!("{}", if ans {"YES"} else {"NO"});
}


Measured memory_bytes: 2152
#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using P = pair<int, int>;
using PL = pair<lint, lint>;
#define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++)
#define IFOR(i, begin, end) for(int i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--)
#define REP(i, n) FOR(i,0,n)
#define IREP(i, n) IFOR(i,0,n)
#define ALL(a)  (a).begin(),(a).end()
constexpr int MOD = 1000000007;
constexpr int INF = 2147483647;
void yes(bool expr) {
  cout << (expr ? "Yes" : "No") << "\n";
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int L, R, d;
    cin >> L >> R >> d;
    int ans = 0;
    FOR(i, L, R+1) if(i%d == 0) ans++;
    cout << ans << endl;
}

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

int main(){
	int a,b,c;
	cin>>a>>b>>c;
	if(max(max(a,b),c)!=min(min(a,b),c)){
		cout<<"No"<<endl;
	}else{
		cout<<"Yes"<<endl;
	}
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <queue>
using namespace std;

// 各ノードの座標と深さを保持するための構造体
//struct Node{
//    int y;
//    int x;
//    int depth;
//};

int main() {
    int X,Y;
    cin>>X>>Y;
    string S;
    cin>>S;
    
    if (S[Y-1]=='A') {
        S[Y-1]='a';
    }
    else if (S[Y-1]=='B'){
        S[Y-1]='b';
    }
    else{
        S[Y-1]='c';
    }
    
    cout<<S<<endl;
}


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

using namespace std;

using int64 = long long;

struct UnionFind {
  vector< int > data;

  UnionFind(int sz) {
    data.assign(sz, -1);
  }

  bool unite(int x, int y) {
    x = find(x), y = find(y);
    if(x == y) return (false);
    if(data[x] > data[y]) swap(x, y);
    data[x] += data[y];
    data[y] = x;
    return (true);
  }

  int find(int k) {
    if(data[k] < 0) return (k);
    return (data[k] = find(data[k]));
  }

  int size(int k) {
    return (-data[find(k)]);
  }
};

struct Bipartite_Graph : UnionFind {
  vector< int > color;

  Bipartite_Graph(int v) : color(v + v, -1), UnionFind(v + v) {}

  bool bipartite_graph_coloring() {
    for(int i = 0; i < color.size() / 2; i++) {
      int a = find(i);
      int b = find(i + (int) color.size() / 2);
      if(a == b) return (false);
      if(color[a] < 0) color[a] = 0, color[b] = 1;
    }
    return (true);
  }

  bool operator[](int k) {
    return (bool(color[find(k)]));
  }
};

const int INF = 1 << 30;

int main() {
  int N, M;
  bool g[700][700] = {{}};

  cin >> N >> M;
  for(int i = 0; i < M; i++) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    g[x][y] = g[y][x] = true;
  }
  Bipartite_Graph uf(N);
  for(int i = 0; i < N; i++) {
    for(int j = 0; j < i; j++) {
      if(!g[i][j]) {
        uf.unite(i, j + N);
        uf.unite(j, i + N);
      }
    }
  }
  if(uf.bipartite_graph_coloring()) {
    int latte[700][2] = {{}};
    for(int i = 0; i < N; i++) {
      latte[min(uf.find(i), uf.find(i + N))][uf[i]]++;
    }
    bitset< 701 > dp;
    dp[0] = true;
    for(int i = 0; i < N; i++) {
      if(uf.find(i) == i) {
        dp = (dp << latte[i][0]) | (dp << latte[i][1]);
      }
    }
    int ret = INF;
    for(int i = 0; i < N; i++) {
      if(dp[i]) ret = min(ret, i * (i - 1) / 2 + (N - i) * (N - i - 1) / 2);
    }
    cout << ret << endl;
  } else {
    cout << -1 << endl;
  }
}

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


int main(){
  ll x,counts=0;
  ll a = 100;
  cin >> x;
  while(a<x){
        counts++;
   a += a /100;

  }
 cout << counts << endl;
}

Measured memory_bytes: 3644
// ABC066 B - ss
#include <stdio.h>
#include <string.h>

int main(void) {
    char S[201];
    scanf("%s", S);
    int slen = strlen(S);
    int flag = 1;
    for (int i = slen - 2; i > 0; i -= 2) {
        int center = i / 2;
        flag = 1;
        for (int j = 0; j < center; j++) {
            if (S[j] != S[center + j]) {
                flag = 0;
                break;
            }
        }
        if (flag) {
            printf("%d\n", center * 2);
            return 0;
        }
    }
    return 0;
}

Measured memory_bytes: 128