akhauriyash/Code-Regression huggingface dataset:
/* HARDWORK IS THE KEY TO SUCCESS.
   RATING IS TEMPORARY , KNOWLEDGE IS PERMANENT.!!!*/

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define T ll t = 1; cin>>t; while(t--)
#define ain ll n,k,i; cin>>n; ll a[n]; for(i=0; i<n; i++) cin>>a[i]
#define matin ll m,n; cin >> n >> m; ll a[n + 1][m + 1]; for(ll i=1;i<=n;i++) for(ll j=1;j<=m;j++) cin>>a[i][j];
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define I insert
#define pb push_back

const ll maxs = 5e5+3;
const ll maxs1 = 1e3+4;
const ll mod = 1e9 + 7;
inline ll add(ll a, ll b) { return (mod + a + b) % mod;}
inline ll sub(ll a, ll b) {return (a - b + mod) % mod;}
inline ll mul(ll a, ll b) {return (1ll * a * b) % mod;}
ll fastpow(ll x, ll y) {
    ll res = 1; x = x % mod; while (y > 0) { if(y & 1) res = (res * x) % mod; y = y >> 1;x = (x * x) % mod;}return res;}
ll inv(ll x) {
    return fastpow(x, mod - 2);
}


 int main()
    {
        ios_base::sync_with_stdio(0);
        cin.tie(0);
        cout.tie(0);
       ll n;
     cin >> n;
     n = n % 10;
     if(n == 2 || n == 4 || n == 5 || n == 7 || n == 9)// ||)
         cout << "hon";
     else if(n == 0 || n == 1 || n == 6 || n == 8)// || n == 9)
         cout << "pon";
     else
         cout << "bon";
    }

Measured memory_bytes: 3640
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
*/public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
static class TaskD   {
public void solve(int testNumber, Scanner in, PrintWriter out) {
        long N = in.nextLong();
        int M = in.nextInt();
        int edge[][] = new int[M][2];
        long a[] = new long[M+1];

        for (int i=0; i<=M-1; i++) {
            edge[M-1-i][0] = in.nextInt();
            edge[M-1-i][1] = in.nextInt();
        }

        UnionFind u = new UnionFind((int)N);
        long ans = (N*(N-1))/2;
        a[0] = ans;

        for (int i=0; i<=M-1; i++) {
            int id1 = edge[i][0]-1;
            int id2 = edge[i][1]-1;
            if(!u.same(id1, id2)){
                ans -= u.size(id1) * u.size(id2);
                u.union(id1, id2);
            }
            a[i+1] = ans;
        }

        for (int i=0; i<=M-1; i++) {
            out.println(a[M-1-i]);
        }
    }

}
static class UnionFind   {
public   static int[] par;
public   static int[] size;
public   static int g;

UnionFind(int youso) {
        this.g = youso;
        this.par = new int[youso];
        this.size = new int[youso];
        for(int i=0; i<=g-1; i++){
            par[i] = i;
        }
        for(int i=0; i<=g-1; i++){
            size[i] = 1;
        }
    }

public   static int find(int node) {
        if(par[node]==node){
            return node;
        }
        return par[node] = find(par[node]);
    }

public   static void union(int node1, int node2) {
        int root1 = find(node1);
        int root2 = find(node2);
        if(root1 == root2){
            return;
        }
        g--;
        if(size[root1] < size[root2]){
            int temp = root1;
            root1 = root2;
            root2 = temp;
        }
        size[root1] += size[root2];
        par[root2] = root1;
    }

public   static int size(int node) {
        return size[find(node)];
    }

public   static boolean same(int node1, int node2) {
        return find(node1) == find(node2);
    }

}
}




Measured memory_bytes: 96076
#include <bits/stdc++.h>
using namespace std;
int main()	{
	int n;
	cin>>n;
	string s1,s2;
	cin>>s1;
	cin>>s2;
	string str="";
	int c=0;
	while(c<n-1)	{
		if(s1[c]!=s1[c+1])	{
			str+='h';
			c++;
		}
		else	{
			str+='v';
			c+=2;
		}
	}
	if(s1[n-1]==s2[n-1])	{
		str+='h';
	}
//	cout<<str<<endl;
	long long dp[100];
	long long mod=1e9+7;
	memset(dp,0,sizeof(dp));
	if(str[0]=='v')	{
		dp[0]=6;
	}
	else	{
		dp[0]=3;
	}
	for(int i=1;i<str.length();i++)	{
//		cout<<i<<" = i"<<endl;
		if(str[i]=='h' && str[i-1]=='v')	{
			dp[i]=dp[i-1];
		}
		if(str[i]=='v' && str[i-1]=='v')	{
			dp[i]=dp[i-1]*3;
			dp[i]=dp[i]%mod;
		}
		if(str[i]=='h' && str[i-1]=='h')	{
			dp[i]=dp[i-1]*2;
			dp[i]=dp[i]%mod;
		}
		if(str[i]=='v' && str[i-1]=='h')	{
			dp[i]=dp[i-1]*2;
			dp[i]=dp[i]%mod;
		}
	}
	cout<<dp[str.length()-1]<<endl;
	return 0;
}

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

int main(){


    char findword[11],ring[22];
    char* ring2;

    int N,i=0,count=0,A=0;

    bool check;

    cin >> findword >> N;

    A = strlen(findword);   

    while(i < N){
 
        cin >> ring;

        strcat(ring, ring);

             for(int g=0; g<=10;g++){
 		    check = true;
                  for(int h=0; h<A;h++){
 
                      /* if(ring[h+g] == findword[h+g]){ 
                              check = true;
                          }*/
                       if (ring[h+g] != findword[h])check = false;
                          
                       if(!check) break;
                    }

                  if(check){
                    count++;
                    break;
                    }
              }
       /*     for(int t=10-A+1; t<10;t++){

                for(int l=0; l<A;l++){

                       int u = t+l; 

                       if(u > 9) u-=10; 

                       if(ring[u] == findword[l]){
                              check = true;
                          }
                       else check = false;
                          
                       if(!check) break;
                  }
       
                 if(check){
                    count++;
                    break;
                   }
             }*/

       i++;

   }

  cout << count << endl;

  return 0;

}
    
    

Measured memory_bytes: 1168
#include <stdio.h>

int main(){
  int A,B,C,K,S=0;
  scanf("%d %d %d %d",&A,&B,&C,&K);
  if(K<=A) S=K;
  else if(K<=A+B) S=A;
  else S=A-(K-A-B);
  printf("%d\n",S);
  return 0;
}

Measured memory_bytes: 1728
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        while(true){
            String str[] = br.readLine().split(" ");
            int H = Integer.parseInt(str[0]);
            int W = Integer.parseInt(str[1]);
            if(H==0 && W==0) break;
            for(int i=0;i<H;i++){
                for(int j=0;j<W;j++){
                    sb.append("#");
                }
                sb.append("\n");
            }
            sb.append("\n");
        }
        System.out.print(sb);
    }
}

Measured memory_bytes: 25284
#include "bits/stdc++.h"
#include <atcoder/all>

using namespace std;
using namespace atcoder;

#define ll long long


signed main() {
	int N, M; cin >> N >> M;
	scc_graph graph(N);
	for (int i = 0; i < M; i++) {
		int a, b; cin >> a >> b;
		graph.add_edge(a, b);
	}
	auto scc = graph.scc();
	cout << scc.size() << endl;
	for (auto v : scc) {
		cout << v.size();
		for (auto x : v) {
			cout << " " << x;
		}
		cout << endl;
	}
	return 0;
}


Measured memory_bytes: 40068
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
const ll MN = 1001000;
const ll MM = 500500;
ll w[MM*3],x[MM*3],pr[MM*3];
const ll M = 998244353;
inline ll mul(ll a, ll b) {
	return (a*b)%M;
}
ll bp(ll b, ll p) {
	ll ac = 1;
	while(p) {
		if(p&1) {ac = mul(ac,b);}
		b = mul(b,b);
		p >>= 1;
	}
	return ac;
}
ll fp[MN*2],ip[MN*2];
ll fac(ll v) {
	if(v <= 1) return 1;
	if(fp[v] != -1) return fp[v];
	if(v > 10000) fac(v-10000);
	return fp[v] = mul(fac(v-1),v);
}
ll inv(ll v) {
	return bp(v,M-2);
}
ll ifac(ll v) {
	if(v <= 1) return 1;
	if(ip[v] != -1) return ip[v];
	return ip[v] = inv(fac(v));
}
ll ch(ll n, ll k) {
	if(k < 0 || k > n) return 0;
	return mul(mul(fac(n),ifac(n-k)),ifac(k));
}
int main() {
	memset(fp,-1,sizeof(fp));
	memset(ip,-1,sizeof(ip));
	ll n,m;
	cin >> n >> m;
	ll sm = 0;
	for(int i=0;i<=2*m;i++) {
		w[i] = ch(n+i-1,n-1);
		if(i > m) {
			sm += ch(n+i-(m+1)-2,n-2);
			sm %= M;
		}
		w[i] -= mul(n,sm);
		w[i] = (w[i]+M)%M;
	}
	for(int i=0;i<=2*m;i++) {
		x[i] = w[i];
		if(i >= m) {
			ll rem = ch(n+i-m-2,n-2);
			x[i] -= mul(n,rem);
		}
		x[i] = (x[i]+M)%M;
	}
	ll res = 0;
	for(int i=0;i<2*m;i++) {
		ll sa = 3*m-2*i;
		if(sa > m) continue;
		if(sa < 0) continue;
		res += mul(ch(n-1,sa),w[i])+mul(ch(n-1,sa-1),x[i]);
		res %= M;
	}
	cout << res << '\n';
}

Measured memory_bytes: 51584
#include<bits/stdc++.h>
#define debug(x) cerr<<#x<<" = "<<x
#define sp <<"  "
#define el <<endl
#define fgx cerr<<"-----------------------------------"<<endl
#define LL long long
#define uint unsigned int
#define ULL unsigned long long
#define LDB long double 
#define DB double
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
using namespace std;
namespace IO{
	const int BS=(1<<23)+5; int Top=0;
	char Buffer[BS],OT[BS],*OS=OT,*HD,*TL,SS[20]; const char *fin=OT+BS-1;
	char Getchar(){if(HD==TL){TL=(HD=Buffer)+fread(Buffer,1,BS,stdin);} return (HD==TL)?EOF:*HD++;}
	void flush(){fwrite(OT,1,OS-OT,stdout),OS=OT;}
	void Putchar(char c){*OS++ =c;if(OS==fin)flush();}
	void write(LL x){
		if(!x){Putchar('0');return;} if(x<0) x=-x,Putchar('-');
		while(x) SS[++Top]=x%10,x/=10;
		while(Top) Putchar(SS[Top]+'0'),--Top;
	}
	inline LL read(){
		LL nm=0; bool fh=true; char cw=getchar();
		for(;!isdigit(cw);cw=getchar()) fh^=(cw=='-');
		for(;isdigit(cw);cw=getchar()) nm=nm*10+(cw-'0');
		return fh?nm:-nm;
	}
} using namespace IO;
#define M 200200
int fs[M],nt[M<<1],to[M<<1],tmp;
int n,m,f[M],A[M],B[M]; LL F[M],sum[M];
int od[M],tg[M],tim; bool hv[M];
inline void link(int x,int y){nt[tmp]=fs[x],fs[x]=tmp,to[tmp++]=y;}
inline bool cmp(int x,int y){return A[x]-B[x]<A[y]-B[y];}
inline int fd(int x){return f[x]==x?x:f[x]=fd(f[x]);}
int main(){
	n=read(),m=read(),memset(fs,-1,sizeof(fs));
	for(int x=1;x<=n;x++) A[x]=read(),B[x]=read(),A[x]=max(A[x],B[x]),od[x]=x,f[x]=x;
	for(int i=1,x,y;i<=m;i++) x=read(),y=read(),link(x,y),link(y,x);
	sort(od+1,od+n+1,cmp);
	for(int y,x=od[1],j=1;j<=n;hv[x]=true,x=od[++j]){
		sum[x]=B[x],F[x]=A[x],++tim;
		for(int i=fs[x];i!=-1;i=nt[i]) if(hv[to[i]]&&tg[y=fd(to[i])]<tim)
			sum[x]+=sum[y],F[x]+=sum[y],tg[y]=tim; ++tim;
		for(int i=fs[x];i!=-1;i=nt[i]) if(hv[to[i]]&&tg[y=fd(to[i])]<tim&&y!=x)
			F[x]=min(F[x],sum[x]-sum[y]+max((LL)(A[x]-B[x]),F[y])),tg[y]=tim,f[y]=x;
		if(j==n) printf("%lld\n",F[x]);
	} return 0;
}

Measured memory_bytes: 11648
#include<stdio.h>
  
int main(void){

  int n,i,a,b,sum_a,sum_b;
  
  while(n!=0){
  sum_a=0; sum_b=0;
  scanf("%d",&n);
  
  for(i=0;i<n;i++){
    scanf("%d %d",&a,&b);

    if(a>b)
     sum_a = sum_a + a + b;
    else if(a<b)
     sum_b = sum_b + a + b;
    else{
      sum_a += a;
      sum_b += b;
      }
  
      }
    if(n!=0)
     printf("%d %d\n",sum_a,sum_b);
  }
     return 0;
}

Measured memory_bytes: 0
#include<bits/stdc++.h>
#define rep(i,a) for(int (i)=0; (i)<(a); (i)++)
#define rrep(i,a) for(int (i)=a-1; (i)>=(0); (i)--)
#define rep2(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
typedef long long ll;

using namespace std;


int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll a,b,k; cin >> a >> b >> k;
  if(a < k){
    k -= a;
    a = 0;
    b -= k;
    b = max(0LL,b);
  }else{
   a-=k; 
  }
  cout << a << " " << b;

  return 0;
}

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

int isATGC(char b){
  switch (b)
  {
      case 'A':
          return 1;
      case 'T':
          return 1;
      case 'G':
          return 1;
      case 'C':
          return 1;
  
      default:
          return 0;
  }
}

int main(void){
  string S;
  cin>>S;
  int strLen = 0;
  int maxStrLen = 0;
  for(int i = 0; i<S.length(); i++){
      if(isATGC(S[i])){
          strLen++;
      }else{
          maxStrLen = max(strLen,maxStrLen);
          strLen = 0;
      }
  }
  maxStrLen = max(strLen,maxStrLen);
  cout<<maxStrLen<<endl;
  return 0;
}

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

string suffle(string s,int h){
    string str1 = s.substr(0,h);
    string str2 = s.substr(h,s.size()-h);
    return str2 + str1;
}
int main(){
    string card;
    int n,h;
    while(1){
        cin >> card;
        if (card == "-") break;
        cin >> n;
        for (int i = 0;i < n;i++){
            cin >> h;
            card = suffle(card,h);
        }
        cout << card << endl;
    }
    return 0;
}


Measured memory_bytes: 3152
#include <iostream>
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <queue>

int main()
{
  uint64_t a;
  double b;
  std::cin >> a >> b;
  b = b * 100 + 0.5;
  uint64_t c = static_cast<uint64_t>(b);
  a *= c;
  a /= 100;
  std::cout << a << std::endl;
  

  return 0;
}

Measured memory_bytes: 3732
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
  int a,b;
  char str[100],*p;
  
  fgets(str,sizeof(str),stdin);
  p=strtok(str," \n");
  a=atoi(p);
  p=strtok(NULL," \n");
  b=atoi(p);
  
  if(a<9 && b<9){
    printf("Yay!\n");
  }else{
    printf(":(\n");
  }
  
  return 0;
}

Measured memory_bytes: 128
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <queue>

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#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)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int INF = 1e9;

struct Edge{
  int to, cost;

  Edge(int t, int c): to(t), cost(c)
  {}
  bool operator>(const Edge& rhs) const{
	return cost > rhs.cost;
  }
};
typedef vector< vector<Edge> > Graph;

void Dijkstra(const Graph& edges, vector<int>& d, int s){
  const int V = edges.size();
  priority_queue<PII, vector<PII>, greater<PII> > pq;
  fill(d.begin(), d.end(), INF);
  d[s] = 0;
  pq.push(MP(0,s));

  while(!pq.empty()){
	PII pii = pq.top(); pq.pop();
	int v = pii.second;
	if(d[v] < pii.first) continue;
	for(int i=0;i<edges[v].size();++i){
	  const Edge& e = edges[v][i];
	  if(d[e.to] > d[v] + e.cost){
		d[e.to] = d[v] + e.cost;
		pq.push(MP(d[e.to], e.to));
	  }
	}
  }
}


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

  int N, M, C, S, G;
  while(cin>>N>>M>>C>>S>>G,N){
	--S, --G;
	
	// ????????¨?????°??????????§????
	vector<Graph> Gc(C, Graph(N));
	REP(i,M){
	  int x, y, d, c; cin >> x >> y >> d >> c;
	  --x, --y, --c;
	  Gc[c][x].PB(Edge(y,d));
	  Gc[c][y].PB(Edge(x,d));
	}
	VI ps(C); REP(i,C) cin >> ps[i];
	VVI qs(C), rs(C);
	REP(i,C){
	  qs[i].assign(ps[i]-1, 0);
	  rs[i].assign(ps[i], 0);
	  REP(j,ps[i]-1) cin >> qs[i][j];
	  qs[i].PB(INF);
	  REP(j,ps[i]) cin >> rs[i][j];
	}

	//????????¨????????¢->?????????????¨????
	VVI cost(C, VI(200*101, INF));
	REP(c,C){
	  int i = 0;
	  cost[c][0] = 0;
	  for(int d=1;d<200*101;++d){
		cost[c][d] = cost[c][d-1] + rs[c][i];
		if(d == qs[c][i]) ++i;
	  }
	}

	// ????????¢???????????°??????
	Graph Gr(N);
	REP(s,N){
	  REP(c,C){
		VI dist(N);
		Dijkstra(Gc[c], dist, s);
		REP(g,N){
		  if(dist[g] < INF)
			Gr[s].PB(Edge(g, cost[c][dist[g]]));
		}
	  }
	}

	VI dist(N);
	Dijkstra(Gr, dist, S);
	cout << (dist[G]==INF? -1: dist[G]) << endl;
  }
  
  return 0;
}

Measured memory_bytes: 4640
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

int main(){
  int x,y,z;
  cin>>x>>y>>z;
  cout<<(x-z)/(y+z)<<endl;

  return 0;
}


Measured memory_bytes: 384
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <map>

using namespace std;

int main(){
    long long int n;
    scanf("%lld", &n);
    
    if(n%2){
        printf("%lld\n", n*2);
    }else{
        printf("%lld\n", n);
    }
    return 0;
}


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

//Spiral Pattern
public class Main{

	static char[][] s;
	static int n;
	static int[][] move = {{-1,0},{0,1},{1,0},{0,-1}};
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		boolean f = true;
		while(t--!=0){
			if(!f)System.out.println();
			f = false;
			n = sc.nextInt();
			s = new char[n][n];
			for(int i=0;i<n;i++)Arrays.fill(s[i], ' ');
			int i = n;
			int j = 0;
			int k = 0;
			while(true){
				int ni = i+move[k][0];
				int nj = j+move[k][1];
				if(0<=ni&&ni<n&&0<=nj&&nj<n&&c(ni,nj)){
					s[ni][nj] = '#';
					i = ni;
					j = nj;
				}
				else{
					k = (k+1)%4;
					ni = i+move[k][0];
					nj = j+move[k][1];
					if(0<=ni&&ni<n&&0<=nj&&nj<n&&c(ni,nj)){
						s[ni][nj] = '#';
						i = ni;
						j = nj;
					}
					else break;
				}
			}
			for(int x=0;x<n;x++)System.out.println(new String(s[x]));
		}
	}
	
	static boolean c(int i, int j){
		int c = 0;
		for(int k=0;k<4;k++){
			int ni = i+move[k][0];
			int nj = j+move[k][1];
			if(0<=ni&&ni<n&&0<=nj&&nj<n&&s[ni][nj]=='#')c++;
		}
		return c<=1;
	}
}

Measured memory_bytes: 12000
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>  
#include <stdbool.h>   
#define inf (INT_MAX-1)
#define INF 9223372036854775807;
#define PI 3.14159265358979323846;
#define EPS 1e-10
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
/*
#define sort(a,n) qsort(a,n,sizeof(TYPE),cmp)
#define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r)
*/
#define chsort(s,n) qsort(s,n,sizeof(char),cmp)
#define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r)
#define TYPE long long
#define ll long long
#define MEMSET(a) memset(a,0,sizeof(a))
#define MEMSET_U(a) memset(a,-1,sizeof(a))
#define bool    _Bool
const int mod = (int)1e09 + 7;

//#define DEBUG1
//#define DEBUG2
//#define DEBUGF
#define DUMMY

int in(void) { int i; scanf("%d", &i); return i; }
long long llin(void) { long long i; scanf("%lld", &i); return i; }
double din(void) { double i; scanf("%lf", &i); return i; }
void chin(char s[]) { scanf("%s", s); }

void print(int a) { printf("%d\n", a); }
void llprint(long long a) { printf("%lld\n", a); }
void dprint(double a) { printf("%.10f\n", a); }
void print2(int a, int b) { printf("%d %d\n", a, b); }
int Max(int a, int b) { if (a > b) { return a; }return b; }
int Min(int a, int b) { if (a < b) { return a; }return b; }
long long llmax(long long a, long long b) { return a > b ? a : b; }
long long llmin(long long a, long long b) { return a < b ? a : b; }
double dmax(double a, double b) { return a > b ? a : b; }
double dmin(double a, double b) { return a < b ? a : b; }
//long long llmax(long long a, long long b) { return a > b ? a : b; }
//long long llmin(long long a, long long b) { return a < b ? a : b; }
//double dmax(double a, double b) { return a > b ? a : b; }
int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; }
int cmp_r(const void *a, const void *b) { return *(TYPE *)b - *(TYPE *)a; }
int char_cmp(const void *a, const void *b) { return strcmp((char *)a, (char *)b); }
int char_cmp_r(const void *a, const void *b) { return strcmp((char *)b, (char *)a); }
void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; }


int main() {

	long long N;
	scanf("%lld", &N);
	long long maxi;
	for (long long i = 1; i*i <= N; i++) {
		if (N%i == 0) {
			maxi = i;
		}
	}
	long long B = N / maxi, b = 0;

	while (B != 0) {
		B /= 10;
		b++;
	}
	printf("%d\n", b);


#ifdef DEBUGF
	getch();
#endif
	return 0;
}

Measured memory_bytes: 128
#include"bits/stdc++.h"
#include<unordered_set>
#include<unordered_map>
#include<random>
using namespace std;
typedef long long ll;
const ll MOD = (ll)(1e9+7);
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
int dx[4]={ 1,0,-1,0 };
int dy[4]={ 0,1,0,-1 };

ll X;

signed main(){
    cin >> X;
    ll n = 100;
    for(int i=0; i<INT_MAX; i++){
        n += n / 100;
        if(n >= X){
            cout << i+1 << endl;
            return 0;
        }
    }
}

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


signed main() {
  int n; cin >> n;
    string s; cin >> s;
    string s1 = "";
    for(int i = 0; i < s.size(); i++) {
      s1 += (s[i] + n);
    }
    for(int i = 0; i < s1.size(); i++) {
      if(s1[i] > 'Z') s1[i] = s1[i]-'Z'+'A' -1;
    }
    cout << s1 << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)
typedef int64_t lint;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
struct UnionFind {
	vector<int> d;
	UnionFind(int n=0): d(n,-1) {}
	int find(int x) {
		if (d[x] < 0) return x;
		return d[x] = find(d[x]);
	}
	bool unite(int x, int y) {
		x = find(x); y = find(y);
		if (x == y) return false;
		if (d[x] > d[y]) swap(x,y);
		d[x] += d[y];
		d[y] = x;
		return true;
	}
	bool same(int x, int y) { return find(x) == find(y);}
	int size(int x) { return -d[find(x)];}
};

int main() {
	int N, M;
	cin >> N >> M;
	int a=0, b=0, c=0, x, y, z;
	UnionFind U(N);
	rep(i, M) {
		cin >> x >> y;
		x--, y--;
		U.unite(x, y);
	}
	rep(i, N) {
		chmax(a, U.size(i));
	}
	std::cout << a << '\n';
}


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

#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
#define SZ(x) ((int)(x).size())
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;
const int di[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int dj[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int INF = 1 << 28;
const ll INF64 = 1ll << 55;
const int mod = 1000000007;
//const int mod = 998244353;

template <class T>inline bool chmin(T &a, const T b)
{
  if (a > b)
  {
    a = b;
    return true;
  }
  return false;
}
template <class T>inline bool chmax(T &a, const T b)
{
  if (a < b)
  {
    a = b;
    return true;
  }
  return false;
}
template <class T>inline void line_out(const vector<T> vec) {
  int n = SZ(vec);
  rep(i, n) {
    cout << vec[i];
    if(i < n-1) cout << " ";
  }
  cout << endl;
  return;
}

struct mint
{
  ll x; // typedef long long ll;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint &operator+=(const mint a)
  {
    if ((x += a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator-=(const mint a)
  {
    if ((x += mod - a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator*=(const mint a)
  {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const
  {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const
  {
    mint res(*this);
    return res -= a;
  }
  mint &operator++()
  {
    if ((x += 1) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator--()
  {
    if ((x += mod - 1) >= mod)
      x -= mod;
    return *this;
  }
  mint operator*(const mint a) const
  {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const
  {
    if (!t)
      return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1)
      a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const
  {
    return pow(mod - 2);
  }
  mint &operator/=(const mint a)
  {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const
  {
    mint res(*this);
    return res /= a;
  }
};
  
int n;
ll z, w;
vector<ll> a;

vector<vector<ll>> dp(2000, vector<ll>(2, INF64));

ll rec(int now = 0, int play = 0) {
  if(dp[now][play] != INF64) return dp[now][play];

  ll &ret = dp[now][play];

  if(play == 0) {
    ret = -INF64;
    ll aite = ((now == 0)?w:a[now-1]);
    chmax(ret, abs(aite-a[n-1]));
    for(int j = now+1; j < n; ++j) chmax(ret, rec(j, 1));
  }
  else {
    ret = INF64;
    ll aite = a[now-1];
    chmin(ret, abs(aite-a[n-1]));
    for(int j = now+1; j < n; ++j) chmin(ret, rec(j, 0));
  }

  return ret;
}

int main()
{
  cin >> n >> z >> w;
  a.resize(n);
  rep(i, n) cin >> a[i];
  cout << rec() << endl;
}

Measured memory_bytes: 3792
// include
// ------------------------------------------------
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>

using namespace std;

// func
// ------------------------------------------------
int CalcSumOfDigit(int n);      // 各桁の和を計算する。

// define
// ------------------------------------------------
#define all(a)        (a).begin(),(a).end()
#define pb            push_back
#define sz(a)         int((a).size())
#define rep(i,n)      for(int(i)=0;(i)<(n);(i)++)
#define repe(i,n)     for(int(i)=0;(i)<=(n);(i)++)
#define vsort(v)      sort((v).begin(),(v).end())

// code
// ------------------------------------------------
int main() {
  string s,t;
  cin >> s >> t;

  sort(all(s));
  sort(t.rbegin(),t.rend());

  bool d = false;



  rep(i,(sz(s) > sz(t) ? sz(s) : sz(t)))
  {
    if(t[i] > s[i])
    {
      d = true;
      break;
    }
    else if(s[i] > t[i])
    {
      d = false;
      break;
    }
  }

  if(d) cout << "Yes" << endl;
  else cout << "No" << endl;

  return 0;
}

// funcの実体
// ------------------------------------------------
int CalcSumOfDigit(int n)
{
  int s = 0;
  while(n)
  {
    s += n % 10;
    n = n / 10;
  }
  return s;
}

Measured memory_bytes: 384
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>

using namespace std;
typedef long long ll;
int N;
int Q;
ll W[(1<<18)+1], V[(1<<18)+1];
ll dp[(1<<9)+1][100001];
ll dp_prev[100001];
ll dp_cur[100001];

int D;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << setprecision(10) << fixed;
    cin >> N;
    for(int i = 0; i < 20; i++){
        if((1<<i) > N){
            D = i;
            break;
        }
    }
    int M = D/2;
    int th = (1<<M);
    for(int i = 1; i <= N; i++) cin >> V[i] >> W[i];
    cin >> Q;
    for(int i = 1; i < (1<<M); i++){
        if(i == 1){
            dp[i][W[i]] = V[i];
            for(int j = 1; j <= 100000; j++) {
                dp[i][j] = max(dp[i][j-1], dp[i][j]);
            }
        }else{
            int par = i/2;
            for(int j = 0; j <= 100000; j++) {
                dp[i][j] = max(dp[i][j], dp[par][j]);
            }
            for(int j = 0; j+W[i] <= 100000; j++) {
                dp[i][j+W[i]] = max(dp[par][j]+V[i], dp[i][j+W[i]]);
            }
            for(int j = 1; j <= 100000; j++) {
                dp[i][j] = max(dp[i][j-1], dp[i][j]);
            }
        }
        // for(int i = 0; i <= 100000; i++){
        //     dp_cur[i] = 0; dp_prev[i] = 0;
        // }
        // int cur = i;
        // while(true){
        //     for(int j = 0; j+W[cur] <= 100000; j++){
        //         dp_cur[j+W[cur]] = max(dp_cur[j+W[cur]], dp_prev[j]+V[cur]);
        //     }
        //     for(int j = 0; j <= 100000; j++) dp_prev[j] = dp_cur[j];
        //     cur = cur/2;
        //     if(cur == 0) break;
        // }
        // for(int j = 1; j <= 100000; j++) {
        //     dp[i][j] = max(dp[i][j-1], dp_cur[j]);
        // }
    }
    for(int i = 0; i < Q; i++){
        int v, L;
        cin >> v >> L;
        if(v < th){
            cout << dp[v][L] << endl;
            continue;
        }
        int cur = v;
        vector<int> vv, vw;
        while(true){
            vv.push_back(V[cur]);
            vw.push_back(W[cur]);
            cur = cur/2;
            if(cur < th) break;
        }
        int sz = vv.size();
        // cout << i << " cur:" << cur << ' ' << sz << endl;
        int ans = 0;
        for(int j = 0; j < (1<<sz); j++){
            int sumv = 0, sumw = 0;
            for(int k = 0; k < sz; k++){
                if(j&(1<<k)){
                    sumv += vv[k];
                    sumw += vw[k];
                    // cout  << vv[k] << '-' << vw[k] << ' ';
                }
            }
            if(sumw > L) continue;
            int tmp = sumv+dp[cur][L-sumw];
            ans = max(ans, tmp);
            // cout << sumv << ' ' << sumw << ' ' << tmp << ' ' << ans<< ' ' << dp[cur][L-sumw] << ' ' << L-sumw << endl;
        }
        cout << ans << endl;
    }
}

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

struct TTree
{
private:
	struct TNode
	{
	public:
		int Id;
		TNode* Parent;
		TNode* LChild;
		TNode* RChild;
		TNode(int Value)
		{
			Id = Value;
			Parent = NULL;
			LChild = NULL;
			RChild = NULL;
		}
	};
	TNode* Root;
	void Delete(const TNode* Node)
	{
		if(Node == NULL) return;
		Delete(Node->LChild);
		Delete(Node->RChild);
		delete Node;
	}
	void InorderOutput(const TNode* Node)
	{
		if(Node == NULL) return;
		InorderOutput(Node->LChild);
		cout << ' ' << Node->Id;
		InorderOutput(Node->RChild);
	}
	void PreorderOutput(const TNode* Node)
	{
	    if(Node == NULL) return;
	    cout << ' ' << Node->Id;
	    PreorderOutput(Node->LChild);
	    PreorderOutput(Node->RChild);
	}
	void Insert(TNode* z)
	{
	    assert(z != NULL);
		TNode* y = NULL;
		TNode* x = Root;
		while(x != NULL){
			y = x;
			if(z->Id < x->Id){
				x = x->LChild;
			}else{
				x = x->RChild;
			}
		}
		z->Parent = y;
		if(y == NULL){
			Root = z;
		}else if(z->Id < y->Id){
			y->LChild = z;
		}else{
			y->RChild = z;
		}
	}
	bool Find(TNode* Node, int Value)
	{
		if(Node == NULL) return false;
		if(Node->Id == Value){
			return true;
		}else if(Node->Id > Value){
			return Find(Node->LChild, Value);
		}else{
			return Find(Node->RChild, Value);
		}
	}
public:
	TTree()
	{
		Root = NULL;
	}
	~TTree()
	{
		Delete(Root);
	}
	void Insert(int Id)
	{
		Insert(new TNode(Id));
	}
	void Find(int Id)
	{
		bool IsExist = Find(Root, Id);
		if(IsExist){
			cout << "yes" << endl;
		}else{
			cout << "no"  << endl;
		}
	}
	void Print()
	{
		InorderOutput(Root);
		cout << endl;
		PreorderOutput(Root);
		cout << endl;
	}
};

int main()
{
	int n;
	cin >> n;
	TTree Tree;
	for(int i = 0; i < n; i++){
		string Command;
		cin >> Command;
		if(Command == "insert"){
			int Id;
			cin >> Id;
			Tree.Insert(Id);
		}else if(Command == "find"){
			int Id;
			cin >> Id;
			Tree.Find(Id);
		}else{
			Tree.Print();
		}
	}
	return 0;
}

Measured memory_bytes: 21892
use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let n:i32 = procon_read()[0];
	println!("{}", 800*n - 200*(n/15));
}

Measured memory_bytes: 4352
main = do
  str <- getLine
  let [a,b,c,d] = map read (words str) ::[Int]
  putStrLn $ match (a,b) (c,d) 1
  

match :: (Int, Int) -> (Int, Int) -> Int -> String
match (a, b) (c, d) n
  | a <= 0    = "No"
  | c <= 0    = "Yes"
  | otherwise = if odd n == True
                  then match (a, b) (c-b, d) (n+1)
                  else match (a-d, b) (c, d) (n+1)


Measured memory_bytes: 3840
//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
using namespace std;

#define FOR(i,f,t) for(int i=(int)f; i<(int)t; i++)
#define FORR(i,f,t) for(int i=(int)f; i>(int)t; i--)
#define ms(obj, val) memset(obj, val, sizeof(obj))
#define pb push_back
#define SYNC ios_base::sync_with_stdio(false)
#define inf 2248012
#define mp make_pair
#define F first
#define S second
#define ri(x) scanf("%d",&x)
#define rii(x,y) scanf("%d %d",&x,&y)
#define riii(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define lri(x) scanf("%lld",&x)
#define lrii(x,y) scanf("%lld %lld",&x,&y)
#define lriii(x,y,z) scanf("%lld %lld %lld",&x,&y,&z)

typedef vector<int> vi;
typedef long long ll;
typedef pair<int, int> ii;

const int MAXN = 1e5+2; //AREGLAAAAAAAAR!!!!
int main(){
	int n;
	ll yy;
	ri(n);
	lri(yy);
	FOR(x,0,n+1){
		FOR(y,0,n+1){
			int z=n-x-y;
			ll xs=x,ys=y,zs=z;
			ll vx=10000*xs,vy=5000*ys,vz=zs*1000;
			if(z>=0 && vx+vy+vz==yy){
				printf("%d %d %d\n",x,y,z);
				return 0;
			}
		}
	}
	printf("-1 -1 -1\n");
	return 0;
}

	

Measured memory_bytes: 256
function main(input) {
  const arg = input.split('\n'), t = arg[0].split(' ')
  var n = Number(t[0]), k = Number(t[1])
  var a = arg[1].split(' ').map(Number)
  a.sort(function(a,b){
        if( a < b ) return -1;
        if( a > b ) return 1;
        return 0;
  });
  var s = 0
  for(var i=0;i<(n-k);i++) s += a[i]
  console.log(s)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


Measured memory_bytes: 34592
#include <bits/stdc++.h>
typedef long long ll;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define loop(i, start, end) for(int i=start; i<=end; ++i)
#define MOD 1e9+7
using namespace std;

int readInt () {
	bool minus = false;
	int result = 0;
	char ch;
	ch = getchar();
	while (true) {
		if (ch == '-') break;
		if (ch >= '0' && ch <= '9') break;
		ch = getchar();
	}
	if (ch == '-') minus = true; else result = ch-'0';
	while (true) {
		ch = getchar();
		if (ch < '0' || ch > '9') break;
		result = result*10 + (ch - '0');
	}
	if (minus)
		return -result;
	else
		return result;
}

template <typename T>
void cloneArray(T *a, T *b, int start, int end) {
    loop(i, start, end) {
        *(b+i)=*(a+i);
    }
}

template <typename T>
void inputArray(T *a, int start, int end) {
    loop(i, start, end) cin >> a[i];
}

template <typename T>
void printArray(T *a, int start, int end) {
    loop(i, start, end) cout << *(a+i) << ' ';
}

void ruffleSort(int *a, int n) {
    unsigned seed=0;
    shuffle(a, a+n, default_random_engine(seed));
    sort(a, a+n);
}

int main(int argc, char const *argv[])
{   
    IOS;
	int d, t, s;
    cin >> d >> t >> s;
    if(s*t>=d) cout << "Yes" << endl;
    else cout << "No" << endl;
    //cerr<<" Execution : "<<(1.0*clock())/CLOCKS_PER_SEC<<"s \n";
    return 0;
}

Measured memory_bytes: 3640
<?php
fscanf(STDIN, "%d",$n);
for ($i=0; $i < $n; $i++)
{ 
	fscanf(STDIN, "%d",$a[$i]);
}
$result = 0;
sort($a);

$i=0;
while($i<$n)
{
	if($n-$i <= 1)
	{
		$result++;
		$i++;
	}
	else
	{
		if($a[$i] == $a[$i+1])
		{
			$i+=2;
		}
		else
		{
			$result++;
			$i++;
		}
	}
}

echo($result);

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



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

int main()
{
    int n, a, b;
    string s;
    cin >> n >> a >> b >> s;

    int now_a = 0, now_b = 0;
    for (int i = 0; i < n; i++)
    {
        if (s.at(i) == 'a')
        {
            if (now_a + now_b < a + b)
            {
                cout << "Yes" << endl;
                now_a++;
            }
            else
            {
                cout << "No" << endl;
            }
        }
        else if (s.at(i) == 'b')
        {
            if (now_a + now_b < a + b && now_b < b)
            {
                cout << "Yes" << endl;
                now_b++;
            }
            else
            {
                cout << "No" << endl;
            }
        }
        else
        {
            cout << "No" << endl;
        }
    }
}

Measured memory_bytes: 896
#include <cstdio>
#include <cmath>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
using namespace std;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define REP(i,n) for(ll i=0;i<n;i++)
#define REPR(i,n) for(ll i=n-1;i>=0;i--)

typedef long long ll;
#define INF 1e18

int main(){
	ll x; cin>>x;ll y; cin>>y;ll z; cin>>z;
	cout<<z<<" "<<x<<" "<<y<<endl;
	return 0;
}

Measured memory_bytes: 256
s = input()
t = input()
sal = [0 for i in range(26)]
tal = [0 for i in range(26)]
s2, t2 = [], []
for i in range(26):
    sal[i] = s.count(chr(ord('a') + i))
    tal[i] = t.count(chr(ord('a') + i))
for i in range(len(s)):
    s2.append(sal[ord(s[i]) - ord('a')])
    t2.append(tal[ord(t[i]) - ord('a')])
if s2 != t2:
    print('No')
else:
    print('Yes')


Measured memory_bytes: 6716
using System;
public class TR {
    public static void Main() {
        string[] read = new string[4];
        read = Console.ReadLine().Split(' ');
        int A = int.Parse(read[0]);
        int B = int.Parse(read[1]);
        int C = int.Parse(read[2]);
        int D = int.Parse(read[3]);
        int S1 = A * B;
        int S2 = C * D;
        if (S1 >= S2) {
            Console.WriteLine(S1);
        } else {
            Console.WriteLine(S2);
        }
    }
}

Measured memory_bytes: 2648
#include<bits/stdc++.h>
#include <array>
using namespace std;
using ULL = unsigned long long;
using UL = unsigned;
using LL = long long;
#define rep(i, n) for(UL i = 0; i < (n); i++)


struct Problem {

	void Solve() {
		UL N; cin >> N;
		vector<pair<int, int>> R;
		rep(i, N) {
			int c, l; cin >> c >> l;
			R.push_back({ c - l, c + l });
		}
		sort(R.begin(), R.end());
		reverse(R.begin(), R.end());
		int minL = 2000000000;
		UL ans = 0;
		rep(i, N) {
			if (R[i].second <= minL) {
				ans++;
				minL = R[i].first;
			}
		}
		cout << ans << endl;
	}

	
	Problem();
};
int main() {
	unique_ptr<Problem> p(new Problem());
	p->Solve();
	return 0;
}
Problem::Problem() {
	cout << fixed << setprecision(10);
}


Measured memory_bytes: 1400
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
	int N; scanf("%d", &N);
	int A[101];
	double sum = 0.0l;
	for (int i = 0; i < N; i++){
		scanf("%d", A + i);
		sum += 1.0l / (double)A[i];
	}
	printf("%llf", 1.0l / sum);

	return 0;
}

Measured memory_bytes: 128
n = int(input())

r = []
c = 1
i = 1
while i <= n:
    r.append([])
    for j in range(1, c+1):
        r[-1].append(i)
        i += 1
    c += 1

if i == n+1:
    print('Yes')
    print(c)
    for j in range(c-1):
        result = [c-1]
        result.extend(r[j])
        for x in range(j+1, c-1):
            result.append(r[x][j])
        print(*result)
    result = [c-1]
    for x in range(c-1):
        result.append(r[x][x])
    print(*result)
else:
    print("No")


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

int main(){
    int n;
    scanf("%d",&n);
    int l=n/100;
    int r=n%100;

    if(l>=1 & l<=12){
        if(r>=1 && r<=12){
            printf("AMBIGUOUS\n");
        }
        else printf("MMYY");
    }
    else{
        if(r>=1 && r<=12) printf("YYMM\n");
        else printf("NA\n");
    }
}

Measured memory_bytes: 256
#include "stdio.h"
#include "algorithm"

int n,i,j,st;
long long l;
long long a[100005];
long long ans[100005];
int main(){
	scanf("%d%lld",&n,&l);
	for(int i = 0; i < n; i++){
		scanf("%lld",&a[i]);
	}
	for(int i = 1; i < n; i++){
		if(a[i]+a[i-1]>=l) st = i;
	}
	if(!st){
		printf("Impossible\n");
	}else{
		printf("Possible\n");
		for(int i = 1; i < st; i++){
			printf("%d\n",i);
		}
		for(int i = n-1; i >= st; i--){
			printf("%d\n",i);
		}
	}

}

Measured memory_bytes: 1536
#include <bits/stdc++.h>
using namespace std;
using LL = long long int;
#define incID(i, l, r) for(int i = (l)    ; i <  (r); ++i)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); --i)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); ++i)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); --i)
#define inc(i, n)  incID(i, 0, n)
#define dec(i, n)  decID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define dec1(i, n) decII(i, 1, n)
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))
#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define FR front()
#define BA back()
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
auto setmin   = [](auto & a, auto b) { return (b <  a ? a = b, true : false); };
auto setmax   = [](auto & a, auto b) { return (b >  a ? a = b, true : false); };
auto setmineq = [](auto & a, auto b) { return (b <= a ? a = b, true : false); };
auto setmaxeq = [](auto & a, auto b) { return (b >= a ? a = b, true : false); };
#define SI(v) static_cast<int>(v.size())
#define RF(e, v) for(auto & e: v)
#define until(e) while(! (e))
#define if_not(e) if(! (e))
#define ef else if
#define UR assert(false)
#define IN(T, ...) T __VA_ARGS__; IN_(__VA_ARGS__);
void IN_() { };
template<typename T, typename ... U> void IN_(T & a, U & ... b) { cin >> a; IN_(b ...); };
template<typename T> void OUT(T && a) { cout << a << endl; }
template<typename T, typename ... U> void OUT(T && a, U && ... b) { cout << a << " "; OUT(b ...); }

// ---- ----

int main() {
	IN(string, s);
	sort(ALL(s));
	OUT(s.FR == s.BA ? "No" : "Yes");
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
/*{{{*/  //template
#define rep(i,n) for(int i=0;i<(int)(n);i++)
constexpr int INF = numeric_limits<int>::max()/2;
constexpr long long LINF = numeric_limits<long long>::max()/3;
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define sz(x) (int)(x).size()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
//struct fin{ fin(){ cin.tie(0); ios::sync_with_stdio(false); } } fin_;
struct Double{ double d; explicit Double(double x) : d(x){} };
ostream& operator<<(ostream& os,const Double x){ os << fixed << setprecision(20) << x.d; return os; }
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }
template<typename T,typename U> ostream& operator<<(ostream& os,const pair<T,U>& p){ os << "(" << p.first << ","<< p.second <<")"; return os; }
template<typename T> ostream& operator<<(ostream& os,const set<T>& st){ os<<"{"; for(T v:st) os<<v<<","; os <<"}"; return os; }
template<typename T,typename U> inline void chmax(T &x,U y){ if(y>x) x = y; }
template<typename T,typename U> inline void chmin(T &x,U y){ if(y<x) x = y; }
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); }
//constexpr double eps = 1e-14; 
constexpr double eps = 1e-10; 
constexpr ll mod = 1e9+7;
const int dx[]={1,0,-1,0} ,dy[] = {0,1,0,-1};
/*}}}*/

ll N;

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


int val[] = {3,5,7};

int rec(int dig,string v){
    if(v.size() == dig){
        bool ok = true;
        bool ok3=false,ok5=false,ok7=false;
        for(auto c : v){
            if(c == '3') ok3 = true;
            if(c == '5') ok5 = true;
            if(c == '7') ok7 = true;
        }
        if(!ok3 or !ok5 or !ok7) ok = false;
        if(stoll(v) > N) ok = false;
        return ok;
    }

    int ret=0;
    ret += rec(dig,v + "3");
    ret += rec(dig,v + "5");
    ret += rec(dig,v + "7");
    return ret;
}

int main(){
    cin >> N;
    int d = to_string(N).size();

    ll ans = 0;

    for(int i=3;i<=d;i++){
        ans += rec(i,"");
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long; 
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007LL;
//constexpr long long MOD = 998244353LL;
template<class T, class U> inline bool chmax(T &a, U b) { if (a < b) { a = b; return true;} return false; }
template<class T, class U> inline bool chmin(T &a, U b) { if (a > b) { a = b; return true;} return false; }
const ll INF = (ll)1e18 + 1;
const int inf = 1012345678;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    
    string s; cin >> s;
    int ans = 0;
    int tmp = 0;

    rep(i,s.size()){
        if(s[i]!='A' && s[i]!='C' && s[i]!='G' && s[i]!='T'){
            chmax(ans, tmp);
            tmp = 0;
            continue;
        }
        tmp++;
        chmax(ans, tmp);        
    }
    
    cout << ans << ln;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <math.h>
#include <numeric>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <queue>
#include <queue>
#include <sstream>
#include <set>
typedef  long long ll;
const int dx[8]={1,0,-1,0,1,-1,-1,1};
const int dy[8]={0,1,0,-1,1,1,-1,-1};
const int dr[4] = {-1, 0, 1, 0};
const int dc[4] = { 0, 1, 0,-1};
const int INF = 1e9;
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define SORT(a) sort(a.begin(),a.end())
#define REVERSE(a) reverse(a.begin(),a.end())
int guki (int a){
    if(a%2==0) return 0;
    else return 1;
}
int gcd(int a, int b){
    if(a%b==0){
        return b;
    }else{
        return (gcd(b,a%b));
    }
}
int lcm(int a, int b){
    int x = gcd(a,b);
    return (a*b/x);
}



using namespace std;
int main(){
    int n,ans  = 0;
    cin >> n;

    int x[n],y[n];

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

    REP(i,n){
        if(x[i] > y[i]) ans += x[i] - y[i];
    }

    cout << ans <<endl;
    

}

Measured memory_bytes: 256