akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <cstring>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;

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

	string K; cin >> K;
	int n = K.size();
	int D; cin >> D;

	vector<vector<vector<ll>>> dp(n + 1, vector<vector<ll>>(D, vector<ll>(2, 0)));
	dp[0][0][1] = 1;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < D; j++) {
			for (int b = 0; b < 2; b++) {
				for (int k = 0; k < 10; k++) {
					int ni = i + 1, nj = (j + k) % D, nb = 0;
					int curNum = K[i] - '0';

					if (b) {
						if (k > curNum) { break; }
						else if (k == curNum) { nb = 1; }
					}
					dp[ni][nj][nb] += dp[i][j][b]; dp[ni][nj][nb] %= mod;
				}
			}
		}
	}

	ll ans = dp[n][0][0] + dp[n][0][1]; ans %= mod;
	ans--; ans %= mod;
	if (ans < 0) { ans += mod; }
	cout << ans << '\n';
}

Measured memory_bytes: 58376
N = int(input())
if N ==2:
  print(1)
  exit()

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
 
    if temp!=1: #素数の場合はここ
        arr.append([temp, 1])
 
    if arr==[]: #1の場合はここ
        arr.append([n, 1])
 
    return arr

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
A = make_divisors(N)
ans = 0 #自分自身の一個を足しておく
SET = set([N])
#print(A)
for i in range(1,len(A)):
  M = N*1
  while M%A[i]==0:
    M = M//A[i]
  if M%A[i] == 1:
    ans += 1
    SET.add(A[i])
#ans = len(SET)
#print(SET)
#print(ans)
N -= 1
B = factorization(N)
yakusu = 1
#print(B)
for i in range(len(B)):
  yakusu *= (B[i][1]+1)
#print(yakusu)
ans += yakusu-1
print(ans)


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

int main()
{
    int a,b,h;
    cin >> a >> b >> h;
    if(a != b && b != h && a != h)
        cout << 3 << endl;
    else if(a == b && b == h)
        cout << 1 << endl;
    else
        cout << 2 << endl; 
}

Measured memory_bytes: 256
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int work = 0;
            int w = sc.nextInt();
            int n = sc.nextInt();
            int[] values = new int[w];
            for (int i = 0; i < values.length; i++) {
                values[i] = i + 1;
            }
            for (int i = 0; i < n; i++) {
                String str = sc.next();
                String[] ab = str.split(",");
                int a = Integer.parseInt(ab[0]) - 1;
                work = values[a];
                values[a] = values[Integer.parseInt(ab[1]) - 1];
                int b = Integer.parseInt(ab[1]) - 1;
                values[b] = work;
            }
            for(int i = 0; i < w; i++){
                System.out.println(values[i]);
            }

        }
    }
}


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

w = [''] * n

end = ''
res = 'Yes'

hTable = {}

for i in range(0, n):
    w[i] = str(input())

    if (i == 0 or end == w[i][0]) and (w[i] not in hTable):
        end = w[i][-1]
        hTable.setdefault(w[i])
    else:
        res = 'No'


print(res)



Measured memory_bytes: 3060
n, m = map(int, input().split())
ab=[]
for _ in range(n):
    D = list(map(int, input().split()))
    ab.append(D)

ab.sort()
res=0
for i in range(len(ab)):
    if ab[i][1] < m: # buy all
        res+= (ab[i][0]*ab[i][1])
        m-= ab[i][1]
    else: # buy some
        res+= ab[i][0]*m
        break

print(res)

Measured memory_bytes: 27760
#include <bits/stdc++.h>
#define pb push_back
#define pii pair<int,int>
#define int long long
#define MOD 1000000007
using namespace std;
const int N = 200010;
int v[N] = {},rem[N] = {};
vector<int> p[N];

int32_t main()
{
    int n;
    cin >> n;
    for(int i = 1;i <= n;i++)
    {
    	cin >> v[i];
    }
    int ans = 0,prev = 0,k = 0;
    for(int i = 1;i <= n;++i)
    {
    	if(v[i] == k)
    	{
    		// cout << i << '\n';
    		continue;
    	}
    	// cout << i << ' ' << v[i] << ' ' << prev << ' ' << ' ' << rem[v[i]] << ' ' << ans << '\n';
    	k = v[i];
    	if(p[v[i]].size() == 0)
    	{
    		p[v[i]].pb(i);
    		rem[v[i]] = (rem[v[i]] + prev)%MOD;
    		continue;
    	}
    	ans = (ans + (p[v[i]].size() + rem[v[i]])%MOD)%MOD;
    	// cout << "adding: " << v[i] << ' ' << prev << '\n';
    	rem[v[i]] = (rem[v[i]] + prev)%MOD;
    	prev = ans;
    	p[v[i]].pb(i);
    }
    cout << ans + 1 << '\n';
    return 0;
}

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

#define rep(i, x, y) for (register int i = (x); i <= (y); ++i)
#define Rep(i, x, y) for (register int i = (x); i >= (y); --i)
#define int long long

const int _ = 1 << 21;
struct I {
  char fin[_], *p1 = fin, *p2 = fin;
  inline char gc() {
    return (p1 == p2) && (p2 = (p1 = fin) + fread(fin, 1, _, stdin), p1 == p2) ? EOF : *p1++;
  }
  inline I& operator>>(int& x) {
    bool sign = 1;
    char c = 0;
    while (c < 48) ((c = gc()) == 45) && (sign = 0);
    x = (c & 15);
    while ((c = gc()) > 47) x = (x << 1) + (x << 3) + (c & 15);
    x = sign ? x : -x;
    return *this;
  }
  inline I& operator>>(double& x) {
    bool sign = 1;
    char c = 0;
    while (c < 48) ((c = gc()) == 45) && (sign = 0);
    x = (c - 48);
    while ((c = gc()) > 47) x = x * 10 + (c - 48);
    if (c == '.') {
      double d = 1.0;
      while ((c = gc()) > 47) d = d * 0.1, x = x + (d * (c - 48));
    }
    x = sign ? x : -x;
    return *this;
  }
  inline I& operator>>(char& x) {
    do
      x = gc();
    while (isspace(x));
    return *this;
  }
  inline I& operator>>(string& s) {
    s = "";
    char c = gc();
    while (isspace(c)) c = gc();
    while (!isspace(c) && c != EOF) s += c, c = gc();
    return *this;
  }
} in;
struct O {
  char st[100], fout[_];
  signed stk = 0, top = 0;
  inline void flush() { fwrite(fout, 1, top, stdout), fflush(stdout), top = 0; }
  inline O& operator<<(int x) {
    if (top > (1 << 20)) flush();
    if (x < 0) fout[top++] = 45, x = -x;
    do
      st[++stk] = x % 10 ^ 48, x /= 10;
    while (x);
    while (stk) fout[top++] = st[stk--];
    return *this;
  }
  inline O& operator<<(char x) {
    fout[top++] = x;
    return *this;
  }
  inline O& operator<<(string s) {
    if (top > (1 << 20)) flush();
    for (char x : s) fout[top++] = x;
    return *this;
  }
} out;

#define pb emplace_back
#define fir first
#define sec second

template <class T>
inline void cmax(T& x, const T& y) {
  (x < y) && (x = y);
}
template <class T>
inline void cmin(T& x, const T& y) {
  (x > y) && (x = y);
}
signed main() {
#ifdef _WIN64
  freopen("testdata.in", "r", stdin);
#endif
  int H, W, N;
  in >> H >> W >> N;
  out << N / max(H, W) + (!!(N % max(H, W))) << '\n';
  return out.flush(), 0;
}

Measured memory_bytes: 2304
h, w = map(int, input().split())
a = [['#'] * (w + 2)] * 2
a[1: 1] = (list('#' + input() + '#') for _ in range(h))
p = [(i, j) for i in range(1, h + 1) for j in range(1, w + 1) if a[i][j] == '#']
d = (-1, 0), (1, 0), (0, -1), (0, 1)
r = -1
while p:
    r += 1
    s = []
    for i, j in p:
        for di, dj in d:
            di += i
            dj += j
            if a[di][dj] == '.':
                a[di][dj] = '#'
                s.append((di, dj))
    p = s
print(r)

Measured memory_bytes: 132688
#include<stdio.h>
int main(void){
	char s[4] = {'0'};
	char t[4] = {'0'};
	int x = 0;
	scanf("%s", s);
	scanf("%s", t);
	for(int i = 0; i < 3; i++){
		if(s[i] == t[i]){
			x++;
		}
	}
	printf("%d\n", x);
	return 0;
}


Measured memory_bytes: 128
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=200010,M=300010;
struct edge{
	int y,next;
	bool f;
}data[M*2];
int n,h[N],num,cur[N],son1[N],son2[N],a[N];
inline int read(){
	int x=0,f=0;
	char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return f?-x:x;
}
inline void add(int x,int y){
	data[++num].y=y;data[num].next=h[x];h[x]=num;data[num].f=true;
	data[++num].y=x;data[num].next=h[y];h[y]=num;data[num].f=true;
}
void f(int x){
	for(int& i=cur[x];i!=-1;i=data[i].next){
		int v=data[i].y;
		if(data[i].f){
			data[i].f=data[i^1].f=false;
			//printf("%d %d\n",x,v);
			if(v==x+n&&x!=0)a[x]=1;
			if(v==x-n&&x!=n)a[x-n]=-1;
			f(v);
		}
	}
}
int main(){
	n=read();
	memset(h,-1,sizeof h);num=-1;
	memset(son1,0,sizeof son1);
	memset(son2,0,sizeof son2);
	for(int x,i=1;i<=n;i++){
		x=read();
		son1[x]++;
		if(x!=-1)add(x,i);
		else add(0,i);
	}
	for(int x,i=1;i<=n;i++){
		x=read();
		son2[x]++;
		if(x!=-1)add(x+n,i+n);
		else add(0,i+n);
	}
	for(int i=1;i<=n;i++){
		if((son1[i]%2)!=(son2[i]%2)){printf("IMPOSSIBLE");return 0;}
		if(son1[i]%2==0)add(i,i+n);
	}
	printf("POSSIBLE\n");
	//for(int i=1;i<=n;i++)printf("%d %d\n",son1[i],son2[i]);
	for(int i=0;i<=n*2;i++)cur[i]=h[i];
	memset(a,0,sizeof a);
	f(0);
	for(int i=1;i<=n;i++)printf("%d ",a[i]);
	return 0;
}

Measured memory_bytes: 20736
#include <iostream>
#include <string>
using namespace std;
string a;
int main()
{
    cin>>a;
    for(int i=0;i<a.size();i++)
    for(int j=i+1;j<a.size();j++)
    {
        if(a[i]=='C'&&a[j]=='F'){cout<<"Yes"<<endl;return 0;}
    }
    cout<<"No"<<endl;
}

Measured memory_bytes: 256
#![allow(non_snake_case)]

use std::io::{stdin, Read};
use std::str::FromStr;
fn read_option<T: FromStr>() -> Option<T> {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok()
}
fn read<T: FromStr>() -> T {
    let opt = read_option();
    opt.expect("failed to parse token")
}

fn main() {
    let c: String = read();
    let ans = std::char::from_u32(c.chars().next().unwrap() as u32 + 1).unwrap_or('a');
    println!("{}", ans)
}


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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll a,b,c; cin >> a >> b >> c;
  if (b/a >= c) cout << c << endl;
  else cout << b/a << endl;
  return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main()
{
    int b, f, r, v;;
    int a[5][4][11];
    int i, n;
    
    for (b = 1; b <= 4; b++) {
        for (f = 1; f <= 3; f++) {
            for (r = 1; r <= 10; r++) a[b][f][r] = 0;
        }
    }
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
        scanf("%d%d%d%d", &b, &f, &r, &v);
        a[b][f][r] += v;
    }
    
    for (b = 1; b <= 4; b++) {
        for (f = 1; f <= 3; f++) {
            for (r = 1; r <= 10; r++) printf(" %d", a[b][f][r]);
            printf("\n");
        }
        if (b < 4) {
            printf("####################\n");
        }
    }
    return 0;
}



Measured memory_bytes: 2040
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;
const int INF=1e9;

int main(){
    int n;
    cin>>n;
    int d[n];
    for(int i=0; i<n; i++) cin>>d[i];
    set<int> se;
    for(int i=0; i<n; i++) se.insert(d[i]);
    cout<<se.size()<<endl;
}



Measured memory_bytes: 256
#include <iostream>
#include<iomanip>
#include <string>
#include<vector>
#include<algorithm>
#include<utility>
#include<queue>
#include<math.h>
#include<stack>
#include<set>
#include<map>
#include<ctime>
#include<cstdlib>
#define INF long long (int)1e18+1
#define MAX 200001
#define rep(i,n,m) for(int i=n;i<m;i++)

using namespace std;
	
int main() {
	long long a, b, c, d;
	cin >> a >> b >> c >> d;
	long long m = -1000000000000000001;
	m = max(m, a * c);
	m = max(m, a * d);
	m = max(m, b * c);
	m = max(m, b * d);
	cout << m << endl;

}


Measured memory_bytes: 3632
#include<stdio.h>

int main()
{
      int inputK,inputN,firstRow[3],secondRow[3],thirdRow[3];
      
      // Create a array for every row in a bingo and fill it with values
      scanf("%d%d%d",&firstRow[0],&firstRow[1],&firstRow[2]);
    
      scanf("%d%d%d",&secondRow[0],&secondRow[1],&secondRow[2]);
    
      scanf("%d%d%d",&thirdRow[0],&thirdRow[1],&thirdRow[2]);
      
      // Check if values in bingo are the same with the input
      scanf("%d",&inputN);
      for(int i=0;i<inputN;i++)
      {
        scanf("%d",&inputK);
          
        for(int j=0;j<3;j++)
        {
          if(firstRow[j]==inputK) firstRow[j]= -1;
        }
        for(int j=0;j<3;j++)
        {
          if(secondRow[j]==inputK) secondRow[j]= -1;
        }
        for(int j=0;j<3;j++)
        {
          if(thirdRow[j]==inputK) thirdRow[j]= -1;
        }
          
      }
      
      // Print 'Yes' if you have bingo, 'No' if there are no same values in rows
      if((firstRow[0]== -1 && firstRow[1]== -1 && firstRow[2]== -1 ) || (secondRow[0]== -1 && secondRow[1]== -1 && secondRow[2]== -1) || (thirdRow[0]== -1 && thirdRow[1]== -1 && thirdRow[2]== -1))
      {
          printf("Yes\n");
      }
      // Print 'Yes' if you have bingo, 'No' if there are no same values in columns
      else if((firstRow[0]== -1 && secondRow[0]== -1 && thirdRow[0]== -1) || (firstRow[1]== -1 && secondRow[1]== -1 && thirdRow[1]== -1) || (firstRow[2]== -1 && secondRow[2]== -1 && thirdRow[2]== -1))
      {
          printf("Yes\n");
      }
      // Print 'Yes' if you have bingo, 'No' if there are no same values in diagonall
      else if((firstRow[0]== -1 && secondRow[1]== -1 && thirdRow[2]== -1) || (firstRow[2]== -1 && secondRow[1]== -1 && thirdRow[0]== -1))
      {
         printf("Yes\n");
      }
      else
      {
         printf("No\n");
      }
      return 0;
}


Measured memory_bytes: 128
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[n];
        int[] nums = new int[n];
        int countA = 0;
        int countW = 0;
        for(int i = 0; i < m; i++){
            int index = sc.nextInt();
            String res = sc.next();
            if(arr[index-1] == 0 && res.equals("WA")) {
                nums[index - 1]+=1;
            }else if(arr[index-1] == 0 && res.equals("AC")){
                countA += 1;
                arr[index-1] = 1;
                countW+=nums[index-1];
            }
        }
        System.out.println(countA);
        System.out.println(countW);

    }
}


Measured memory_bytes: 64512
#abc098_b
def compare(str1,str2):
    ans = 0
    str1=''.join(set(str1))
    str2=''.join(set(str2))
    for c in str1:
        ans += str2.count(c)

    return ans

N = int(input())
S = input()
m = 0
for i in range(N):
#    print(S[:i],S[i:])
    tmp = compare(S[:i],S[i:])
    if m < tmp:
        m=tmp
print(m)

Measured memory_bytes: 3060
/*{{{*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<string>
#include<iostream>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include<bitset>
#include<vector>
#include<limits.h>
#include<assert.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define FOR(I, A, B) for (int I = (A); I <= (B); ++I)
#define FORS(I, S) for (int I = 0; S[I]; ++I)
#define RS(X) scanf("%s", (X))
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define CASET int ___T; scanf("%d", &___T); for(int cs=1;cs<=___T;cs++)
#define MP make_pair
#define PB emplace_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<PII> VPII;
typedef pair<LL,LL> PLL;
typedef vector<PLL> VPLL;
template<class T> void _R(T &x) { cin >> x; }
void _R(int &x) { scanf("%d", &x); }
void _R(int64_t &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template<class T, class... U> void R(T &head, U &... tail) { _R(head); R(tail...); }
template<class T> void _W(const T &x) { cout << x; }
void _W(const int &x) { printf("%d", x); }
void _W(const int64_t &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template<class T,class U> void _W(const pair<T,U> &x) {_W(x.F); putchar(' '); _W(x.S);}
template<class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W(const T &head, const U &... tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...); }
#ifdef HOME
 #define DEBUG(...) {printf("[DEBUG] ");W(__VA_ARGS__);}
#else
 #define DEBUG(...)
#endif
int MOD = 1e9+7;
void ADD(LL& x,LL v){x=(x+v)%MOD;if(x<0)x+=MOD;}
/*}}}*/
const int SIZE = 1<<20;
void solve() {
    int n,x,t;
    R(n,x,t);
    W((n+x-1)/x*t);
}
int main(){
#define MULTITEST 0
#if MULTITEST    
    CASET{
        solve();
    }
#else
    solve();
#endif
    return 0;
}


Measured memory_bytes: 3820
#include<stdio.h>
#include<cmath>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<complex>
#include<queue>
#include<set>
#include<utility>

#include<climits>
#include<iomanip>
#include<limits>
#include<thread>
#include<map>
#include<stack>
#include<numeric>
#include<cstring>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_set>
#include<unordered_map>
#include<fstream>
#include<list>
#include<functional>
#include<bitset>
#include<tuple>
#include <cstdio>
using namespace std;

#define pb          push_back
#define mp          make_pair
#define ll          long long int
#define hmap        unordered_map
#define pii         pair<int,int>
#define pdd         pair<double, double>
#define M           1000000007
#define MOD         998244353
#define fast        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define test        ll t; cin>>t; while(t--)
#define inp(a,n)    int a[n]; for(int i=0;i<n;i++)  cin>>a[i];
#define inpl(a,n)   ll a[n];  for(ll i=0;i<n;i++)   cin>>a[i];
#define out(a,n)    for(int i=0;i<n;i++) cout<<a[i]<<" "; cout<<endl;
#define outl(a,n)   for(ll i=0;i<n;i++)  cout<<a[i]<<" "; cout<<endl;
#define outv(v)     for(int i=0;i<v.size();i++) cout<<v[i]<<" ";  cout<<endl;
#define all(s)      (s).begin(),(s).end()

#define rep(i,n) for(int i=0; i<n; i++)
#define rep1(i,n) for(int i=1; i<n+1; i++)
#define repr(i,n) for(int i=n-1; i>=0; i--)
#define repr1(i,n) for(int i=n; i>0; i--)
#define FOR(i,j,n) for(int i=j; i < n; i++)
#define souatari(i,j,n) rep1(i,n-1)rep(j,i)
#define souatari1(i,j,n) for(int i=2; i<n+1; i++)rep1(j,i-1)
#define mp make_pair
#define F first
#define S second
#define elif else if
#define inpv(a,n)   vector<int>a(n);  for(ll i=0;i<n;i++)   cin>>a[i];



// ll  efficient_expo(ll a , ll  b , ll mod) {
// 	ll res = 1 ;
// 	// a = a % mod;
// 	// b = b % mod ;
// 	while (b > 0) {
// 		if (b & 1) res = (res * a) % mod ;
// 		a = (a * a) % mod ;
// 		b = b >> 1 ;
// 	}
// 	return res ;
// }

// int modd(int a, int b, int c)
// {
// 	if (b == 0) return 1;

// 	if (b % 2 == 0)
// 	{
// 		int x = modd(a, b / 2, c);
// 		return (x * x) % c;
// 	}
// 	else return (a % c * modd(a, b - 1, c)) % c;
// }

// ll recursive_mod(ll a , ll b , ll mod) {
// 	if (b == 0) return 1 ;
// 	if (b & 1) return (a % mod * recursive_mod(a, b - 1, mod)) % mod;
// 	ll x = (recursive_mod(a, b / 2, mod)) ;
// 	return ((x ) * (x )) % mod ;
// }

// ll leading_digit(ll a , ll b ,ll k) {
// 	long long double  pro = b*log10(a) ; 
// 	long long double deci = pro - floor(pro) ;
// 	int po = pow(10,k-1);
// 	return (ll)(((long long double)pow(10,deci))*po) ;
// }

// ll trailing_digits(ll a, ll b, ll k){
// 	ll res = 1 ;
// 	while()
// }

int main() {
// #ifndef ONLINE_JUDGE
// 	freopen("input.txt", "r", stdin);
// 	freopen("output.txt", "w", stdout);
// #endif
	fast ;
//     test{
        
//     }
    int a; int b ;
    cin >> a >> b ;
    cout << a*b ;
    
    

}


Measured memory_bytes: 3648
open Batteries
let n = read_int ()
let ary = Array.init n (fun a -> 0)
let _ = read_line () |> String.split_on_char ' ' |> List.map (fun b -> ary.((int_of_string b)-1) <- ary.((int_of_string b)-1) + 1)
let rec loop lst =
  match lst with
  | [] -> ()
  | first :: rest -> Printf.printf "%d\n" first; loop rest

let _ = loop @@ Array.to_list ary

Measured memory_bytes: 28556
import java.util.*;
import java.io.*;

public class Main{

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        //test cases
        int n = in.nextInt();
        int k = in.nextInt();
       
        //array input
        //int N = in.nextInt();
        int[] arr = new int[n];
        
        for(int i=0 ; i<n ; i++){
            arr[i] = in.nextInt();
        }
        int step = (int)Math.ceil((float)(n-k)/(k-1)) +1;
        System.out.println(step);
        
    }
}

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

#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define DUMP(v) REP(aa, (v).size()) { cout << v[aa]; if (aa != v.size() - 1)cout << " "; else cout << endl; }
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

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


using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll max(ll a, int b) { return max(a, ll(b)); }
ll max(int a, ll b) { return max(ll(a), b); }
ll min(ll a, int b) { return min(a, ll(b)); }
ll min(int a, ll b) { return min(ll(a), b); }
///(´・ω・`)(´・ω・`)(´・ω・`)(´・ω・`)(´・ω・`)(´・ω・`)///

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	string s;
	cin >> s;
	cout << s[0] << s.size()-2 << s[s.size() - 1] << endl;
}


Measured memory_bytes: 256
#ABC113 C
#N個の県に合計M個の市がある
#市iが誕生したのはYi年で県Piに属する
#市iが県Piのなかでx番目に誕生しているとき,上6桁がPiで下6桁がxとなる番号を振りたい
#すべての市に認識番号を振り,iの順に出力せよ
#ただし市が1つも属さない県も存在しうる

#愚直な方針
#[i,Pi,Yi]を要素とする多重リストをつくる
N, M = map(int, input().split(' '))
city = []
for i in range(M):
	#[i,Pi,Yi]からなる多重リストをつくる
	city.append([i+1]+list(map(int, input().split(' '))))

#Pi->Yiの順番に多段階ソート (Piの数のオーダーは10**5)
from operator import itemgetter
city = sorted(city, key=itemgetter(1,2))

#各要素(=リスト)の末尾にxを追加する
#ただしxは要素をたどるごとに1ずつ増やしていくがPiが変わったら1にリセットする
x = 1
for n in range(M):
	if n==0:
		city[n].append(1)
	else:
		if city[n][1] != city[n-1][1]:
			x = 1
		else:
			x += 1
		city[n].append(x)			

#リストをふたたびiでソート
city = sorted(city, key=lambda l: l[0])

#認識番号をゼロパディングしてPi6桁+x6桁で出力
for c in city:
	print(str(c[1]).zfill(6) + str(c[3]).zfill(6))


Measured memory_bytes: 38504
def check(a):
    b = [a[0]]
    c = [0]
    for i in range(1, len(a)):
        x = a[i]
        if x < b[-1] and x < c[-1]:
            return False
        elif b[-1] < x < c[-1]:
            b.append(x)
        elif c[-1] < x < b[-1]:
            c.append(x)
        elif b[-1] > c[-1]:
            b.append(x)
        else:
            c.append(x)
    return True

n = int(input())
for i in range(n):
    a = list(map(int, input().split()))
    print('YES' if check(a) else 'NO')

Measured memory_bytes: 6720
local mmi, mma = math.min, math.max
-- local bls, brs = bit.lshift, bit.rshift
local mfl, mce = math.floor, math.ceil
local n = io.read("*n")
local t = {}
for i = 1, n do
  t[i] = io.read("*n")
end
if n % 2 == 0 then
  local hn = mfl(n / 2)
  local p1, p2 = {t[1]}, {t[2]}
  for i = 2, hn do
    p1[i] = p1[i - 1] + t[2 * i - 1]
    p2[i] = p2[i - 1] + t[2 * i]
  end
  local ret = mma(p1[hn], p2[hn])
  for i = 1, hn - 1 do
    local cand = p1[i] + p2[hn] - p2[i]
    ret = mma(ret, cand)
  end
  print(ret)
  -- if ret < 100000000000000 then
  -- else
  --   print("100000000000000")
  -- end
elseif n == 3 then
  print(mma(t[1], mma(t[2], t[3])))
else
  -- use0, nouse0, use1, nouse1, use2, nouse2
  local dp = {t[1], false, false, 0, false, false}
  for i = 2, n do
    local dst = {false, false, false, false, false, false}
    if dp[1] then
      dst[2] = dp[1]
    end
    if dp[2] then
      dst[1] = dp[2] + t[i]
      dst[4] = dp[2]
    end
    if dp[3] then
      if dst[4] then
        dst[4] = mma(dst[4], dp[3])
      else
        dst[4] = dp[3]
      end
    end
    if dp[4] then
      dst[3] = dp[4] + t[i]
      dst[6] = dp[4]
    end
    if dp[5] then
      if dst[6] then
        dst[6] = mma(dst[6], dp[5])
      else
        dst[6] = dp[5]
      end
    end
    if dp[6] then
      dst[5] = dp[6] + t[i]
    end
    for j = 1, 6 do
      dp[j] = dst[j]
      -- io.write(tostring(dp[j]))
      -- io.write(j == 6 and "\n" or " ")
    end
  end
  if not dp[5] then
    print(dp[6])
  elseif not dp[6] then
    print(dp[5])
  else
    print(mma(dp[5], dp[6]))
  end
end


Measured memory_bytes: 15828
//↓見なくていいよ！ここから--------------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
var obj;
var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  myerr("-----start-----");
  var start = new Date();
  Main();
  var end = new Date() - start;
  myerr("----- end -----");
  myerr("time : " + (end) + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){  
  var returnObj = {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(!this.hasNext()){throw "ArrayIndexOutOfBoundsException これ以上ないよ";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}
  };
  return returnObj;
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す 1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}

//↑見なくていいよ！ここまで--------------------------------------------------
function Main(){
	var s = next();
	var t = next();
	var dp = new Array(s.length + 1);
	for(var i = 0; i < s.length + 1; i++){
		dp[i] = new Array(t.length + 1);
	}
	dp[0][0] = 0;
	for(var i = 1; i <= s.length; i++){
		for(var j = 1; j <= t.length; j++){
			var mae1 = dp[i - 1][j];
			var mae2 = dp[i][j - 1];
			var mae3 = dp[i - 1][j - 1];
			if(mae1 == null){
				mae1 = 0;
			}
			if(mae2 == null){
				mae2 = 0;
			}
			if(mae3 == null){
				mae3 = 0;
			}
			if(s[i - 1] == t[j - 1]){
				dp[i][j] = mae3 + 1;
			}else{
				dp[i][j] = Math.max(mae2, mae1);
			}
		}
	}
	var maxLength = dp[s.length][t.length];
	var output = "";
	var sLen = s.length;
	var tLen = t.length;
	while(maxLength > 0){
		if(s[sLen - 1] == t[tLen - 1]){
			output = s[sLen - 1] + output;
			sLen--;
			tLen--;
			maxLength--;
		}else if(dp[sLen][tLen] == dp[sLen][tLen - 1]){
			tLen--;
		}else{
			sLen--;
		}
	}
	myout(output);
}

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

using namespace std; 

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef pair<LL, LL> PLL;
typedef vector<PLL> VPLL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_ASC;
typedef priority_queue<PII> PQ_DESC_PII;
typedef priority_queue<PII, vector<PII>, greater<PII>> PQ_ASC_PII;

#define ALL(c) (c).begin(),(c).end()
#define PB push_back
#define MP make_pair
#define SORT_ASC(c) sort(ALL(c))
//#define SORT_DESC(c) sort(ALL(c), greater<typeof(*((c).begin()))>())
#define SORT_DESC(c) sort((c).rbegin(),(c).rend())
#define REV(c) reverse((c).begin(), (c).end())
#define SIZE(a) int((a).size())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ROF(i,a,b) for(int i=(b-1);i>=(a);--i)
#define REP(i,n) FOR(i,0,n)
#define PER(i,n) ROF(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int LARGE_INT = 1e9+100;
const int INF = 2e9+100;
const LL INF_LL = (LL)INF * 300 * 300;
const int MOD = 1e9+7;

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

void Main()
{
    int n,k,c;cin>>n>>k>>c;
    string s;cin>>s;

    VI l(k),r(k);

    int now=0;

    REP(i,k){
        while(s[now]=='x') now++;

        l[i]=now;
        now+=(c+1);
    }
    
    now = n-1;
    PER(i,k){
        while(s[now]=='x') now--;

        r[i]=now;
        now-=(c+1);
    }

    REP(i,k){
        if(l[i]==r[i]){
            cout<<l[i]+1<<endl;
        }
    }

	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
    return 0;
}

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

typedef long long ll;
typedef long double ld;
#define pi 3.14159265359;
#define inf (1 << 21);
#define mod 1000000007;

int main() {
    int N; cin >> N;
    vector<int> d(N);
    for (int i = 0; i < N; i++) {
        cin >> d.at(i);
    }
    sort(d.begin(), d.end());
    int left = N / 2 - 1, right = left + 1;
    int ans;
    if (d.at(left) == d.at(right)) {
        ans = 0;
    }
    else {
        ans = d.at(right) - d.at(left);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<ll,ll> P;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-9;
int main(){
    int n;cin>>n;
    map<string,int> mp;
    string b;
    bool f=true;
    for(int i=0;i<n;i++){
        string s;cin>>s;
        
        if(mp.count(s)){
            f=false;
        }
        mp[s]++;
        if(i){
            if(s[0]!=b[b.length()-1]){
                f=false;
            }
        }
        b=s;
    }
    if(f){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
}




Measured memory_bytes: 256
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	long long n,k,num1=0,num2=0,sum,flag=1,x,x1,x2;
	cin>>n>>k;
	for(int i=1;i<=n;i++)
	{
		cin>>x;
		if(flag==1)
		{
			if(x==1)
				flag=0;
			else
				num1++;
		}
		else
			num2++;
	}
	if(num1%(k-1)==0)
		sum=num1/(k-1);
	else
		sum=num1/(k-1)+1;
	if(num2%(k-1)==0)
		sum+=num2/(k-1);
	else
		sum+=(num2/(k-1)+1);
	x1=num1%(k-1);
	x2=num2%(k-1);
	if(x1+x2<=k-1&&x1>0&&x2>0)
    	sum--;
	cout<<sum;//<<endl<<x1<<endl<<x2;
	return 0;
}

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

const int MAX_N = 100;

int main() {
	int N, s[MAX_N], S = 0;

	std::cin >> N;
	for(int i = 0; i < N; ++i) {
		std::cin >> s[i];
		S += s[i];
	}

	if(S % 10 != 0) {
		std::cout << S << std::endl;
		return 0;
	}

	std::sort(s, s + N);
	for(int i = 0; i < N; ++i) {
		if(s[i] % 10 != 0) {
			std::cout << S - s[i] << std::endl;
			return 0;
		}
	}

	std::cout << 0 << std::endl;
}


Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Collections;

public class Main {
  /**
   * main method.
   */
  public static void main(String[] args) throws IOException {
    InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
    BufferedReader in = new BufferedReader(reader);
    
    //カードの枚数
    String line = in.readLine();
    int N = Integer.parseInt(line);	
    
    //i 枚目のカードの数字
    line = in.readLine();
    String[] aArrayStr = line.split(" ");	
   
    Integer[] aArray = new Integer[N];
    for (int i = 0; i < N; i++) {
    	aArray[i] = Integer.parseInt(aArrayStr[i]);	
    }
    
    Arrays.sort(aArray, Collections.reverseOrder());
    
    int alice = 0;
    int bob = 0;
    
    Arrays.sort(aArray, Collections.reverseOrder());
    
    for (int i = 0; i < N; i++) {
    	if (i % 2 == 0) {
    		alice += aArray[i];
    	} else {
    		bob += aArray[i];
    	}
    	
    }
    
    System.out.println(alice - bob);
    
  }
}

Measured memory_bytes: 23252
//Enclose Pins with a Rubber Band
#include<bits/stdc++.h>
using namespace std;
typedef complex<double> p;

namespace std{
  bool operator<(const p& a, const p& b){
    return real(a)!=real(b) ? real(a)<real(b) : imag(a)<imag(b);
  }
}
double cross(const p&a, const p& b){
  return imag(conj(a)*b);
}
double dot(const p& a, const p& b){
  return real(conj(a)*b);
}
int ccw(p a, p b, p c){
  b-=a; c-=a;
  if(cross(b,c)>0)return +1;
  if(cross(b,c)<0)return -1;
  if(dot(b,c)<0)return +2;
  if(norm(b)<norm(c))return -2;
  return 0;
}
vector<p> convex_hull(vector<p> ps){
  int n=ps.size(), k=0;
  sort(ps.begin(), ps.end());
  vector<p> ch(2*n);
  for(int i=0; i<n; ch[k++]=ps[i++])
    while(k>=2 && ccw(ch[k-2], ch[k-1], ps[i])<=0) --k;
  for(int i=n-2, t=k+1; i>=0; ch[k++]=ps[i--])
    while(k>=t&&ccw(ch[k-2], ch[k-1], ps[i])<=0) --k;
  ch.resize(k-1);
  return ch;
}

int main(){
  int n;
  complex<double> pt;
  vector<p> ps;
  while(true){
    cin>>n;
    ps.clear();
    if(n==0)break;
    for(int i=0; i<n; i++){
      scanf("%lf,%lf", &real(pt), &imag(pt));
      ps.push_back(pt);
    }
    cout<<n-convex_hull(ps).size()<<endl;
  }
  return 0;
}

Measured memory_bytes: 1296
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
#include <queue>
//#include <bits/stdc++.h>
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define FORR(i,i0,n) for(int (i)=(n)-1; (i)>=(i0);(i)--)
#define rn return
#define fi first
#define se second
typedef std::pair<int,int> P;
using namespace std;
using ll = long long;

// priority queue 大きいじ順番に出てくる

int main(){
    priority_queue<pair<ll,int>> q;
    int N,M;
    cin >> N >> M;
    int B; ll C,A; ll ans=0;
    rep(i,N){
        cin >> A;
        q.push(make_pair(A, 1));
    }
    rep(i,M){
        cin >> B >> C;
        q.push(make_pair(C, B));
    }
    rep(i,N){
        auto p = q.top();
        q.pop();
        ans += p.first;
        if (p.second>1){
            q.push(make_pair(p.first, p.second-1));
        }
    }
    cout << ans;
    rn 0;
}



Measured memory_bytes: 6384
////**********CODED BY :- DURGESH KUMAR***************////

/*
⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷⠈⣿⡆⢹⢷⡌⠻⡾⢋⣱⣯⣿⣿⣿⣿⡆⢻⡿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡎⣿⢾⡿⣿⡆⢸⣽⢻⣄⠹⣷⣟⣿⣄⠹⣟⣿⣿⣟⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⢸⣯⣟⣧⠘⣷⠈⡯⠛⢀⡐⢾⣟⣷⣻⣿⣿⣿⡿⡌⢿⣻⣿⣿
⣿⣿⣿⣿⣿⣿⣧⢸⡿⣟⣿⡇⢸⣯⣟⣮⢧⡈⢿⣞⡿⣦⠘⠏⣹⣿⣽⢿⣿⣿⣿⣿⣯⣿⣿⣿⡇⢸⣿⣿⣾⡆⠹⢀⣠⣾⣟⣷⡈⢿⣞⣯⢿⣿⣿⣿⢷⠘⣯⣿⣿
⣿⣿⣿⣿⣿⣿⣿⡈⣿⢿⣽⡇⠘⠛⠛⠛⠓⠓⠈⠛⠛⠟⠇⢀⢿⣻⣿⣯⢿⣿⣿⣿⣷⢿⣿⣿⠁⣾⣿⣿⣿⣧⡄⠇⣹⣿⣾⣯⣿⡄⠻⣽⣯⢿⣻⣿⣿⡇⢹⣾⣿
⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⡽⡇⢸⣿⣿⣿⣿⣿⣞⣆⠰⣶⣶⡄⢀⢻⡿⣯⣿⡽⣿⣿⣿⢯⣟⡿⢀⣿⣿⣿⣿⣿⣧⠐⣸⣿⣿⣷⣿⣿⣆⠹⣯⣿⣻⣿⣿⣿⢀⣿⢿
⣿⣿⣿⣿⣿⣿⣿⣿⠘⣯⡿⡇⢸⣿⣿⣿⣿⣿⣿⣿⣧⡈⢿⣳⠘⡄⠻⣿⢾⣽⣟⡿⣿⢯⣿⡇⢸⣿⣿⣿⣿⣿⣿⡀⢾⣿⣿⣿⣿⣿⣿⣆⠹⣾⣷⣻⣿⡿⡇⢸⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⠇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠻⡇⢹⣆⠹⣟⣾⣽⣻⣟⣿⣽⠁⣾⣿⣿⣿⣿⣿⣿⣇⣿⣿⠿⠛⠛⠉⠙⠋⢀⠁⢘⣯⣿⣿⣧⠘⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⡈⣿⡃⢼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡙⠌⣿⣆⠘⣿⣞⡿⣞⡿⡞⢠⣿⣿⣿⣿⣿⡿⠛⠉⠁⢀⣀⣠⣤⣤⣶⣶⣶⡆⢻⣽⣞⡿⣷⠈⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠘⠁⠉⠉⠉⠉⠉⠉⠉⠉⠉⠙⠛⠛⢿⣄⢻⣿⣧⠘⢯⣟⡿⣽⠁⣾⣿⣿⣿⣿⣿⡃⢀⢀⠘⠛⠿⢿⣻⣟⣯⣽⣻⣵⡀⢿⣯⣟⣿⢀⣿
⣿⣿⣿⣟⣿⣿⣿⣿⣶⣶⡆⢀⣿⣾⣿⣾⣷⣿⣶⠿⠚⠉⢀⢀⣤⣿⣷⣿⣿⣷⡈⢿⣻⢃⣼⣿⣿⣿⣿⣻⣿⣿⣿⡶⣦⣤⣄⣀⡀⠉⠛⠛⠷⣯⣳⠈⣾⡽⣾⢀⣿
⣿⢿⣿⣿⣻⣿⣿⣿⣿⣿⡿⠐⣿⣿⣿⣿⠿⠋⠁⢀⢀⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣌⣥⣾⡿⣿⣿⣷⣿⣿⢿⣷⣿⣿⣟⣾⣽⣳⢯⣟⣶⣦⣤⡾⣟⣦⠘⣿⢾⡁⢺
⣿⣻⣿⣿⡷⣿⣿⣿⣿⣿⡗⣦⠸⡿⠋⠁⢀⢀⣠⣴⢿⣿⣽⣻⢽⣾⣟⣷⣿⣟⣿⣿⣿⣳⠿⣵⣧⣼⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣽⣳⣯⣿⣿⣿⣽⢀⢷⣻⠄⠘
⣿⢷⣻⣿⣿⣷⣻⣿⣿⣿⡷⠛⣁⢀⣀⣤⣶⣿⣛⡿⣿⣮⣽⡻⣿⣮⣽⣻⢯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⢀⢸⣿⢀⡆
⠸⣟⣯⣿⣿⣷⢿⣽⣿⣿⣷⣿⣷⣆⠹⣿⣶⣯⠿⣿⣶⣟⣻⢿⣷⣽⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢀⣯⣟⢀⡇
⣇⠹⣟⣾⣻⣿⣿⢾⡽⣿⣿⣿⣿⣿⣆⢹⣶⣿⣻⣷⣯⣟⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢀⡿⡇⢸⡇
⣿⣆⠹⣷⡻⣽⣿⣯⢿⣽⣻⣿⣿⣿⣿⣆⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⢸⣿⠇⣼⡇
⡙⠾⣆⠹⣿⣦⠛⣿⢯⣷⢿⡽⣿⣿⣿⣿⣆⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠎⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⢀⣿⣾⣣⡿⡇
⣿⣷⡌⢦⠙⣿⣿⣌⠻⣽⢯⣿⣽⣻⣿⣿⣿⣧⠩⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⢰⢣⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⢀⢀⢿⣞⣷⢿⡇
⣿⣽⣆⠹⣧⠘⣿⣿⡷⣌⠙⢷⣯⡷⣟⣿⣿⣿⣷⡀⡹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣈⠃⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⢀⣴⡧⢀⠸⣿⡽⣿⢀
⢻⣽⣿⡄⢻⣷⡈⢿⣿⣿⢧⢀⠙⢿⣻⡾⣽⣻⣿⣿⣄⠌⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⢁⣰⣾⣟⡿⢀⡄⢿⣟⣿⢀
⡄⢿⣿⣷⢀⠹⣟⣆⠻⣿⣿⣆⢀⣀⠉⠻⣿⡽⣯⣿⣿⣷⣈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⣠⠘⣯⣷⣿⡟⢀⢆⠸⣿⡟⢸
⣷⡈⢿⣿⣇⢱⡘⢿⣷⣬⣙⠿⣧⠘⣆⢀⠈⠻⣷⣟⣾⢿⣿⣆⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⣠⡞⢡⣿⢀⣿⣿⣿⠇⡄⢸⡄⢻⡇⣼
⣿⣷⡈⢿⣿⡆⢣⡀⠙⢾⣟⣿⣿⣷⡈⠂⠘⣦⡈⠿⣯⣿⢾⣿⣆⠙⠻⠿⠿⠿⠿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢋⣠⣾⡟⢠⣿⣿⢀⣿⣿⡟⢠⣿⢈⣧⠘⢠⣿
⣿⣿⣿⣄⠻⣿⡄⢳⡄⢆⡙⠾⣽⣿⣿⣆⡀⢹⡷⣄⠙⢿⣿⡾⣿⣆⢀⡀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⣀⣠⣴⡿⣯⠏⣠⣿⣿⡏⢸⣿⡿⢁⣿⣿⢀⣿⠆⢸⣿
⣿⣿⣿⣿⣦⡙⣿⣆⢻⡌⢿⣶⢤⣉⣙⣿⣷⡀⠙⠽⠷⠄⠹⣿⣟⣿⣆⢙⣋⣤⣤⣤⣄⣀⢀⢀⢀⢀⣾⣿⣟⡷⣯⡿⢃⣼⣿⣿⣿⠇⣼⡟⣡⣿⣿⣿⢀⡿⢠⠈⣿
⣿⣿⣿⣿⣿⣷⣮⣿⣿⣿⡌⠁⢤⣤⣤⣤⣬⣭⣴⣶⣶⣶⣆⠈⢻⣿⣿⣆⢻⣿⣿⣿⣿⣿⣿⣷⣶⣤⣌⣉⡘⠛⠻⠶⣿⣿⣿⣿⡟⣰⣫⣴⣿⣿⣿⣿⠄⣷⣿⣿⣿
*/
#include<bits/stdc++.h>
#define ll long long
#define ff double
#define endl "\n"
#define pb push_back
#define vi vector<int>
#define pii pair<int,int>
#define mii map<int,int>
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);
#define buffer cin.ignore(numeric_limits<streamsize>::max(),'\n');

using namespace std;

int main()
{


ll n;
string s;
cin>>n;
buffer
getline(cin,s);
if(n<3200)
cout<<"red"<<endl;
else
cout<<s<<endl;
  return 0;
}


Measured memory_bytes: 256
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        #[cfg(debug_assertions)]
        writeln!(&mut std::io::stderr(), concat!("[DEBUG] ", $(stringify!($a), "={:?} "),*), $($a),*);
    }
}

#[allow(unused_imports)]
use std::cmp::{min, max};

#[allow(unused_imports)]
use std::io::Write;

fn main() {
    input!{
      n: usize,
      k: usize,
    }

    let max = n/2 + n%2;
    if k <= max {
        println!("{}", "YES");
    } else {
        println!("{}", "NO");
    }
}


Measured memory_bytes: 4352
using System;
using System.Linq;

namespace ABC158
{
    class Program
    {
        static void Main(string[] args)
        {
            long[] nab = Console.ReadLine().Split().Select(long.Parse).ToArray();
            long ans = ((nab[0] / (nab[1] + nab[2])) * nab[1]) + Math.Min(nab[0] % (nab[1] + nab[2]), nab[1]);
            Console.WriteLine(ans);
        }
    }
}


Measured memory_bytes: 13268
n = int(input())
s = [input() for i in range(n)]
s_dict = {}
ans = 0
for _s in s:
  _s = sorted(_s)
  _s = ''.join(_s)
  s_dict.setdefault(_s, 0)
  ans += s_dict[_s]
  s_dict[_s] += 1
print(ans)

Measured memory_bytes: 24980
#include<bits/stdc++.h>
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
static const ll MAX = 1000000000000000;
static const int NIL = -1;
using namespace std;
const long double EPS = 0.0000000001;
const long double PI = (acos(-1));
const ll MOD = 1e9 + 7;

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")



int main(){
    ll n,count = 0; cin >> n;
    vector<ll> a(n);
    rep(i,n) cin >> a[i];
    sort(a.begin(),a.end());

    for(int i = 1; i < n; i ++){
        if(a[i-1] == a[i]) count ++;
    }

    if(count%2 == 0) cout << n-count;
    else cout << n-count-1;
}

Measured memory_bytes: 4028
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));
		 int num = Integer.parseInt(br.readLine());
		 System.out.println(num * num * num);
	}

}

Measured memory_bytes: 16856
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
fn main(){
    let (t,x) = {
        let s = read_vec::<f64>();
       fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
fn main(){
    let (t,x) = {
        let s = read_vec::<f64>();
        (s[0],s[1])
    };
    let ans:f64 = t / x;
    println!("{: <.010}",ans);
} (s[0],s[1])
    };
    let ans:f64 = t / x;
    println!("{: <.010}",ans);
}

Measured memory_bytes: 4352
#include <stdio.h>
int main()
{
	int c1,c5,c10,c50,c100,c500;
	scanf("%d %d %d %d %d %d",&c1,&c5,&c10,&c50,&c100,&c500);
	if(c1+c5*5+c10*10+c50*50+c100*100+c500*500>=1000)
		printf("1\n");
	else
		printf("0\n");
	return 0;
}

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

int main(){
    int i,n,c[21],v[21];
    int vc=0;

    cin >> n;

    for (i = 0; i < n; i++){
        cin >> v[i];
    }
    for (i = 0; i < n; i++){
        cin >> c[i];
    }
    for (i = 0; i < n; i++){
        if(v[i]>c[i])vc+=v[i]-c[i];
    }
    cout << vc  <<endl;
    return 0;
}


Measured memory_bytes: 256
from decimal import Decimal, getcontext
getcontext().prec = 32

N = Decimal(int(input()))

if N % 2 == 1:
    print(0)
    exit(0)

ans = Decimal(0)
for i in range(1, 28):
    ans += (N // (Decimal(5) ** Decimal(i))) // Decimal(2)

print(ans)

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

#include <math.h>
#include <stdlib.h>


#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

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

//INT_MAX	2,147,483,647 = 2*1.0e9

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    
    int N, Y;
    cin >> N >> Y;

    for(int i = 0; i <= N; i++){
        for(int j = 0; i + j <= N; j++){
            int sum = i * 10000 + j * 5000 + (N - i - j) * 1000;
            if(sum == Y){
                cout << i << " " << j << " " << N - i - j << endl;
                return 0;
            }
        }
    }

    printf("-1 -1 -1\n");

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll X, K, D;
  cin >> X >> K >> D;
  ll a = abs(X);
  ll time = a / D;
  time = min(time, K);
  if (X < 0) {
    X += time * D;
  }
  else {
    X -= time * D;
  }
  K -= time;
  if (K % 2 == 0) {
    cout << abs(X) << "\n";
  }
  else {
    if (X < 0) {
      cout << abs(X + D) << "\n";
    }
    else {
      cout << abs(X - D) << "\n";
    }
  }
}


Measured memory_bytes: 3648
n = int(input())
k = int(input())
x = list(map(int, input().split()))
ans = 0
for i in range(n):
    if x[i] >= k:
        ans += 2 * (x[i] - k)
    else:
        ans += 2 * min(x[i], k - x[i])
print(ans)


Measured memory_bytes: 2940
import kotlin.math.pow
import kotlin.math.sqrt

fun main() {
    var count = 0
    val (n, d) = readLine()?.split(" ")?.map { Integer.parseInt(it) } ?: return
    for (i in 0 until n) {
        val (x, y) = readLine()?.split(" ")?.map { it.toDouble() } ?: return
        if (sqrt(x.pow(2.0) + y.pow(2.0)) <= d.toDouble()) count++
    }
    println(count)
}

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

int main() {
	char str[32];
	
	cin >> str;
	
	if(str[0] == 'Y' && str[1] == 'A' && str[2] == 'K' && str[3] == 'I'){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
	
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
  int a, b, m;
  cin>>a>>b>>m;
  vector<int> fridge(a, 0), micro(b, 0);
  for(int i = 0; i < a; ++i)cin>>fridge[i];
  for(int i = 0; i < b; ++i)cin>>micro[i];
  int res = 1e9;
  int t = *min_element(fridge.begin(), fridge.end());
  int tx = *min_element(micro.begin(), micro.end());
  res = t + tx;
  for(int i = 0; i < m; ++i){
    int x, y, c;
    cin>>x>>y>>c;
    x--, y--;
    int r = (fridge[x] + micro[y]) - c;
    res = min(res, r);
  }
  cout<<res<<endl;
  return 0;
}


Measured memory_bytes: 1024
#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;

int p, m, c;

int main()
{
	in >> p >> m >> c;
	out << p + m + c << std::endl;
	return 0;
}


Measured memory_bytes: 3096