akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,b,a) for(int i=b;i>=a;i--)
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Forenska(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define sqr(x) ((x)*(x))
#define lowbit(x) ((x)&(-x))
#define GREATER(x) x,vector<x>,greater<x>
#define randIn(L,R) (((LL)rand()*rand())%(R-L)+L)
#define __lcm(a,b) ((a)/__gcd(a,b)*(b))
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pLL;
typedef vector<int> vec;
typedef vector<LL> vecL;
typedef vector<pii> vecP;
typedef vector<pLL> vecPL;
typedef vector<string> vecS;
typedef vector<vec> mat;
typedef complex<double> point;
const long double PI=3.14159265358979323846264338327950288419716939937510582097;
const LL INFLL=0x3f3f3f3f3f3f3f3f;
const int INF=0x3f3f3f3f;
const long double EPS=1e-10;
int read()
{
    int x=0;
    char ch=' ';
    bool flag=false;
    while(ch<'0' || ch>'9')
    {
        if(ch=='-')flag=true;
        ch=getchar();
    }
    while(ch>='0' && ch<='9')
    {
        x=(x<<3)+(x<<1)+ch-'0';
        ch=getchar();
    }
    return flag?-x:x;
}

int main()
{
	int x=read();
	puts((x<1200)?"ABC":((x<2800)?"ARC":"AGC"));
	return 0;
}



Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 0xfff;
const int maxn = 100005;
ll gcd(ll a, ll b)
{
	return b ? gcd(b, a % b) : a;
}
ll lcm(ll a, ll b)
{
	return a * b / gcd(a, b);
}
int main()
{
    int x, y;
    cin >> x >> y;
    bool flag = false;
    for (int i = 0; i <= x;i++)
    {
        if(y==i*2+4*(x-i))
            flag = true;
    }
    if(flag)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 3592
#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_map>
#include<climits>
#include<cstdlib>
#include<cmath>
#include<string>
#include<iomanip>
#include<bitset>
#include<list>

using namespace std;

#define ll long long int

ll const MOD = 1000000007;
ll const INF = (long long int)1 << 61;

ll mypow(ll x,ll n){
    ll ret = 1;
    while(n > 0){
        if(n&1){
            ret = (ret*x)%MOD;
        }
        x = (x*x)%MOD;
        n >>= 1;
    }
    return ret;
}

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

    for(int i = 0; i < str.size() - 1; i++){
        if(str[i] == str[i+1]){
            cout << "Bad" << endl;
            return 0;
        }
    }

    cout << "Good" << endl;

    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define int long long int
#define fi first
#define se second
#define pub push_back
#define pi pair<int,int>
#define all(v) (v).begin(), (v).end()
#define rep(i, l, r) for(int i=(int)(l);i<(int)(r);i++)
#define repd(i, l, r) for (int i=(int)(l);i>=(int)(r);i--)
#define clrg(i, l, r) for(int i=(int)(l);i<(int)(r);i++)vis[i]=0,v[i].clear();
int power(int x, unsigned int y){int res = 1;while (y > 0){ if (y & 1){res = res*x;} y = y>>1;x = x*x;}return res;}
int powermod(int x, unsigned int y, int p){int res = 1;x = x % p;while (y > 0){if (y & 1){res = (res*x) % p;}y = y>>1; x = (x*x) % p;}return res;}
#define print2d(mat,n,m){for(int i=0;i<(int)(n);i++){for(int j=0;j<(m);j++){cout<<mat[i][j]<<" ";}cout<< endl;}}
#define clr(a,x) memset(a,x,sizeof(a))
#define rr(v) for(auto &val:v)
#define print(v) for (const auto itr : v){cout<<itr<<' ';}cout<<"\n";
#define ln length()
#define sz size()
#define mod 1000000007
#define elif else if
int32_t main(){
   int n; cin>>n;
   vector<pi> vp;
   rep(i,0,n){
     int a,b; cin>>a>>b;
     vp.pub({a,b});
   }
   vector<int> v,u;
   rep(i,0,n){
    v.pub(vp[i].fi+vp[i].se),u.pub(vp[i].fi-vp[i].se);
   }
   sort(all(v)); sort(all(u));
   cout<<max(v.back()-v[0],u.back()-u[0])<<"\n";
   return 0;
}
/*
Edge cases? n=1? a[i]<=0?
long vs int? 1LL? 64bits?
Re-read problem. Is it as easy as it seems?
KEEP CORRECTING AND SUBMITTING!
*/


Measured memory_bytes: 11388
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
	int N;
	string S[100];
	int P[100];
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> S[i] >> P[i];
	}
	int cnt = 0;
	int ans = 0;
	string ans1 = S[0];
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			if (S[j] < ans1) {
				ans1 = S[j];
				ans = j;
			}
			else if (ans1 == S[j]) {
				if (P[j] > P[ans]) {
					ans = j;
				}
			}
		}
		cout << ans + 1<< endl;
		S[ans] = "zzzzzzzzzzzzzzzzzzzzzzz";
		P[ans] = 0;
		ans1 = S[0];
		ans = 0;
	}
	return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace debug
{
    public static partial class Program
    {
        public static readonly List<string> List = new List<string>();
        
        public static void Main()
        {
            n = Console.ReadLine().ToLong();
            var dis = Console.ReadLine().ArrayLongs();
            var sorted = dis.OrderBy(xx => xx).ToArray();
            
            var idx = 0;
            var k = sorted[idx];

            long ans = 0;
            while (true)
            {
                while (idx < n && k >= sorted[idx])
                {
                    idx++;
                }

                if (idx == n - idx)
                {
                    ans += sorted[idx] - k;
                }

                if (idx < n)
                {
                    k = sorted[idx];
                }
                else
                {
                    break;
                }
            }

            Console.WriteLine(ans);
        }
    }

    public static partial class Program
    {
        //テンプレここから
        public static long a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;
        public static long GCD(long aaa, long bbb) => bbb == 0 ? aaa : GCD(bbb, aaa % bbb);
        public static long LCM(long aaa, long bbb) => aaa * bbb / GCD(aaa, bbb);
        public static long ToLong(this double ddd) => (long) ddd;
        public static long ToLong(this string str) => long.Parse(str);
        public static long[] ToLong(this IEnumerable<string> strs) => strs.Select(x => x.ToLong()).ToArray();
        public static long[] ArrayLongs(this string str, char opr = ' ') => str.Split(opr).ToLong();
        public static long Diff(long aaa, long bbb) => Math.Abs(Math.Max(aaa, bbb) - Math.Min(aaa, bbb));
        public static long Sign(this long iii) => Math.Sign(iii);
        public static bool IsEven(this long iii) => iii % 2 == 0;
        public static readonly int[] Dx = {0, -1, 0, 1};
        public static readonly int[] Dy = {-1, 0, 1, 0};
        public const int MOD = 1000000007;
        public const string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        public const string ALPHABET = "abcdefghijklmnopqrstuvwxyz";
        public static long ToLong(this char ccc) => ccc.ToString().ToLong();
        public static string Join(this IEnumerable<string> array, string sep = "") => string.Join(sep, array);
        public static string Join(this IEnumerable<char> array, string sep = "") => string.Join(sep, array);
        public static string JoinToStr(this IEnumerable<long> array, string sep = "")
            => array.Select(xxx => xxx.ToString()).Join(sep);
        //テンプレここまで
    }
}

Measured memory_bytes: 26080
#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

int main(){
    int a, b, deg;
    cin >> a >> b >> deg;
    double rad;
    double PI = acos(-1);

    rad = deg * PI / 180;
    double S = a * b * sin(rad) / 2;
    double L = a + b + sqrt(pow(a, 2) + pow(b, 2) - 2 * a * b * cos(rad));
    double h = b * sin(rad);

    cout << fixed;
    cout << setprecision(4) << S << endl;
    cout << setprecision(4) << L << endl;
    cout << setprecision(4) << h << endl;
    
    return 0;
}



Measured memory_bytes: 3484
module ABC049C
  sub Main(ByVal args() as String)
    dim T() as string = {"dream","dreamer","erase","eraser"}
    dim s as string
    dim i,c,l,k as integer
    for i=0 to 3
      T(i)=StrReverse(T(i))
    next
    s=StrReverse(Console.ReadLine())
    c=0
    l=s.Length
    while c<l
      k=-1
      for i=0 to 3
        if l-c>=T(i).Length andalso s.Substring(c,T(i).Length)=T(i)
          k=T(i).Length
          exit for
        end if
      next
      if k<0
        Console.WriteLine("NO")
        return
      end if
      c+=k
    end while
    Console.WriteLine("YES")
  end sub
end module

Measured memory_bytes: 20688
#include <iostream>

 

using namespace std;

 

int main() 
{
    int a, b, c;
    
    cin >> a >> b >> c;
    if (a <= b && b <= c)
        cout << a << " " << b << " " << c << endl;
    else if (a <= c && c <= b)
        cout << a << " " << c << " " << b << endl;
    else if (b <= a && a <= c)
        cout << b << " " << a << " " << c << endl;
    else if (b <= c && c <= a)
        cout << b << " " << c << " " << a << endl;
    else if (c <= a && a <= b)
        cout << c << " " << a << " " << b << endl;
    else 
        cout << c << " " << b << " " << a << endl;
}


Measured memory_bytes: 3116
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
using namespace __gnu_pbds;
typedef tree<pair<ll,pair<ll,ll> >, null_type, less<pair<ll,pair<ll,ll> > >, rb_tree_tag, tree_order_statistics_node_update>ordered_set;
#define me BOSS
#define bug() cout<<"AIkahne aise"<<endl
#define PI acos(-1)
/* Precode Start Here *\
     Sieve
void sieve()
{
    for(ll i=3; i<=2000; i+=2)
    {
        for(ll j=i*i; j<=4000000; j+=i)
            A[j]=1;
    }
    v.push_back(2);
    for(ll i=3; i<=4000000; i+=2)
        if(A[i]==0)
            v.push_back(i);
}

     Power Function Modulo P

ll modPow(ll a, ll x, ll p) {
    //calculates a^x mod p in logarithmic time.
    long res = 1;
    while(x > 0) {
        if( x % 2 != 0) {
            res = (res * a) % p;
        }
        a = (a * a) % p;
        x /= 2;
    }
    return res;
}


   factorial

ll fact(ll n)
{
    ll ans=1;
    for(ll i=1;i<=n;i++)
    {
        ans=(ans*i)%mod;
    }
    return ans;
}
     Calculating nCr using Fermats law Theorem

ll modInverse(ll a, ll p) {
    //calculates the modular multiplicative of a mod m.
    //(assuming p is prime).
    return modPow(a, p-2, p);
}


ll modBinomial(ll n, ll k, ll p) {
// calculates C(n,k) mod p (assuming p is prime).

    ll numerator = 1; // n * (n-1) * ... * (n-k+1)
    for (ll i=0; i<k; i++) {
        numerator = (numerator * (n-i) ) % p;
    }

    ll denominator = 1; // k!
    for (ll i=1; i<=k; i++) {
        denominator = (denominator * i) % p;
    }

    // numerator / denominator mod p.
    return ( numerator* modInverse(denominator,p) ) % p;
}
     num of divisor and euler totient

ll phi[1000001],mark[1000001],divi[1000001];;
void divisorPhi(ll n)
{
    for(int i=1;i<=n;i++)
        phi[i]=i;
    for(int i=2;i<=n;i++)
    {
        if(!mark[i])
        {
            for(int j=i;j<=n;j+=i)
            {
                mark[j]=1;
                phi[j]*=(1-1/(double)i);
            }
        }
    }
    for(ll i=1;i<=n;i++)
    {
        for(ll j=i;j<=n;j+=i)
            divi[j]++;
    }
}
/* Precode Ends */
#define mod 1000000007
ll A[5000001],B[5000001];
vector<ll>v;
map<ll,ll>myMap;
set<ll>mySet;
vector<pair<ll,ll> >vp;
priority_queue<ll> pq;
priority_queue<ll, vector<ll>, std::greater<ll> > first;
ll po(ll a,ll n)
{
    ll ans=1;
    for(int i=1; i<=n; i++)
        ans*=a;
    return ans;
}

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

    ll r=0;
    string s;
    cin>>s;
    for(int i=0; i<s.size(); i++)
    {
        if(s[i]=='R')
            r++;
    }
    if(r==1||r==3||r==0)
    {
        cout<<r<<endl;
    }
    else if(r==2)
    {
        if(s[1]=='R')
        {
            cout<<2<<endl;
        }
        else
        {
            cout<<1<<endl;
        }
    }

    return 0;
}



Measured memory_bytes: 3652
def C_IrohasObsession():
    N, K = map(int, input().split())
    D = list(map(int, input().split()))
    ans = 0
    for x in range(N, 100000):
        for y in str(x):
            if int(y) in D:
                break
        else:
            ans = int(x)
            break
    print(ans)

if __name__ == "__main__":
    C_IrohasObsession()

Measured memory_bytes: 3064
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_B

x, y = map(int, input().split())

if y > x:
	w = y
	y = x
	x = w

while y > 0:
	amari = x % y
	x = y
	y = amari

print(x)

Measured memory_bytes: 7660
#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;
}
const int INF = 2e9;
const int MOD = 1e9 + 7;

int main() {
   string s;
   cin >> s;
   string t = "ACGT";
   int n = s.size();
   int ans = 0;
   rep(i, 0, n) {
      rep(j, i, n) {
         bool isACGT = false;
         rep(k, 0, 4) {
            if (s[j] == t[k]) isACGT = true;
         }
         if (isACGT) {
            chmax(ans, j - i + 1);
         } else
            break;
      }
   }
   cout << ans << endl;
   return 0;
}

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

int main()
{
	int k, n;
	scanf("%d%d", &k, &n);
	int a[200001];
	for (int i = 0; i < n; ++i)
	{
		scanf("%d", a + i);
	}
	a[n] = a[0] + k;
	int ans = k;
	for (int i = 0; i < n; ++i)
	{
		int d = k - (a[i + 1] - a[i]);
		if (d < ans)
		{
			ans = d;
		}
	}
	printf("%d\n", ans);
}


Measured memory_bytes: 896
D, G = [int(s) for s in input().split()]
problems = [[int(s) for s in input().split()] for _ in range(D)]

result = 10 ** 8

for i in range(2 ** D):
    cnt_problem = 0
    cnt_score = 0
    for j in range(D):
        if i >> j & 1:
            cnt_score += problems[j][1] + 100 * (j + 1) * problems[j][0]
            cnt_problem += problems[j][0]

    for j in reversed(range(D)):
        if not i >> j & 1:
            for _ in range(problems[j][0]):
                if cnt_score >= G:
                    break
                else:
                    cnt_score += 100 * (j + 1)
                    cnt_problem += 1
    result = min(cnt_problem, result)

print(result)


Measured memory_bytes: 3064
#include<bits/stdc++.h>
typedef long long ll;

using namespace std;

#define REP(i,a,b) for (int i = a; i <= b; i++)
#define ALL(a)              a.begin(), a.end()
#define ALLN(a, n)          (a, a+n)
#define MAX                 10000007
#define MIN                 -10000007



              
int main()
{
  ios::sync_with_stdio(0);
    cin.tie(0);
  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif
      
    int t;
    t=1;
     //  cin>>t;
    while(t--){
            string s,t;
            cin>>s>>t;
            int i=0,j=0,p=1;
            ll minn=0,ans=t.size();
            while(1){
              while(j<t.size()){
                minn+=(s[i]==t[j]?0:1);
                j++;i++;
              }
              ans=min(minn,ans);
              minn=0;
              j=0;
              i=p;
              p++;
              if(i==s.size()-t.size()+1) break;
            } 
            cout<<ans;
       


             }
             cerr<<"Time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl;
    return 0;
}


Measured memory_bytes: 3840
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
/*int p = 998244353;*/
int p = 1000000007;
#define int long long
#define vel vector<long long>
#define vvel vector<vel>
#define rep(i,n) for(int i=0;i<n;i++)
#define sor(v) sort(v.begin(),v.end())
#define mmax(a,b) a=max(a,b)
#define mmin(a,b) a=min(a,b)
#define mkp make_pair
#define pin pair<int,int>
#define qin pair<pin,int>
#define V vector
#define Endl endl
#define veb vector<bool>
#define sq(a) (a)*(a)
#define rev(s) reverse(s.begin(),s.end())
#define end_pr(s) cout << s <<endl;return 0
#define itn int
int RE() {
	vel v(3, 2);
	return v.at(4);
}
int ru(int a, int r) {
	if (r == 0) { return 1; }
	int ans = ru(a, r / 2);
	ans *= ans; ans %= p;
	if (r % 2 == 1) { ans *= a; }
	return ans % p;
}
int inv(int a) {
	return ru(a,p - 2);
}
vel dis(int mid1, vvel &way) {
	int n = way.size();
	vel dist(n, -1); dist[mid1] = 0;
	queue<int> q;
	q.push(mid1);
	while (!q.empty()) {
		int st = q.front(); q.pop();
		rep(i, way[st].size()) {
			int to = way[st][i];
			if (dist[to] == -1) {
				dist[to] = dist[st] + 1;
				q.push(to);
			}
		}
	}
	return dist;
}
pin most_far(int now, int n, vvel &way) {
	vel dist1 = dis(now, way);
	pin ans = mkp(-1, 0);
	rep(i, n) {
		if (dist1[i] > ans.first) { ans = mkp(dist1[i], i); }
	}
	return ans;
}

template<typename T>
V<T> uni(V<T> &v) {
	if (v.size() == 0) { return v; }
	sor(v);
	V<T> ans(1, v[0]);
	for (int i = 1; i < v.size(); i++) {
		if (v[i] != v[i - 1]) { ans.push_back(v[i]); }
	}
	v = ans;
	return v;
}
int s_gcd(int a, int b) {
	if (b == 0) { return a; }
	return s_gcd(b, a%b);
}
int gcd(int a, int b) {
	a = abs(a);
	b = abs(b);
	if (a < b) { swap(a, b); }
	return s_gcd(a, b);
}
vel dx{ 1,1,0,0,-1,-1 };
vel dy{ 0,1,1,-1,-1,0 };
int solve(int i, vvel &chi, vel &p) {
	if (chi[i].size() == 0) {
		return (p[i]/2)+1;
	}
	vel list;
	for (auto x : chi[i]) { list.push_back(solve(x,chi,p)); }
	sor(list);
	int n = list.size(); n = (n + 1) / 2;
	int ans = 0;
	rep(i, n) { ans += list[i]; }
	return ans;
}
signed main() {
	int xx; cin >> xx;
	rep(index, xx) {
		string s; cin >> s;
		int n = s.size();
		vel par(10000, -1);
		vel p(10000,0);
		int now_pot = 0;
		int new_leaf = 1;
		int now_num = 0;
		for (int i = 0; i < n; i++) {
			char c = s[i];
			if (c == ']') {
				p[now_pot] = now_num; now_num = 0;
				now_pot = par[now_pot];
			}
			else if (c == '[') {
				par[new_leaf] = now_pot;
				now_pot = new_leaf;
				new_leaf++;
			}
			else {
				int num = c - '0';
				now_num *= 10; now_num += num;
			}
		}
		vvel chi(10000);
		rep(i, 10000) {
			if (par[i] != -1) {
				chi[par[i]].push_back(i);
			}
		}
		cout << solve(0, chi, p) << endl;
	}
}


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

using namespace std;
using ll = long long;

int main(){
    ll N,C,K;
    cin >> N >> C >> K;
    vector<ll> T(N);
    for(int i=0;i<N;i++){
        cin >> T[i];
    }

    sort(T.begin(), T.end());
    ll bus = 1;
    ll people = 1;
    ll t_min = T[0] + K;

    for(int i=1;i<N;i++){
        if(T[i] <= t_min){
            if(people < C){
                people++;
            }else{
                people = 1;
                bus++;
                t_min = T[i] + K;
            }
        }else{
            people = 1;
            bus++;
            t_min = T[i] + K;
        }
    }

    cout << bus << endl;
    return 0;
}

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

            #define FOR(i,a,b) for (int i = (a); i < (b); i++)
            #define rep(i,n) FOR(i,0,n)
            #define RFOR(i,b,a) for (int i = (b)-1; i >= (a); i--)
            #define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++)
            #define FILL(a,value) memset(a, value, sizeof(a))

            #define SZ(a) (int)a.size()
            #define ALL(a) a.begin(), a.end()
            #define PB push_back
            #define MP make_pair
            #define SC second
            #define FS first

            typedef long long LL;
            typedef vector<int> VI;
            typedef vector<LL>VL;
            typedef vector <bool >VB;
            typedef vector<vector<int>>WI;
            typedef vector<vector<LL>>WL;
            typedef pair<int, int> PII;
            typedef pair<double, double> PDD;

            const double PI = acos(-1.0);
            const int INF = 1000 * 1000 * 1000 + 7;
            const LL LINF = LL(1e12);
            const int MAS = int(1e5 * 3 + 1);
            const double EPS = 1e-7;
            const LL MAX = 4294967296;
            const LL MOD =LL(1e9+7);
           int a[MAS];
            int main()
            {

             int n ;
             cin >> n;
             rep(i,n)
             {
                 cin >> a[i];
             }
             LL sum = 0;
             rep(i,n-1)
             {
                 FOR(j,i+1,n)
                 {
                     sum+=a[i] * a[j];
                 }
             }
             cout << sum ;

            }


Measured memory_bytes: 256
import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string;

auto rdsp(){return readln.splitter;}
void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;}
void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);}
void readC(T...)(size_t n,ref T t){foreach(ref v;t)v=new typeof(v)(n);foreach(i;0..n){auto r=rdsp;foreach(ref v;t)pick(r,v[i]);}}

const mod = 10^^9+7;
alias mint = FactorRing!(mod, true);

void main()
{
  int h, w; readV(h, w);
  string[] a; readC(h, a);

  auto dp = new mint[][](h, w);
  dp[0][0] = 1;

  foreach (i; 0..h)
    foreach (j; 0..w)
      if (a[i][j] == '.') {
        if (i > 0) dp[i][j] += dp[i-1][j];
        if (j > 0) dp[i][j] += dp[i][j-1];
      }

  writeln(dp[$-1][$-1]);
}

struct FactorRing(int m, bool pos = false)
{
  version(BigEndian) union { long vl; struct { int vi2; int vi; } } else union { long vl; int vi; }
  alias FR = FactorRing!(m, pos);
  @property static init() { return FR(0); }
  @property int value() { return vi; }
  @property void value(int v) { vi = mod(v); }
  alias value this;

  this(int v) { vi = v; }
  this(int v, bool runMod) { vi = runMod ? mod(v) : v; }
  this(long v) { vi = mod(v); }

  ref auto opAssign(int v) { vi = v; return this; }

  pure auto mod(int v) const { static if (pos) return v%m; else return (v%m+m)%m; }
  pure auto mod(long v) const { static if (pos) return cast(int)(v%m); else return cast(int)((v%m+m)%m); }

  static if (!pos) pure ref auto opUnary(string op: "-")() { return FR(mod(-vi)); }

  static if (m < int.max / 2) {
    pure ref auto opBinary(string op)(int r) if (op == "+" || op == "-") { return FR(mod(mixin("vi"~op~"r"))); }
    ref auto opOpAssign(string op)(int r) if (op == "+" || op == "-") { vi = mod(mixin("vi"~op~"r")); return this; }
  } else {
    pure ref auto opBinary(string op)(int r) if (op == "+" || op == "-") { return FR(mod(mixin("vl"~op~"r"))); }
    ref auto opOpAssign(string op)(int r) if (op == "+" || op == "-") { vi = mod(mixin("vl"~op~"r")); return this; }
  }
  pure ref auto opBinary(string op: "*")(int r) { return FR(mod(vl*r)); }
  ref auto opOpAssign(string op: "*")(int r) { vi = mod(vl*r); return this; }

  pure ref auto opBinary(string op)(ref FR r) if (op == "+" || op == "-" || op == "*") { return opBinary!op(r.vi); }
  ref auto opOpAssign(string op)(ref FR r) if (op == "+" || op == "-" || op == "*") { return opOpAssign!op(r.vi); }
}


Measured memory_bytes: 11260
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define all(c) begin(c),end(c)

template<typename T1, typename T2>
inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }

template<typename T1, typename T2>
inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007


//ここから編集する
class Solve {
public:
    void input() {

    }

    void solve() {
        input();
        int n;
        cin >> n;
        int ans = 0;
        while (n > 1) {
            ans++;
            n = n / 3 + (n % 3 != 0);
        }
        cout << ans << endl;

    }
};


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

    Solve().solve();


    return 0;
}



Measured memory_bytes: 3172
#include <iostream>
#include <cctype>
#include <cstdlib>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

int comp(const void* a, const void* b){
	return *(int*)a - *(int*)b;
}

int main() {
	int n, a, b;
	cin >> n >> a >> b;
	if(n*a > b){
		cout << b << endl;
	}else{
		cout << n*a << endl;
	}
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define mod(mod_x) ((((long long)mod_x)+modulo)%modulo)
#define Inf 10000000000000000

int main(){
	
	int N,M,P;
	cin>>N>>M>>P;
	
	vector<vector<pair<long long,long long>>> E(N,vector<pair<long long,long long>> (0));
	vector<vector<int>> E2(N,vector<int>(0));
	for(int i=0;i<M;i++){
		long long a,b,c;
		cin>>a>>b>>c;
		a--;b--;
		c=P-c;
		E[a].push_back(make_pair(b,c));
		E2[b].push_back(a);
	}
	
	vector<long long> dis(N,Inf);
	dis[0] = 0;
	
	for(int i=0;i<N;i++){
		for(int j=0;j<N;j++){
			if(dis[j]==Inf)continue;
			for(int k=0;k<E[j].size();k++){
				int to = E[j][k].first;
				long long cost = E[j][k].second;
				if(dis[to] > dis[j] + cost){
					dis[to] = dis[j] + cost;
				}
			}
		}
	}
	
	vector<long long> dis2(N,Inf);
	dis2[N-1]=0;
	for(int i=0;i<N;i++){
		for(int j=0;j<N;j++){
			if(dis2[j]==Inf)continue;
			for(int k=0;k<E2[j].size();k++){
				int to = E2[j][k];
				long long cost = 1;
				if(dis2[to] > dis2[j] + cost){
					dis2[to] = dis2[j] + cost;
				}
			}
		}
	}
	/*
	for(int i=0;i<N;i++){
		cout<<dis[i]<<endl;
	}*/
	
	for(int i=0;i<N;i++){
		for(int j=0;j<E[i].size();j++){
			int to = E[i][j].first;
			long long cost = E[i][j].second;
			if(dis[i]+cost<dis[to]){
				if(dis2[to]!=Inf&&dis[to]!=Inf){
					cout<<-1<<endl;
					return 0;
				}
			}
		}
	}
	
	
	
	cout<<max(-dis[N-1],(long long)0)<<endl;
	
		
	
	return 0;
}

Measured memory_bytes: 768
n = int(input())
s = input()
st = 0
for i in range(n):
    st += int(s[i])
#print(st)
if st == 1:
    if s[-1] == '1':
        for _ in range(n-1):
            print(2)
        print(0)
    else:
        for i in range(n):
            if s[i] == '1':
                print(0)
            elif i == n-1:
                print(2)
            else:
                print(1)
    exit()
m1 = [1]
p1 = [1]
for i in range(n-1):
    m1.append(m1[-1]*2%(st-1))
    p1.append(p1[-1]*2%(st+1))
if st-1 == 1:
    m1[0] = 0
if st+1 == 1:
    p1[0] = 0
m1.reverse()
p1.reverse()
#print(m1)
#print(p1)
ansm = 0
ansp = 0
for i in range(n):
    ansm += m1[i] * int(s[i])
    ansp += p1[i] * int(s[i])
#print(ansm)
#print(ansp)
time = [0 for _ in range(20)]
def nex(time):
    for i in range(20):
        if time[i] == 0:
            time[i] += 1
            return time
        else:
            time[i] = 0
ans = [0 for _ in range(200001)]
time2 = 1
time[0] = 1
while time2 <= 200000:
    #print(time,time2)
    ans[time2] = ans[time2 % sum(time)] + 1
    time = nex(time)
    time2 += 1
#print([i for i in range(20)])
#print(ans[:20])
for i in range(n):
    if s[i] == '1':
        use = (ansm-m1[i]) % (st-1)
    else:
        use = (ansp+p1[i]) % (st+1)
    print(1+ans[use])

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

using namespace std;

#define forn(i, n) for (ll i = 0; i < (ll) (n); ++i)
#define sz(a) static_cast<int>((a).size())
#define pb emplace_back
#define mp make_pair
#define endl '\n'
#define f first
#define s second

#ifdef SEREZHKA
#define dbg(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define dbg(...)
#endif

template<typename T>
void _dbg(const char* _s, T _h) { cerr << _s << " = " << _h << "\n"; }

template<typename T, typename... Ts>
void _dbg(const char*_s, T _h, Ts... _t) {
    int _b = 0;
    
    while (((_b += *_s == '(') -= *_s == ')') != 0 || *_s != ',')
        cerr << *_s++;
    
    cerr << " = " << _h << ",";
    _dbg(_s + 1, _t...);
}

using ll = long long;

const ll INF = static_cast<ll>(1e9) + 7ll;
const ll LINF = INF * INF;
const int MAXN = static_cast<int>(4e2) + 17;

int n;
string s;

bool read() {
    if (!(cin >> s))
        return false;

    return true;
}

void solve() {
    n = sz(s);

    forn (i, n - 1) {
        if (s[i] == s[i + 1]) {
            cout << i + 1 << ' ' << i + 2 << endl;
            return ;
        }

        if (i + 2 < n && s[i] == s[i + 2]) {
            cout << i + 1 << ' ' << i + 3 << endl;
            return ;
        }
    }

    cout << "-1 -1\n";
}

int main() {
    cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    
    while (read())
        solve();
    
    return 0;
}



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

int main() {
	string s;
	int a, b;
	cin >> a >> b;
	if (a <= b) {
		for (int i = 0;i < b;i++)cout << a;
	}
	else {
		for (int i = 0;i < a;i++)cout << b;
	}
	
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(void){
    long long times, toYen, toBiscuits;
    cin >> times >> toYen >> toBiscuits;
    
    if(toBiscuits - toYen <= 2){
        cout << times + 1 << endl;
        return 0;
    }
    long long biscuits = 1;
    bool yen = false;
    while(times > 0){
        if(yen){
            biscuits += toBiscuits;
            yen = false;
        }else if((times > 1) && (biscuits >= toYen)){
            biscuits -= toYen;
            yen = true;
        }else{
            ++biscuits;
        }
        --times;
    }
    cout << biscuits << endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <stdlib.h>
#include <iomanip>
using namespace std;

int main(void){
    double r;
    double squ, cir;
    cin >> r;
    squ = r*r*3.141592653589;
    cir = 2*r*3.141592653589;
    cout << fixed << setprecision(12) << squ << " " << cir << endl;
    return 0;
}

Measured memory_bytes: 1288
n = int(input())
travel_plan = []
for i in range(n):
    travel_plan.append(tuple(map(int, input().split())))
travel_plan = [(0, 0, 0)] + travel_plan

for i in range(n):
    t1 = travel_plan[i][0]
    x1 = travel_plan[i][1]
    y1 = travel_plan[i][2]
    t2 = travel_plan[i+1][0]
    x2 = travel_plan[i+1][1]
    y2 = travel_plan[i+1][2]
    x = abs(x1 - x2)
    y = abs(y1 - y2)
    t = t2 - t1
    if x + y > t or (x + y) % 2 != t % 2:
        print("No")
        exit()
print("Yes")

Measured memory_bytes: 18180
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
    using namespace std;
 
int GCD(int a, int b) {
    if (b == 0) return a;
    else return GCD(b, a % b);
}

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}
 
    int main(){
      int a,b;
      cin >> a >> b;
      if(a>b) cout << a-1 << endl;
      else cout << a << endl;
      return 0;}

Measured memory_bytes: 256
'use strict';
(function(stdin) { 
  var inputs = stdin.toString();
  var params = inputs.split('\n')[0].split(' ').map(Number);
  (function(a,b,c) {

    if(a<b && b<c){
        console.log('Yes');
    }else {
        console.log('No');
    }
    //????????????????????????
}(params[0],params[1],params[2])); 
}(require('fs').readFileSync('/dev/stdin', 'utf8')));

Measured memory_bytes: 7380
#include<stdio.h>
int main(void){
  int A,B;
  scanf("%d %d",&A,&B);
  if((A+B)%2==1){
    printf("%d\n",(A+B)/2+1);
  }else{
    printf("%d\n",(A+B)/2);
  }
  return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <iomanip>
#include <set>
using namespace std;
typedef long long int ll;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define yes cout << "yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl
#define no cout << "no" << endl

const int INF = 1001001001;
const int mod = 1000000007;
#define PI 3.14159265359;

void P(int x) {cout << x << endl;}
void P(long x) {cout << x << endl;}
void P(double x) {cout << x << endl;}
void P(ll x) {cout << x << endl;}
void P(string x) {cout << x << endl;}
void P(char x) {cout << x << endl;}

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

int main() {
  int n, k;
  cin >> n >> k;
  vector<int> v(n);
  rep (i, n) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  int ans = INF;
  rep (i, n - k + 1) {
    ans = min(ans, v[i + k - 1] - v[i]);
  }
  P(ans);


  return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
 
using namespace std;
typedef long long ll;
typedef vector<int> VI;
ll mm=1000000000;ll MM=mm+7;
#define rep(i, n) for(int i=0;i<n;i++)
#define PI 3.141592653589793


int main(){
    int n;
    cin >> n;
    vector<ll> a(n);
    rep(i,n)cin >> a.at(i);
    sort(a.begin(),a.end());
    if(a.at(0)==0){
        cout << 0 << endl;
        return 0;
    }
    ll now=1;
    rep(i,n){
        if((ll)pow(10,18)/a.at(i)<now){
            cout << -1 << endl;
            return 0;
        }
        now*=a.at(i);

    }
    cout << now << endl;

}

Measured memory_bytes: 3992
class _in{struct my_iterator{int it;const bool rev;explicit constexpr my_iterator(int it_, bool rev=false):it(it_),rev(rev){}constexpr int operator*(){return it;}constexpr bool operator!=(my_iterator& r){return it!=r.it;}void operator++(){rev?--it:++it;}};const my_iterator i,n;public:explicit constexpr _in(int n):i(0),n(n){}explicit constexpr _in(int i,int n):i(i,n<i),n(n){}constexpr const my_iterator& begin(){return i;}constexpr const my_iterator& end(){return n;}};

#include <bits/stdc++.h>
using namespace std;

using i64 = long long;
vector<i64> calc(const vector<i64>& h) {
    stack<pair<i64, i64>> sta;
    int N = h.size();
    vector<i64> res(N, 0LL);
    for(int i : _in(N)) {
        i64 k = i;
        while(!sta.empty() && sta.top().first > h[i]) {
            k = sta.top().second;
            sta.pop();
        }
        sta.emplace(h[i], k);
        res[i] = i - k;
    }
    return res;
}
int main() {
    cin.tie(0); ios::sync_with_stdio(false);
    int N; cin >> N;
    vector<i64> a(N);
    for(auto& x : a) cin >> x;
    auto vec = calc(a);
//    for(auto x : vec) cout << x << endl;
    auto rev = a;
    reverse(rev.begin(), rev.end());
    auto vec2 = calc(rev);
    reverse(vec2.begin(), vec2.end());
    i64 sum = accumulate(a.begin(), a.end(), 0LL);
    for(int i : _in(N)) {
        i64 l = vec[i], r = vec2[i];
        {// right range
            sum += r * a[i];
        }
        {// left
            i64 rlen = r + 1LL;
            sum += l * rlen * a[i];
        }
    }
    cout << sum << endl;
    return 0;
}

Measured memory_bytes: 9856
package main

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

const (
	initialBufSize = 100000
	maxBufSize     = 10000000
)

var (
	sc = bufio.NewScanner(os.Stdin)
	wt = bufio.NewWriter(os.Stdout)
)

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	i, _ := strconv.Atoi(next())
	return i
}

func nextInt2() (int, int) {
	return nextInt(), nextInt()
}

func nextInt3() (int, int, int) {
	return nextInt(), nextInt(), nextInt()
}

func nextInt4() (int, int, int, int) {
	return nextInt(), nextInt(), nextInt(), nextInt()
}

func nextInts(n int) []int {
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		slice[i] = nextInt()
	}
	return slice
}

func nextFloat64() float64 {
	f, _ := strconv.ParseFloat(next(), 64)
	return f
}

func nextFloat64s(n int) []float64 {
	slice := make([]float64, n)
	for i := 0; i < n; i++ {
		slice[i] = nextFloat64()
	}
	return slice
}

func putf(format string, a ...interface{}) {
	fmt.Fprintf(wt, format, a...)
}

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}

func sum(a []int) int {
	ret := 0
	for _, v := range a {
		ret += v
	}
	return ret
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, initialBufSize), maxBufSize)
	defer wt.Flush()

	n := nextInt()
	a := nextInts(n)
	mp := map[int]int{}
	for i := 0; i < n; i++ {
		mp[a[i]]++
	}
	s := sum(a)

	q := nextInt()

	for i := 0; i < q; i++ {
		b, c := nextInt(), nextInt()
		s += (c - b) * mp[b]
		puts(s)
		mp[c] += mp[b]
		mp[b] = 0
	}
}


Measured memory_bytes: 9512
#include <cstdio>

using namespace std;

const int mod = 998244353;
int a[300][300];
long long b[301];
int f[300];

int main() {
    int n, m, c, i, j, k, l;
    long long ans = 0;
    
    scanf("%d %d", &n, &m);
    
    for (i = 0; i < n; i++) {
        for (j = 0; j < m; j++) {
            scanf("%d", &a[i][j]);
        }
    }
    
    b[0] = 1;
    for (i = 1; i <= 300; i++) b[i] = b[i - 1] * 2 % mod;
    
    c = m;
    
    for (i = 0; i < n; i++) {
        for (j = 0; j < m; j++) {
            if (f[j] == 1) continue;
            if (a[i][j] == 1) break;
        }
        
        if (j == m) continue;
        
        c--;
        f[j] = 1;
        
        for (k = j + 1; k < m; k++) {
            if (a[i][k] == 0) continue;
            
            for (l = i; l < n; l++) a[l][k] ^= a[l][j];
        }
        
        ans += b[c] * b[n - 1];
        ans %= mod;
    }
    
    printf("%lld\n", ans);
    
    return 0;
}


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

namespace Atcoder_0403
{
    class Program
    {
        static void Main(string[] args)
        {
            long _ballcount = GetInput_int()[0];
            var _numbers = GetInput_int();
            long[] _numberCount = new long[_ballcount+1];
            for(long i = 0; i < _numbers.Length; i++)
            {
                _numberCount[_numbers[i]]++;
            }

            long fullPairCount = 0;
            for(long i = 1; i <= _ballcount; i++)
            {
                if (_numberCount[i] >= 2)
                {
                    fullPairCount += (_numberCount[i] * (_numberCount[i] - 1)) / 2;
                }
            }

            for(long i = 1; i <= _ballcount; i++)
            {
                long localPairCount = _numberCount[_numbers[i-1]] - 1;
                if (localPairCount >= 0)Console.WriteLine(fullPairCount - localPairCount);
                else Console.WriteLine(fullPairCount);
            }
        }


        #region input


        static string[] GetInput_string()
        {
            var input = Console.ReadLine().Split(' ');
            return input;
        }

        static int[] GetInput_int()
        {
            var input = GetInput_string();
            var result = new int[input.Length];
            for (int i = 0; i < result.Length; i++)
            {
                result[i] = int.Parse(input[i]);
            }
            return result;
        }
        static long[] GetInput_long()
        {
            var input = GetInput_string();
            var result = new long[input.Length];
            for (int i = 0; i < result.Length; i++)
            {
                result[i] = long.Parse(input[i]);
            }
            return result;
        }
        #endregion
        #region sonota
        static void Swap_array<T>(T[] target, int a, int b)
        {
            T temp = target[a];
            target[a] = target[b];
            target[b] = temp;
        }
        static void Swap_list<T>(List<T> target, int a, int b)
        {
            T temp = target[a];
            target[a] = target[b];
            target[b] = temp;
        }
        #endregion
    }
}


Measured memory_bytes: 33116
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = s; i < (int)(n); i++)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using namespace std;
using ll = long long;
using pii = pair<int, int>;

//const ll INF = 1e18L + 5;
//const int INF = 1e9 + 5;
//const double pi = 3.14159265358979323846;

void	solve()
{
	ll a, v, b, w, t;
	cin >> a >> v >> b >> w >> t;
	if (v <= w) {
		cout << "NO" << endl;
		return ;
	}
	ll dist = abs(a - b);
	ll step = abs(v - w);
	if (step * t >= dist)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}

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

	solve();
}


Measured memory_bytes: 3648
#include <stdio.h>
#include <cmath>
#include <bits/stdc++.h>



using namespace std;

typedef vector<int> VI;
typedef vector<string> VS;


//container util
#define SORT(c) sort((c).begin(),(c).end())

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



int main(void){

	string s; cin >> s;
	int len = s.size();

	set<char> st;
	REP(i,len) st.insert(s[i]);

	if(st.size() == len) cout << "yes" << endl;
	else cout << "no" << endl;


	return 0;

}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int i,n,a[5],b[5];
    n=2;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
    }
    for(i=0;i<n;i++)
    {
        cin>>b[i];
    }
    sort(a,a+n);
    sort(b,b+n);
    cout<<a[0]+b[0]<<endl;
    return 0;
}


Measured memory_bytes: 3580
#include <stdio.h>

#define min(a, b) (a<b?a:b)
#define max(a, b) (a>=b?a:b)

int main() {
    int a, b, c;
    int tmp;

    scanf("%d %d %d", &a, &b, &c);

    printf("%d %d %d\n",
        min(min(a, b), c),
        max(a, b) ^ max(b, c) ^ max(c, a),
        max(max(a, b), c)
    );

    return 0;
}

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

int n;
int cnt;
deque<int> c;
int a[12];

void Op(deque<int> s)
{
  for (int i = 0; i < n; i++){
    c.push_back(count(s.begin(), s.end(), a[i]));
    a[i] = c.back();
  }
  cnt++;
}

int main()
{
  while (cin >> n, n){
    deque<int> s;
    int cn = 0;
    cnt = 0;

    for (int i = 0; i < n; i++){
      cin >> a[i];
      s.push_back(a[i]);
    }
    while (cn != n){
      Op(s);
	  cn = 0;
      for (int i = 0; i < n; i++){
		if (s.front() == c.front()){
          cn++;
        }
        s.pop_front();
        s.push_back(c.front());
        c.pop_front();
	  }
    }
    cout << cnt - 1 << "\n" << s[0];
    for (int i = 1; i < n; i++){
      cout << " " << s[i];
    }
    cout << endl;
  }
  
  return (0);
}

Measured memory_bytes: 1216
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <iomanip>
#include <queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
using namespace std;
typedef long long ll;

int N;
int P[20];

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

    int ans=0;
    for(int i=1;i<N-1;i++){
        if(P[i-1]<P[i] && P[i]<P[i+1] ||
        P[i-1]>P[i] && P[i]>P[i+1]) ans++;
    }

    cout<<ans<<endl;
}

Measured memory_bytes: 256
import java.util.Arrays;
import java.util.Scanner;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

public class Main{
	static final Scanner s=new Scanner(System.in);
	static final long[] fal_rnd(int size){
		AtomicInteger l=new AtomicInteger(-1),r=new AtomicInteger(size);
		long[] res=new long[size];
		INS(size).unordered().parallel().mapToLong(Long::parseLong).forEach(v->res[ThreadLocalRandom.current().nextBoolean()?l.incrementAndGet():r.decrementAndGet()]=v);
		return res;
	}
	static final IntStream REPS(int v){
		return IntStream.range(0,v);
	}
	static final Stream<String> INS(long size){
		return StreamSupport.stream(Spliterators.spliterator(s,size,Spliterator.NONNULL&Spliterator.IMMUTABLE),false).limit(size);
	}
	public static void main(String __[]){
		int d;
		while (true) {
			d=s.nextInt();
			if(d==0)return;
			long[] in=fal_rnd(d);
			Arrays.parallelSort(in);
			System.out.println(REPS(d-1).mapToLong(i->in[i+1]-in[i]).min().getAsLong());
		}
	}
}

Measured memory_bytes: 49620
import sys
input = sys.stdin.readline

def f(x):
    if x&1:
        if ((x+1)//2)&1:
            tmp = 1
        else:
            tmp = 0
    else:
        tmp = x
        if (x//2)&1:
            tmp = tmp ^ 1
    return tmp

def main():
    A, B = map(int, input().split())

    print(f(A-1) ^ f(B))

if __name__ == "__main__":
    main()

Measured memory_bytes: 3064
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


a,b,c,k=map(int,readline().split())

cnt=0

cnt+=min(a,k)
k-=a

if k>0:
	k-=b
	if k>0:
		cnt-=k
		
print(cnt)

Measured memory_bytes: 9248
#include<stdio.h>

int main() {
	int a, b, d, r;
	double f;
	scanf("%d %d", &a, &b);
	d = a / b;
	r = a%b;
	f = (double)a / b;
	printf("%d %d %f\n", d, r, f);
	return 0;
}

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

int main()
{
   int n,k;
   cin >> n >> k;
   int a[n];
   int i,j,m,sum=0;
   
   for( i=0;i<n;i++)
   {
       cin >> a[i];
   }
   
   for( i=0;i<n;i++)
   {
       for(j=i+1;j<n;j++)
       {
           if(a[i]> a[j])
           {
               m=a[i];
               a[i]=a[j];
               a[j]=m;
           }
       }
   }
   
   for(i=0;i<k;i++)
   {
       sum=sum+a[i];
   }
   
   cout << sum;

    return 0;
}

Measured memory_bytes: 3620
import java.util.Scanner;

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

        int N = sc.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < A.length; ++i) {
            A[i] = sc.nextInt();
        }

        System.out.println(solve(A));

        sc.close();
    }

    static long solve(int[] A) {
        long result = 0;
        int xor = 0;
        long sum = 0;
        int beginIndex = 0;
        for (int endIndex = 0; endIndex < A.length; ++endIndex) {
            xor ^= A[endIndex];
            sum += A[endIndex];
            while (xor != sum) {
                xor ^= A[beginIndex];
                sum -= A[beginIndex];
                ++beginIndex;
            }

            result += endIndex - beginIndex + 1;
        }

        return result;
    }
}

Measured memory_bytes: 83492
#include "bits/stdc++.h"
using namespace std;
#define long int64_t

int main() {
	ios_base::sync_with_stdio( false );

	int N, M;
	cin >> N >> M;

	vector<bool> a( N+2 );
	for( int i = 0; i < M; ++i ) {
		int x;
		cin >> x;
		a[x] = true;
	}

	const long m = 1000000007;
	vector<long> dp( N+2 );
	dp[0] = 1;
	for( int i = 0; i < N; ++i ) {
		if( !a[i+1] ) { dp[i+1] = (dp[i+1] + dp[i]) % m; }
		if( !a[i+2] ) { dp[i+2] = (dp[i+2] + dp[i]) % m; }
	}

	cout << dp[N] << endl;

	return 0;
}


Measured memory_bytes: 1024