akhauriyash/Code-Regression huggingface dataset:
import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x=sc.nextInt();
        int n=sc.nextInt();
        int[] p=new int[n];
        for(int i=0;i<n;i++) {
        	p[i]=sc.nextInt();
        }
        for(int i=0;i<=100;i++) {
        	int num1=x-i,num2=x+i;
        	int count1=0,count2=0;
        	for(int j=0;j<n;j++) {
        		if(p[j]==num1)	count1++;
        		if(p[j]==num2)	count2++;
        	}
        	if(count1==0) {
        		System.out.println(num1);
        		break;
        	}else if(count2==0) {
        		System.out.println(num2);
        		break;
        	}
        }
    }
}

Measured memory_bytes: 35900
#include <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<29;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-9;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

int n;

int main(){
	cin>>n;
	bool B=0;
	for(int i=1;i<=1000;i++){
		int t=n-100*i;
		if(0<=t&&t<=5*i) B=1;
	}
	cout<<B<<endl;
}

Measured memory_bytes: 256
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long int ll;

int N, T;

int main(){
	scanf("%d %d", &N, &T);
	int res = 1 << 30;
	for(int i = 0; i < N; i++){
		int c, t;
		scanf("%d %d", &c, &t);
		if(t > T) continue;
		res = min(res, c);
	}
	if(res == 1 << 30) printf("TLE\n");
	else printf("%d\n", res);
	return 0;
}


Measured memory_bytes: 128
N,M=map(int,input().split())

for i in range(N):
  Nlist=list(map(int,input().split()))
  if i==0:
    answerlist=Nlist[1:]
  else:
    answerlist_update=[]
    for j in range(len(answerlist)):
      if answerlist[j] in Nlist[1:]:
        answerlist_update.append(answerlist[j])
    answerlist=answerlist_update
print(len(answerlist))

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

int main() {
  int A, B, K;
  cin >> A >> B >> K;

  if (A + K - 1 < B - K + 1) {
    for (int i = A; i < A + K; ++i) {
      cout << i << endl;
    }
    for (int i = B - K + 1; i <= B; ++i) {
      cout << i << endl;
    }
  } else {
    for (int i = A; i <= B; ++i) {
      cout << i << endl;
    }
  }

  return 0;
}


Measured memory_bytes: 256
// https://atcoder.jp/contests/abc018/tasks/abc018_4

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

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define pow(x) x*x
#define ll long long
static const int MAX = 10000;
static const ll INFTY = 1e18;

struct edge {
    ll to, cost;
};

using Graph = vector<vector<int>>;
using _Graph = vector<vector<edge>>;
// 入力
// int H, W;
vector<vector<char>> field;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

// 深さ優先探索
vector<bool> seen;
vector<int> colors;

int start(int N){

  int prev = 0;
  while( N > 0 ){
    prev = N;
    N /= 10;
  }
  return prev;
}

int end(int N){

  int N_copy = N;
  N_copy = (N_copy / 10) * 10;
  return N - N_copy;
}

int main() {

  ll N;
  cin >> N;
  int hako[10][10];

  REP(i, 10)REP(j, 10) hako[i][j] = 0;

  for(int i = 1; i <= N; i++){
    int _s = start(i);
    int _e = end(i);
    hako[_s][_e]++;
  }

  ll ans = 0;
  REP(i, 10){
    REP(j, 10){
      int kumi = hako[i][j] * hako[j][i];
      ans += kumi;
    }
  }

  cout << ans << endl;

  

}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/

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

// #define int long long
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define SORT(v, n) sort(v, v + n);
#define REVERSE(v, n) reverse(v, v+n);
#define vsort(v) sort(v.begin(), v.end());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cout(d) cout<<d<<endl;
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);
#define replace_all(s, b, a) replace(s.begin(),s.end(), b, a);
#define PI (acos(-1))
#define FILL(v, n, x) fill(v, v + n, x);
#define sz(x) int(x.size())

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vs = vector<string>;
using vpll = vector<pair<ll, ll>>;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const ll INF = 1e15;
const int MOD = 1e9+7;
const ll LINF = 1e18;

ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

ll ngcd(vector<ll> a) {
  ll res = a[0];
  for(ll i=1; i<a.size() && res!=1; i++) res = gcd(a[i], res);
  return res;
}
ll nlcm(vector<ll> a){
  ll res = a[0];
  for(ll i=1; i<a.size(); i++) res = lcm(a[i], res);
  return res;
}
bool is_prime(ll n) {
  if(n < 2) return false;
  for (ll i = 2; i * i <= n; i++) if (n % i == 0) return false;
  return true;
}
ll digsum(ll n) {
  ll res=0;
  while(n) res += n%10, n /= 10;
  return res;
}
ll digcnt(ll n){
  ll res=0;
  while(n) res++, n /= 10;
  return res;
}
vector<ll> divisor(ll n) {
  vector<ll> res;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i) res.push_back(n / i);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
map<ll, ll> prime_factor(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) ++res[i], n /= i;
  }
  if (n != 1) res[n] = 1;
  return res;
}

signed main()
{
  cin.tie( 0 ); ios::sync_with_stdio( false );
  
  ll n,k; cin>>n>>k;
  ll sum=0;
  vll a(n);
  rep(i,n){
    cin>>a[i];
    sum+=a[i];
  }
  sort(a.rbegin(),a.rend());
  ll ans=1;
  auto div=divisor(sum);
  for(auto e: div){
    ll cnt=LINF;
    vll b(n);
    rep(i,n) b[i]=a[i]%e;
    vsort(b);
    ll plus=0, minus=0;
    rep(i,n) plus+=e-b[i];
    rep(i,n){
      minus+=b[i];
      plus-=(e-b[i]);
      if(plus==minus){
        if(plus<=k) chmax(ans,e);
      }
    }
  }
  cout<<ans<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
#define int int64
#define rep(i, n) for(int i=0; i<n; i++)
#define FOR(i, a, b) for(int i=a; i<b; i++)
#define SORT(x) sort(x.begin(), x.end())
#define GSORT(x) sort(x.begin(), x.end(), greater<int>())
#define mk make_pair
#define fi first
#define se second
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define V(T) vector<T>
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> vi;
typedef vector<vi> vvi;
int max(int a, int b) {if(b>a) return b; else return a;}
int min(int a, int b) {if(b<a) return b; else return a;}
const int INF = 1e18;

int euq(int a, int b) {return b ? euq(b, a%b) : a;}

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

    int g=0, mx = 0;
    vi A(N);
    rep(i, N) {
        cin >> A[i];
        g = euq(g, A[i]);
        mx = max(mx, A[i]);
    }

    if(mx < K) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }

    if(g==1) {
        cout << "POSSIBLE" << endl;
    } else {
        if(K%g==0) {
            cout << "POSSIBLE" << endl;
        }
        else cout << "IMPOSSIBLE" << endl;
    }


    return 0;
}

Measured memory_bytes: 1024
#include<iostream>
using namespace std;
#define max(a,b) (((a)>(b))?(a):(b))
int main(){
	int a,b;
    cin>>a>>b;
  	int c=a+b;
    int d=a-b;
    int e=a*b;
    cout<<max(c,max(d,e));
	return 0;
}

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

using namespace std;
#define PI              3.1415926536

#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod 1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define REP(i,n) for(i=0;i<n;i++)
#define FIO             ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());

bool f(int x, int y)
{
	return x > y;
}
void c_p_c()
{
#ifndef  ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
int n, m;
int a[100][100];
int vis[100][100];
int x;
int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
bool safe(int x, int y)
{
	return (x >= 0 && y >= 0 && x < n && y < m && vis[x][y] == 0 && a[x][y] == 1);
}
void dfs(int i, int j)
{
	x++;

	vis[i][j] = 1;
	int k;
	for (k = 0; k < 8; k++)
	{
		int p = i + dx[k];
		int q = j + dy[k];
		if (safe(p, q) )
			dfs(p, q);
	}


}

int32_t main()
{
	
	int n, x, t;
	cin >> n >> x >> t;

	cout << (int)ceil((double)n / x)*t;

}





Measured memory_bytes: 3692
#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
typedef long long int lint;
using namespace std;

int main() {
    int x, y;
    cin >> x >> y;
    int ans = 0;
    if (x == 3) {
        ans += 100000;
    }
    if (y == 3) {
        ans += 100000;
    }
    if (x == 2) {
        ans += 200000;
    }
    if (y == 2) {
        ans += 200000;
    }
    if (x == 1) {
        ans += 300000;
    }
    if (y == 1) {
        ans += 300000;
    }
    if (x == 1 && y == 1) {
        ans += 400000;
    }
    cout << ans << endl;
}

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

#define loop(i,n) for(int i = 0;i < int(n);i++)
#define rloop(i,n) for(int i = int(n);i >= 0;i--)
#define range(i,a,b) for(int i = int(a);i <= int(b);i++)
#define SZ(c) int(c.size())
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)

typedef vector<int> vi;
typedef vector<pair<int,int> > vii;
typedef long long ll;
typedef pair<int, int> pii;



int main()
{

#ifndef ONLINE_JUDGE
	//freopen("in.in", "r", stdin);
	//freopen("out.in", "w", stdout);
	//ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#endif

    string s;
    cin >> s;
    loop(i,SZ(s)){
        if(i&1)continue;
        putchar(s[i]);
    }
    puts("");

    return 0;
}


Measured memory_bytes: 512
from collections import deque

H, W = map(int,input().split())
S = []
wall = 0
for i in range(H):
    s = list(input())
    wall += s.count("#")
    S.append(s)
q = deque()
q.append([0, 0, 0])
S[0][0] = "#"
while q:
    y, x, cnt = q.popleft()
    if y == H-1 and x == W-1:
        break
    for dy, dx in [[1, 0], [-1, 0], [0, 1], [0, -1]]:
        if 0 <= y + dy < H and 0 <= x + dx < W and S[y + dy][x + dx] == ".":
            q.append([y + dy, x + dx, cnt + 1])
            S[y + dy][x + dx] = "#"

if S[H-1][W-1] == ".":
    print(-1)
else:
    score = H * W - (cnt + 1) - wall
    print(score)


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

const int N = 1e5 + 10;

int n, k, a[N], ans;

int main() {
    ios :: sync_with_stdio(0);
    cin >> n >> k;
    for(int i = 1 ; i <= n ; ++ i) cin >> a[i];
    sort(a + 1, a + 1 + n);
    ans = a[k] - a[1];
    for(int i = 1 ; i + k - 1 <= n ; ++ i)
        ans = min(ans, a[i + k - 1] - a[i]);
    cout << ans << endl;
}


Measured memory_bytes: 640
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<deque>
#include<bitset>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
typedef pair<ll,ll> P;
template<class T> inline bool chmax(T&a , T b){ if(a<b){ a=b; return true; } else{ return false; } }
template<class T> inline bool chmin(T&a , T b){ if(a>b){ a=b; return true; } else{ return false; } } 

const int INF = 1e9;
const ll MOD = 1e9+7;
const ll LINF = 1e18;

bool check(vector<P> s){
    int h=0;
    for (P p : s){
        int b = h+p.first;
        if(b<0) return false;
        h += p.second;
    }
    return true;
}

int main(){
    int n;
    cin >> n;
    vector<P> ls, rs;
    int total = 0;
    rep(i,n){
        string s;
        cin >> s;
        int h = 0, b = 0;
        for(char c : s){
            if(c=='(') ++h; else --h;
            b = min(b,h);
        }
        if(h>0) ls.emplace_back(b,h);
        else rs.emplace_back(b-h,-h);
        total += h;
    }
    sort(ls.rbegin(),ls.rend());
    sort(rs.rbegin(),rs.rend());
    if(check(ls) && check(rs) && total==0){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}


Measured memory_bytes: 34684
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struct _Node{
  int key;
  struct _Node *next, *prev;
}Node;
Node *nil;
void init(void);
void insert(int);
Node* listSearch(int);
void deleteNode(Node*);
void deleteFirst(void);
void deleteLast(void);
void deletekey(int);
void Print(void);

void init(void){
    nil=(Node*)malloc(sizeof(Node));
    nil->next=nil;
    nil->prev=nil;
    return;
}
void insert(int key){
    Node *x=(Node*)malloc(sizeof(Node));
    x->key=key;
    x->next=nil->next;
    nil->next->prev=x;
    nil->next=x;
    x->prev=nil;
    return;
}
void deleteNode(Node *t){
    if(t==nil){return;}
    t->prev->next=t->next;
    t->next->prev=t->prev;
    free(t);
    return;
}
Node* listSearch(int key){
    Node *x=nil->next;
    while(x != nil && x->key != key){
        x=x->next;
    }
    return x;
}
void deleteFirst(void){
    deleteNode(nil->next);
    return;
}
void deleteLast(void){
    deleteNode(nil->prev);
    return;
}
void deletekey(int key){
    deleteNode(listSearch(key));
    return;
}
void Print(void){
    int a=0;
    Node *x=nil->next;
    while(x!=nil){
        if(a++>0){
            printf(" ");
        }
        printf("%d",x->key);
        x=x->next;
    }
    printf("\n");
    return;
}
int main(void){
    int i,n,num;
    char str[10];
    scanf("%d",&n);
    init();
    for(i=0;i<n;i++){
        scanf("%s %d",str,&num);
        if(str[0]=='i'){
            insert(num);
        }else if(str[0]=='d'){
            if(strlen(str)>6){
                if(str[6]=='F'){
                    deleteFirst();
                }
                else if(str[6]=='L'){
                    deleteLast();
                }
            }
        else{
            deletekey(num);
        }
        }
    }
    Print();
    return 0;
}


Measured memory_bytes: 32960
// clang-format off
	#define BADSEED random_device{}()
	#include <bits/stdc++.h>
	using namespace std;
	using ll = long long;
	using uint = unsigned int;
	ostream &operator<<(ostream &os, int8_t c) { return os << short(c); }
	istream &operator>>(istream &is, int8_t &c) { short x; is >> x; c = x; return is; }
	#define TM_(...) template <class __VA_ARGS__>
	namespace narut {
	TM_(T) using TupSz = tuple_size<decay_t<T>>;
	TM_(T) constexpr auto spc(T const &t, int) -> decltype((cout << t), 'a') { return ' '; }
	constexpr auto spc(string const &s, int) { return '\n'; }
	TM_(T) constexpr auto spc(T const &t, char) { return '\n'; }
	struct IO {
		TM_(T) static auto out_(ostream &os, T const &t, int) -> decltype(void(os << t)) { os << t; }
		TM_(T, class OS) static auto out_(OS &os, T const &t, int) -> decltype(void(begin(t))) {
			auto it = begin(t), e = end(t);
			if (it != e) out_(os, *it++, 0);
			for (; it != e; out_(os, *it++, 0)) os << spc(*it, 0);
		}
		TM_(T, size_t... Is) static void out_tup(ostream &os, T const &t, index_sequence<Is...>) { (void)initializer_list<int>{0, ((Is == 0) ? 0 : ((os << ' '), 0), (os << get<Is>(t)), 0)...}; }
		TM_(T) static decltype(void(TupSz<T>{})) out_(ostream &os, T const &t, char) { out_tup(os, t, make_index_sequence<TupSz<T>::value>{}); }
		TM_(Sep, class F, class... Ts) static ostream &print(ostream &os, Sep sep, F const &f, Ts const &... ts) { return void(initializer_list<int>{(out_(os, f, 0), 0), (out_(os << sep, ts, 0), 0)...}), os; }
		TM_(T) static auto in_(istream &is, T &t, int) -> decltype(void(is >> t)) { is >> t; }
		TM_(T, class IS) static auto in_(IS &is, T &t, int) -> decltype(void(begin(t))) { for (auto &x : t) in_(is, x, 0); }
		TM_(T, size_t... Is) static void in_tup(istream &is, T &t, index_sequence<Is...>) { (void)initializer_list<int>{0, (in_(is, get<Is>(t), 0), 0)...}; }
		TM_(T) static decltype(void(TupSz<T>{})) in_(istream &is, T &t, char) { in_tup(is, t, make_index_sequence<TupSz<T>::value>{}); }
	};
	} // namespace narut
	#define Cout(...) narut::IO::print(cout, ' ', __VA_ARGS__) << '\n'
	#ifdef NARUT_LOCAL
	#define Debug(...) narut::IO::print(cerr << "\033[0;31m", ", ", __VA_ARGS__) << "\033[0m\n"
	#else
	#define Debug(...) 0
	#endif
	[[maybe_unused]] struct Cin { 
		template <class T> Cin const &operator>>(T &t) const { return narut::IO::in_(cin, t, 0), *this; }
		template <class T> operator T() const { T t; return *this >> t, t;  }	
	} Cin;
	TM_(T) auto operator%(T &t, size_t n) -> decltype(t.resize(n), t)& { return t.resize(n), t; }
	#define FOR(i, j, n) for (int i = int(j); i < int(n); ++i)
	#define ROF(i, j, n) for (int i = int(n) - 1; i >= int(j); --i)

// clang-format on





auto Main() {
	ll x;
	cin>>x;

	unsigned long long cur = 100;	
	for(int i = 1;;++i) {
		cur = cur + cur/100;		
		if (cur >= x) {
			return i;
		}		
	}
	
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout << fixed << setprecision(10);
#ifdef NARUT_LOCAL
	assert(freopen("io/test.in", "r", stdin));
	cin.exceptions(cin.badbit | cin.failbit);
	cerr << fixed << setprecision(10);
#endif

	cout<<Main();
}


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

int main(){
	
	int S,h,m,s;
	scanf("%d",&S);
	h = S/3600;
	m = (S%3600)/60;
	s = S%60;
	printf("%d:%d:%d\n",h,m,s);
	return 0;
}


Measured memory_bytes: 1184
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
/*
//#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
*/

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
/*
//#if __cplusplus >= 201103L
#include <array>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
*/
using namespace std;
#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb(s) push_back(s)
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define mp(a,b) make_pair(a,b)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl

#define uni(x) x.erase(unique(all(x)),x.end())
template<class T,class U>inline void chmin(T &t,U f){if(t>f)t=f;}
template<class T,class U>inline void chmax(T &t,U f){if(t<f)t=f;}
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) > (b) ? (b) : (a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> PPI;

#define INF INT_MAX/3
#define MAX_N 1000
#define M_INF 1000000000
int n,m,v,i;
void solve(){
   cin.tie(0);
  ios::sync_with_stdio(false);
  cin>>n;
  vector<ll> vec;
  rep(i,n){
    cin>>v;
    vec.pb(v);
  }
  sort(all(vec));
  ll ans = 0;
  rep(i,vec.size()-1){
    if(vec[i]!=vec[i+1]) {
      ans++;
      // cout<<i<<endl;
    } else {
      ll flg = 0;
      // cout<<i<<endl;
      while(vec[i] == vec[i+1] && vec.size() > i){
        flg++;
        i++;
        // cout<<i<<endl;
      }
      if(flg%2==0) {
        ans++;
        // cout<<i<<endl;
      }
    }
  }
  if(vec[vec.size()-1] == vec[vec.size()-2])cout<<ans<<endl;
  else cout<<ans+1<<endl;
}

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


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

int main(){
  int N, K, R, S, P;
  ll ans = 0;
  cin >> N >> K;
  cin >> R >> S >> P;
  string T;
  cin >> T;
  string te;
  for (int i = 0; i < N; i++){
    if (T.at(i) == 's') te.append("r");
    else if (T.at(i) == 'p') te.append("s");
    else if (T.at(i) == 'r') te.append("p");
    
    if (i >= K && te.at(i) == te.at(i-K)) te.at(i) = 'a';
  }
  for (int i = 0; i < N; i++){
    if (te.at(i) == 'r') ans += R;
    if (te.at(i) == 's') ans += S;
    if (te.at(i) == 'p') ans += P;
  }
  cout << ans << endl;
  // cout << te << endl;
  return 0;
}

Measured memory_bytes: 640
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>

using namespace std;

int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++)
    cin >> a[i];
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  map<long long, int> mp;
  for (int i = 0; i < n; i++)
    mp[a[i]]++;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    if (mp[a[i]] == 0)
      continue;
    mp[a[i]]--;
    int k = 0, b = a[i];
    while (b > 0) {
      k++;
      b >>= 1;
    }
    if (mp[(1 << k) - a[i]] > 0) {
      mp[(1 << k) - a[i]]--;
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 26752
#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <set>
#define REP(i,n) for(int i=0;i<(n);++i)
using namespace std;
using ll = long long;
constexpr int INF = 1e9;
constexpr int MOD = 1e9 + 7;
template<class T> inline void chmax(T &a,T b){if(a<b)a=b;}
template<class T> inline void chmin(T &a,T b){if(a>b)a=b;}

int main(){
    cin.tie(0); ios_base::sync_with_stdio(false);
    int N; cin >> N;
    string s;
    set<string> st;
    REP(i,N){
        cin >> s;
        st.insert(s);
    }
    cout << (st.size()==3 ? "Three" : "Four") << endl;
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
	long long n,m,a,b;
	long long sum;
	a=pow(10,9)+7;
	while(scanf("%lld",&n)==1)
	{
		sum=1;
		for(int i=1;i<=n;i++)
		{
			sum=sum*i;
		    sum=sum%a;
		}
		printf("%lld\n",sum);
	}
	return 0;
}

Measured memory_bytes: 256
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long ans = 1;
		long max = 1000000000000000000l;
		// System.out.println(max);
		List<Long> arr = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			arr.add(sc.nextLong());
		}
		Collections.sort(arr);
		for (int i = 0; i < n; i++) {
			long a = arr.get(i);
			if (a == 0) {
				ans = 0;
				break;
			}
			if (a > max) {
				ans = -1;
				break;
			}
			if (ans > max / a) {
				ans = -1;
				break;
			}
			ans *= arr.get(i);
		}
		System.out.println(ans);
	}
}








Measured memory_bytes: 62176
S = gets().to_s
T = Array.new(S.length - 3)
U = Array.new(S.length - 3)
for i in 0 .. S.length - 4
  T[i] = (S[i].to_i) * 100 + (S[i + 1].to_i) * 10 + (S[i + 2].to_i)
end
for i in 0 .. S.length - 4
  U[i] = 753 - T[i]
  if  U[i] < 0
    U[i] = -U[i]
  end
end
p(U.min)

Measured memory_bytes: 1788
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
#define pb push_back
#define fr(i,n) for(int i=0;i<n;i++)
#define Fr(i,n) for(int i=0;i++<n;)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
#define iFr(i,n) for(int i=n;i>0;i--)

int main(){
  int n,m,k[33],a,c[33]={},an=0;
  cin>>n>>m;
  Fr(i,n){
    cin>>k[i];
    Fr(j,k[i]){cin>>a;c[a]++;}
  }
  Fr(i,m){
    //cout<<i<<" "<<c[i]<<endl;
    if(c[i]==n) an++;
  }
  cout<<an<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d;
  cin>>a>>b>>c;

  	if(a>=c && a>=b)
     cout<<b+c<<endl;
    else if(b>=a && b>=c)
      cout<<a+c<<endl;
    else if(c>=a && c>=b)
      cout<<a+b<<endl;
    
      
  return(0);
}

Measured memory_bytes: 384
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on 2019/3/9
Solved on 2019/3/9
@author: shinjisu
"""


# ABC 121
# import math


def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def zeros(n): return [0]*n


def getIntLines(n): return [int(input()) for i in range(n)]


def getIntMat(n):
    mat = []
    for i in range(n):
        mat.append(getIntList())
    return mat


def zeros2(n, m): return [zeros(m)]*n


ALPHABET = [chr(i+ord('a')) for i in range(26)]
DIGIT = [chr(i+ord('0')) for i in range(10)]
N1097 = 10**9 + 7
INF = 10**12


def dmp(x, cmt=''):
    global debug
    if debug:
        if cmt != '':
            print(cmt, ':  ', end='')
        print(x)
    return x


def prob_A():
    H, W = getIntList()
    h, w = getIntList()
    dmp((H, W))
    dmp((h, w))
    ans = (H-h)*(W-w)
    return ans


debug = False  # True False
ans = prob_A()
print(ans)
#for row in ans:
#    print(row)


def prob_B():
    A, B, K = getIntList()
    dmp((A, B, K))
    count = 0
    i = 100
    while count < K:
        if A % i == 0 and B % i == 0:
            count += 1
            if count == K:
                break
        i -= 1
    return i


def prob_C():
    S = input()
    red = 0
    blue = 0
    for cube in S:
        if cube == '0':
            red += 1
        else:
            blue += 1
    dmp((red, blue))
    return min(red, blue)*2


def prob_D():
    global N, M, A, B
    N, M = getIntList()
    dmp((N, M))
    A = zeros(M)
    B = zeros(M)
    for i in range(M):
        A[i], B[i] = getIntList()
    dmp(A, 'A')
    dmp(B, 'B')
    count = dmp(countInconv(), 'orginal')
    for i in range(M):
        A[i] = -1
        B[i] = -1
        dmp(A, 'A')
        dmp(B, 'B')
        print(countInconv())
    return count




Measured memory_bytes: 3192
#include <iostream>
#include <vector>
using namespace std;
int main(void){
    // Your code here!
    int N, K, d, x;
    cin >> N >> K;
    vector<bool> A(N);
    for(int i=0;i<K;i++){
        cin >> d;
        for(int j=0; j<d; j++){
            cin >> x;
            A.at(x-1)=1;
        }
    }
    int count = 0;
    for(int i=0; i<A.size(); i++){
        if(A.at(i)==0){
            count++;
        }
    }
    cout << count;
}

Measured memory_bytes: 3628
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>

using namespace std;

int main() {
    int n, k; 
    cin >> n >> k;
    cout << ((n+1) / 2 >= k ? "YES" : "NO") << endl;
    return 0;
}

Measured memory_bytes: 256
import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    long a = Arrays.stream(n.split("")).map(Long::parseLong).reduce(0L, (a1, a2) -> a1 + a2);
    System.out.println(a % 9 == 0 ? "Yes" : "No");
  }
}


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

using ll=long long; 

void solve(){
	string w;
	cin>>w;
	//cout<<w.size()<<endl;
	if(int(w.size())%2!=0){
		cout<<"No"<<endl;
		return;
	}
	sort(w.begin(), w.end());
	//cout<<w<<endl;
	for(int i=0; i<w.size(); i+=2){
		if(w[i]!=w[i+1]){
			cout<<"No"<<endl;
			return;
		}
	}
	cout<<"Yes"<<endl;	
}

signed main(){
	//while(1)
	solve();
}

Measured memory_bytes: 256
#include <stdio.h>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
#include <functional>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef vector<vector<int>> v2int;
typedef vector<ll> vll;
typedef vector<vector<ll>> v2ll;
typedef list<int> liint;
typedef pair<int, int> pint;
const int INF = int(2e9);
const ll LINF = ll(2e9) * ll(2e9);
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T, class C> void chmax(T& a, C b) { a > b ? : a = b; }
template<class T, class C> void chmin(T& a, C b) { a < b ? : a = b; }



int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int N;
    cin >> N;
    int X1 = int(double(N) / 1.08);
    int X2 = X1 + 1;
    if (int(double(X1) * 1.08) == N) {
        cout << int(X1) << endl;
        return 0;
    }
    else if (int(double(X2) * 1.08) == N) {
        cout << int(X2) << endl;
        return 0;
    }
    cout << ":(" << endl;
    return 0;
}

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

int main(){
  int N;
  int a[10001];
  int cnt = 0;
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> a[i];
  }
  for(int i=0;i<N;i++){
    while(a[i] % 2 == 0){
      cnt++;
      a[i] /= 2;
    }
  }
  cout << cnt << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int MOD = (int)1e9 + 7;

const int A = 0, C = 1, G = 2, T = 3;

int dp[111][4][4][4]; // d[i][c3][c2][c1]:= i 回目をみて 一個前 c1 二個前 c2 三個前 c3 の禁止以外の数え上げ
// 禁止文字列は ACG AGC GAC A*GC AG*C

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

	dp[0][T][T][T] = 1;
	rep (i, N){
		rep (c1, 4){
			rep (c2, 4){
				rep (c3, 4){
					// 新たに付け加える文字
					rep (a, 4){
						if (a == G && c1 == C && c2 == A) continue;
						if (a == C && c1 == G && c2 == A) continue;
						if (a == C && c1 == A && c2 == G) continue;
						if (a == C && c1 == G && c3 == A) continue;
						if (a == C && c2 == G && c3 == A) continue;
						dp[i+1][c2][c1][a] += dp[i][c3][c2][c1];
						dp[i+1][c2][c1][a] %= MOD;
					} // end rep
				} // end rep
			} // end rep
		} // end rep
	} // end rep

	int res = 0;
	rep (c1, 4) rep (c2, 4) rep (c3, 4){
		res += dp[N][c1][c2][c3];
		res %= MOD;
	} // end rep

	cout << res << endl;

	return 0;	
}

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

int main(){
    int w,h,x,y,r;
    cin >> w >> h >> x >> y >> r;
    string ans = "Yes";
    if(x-r < 0 || x+r > w)ans="No";
    if(y-r < 0 || y+r > h)ans="No";
    cout << ans << endl;

return 0;
}


Measured memory_bytes: 3216
#include<stdio.h>

void trace(int A[],int N)
{
    int i;
    for(i=0;i<N;i++)
    {
        if(i>0)
        {
            printf(" ");
        }
        printf("%d",A[i]);
    }
    printf("\n");
}

void insertionsort(int A[],int N)
{
    int i,j,v;
    for(i=1;i<N;i++)
    {
        v=A[i];
        j=i-1;
        while(j>=0 && A[j]>v)
        {
            A[j+1]=A[j];
            j--;
        }
        A[j+1]=v;
        trace(A,N);
    }
}

int main()
{
    int N,i,j;
    int A[100];

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

    trace(A,N);
    insertionsort(A,N);

    return 0;
}



Measured memory_bytes: 2692
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		try(Scanner sc = new Scanner(System.in)) {
			while(sc.hasNext()) {
				int r=sc.nextInt();
				int n=sc.nextInt();
				int[] b=new int[83];
				if(r==0 && n==0)	break;
				for(int i=0; i<n; i++) {
					int lx=sc.nextInt();
					int rx=sc.nextInt();
					int h=sc.nextInt();
					for(int j=lx*2+41; j<=rx*2+40; j++) {//start endわけるために2倍
						b[j]=Math.max(b[j], h);
					}
				}//入力
				double t=1000000000.0;
				for(int i=0; i<=81; i++) {
					double x=(i/2)-20;
					if(r*r-x*x>0) {
						double y=b[i];
						t=Math.min(y+r-Math.sqrt(r*r-x*x), t);
					}
				}
				System.out.println(t);
			}
		}
	}
}


Measured memory_bytes: 38388
#include<iostream>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<limits>
#include<sstream> 
#include<unordered_map>      

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef int itn;
typedef vector<int> vi;
typedef vector<ll> vl;

const int inf = numeric_limits<int>::max() >> 2;
const ll linf = numeric_limits<ll>::max() >> 2;
const ull ulinf = numeric_limits<ull>::max() >> 2;
const double pi = acos(-1);
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
const int dx8[8]={-1,0,1,-1,1,-1,0,1};
const int dy8[8]={-1,-1,-1,0,0,1,1,1};

#define p_queue(i) priority_queue<i> 
#define rp_queue(i) priority_queue<i, vector<i>, greater<i>> 
#define umap(i,j) unordered_map<i,j>
#define P(p) cout<<(p)<<endl
#define PS(p) cout<<(p)<< " "
#define IN cin >> 
#define rep(i,m,n) for(int i = (m); i < (int)(n); i++)
#define rrep(i,m,n) for(int i = (m-1); i >= (int)(n); i--)
#define inrep(n,a) for(int i = 0; i < (int)(n); i++)cin >> a[i];
#define mod(i) ((i)%(ll)(1e9 + 7))
#define divm(a,b) (mod(a * modpow((ll)b,(ll)(1e9+5))))
#define rsort(a,b,c) sort(a, b, greater<c>())
#define vsort(v) sort(v.begin(), v.end())
#define rvsort(v) sort(v.begin(), v.end(), greater<c>()) 
#define ft first
#define sd second
#define pb push_back
#define it insert
#define sz(x) ((int)(x).size())
#define lb(a,n,k) (lower_bound(a,a+n,k) - a) 
#define vlb(a,k)  (lower_bound(a.begin(),a.end(),k) - a.begin())
#define ub(a,n,k) (upper_bound(a,a+n,k) - a) 
#define vub(a,k)  (upper_bound(a.begin(),a.end(),k) - a.begin())
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl  
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define ret return

ll modpow(ll i,ll j){ ll tmp=1; while(j){ if(j%2)tmp=mod(tmp*i);i=mod(i*i);j/=2;}return tmp;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

vector<string> split(const string &str, char sep){
    vector<string> v;
    stringstream ss(str);
    string buffer;
    while( getline(ss, buffer, sep) ) {
        v.push_back(buffer);
    }
    return v;
}

//ll ncr[100][100];
//ll nCr(int n, int r){if(n==r) ret ncr[n][r] = 1; if(r==0) ret ncr[n][r] = 1; if(r==1) ret ncr[n][r] = n;if(ncr[n][r]) ret ncr[n][r]; ret ncr[n][r] = nCr(n-1,r) + nCr(n-1,r-1);}

//ll npr[100][100]={};
//ll nPr(int n,int r){if(npr[n][r])ret npr[n][r];if(r==0)ret npr[n][r] = 1;if(r==1)ret npr[n][r] = n;ret npr[n][r] = n * nPr(n-1,r-1);}

//ll nHr(int n,int r){ret nCr(n+r-1,r);}

///////////////////////////////////////////////////////////////////////////


int main(){
    
    string s;
    cin >> s;

    ll ans = 0,t = 0;
    rep(i,0,sz(s)){
	switch(s[i]){
	case 'A':
	case 'T':
	case 'C':
	case 'G':
	    t++;
	    ans = max(ans,t);
	    break;
	default:
	    t = 0;
	    break;
	}
    }
    P(ans);
	 
    return  0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
const int mod = 1'000'000'007;
int mul(long long a, long long b){
	return a * b % mod;
}
int main(){
	int n; cin >> n;
	vector<pair<int,int>> a;
	for(int i = 0; i < n; i++){
		int x; cin >> x;
		a.push_back({x, 0});
	}
	for(int i = 0; i < n; i++){
		int x; cin >> x;
		a.push_back({x, 1});
	}
	int q[2]={};
	sort(a.begin(), a.end());
	int ans = 1;
	for(auto e : a){
		q[e.second]++;
		if(min(q[0], q[1])){
			ans = mul(ans, max(q[0], q[1]));
			q[0]--;
			q[1]--;
		}
	}
	cout << ans << endl;
	return 0;
}
	


Measured memory_bytes: 2420
#include<bits/stdc++.h>
#define MAX(a, b, c, d) max(a, max(b, max(c, d)))
#define MIN(a, b, c, d) min(a, min(b, min(c, d)))
using namespace std;
const int N = 2e5 + 10;
typedef long long ll;
ll s[N];
int n;
int main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> n;
    for(int i = 1, x; i <= n; i++) {
        cin >> x;
        s[i] = s[i - 1] + x;
    }
    ll res = 1e18;
    int m1 = 1, m2, m3 = 3;
    for(m2 = 2; m2 < n; m2++) {
        while(m1 + 1 < m2 && abs(s[m2] - s[m1] - s[m1]) > abs(s[m2] - s[m1 + 1] - s[m1 + 1])) {
            m1++;
        }
        while(m3 + 1 < n && abs(s[n] - s[m3] - (s[m3] - s[m2])) > abs(s[n] - s[m3 + 1] - (s[m3 + 1] - s[m2]))) {
            m3++;
        }
        res = min(res, MAX(s[n] - s[m3], s[m3] - s[m2], s[m2] - s[m1], s[m1]) - MIN(s[n] - s[m3], s[m3] - s[m2], s[m2] - s[m1], s[m1]));
    }
    cout << res << endl;
    return 0;
}

Measured memory_bytes: 1792
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#define N 100
void mul(int n, int m, int l, int Matrix[][N], int matrix[][N],long long int c[][N]);

int main() {
	int Matrix[N][N] = { 0 };
	int matrix[N][N] = { 0 };
	long long int c[100][N] = { 0 };
	int i, j;
	int n, m, l;

	scanf("%d%d%d", &n, &m,&l);
	for (i = 0; i < n; i++) for (j = 0; j < m; j++) scanf("%d", &Matrix[i][j]);
	for (i = 0; i < m; i++) for (j = 0; j < l; j++) scanf("%d", &matrix[i][j]);
	mul(n, m, l, Matrix, matrix, c);
	for (i = 0; i < n; i++) {
		for (j = 0; j < l; j++) {
			printf("%lld%c", c[i][j], j < l - 1 ? ' ' : '\n');
		}
	}
	return 0;
}

void mul(int n, int m, int l, int Matrix[][N], int matrix[][N],long long int c[][N]) {
	int i,j,k;
	for (i = 0; i < n; i++) {
		for (j = 0; j < l; j++) {
			for (k = 0; k < m; k++) {
				c[i][j] += Matrix[i][k] * matrix[k][j];
			}
		}
	}
	return ;
}

Measured memory_bytes: 764
#include <bits/stdc++.h>
using namespace std;
const double eps=1e-2;
const int MAXN = 1e5+25;

int main()
{
    int n; cin>>n;
    if(n==25) {
        cout<<"Christmas\n";
    }
    else if(n==24) cout<<"Christmas Eve\n";
    else if(n==23) cout<<"Christmas Eve Eve\n";
    else if(n==22) cout<<"Christmas Eve Eve Eve\n";
    return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(int argc, char const *argv[]) {
  long long int N,cap[5],min;
  int min_i;

  scanf("%lld",&N);
  for (int i = 0; i < 5; i++) {
    scanf("%lld",&cap[i]);
  }

  min = cap[0];
  min_i = 0;

  for (int i = 1; i < 5; i++) {
    if (min > cap[i]) {
      min = cap[i];
      min_i = i;
    }
  }

  if (N % cap[min_i] == 0) {
    printf("%lld\n", (N / cap[min_i]) + 4);
  } else {
    printf("%lld\n", (N / cap[min_i]) + 5);
  }
  
  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 a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int cnt = 0;
		for(int i = a; i <= b; i++) {
			if(c % i == 0)	cnt++;
		}
		System.out.printf("%d\n", cnt);
	}
}



Measured memory_bytes: 26484
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cctype>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip>
#include <cstdio>
#include <numeric>
#include <functional>
#include <cstdlib>
#include <regex>
#include <list>
int main() {
	int a;
	std::string s;
	std::cin >> s;
	a = s.size();
	for (int i = 0;i < a;++i) {
		if (i % 2 == 0) {
			std::cout << s[i];
		}
	}
	std::cout << std::endl;
	return 0;
}

Measured memory_bytes: 512
#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <cctype>
#include <string>
#include <map>
#include <set>
#include <math.h>
#include <cmath>
#define ll long long

using namespace std;
using P = pair<char,int>;

int main(){

  string S;
  cin >> S;
  vector<P> p(4);
  p[0].first = 'N';
  p[0].second = 0;
  p[1].first = 'S';
  p[1].second = 0;
  p[2].first = 'E';
  p[2].second = 0;
  p[3].first = 'W';
  p[3].second = 0;

  for (int i = 0; i < S.size(); i++) {
    if      (S[i] == p[0].first) p[0].second += 1;
    else if (S[i] == p[1].first) p[1].second += 1;
    else if (S[i] == p[2].first) p[2].second += 1;
    else if (S[i] == p[3].first) p[3].second += 1;
  }

  if( (p[0].second > 0 && p[1].second == 0) ||
      (p[1].second > 0 && p[0].second == 0) ||
      (p[2].second > 0 && p[3].second == 0) ||
      (p[3].second > 0 && p[2].second == 0)){
    cout << "No" << endl;
    return 0;
  }

  cout << "Yes" << endl;
  return 0;
}

Measured memory_bytes: 3632
#include <bits/stdc++.h>
#define rep(a,n) for (ll a = 0; a < (n); ++a)
using namespace std;
using ll = long long;
typedef pair<ll,ll> P;
typedef pair<P,ll> PP;
typedef vector<vector<ll> > Graph;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e18;

//入力
ll n,k;
vector<ll>a;

//二分探索
// index が条件を満たすかどうか
bool isOK(ll len) {
    ll res = 0;
    rep(i,n){
        res += (a[i]-1)/len;
    }
    if (res <= k) return true;
    else return false;
}
// 汎用的な二分探索のテンプレ
ll binary_search() {
    ll ng = 0; //「index = 0」が条件を満たすこともあるので、初期値は -1
    ll ok = 1e9; // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()

    /* ok と ng のどちらが大きいかわからないことを考慮 */
    while (abs(ok - ng) > 1) {
        ll mid = (ok + ng) / 2;

        if (isOK(mid)) ok = mid;
        else ng = mid;
    }
    return ok;
}

int main(){
    cin >> n >> k;
    a.resize(n);
    rep(i,n)cin>>a[i];
    cout << binary_search() << endl;

    return 0;
}


Measured memory_bytes: 4784
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
#include <unordered_map> 
#include <map> 
#include <numeric>
#include <limits>
#include <utility>
#include <queue>
#include <random>
#include <bitset>
using namespace std;
typedef long long LL;

int main(void) {
	string a, b;
	LL x;
	cin >> a >> b;
	a += b;

	x = stoi(a);

	for (LL i = 0; i < 1000; i++) {
		if (i*i == x) {
			cout << "Yes" << endl;
			return 0;
		}
	}
	cout << "No" << endl;
	return 0;
}

Measured memory_bytes: 256
import java.math.BigDecimal
import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val a =scanner.nextInt()
    val b =scanner.nextInt()
    val d = a / b
    val r = a % b
    val f = BigDecimal(a.toDouble() / b)
    println("$d $r ${f.toPlainString()}")
}



Measured memory_bytes: 25632
#include<bits/stdc++.h>
using namespace std;
int main(){
  int co=0;
  string a;
  cin >> a;
  string b="";
  while(a!=""){
    //cout << 1 << endl;;
    stringstream ssa(a);
    long long  ai;
    ssa>>ai;
    if(a=="")ai=0;
    stringstream ssb(b);
    long long bi;
    ssb>>bi;
    if(b=="")bi=0;
    if((ai+bi)%2==0){
      long long x=(ai+bi)/2;
      //cout << x <<" ";
      if(x-bi==ai-x&&x-bi>=0){
	
	co++;
	//cout << "o" << " ";
      }
    }
    while(1){
      //cout << 2 << endl;
      b+=a[0];
      if(a[1]=='0'||a[0]=='-'){
	a.erase(a.begin());
	continue;
      }
      a.erase(a.begin());
      //cout << bi << " "<< ai<< endl;
      break;
    }
  }
  cout << co << endl;
  return 0;
}

Measured memory_bytes: 3212
#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    int k;
    cin>>s>>k;
    vector<string> ans;
    for(int i=0;i<s.size();i++){
        for(int j=1;j<=k;j++){
            ans.push_back(s.substr(i,j));
        }
    }
    sort(ans.begin(),ans.end());
    ans.erase(unique(ans.begin(),ans.end()),ans.end());
    cout<<ans[k-1]<<endl;
    return 0;
}


Measured memory_bytes: 1660
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a[5];
	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
	sort(a,a+5);
	reverse(a,a+5);
	cout << a[0] << " " << a[1] << " " << a[2] << " " << a[3] << " " << a[4] << endl;
	return 0;
}

Measured memory_bytes: 1180
#include <iostream>
#include <fstream>
#include <string> 
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <functional>

using namespace std;
using ll = long long;

#define FOR(i, m, n) for(int i = (m);i < (n);i++)
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define VI vector<int>
#define VVI vector<vector<int>>
#define VVVI vector<vector<vector<int>>>
#define VL vector<ll>
#define VVL vector<vector<ll>>
#define VB vector<bool>
#define VVB vector<vector<bool>>
#define PAIR pair<int,int>
#define MP make_pair
#define VP vector<pair<int,int>>
#define VS vector<string>
#define QUE queue<int>
#define DEQ deque<int>
#define PQUE priority_queue<int> //5,5,4,3,3,2,...
#define REPQUE priority_queue<int, vector<int>, greater<int>> //1,1,2,3,4,4,5,...
#define SUM(obj) accumulate((obj).begin(), (obj).end(), 0)
#define SORT(obj) sort((obj).begin(), (obj).end()) // 1,2,3,4,5...
#define RESORT(obj) sort((obj).begin(), (obj).end(), greater<int>()) // 5,4,3,2,1...
#define UB(obj,n) upper_bound((obj).begin(), (obj).end(), n) //itr > n
#define LB(obj,n) lower_bound((obj).begin(), (obj).end(), n) //itr>= n

const ll MOD = (ll)1e9 + 7;

int main() {
	string S1, S2, S3;
	cin >> S1 >> S2 >> S3;
	cout << S1[0] << S2[1] << S3[2] << endl;
	
	return 0;
}


Measured memory_bytes: 256