akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
char a[101];
int main()
{
	gets(a);
	int l=strlen(a);
	int i,j;
	while(i<l)
	{
		if(a[i]=='C')
		{
			j=i+1;
			while(j<=l)
			{
				if(a[j]=='F')
				{
					cout<<"Yes"<<endl;
					return 0;
				}
				j++; 
			}
		}
		i++;
	}
	cout<<"No"<<endl;
	return 0;
} 

Measured memory_bytes: 256
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        try {
            double[] a_b_C = Stream.of(sc.nextLine().split(" "))
                    .mapToDouble(Double::parseDouble)
                    .toArray();
            if (a_b_C.length != 3) {
                throw new IllegalTestCaseException();
            }
            double a = a_b_C[0];
            double b = a_b_C[1];
            double C = a_b_C[2];
            double S = a * b / 2 * Math.sin(Math.PI * C / 180);
            double c = Math.pow((a * a + b * b - 2 * a * b * Math.cos(Math.PI * C / 180)), 0.5);
            double l = a + b + c;
            double h = S / (a / 2);
            System.out.printf("%.8f\n", S);
            System.out.printf("%.8f\n", l);
            System.out.printf("%.8f\n", h);
        } catch (NoSuchElementException | NumberFormatException e) {
            System.out.println(e);
        }
    }

    private static class IllegalTestCaseException extends RuntimeException {
        IllegalTestCaseException() {
            super("Illegal condition.");
        }
    }
}



Measured memory_bytes: 32004
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<ll,ll>
#define inf 2333333333333333333LL

map<pll,ll> mp[20][20];

int num[110],n;

inline int rd()
{
	int x=0;char ch=getchar();
	for (;ch<'0'||ch>'9';ch=getchar());
	for (;ch>='0'&&ch<='9';ch=getchar()) x=x*10+ch-'0';
	return x;
}

inline ll gao(int l,int r,ll x,ll y)
{
	if (l>r) return 0;
	if (mp[l][r].count(pll(x,y))) return mp[l][r][pll(x,y)];
	ll res=inf;
	for (int i=l;i<=r;i++) res=min(res,num[i]*(x+y)+gao(l,i-1,x,x+y)+gao(i+1,r,x+y,y));
	return mp[l][r][pll(x,y)]=res;
}

int main()
{
	n=rd();
	for (int i=1;i<=n;i++) num[i]=rd();
	printf("%lld\n",gao(2,n-1,1,1)+num[1]+num[n]);
	return 0;
}

Measured memory_bytes: 16640
#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  //input output template
  /*
  int N;
  cin >> N;
  cout << "Hello, world!" << endl;
  */
  
  int num;
  cin >> num;
  
  bool flag=false;
  
  
  while(1){
   if((num % 10) == 7){
    flag = true; 
     break;
   }else{
     
    if(num == (num % 10)) break;
     num = (int)(num / 10);
   }
  }
  
  
  if(flag)
  cout << "Yes" << endl;
  else cout << "No" << endl;
}

Measured memory_bytes: 3636
#include <stdio.h>
int main(){
  int a,b,i;
  for(;;){
    scanf("%d%d",&a,&b);
    if(a==0 && b==0)break;
    if(a>b){
      printf("%d %d\n",b,a);
    }
    else {
      printf("%d %d\n",a,b);
    }
  }
  return 0;
}

Measured memory_bytes: 1768
S = input()
K = int(input())

ans = 0
if len(S) == 1:
  ans = K // 2
else:
  S_2 = S + S
  once = 0
  cnt = 1
  for i in range(1, len(S)):
    if S[i - 1] == S[i]:
      cnt += 1
    else:
      once += cnt // 2
      cnt = 1
  once += cnt // 2
  if cnt == len(S):
    ans = len(S) * K // 2
  else:
    other = -once
    cnt = 1
    for i in range(1, len(S_2)):
      if S_2[i - 1] == S_2[i]:
        cnt += 1
      else:
        other += cnt // 2
        cnt = 1
    other += cnt // 2
    ans = once + other * (K - 1)
print(ans)

Measured memory_bytes: 3064
def make_divisors(n):
    divisors=[]
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            divisors.append(i)
            if i!=n//i:
                divisors.append(n//i)
    return divisors

N = int(input())
count = 0
for i in range(1,N+1,2):
    if len(make_divisors(i)) == 8:
        count += 1

print(count)


Measured memory_bytes: 9444
#include <bits/stdc++.h>
#include <set>
#include <numeric>
#define rep(i,n) for (int i=0; i < (n); ++i)
#define all(a) a.begin(), a.end()
using ll = long long;
using namespace std;
// 流れsで読み込み
// for (i=0 ~len(s))までs[i]- '0'で数値に変換して和をとる
// sum%9の判定

void input() {
    string n;
    cin >> n;
    int len = n.length();
    // cout << len << endl; 
    
    int sum=0;

    for (int i=0; i<len; i++) {
        sum += n[i] - '0';
    }
    
    // cout << sum << endl;
    if (sum%9 == 0) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}



int main(void) {
    input();
    return 0;
}


Measured memory_bytes: 3728
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp45
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            
            int d = b.Length;

            for(int i = 0; i < d; i++){
                
                Console.Write(a[i].ToString() + b[i].ToString());
            }
            
            if (a.Length > b.Length)
            {
                Console.WriteLine(a[a.Length-1].ToString());
            }
        }
    }
}


Measured memory_bytes: 13140
whs = []

while True:
    hw = list(map(int, input().split()))
    if hw[0] == 0 and hw[1] ==0:
        break
    whs.append(hw)
#print(whs)

for i in range(len(whs)):
    w = whs[i][1]
    h = whs[i][0]
    moji = ""
    #print("h = {}" .format(h))
    #print("w = {}" .format(w))
    for j in range(h + 1):
        if j == h:
            moji = ""
        else:
            for k in range(w):
                if j % 2 == 0 and k % 2 == 0:
                    #print("in 1")
                    moji = moji + "#"
                elif j % 2 == 0 and k % 2 != 0:
                    #print("in 2")
                    moji = moji + "."
                elif j % 2 != 0 and k % 2 == 0:
                    #print("in 3")
                    moji = moji + "."
                elif j % 2 != 0 and k % 2 != 0:
                    #print("in 4")
                    moji = moji + "#"
             
        print(moji)
        moji = ""


Measured memory_bytes: 5628
#include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = m; i < (n); i++)
#define RFOR(i, m, n) for (int i = (m - 1); i >= 0; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define print(ele) cout << (ele) << endl
#define print10(ele) cout << fixed << setprecision(10) << (ele) << endl

using namespace std;
typedef long long ll;
typedef vector<int> ivec;
typedef vector<string> svec;
typedef vector<ll> lvec;

const int mod = 1e9 + 7;
const ll INF = 1000000000000000000LL;

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

  FOR(i, 1, 1e3 + 1) {
    int ax = i * 8 / 100;
    int bx = i * 10 / 100;
    if (ax == a && bx == b) {
      print(i);
      return 0;
    }
  }

  print(-1);
  return 0;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(void){
	int a[200000];
	int i,N;
	int ans=0;

	scanf("%d",&N);
	for(i=1;i<=N;i++){
		scanf("%d",&a[i]);
	}

	for(i=1;i<=N;i++){
		if(i == a[a[i]]){ans++;}
	}

	printf("%d\n",ans/2);

	return 0;
}

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

int main() {
    ll A, B; cin >> A >> B;
    vector<ll> candidate;
    // 10B ~ 10B + 10未満の整数が候補
    for (ll i = 0; i < 10; i++) {
        if (10 * B + i > 1000) break;
        candidate.push_back(10 * B + i);
    }

    for (ll i = 0; i < candidate.size(); i++) {
        if (floor(candidate.at(i) * 0.08) == A) {
            cout << candidate.at(i) << endl;
            return 0;
        }
    }
    cout << "-1" << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
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 namespace std;
int main(){
    int n;
    cin>>n;
    bool nazo=false;
    for(int i=1;i<=9;i++){
        for(int j=0;j<=9;j++){
            if(i*j==n) nazo=true;
        }
    }
    if(nazo) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}


Measured memory_bytes: 3608
N=50021
p_f=Array.new(N+1,true);
p_f[0]=p_f[1]=false;
for i in 2..Math.sqrt(N).to_i
  next if !p_f[i]
  j=i*2
  while j<=N
    p_f[j]=false;
    j+=i
  end
end
while s=gets
	break if s==nil
	n=s.to_i
	x=n-1
	until x<2
	  break if p_f[x]
	  x-=1
	end
	for y in n+1..50022 do
	  break if p_f[y]
	end
	puts [x,y].join(' ')
end

Measured memory_bytes: 6500
using System;
using System.Linq;
using System.Collections.Generic;

namespace AtCoder.Contests.ABC160
{
    /// <summary>
    /// 
    /// </summary>
    static class A
    {
        static void Main(string[] args)
        {
            var s = Next();

            Console.WriteLine(s[2] == s[3] && s[4] == s[5] ? "Yes" : "No");
        }

        #region Console
        static int _index = 0;
        static string[] _buffer;

        static string Next()
        {
            if (_buffer == null || _index >= _buffer.Length)
            {
                _buffer = Console.ReadLine().Split();
                _index = 0;
            }

            return _buffer[_index++];
        }
        static int NextInt()
        {
            return int.Parse(Next());
        }
        static long NextLong()
        {
            return long.Parse(Next());
        }
        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }
        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }
        static int[] ReadIntArray()
        {
            return Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }
        static int[] ReadIntArray(int n)
        {
            var a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadInt();
            }
            return a;
        }
        static long[] ReadLongArray()
        {
            return Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }
        static long[] ReadLongArray(int n)
        {
            var a = new long[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadLong();
            }
            return a;
        }
        static List<T> ReadObjects<T>(int n, Func<int[], T> creator)
        {
            var l = new List<T>(n);

            for (int i = 0; i < n; i++)
            {
                var a = ReadIntArray();
                l.Add(creator(a));
            }

            return l;
        }

        static int[,] ReadMatrix(int n, int m)
        {
            var r = new int[n, m];
            for (int i = 0; i < n; i++)
            {
                var a = ReadIntArray();
                for (int j = 0; j < m; j++)
                {
                    r[i, j] = a[j];
                }
            }
            return r;
        }
        #endregion
    }
}


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

#define ll long long
#define mp make_pair
#define pb push_back

#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define rep(i, n) for (int i = 0; i < (int)(n); ++ i)

const int mxn = 1e5 + 5;
char ch[mxn][5];
int n, a[3], ans[mxn];

void NO() { puts("No"); exit(0); }

int main() {
	scanf("%d %d %d %d", &n, &a[0], &a[1], &a[2]);
	rep(i, n) scanf("%s", ch[i]);
	rep(i, n) {
		int x = ch[i][0] - 'A', y = ch[i][1] - 'A';
		if (a[x] == 0 && a[y] == 0) NO();
		else if (a[x] == 0 || a[y] > 1) { ++ a[x]; -- a[y]; ans[i] = x; }
		else if (a[y] == 0 || a[x] > 1) { ++ a[y]; -- a[x]; ans[i] = y; }
		else if (a[x] == 1 && a[y] == 1) {
			if (i + 1 == n) { ++ a[x]; -- a[y]; ans[i] = x; }
			else {
				int x0 = ch[i + 1][0] - 'A', y0 = ch[i + 1][1] - 'A';
				if (x == x0 && y == y0) { ++ a[x]; -- a[y]; ans[i] = x; }
				else {
					int s[3]; rep(j, 3) s[j] = 0;
					s[x] ++; s[y] ++; s[x0] += 2; s[y0] += 2;
					int sme = -1; rep(j, 3) if (s[j] == 3) sme = j;
					++ a[sme]; -- a[x ^ y ^ sme]; ans[i] = sme;
				}
			}
		}
	}
	puts("Yes");
	rep(i, n) printf("%c\n", 'A' + ans[i]);
	return 0;
}


Measured memory_bytes: 4664
/*---------------------------------

 @Author:   Dicer
 @DateTime: 2019-05-11 21:50:21

---------------------------------*/

#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
inline ll qpow(ll a,ll b,ll mod){ll res=1;while(b){if(b&1)res = (res*a)%mod;a=(a*a)%mod;b>>=1;}return res;}
const double eps = 1e-8;
const int INF = 0x3f3f3f3f;
const int mod = 1e9+7;
const int MAXN = 2e5 + 7;

char mp[1007][1007];
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
bool vis[1007][1007];
int main(int argc, char const *argv[])
{
	int h, w;
	cin >> h >> w;
	for(int i = 0; i < h; ++i)	cin >> mp[i];
	queue<pair<pii, int> > q;
	for(int i = 0; i < h; ++i){
		for(int j = 0; j < w; ++j){
			if(mp[i][j] == '#')	q.push({{i, j}, 0});
		}
	}
	int res = 0;
	while(!q.empty()){
		auto p = q.front().fi;
		int t = q.front().se;
		// cout << p.fi << ' ' << p.se << ' ' << t << endl;
		q.pop();
		for(int i = 0; i < 4; ++i){
			int x = p.fi, y = p.se;
			x += dx[i];
			y += dy[i];
			if(x < 0 || x >= h || y < 0 || y >= w || vis[x][y] || mp[x][y] == '#')	continue;
			res = max(res, t+1);
			vis[x][y] = 1;
			q.push({{x, y}, t+1});
		}
	}
	cout << res << endl;
	return 0;
}


Measured memory_bytes: 13328
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef double ld;
typedef complex<ld> Point;
const ll INF = mod * mod;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second

ll dp[3001][2],cop[3001][2];
void solve() {
	int n, m; cin >> n >> m;
	rep(i, n + 1) {
		if(i<n)dp[i][0] = 1;
		else dp[i][1] = 1;
	}
	rep(i, 2 * m) {
		rep(j, n + 1) {
			rep(k, 2) {
				cop[j][k] = 0;
			}
		}
		if (i % 2 == 0) {
			rep(j, n+1) {
				rep(k, 2) {
					//red
					if (j > 0) {
						cop[j-1][k] += dp[j][k];
						if (cop[j - 1][k] >= mod)cop[j - 1][k] -= mod;
					}
					//blue
					if (j < n) {
						cop[j][k] += dp[j][k];
						if (cop[j][k] >= mod)cop[j][k] -= mod;
					}
				}
			}
		}
		else {
			rep(j, n) {
				rep(k, 2) {
					//red
					if (j < n-1) {
						cop[j + 1][k] += dp[j][k];
						if (cop[j + 1][k] >= mod)cop[j + 1][k] -= mod;
					}
					else {
						cop[j + 1][1] += dp[j][k];
						if (cop[j + 1][1] >= mod)cop[j + 1][1] -= mod;
					}
					//blue
					if (j < n - 1) {
						cop[j][k] += dp[j][k];
						if (cop[j][k] >= mod)cop[j][k] -= mod;
					}
					else {
					    cop[j][1] += dp[j][k];
						if (cop[j][1] >= mod)cop[j][1] -= mod;
					}
				}
			}
		}
		rep(j, n + 1) {
			rep(k, 2) {
				dp[j][k] = cop[j][k];
			}
		}
	}
	ll ans = 0;
	rep(i, n + 1) {
		ans += dp[i][1];
		if (ans >= mod)ans -= mod;
	}
	cout << ans << endl;
}
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	solve();
	//stop
	return 0;
}

Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
  cin>>n;
  int res=n;
  for(int i=0;i<=n;i++){
    int cc=0;
    int t=i;
    while(t>0){
      cc+=t%6;
      t/=6;
    }
    t=n-i;
    while(t>0){
      cc+=t%9;
      t/=9;
    }
    if(res>cc){
      res=cc;
    }
  }
  cout<<res;
}

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

int main(){
  string s;
  cin >> s;
  
  if( s == "SUN"){
    cout << 7 << endl;
  }else if (s == "MON"){
    cout << 6 << endl;
  }else if( s == "TUE" ){
    cout << 5 << endl;
  }else if( s == "WED" ){
    cout << 4 << endl;
  }else if( s == "THU" ){
    cout << 3 << endl;
  }else if( s == "FRI" ){
    cout << 2 << endl;
  }else if( s == "SAT" ){
    cout << 1 << endl;
  }
  
}


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

using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
	REP(i, v.size()) { if (i)os << " "; os << v[i]; }return os;
}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
	REP(i, v.size()) { if (i)os << endl; os << v[i]; }return os;
}

const ll INF = 1LL << 60;
ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

#define int long long

inline void my_io() {

	std::ios::sync_with_stdio(false);

	std::cin.tie(0);

	cout << fixed << setprecision(16);

	//cout << setprecision(10) << scientific << ans << endl;

}

signed main() {
	ll n, k;

	cin >> n >> k;

	vector<ll> a(n, 0);
	vector<ll> gru(k + 1, INF);

	REP(i, n) {
		cin >> a[i];
	}

	gru[0] = 0;

	FOR(i, 1, k + 1) {
		ll now = 0;
		set<ll> s;
		while (now < n) {
			if (a[now] > i) {
				break;
			}
			s.insert(gru[i - a[now]]);
			now++;
		}
		ll g = 0;
		while (true) {
			if (!s.count(g)) {
				gru[i] = g;
				break;
			}
			g++;
		}
	}

	if (gru[k] > 0) {
		cout << "First" << endl;
	}
	else {
		cout << "Second" << endl;
	}
}

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

double h[10000];

int main(){
	int x;
	int y;
	int z;
	int n;
	double xy;
	double yz;
	double zx;
	while ( true ){
		cin >> x >> y >> z;
		if ( !x && !y && !z ){
			break;
		}
		cin >> n;
		for (int  i = 0; i < n; ++i){
			cin >> h[i];
		}
		xy = sqrt( x*x + y*y );
		yz = sqrt( y*y + z*z );
		zx = sqrt( z*z + x*x );
		for (int i = 0; i < n; ++i){
			bool flag = false;
			if( xy < h[i]*2 || yz < h[i]*2 || zx < h[i]*2 ){
				flag = true;
			}
			if ( flag ){
				cout << "OK" << endl;
			} else {
				cout << "NA" << endl;
			}
		}
	}
	return 0;
}

Measured memory_bytes: 1220
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <utility>
#include <math.h>
#include <stdexcept>
#include <algorithm>
#include <vector>
#include <cstring>
#include <string.h>
#include <cassert>
#include <string.h>
#include <tuple>

using namespace std;
#define  rep(i,n) for(int i=0;i<n;i++)
#define  rrep(i,n) for(int i=n-1;i>=0;i--)///n-1番目からn回
#define  REP(i,a,b) for(int i=a;i<=b;i++) ///a番目からb回
#define  RREP(i,a,b) for(int i=a;i<b;i--)
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pair_t;
#define MOD 1000000007

//int arr[N]
////sort(arr,arr +N)

//vector <int> hoge
////sort(hoge.begin(),hoge.end());
///*min_element(hoge.begin(),hoge.end();　最小値　　　最大値はmax_element();
///(10-(n%10))%10  10-(1桁目)取得 12->8 20->0

#define Ru(n)  ( ((n)+9)/10*10  ) //切りあげ
#define Rd(n)  ( ((n)-10)/10*10 +10 )	切り捨て


ll gcd(ll a,ll b);
size_t length(const std::string& str) {
	return str.length();
}
bool comp(const pair_t &a, const pair_t &b) {
	return a.first < b.first;
}

int main() {
	ll  a,b,GCD,ans=0;
	cin>>a>>b;
	GCD=gcd(a,b);
	if(GCD==1){
		cout<<1<<endl;
		return 0;
	}
	for(ll i=1;i<sqrt(GCD);i++){
		if(GCD%i==0){
			ans++;
			while(GCD%i==0 && i!=1)
				GCD/=i;
		}
	}
	if(GCD!=1)
		ans++;

	cout<<ans<<endl;

	return 0;

}


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


Measured memory_bytes: 256
// 問題の URL を書いておく
// 

#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>

using namespace std;

//#define ENABLE_PRINT

#if defined(ENABLE_PRINT)

#define Print(v) \
do {\
    cout << #v << ": " << v << endl; \
}while(0)

#define PrintVec(v) \
do {\
    for(int __i = 0; __i < v.size(); ++__i) \
    { \
        cout << #v << "[" << __i << "]: " << v[__i] << endl; \
    }\
}while(0)

#else

#define Print(v) ((void)0)
#define PrintVec(v) ((void)0)

#endif

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

using ll = int64_t;

const ll NMax = 512 * 1024;

vector<char> nodes[NMax * 2 - 1];

void merge(vector<char>& out, const vector<char>& a, const vector<char>& b)
{
    out = a;
    for(auto c : b)
    {
        if(find(out.begin(), out.end(), c) == out.end())
        {
            out.push_back(c);
        }
    }
}

void query(vector<char>& out, int a, int b, int l, int r, int k)
{
    if(k < 0) abort();
//    printf("a=%d, b=%d, l=%d, r=%d, k=%d\n", a, b, l, r, k);
    if(a >= r || b <= l)
    {
        out.clear();
        return;
    }
    if(a <= l && r <= b)
    {
        out = nodes[k];
        return;
    }
    vector<char> lc, rc;
    query(lc, a, b, l, (l + r) / 2, k * 2 + 1);
    query(rc, a, b, (l + r) / 2, r, k * 2 + 2);
    merge(out, lc, rc);
}

int main(int, const char**)
{
    int n;
    cin >> n;
    string s;
    cin >> s;
    
    // start depth
    int sd = (int)ceil(log2(n));
    // start index
    auto si = (int)pow(2, sd) - 1;

//    printf("sd: %d, si: %d\n", sd, si);

 //   cout << si << endl;
    rep(i, n)
    {
        nodes[si + i].push_back(s[i]); 
    }
    rep(i, sd)
    {
        auto index = (int)pow(2, sd - 1 - i) - 1;
        rep(j, index + 1)
        {
            merge(nodes[index + j], nodes[(index + j) * 2 + 1], nodes[(index + j) * 2 + 2]);
        }
    }
#if 0
    rep(i, si + n)
    {
        cout << "i: " << i << ", ";
        rep(j, nodes[i].size())
        {
            cout << nodes[i][j];
        }
        cout << endl;
    }
#endif
    int q;
    cin >> q;
    rep(i, q)
    {
        int t;
        cin >> t;
        if(t == 1)
        {
            int a; char b;
            cin >> a >> b;
            a--;
            auto bi = si + a;
            nodes[bi].clear();
            nodes[bi].push_back(b);
            while(bi != 0)
            {
                bi = (bi - 1) / 2;
                merge(nodes[bi], nodes[bi * 2 + 1], nodes[bi * 2 + 2]);
            }
        }
        else
        {
            int a, b;
            cin >> a >> b;
            a--; 
            vector<char> c;
            query(c, a, b, 0, (int)pow(2, sd), 0);
            cout << c.size() << endl;
        }
    }

    return 0;
}


Measured memory_bytes: 60400
def BubbleSort(L):
    global cnt
    for i in range(len(L)-1):
        if L[i]>L[i+1]:
            L[i],L[i+1]=L[i+1],L[i]
            cnt+=1
while True:
    n=input()
    if n==0:break
    L,cnt=[],0
    for i in range(n):
        L.append(input())

    for i in range(len(L),0,-1):
        BubbleSort(L)
    print cnt

Measured memory_bytes: 4252
const fi='expired.inp';
      fo='expired.out';
var a,b,x:longint;
procedure mo;
begin
    assign(input,fi);
    reset(input);
    assign(output,fo);
    rewrite(output);
end;

procedure nhap;
begin
    readln(x,a,b);
end;

procedure xuly;
begin
    if b <=a  then
    begin
        writeln('delicious');
        exit;
    end;
    if b-a <= x then
    begin
        writeln('safe');
        exit;
    end
    else
    begin
        writeln('dangerous');
        exit;
    end;
end;

begin

    nhap;
    xuly;
end.


Measured memory_bytes: 128
#include <iostream>
#include <vector>
#include <iomanip>
#include <algorithm>
#include <cmath>
#define REP(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using arr = vector<ll>;
constexpr ll MOD = 1000000007;
constexpr ll INF = 1LL << 60;

ll n;
vector<ll> g[100010];

pair<ll, ll> rec(int v, int p) {
  pair<ll, ll> res = make_pair(1, 1);
  for(int nv : g[v]) {
    if (nv != p) {
      auto tmp = rec(nv, v);
      res.first *= tmp.first + tmp.second;
      res.second *= tmp.first;
      res.first %= MOD;
      res.second %= MOD;
    }
  }
  return res;
}
int main()
{
  cin >> n;
  REP(i, n - 1) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    g[x].push_back(y);
    g[y].push_back(x);
 }
 auto res = rec(0, 0);
 cout << (res.first + res.second) % MOD;
 return 0;
}

Measured memory_bytes: 12672
#include "bits/stdc++.h"
using namespace std;
const auto start_time = std::chrono::high_resolution_clock::now();
void timecalculater(){
    #ifndef ONLINE_JUDGE
    auto end_time = std::chrono::high_resolution_clock::now();
    std::chrono::duration<double> diff = end_time-start_time;
    cerr<<"Time Taken : "<<diff.count()<<"\n";
    #endif
}//continue break
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void __print(int x) {cout << x;}
void __print(long x) {cout << x;}
void __print(long long x) {cout << x;}
void __print(unsigned x) {cout << x;}
void __print(unsigned long x) {cout << x;}
void __print(unsigned long long x) {cout << x;}
void __print(float x) {cout << x;}
void __print(double x) {cout << x;}
void __print(long double x) {cout << x;}
void __print(char x) {cout << '\'' << x << '\'';}
void __print(const char *x) {cout << '\"' << x << '\"';}
void __print(const string &x) {cout << '\"' << x << '\"';}
void __print(bool x) {cout << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cout << '{'; __print(x.first); cout << ','; __print(x.second); cout << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cout << '{'; for (auto &i: x) cout << (f++ ? "," : ""), __print(i); cout << "}";}
void _print() {cout << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cout << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define dbg(x...) cout << "[" << #x << "] = ["; _print(x)
#else
#define dbg(x...)
#endif
#define fastio  cin.sync_with_stdio(0); cin.tie(0);cin.exceptions(cin.failbit);
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repA(i, a, n) for(int  i = a; i <= (n); ++i)
#define all(x) x.begin(), x.end()
#define sz(x) (int) (x).size()
#define fill(a,v) memset(a, v, sizeof(a))
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
#define endl '\n'
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef vector<int> vi;
typedef vector<long long int> vll;
typedef vector<pii> vpii;
ll p=1e9+7;
const int N=2e5+5;
int main() {
  
    fastio;
    int T=1;
    // cin>>T;
    while(T--){
        ll n;cin>>n;
        ll a[n];rep(i,n)cin>>a[i];
        // ll money=1000;
        ll dp[n];
        dp[0]=1000;
        for(ll i=1;i<n;i++){
            ll temp=dp[i-1];
            for(ll j=0;j<i;j++){
                ll st=dp[j]/a[j];
                temp=max(temp,st*a[i]+dp[j]%a[j]);
            }
            dp[i]=temp;
        }
        cout<<dp[n-1];
    }   
    timecalculater();
    return 0;   
} 

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

int n,q,pre[100005];
char a[100005];

signed main()
{
	cin>>n>>q;
	for (int i=1;i<=n;i++)  cin>>a[i];
	for (int i=1;i<=n;i++)
	{
		if (a[i]=='C'&&a[i-1]=='A')  pre[i]=pre[i-1]+1;
		else pre[i]=pre[i-1];
	}
	for (int i=1;i<=q;i++)
	{
		int l,r;
		cin>>l>>r;
		cout<<pre[r]-pre[l]<<endl;
	}
	return 0;
}

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

int A, B, C;

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

    bool flg = true;
    int ans = 0;
    while( A % 2 == 0 && B % 2 == 0 && C % 2 == 0 ){
        int tmpA = A;
        A = B / 2 + C / 2;
        int tmpB = B;
        B = tmpA / 2 + C / 2;
        int tmpC = C;
        C = tmpA / 2 + tmpB / 2;
        if( A == tmpA && B == tmpB && C == tmpC ){
            flg = false;
            break;
        }
        ans++;
    }

    if( flg )   cout << ans << endl;
    else        cout << -1 << endl;
}

Measured memory_bytes: 256
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<utility>
#include<vector>
#include<queue>
#include<functional>
#include<map>
#include<set>
#include<cstring>
#include<string>
#include<stack>
#include<malloc.h>
#include<math.h>
using namespace std;
//#define int long long
typedef pair<int, int> pii;
typedef pair<int, char> pic;
typedef priority_queue<pii, vector<pii>, greater<pii> > RPQ;
#define mk make_pair
#define INF (1 << 30)
#define INFL (1ll << 60ll)
#define mod 1000000007

int N;
struct node{
    int left = -1, right = -1;
    int par = -1;
};
node no[100];

vector<int> pre, in, post;

void dfs1(int v){
    pre.push_back(v);
    if(no[v].left >= 0){
        dfs1(no[v].left);
    }
    if(no[v].right >= 0){
        dfs1(no[v].right);
    }

    return;
}

void dfs2(int v){
    if(no[v].left >= 0){
        dfs2(no[v].left);
    }
    in.push_back(v);
    if(no[v].right >= 0){
        dfs2(no[v].right);
    }

    return;
}

void dfs3(int v){
    if(no[v].left >= 0){
        dfs3(no[v].left);
    }
    if(no[v].right >= 0){
        dfs3(no[v].right);
    }
    post.push_back(v);

    return;
}

signed main(){
    cin >> N;
    for(int i = 0; i < N; i++){
        int a, b, c;
        cin >> a >> b >> c;
        no[a].left = b;
        no[a].right = c;
        no[b].par = a;
        no[c].par = a;
    }
    int root = -1;
    for(int i = 0; i < N; i++){
        if(no[i].par < 0){
            root = i;
            break;
        }
    }
    if(root < 0)return 1;
    dfs1(root);
    dfs2(root);
    dfs3(root);
    printf("Preorder\n");
    for(int i = 0; i < N; i++){
        printf(" %d", pre[i]);
    }
    printf("\nInorder\n");
    for(int i = 0; i < N; i++){
        printf(" %d", in[i]);
    }
    printf("\nPostorder\n");
    for(int i = 0; i < N; i++){
        printf(" %d", post[i]);
    }
    printf("\n");


    return 0;
}

/*

*/


Measured memory_bytes: 3272
import java.util.Scanner;

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

		int a[][] = new int[3][3];
		boolean flag = true;
		for (int j = 0; j < 3; j++) {
			for (int i = 0; i < 3; i++) {
				a[i][j] = in.nextInt();
			}
		}

		int sa1 = a[0][1] - a[0][0];
		int sa2 = a[1][1] - a[1][0];
		int sa3 = a[2][1] - a[2][0];

		int sa21 = a[0][2] - a[0][0];
		int sa22 = a[1][2] - a[1][0];
		int sa23 = a[2][2] - a[2][0];

		int sa31 = a[0][2] - a[0][1];
		int sa32 = a[1][2] - a[1][1];
		int sa33 = a[2][2] - a[2][1];

		if (sa1 == sa2 && sa1 == sa3) {
			if (sa21 == sa22 && sa21 == sa23) {
				if (sa31 == sa32 && sa31 == sa33) {
					flag = true;
				} else {
					flag = false;
				}
			} else {
				flag = false;
			}
		} else {
			flag = false;
		}
		
		if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
			
		}

	}
}


Measured memory_bytes: 23764
#include <bits/stdc++.h>
//----***やべーやつら***----
using namespace std;
#define int long long

//----***型定義***----
using ll = long long;
using P = pair<int,int>;

//----***Like a Pythonista***----
#define REP(ii,jj,nn) for (ll ii=jj;ii<(nn);ii++)
#define RREP(ii,nn,jj) for (ll ii = nn; jj<ii;ii--)
#define each(i,...) for (auto&& i:__VA_ARGS__)
#define ALL(vec) (vec).begin(),(vec).end()
#define sum(...) accumulate(ALL(__VA_ARGS__),0LL)
#define dsum(...) accumulate(ALL(__VA_ARGS__),0.0)
#define vec(type,name,...) vector<type> name(__VA_ARGS__)
template<class T> inline auto max(const T& a){ return *max_element(ALL(a)); }
template<class T> inline auto min(const T& a){ return *min_element(ALL(a)); }
inline ll gcd(ll a,ll b){if(b == 0) return a;return  gcd(b,a%b);}
inline ll lcm(ll a,ll b){ll g = gcd(a,b);return a / g * b;}

//----***定数***----
#define MOD 1000000007
#define INF 100000000000000000
#define EPS 1e-9
#define PI  acos(-1)
const vector<vector<int>> DXY={{-1,0},{1,0},{0,-1},{0,1}};

//----***パーツ***----
#define fi first
#define se second
#define pb push_back
#define re return
#define br break

//----***入出力***---
void print() { std::cout << "\n"; }
template <class T>void print(const T &x) {std::cout << x<<"\n";}
template <class T, class... Args>void print(const T &x, const Args &... args) {std::cout << x << " ";print(args...);}
#define debug(var)  do{std::cerr << #var << " ↓ "<<"\n";view(var);}while(0);
#define dbg cerr<<"🥺🥺🥺🥺🥺🥺"<<endl;
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }

//----***初期時読み込み***----
struct initial{initial(){cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(15);};}initial_;

signed main(){
  int N;cin>>N;
  vector<int> arr(N),arr2;
  REP(i,0,N)cin>>arr[i];
  sort(ALL(arr));
  int prev=arr[0],idx=0;
  arr2.push_back(0);
  arr2[0]=1;
  REP(i,1,N){
    if(arr[i]==prev){
      arr2[idx]++;
    }
    else {
      idx++;
      arr2.push_back(idx);
      arr2[idx]=1;
      prev=arr[i];
    }
  }
  int ans=arr2.size();
  // vector<int> left(ans,0),right(ans,0);
  // left[0]=(arr2[0]>1?arr2[0]-1:0);
  // REP(i,1,N){
  //   left[i]=left[i-1]+(arr2[i]>1?arr2[i]-1:0);
  // }
  // right[N-1]=(arr2[N-1]>1?arr2[N-1]-1:0);
  // RREP(i,N-2,-1){
  //   right[i]=right[i+1]+(arr2[i]>1?arr2[i]-1:0);
  // }
  // int res=INF;
  // REP(i,0,N-1){
  //   res=min(res,abs(left[i]-right[i+1]));
  // }

  print(ans-((ans+1)%2));

}


Measured memory_bytes: 2168
fun main(args: Array<String>) {
    val s = readLine()!!
    var minNum = Int.MAX_VALUE
    val sDis = s.toCharArray().distinct()
    for (c in sDis) {
        var temp = s.toMutableList()
        var count = 0
        while (true) {
            val newTemp = mutableListOf<Char>()
            if (temp.distinct().size == 1) {
                break
            }
            for (i in 0 until temp.size - 1) {
                if (temp[i] == c) {
                    newTemp.add(temp[i])
                } else {
                    newTemp.add(temp[i + 1])
                }
            }
            count++
            temp = newTemp
        }
        minNum = Math.min(minNum, count)
    }
    println(minNum)
}


Measured memory_bytes: 39680
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, D;
  cin >> a >> b ; 
  D = a*b ; 
  if( D%2 == 1 ){
    cout << "Odd" << endl;
  }
  	else{
      cout << "Even" << endl;
}}

Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;
using pair_t = pair<int64_t, int64_t>;

bool comp(const pair_t &a, const pair_t &b){
    return a.first < b.first;
}
void Main() {
    int64_t N;
    cin >> N;

    vector<pair_t> vecA(N);
    for(int64_t i = 0; i<N; ++i){

        int64_t a, b;
        cin >> a >> b;
        vecA[i] = make_pair(b,a);

    }
    sort(vecA.begin(), vecA.end());

    int64_t timeSum = 0;
    for(int64_t i = 0; i<N; ++i){
        timeSum += vecA[i].second;
        if(timeSum > vecA[i].first){
            cout << "No" << endl;
            return;
        } 
    }
    cout << "Yes" << endl;
    return;
}

int main() {
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}


Measured memory_bytes: 3328
#include<stdio.h>
int main(void){
  int k,tmp,n; //n!????´??????°????§£????????¨??????2???????????????????????§???5?????°????????????
  int count;
  while(1){
    scanf("%d",&n);
    if(n==0) break;
    count=0;
    for(k=1;k<=n;k++){
      for(tmp=k ; tmp%5==0 ; tmp/=5){
        count++;
      }
    }
    printf("%d\n",count);
  }
  return 0;
}

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

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

  if(a == 'H')
  {
    cout << b << endl;
  }
  else if(b == 'D')
  {
    cout << 'H' << endl;
  }
  else
  {
    cout << 'D' << endl;
  }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int N;
struct edge{
	int u, v, next;
}graph[MAXN << 1];
int edgeCnt = 0;
int head[MAXN];
void addEdge(int u, int v)
{
	graph[++edgeCnt].u = u;
	graph[edgeCnt].v = v;
	graph[edgeCnt].next = head[u];
	head[u] = edgeCnt;
}
int inDeg[MAXN];
int col[MAXN];
int limit = -1;
void pre()
{
	for (int i = 1; i <= edgeCnt; i++)
	{
		inDeg[graph[i].v]++;	
	}
	for (int i = 1; i <= N; i++)
	{
		if (inDeg[i] > limit)
		{
			limit = inDeg[i];
		}
	}
}
struct node
{
	int u, n;
};
queue<node> q;
int vis[MAXN];
void bfs()
{
	node n;
	n.u = 1;
	n.n = 0;
	q.push(n);
	while (!q.empty())
	{
		node f = q.front();
		q.pop();
		vis[f.u] = 1;
		int i = 1;
		for (int e = head[f.u];e;e = graph[e].next)
		{
			int v = graph[e].v;
			if (vis[v]) continue;
			if (i == f.n) i++;
			col[(e + 1) >> 1] = i;
			node ne;
			ne.u = v;
			ne.n = i;
			q.push(ne);
			i++;
		}
	}
}
int main()
{
	scanf("%d", &N);
	for (int i = 1; i <= N - 1; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		addEdge(u, v);
		addEdge(v, u);
	}
	pre();
	bfs();
	cout << limit << endl;
	for (int i = 1; i <= N - 1; i++)
	{
		printf("%d\n", col[i]);
	}
	return 0;
}

Measured memory_bytes: 4480
#include <iostream>

using namespace std;

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

int main(){
    int n;
    cin >> n;

    int ans = n / 2;
    if (n % 2 == 0) cout << ans << endl;
    else cout << ans + 1 << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#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 SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define M_PI 3.14159265358979323846
#define ALL(X) (X).begin(),(X).end()

#ifdef __LOCAL
    #define DBG(X) cout << #X << " = " << (X) << endl;
    #define SAY(X) cout << (X) << endl;
#else
    #define DBG(X)
    #define SAY(X)
#endif

#ifdef __LOCAL
    #include <filesystem>
    namespace fs = std::filesystem;
#endif

using namespace std;

using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

int dx[]={1, 0, -1, 0, 0};
int dy[]={0, 1, 0, -1, 0};
const int INT_INF = (int)(2e9);
const ll  LL_INF = (ll)(2e18);
const int NIL = -1;
static mt19937 _g(time(nullptr));
 
std::string pad(int num){ char buffer[4]; std::snprintf(buffer, sizeof(buffer), "%03d", num); return buffer;}
inline ll randint(ll a, ll b) { ll w = (_g() << 31LL) ^ _g(); return a + w % (b - a + 1); }
inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); };
template<typename T> inline T sign(T x) { return T(x > 0) - T(x < 0); }
template<typename T, typename S> inline ostream& operator<<(ostream& os, const pair<T, S> p) { cout << "[" << p.first << ";" << p.second << "]"; return os; }
template<typename T, typename S> inline ostream& operator<<(ostream& os, const map<T, S> p) { for (auto el : p) cout << "[" << el.first << "," << el.second << "] "; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const vector<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline T fetch() { T ret; cin >> ret; return ret; }
template<typename T> inline vector<T> fetch_vec(int sz) { vector<T> ret(sz); for (auto& elem : ret) cin >> elem; return ret; }

int N;
vector<ll> A,B;
ll x;

void input(){
    #ifdef __LOCAL
        fs::path path_to_file = __FILE__;
        fs::path input,output;
        input = output = path_to_file.parent_path();
        input += string("/input/") + string(path_to_file.stem()) + string(".txt");
        output += string("/output/") + string(path_to_file.stem()) + string(".txt");
        freopen(input.c_str(), "r", stdin);
        freopen(output.c_str(), "w", stdout);
    #endif
    cin >> N >> x;
    A = fetch_vec<ll>(N);
}

int solve(){
    input();
    B.assign(N,0LL);
    ll ans=0;
    REP(i,N-1){
        ll a = A[i]+A[i+1];
        if(a<=x) continue;
        ll t = a-x;
        ans += t;
        A[i+1] = max(A[i+1]-t,0LL);
        A[i] = A[i] - max((t-A[i+1]),0LL);
    }
    cout << ans << endl;

    return 0;
}

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


Measured memory_bytes: 1792
#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int ans=0,count=0,flag=0;
  for(int i=0;i<s.length();i++)
  {
    count=0;
    /*for(int j=i+1;j<s.length();j++)
    {
      if((s[j]=='A'||s[j]=='T'||s[j]=='G'||s[j]=='C')&&(j<s.length())) {flag=1;count++;j++;}
      else break;
      
    }*/
    if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C')
    {
    while(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C')
    {
        count++;i++;
    }
    }
    else continue;
    //cout<<count<<endl;
    ans=max(ans,count);
  }
 cout<<ans;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;

#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(ll i=(n)-1;i>=0;i--)
#define range(i,a,n) for(ll i=(a);i<(n);i++)

#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (1000000007ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI 3.1415926535897932384

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

template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S acm(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}
int sgn(const double&r){return (r>EPS)-(r<-EPS);} // a>0  : sgn(a)>0
int sgn(const double&a,const double&b){return sgn(a-b);} // b<=c : sgn(b,c)<=0

ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}
template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1; for(auto s:t){os<<(a?"":" ")<<s;a=0;} return os;}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n,m;
	cin>>n>>m;
	ll ans=(m*(m-1)+(n*(n-1)));
	puta(ans/2);
}


Measured memory_bytes: 256
package main

import (
	"fmt"
)

func main() {
	var n,m int
	fmt.Scan(&n,&m)

	ansMap := make(map[int]int,m)
	for i := 0; i < n; i++ {
		var k int
		fmt.Scan(&k)
		for l := 0; l < k; l++ {
			var a int
			fmt.Scan(&a)
			ansMap[a]++
		}
	}

	count := 0
	for _,v := range ansMap {
		if v == n {
			count++
		}
	}
	fmt.Println(count)
}

Measured memory_bytes: 512
#include<math.h>
#include<cmath>
#include<bitset>
#include<stdio.h>
#include<string>
#include<map>
#include<algorithm>
#include<vector>
#include<iostream>
#include<utility>
using namespace std;
int main(){
  map<string,int> a;
  int n,i,ans=0;
  string s;
  scanf("%d\n",&n);
  for(i=0;i<n;i++){
    cin >> s;
    if(a[s]==0){
      ans++;
      a[s]=1;
    }
  }
  printf("%d\n",ans);
  return 0;
}

Measured memory_bytes: 19392
### C - Sentou
n,t = [ int(i) for i in input().split() ]
tk = [ int(i) for i in input().split() ]

x=0;
for i in range(n):
    if i == n-1:
        x += t
    else:
        x += min(t, tk[i+1] - tk[i])

print(x)

Measured memory_bytes: 25196
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define ld long double
ll gcd(ll a, ll b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    ll a,b;
    cin>>a>>b;
    cout<<(a*b)/gcd(a,b);
}

Measured memory_bytes: 256
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if(a+b < c+d){
        cout << "Right" << endl;
    }
    else if(a+b > c+d){
        cout << "Left" << endl;
    }
    else{
        cout << "Balanced" << endl;
    }
}


Measured memory_bytes: 256
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1000000000LL;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
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; }

int main(){
   ll n, x;
   cin >> n >> x;
   vector<ll> A(n, 0);
   rep(i, n) cin >> A[i];

   vector<ll> s(n-1, 0);
   rep(i, n-1) s[i] = A[i] + A[i+1];

   ll cnt = 0;
   rep(i, n-1){
     ll num = s[i] - x; //減らす数
     if(num <= 0) continue;
     //cout << "num:"   << num << " s:" << s[i] << ln;
     if(num <= A[i+1]){
       A[i+1] -= num;
       s[i] -= num;
       s[i+1] -= num;
     } else {
       s[i] -= num;
       s[i+1] -= A[i+1];
       A[i] -= (num - A[i+1]);
       A[i+1] = 0;
     }
     cnt += num;
   }
   cout << cnt << ln;
}


Measured memory_bytes: 1792
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {


        Scanner scan = new Scanner(System.in);

        String x = scan.nextLine();

        if (x.equals("ABC")) {
            System.out.println(("ARC"));
        } else {
            System.out.println("ABC");
        }


    }
}

Measured memory_bytes: 35524
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/assoc_container.hpp>

#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)
#define all(a) a.begin() , a.end()
#define F first
#define S second

using namespace std;
using ll = long long;
using namespace __gnu_pbds;

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

const int N = 3e5 + 10 , inf = 2e9 + 7;
const ll INF = 1e18 ,   mod = 1e9+7 , P = 6547;

void solve() {
    int n , x , t;
    cin >> n >> x >> t;
    cout << t * ((n/x)+(n%x!=0));
}
/*
*/
main() {
    ios;
    int tt = 1;
    //cin >> tt;
    while(tt --) {
        solve();
    }
    return 0;
}


Measured memory_bytes: 3644
#include<iostream>
#include<algorithm>
using namespace std;
int N_MAX=100001;
int p = 1000000007;
long long fib(int n, long long* c){
  if(c[n]!=0) return c[n];
  c[n]=(fib(n-1,c)+fib(n-2,c))%p;
  return c[n];
}
int main()
{
  int n,m,i,a,b,t;
  long long res=1;
  long long c[N_MAX];
  cin >> n >> m;
  fill(c,c+n+1,0);
  c[0]=1;
  c[1]=1;
  b=-1;
  for(i=0;i<m;i++){
    cin >> a;
    t=a-b-2;
    if(t<0){
      cout << "0" << endl;
      return 0;
    }
    res*=fib(t,c);
    res%=p;
    b=a;
  }
  t=n-b-1;
  res*=fib(t,c);
  res%=p;
  cout << res << endl;
  return 0;
}

Measured memory_bytes: 5760
N=int(input())
txy=[list(map(int,input().split())) for _ in range(N)]

txy.insert(0,[0,0,0])
#print(txy)

for i in range(1,N+1):
  t=txy[i][0]-txy[i-1][0]
  x=abs(txy[i][1]-txy[i-1][1])
  y=abs(txy[i][2]-txy[i-1][2])
  xy=x+y
  #print(i,t,x,y)
  
  if not (t>=xy and (t-xy)%2==0):
    print("No")
    exit()
print("Yes")

Measured memory_bytes: 27428
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>

std::string solve(int s, int w)
{
  return w >= s ? "unsafe" : "safe";
}

int main()
{
  int s, w;
  std::cin >> s >> w;

  std::cout << std::setprecision(20);
  std::cout << solve(s, w) << std::endl;
}


Measured memory_bytes: 3628