akhauriyash/Code-Regression huggingface dataset:
#pragma GCC optimize("O3")

#define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <string_view>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
using namespace std;

/*----------macros----------*/

//output================
#define endl '\n'
#define fcout(a) cout << fixed << setprecision((int)(a))

//typedef===============
typedef long long       ll;
typedef long double     ld;
typedef vector<int>     Vi;
typedef vector<ll>      Vl;
typedef pair<int, int>  Pii;
typedef pair<ll, ll>    Pll;

//const number==========
constexpr ll INF9   = (ll)1e9 + 1;
constexpr ll INF18  = (ll)1e18 + 1;
constexpr ll MOD1    = 1000000007;
constexpr ll MOD2   = 998244353;
constexpr ld PI     = 3.141592653589793L;

//member================
#define psb push_back
#define epb emplace_back
#define psf push_front
#define mkp make_pair
#define fst first
#define scd second

//others================
#define all(x)          (x).begin(), (x).end()
#define rall(x)         (x).rbegin(), (x).rend()
#define rep(i, n)       for(int i = 0; (i) < (n); ++(i))
#define reps(i, n)      for(int i = 1; (i) <= (n); ++(i))
#define rrep(i, n)      for(int i = n - 1; (i) >= 0 ; --(i))
#define repbit(bit, n)  for(int bit = 0; (bit) < (1 << (n)); ++(bit))
#define ifbit(bit, i)   if((bit) & (1 << (i)))
#define CtoI(c)         int((c)) - int('0')
#define ItoC(c)         char((c) + '0')

//functions=============
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

//vector<int> dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
//vector<int> dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };

/*--------additional--------*/



/*----------main------------*/

int main() {
/*----------fastio----------*/
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
/*----------solve-----------*/

    int a; string s; cin >> a >> s;
    cout << (a < 3200 ? "red" : s) << endl;

return 0;
}

Measured memory_bytes: 3544
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <functional>
#define _USE_MATH_DEFINES
#include <cmath>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cfloat>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <cassert>
using namespace std;

#define EPS 1e-12
#define ull unsigned long long
#define ll long long
#define VI vector<ll>
#define PII pair<ll, ll> 
#define VVI vector<vector<ll> >
#define REP(i,n) for(int i=0,_n=(n);(i)<(int)_n;++i)
#define RANGE(i,a,b) for(int i=(int)a,_b=(int)(b);(i)<_b;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define ALLR(c) (c).rbegin(), (c).rend()
#define PB push_back
#define MP(a, b) make_pair(a, b)
#define POPCOUNT __builtin_popcount
#define POPCOUNTLL __builtin_popcountll
#define CLEAR(table, v) memset(table, v, sizeof(table));
#define PRINT1(table, D0) REP(d0, D0) cout<<table[d0]<<" "; cout<<"\n";
#define PRINT2(table, D0, D1) REP(d0, D0) { REP(d1, D1) cout<<table[d0][d1]<<" "; cout<<"\n"; }
#define PRINT3(table, D0, D1, D2) REP(d0, D0) { REP(d1, D1) { REP(d2, D2) cout<<table[d0][d1][d2]<<" "; cout<<"\n"; } cout<<"\n"; }
#define UNIFORM_DOUBLE(a, b) (((b-a)*(double)rand()/RAND_MAX)+a) // [a, b) 
#define UNIFORM_LL(a, b) (ll)UNIFORM_DOUBLE(a, b) // [a, b) 
#define IN(v, lo, hi) ((lo)<=(v) && (v)<(hi))
#define DD(v) cout<<#v<<": "<<v<<endl
template <typename T0, typename T1> std::ostream& operator<<(std::ostream& os, const map<T0, T1>& v) { for( typename map<T0, T1>::const_iterator p = v.begin(); p!=v.end(); p++ ){os << p->first << ": " << p->second << " ";} return os; }
template <typename T0, typename T1> std::ostream& operator<<(std::ostream& os, const pair<T0, T1>& v) { os << v.first << ": " << v.second << " "; return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const vector<T>& v) { for( int i = 0; i < (int)v.size(); i++ ) { os << v[i] << " "; } return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const vector<vector<T> >& v) { for( int i = 0; i < (int)v.size(); i++ ) { os << v[i] << endl; } return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const set<T>& v) { vector<T> tmp(v.begin(), v.end()); os << tmp; return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const deque<T>& v) { vector<T> tmp(v.begin(), v.end()); os << tmp; return os; }

#define MOD 1000000007LL
#define INF (1LL<<60)

/*
4600
1*1/4 + 2*3/4*1/4 + 3*3/4*3/4*1/4
= 1/4 * sigma i 3/4^i
= 4

95*100+1900*5 = 19000
1/32
*/
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll N,M;
	while(cin>>N>>M) {
		ll ans = (1900*M+100*(N-M)) * (ll)(pow(2, M));
//		DD((ll)(pow(2, M)));
		cout<<ans<<endl;
	}
	
	return 0;
}


Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
const int N = 200005;

int n, k;
int a[N];

pair<int, int> t[N * 4];
pair<int, int> mer(const pair<int, int>& a, const pair<int, int>& b)
{
    return m_p(min(a.first, b.first), max(a.second, b.second));
}

void bil(int tl, int tr, int pos)
{
    if (tl == tr)
    {
        t[pos] = m_p(a[tl], a[tl]);
        return;
    }
    int m = (tl + tr) / 2;
    bil(tl, m, pos * 2);
    bil(m + 1, tr, pos * 2 + 1);
    t[pos] = mer(t[pos * 2], t[pos * 2 + 1]);
}

pair<int, int> qry(int tl, int tr, int l, int r, int pos)
{
    if (tl == l && tr == r)
        return t[pos];
    int m = (tl + tr) / 2;
    if (r <= m)
        return qry(tl, m, l, r, pos * 2);
    if (l > m)
        return qry(m + 1, tr, l, r, pos * 2 + 1);
    return mer(qry(tl, m, l, m, pos * 2),
               qry(m + 1, tr, m + 1, r, pos * 2 + 1));
}

int p[N];

int main()
{
    scanf("%d%d", &n, &k);
    for (int i = 0; i < n; ++i)
        scanf("%d", &a[i]);
    for (int i = 1; i < n; ++i)
    {
        p[i] = (p[i - 1] + !!(a[i - 1] > a[i]));
    }
    bil(0, n - 1, 1);
    int ans = 0;
    bool z = false;
    for (int i = 0; i < n - k + 1; ++i)
    {
        if (p[i + k - 1] - p[i] == 0)
        {
            z = true;
            continue;
        }
        if (!i || !(a[i - 1] == qry(0, n - 1, i - 1, i - 1 + k - 1, 1).first && a[i + k - 1] == qry(0, n - 1, i, i + k - 1, 1).second))
            ++ans;
    }
    if (z)
        ++ans;
    printf("%d\n", ans);
    return 0;
}


Measured memory_bytes: 7168
#include <cstdio>
#include <cstdlib>
#include <iostream>

using namespace std;

int main() {

  int64_t N, T;
  cin >> N >> T;
  
  int64_t *t = (int64_t *)malloc(N*sizeof(int64_t));

  for(int32_t i=0;i<N;i++)
    cin >> t[i];

  int64_t ans = T;  
  for(int32_t i=1;i<N;i++) {
    if(t[i] - t[i-1] < T)
      ans += t[i] - t[i-1];
    else
      ans += T;
  }
  
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--)
#define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++)
#define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using namespace std;

int main(){
  int n = 5;
  vector<int> a(n);
  rep(snip_i, n) cin >> a.at(snip_i);
  rep(i, n){
    if(a.at(i) == 0) cout << i+1 << endl;
  }
  return 0;
}

Measured memory_bytes: 3620
#include <stdio.h>

int main() {
	int n;
	scanf ("%d", &n);
	char s[n + 1];
	scanf ("%s", s);
	
		if (n % 2 != 0){
			printf ("No\n");
		}
		else {
			int flag = 1;
			for (int i = 0; i < n / 2; i++){
				if (s[i] != s[i + n / 2]){
					flag = 0;
				}
			}
			if (flag){
				printf ("Yes\n");
			}
			else{
				printf ("No\n");
			}
		}
	return 0;
}

Measured memory_bytes: 1648
a,b,k=map(int,input().split())
flag=0
if k%2==1:
    flag=1
for i in range(k//2):
    if a%2==1:
        a=a-1
    b+=(a/2)
    a=a/2
    if b%2==1:
        b=b-1
    a+=(b/2)
    b=b/2
if flag==1:
    if a%2==1:
        a=a-1
    b+=(a/2)
    a=a/2
print(int(a),int(b))

Measured memory_bytes: 3064
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <vector>

using namespace std;

typedef long long lint;

vector<lint> advance_seq(const vector<lint> &current) {
  vector<lint> result = current;
  int max_id = max_element(current.begin(), current.end()) - current.begin();
  for (int i = 0; i < (int)result.size(); ++i)
    if (i == max_id) result[i] -= result.size();
    else result[i] += 1;
  return result;
}

int main() {
  lint k;
  cin >> k;
  const int n = 50;
  lint k_up = k;
  if (k_up % n != 0)
    k_up += n - (k_up % n);
  vector<lint> seq(n, n - 1 + k_up / n);
  for (int rep = 0; rep < k_up - k; ++rep)
    seq = advance_seq(seq);
  cout << seq.size() << "\n";
  for (int i = 0; i < (int)seq.size(); ++i) {
    if (i > 0) cout << " ";
    cout << seq[i];
  }
  cout << "\n";
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0)
void err(){cout << "\033[39;0m" << endl;}
template<template<typename...> class T,typename t,typename... A>
void err(T<t> a,A... x){for (auto v:a) cout << v << ' '; err(x...);}
template<typename T,typename... A>
void err(T a,A... x){cout << a << ' '; err(x...);}
#else
#define dbg(...)
#endif
typedef long long ll;
typedef pair<int,int> pi;
typedef vector<int> vi;
template<class T> using vc=vector<T>;
template<class T> using vvc=vc<vc<T>>;
template<class T> void mkuni(vector<T>&v)
{
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
}
template<class T>
void print(T x,int suc=1)
{
    cout<<x;
    if(suc==1) cout<<'\n';
    else cout<<' ';
}
template<class T>
void print(const vector<T>&v,int suc=1)
{
    for(int i=0;i<v.size();i++)
        print(v[i],i==(int)(v.size())-1?suc:2);
}
const int INF=0x3f3f3f3f;
bool isp(int x)
{
	for(int i=2;i*i<=x;i++)
		if(x%i==0) return false;
	return true;
}
int main()
{
	int x;
	cin>>x;
	for(int i=x;;i++)
	{
		if(isp(i))
		{
			cout<<i<<'\n';
			break;
		}
	}
}


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

int main(){
  int N, K;
  cin >> N >> K;
  int d[K];
  int A[N]={};
  for(int i=0;i<K;++i) {
    cin >> d[i];
    for(int j=0;j<d[i];++j) {
      int a;
      cin >> a;
      A[a-1] = 1;
    }
  }
  int count = 0;
  for(int k=0;k<N;++k) {
    if(A[k]==0) ++count;
  }
  cout <<count;
}

Measured memory_bytes: 3624
#include <iostream>

using namespace std;

bool judge(int* a, int n, int m, int s){
    int j = (s - 1) / 4 / m + 1;
    for(int i = 0; i < n; i++){
        if(a[i] >= j)m--;
    }
    return m <= 0;
}

int main(){
    int m, n, a[100] = {}, sum_a = 0;
    cin >> n >> m;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        sum_a += a[i];
    }
    cout << (judge(a, n, m, sum_a) ? "Yes" : "No") << endl;
    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();
    int[] A = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    int ans = 1;
    int d = 0;
    for (int i = 1; i < N; i++) {
      if (d == 0) {
        if (A[i - 1] < A[i]) {
          d = 1;
        } else if (A[i - 1] > A[i]) {
          d = -1;
        }
      } else if (d > 0) {
        if (A[i - 1] > A[i]) {
          ans++;
          d = 0;
        }
      } else if (d < 0) {
        if (A[i - 1] < A[i]) {
          ans++;
          d = 0;
        }
      }
    }
    System.out.println(ans);
  }
}

Measured memory_bytes: 49344
#include<iostream>
#include<vector>
#include<queue>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<pair<int, int> > edge[n];
  rep (i, m) {
    int a, b, l;
    cin >> a >> b >> l;
    --a; --b;
    edge[a].push_back(make_pair(b, l));
    edge[b].push_back(make_pair(a, l));
  }
  vector<int> dis(n);
  rep (i, n) dis[i] = 1e9;
  priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > que;
  rep (i, k) {
    int s;
    cin >> s;
    --s;
    que.push(make_pair(0, s));
  }
  while (!que.empty()) {
    pair<int, int> now = que.top();
    que.pop();
    if (dis[now.second] <= now.first) continue;
    dis[now.second] = now.first;
    rep (i, edge[now.second].size()) {
      que.push(make_pair(now.first + edge[now.second][i].second, edge[now.second][i].first));
    }
  }
  int res = 0;
  rep (i, n) rep (j, edge[i].size()) {
    int a = dis[i], b = dis[edge[i][j].first], l = edge[i][j].second;
    res = max(res, (a + b + l + 1) / 2);
  }
  cout << res << endl;
  return 0;
}

Measured memory_bytes: 5992
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define MOD2 998244353
#define PRIM 3
#define INF (1 << 29)
#define LINF (1LL << 60)
#define EPS (1e-10)
#define PI 3.1415926535897932384626433832795028
typedef long long Int;
typedef pair<Int, Int> P;
typedef long double Real;
typedef complex<Real> CP;

int main()
{
    Int x, k = 1;
    cin >> x;
    while (k * x % 360)
        k++;
    cout << k << endl;
    return 0;
}

Measured memory_bytes: 3632
import numpy as np

N = int(input())
As = list(map(int, input().split()))
dic = {}
for a in As:
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

dic = sorted(dic.items(), reverse=True)

first = -1
second = -1

for length, num in dic:
    if num >= 2 and first == -1:
        first = length
        num -= 2
    
    if num >= 2 and second == -1:
        second = length
        break

if first >= 0 and second >= 0:
    print(first * second)
else:
    print(0)

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

using namespace std;
using ll = long long;

void init();
void solve();

#define rep(i, a) for (int i = 0; i < (int) (a); i++)
#define reps(i, a, b) for (int i = (int) (a); i < (int) (b); i++)
#define rrep(i, a) for (int i = (int) a-1; i >= 0; i--)
#define rreps(i, a, b) for (int i = (int) (a)-1; i >= (int) (b); i--)
#define MP(a, b) make_pair((a), (b))
#define PB(a) push_back((a))
#define all(v) (v).begin(), (v).end()
#define PRINT(f) if((f)){cout << (TRUE__) << endl;}else{cout << FALSE__ << endl;}
#define TRUE__  "Yes"
#define FALSE__ "No"
#define PERM(v) next_permutation(all(v))
#define UNIQUE(v) sort(all(v));(v).erase(unique(all(v)), v.end())
#define CIN(type, x) type x;cin >> x

#ifdef LOCAL
#define lcout(a) cout << a
#define lcoutln(a) cout << a << endl
#define lcerr(a) cerr << a
#define lcerrln(a) cerr << a << endl
#else
#define lcout(a) 
#define lcoutln(a) 
#define lcerr(a) 
#define lcerrln(a) 
#endif
#define MOD 1000000007

signed main()
{
	init();
	solve();
}

ll t[11];
ll s[10];
ll l;

void init()
{
	t[0] = 1;
	t[1] = 1;
	reps(i, 2, 11) t[i] = t[i-1] * 2;
	CIN(string, S);
	l = S.length();
	rep(i, l) s[i] = S[i] - '0';
}

ll culc(ll st, ll go)
{
	ll res = 0;
	reps(i, st, go+1) {
		res = res * 10 + s[i];
	}
	return res;
}

void solve()
{
	ll res = 0;
	rep(i, l) {
		reps(j, i, l) {
			ll nokori;
			if (i == 0 || j == l - 1) nokori = l - (j - i + 1);
			else nokori = l - (j - i + 1) - 1;
			res += culc(i, j) * t[nokori];
		}
	}
	cout << res << endl;
}



Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <string>
#include <queue>
#include <algorithm>
#include <map>
#include <cmath>
#include <numeric>
#include <list>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <tuple>
#include <deque>
#include <complex>

using namespace std;

/*
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
*/

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<long long, long long> pll;
typedef vector<pll> vpll;

typedef long double ld;
typedef vector<ld> vld;

typedef vector<bool> vb;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define reps(i, n) for (ll i = 1; i <= (n); i++)
#define rrep(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rreps(i, n) for (ll i = (n); i >= 1; i--)
#define all(v) (v).begin(), (v).end()

template <class T> void chmin(T& a, T b) { a = min(a, b);}
template <class T> void chmax(T& a, T b) { a = max(a, b);}

constexpr int INF = 1 << 30;
constexpr ll INFL = 1LL << 60;
constexpr ll MOD = 1000000007;
constexpr ld EPS = 1e-12;
ld PI = acos(-1.0);

void solve() {
    const ll lim = 1000000;
    ll n;
    cin >> n;
    map<ll, ll> m;
    for(ll i = 2; i <= lim; i++) {
        while(n % i == 0) {
            m[i]++;
            n /= i;
        }
        if(n == 1) break;
    }
    if(n > 1) m[n]++;
    vll cnt;
    for(ll i = 0; i <= 8; i++) {
        for(ll j = 0; j <= i; j++) cnt.push_back(i);
    }
    ll ans = 0;
    for(auto i = m.begin(); i != m.end(); i++) {
        ans += cnt[i->second];
    }
    cout << ans << endl;
    return;
}

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

Measured memory_bytes: 3624
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
  int x,y,z;
  cin >> x >> y >> z;
  cout << z << " " << x << " " << y;

  return 0;
}

Measured memory_bytes: 3592
/*|In The Name Of Allah|*/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 2e5+5;
const int mod = 1e9+7;

double pi = 3.14159265359;

int n;
int cnt[N];

int main(){
    scanf("%d" , &n);
    for(int i = 2; i <= n; i++){
        int x;
        scanf("%d" , &x);
        cnt[x]++;
    }
    for(int i = 1; i <= n; i++){
        printf("%d\n" , cnt[i]);
    }
}


Measured memory_bytes: 4536
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		while(true) {
			int n=in.nextInt();
			if(n==0)break;
			
			String data[]=new String[n];
			for(int i=0;i<n;i++)data[i]=in.next();
			
			people vote[]=new people[26];
			for(int i=0;i<26;i++) {
				vote[i]=new people((char)(i+65),0);
			}
			
			int i;people winner=new people('0',0);
			for(i=0;i<n;i++) {
				char v=data[i].charAt(0);
				vote[v-65].v++;
				people w[]=findWinner(vote);
				//System.out.printf("%d winner=%c, %d,w2=%d %d\n",i,w[0].name,w[0].v,w[1].v,w[1].v+n-i-1);
				if(w[0].v>w[1].v+(n-i-1)) {
					winner=w[0];
					break;
				}
			}
			
			if(winner.name!='0')System.out.println(winner.name+" "+(i+1));
			else System.out.println("TIE");
		}
	}
	
	static people[] findWinner(people[] list) {
		char name=list[0].name; int max=list[0].v, p=0;
		for(int i=1;i<26;i++) {
			if(list[i].v>max) {
				max=list[i].v;
				name=list[i].name;
				p=i;
			}
		}
		people w[]=new people[2];
		w[0]=new people(name,max);
		name=0;max=0;
		
		for(int i=0;i<26;i++) {
			if(i==p)continue;
			if(list[i].v>=max) {
				max=list[i].v;
				name=list[i].name;
			}
		}
		
		w[1]=new people(name,max);
		return w;
	}

}

class people{
	char name; int v=0;
	people(char n,int m){
		name=n; v=m; 
	}
}




Measured memory_bytes: 50404
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define speedX ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
using namespace std;
// #define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
template<typename T>
void __p(T a) { cout << a << " "; }
template<typename T, typename F>
void __p(pair<T, F> a) { cout << "{ "; __p(a.first); __p(a.second); cout << "}"; }
template<typename T>
void __f(const char* s, T t) { cout << s << " : "; __p(t); }
template<typename T>
void __t(const char* s, const T &x) { cout << s << " : { "; for (auto it : x) __p(it); cout << "} ";}
template<typename T, typename ... F>
void __f(const char* s, T t, F ... f) {
	int i = 0; for (;; ++i) if (s[i] == ',') break;
	cout.write(s, i) << " : "; __p(t); cout << " | "; __f(s + i + 1, f...);
}
#define trace(...) { cout<<"LINE: "<<__LINE__<<" || "; __f(#__VA_ARGS__,__VA_ARGS__); cout<<"\n\n"; }
#define debug(...) { cout<<"LINE: "<<__LINE__<<" || "; __t(#__VA_ARGS__,__VA_ARGS__); cout<<"\n\n"; }
int begtime = clock();
#define end_time() cout << "\n\nTime of execution: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define trace(...)
#define debug(...)
#define end_time()
#endif
#define int long long
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<pii, int> piii;
typedef vector<int> vi;
typedef vector<pii> vii;
inline bool equals(ld a, ld b) {return fabs(a - b) < 1e-9;}
inline int gcd(int a, int b) { a=abs(a); b=abs(b); while(a>0 && b>0) (a>b?a%=b:b%=a); return (a==0?b:a); }
inline int power(int x, int n, int m = LLONG_MAX)
    {  int res=1; x = (x%m + m)%m;
       while(n) { if(n&1) res=(res*x)%m;  x=(x*x)%m;  n >>= 1; }  return res;
    }
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define uset unordered_set
#define umap unordered_map
#define all(x) x.begin(), x.end()
#define mod 1000000007
void solve(){
	char a;
	cin>>a;
	if(isupper(a)) {
		cout<<"A";
	}
	else {
		cout<<"a";
	}
}
signed main(){
	speedX;
	#ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
	int t=1;
	//cin>>t;
	for(int i=1;i<=t;++i) {
		//cout<<"Case #"<<i<<": ";
		solve();
	}
	end_time();
	return 0;
}

Measured memory_bytes: 3648
#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
using namespace std;
typedef long long int llint;
typedef vector<int> vint;
typedef vector<llint> vllint;
typedef vector<pair<int, int>> vpint;
typedef vector<pair<llint, llint>> vpllint;
#define rep(i,n) for(int i=0;i<n;i++)
#define yes(ans) if(ans)cout<<"yes"<<endl;else cout<<"no"<<endl;
#define Yes(ans) if(ans)cout<<"Yes"<<endl;else cout<<"No"<<endl;
#define YES(ans) if(ans)cout<<"YES"<<endl;else cout<<"NO"<<endl;
#define POSSIBLE(ans) if(ans)cout<<"POSSIBLE"<<endl;else cout<<"IMPOSSIBLE"<<endl;

class UnionFind {
public:
	//親の番号を格納する。親だった場合は-(その集合のサイズ)
	vector<int> Parent;

	//作るときはParentの値を全て-1にする
	//こうすると全てバラバラになる
	UnionFind(int N) {
		Parent = vector<int>(N, -1);
	}

	//Aがどのグループに属しているか調べる
	int root(int A) {
		if (Parent[A] < 0) return A;
		return Parent[A] = root(Parent[A]);
	}

	//自分のいるグループの頂点数を調べる
	int size(int A) {
		return -Parent[root(A)];//親をとってきたい
	}

	//AとBをくっ付ける
	bool connect(int A, int B) {
		//AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
		A = root(A);
		B = root(B);
		if (A == B) {
			//すでにくっついてるからくっ付けない
			return false;
		}

		//大きい方(A)に小さいほう(B)をくっ付けたい
		//大小が逆だったらひっくり返しちゃう。
		if (size(A) < size(B)) swap(A, B);

		//Aのサイズを更新する
		Parent[A] += Parent[B];
		//Bの親をAに変更する
		Parent[B] = A;

		return true;
	}
};

//aとbの最大公約数を求めるよ
long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}

// 返り値: a と b の最大公約数
// ax + by = gcd(a, b) を満たす (x, y) が格納される
long long extGCD(long long a, long long b, long long &x, long long &y) {
	if (b == 0) {
		x = 1;
		y = 0;
		return a;
	}
	long long d = extGCD(b, a%b, y, x);
	y -= a / b * x;
	return d;
}

bool check(char a, char b) {
	return a > b;
}

int main() {
	int d, g;
	cin >> d >> g;
	vpint a(d);
	rep(i, d) {
		cin >> a[i].first >> a[i].second;
	}
	llint tmp, tmp2;
	llint cnt;
	llint now;
	llint ans = 10000;
	rep(i, (int)pow(2, d)) {
		tmp = i;
		cnt = 0;
		now = 0;
		rep(i, d) {
			now += (tmp % 2)*((i + 1) * 100 * a[i].first + a[i].second);
			cnt += (tmp % 2)*a[i].first;
			tmp /= 2;
		}
		if (now >= g) {
			ans = min(ans, cnt);
		}
		else {
			tmp = i;
			tmp2 = 10000;
			rep(i, d) {
				if (tmp % 2 == 0) {
					if (a[i].first >= (llint)(g - now + ((i + 1) * 100) - 1) / ((i + 1) * 100)) {
						tmp2 = min(tmp2, (llint)(g - now + ((i + 1) * 100) - 1) / ((i + 1) * 100));
					}
				}
				tmp /= 2;
			}
			cnt += tmp2;
			ans = min(ans, cnt);
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int all_sum =0;
		while( true )
		{
		
			String n = in.nextLine();
			int length = Integer.parseInt(n);
			
			if(length == 0){
				break;
			}
			
			int col_sum[] = new int[length];
			
			for(int i=0; i<length; i++)
			{
				String buf = in.nextLine();
				String val[] = buf.split(" ");
				int array[][] = new int[length][val.length];
				int line_sum = 0;
				
				for(int j=0; j<val.length; j++){
					array[i][j] = Integer.parseInt(val[j]);
					System.out.printf("%5d",array[i][j]);
					line_sum += array[i][j];
					col_sum[j] += array[i][j];
				}
				System.out.printf("%5d\n",line_sum);
				all_sum += line_sum;
			}
			for(int k=0; k<col_sum.length; k++)
			{
				System.out.printf("%5d", col_sum[k]);
			}
			System.out.printf("%5d\n",all_sum);
			all_sum = 0;
		}
	}
}

Measured memory_bytes: 30932
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 元配列は出力で使いたいのでとっておく
        Integer[] copied = new Integer[n];
        for (int i = 0; i < n; i++) {
            copied[i] = a[i];
        }
        Arrays.sort(copied, Comparator.reverseOrder());

        int max = copied[0];
        int nxt = copied[1];

        // 規約通りにシミュレーション
        for (int i = 0; i < n; i++) {
            if (a[i] == max) {
                System.out.println(nxt);
            } else {
                System.out.println(max);
            }
        }
    }
}



Measured memory_bytes: 111732
#include <iostream>

using namespace std;

int main() {
	string s = "CODEFESTIVAL2016";
	string v;
	cin >> v;
	int a = 0;
	for (int i = 0; i < 16; i++) {
	if (s[i] != v[i])
		a++;
	}
	cout << a << endl;
}

Measured memory_bytes: 256
import sys


def input():
    return sys.stdin.readline().strip()


s = input()
n = len(s)

total_sum = 0
# +を挿入する事象は
# sが2文字なら2通り，3文字なら4通り，n文字なら2^(n-1)通りある
for i in range(2 ** (n - 1)):
    # iは各桁に+を挿入するかどうかを決定する
    # 例えば s=12345, i=0b0111, ss=1+2+3+45
    now_sum = 0
    reg = int(s[0])
    for j in range(n - 1):
        if i & 1 << j:
            now_sum += reg
            reg = 0
        reg *= 10
        reg += int(s[j + 1])
    now_sum += reg

    total_sum += now_sum

print(total_sum)


Measured memory_bytes: 3060
// 4_abc141_d
#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>// 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>

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i++)
#define SZ(x) ((int)(x).size())
#define INF (1e16)
#define MOD (1000000007)
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, m;
    cin >> n >> m;
    priority_queue<int> a;
    rep(i, n){
        int b;
        cin >> b;
        a.push(b);
    }

    rep(i, m){
        int b;
        b = a.top();
        a.pop();
        b /= 2;

        a.push(b);
    }

    ll s = 0;
    rep(i, n){
        int b;
        b = a.top();
        s += b;
        a.pop();
    }

    cout << s << endl;


    return 0;
}


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

int main() {
  int N, M;
  cin >> N >> M;
  int a[M], b[M], road[N];

  for(int j = 0; j < N; j++) road[j] = 0;

  for(int i = 0; i < M; i++){
      
      cin >> a[i] >> b[i];
      road[a[i] - 1] += 1;
      road[b[i] - 1] += 1;

  }

  for(int i = 0; i < N; i++)    cout << road[i] << endl;


}

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

namespace BinarySearch
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var origS = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var S = origS.Distinct().ToArray();
            var q = int.Parse(Console.ReadLine());
            var T = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            var ans = 0;

            foreach(int num in T)
            {
                if (BinarySearch(S, num) >= 0)
                    ans++;
            }
            Console.WriteLine(ans);
        }

        static int BinarySearch(int[] array, int key)
        {
            var left = 0;
            var right = array.Length;
            while(left < right)
            {
                var mid = (left + right) / 2;
                if(array[mid] == key)
                    return mid;
                else if (key < array[mid])
                    right = mid;
                else
                    left = mid + 1;
            }
            return -1;
        }
    }
}



Measured memory_bytes: 34180
#include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T>
using V = vector<T>;
template <class T>
inline void chmin(T &a, const T &b) { a = min(a, b); }
template <class T>
inline void chmax(T &a, const T &b) { a = max(a, b); }
template <class T>
inline bool kbit(const T &x, const int &k) { return ((x >> k) & 1LL); }
inline int popcount(const int &n) { return __builtin_popcount(n); }
inline ll popcountll(const ll &n) { return __builtin_popcountll(n); }
template <class T>
void zip(V<T> &v) {
    sort(all(v));
    v.erase(unique(all(v)), v.end());
}
void dump() {
    cerr << '\n';
}
template <class Head, class... Tail>
void dump(Head &&head, Tail &&... tail) {
    cerr << head << (sizeof...(Tail) == 0 ? " " : ", ");
    dump(std::move(tail)...);
}
template <class T>
void print(const vector<T> &v) {
    for (int i = 0; i < v.size(); i++) cout << v[i] << (i + 1 == v.size() ? '\n' : ' ');
}
template <class T>
void read(vector<T> &v) {
    for (int i = 0; i < v.size(); i++) cin >> v[i];
}
constexpr char sp = ' ', newl = '\n';
constexpr int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll MOD = 1e9 + 7;
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll n;
    cin >> n;
    ll res = 0;
    for (ll i = 2; i * i <= n; i++) {
        if (n % i) continue;
        ll co = 0;
        while (n % i == 0) {
            n /= i;
            co++;
        }
        ll s = 0;
        for (ll j = 1;; j++) {
            s += j;
            if (s > co) break;
            res++;
        }
    }
    if (n > 1) {
        res++;
    }
    cout << res << newl;
}

Measured memory_bytes: 3652
H, W = map(int, input().split())
S = [list(input()) for i in range(H)]

for i in range(H):
    S[i].append(".")
    S[i].insert(0, ".")
S.append(["."]*(W+2))
S.insert(0, ["."]*(W+2))
ans = S.copy()

for i in range(1,H+1):
    for j in range(1,W+1):
        plus = 0
        
        if S[i][j] != "#":
            adj = [S[i+1][j],S[i-1][j],S[i][j+1],S[i][j-1],S[i+1][j+1],S[i-1][j-1],S[i+1][j-1],S[i-1][j+1]]
            plus = adj.count("#")
            ans[i][j] = str(plus)
    print("".join(ans[i][1:W+1]))

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

int main(){
	string s;
	cin >>s;
	int i=0;
	string ans = "";
	while(i<s.length()){
		string p = s,substr(i, 3);
		i += 3;
		if(p == "ABC")
			ans = "ARC";
		else if(p  == "ARC")
			ans = "ABC";
	}
	cout<<ans<<endl;
	return 0;
}

Measured memory_bytes: 3596
import sys
def input(): return sys.stdin.readline().strip()


def main():
    N, M, Q = map(int, input().split())

    """
    １からの遷移に分解する系の発想なのかなあ
    table[s][t] = (sスタートでtエンドの列車本数)
    として２次元テーブルを用意しておけば、クエリ(p, q)に対する解は
        sum(table[ps:q][p:q])
    で彫られ、これは２次元累積和で高速計算可能。
    """

    table = [[0] * N for _ in range(N)]
    for _ in range(M):
        l, r = map(int, input().split())
        table[l - 1][r - 1] += 1

    for j in range(1, N):
        table[0][j] += table[0][j - 1]
    for i in range(1, N):
        summation = 0
        for j in range(N):
            summation += table[i][j]
            table[i][j] = table[i - 1][j] + summation

    for _ in range(Q):
        p, q = map(int, input().split())
        p, q = p - 1, q - 1
        if p == 0:
            print(table[q][q])
        else:
            print(table[q][q] - table[p - 1][q] - table[q][p - 1] + table[p - 1][p - 1])

if __name__ == "__main__":
    main()


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

int n,m,d[5],c,s;

int main()
{
	scanf("%d %d",&n,&m);
	for(int i=1;i<=n;++i) d[i]=-1;
	for(int i=1;i<=m;++i) {
		scanf("%d %d",&c,&s);
		if(d[c]!=-1&&d[c]!=s) {
			printf("-1");
			return 0;
		}
		d[c]=s;
	}
	if(d[1]==0&&n!=1) {
		printf("-1");
		return 0;
	}
	if(n==1&&d[1]==-1) {
		printf("0");
		return 0;
	}
	int ans=0;
	for(int i=1;i<=n;++i) {
		if(i==1&&d[i]==-1) {
			ans=1;continue;
		}
		if(d[i]!=-1) ans=ans*10+d[i];
		else ans=ans*10;
	}
	printf("%d",ans);
}

Measured memory_bytes: 256
N = str(input())
K = int(input())

dp = [[[0] * 2 for _ in range(4)] for _ in range(105)]
dp[0][0][0] = 1

n = len(N)
for i in range(n):
    nd = int(N[i])
    for j in range(4):
        for k in range(2):
            for d in range(10):
                ni = i + 1
                nj = j
                nk = k
                if d != 0:
                    nj += 1
                if nj > K:
                    continue
                if k == 0:
                    if d > nd:
                        continue
                    if d < nd:
                        nk = 1
                dp[ni][nj][nk] += dp[i][j][k]

print (dp[n][K][0] + dp[n][K][1])

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

#define x first
#define y second

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
typedef pair<ll,ll> pll;

const int mod=1000000000+7;

int addm(int& a,int b) {return (a+=b)<mod?a:a-=mod;}

template<class T,class U> bool smin(T& a,U b) {return a>b?(a=b,1):0;}
template<class T,class U> bool smax(T& a,U b) {return a<b?(a=b,1):0;}

int N,mi;
ll ct[100000],h;
ii a[100001];

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

	cin >> N;
	mi=N-1;
	for (int i=0;i<N;i++) {
		cin >> a[i].x;
		a[i].y=i;
	}

	sort(a,a+N);
	reverse(a,a+N);
	for (int i=0;i<=N;i++) {
		ct[mi]+=i*(h-a[i].x);
		h=a[i].x;
		smin(mi,a[i].y);
	}

	for (int i=0;i<N;i++) {
		//if (i) cout << ' ';
		cout << ct[i] << '\n';
	}


}

Measured memory_bytes: 2688
//ITP1_7_D
//????????????  25???

using System;
using System.Collections.Generic;

class ITP1_7_D
{
    static void Main(string[] args)
    {

        long ans;

        int[] st = Array.ConvertAll<string, int>((Console.ReadLine().Split(' ')), delegate (string value)
        {
            return int.Parse(value);
        });

        int n = st[0];
        int m = st[1];
        int l = st[2];

        long[,] A = new long[n, m];
        long[,] B = new long[m, l];
//        int[,] C = new int[n, l];


        for (int row = 0; row < n; row++)
        {

            int[] cdata = Array.ConvertAll<string, int>((Console.ReadLine().Split(' ')), delegate (string value)
            {
                return int.Parse(value);
            });

            for (int col = 0; col < m; col++)
            {
                A[row, col] = cdata[col];
            }

        }

        for (int row = 0; row < m; row++)
        {

            int[] cdata = Array.ConvertAll<string, int>((Console.ReadLine().Split(' ')), delegate (string value)
            {
                return int.Parse(value);
            });

            for (int col = 0; col < l; col++)
            {
                B[row, col] = cdata[col];
            }

        }

        for (int row = 0; row < n; row++)
        {
            for (int col = 0; col < l; col++)
            {
                ans = 0;
                for (int k = 0; k < m; k++)
                {
                    ans += (A[row, k] * B[k, col]);
                }

                Console.Write(ans);
                if (col < l - 1)
                    Console.Write(" ");
            }

            Console.Write("\r\n");

        }

    }

}

Measured memory_bytes: 9680
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef pair<int,int> Pi;
#define rep(i,n) for(ll i=0;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define fi first
#define se second
#define endl "\n"

template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){int len=d.size();rep(i,len){s<<d[i];if(i<len-1) s<<" ";}return s;}
template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){int len=d.size();rep(i,len){s<<d[i]<<endl;}return s;}
template<typename T> ostream& operator<<(ostream& s,const set<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){s<<"{"<<endl;for(auto itr=m.begin();itr!=m.end();++itr){s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;}s<<"}"<<endl;return s;}

const ll mod=1e9+7;
const ll inf=1e17;
const int INF=1e9;
const double PI=acos(-1);
const double EPS=1e-10;

int main(){
	cin.tie(0);ios::sync_with_stdio(false);
	string s;
	cin>>s;
	rep(i,s.size()){
		if(s[i]==',') cout<<" ";
		else cout<<s[i];
	}
	cout<<endl;
}

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

int main() {
 string s;
  cin >> s;
  int ans =0;
  for(int i=0;i<4;i++){
    if(s.at(i)=='+')
      ans ++ ;
    else 
      ans--;
  }
  cout << ans;
  
}


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

int main(){
    int n;
    cin >> n;

    int sum = 0;
    vector<int> s(n+1);
    for(int i=0; i<n; i++){
        cin >> s[i];
        sum += s[i];
    }
    sort(s.begin(),s.end());

    int ans = 0;
    for(int i=0; i<=n; i++){
        if((sum - s[i]) % 10 != 0){
            ans = sum - s[i];
            break;
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.nextLine();

		if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		sc.close();

	}

}


Measured memory_bytes: 23252
#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=n;i<N;i++)
#define p(S) cout<<S<<endl
using namespace std;


int main(){
	int a,b,c;
	int t=0;
	set<int> s;
	cin>>a>>b>>c;
	while(1){
		int now=c%(a+b);
		if(now<=a){
			t=c;
			break;
		}else if(s.find(now)!=s.end()){
			t=-1;
			break;
		}else{
			s.insert(now);
			c+=60;
		}
	}
	p(t);
	return 0;
}

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

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

  int cnt = 0;
  for (int i=1; i<=9; i++){
    if (i <= N) cnt++;
  }

  for (int i=100; i<=999; i++){
    if (i <= N) cnt++;
  }

  for (int i=10000; i<=99999; i++){
    if (i <= N) cnt++;
  }

  cout << cnt << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
ll mod=1e9+7;
#define PI 3.1415926535897932385
#define inf 100000000000000000ll
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
typedef pair<long long, long long> ii;
#define S second
#define F first
ll max(ll a,ll b){if(a>b){return a;}return b;}
ll min(ll a,ll b){if(a<b){return a;}return b;}
#define MAXN 200005
// string to integer stoi() Remember: it takes string not character
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();
 
// To compile--> g++ -std=c++0x -o output one.cpp
// To run--> ./output

int main() {
    fastio;
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);

    ll k;
    cin>>k;
    string s;
    cin>>s;

    if(s.length()>k){
        string ans="";
        for (int i = 0; i < k; ++i)
        {
            ans.push_back(s[i]);
        }
        ans.push_back('.');
        ans.push_back('.');
        ans.push_back('.');
        cout<<ans<<endl;
    }
    else{
        cout<<s<<endl;
    }

    return 0;
}


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

#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define Yes(hoge) cout<<((hoge)?"Yes":"No")<<endl;
#define YES(hoge) cout<<((hoge)?"YES":"NO")<<endl;
using namespace std;
struct Grid{int x,y,t;};
struct Edge{int to,cost;};
struct Graph{vector<vector<Edge>>E;int V;
  const ll Inf = llINF;const int MAX_V=1010;vector<ll>d;
  Graph(int n):E(n){d.resize(MAX_V);E.resize(n);V=n;}
  void init(){for(int i=0;i<MAX_V;i++)d[i]=Inf;}
  void add_edge(int from,int to,int cost){E[from-1].pb({to-1,cost});}
};
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int h,w,n;cin>>h>>w>>n;
  int cnt[100]={};
  vector<pair<int,int> >bl(n);
  map<pair<int,int>,int>MP2;
  for(int i=0;i<n;i++){
    cin>>bl[i].F>>bl[i].S;
    MP2[mp(bl[i].F,bl[i].S)]=1;
  }
  sort(ALL(bl));
  map<pair<int,int>,int >MP;
  for(int i=0;i<n;i++){
    int jl=max(1,bl[i].F-2),jr=min(bl[i].F,h-2);
    int kl=max(1,bl[i].S-2),kr=min(bl[i].S,w-2);
    for(int j=jl;j<=jr;j++){
      for(int k=kl;k<=kr;k++){
	if(MP[mp(j,k)]==0){
	  MP[mp(j,k)]=1;
	  int cntt=0;
	  for(int l=j;l<=j+2;l++)
	    for(int lll=k;lll<=k+2;lll++)
	      cntt+=MP2[mp(l,lll)];
	  cnt[cntt]++;
	}
      }
    }
  }
  int sum=0;
  for(int i=1;i<=9;i++)sum+=cnt[i];
  cout<<(ll)(h-2)*(w-2)-sum<<endl;
  for(int i=1;i<=9;i++)cout<<cnt[i]<<endl;
  return 0;
}


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

using namespace std;


const long long INF = 1LL << 60;

long long h[100010];

long long dp[100010];

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

    for (int i = 0; i < N; i++) cin >> h[i];

    for (int i = 0; i < 100010; i++) dp[i] = INF;

    dp[0] = 0;

    for (int i = 1; i < N; i++){
        for (int j = 1; j <= K; j++){
            if (i - j >= 0)
                dp[i] = min(dp[i], dp[i-j] + abs(h[i] - h[i-j]));
        }
    }


    cout << dp[N-1] << endl;

    return 0;
}




Measured memory_bytes: 1792
#include <iostream>
using namespace std;
int main() {
	string s;
	cin >> s;
	int N = s.length();
	for (int i = 0; i < N - 1; i++) {
		if (s[i] == s[i + 1]) {
			cout << i + 1 << " " << i + 2 << endl;
			return 0;
		}
		if (i + 2 < N && s[i] == s[i + 2]) {
			cout << i + 1 << " " << i + 3 << endl;
			return 0;
		}
	}
	cout << "-1 -1" << endl;
}

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

using namespace std;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define debug(x) cerr << #x << ":" << x << endl;
#define OK(ok) cout << (ok ? "Yes" : "No") << endl;
typedef long long ll;

void CINT(){}
template <class Head,class... Tail>
void CINT(Head&& head,Tail&&... tail) {
  cin >> head; CINT(move(tail)...);
}
#define CIN(...) int __VA_ARGS__;CINT(__VA_ARGS__)
#define LCIN(...) ll __VA_ARGS__;CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__;CINT(__VA_ARGS__)

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

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

  LCIN(N, x);
  vector< ll > a(N);
  REP(i, N) {
    cin >> a[i];
  }

  ll ans = LINF;
  vector< ll > b(a);
  REP(i, N) {
    ll tmp = x * (ll)i;
    
    REP(j, N) {
      b[j] = min(b[j], a[((ll)(j - i) + N) % N]);
    }
    REP(j, N) {
      tmp += b[j];
    }

    ans = min(ans, tmp);
  }

  cout << ans << endl;

  return 0;
}



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

int main(){
    ll A, B, C;
    cin >> A >> B >> C;
    if (A%2==0 || B%2==0 || C%2==0) cout << 0 << endl;
    else cout << min(min(A*B, B*C), A*C) << endl;
    return 0;
}

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

#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,ans=-1;
    cin>>n;
    int a[n],b[100002]={0};
    for(int i=0;i<n;i++){
        cin>>a[i];
        b[a[i]]++;
        b[a[i]+1]++;
        if(a[i]!=0){
            b[a[i]-1]++;
        }
    }
    for(int i=0;i<100002;i++){
        if(ans<b[i]){
            ans=b[i];
        }
    }
    cout<<ans<<endl;
    return 0;
}



Measured memory_bytes: 1024