akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define fi first
#define se second
#define pb push_back
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rrep(i, s, n) for (int i = (n)-1; i >= (s); i--)
#define all(a) a.begin(),a.end()
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
const long long MOD = 1000000007, INF = 1e17;
 
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0)
 
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}

set<int>ng={'q','w','e','r','t','a','s','d','f','g','z','x','c','v','b'};

signed main()
{
	IOS();
	vector<int>ans;
	while(1){
		int N;
		cin>>N;
		if(N==0)break;
		int flg = 0,l = 0,r = 0,cnt = 0;
		while(N--){
			string s;
			cin>>s;
			if(s == "ld")l = 0;
			else if(s == "lu")l = 1;
			else if(s == "rd")r = 0;
			else r = 1;
			if(flg == 0 && l && r){
				cnt++;
				flg ^= 1;
			}else if(flg && l == 0 && r == 0){
				cnt++;
				flg ^= 1;
			}
		}
		ans.push_back(cnt);
	}
	for(auto e:ans){
		cout<<e<<endl;
	}
}



Measured memory_bytes: 3220
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    void run() {

        Scanner sc = new Scanner(System.in);

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

        // 0:<D, 1:D<=S, 2:S<=T, 3:T<=U, 4:U>
        long[][] dp = new long[l][5];
        dp[0][0] = A[0];
        dp[0][1] = add(1, A[0]);
        dp[0][2] = add(2, A[0]);
        dp[0][3] = add(3, A[0]);
        dp[0][4] = add(4, A[0]);
//        debug(dp[0]);

        for (int i = 1; i < l; i++) {
            dp[i][0] = dp[i - 1][0] + add(0, A[i]);
            dp[i][1] = min(dp[i - 1][0], dp[i - 1][1]) + add(1, A[i]);
            dp[i][2] = min(dp[i - 1][0], dp[i - 1][1], dp[i - 1][2]) + add(2, A[i]);
            dp[i][3] = min(dp[i - 1][0], dp[i - 1][1], dp[i - 1][2], dp[i - 1][3]) + add(3, A[i]);
            dp[i][4] = min(dp[i - 1][0], dp[i - 1][1], dp[i - 1][2], dp[i - 1][3], dp[i - 1][4]) + add(4, A[i]);
//            debug(dp[i]);
        }
        long ans = 1L << 50;
        for (int i = 0; i < 5; i++) {
            ans = Math.min(dp[l - 1][i], ans);
        }

        System.out.println(ans);
    }

    long min(long... vals) {
        return Arrays.stream(vals)
                .min()
                .getAsLong();
    }

    long add(int mode, int a) {
        switch (mode) {
            case 0:
            case 4:
                return a;
            case 1:
            case 3:
                if (a == 0) {
                    return 2;
                }
                return a % 2 == 0 ? 0 : 1;
            case 2:
                return a % 2 == 1 ? 0 : 1;
        }
        throw new RuntimeException("mode error");
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
}


Measured memory_bytes: 148416
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <numeric>
#include <queue>
//#include <bits/stdc++.h>

typedef long long ll;
const ll INF = (ll)1e18 + 1;
const ll MOD = 1e9 + 7;

// print(x, y, z);
// print(va.begin(), va.end());
void print(){ std::cout << std::endl; }
template <typename Head> void print(Head&& head) { std::cout << head << std::endl; }
template <typename Head, typename... Tail> void print(Head&& head, Tail&&... tail)
{
  std::cout << head << " ";
  print(std::forward<Tail>(tail)...); // or print(tail...);
}
template<typename Iterator> void printVec(Iterator begin, Iterator end)
{
  for (Iterator it = begin; it != end; it++) {
    std::cout << "[" << std::distance(begin, it) << "] " << *it << " ";
    if (std::distance(begin, it) % 20 == 19) { std::cout << std::endl; }
  }
  std::cout << std::endl;
}

template<typename T> T lminimum(const std::vector< T >& v) {return *std::min_element(v.begin(), v.end());}
template<typename T> T lmaximum(const std::vector< T >& v) {return *std::max_element(v.begin(), v.end());}
template<typename T> void lunique(std::vector< T >& v) {v.erase(std::unique(v.begin(), v.end()), v.end());}
template<typename T> void lsort(std::vector< T >& v) {std::sort(v.begin(), v.end());}
template<typename T> void lgreatersort(std::vector< T >& v) {std::sort(v.begin(), v.end(), std::greater<>());}
template<typename T> bool lnext_permutation(std::vector< T >& v) {return std::next_permutation(v.begin(), v.end());}

typedef enum {
  TYPE_UP      = 0,
  TYPE_DOWN    = 1,
  TYPE_UNKNOWN = 2,
} E_TYPE;

int main(int argc, char* argv[])
{
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);

  ll N;
  std::cin >> N;
  std::vector< ll > va(N, 0LL);
  for (ll i = 0; i < N; i++) {
    std::cin >> va[i];
  }

  ll ans = 1;
  ll pre = va[0];
  E_TYPE type = TYPE_UNKNOWN;
  for (ll i = 1; i < N; i++) {
    //print(i, type, va[i]);
    if (type == TYPE_UNKNOWN) {
      if (va[i] > pre)  {type = TYPE_UP;      pre = va[i]; continue; }
      if (va[i] < pre)  {type = TYPE_DOWN;    pre = va[i]; continue; }
      if (va[i] == pre) {type = TYPE_UNKNOWN; pre = va[i]; continue; }
    }
    if (type == TYPE_UP) {
      if (va[i] >= pre)  {type = TYPE_UP;             pre = va[i]; continue; }
      if (va[i] <  pre)  {type = TYPE_UNKNOWN; ans++; pre = va[i]; continue; }
    }
    if (type == TYPE_DOWN) {
      if (va[i] >  pre)  {type = TYPE_UNKNOWN; ans++; pre = va[i]; continue; }
      if (va[i] <= pre)  {type = TYPE_DOWN;           pre = va[i]; continue; }
    }
    
  }

  print(ans);
  return 0;
}


Measured memory_bytes: 1024
#include<stdio.h>
int main(void)
{
    int x,y,i,ii,ex[101][101],sum1,sum2,all=0;
    for(i=0;i<101;i++)
    {
        for(ii=0;ii<101;ii++)
        {
            ex[i][ii]=0;
        }
    }
    scanf("%d%d",&x,&y);
    for(i=0;i<x;i++)
    {
        for(ii=0;ii<y;ii++)
        {
            scanf("%d",&ex[i][ii]);
            all = all+ex[i][ii];
        }
    }
    for(i=0;i<x;i++)
    {
        sum1=0;
        for(ii=0;ii<y;ii++)
        {
            sum1 = sum1+ex[i][ii];
            printf("%d ",ex[i][ii]);
        }
        printf("%d\n",sum1);
    }
    for(i=0;i<y;i++)
    {
        sum2=0;
        for(ii=0;ii<x;ii++)
        {
            sum2 = sum2+ex[ii][i];
        }
        printf("%d ",sum2);
    }
    printf("%d\n",all);
    return 0;
}

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

int main() {
	int a, b;
	scanf("%d%d", &a, &b);
	
	int ans = 0;
	if(b==1) ans=0;
	else ans = (b-2)/(a-1)+1;
	printf("%d\n", ans);
	
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<map>
#include<set>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
#define int long long int
#define mod 1000000007
int fact[1000001];
void function2()
{
	fact[0]=1;
	int j;
	for(j=1;j<=1000000;j++)
	{
		fact[j]=(j*fact[j-1])%mod;
	}
}
int power(int a,int b)
{
	if(b==0)
	  return 1;
	else
	{
		int r=power(a,b/2);
		if(b%2==0)
		   return (r*r)%mod;
		else
		{
			int x=(r*r)%mod;
			return (a*x)%mod;
		}
	}
}
int ncr(int n,int r)
{
	int val=fact[n];
	val*=power(fact[r],mod-2);
	val%=mod;
	val*=power(fact[n-r],mod-2);
	val%=mod;
	return val;
}
int32_t main()
{
	function2();
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int x;
	cin>>x;
	if(x==0)
	  cout<<1<<endl;
	else
	  cout<<0<<endl;
}


Measured memory_bytes: 11456
#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
int main()
{
	ios::sync_with_stdio(0); cin.tie(0);
	mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

	// freopen("in", "r", stdin);
	int n; cin >> n;
	int cts[21][45]; memset(cts, 0, sizeof cts);
	ll ans = 0;
	for (int i = 0; i < n; ++i) {
		string s; cin >> s;
		bool flag = false;
		int ct = 0;
		for (int j = 0; j < (int)s.size(); ++j) {
			if (s[j] != '.' && !flag) continue;
			if (s[j] == '.') {flag = true; continue;}
			++ct;
		}
		if (!flag) s += '.';
		while (ct < 9) {
			++ct;
			s += '0';
		}
		ll num = 0;
		for (int j = 0; j < (int)s.size(); ++j) {
			if (s[j] == '.') continue;
			num = num*10 + s[j]-'0';
		}
		int ct2 = 0, ct5 = 0;
		while (num%2 == 0) {
			++ct2;
			num /= 2;
		}
		while (num%5 == 0) {
			++ct5;
			num /= 5;
		}
		for (int j = max(0, 18-ct5); j < 20; ++j)
			for (int k = max(0, 18-ct2); k < 44; ++k)
				ans += cts[j][k];
		++cts[ct5][ct2];
	}
	cout << ans << '\n';
}

Measured memory_bytes: 3608
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int>   II;
typedef vector< II >      VII;
typedef vector<int>     VI;
typedef vector< VI > 	VVI;
typedef long long int 	LL;
typedef vector<LL> 		VL;
typedef unsigned long long int ULL;

#define PB push_back
#define MP make_pair
#define F first
#define S second
#define SZ(a) (int)(a.size())
#define ALL(a) a.begin(),a.end()
#define SET(a,b) memset(a,b,sizeof(a))
#define LET(x,a) __typeof(a) x(a)

#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
//Works for forward as well as backward iteration

#define gu getchar
#define pu putchar
#define si(n) cin>>n
#define dout(n) cout<<n<<"\n"
//# define M_PI           3.14159265358979323846264338327950288

#define DRT() int t; si(t); while(t--)

#define PlUSWRAP(index,n) index = (index+1)%n		//index++; if(index>=n) index=0
#define MINUSWRAP(index,n) index = (index + n -1)%n 	//index--; if(index<0) index=n-1
#define ROUNDOFFINT(d) d = (int)((double)d + 0.5)	//Round off d to nearest integer

#define FLUSHN while(gu()!='\n')
#define FLUSHS while(gu()!=' ')

#define TRACE

#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif

#define off ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

// set_name.find_by_order(k) It returns to an iterator to the kth element (counting from zero) in the set in O(logn) time
// set_name.order_of_key(k) It returns to the number of items that are strictly smaller than our item k in O(logn) time.

int main() {
	#ifndef ONLINE_JUDGE
    freopen("../input.txt", "r", stdin);
    freopen("../output.txt", "w", stdout);
	#endif
	srand(chrono::steady_clock::now().time_since_epoch().count());
	off;
	int n;
	cin>>n;
	if(n == 22){
		cout<<"Christmas Eve Eve Eve";
	}
	else if(n == 23){
		cout<<"Christmas Eve Eve";
	}
	else if(n == 24){
		cout<<"Christmas Eve";
	}
	else{
		cout<<"Christmas";
	}

  	return 0;
}

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

using LL = long long;
const LL MOD = 1e9+7;

LL modpow(LL a, LL n) {
    LL ret = 1, tmp = a;
    while (n) {
        if (n & 1) (ret *= tmp) %= MOD;
        (tmp *= tmp) %= MOD;
        n >>= 1;
    }
    return ret;
}


// O(NloglogN)
vector<map<int,int>> prime_table(int N) {
    vector<map<int,int>> fact(N+1);
    vector<bool> sieve(N+1, true);
    for (int p = 2; p <= N; ++p) {
        if (!sieve[p]) continue;
        for (int i = 1; i * p <= N; ++i) {
            fact[i * p][p] = (fact[i].count(p) ? fact[i][p] : 0) + 1;
            sieve[i * p] = false;
        }
    }
    return fact;
}

// O(NloglogN)
vector<int> mobius_table(int N) {
    vector<int> mobius(N+1, 1);
    auto table = prime_table(N);
    for (int d = 2; d <= N; ++d) {
        for (auto& tp : table[d]) {
            if (tp.second > 1) {
                mobius[d] = 0;
                break;
            }
            mobius[d] *= -1;
        }
    }
    return mobius;
}

int main()
{
    int N, K; cin >> N >> K;

    vector<LL> f(K+1);
    for (int d = 1; d <= K; ++d) {
        f[d] = modpow(K / d, N);
    }

    auto mobius = mobius_table(K);

    LL ans = 0;
    for (int d = 1; d <= K; ++d) {
        LL sum = 0;
        for (int i = 1; i * d <= K; ++i) {
            (sum += mobius[i] * f[i * d]) %= MOD;
        }
        (ans += sum * d) %= MOD;
    }

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 21732
import sys
input = sys.stdin.readline
n,mod = map(int,input().split())
ab = [list(map(int,input().split())) for i in range(n-1)]
graph = [[] for i in range(n+1)]
deg = [0]*(n+1)
for a,b in ab:
  graph[a].append(b)
  graph[b].append(a)
  deg[a] += 1
  deg[b] += 1
root = 0
stack = []
dp = [[] for i in range(n+1)]
dpacc1 = [[] for i in range(n+1)]
dpacc2 = [[] for i in range(n+1)]
order = [[] for i in range(n+1)]
num = [0 for i in range(n+1)]
for i in range(1,n+1):
  if deg[i] == 1:
    stack.append(i)
    num[i] = 1
  elif not root:
    root = i
    deg[i] += 1
while stack:
  x = stack.pop()
  if dp[x]:
    num[x] = 1
    for z in dp[x]:
      num[x] *= z
      num[x] %= mod
  for y in graph[x]:
    if deg[y] > 1:
      deg[y] -= 1
      dp[y].append(num[x]+1)
      order[y].append(x)
      if deg[y] == 1:
        stack.append(y)
stack = [root]
deg[root] -= 1
while stack:
  x = stack.pop()
  l = len(order[x])
  if dp[x]:
    for v in dp[x]:
      if not dpacc1[x]:
        dpacc1[x].append(v)
      else:
        dpacc1[x].append(dpacc1[x][-1]*v%mod)
    for v in dp[x][::-1]:
      if not dpacc2[x]:
        dpacc2[x].append(v)
      else:
        dpacc2[x].append(dpacc2[x][-1]*v%mod)
  for i,y in enumerate(order[x]):
    if deg[y] == 1:
      deg[y] -= 1
      if i == 0:
        val = dpacc2[x][l-2]
      elif i == l-1:
        val = dpacc1[x][l-2]
      else:
        val = dpacc1[x][i-1]*dpacc2[x][l-i-2]%mod
      dp[y].append(val+1)
      order[y].append(x)
      stack.append(y)
for i in range(1,n+1):
  ans = 1
  for x in dp[i]:
    ans *= x
    ans %= mod
  print(ans)

Measured memory_bytes: 133340
#include <bits/stdc++.h>
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define rep(i,N) for(long long i = 0; i < (long long)(N); i++)
#define repr(i,N) for(long long i = (long long)(N) - 1; i >= 0; i--)
#define rep1(i,N) for(long long i = 1; i <= (long long)(N) ; i++)
#define repr1(i,N) for(long long i = (N) ; (long long)(i) > 0 ; i--)
#define each(x,v) for(auto& x : v)
#define all(v) (v).begin(),(v).end()
#define sz(v) ((int)(v).size())
#define ini(...) int __VA_ARGS__; in(__VA_ARGS__)
#define inl(...) long long __VA_ARGS__; in(__VA_ARGS__)
#define ins(...) string __VA_ARGS__; in(__VA_ARGS__)
using namespace std; void solve();
using ll = long long; template<class T = ll> using V = vector<T>;
using vi = V<int>; using vl = V<>; using vvi = V< V<int> >;
constexpr int inf = 1001001001; constexpr ll infLL = (1LL << 61) - 1;
struct IoSetupNya {IoSetupNya() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); cerr << fixed << setprecision(7);} } iosetupnya;
template<typename T, typename U> inline bool amin(T &x, U y) { return (y < x) ? (x = y, true) : false; }
template<typename T, typename U> inline bool amax(T &x, U y) { return (x < y) ? (x = y, true) : false; }
template<typename T, typename U> ostream& operator <<(ostream& os, const pair<T, U> &p) { os << p.first << " " << p.second; return os; }
template<typename T, typename U> istream& operator >>(istream& is, pair<T, U> &p) { is >> p.first >> p.second; return is; }
template<typename T> ostream& operator <<(ostream& os, const vector<T> &v) { int s = (int)v.size(); rep(i,s) os << (i ? " " : "") << v[i]; return os; }
template<typename T> istream& operator >>(istream& is, vector<T> &v) { for(auto &x : v) is >> x; return is; }
void in(){} template <typename T,class... U> void in(T &t,U &...u){ cin >> t; in(u...);}
void out(){cout << "\n";} template <typename T,class... U> void out(const T &t,const U &...u){ cout << t; if(sizeof...(u)) cout << " "; out(u...);}
template<typename T>void die(T x){out(x); exit(0);}
#ifdef NyaanDebug
  #include "NyaanDebug.h"
  #define trc(...) do { cerr << #__VA_ARGS__ << " = "; dbg_out(__VA_ARGS__);} while(0)
  #define trca(v,N) do { cerr << #v << " = "; array_out(v , N);cout << endl;} while(0)
#else
  #define trc(...)
  #define trca(...)
  int main(){solve();}
#endif

using P = pair<int,int>; using vp = V<P>;
constexpr int MOD = /**/ 1000000007; //*/ 998244353;
//////////

void solve(){
  char c; in(c); out(char(c + 1) );
}

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

// clang-format off
template <typename T> T gcd(T a, T b) { return b == 0 ? a : gcd(b, a % b); }
template <typename T> T lcm(T a, T b) { return a * b / gcd(a, b); }
template <typename T> T clamp(T val, T min, T max) { return val < min ? min : (max < val ? max : val); }
char capitalize(char c) { return static_cast<char>(std::toupper(static_cast<unsigned char>(c))); }
// template <typename T> size_t max_index(T begin, T end) { return distance(begin, max_element(begin, end)); }
// template <typename T> size_t min_index(T begin, T end) { return distance(begin, min_element(begin, end)); }
// clang-format on

#define int long long
#define YES "YES"
#define NO "NO"
#define MOD 1000000000 + 7
#define forit(v) for (auto it = v.begin(); it != v.end(); ++it)

using namespace std;

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

  int num = 0;
  // num = numeric_limits<int>::max();
  // num = numeric_limits<int>::min();
  bool flag = false;
  // flag = true;

  int n, k; cin >> n >> k;
  string s; cin >> s;

  s[k - 1] -= 'A' - 'a';

  cout << s << endl;
  
  // cout << num << endl;
  // cout << (flag ? YES : NO) << endl;

  return 0;
}


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

// mod must be a prime number
struct Mod(uint mod) if (mod < int.max) {
	import std.conv : to;
	
	uint n;
	this(int m)  { this(long(m)); }
	this(long m) { this.n = m >= 0L ? cast(uint)(m % mod) : cast(uint)(m % mod + mod); }
	this(ulong m) { this.n = cast(uint)(m % mod); }
	
	static auto normalize_(uint x) { return (x>=mod)? x-mod : x; }
	static auto make_(uint x) { Mod!mod m; m.n = x; return m; }
	
	auto opBinary(string op:"+")(Mod b)  const { return make_(normalize_(n+b.n)); }
	auto opBinary(string op:"-")(Mod b)  const { return make_(normalize_(n+mod-b.n)); }
	auto opBinary(string op:"*")(Mod b)  const { return make_( ((ulong(n)*b.n) % mod).to!uint ); }
	auto opBinary(string op:"^^")(Mod b) const {
		//return make_( ( n ^^ ( b.n % (mod-1) ) % mod ).to!uint );
		auto accumulater = make_(this.n), result = make_(1);
		ulong order = b.n % (mod-1), pwr2 = 1;
		foreach (i; 0 .. 33) {
			if (pwr2 > order) break;
			if ((order & pwr2) != 0) result *= accumulater;
			accumulater *= accumulater, pwr2 *= 2;
		}
		return result;
	}
	static Mod inv(Mod x) { return x^^(mod-2); }
	auto opBinary(string op:"/")(Mod b)  const { return this*inv(b); }
	auto opUnary(string op: "-")() const { return make_(normalize_(mod-this.n )); }
	auto opOpAssign(string op)(Mod b) if (op == "+" || op == "-" || op == "*" || op == "/" || op == "^^") { return mixin("this=this"~op~"b"); }
	
	auto opBinary(string op)(long b) const if (op == "+" || op == "-" || op == "*" || op == "/" || op == "^^") {
		auto m = Mod!mod(b); return mixin("this"~op~"m");
	}
	auto opUnary(string op)(long b) const if (op == "-") {
		auto m = Mod!mod(b); return mixin(op~"m");
	}
	auto opOpAssign(string op)(long b) if (op == "+" || op == "-" || op == "*" || op == "/" || op == "^^") {
		auto m = Mod!mod(b); return mixin("this"~op~"=m");
	}
	
	auto opAssign(ulong b) { n = cast(uint)(b%mod); return this; }
	auto opAssign(long b)  { n = (b < 0) ? cast(uint)(b%mod + mod) : cast(uint)(b%mod); return this; }
	auto opAssign(int b)   { return opAssign(long(b)); }
	
	
	string toString() const { return n.to!string; }
}

alias Int = Mod!(10^^9+7);

Int comb(ulong n, ulong k) {
	//writeln("(",n, ", ", k, ")");
	if (k == 0 || n == k) return Int(1);
	k = k < n-k ? k : n-k;
	auto result = Int(1);
	foreach (i; n-k+1 .. n+1) { result *= i; }
	foreach (i; 2 .. k+1) { result /= i; }
	return result;
}

void main() {
	auto data = readln.split.to!(int[]);
	auto N = data[0];
	auto S = readln.split[0];
	
	Int ans = 1;
	
	foreach (c; 'a' .. 'z'+1) {
		ans *= (S.count(c) +1);
	}
	(ans-1).writeln;
}



Measured memory_bytes: 508
#include<iostream>
#include<iomanip>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<map>
#include<limits>
#include<bitset>
#include<numeric>
#include<unordered_map>
#include<functional>
using namespace std;

#define rep(i,s,n) for(int i=s;i<n;i++)
#define dow(i,n,s) for(int i=n-1;i>=s;i--)
#define all(a) a.begin(),a.end()
#define Sort(a) sort(all(a))
//#define rng(a,b,e) a.begin()+b,a.begin()+e
#define Qsort(a,size) qsort(a,size,sizeof(*a),compare_int)
#define DEBUG
typedef pair<int,int> II;
typedef pair<double,double> DD;
typedef pair<int,string> IS;
typedef unsigned long ul;
typedef long long ll;
typedef unsigned long long ull;

const int INF = 1e+9;
const int MAX_N = 2e+5;
const int MAX_M = 1e+5;

int n,m; //n ... レーン数，m ... ロボット数
II line[MAX_N];
vector<II> robot;

//void solve();
bool compare_by_second(II a,II b) {
  if(a.second != b.second) return a.second<b.second;
  else return a.first<b.first;
}
bool compare_int(const void *a,const void *b) { return *(int *)a - *(int *)b; }

int main() {

  cin>>n>>m;
  rep(i,0,n) line[i].first = line[i].second = i;
  robot.resize(m);
  rep(i,0,m) cin>>robot[i].first>>robot[i].second;
  sort(all(robot));
  rep(i,0,m) {
    //robot[i].secondについて
    line[robot[i].second-1].second = line[robot[i].second-1].second < line[robot[i].second].second ? line[robot[i].second].second : line[robot[i].second-1].second;
    //robot[i].second+1について
    line[robot[i].second].first = line[robot[i].second-1].first < line[robot[i].second].first ? line[robot[i].second-1].first : line[robot[i].second].first;
  }

  cout<<(line[0].second - line[0].first+1);
  rep(i,1,n) cout<<" "<<(line[i].second - line[i].first+1);
  cout<<endl;
  return 0;
}



Measured memory_bytes: 5124
#include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n));
#define Vec(a,n) vector<string> (a)((n));
#define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0));
#define Twovec(a,n,m) vector<vector<double>> a(n,vector<double>(m,0));
#define P pair<int,int>
#define All(a) (a).begin(),(a).end()
#define Sort(a) sort(All(a));
#define Reverse(a) reverse(All(a));
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n) priority_queue<int> (n)
#define print(a) cout << (a) << endl;
#define printD(a) cout << setprecision(15) << (a) << endl;
using namespace std;
int max_int = 1000000007;
void Debug(auto a);
int nibul(auto a,auto b);
int nibuu(auto a,auto b);
void input(vector<int>& a,int n);

int n;


signed main(){
    vector<int> alp(26);
    string s;
    while(getline(cin,s)){
        REP(i,s.size()){
            int t = s[i] - 'a';
            int x = s[i] - 'A';
            if(t>=0 && t<26){
                alp[t]++;
            }
            if(x>=0 && x<26){
                alp[x]++;
            }
        }

    }
    REP(i,26){
        char t = i + 'a';
        cout << t << " : " << alp[i] << endl;
    }

    return 0;
}

void Debug(auto a){
    cout << "{ ";
    for(auto b: a){
        cout << b << " ";
    }
    cout << "}" << endl;
}
int nibul(auto a,auto b){
    int x = lower_bound(All(a),b) - a.begin();
    //key以上の初めてのitr
    return x;
}
int nibuu(auto a,auto b){
    int x = upper_bound(All(a),b) - a.begin();
    //key以下の最後のitr
    return x-1;
}

void input(vector<int>& a,int n){
    REP(i,n){
        cin >> a[i];
    }
}




Measured memory_bytes: 3136
#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
using boost::multiprecision::cpp_int;

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;

const ll INF = LLONG_MAX;
const ll MOD = 1e9+7;

int main() {
    // input, ready
    int N,M;
    cin >> N >> M;

    bool ac[N+1];
    memset(ac,0,sizeof(ac));
    map<int, int> wa;

    // resolve
    for (int i=0; i<M; i++) {
        int p;
        string S;
        cin >> p >> S;
        if (S == "AC") ac[p] = true;
        else {
            if (!ac[p]) wa[p]++;
        }
    }

    // output
    int total_ac = 0;
    int total_wa = 0;
    for (int i=1; i<=N; i++) {
        if (ac[i]) {
            total_ac++;
            total_wa += wa[i];
        }
    }
    cout << total_ac << " " << total_wa << endl;

    return 0;
}


Measured memory_bytes: 4992
#include <iostream>
#include <queue>
#include <algorithm>
using namespace std;
#define ll long long
#define all(V) V.begin(), V.end()

vector<int> rea(100000, 0);

int main() {
	int K, a, b, c;
	cin >> K;
	rea[1] = 1;
	queue<int> Q;
	Q.push(1);
	while (!Q.empty()) {
		a = Q.front();
		Q.pop();

		b = (a * 10) % K;
		if (rea[b] == 0 || rea[b] > rea[a]) {
			rea[b] = rea[a];
			Q.push(b);
		}
		if (a % 10 != 9) {
			c = (a + 1) % K;
			if (rea[c] == 0 || rea[c] > rea[a] + 1) {
				rea[c] = rea[a] + 1;
				Q.push(c);
			}
		}
	}
	cout << rea[0] << endl;
}

Measured memory_bytes: 768
from sys import stdin
input = stdin.readline


## 木構造edgesを与えた時、あるノードKから各ノードまでの距離を出力する
# 入力: edges=[(a0,b0,c0),(a1,b1,c1),...], N=len(edges)
# 出力: dist, dist[i]はノードiからノードKまでの距離
def BFS(K,edges,N): 
  roots=[ [] for i in range(N)]
  for a,b,c in edges:
    roots[a-1]+=[(b-1,c)]
    roots[b-1]+=[(a-1,c)]
  dist=[-1]*N
  stack=[]
  stack.append(K)
  dist[K]=0
  while stack:
    label=stack.pop(-1)
    for i,c in roots[label]:
      if dist[i]==-1:
        dist[i]=dist[label]+c
        stack+=[i]
  return dist
 

edges=[]
N = int(input())
for i in range(N-1):
  edges += [list(map(int,input().split()))]
distance = BFS(0,edges,N)
for i in range(N):
  print(distance[i] % 2)




Measured memory_bytes: 61600
n,m=map(int,input().split())
l=[list(map(int,input().split())) for i in range(n)]
from itertools import product as pr
ans=0
for i in pr((-1,1),repeat=3):
    li=sorted(l,key=lambda xf:sum(x*y for x,y in zip(i,xf)),reverse=1)[:m]
    ans=max(ans,sum(abs(sum(j)) for j in zip(*li)))
print(ans)

Measured memory_bytes: 3412
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<time.h>
#define rep(i,n)for(ll i=0;i<n;i++)
#define ll long long
using namespace std;
int a[13]; int n, ans = 0;
signed main() {
	cin >> n;
	rep(i, n)cin >> a[i];
	sort(a, a + n);
	rep(i, n - 1)ans += a[i];
	if (a[n - 1] < ans)puts("Yes");
	else puts("No");
	getchar(); getchar(); return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
int n;
int q;
int a[20];
int m[200];
int S[20];
void rec(int i);
void combination(){
  int i;
  for(i=0;i<n;i++)S[i]=0;
  rec(0);
}
void rec(int i){
  int j;
  if(i==n){
    for(j=0;j<n;j++)printf("%d ",S[i]);
    printf("\n");
    return ;
  }
  rec(i+1);
  S[i]=1;
  rec(i+1);
  S[i]=0;
}
int solve(int i,int m){
  int res;
  if(m==0)return 1;
  if(i>=n)return 0;
  res=solve(i+1,m)||solve(i+1,m-a[i]);
  return res;
}
int main(){
  int i,j;
  int ans=0;
  scanf("%d",&n);
  
  for(i=0;i<n;i++)scanf("%d",&a[i]);
  scanf("%d",&q);
  for(i=0;i<q;i++)scanf("%d",&m[i]);
  for(i=0;i<q;i++){
    if(solve(0,m[i]))printf("yes\n");
    else printf("no\n");
  }
  
  return 0;
}

Measured memory_bytes: 580
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <complex>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef deque<ll> dqll;

int main() {
  ll N, M, S, T;

  cin >> N >> M;

  vector<vll> to(N);

  vector<vll> cost(3, vll(N, -1));

  for (int i = 0; i < M; i++) {
    ll v, u;
    cin >> v >> u;
    v--;
    u--;
    to[v].push_back(u);
  }
  cin >> S >> T;
  S--;
  T--;

  queue<P> que;

  que.push(P(S, 0LL));
  cost[0][S] = 0LL;

  while (!que.empty()) {
    ll v = que.front().first;
    ll c = que.front().second;
    que.pop();
    for (ll u : to[v]) {
      ll nc = (c+1)%3;
      if (cost[nc][u] != -1) continue;
      cost[nc][u] = cost[c][v] + 1;
      que.push(P(u, nc));
    }  // for u
  }  // while
  ll ans = cost[0][T];
  if (cost[0][T] != -1) ans /= 3;
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 8048
#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
#define MOD 1000000007
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;
}

//全点対最短路問題
#define MAX_V 400
long long d[MAX_V][MAX_V];
long long V;
void warshall_floyd() {
    for(int k = 0; k < V; k++) {
        for(int i = 0; i < V; i++) {
            for(int j = 0; j < V; j++) {
                d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
            }
        }
    }
}

int main() {
    long long N, M, R;
    cin >> N >> M >> R;
    V = N;
    vector<long long> r(R);
    REP(i, R) {
        cin >> r[i];
        r[i]--;
    }
    REP(i, N) {
        REP(j, N) {
            if(i != j) {
                d[i][j] = INF;
            } else {
                d[i][j] = 0;
            }
        }
    }
    REP(I, M) {
        long long a, b, c;
        cin >> a >> b >> c;
        a--;
        b--;
        d[a][b] = c;
        d[b][a] = c;
    }
    warshall_floyd();
    // minmax
    long long res = INF;
    sort(ALL(r));
    do {
        long long tmp = 0;
        REP(i, R - 1) { tmp += d[r[i]][r[i + 1]]; }
        res = min(res, tmp);
    } while(next_permutation(r.begin(), r.end()));
    cout << res << endl;
    return 0;
}

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

using namespace std;

typedef long long          ll;
typedef unsigned long long ull;
typedef vector<int>	       vi;
typedef vector<bool>       vb;
typedef map<int, int>      mii;
typedef pair<int, int>     ii;

#define INF                0x3f3f3f3f
#define INFLL              0x3f3f3f3f3f3f3f3f
#define each(x, s)         for(auto& x : s)
#define loop(x)	           for(int i = 0;i < x;i++)
#define vloop(v, x)        for(int v = 0;v < x;v++)
#define avg(l, r)          l + (r - l) / 2
#define iter(a)            a.begin(), a.end()
#define riter(a)           a.rbegin(), a.rend()
#define endl               "\n"

const ll mod = 1000000007;

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

	int n, k;
	cin >> n >> k;
	vector<vi> a(50, vi(n, 0));
	loop(n) cin >> a[0][i];
	vector<vector<ii>> sl(50);
	loop(n) {
		sl[0].emplace_back(max(0, i - a[0][i]), 0);
		sl[0].emplace_back(min(n - 1, i + a[0][i]), 1);
	}
	int st = 0, t = 1;
	for (;st < n and t <= k;t++) {
		sort(iter(sl[t - 1]));
		st = 0;
		int x = 0;
		int id = 0;
		loop(n) {
			for (;id < n + n and (sl[t - 1][id].first < i or (sl[t - 1][id].first == i and !sl[t - 1][id].second));id++) {
				x += sl[t - 1][id].second ? -1 : 1;
			}
			a[t + 1][i] = x;
			if (a[t + 1][i] == n) st++;
			sl[t].emplace_back(max(0, i - a[t + 1][i]), 0);
			sl[t].emplace_back(min(n - 1, i + a[t + 1][i]), 1);
		}
	}
	each(x, a[t]) cout << x << " ";
	cout << endl;
	return 0;
}



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

template
<
    typename TYPE,
    std::size_t SIZE
>
std::size_t a_len(const TYPE (&array)[SIZE])
{
    return SIZE;
}

using namespace std;
using ll = long long int;

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



int main()
{
    int a,b;
    cin >> a >> b;
    if(a*b%2){
        cout << "Odd" << endl;
    }
    else{
        cout << "Even" << endl;
    }
}

Measured memory_bytes: 256
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
B = inintl()

A = [B[0]]

for i in range(1,n-1):
    A.append(min(B[i], B[i-1]))

A.append(B[-1])

print(sum(A))


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

int main() {
	int N;
	cin >> N;
	int a, b, c, d;
	a= N/ 1000;//1000の位
	b = (N% 1000) / 100;//100の位
	c = (N % 100) / 10;//10の位
	d = N % 10;//1の位
	if ((a == b && b == c) || (b == c && c == d)) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}

Measured memory_bytes: 256
package main

import (
	"bufio"
	"fmt"
	"io"
	"log"
	"math"
	"os"
	"strconv"
)

var v = 100000

func main() {
	n, w := readInt(), readInt()

	dp := make([]int, v+1)
	for i := range dp {
		dp[i] = math.MaxInt64
	}
	dp[0] = 0

	for i := 0; i < n; i++ {
		ww, vv := readInt(), readInt()
		for j := v - vv; j >= 0; j-- {
			if dp[j]+ww > w || dp[j] == math.MaxInt64 {
				continue
			}
			dp[j+vv] = min(dp[j+vv], dp[j]+ww)
		}
	}

	ans := 0
	for i := range dp {
		if dp[i] == math.MaxInt64 {
			continue
		}
		ans = i
	}

	fmt.Println(ans)
}

// sort ------------------------------------------------------------

type xxx struct {
	x int
}

type sortArray []xxx

func (s sortArray) Len() int           { return len(s) }
func (s sortArray) Swap(i, j int)      { s[i], s[j] = s[j], s[i] }
func (s sortArray) Less(i, j int) bool { return s[i].x < s[j].x }

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

var (
	readString func() string
	readBytes  func() []byte
)

func init() {
	log.SetFlags(log.Lshortfile)
	readString, readBytes = newReadString(os.Stdin)
}

func newReadString(ior io.Reader) (func() string, func() []byte) {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	f1 := func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
	f2 := func() []byte {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Bytes()
	}
	return f1, f2
}

func readInt() int {
	return int(readInt64())
}

func readInt64() int64 {
	i, err := strconv.ParseInt(readString(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(readString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func sum(a []int) int {
	var ret int
	for i := range a {
		ret += a[i]
	}
	return ret
}

func sumFloat64(a []float64) float64 {
	var ret float64
	for i := range a {
		ret += a[i]
	}
	return ret
}

func gcd(m, n int) int {
	for m%n != 0 {
		m, n = n, m%n
	}
	return n
}

func lcm(m, n int) int {
	return m / gcd(m, n) * n
}


Measured memory_bytes: 1408
#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int ma=1e7;
  vector<bool>sosu(ma,1);
  sosu[0]=sosu[1]=0;
  for(int i=4;i<ma;i+=2)sosu[i]=0;
  for(int i=3;i<ma;i+=2)
    for(int j=i*3;j<ma;j+=i*2)sosu[j]=0;
  int in;
  while(cin>>in){
    int co=0;
    loop(i,2,in+1)if(sosu[i])co++;
    cout<<co<<endl;
  }
}

Measured memory_bytes: 2328
#include <stdio.h>
int main(void)
{
    int n,a,b;
    scanf("%d %d %d",&n,&a,&b);
    int ans=0;
    for(int p=1;p<=n;p++)
    {
        int man=p/10000;
        int sen=(p/1000)%10;
        int hyaku=(p/100)%10;
        int ju=(p/10)%10;
        int iti=p%10;
        int sum=man+sen+hyaku+ju+iti;
        if(sum>=a&&sum<=b)ans+=p;
    }
    printf("%d",ans);
}


Measured memory_bytes: 128
# list(input())
# list(map(int, input().split()))
# int(input())
A, B = list(map(int, input().split()))
nums = []
for i in range(1, 10000):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        nums.append(i)
if len(nums) == 0:
    print(-1)
else:
    print(min(nums))
    


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

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  if (a * c <= b) {
    cout << c;
    return 0;
  } else {
    cout << b / a;
    return 0;
  }
  return 0;
}


Measured memory_bytes: 256
s = list(input())
s.reverse()
n = len(s)
l = []
for i in range(n):
    s[i] = int(s[i])
for i in range(1,n):
    l.append(i)
bit = []
for i in range(2**(n-1)):
    b = []
    for j in range(n-1):
        if ((i >> j)& 1):
            b.append(l[j])
    bit.append(b)
ans = 0
for i in range(2**(n-1)):
    count = 0
    x = 0
    for j in bit[i]:
        c = 1
        while x < j:
            count += s[x]*c
            x += 1
            c = c * 10
    c = 1
    while x < n:
        count += s[x]*c
        x += 1
        c = c * 10
    #print(count)
    ans += count
print(ans)

Measured memory_bytes: 3064
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,int> P;

vector<vector<P>> to;

const int MAX_N = 101000;
const ll INF = 1LL << 50;

ll dist[MAX_N];

void Dijkstra(int v){
  //vが始点
  dist[v] = 0;
  priority_queue<P,vector<P>,greater<P>> Q;
  // {距離、ノード}の組みを保持
  Q.push({0,v});

  while(!Q.empty()){
    P p = Q.top();  Q.pop();
    ll load = p.first; int pos = p.second;
    
    for(auto next : to[pos]){ 
      int u = next.first; ll cost = next.second;
      if(dist[u] <= load+cost){ continue;} 
      else{ dist[u] = load+cost;
           
           Q.push({dist[u],u});
          }
    } // for-とじ
  }// whileとじ
  
  return ;
}
    

int main(){ 
  int N,M; cin >> N >> M;
  to.resize(N);
  
  for(int i = 0; i < N; i++){ dist[i] = INF;}
  
  for(int i = 0; i < M; i++){
    int L,R; ll C; cin >> L >> R >> C; L--; R--;
    to[L].push_back({R,C});
  }
  
  for(int i = 0; i < N-1; i++){
    to[i+1].push_back({i,0});
  }
  
  //隣接リストto上で、0からN-1まで動くのにかかる時間を見つける
  
  Dijkstra(0);
  
  ll res = dist[N-1];
  if( res == INF){ res = -1;}
  
  cout << res << endl;
  
  return 0;
}

Measured memory_bytes: 9340
"""
コッホ曲線を構成する
numpyは使えないっぽい
"""
import math

class Point: 
    #こうすると見やすくなるっぽいけどそうするんだったらPoint(,)の形で全部書いていくと良い
    def __init__(self, x, y):
        self.x = x
        self.y = y


def outPut(point):
    print("%.8f %.8f"%(point.x, point.y))

def calc(depth, left, right):
    dif_x = right.x-left.x
    dif_y = right.y-left.y

    nleft_x = left.x+dif_x/3
    nleft_y = left.y+dif_y/3

    nright_x = right.x-dif_x/3
    nright_y = right.y-dif_y/3

    #dif/3を回転させる
    top_x = (dif_x*math.cos(math.pi/3)-dif_y*math.sin(math.pi/3))/3+nleft_x
    top_y = (dif_x*math.sin(math.pi/3)+dif_y*math.cos(math.pi/3))/3+nleft_y

    new_left = Point(nleft_x, nleft_y)
    new_right = Point(nright_x, nright_y)
    tmp_top = Point(top_x, top_y)

    if depth > 1:
        calc(depth-1, left, new_left)
        calc(depth-1, new_left, tmp_top)
        calc(depth-1, tmp_top, new_right)
        calc(depth-1, new_right, right)
    else: #depth==1が停止条件
        outPut(left)
        outPut(new_left)
        outPut(tmp_top)
        outPut(new_right) #rightは抜いてある

n = int(input())
start = Point(0, 0)
end = Point(100, 0)

if n == 0:
    outPut(start)
    outPut(end)
else:
    calc(n, start, end)
    outPut(end)

    
                        





Measured memory_bytes: 5768
#include<bits/stdc++.h>
using namespace std;
int main()
{   
    char z[1000];gets(z);int a=0,b=0;
    for(int i=0;i<strlen(z);i++){
    	if(z[i]=='C')a=1;
    	if(a&&z[i]=='F')b=1;
	}
	if(b)printf("Yes");
	else printf("No");
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
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;
	}
	return 0;
}

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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define pii pair<int,int>
#define all(x) begin(x), end(x)
#define loop(i,n) for(int i=0; i<n; i++)
#define rep(i,a,b,c) for(int i=a; i<b; i+=c)
#define brep(i,a,b,c) for(int i=a; i>b; i-=c)
#define tc(t) int t; cin>>t; while(t--)
#define sz(v) int((v).size())
#define pb push_back


using namespace std;

void __print(int x) {cout << x;}
void __print(long x) {cout << x;}
void __print(long long x) {std::cout << x;}
void __print(unsigned x) {std::cout << x;}
void __print(unsigned long x) {std::cout << x;}
void __print(unsigned long long x) {std::cout << x;}
void __print(float x) {std::cout << x;}
void __print(double x) {std::cout << x;}
void __print(long double x) {std::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...);}
template <typename T> inline void inp(T &any) {cin >> any;} template <typename T, typename... U>inline void inp(T &a, U &...b) {cin >> a; inp(b...);}
#define rin(args...) ll args; inp(args);
#ifndef ONLINE_JUDGE
#define debug(x...) cout << "[" << #x << "] = ["; _print(x)
#define matdeb(mat,row,col) cout << #mat << "::" << endl; printmat(mat,row,col); printpartition;
#define debugv(v,n) cout << #v << ":" << endl; printv(v,0,n-1); printpartition;
#else
#define debug(x...)
#define matdeb(mat,row,col)
#define debugv(v,n)
#endif

const int maxm = 1000000000 + 7;

double startTime;
double getCurrentTime() {
	return ((double)clock() - startTime) / CLOCKS_PER_SEC;
}


//----------->CODE BEGINS --------------->


int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string s;
	cin>>s;

	set<char>my_set;

	loop(i,s.length())
	{
		my_set.insert(s[i]);
	}

	if(my_set.size() == s.length())
	{
		cout<<"yes";
	}

	else
	{
		cout<<"no";
	}


}


Measured memory_bytes: 3604
#include <bits/stdc++.h>
#define fi first
#define se second

typedef long long ll;
typedef std::pair < int, int > pr;
const int N = 2005;

using std::cin;
using std::cout;

inline void up(int &x, int y) { x < y ? x = y : 0; }
inline void down(int &x, int y) { x > y ? x = y : 0; }

int n, m, x[N][N], a[N][N], ans, l[N][N], r[N][N], u[N][N];
std::string str;
inline void calc(int n, int m) {
    for (int i = 1; i <= n; ++i)
        for (int j = 1; j <= m; ++j) r[i][j] = l[i][j] = j, u[i][j] = 1;
    for (int i = 1; i <= n; ++i)
        for (int j = 2; j <= m; ++j) {
            if (x[i][j] == 1) continue;
            if (! x[i][j - 1]) l[i][j] = l[i][j - 1];
        }
    for (int i = 1; i <= n; ++i)
        for (int j = m - 1; j; --j) {
            if (x[i][j]) continue;
            if (! x[i][j + 1]) r[i][j] = r[i][j + 1];
        }
    for (int i = 1; i <= m; ++i) up(ans, 2 * (r[1][i] - l[1][i] + 2));
    for (int i = 2; i <= n; ++i) {
        for (int j = 1; j <= m; ++j) {
            if (x[i][j]) continue;
            if (! x[i - 1][j]) {
                up(l[i][j], l[i - 1][j]);
                down(r[i][j], r[i - 1][j]);
                u[i][j] = u[i - 1][j] + 1;
                up(ans, (u[i][j] + 1) * (r[i][j] - l[i][j] + 2));
            }
            
        }
    }
}
int main() {
    cin >> n >> m;
    for (int i = 1; i <= n; ++i) {
        cin >> str;
        for (int j = 0; j < m; ++j) if (str[j] == '#') a[i][j + 1] = 1;
    } 
    for (int i = 1; i < n; ++i)
        for (int j = 1; j < m; ++j) x[i][j] = a[i][j] ^ a[i + 1][j] ^ a[i][j + 1] ^ a[i + 1][j + 1];
    ans = std::max(n, m);
    calc(n - 1, m - 1);
    cout << ans << '\n';
    return 0;
}


Measured memory_bytes: 81912
#include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

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

struct UnionFind {
	vector<int> v;
	UnionFind(int n) : v(n)  { for (int i = 0; i < n; i++) v[i] = i; }
	int  find(int x)         { return v[x] == x ? x : v[x] = find(v[x]); }
	void unite(int x, int y) { v[find(x)] = find(y); }
};
bool saiki(string s) {
	bool ret = false;
	if (s == "ABC") {
		return true;
	}
	string c[] = { "A","B","C" };
	REP(i, 3) {
		bool check = true;
		string s2=s;
		size_t idx = 0;
		size_t fi = s2.find("ABC", idx);
		while (fi!=string::npos) {
			if (s2.substr(idx, (size_t)(fi - idx)).find(c[i].c_str()) != string::npos) {
				check = false;
				break;
			}
			s2.replace(fi, 3, c[i]);
			idx=fi+1;
			fi = s2.find("ABC", idx);
		}
		if (s2.substr(idx, (size_t)(s2.length() - idx)).find(c[i].c_str()) != string::npos) {
			check = false;
		}
		if (check&&s2.length() < s.length()) {
			//cout << s2 << endl;
			ret |= saiki(s2);
		}
		
	}
	return ret;
}

int main() {
	string s;
	cin >> s;
	cout<<((saiki(s))?"Yes":"No")<<endl;
}

Measured memory_bytes: 9988
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define fi first
#define se second
#define bigger (char)toupper
#define smaller (char)tolower
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<char> vc;
typedef long long ll;
typedef unsigned long long ull;

int main() {
    int N, M;
    cin >> N >> M;
    vi broken(N+1);
    rep(i, M) {
        int a;
        cin >> a;
        broken[a]=1;
    }
    const int mod = 1000000007;
    vi dp(N+2);
    dp[N] = 1;
    for(int i = N-1; i >= 0; i--) {
        if(broken[i]) {
            dp[i] = 0;
            continue;
        }
        dp[i] = (dp[i+1] + dp[i+2]) % mod;
    }
    cout << dp[0] <<endl;
}

Measured memory_bytes: 1024