akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

#define debug(x) cout << #x << ": " << x << endl;
#define ll long long
#define mod 1000000007

ll N;

int main() {
 // freopen("input.in","r",stdin);
  //freopen("output.out","w",stdout);
  cin >> N;
  if((N < 2) || ((N % 2) != 0)) {
    cout << 0 << endl;
    return 0;
  }

  ll temp = N / 10;
  ll ans = temp;
  while(temp > 0) {
    temp /= 5;
    ans += temp;
  }
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 764
#include <bits/stdc++.h>
 
#define rep(i,n) for(ll i=0;i<n;++i)
#define ALL(a) (a).begin(),(a).end()
 
using namespace std;
using ll  = long long;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
 
const ll MOD  = 1e9+7;
const ll LINF = 1LL << 60;
const int INF = 1e9 + 7;

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

    map<string, int> mp;

    rep(i, n){
        string s;
        cin >> s;
        mp[s] = 1;
    }

    ll ans = 0;
    for(auto itr = mp.begin(); itr!= mp.end();itr++)ans++;

    cout << ans << endl;
}

Measured memory_bytes: 19256
#include <iostream>
#include <vector>
#include <array>
#include <deque>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <utility>
#include <cmath>

using namespace std;
using i64=long long int;

int main() {
    int N, M;
    cin >> N >> M;
    vector<vector<int>> edge(N+1);
    vector<int> par(N+1, 0);

    vector<int> pn(N+1, 0);
    for(int i = 0; i < N-1+M; ++i) {
        int u, v;
        cin >> u >> v;
        edge[u].emplace_back(v);
        pn[v]++;
    }

    int root;
    for (int i = 1; i <= N; ++i) {
        if (pn[i] == 0) {
            root = i;
            break;
        }
    }

    queue<int> que;
    que.emplace(root);
    while (!que.empty()) {
        auto v = que.front(); que.pop();
        for (auto &&child: edge[v]) {
            pn[child]--;
            if (pn[child] != 0) continue;
            par[child] = v;
            que.emplace(child);
        }
    }

    for (int i = 1; i <= N; ++i) {
        cout << par[i] << endl;
    }

    return 0;
}


Measured memory_bytes: 8704
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO.Pipes;
using System.Linq;
using System.Numerics;
using System.Threading;

namespace ForATCODER
{
    public class Program
    {
        public static void Main(string[] args)
        {
            string s = System.Console.ReadLine();
            for(int i = 0; i < 2;i++)
            {
                if (s[i] != s[i+1]) { RESULT("Yes");return; }
            }
            RESULT("No");
           

            

        }
        public static ulong pow(int a,int b)
        {
            ulong res = 1;
            for(int i = 0; i < b;i++)
            {
                res *= (ulong)a;
            }
            return res;
        }
        public static void sortT<T>(T[] arr, int index)
        {

            // If the index is negative,  
            // it represents the bitwise 
            // complement of the next larger  
            // element in the array. 
            if (index < 0)
            {

                index = ~index;

                if (index == 0)
                    Console.Write("beginning of array");
                else
                    Console.Write("{0} and ", arr[index - 1]);

                if (index == arr.Length)
                    Console.WriteLine("end of array.");
                else
                    Console.WriteLine("{0}", arr[index]);
            }
        }







        static int s2i(String s)
        {
            return Convert.ToInt32(s);
        }
        static ulong s2l(String s)
        {
            return Convert.ToUInt64(s);
        }
        static void RESULT(double res)
        {
            Console.WriteLine(res);
        }
        static void RESULT(long res)
        {
            Console.WriteLine(res);
        }
        static void RESULT(ulong res)
        {
            Console.WriteLine(res);
        }
        static void RESULT(int res)
        {
            Console.WriteLine(res);
        }
        static void RESULT(String res)
        {
            Console.WriteLine(res);
        }
        static String[] ReadLineAll(int count)
        {
            String[] res = new String[count];
            for (int i = 0; i < count; i++)
            {
                res[i] = Console.ReadLine();
            }
            return res;
        }

        static int[] s2iarray(String[] src)
        {
            int len = src.Length;
            int[] res = new int[len];
            for (int i = 0; i < len; i++)
            {
                res[i] = Convert.ToInt32(src[i]);
            }
            return res;
        }
        static long[] s2larray(String[] src)
        {
            int len = src.Length;
            long[] res = new long[len];
            for (int i = 0; i < len; i++)
            {
                res[i] = Convert.ToInt64(src[i]);
            }
            return res;
        }
    }
}


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

#define what_is(x) cout << #x << " is " << x << endl;
#define PI acos(-1)
#define hell 1000000007
#define HELL 998244353
#define io ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define fix(n) cout << fixed << setprecision(n)
#define mset(a,n) memset(a,n,sizeof a)
#define rep(i,a,b) for (__typeof((b)) i=(a);i<(b);i++)
#define repp(i,a,b,p) for(__typeof((b)) i=(a);i<(b);i+=p)
#define ren(i,a,b) for(__typeof((a)) i=(a);i>=(b);i--)
#define renn(i,a,b,p) for(__typeof((a) i=(a);i>=(b);i-=p)
#define ADD(a,b,c) ((a)%c+(b)%c)%c
#define SUB(a,b,c) ((a)%c-(b)%c+c)%c
#define MUL(a,b,c) (((a)%c)*((b)%c))%c
#define lbd lower_bound
#define ubd upper_bound
#define ll long long
#define ld long double
#define pb push_back
#define fi first
#define se second
#define vll vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define all(v) (v).begin(), (v).end()
#define sz(x) (ll)x.size()
// #define out(n) cout<<n<<" "
#define outl(n) cout<<n<<endl
#define bug(n) {outl(n);return;}
#define pii pair<int,int>
#define lim 9223372036854775805
#define ninf -9223372036854775802
#define M 1000000007
#define eps 1e-9
#define MAX 10
#define N 500001
#define db(a) for(auto it:a) {cout<<it<<" ";}cout<<endl;
ll prime[MAX];
ll fact[MAX];

const long long INF64 = 1e18;
ll vpow(ll a,ll b,ll p){
    if(b==0)
        return 1;
    if(b==1)
            return a;
    ll temp=vpow(a,b/2,p);
    temp*=temp;
    temp%=p;
    if(b%2==0)
        return temp;
    temp=temp*a;
    temp%=p;
    return temp;
}

ll gcd(ll a,ll b){
     if(a==0)
         return b;
     return gcd(b%a,a);
 }


ll inverseMod(ll a,ll b,ll p){
    if(b==0)
        return 1;
    ll temp=vpow(b,p-2,p);
    ll ans=temp*a;
    ans%=p;
    return ans;
}
void sieve()
{
    prime[0] = prime[1] = 1;
    for (ll i = 2; i < MAX; i++) {
        if (prime[i] == 0) {
            for (int j = i * 2; j < MAX; j += i) {
                if (prime[j] == 0) {
                    prime[j] = i;
                }
            }
            prime[i] = i;
        }
    }
}
ll max(ll a, ll b)
{
    return a>b?a:b;
}

void factorial(){
    fact[0]=1;
    fact[1]=1;
    rep(i,2,MAX){
        fact[i]=(fact[i-1]*i);
        // fact[i]%=M;
    }
}
ll rand(ll a,ll b){
    return a+rand()%(b-a+1);
}

void solve(ll ttt){
    ///ll n;
    string n;
    cin>>n;
    ll sum=0;
    ll i=0;
    while(i<n.size())
    {
        sum+=(n[i]-'0');
        i++;
    }
    if(sum%9==0)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
    return;
}
int main(){
    io;
    // sieve();
    // factorial();
#ifndef ONLINE_JUDGE
    //
    //freopen("input1.txt","r",stdin);
    // freopen("output1.txt","w",stdout);
#endif
    ll t=1;
     //cin>>t;
    fix(12);
    rep(q,1,t+1){
         //cout<<"Case #"<<q<<": ";
         solve(q);
        //solve2();
    }
    return 0;

}




Measured memory_bytes: 3744
#include <bits/stdc++.h>
#define ll  long long int
#define out  cout<<

using namespace std;



int main(){
    ll n;
    cin>>n;
    ll no_of_b=0;
    for(ll i=1;i<n;i++){
        no_of_b += (n-1)/i;
    }
    cout<<no_of_b<<endl;
return 0;}


Measured memory_bytes: 3584
#include <bits/stdc++.h>
using namespace std;
  int main () {
  int A , B;
    
  cin >> A >> B;
    
  if (A >= 13){
  cout << B;
  }       
    
  else if (6 <= A && A <= 12){
  cout << B/2;
  }  
  
  else {
  cout << 0;
  }
  }

Measured memory_bytes: 384
import sys
input = sys.stdin.readline
from collections import defaultdict
from operator import itemgetter
N = int(input())

A = [[] for _ in range(N)]
for i in range(N):
    S, P = [x.strip() for x in input().split()]
    A[i].append(S)
    A[i].append(int(P))

B = sorted(A, key=itemgetter(1), reverse=True)
B = sorted(B, key=itemgetter(0))

for i in B:
    for j, v in enumerate(A):
        if i[0] == v[0] and i[1] == v[1]:
            print(j + 1)
            break










Measured memory_bytes: 3316
//  Created by liszt on 2019/07/21.
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n; cin>>n;
    int a[n];
    for(int i=0;i<n;i++){
        cin>>a[i];
        a[i]-=i+1;
    }
    sort(a,a+n);
    long long ans=0;
    for(int i=0;i<n;i++){
        ans+=abs(a[i]-a[n/2]);
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 1024
A,B,C,D = gets.chomp.split("").map(&:to_i)
[+1,-1].product([+1,-1],[+1,-1]).each{ |s1,s2,s3|
  if A+s1*B+s2*C+s3*D == 7
    puts "#{A}#{s1 > 0 ? "+" : "-"}#{B}#{s2 > 0 ? "+" : "-"}#{C}#{s3 > 0 ? "+" : "-"}#{D}=7"
    exit
  end
}

Measured memory_bytes: 1788
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string t;
  cin >> t;
  int n;
  n=t.size();
  int i;
  for(i=0;i<n;i++){
    if(t.at(i)=='?'){
      cout << "D";
    }else{
      cout << t.at(i);
    }
  }
}

Measured memory_bytes: 3756
use proconio::input;

fn main() {
    input! {
        s: String,
    }

    solve(&s);
}

fn solve(s: &String) {
    match &s[..] {
        "RRR" => println!("3"),
        "RRS" | "SRR" => println!("2"),
        "RSS" | "RSR" | "SRS" | "SSR" => println!("1"),
        _ => println!("0"),
    }
}


Measured memory_bytes: 2144
/*================================================
# ~  file:D.cpp
# ~~ date:2020-03-10
# ~~~author: SoMnus_L
#        |everybody finds love,in the end|
#   人の運命か,人の希望は悲しみにつづられているね
=================================================*/

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <set>
#define ll long long
const int N=1e6+10;
using namespace std;
typedef pair<int,int>PII;

string s,x;
int q,t,p;
int flag=0;
int main(){
 ios::sync_with_stdio(false);
   cin>>s>>q;
    while(q--){
      cin>>t;
       if(t==1) flag=1-flag;
       else if(t==2){
	   cin>>p>>x; p--;
	    if(flag^p){
                s.insert(s.size(),x); 
	    }
	    else  s.insert(0,x);
       }
    }
    if(flag)  reverse(s.begin(),s.end());
    cout<<s<<endl;
  return 0;
}


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

int main(){
    long long N;
    cin>>N;
    vector<long long> memo;
    long long temp=0;
    long long num=N;
    while(N%2==0){
        N/=2;
        temp++;
    }
    if(temp>0){
        memo.push_back(temp);
    }
    double sqrtNUM=sqrt(num);
    for(long long i=3;i<=sqrtNUM+2;i++){
        if(N%i!=0){
            continue;
        }
        temp=0;
        while(N%i==0){
            N/=i;
            temp++;
        }
        memo.push_back(temp);
    }
    long long cnt=0;
    for(auto memo_con:memo){
        long long value=memo_con;
        long long i=1;
        while(1){
            value-=i;
            if(value>=0){
                cnt++;
            }else{
                break;
            }
            i++;
        }
    }
    if(cnt==0&&num!=1){
        cout<<1<<endl;
        return 0;
    }
    if(N!=1){
        cnt++;
    }
    cout<<cnt<<endl;
    return 0;
}

Measured memory_bytes: 3636
using System;
using System.Collections.Generic;
class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int n = int.Parse(input[0]);
            int a = int.Parse(input[1]);
            int b = int.Parse(input[2]);
            int c = int.Parse(input[3]);
            int[] bamboo = new int[n];
            for (int i=0; i<n; i++) bamboo[i] = int.Parse(Console.ReadLine());

            int ans = 1000000000;

            for (int i=0; i<Math.Pow(4, n); i++)
            {
                List<int> aList = new List<int>(), bList = new List<int>(), cList = new List<int>();
                for (int j=0; j<n; j++)
                {
                    switch ((i >> (2 * j)) % 4)
                    {
                        case 0:
                        break;

                        case 1:
                        aList.Add(bamboo[j]);
                        break;

                        case 2:
                        bList.Add(bamboo[j]);
                        break;

                        case 3:
                        cList.Add(bamboo[j]);
                        break;
                    }
                }
                if (aList.Count * bList.Count * cList.Count == 0) continue;
                int buf = (aList.Count + bList.Count + cList.Count - 3) * 10;
                int sum = 0;
                foreach (int j in aList) sum += j;
                buf += Math.Abs(sum - a);
                sum = 0;
                foreach (int j in bList) sum += j;
                buf += Math.Abs(sum - b);
                sum = 0;
                foreach (int j in cList) sum += j;
                buf += Math.Abs(sum - c);

                ans = Math.Min(ans, buf);
            }

            Console.WriteLine(ans);



            
            

            
            
        }
    }
    //mcs Main.cs
    //mono Main.exe

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

#define rep(i, n) for (int i = 0; i < (n); i++)
#define contains(v, t) (find(v.begin(), v.end(), t) != v.end())
#define MOD 1000000007
typedef long long ll;
typedef unsigned long long ull;

int main() {
  int n;
  cin >> n;
  cout << (n * (n + 1)) / 2;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <vector>
 
#define ll long long;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (n); ++i)
const double PI=3.14159265358979323846;

using namespace std;

int main() {

	string s, t;

	cin >> s >> t;

	s += t[t.length() - 1];

	string ans = "No";
	if (s == t) ans = "Yes";

	cout << ans << endl;
}

//printf("%ld\n", ans);

Measured memory_bytes: 3632
#include <iostream>
#include <vector>
#include <map>
#include <cassert>
#include <numeric>
using namespace std;
using Graph = vector<vector<int>>;

/*  PrimeFact
    init(N): 初期化。O(N log log N)
    get(n): クエリ。素因数分解を求める。O(log n)
 */
/*template <typename T>
struct PrimeFact {*/
    vector<int> spf;
    void init(int N) { // 前処理。spf を求める
        spf.assign(N + 1, 0);
        for (int i = 0; i <= N; i++) spf[i] = i;
        for (int i = 2; i * i <= N; i++) {
            if (spf[i] == i) {
                for (int j = i * i; j <= N; j += i) {
                    if (spf[j] == j) {
                        spf[j] = i;
                    }
                }
            }
        }
    }
map<int, int> Map;
    bool get(int n) { // nの素因数分解を求める
        map<int, int> m;
      bool flag = false;
        while (n != 1) {
          
            if (m[spf[n]] == 0) Map[spf[n]]++;
            if (Map[spf[n]] == 2) flag = true;
            m[spf[n]]++;
            n /= spf[n];
        }
        return flag;
    }
/*};*/

int main() {
  long long N; cin >> N;
  long long A[N]; for (int i = 0; i < N; i++) cin >> A[i];
  
  init(1000000);
  int gcd_;
  bool flag2 = true;
  for (int i = 0; i < N; i++){
    if (i == 0) gcd_ = A[i];
    else gcd_ = gcd(A[i], gcd_);
    bool flag3 = true;
    if (get(A[i])) flag2 = false;
  }
  if (flag2 == true) cout << "pairwise coprime" << endl;
  else if (gcd_ == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
}

Measured memory_bytes: 18480
//#pragma GCC optimize ("Ofast")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/rope>
#define pb push_back
#define F first
#define S second
#define ins insert
#define mp make_pair
#define fo(i, n1, n, x) for(int i = n1; i <= n; i += x)
#define foo(i, n, n1, x) for(int i = n; i >= n1; i -= x)
#define bit __builtin_popcount
#define md (l + ((r - l) / 2))
#define all(x) x.begin(),x.end()
#define eb emplace_back
#define ub upper_bound
#define lb lower_bound
#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)

using namespace std;
//using namespace __gnu_pbds;
//using namespace __gnu_cxx;


using ll = long long;

//#define int ll

using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;



const int N = 2e5 + 11, mod = 1e9 + 7, mod2 = 998244353;
const int MAX = 1e5 + 11;
const int INF1 = 2e9 + 11;
const ll INF2 = 2e18 + 11;
const double INF3 = 1e8 + 11;
const int base = 500;
const int P = 31;
const int dx[] = {1, -1, 0, 0, 1, 1, -1, -1};
const int dy[] = {0, 0, 1, -1, 1, -1, 1, -1};
const double EPS = 1e-4;
const double PI = acos(-1.0);


//template<typename T> using ordered_set = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }


mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int n, k, c, pref[N], suff[N], dp[N], dp2[N];
string s;
main() {
  file("threesum");
  ios;
  cin >> n >> k >> c >> s;
  s = '#' + s;
  int mx = 1;
  fo(i, 1, n, 1) {
    if (s[i] == 'o') {
      dp[i] = 1;
      if (i > c + 1) chmax(dp[i], pref[i - c - 1] + 1);
    } else {
      dp[i] = mx;
    }
    chmax(mx, dp[i]);
    pref[i] = mx;
  }
  mx = 1;
  foo(i, n, 1, 1) {
    if (s[i] == 'o') {
      dp2[i] = 1;
      if (i + c + 1 <= n) chmax(dp2[i], suff[i + c + 1] + 1);
    } else {
      dp2[i] = mx;
    }
    chmax(mx, dp2[i]);
    suff[i] = mx;
  }
  if (pref[n] < k) return !(cout << "");
  vi ans;
  fo(i, 1, n, 1) {
//    cout << i << " " << pref[i] << " " << suff[i] << " " << pref[max(0, i - c - 1)] << " " << suff[min(n + 1, i + c+1)] << " CH\n";
    if (s[i] == 'o' and pref[i - 1] + suff[i + 1] < k) ans.eb(i);
  }
  for (int it : ans) cout << it << "\n";
  return 0;
}
/**

*/


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


int main(){
    int n, k; cin >> n >> k;
    vector<int> h(n);

    for(int i = 0; i < n; i++) cin >> h[i];
    sort(h.begin(), h.end());

    vector<int> diff(n-k+1);
    for(int i = 0; i < n-k+1; i++){
        diff[i] = h[k+i-1] - h[i];
    }
    cout << *min_element(diff.begin(), diff.end()) << "\n";
}


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

int main() {
  int N,count=0;
  cin>>N;
  vector<char> color(N);
  for(int i=0;i<N;i++){
    cin>>color.at(i);
    if(color.at(i)=='Y'){count++;}
  }
  if(count>=1){cout<<"Four"<<endl;}
  else {cout<<"Three"<<endl;}
}



Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<string>
#include<cctype>
#include<cmath>
#include<queue>
#include<stack> 
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;

int main(){
  int a[26];
  int i;
  for(i=0;i<26;i++){
    a[i]=0;
  }
  
  string S;
  cin >> S;
  for(i=0;i<S.size();i++){
    int m=S[i];
    m=m-97;
    a[m]+=1;
  }

  for(i=0;i<26;i++){
    if(a[i]==0){
      char M=i+97;
      cout << M << endl;
      return 0;  
    }
  }
  cout << "None" << endl;
  
  return 0;
}
 

Measured memory_bytes: 512
#include <stdio.h>

#define N 100

int main(){
  int i,j,mini,n,temp,count=0,array[N];

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

  for(i=0; i<n; i++){
    mini = i;
    for(j=i; j<n; j++){
      if(array[j]<array[mini]) mini = j;
    }
    if(i != mini) count++;
    temp = array[i];
    array[i] = array[mini];
    array[mini] = temp;
  }
  
  for(i=0; i<n; i++){
    if(i>0) printf(" ");
    printf("%d",array[i]);
  }
  printf("\n%d\n",count);
  
  return 0;
}

Measured memory_bytes: 604
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n,q; cin >> n >> q;
	while(q--){
		map<int,int> mp;
		int x,y; cin >> x >> y;
		if(n==1){
			cout << x << endl;
			continue;
		}
		while(x){
			mp[x]++;
			x=(x+n-2)/n;
		}
		while(y){
			if(mp[y]){
				cout << y << endl;
				break;
			}
			y=(y+n-2)/n;
		}
	}
}

Measured memory_bytes: 1280
#include <bits/stdc++.h>
using namespace std;
  
#define rep(i,b) for(int i = 0 ; i < b; i++)
#define F first
#define S second
#define pb push_back
#define all(v) v.begin(),v.end()
#define sz(a) (int)a.size()
#define mod 1000000007
#define dbg(a) cout<<#a<<" = "<<a<<endl
#define dbg2(a,b) cout<<#a<<" = "<<a<<", "<<#b<<" = "<<b<<endl
#define dbg3(a,b,c) cout<<#a<<" = "<<a<<", "<<#b<<" = "<<b<<", "<<#c<<" = "<<c<<endl
#define dbg4(a,b,c,d) cout<<#a<<" = "<<a<<", "<<#b<<" = "<<b<<", "<<#c<<" = "<<c<<", "<<#d<<" = "<<d<<endl
#define ll long long
#define ld long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>



void solve()
{
    int n;string s;cin>>n>>s;
    if(n<3200) printf("red\n");
    else cout<<s;
}
 
int main()
{   
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);
    cout << fixed << setprecision(11);
    clock_t beg=clock();
    int t=1, n;
    // cin>>t;
    // n = t;
    while(t--){
        // cout << "Case #" << n-t << ": ";
        solve();
    }
    //
    clock_t end=clock();
    fprintf(stderr, "%lf sec\n", (double)(end-beg)/(CLOCKS_PER_SEC));
    return 0;
}

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

int main(void){
  int N;
  int a[100000];
  int b[100002];
  REP(i, 100002) b[i] = 0;
  cin >> N;
  REP(i,N){
    cin >> a[i];
  }
  REP(i,N){
    b[a[i]]++;
  }
  int m=0;
  REP(i,100000){
    m = max(m, b[i]+b[i+1]+b[i+2]);
  }
  cout << m << endl;
  return 0;
}


Measured memory_bytes: 1024
N, K = map(int,input().split())
prices = input().split()

for i in range(len(prices)):
    prices[i] = int(prices[i])

pricesSum = 0
while K > 0:
    newFruit = min(prices) 
    index = prices.index(newFruit)
    prices.pop(index)
    pricesSum += newFruit
    K -= 1
    
print(pricesSum)

Measured memory_bytes: 9228
import java.util.Scanner;

class Main {

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

    void compute() {
        Scanner sc = new Scanner(System.in);
        int Amax = 0;
        int ans = 0;
        int N = sc.nextInt();
        for (int i = 0; i < N; i++) {
            int Acandidate = sc.nextInt();
            int Bcandidate = sc.nextInt();
            if (Acandidate > Amax) {
                Amax = Acandidate;
                ans = Acandidate + Bcandidate;
            }
        }
        System.out.println(ans);
    }
}

Measured memory_bytes: 66692
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = INT()

@lru_cache(maxsize=None)
def rec(x):
    if x == 0: return 1

    ret = 0
    if x >= 3:
        return (rec(x-1)+rec(x-3))%mod
    else:
        return 0

print(rec(S))


Measured memory_bytes: 11860
#include <bits/stdc++.h>
using namespace std;
typedef pair<long long, long long> P;
#define override_rep(i, l, r, mes, ...) mes
#define rep1(i, n) for (int i = 0; i < n; i++)
#define rep2(i, l, r) for (int i = l; i < r; i++)
#define rep(...) override_rep(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)
#define int long long
#ifdef DEBUG
std::ostream& dout = cout;
#else
stringstream dout;
#endif
template<typename T, typename U>
istream& operator>>(istream& in, pair<T, U>& p) {
	in >> p.first >> p.second;
	return in;
}
signed main(signed argc, char* argv[]) {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	const int MOD = 1e9 + 7;
	int n;
	cin>>n;
	set<int> st;
	rep(i,n){
	    int in;
	    cin>>in;
	    st.insert(in);
	}
	if(n==st.size())cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}


Measured memory_bytes: 9600
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    int N,K;
    string S;
    cin >> N;
    cin >> S;
    cin >> K;
    char c = S[K - 1];

    for (int i = 0; i < N; ++i){
        if(S[i] != c){
            S[i] = '*';
        }
    }

    cout << S << endl;
}


Measured memory_bytes: 256
N = int(input())
v = list(map(int, input().split()))
# 鍋に入れる回数が多いほど寄与度は下がる
v.sort()

ans = 0
for idx, value in enumerate(v):
    if idx == 0 or idx == 1:
        ans += value * 1 / (2 ** (N - 1))
    else:
        ans += value * 1 / (2**(N - idx))
print(ans)


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

int main() {
	int x1, y1, x2, y2;
	cin >> x1 >> y1 >> x2 >> y2;

	cout << x2 - y2 + y1 << " " << y2 + x2 - x1 << " ";
	cout << x1 - y2 + y1 << " " << y1 + x2 - x1 << endl;

	return 0;
}

Measured memory_bytes: 256
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;

class AtCoder
{
    public void Slove()
    {
        var input = Console.ReadLine();
        if(input == "A")
            System.Console.WriteLine("T");
        else if(input == "T")
            System.Console.WriteLine("A");
        else if(input == "C")
            System.Console.WriteLine("G");
        else if(input == "G")
            System.Console.WriteLine("C");
    }
    static void Main()
    {
        var ac = new AtCoder();
        ac.Slove();
    }
}

Measured memory_bytes: 13140
#include <stdio.h>
#include <math.h>

#define N 1000

void StandardDeviation(int, int *, double);

int main() {
    int i, n, s[N];
    double m = 0;

    while(1) {
        scanf("%d", &n);

        if (n == 0) break;

        m = 0;

        for (i = 0; i < n; i++) {
            scanf("%d", &s[i]);
            m += s[i];
        }
        m = m / n;
        StandardDeviation(n, s, m);
    }
    return 0;
}


void StandardDeviation(int n, int *s, double m) {
    int i;
    double a2 = 0;

    for (i = 0; i < n; i++) {
        a2 += (s[i] - m) * (s[i] - m);
    }
    a2 = a2 / n;

    printf("%f\n", sqrt(a2));
}



Measured memory_bytes: 2060
use std::io::Read;

fn main() {
    let mut buff = String::new();
    std::io::stdin().read_to_string(&mut buff).unwrap();
    let mut iter = buff.split_whitespace();

    let x: i32 = iter.next().unwrap().parse().unwrap();
    let mut mx: i32 = 1;

    for i in 2..(x + 1) {
        let mut j: i32 = i * i;
        while j <= x {
            if mx <= j {
                mx = j;
            }
            j *= i;
        }
    }
    println!("{}", mx);
}


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

int index(int numToFind, std::vector<int> vectorToFindIn) {int len = vectorToFindIn.size();for (int i = 0; i < len; i++){if (vectorToFindIn[i] == numToFind){return i;}}return -1;}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	int n,currentRightOdd,currentRightEven,lastTrap;
	string s;
	cin>>s;
	n=s.length();
	currentRightEven=0;
	currentRightOdd=0;
	lastTrap=1;
	int ans[n]={0};
	for (int i=0;i<n-1;++i)
	{
		if (s[i]=='R')
		{
			if (s[i+1]=='L')
			{
				if (i%2==0)
				{
					ans[i]+=currentRightEven+1;
					ans[i+1]+=currentRightOdd+1;
				}
				else
				{
					ans[i]+=currentRightOdd+1;
					ans[i+1]+=currentRightEven+1;
				}
				lastTrap=i+1;
				currentRightOdd=0;
				currentRightEven=0;
				++i;
			}
			else
			{
				if (i%2==0)
				{
					currentRightEven+=1;
				}
				else
				{
					currentRightOdd+=1;
				}
			}
		}
		else
		{
			if ((i-lastTrap)%2==0)
			{
				++ans[lastTrap];
			}
			else
			{
				++ans[lastTrap-1];
			}
		}
	}
	if (s[n-2]!='R')
	{
		if (((n-1)-lastTrap)%2==0)
		{
			++ans[lastTrap];
		}
		else
		{
			++ans[lastTrap-1];
		}
	}
	for (int i=0;i<n;++i)
	{
		cout<<ans[i]<<" ";
	}
	return 0;
}

Measured memory_bytes: 1104
#include<bits/stdc++.h>
#define X first
#define Y second
#define pb emplace_back
#define FOR(i,a,b) for(int (i)=(a);i<(b);++(i))
#define EFOR(i,a,b) for(int (i)=(a);i<=(b);++(i))
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define rreps(X,S,Y) for (int (X) = (Y)-1;(X) >= (S);--(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef ll LL;
typedef pii PII;
typedef pll PLL;
template<class T> using vv=vector<vector<T>>;
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}
const ll MOD=998244353;

int N;
int M;
int mat[314][314];
int tmp[314][314];

LL mypow(LL base, LL exp) {
  if (exp == 0) return 1;
  LL res = mypow(base*base%MOD, exp/2);
  if (exp%2) res = res*base%MOD;
  return res;
}

int main() {
  scanf("%d%d", &N, &M);
  rep(i, N) {
    rep(j, M) {
      scanf("%01d", &mat[i][j]);
    }
  }

  if (N < M) {
    rep(i, N) {
      rep(j, M) {
        tmp[i][j] = mat[i][j];
      }
    }

    rep(i, N) {
      rep(j, M) {
        mat[j][i] = tmp[i][j];
      }
    }
    swap(N, M);
  }

  rep(k, M) {
    reps(i, k, N) {
      if (!mat[i][k]) continue;
      rep(j, M) {
        swap(mat[i][j], mat[k][j]);
      }

      rep(j, N) {
        if (k == j) continue;
        if (!mat[j][k]) continue;
        rep(l, M) {
          mat[j][l] += mat[k][l];
          mat[j][l] %= 2;
        }
      }
    }
  }

  int rank = 0;
  rep(k, min(M, N)) {
    if (mat[k][k]) rank++;
  }

  LL ans = mypow(2, N+M-1);
  ans += MOD - mypow(2, N+M-1-rank);
  ans %= MOD;
  printf("%lld\n", ans);
}


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

const int INF = 1e9;

int main() {
  int n,k;
  cin>>n>>k;
  int a[n];
  for(int i=0;i<n;i++) cin>>a[i];
  if ((n - k) % (k - 1) == 0) {
    cout<<(n - k) / (k - 1) + 1<<endl;
  } else if ((n - k + 1) % (k - 1) == 0) {
    cout<<n / (k - 1)<<endl;
  } else {
    cout<<n / (k - 1) + 1<<endl;
  }

}

Measured memory_bytes: 640
//*Author : Franklin*
#include<bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9 + 5;
const int N = 2e5;
#define deb(x) cout << #x << "=" << x << "\n"
#define debug(a) for(auto &x:a) cout << x << " "
#define debugg(p) for(auto &x:p) cout << "(" << x.first << "," << x.second << ")" << "\n"

int h[100005];
int dp[100005];

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

    int n,k;
    scanf("%d%d",&n,&k);
    for(int i=0; i<n; i++) scanf("%d",h+i);

    for(int i=0; i<n; i++) dp[i] = INF;
    dp[0] = 0;
    for(int i=0; i<n; i++) {
        for(int j=1; j<=k; j++) {
            if(i+j<n) dp[i+j] = min(dp[i+j],dp[i]+abs(h[i]-h[i+j]));
        }
    }
    cout<<dp[n-1]<<"\n";

    return 0;
}


Measured memory_bytes: 4556
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << endl
#define COUTF(x) cout << setprecision(15) << (x) << endl
#define ENDL cout << endl
#define DF(x) x.erase(x.begin())  // 先頭文字削除
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define REVERSE(x) reverse(ALL(x))
#define init() \
  cin.tie(0);  \
  ios::sync_with_stdio(false)
#define debug(x) cerr << "[debug] " << #x << ": " << x << endl;
#define debugV(v)                       \
  cerr << "[debugV] " << #v << ":";     \
  rep(i, v.size()) cerr << " " << v[i]; \
  cerr << endl;
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using P = pair<ll, ll>;
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr double PI = 3.141592653589793238462643383279;
ll getDigit(ll x) {
  return x == 0 ? 1 : log10(x) + 1;
}

ll gcd(ll x, ll y) {
  return y ? gcd(y, x % y) : x;
}

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

vector<P> factorize(ll n) {
  vector<P> result;
  for (ll i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      result.pb({i, 0});
      while (n % i == 0) {
        n /= i;
        result.back().second++;
      }
    }
  }
  if (n != 1) {
    result.pb({n, 1});
  }
  return result;
}

vll divisor(ll n) {
  vll ret;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  SORT(ret);
  return (ret);
}

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

signed main() {
  init();
  ll S;
  cin >> S;

  map<ll, ll> m;
  ll before = S;
  m[before]++;
  ll index = 0;
  while (1) {
    ll next = 0;
    if (before % 2 == 0) {
      next = before / 2;
    } else {
      next = 3 * before + 1;
    }
    if (m[next] == 1) {
      COUT(index + 2);
      return 0;
    }
    before = next;
    index++;
    m[next]++;
  }
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define mem(a,b) memset(a,b,sizeof a) ;
#define vi vector<int>
#define ull unsigned long long
#define ll long long 
#define db double 
#define ldb long double
#define fl float
#define rep(i,a,b) for(int i=a;i<b;i++)
#define lrep(i,a,b) for(ll i=a;i<b;i++)
#define mod 1000000007
#define mpr make_pair
#define pb push_back
#define fr first
#define sn second
#define bpp(x) __builtin_popcountll(x)
const int INF = 1e9;
const ldb PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899863;
bool ok(string &s ,int l ,int r)
{
while(s[l]==s[r]) l++,r--;
return l>=r; 
}
ll cnk(ll n, int k)
{
    ll res = 1;
    if(k==0)
    return 0;
    for(int i = 0 ; (i) < (k) ; ++i) res = (res * (n - i)) / (i + 1);
    return res;
}
void solve()
{
int n,m; cin>>n>>m;
int ans;
ans=n*(n-1)/2;
//=(m/2)*2;
ans+=m*(m-1)/2;
cout<<ans;
}
int main()
{
ios_base::sync_with_stdio(0);
	cin.tie(0);
	int t=1;
	// cin >> t;
	while(t--){
	solve();
	}
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#define BR 380000.0

using namespace std;

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

	double res = 0;
	for (int i = 0; i < N; ++i) {
		double x;
		string u;
		cin >> x;
		cin >> u;
		if (u == "JPY") {
			res += x;
		}
		else {
			res += BR * x;
		}
	}
	cout << res << endl;
	return 0;
}



Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Console = System.Console;

namespace Atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var M = int.Parse(Console.ReadLine());
            Console.WriteLine(48 - M);
        }
    }
}

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

int main()
{
  int a, b;
  cin >> a >> b;
  if (a>=b) {
    rep(i, a) {
      cout << b;
    }
  }
  else {
    rep (i, b) {
      cout << a;
    }
  }
  cout << endl;
  return 0;
}


Measured memory_bytes: 256
#include<vector>
#include<cstdio>
class Tree{
private:
    int numVertex;
    int *parent, *depth, *height;
    std::vector<int> *child;
public:
    Tree(int v);
    ~Tree();
    void addEdge(int p,int c);
    void printData();
    void printData(int v);
    bool isRoot(int v);
    bool isLeaf(int v);
    void computeDepth(int v);
    void computeDepth();
    void computeHeight(int v);
    void computeHeight();
    std::vector<int> sibling(int v);
    void init();
};
Tree::Tree(int v){
    numVertex=v;
    parent=new int[v];
    for(int i=0;i<v;i++)parent[i]=-1;
    depth=new int[v];
    for(int i=0;i<v;i++)depth[i]=-1;
    height=new int[v];
    child=new std::vector<int>[v];
}
Tree::~Tree(){
    delete[] parent;
    delete[] child;
}
void Tree::addEdge(int p,int c){
    parent[c]=p;
    child[p].push_back(c);
}
bool Tree::isRoot(int v){
    return parent[v]==-1;
}
bool Tree::isLeaf(int v){
    return child[v].empty();
}
void Tree::computeDepth(){
    for(int i=0;i<numVertex;i++){
        if(isRoot(i))computeDepth(i);
    }
}
void Tree::computeDepth(int v){
    if(isRoot(v))depth[v]=0;
    for(auto itr=child[v].begin();itr!=child[v].end();itr++){
        depth[*itr]=depth[v]+1;
        computeDepth(*itr);
    }
}
void Tree::computeHeight(){
    for(int i=0;i<numVertex;i++){
        if(isRoot(i))computeHeight(i);
    }
}
void Tree::computeHeight(int v){
    height[v]=0;
    if(!isLeaf(v)){
        for(auto itr=child[v].begin();itr!=child[v].end();itr++){
            computeHeight(*itr);
            if(height[v]<=height[*itr])height[v]=height[*itr]+1;
        }
    }
}
std::vector<int> Tree::sibling(int v){
    std::vector<int> vec;
    if(isRoot(v))return vec;
    for(auto itr=child[parent[v]].begin();itr!=child[parent[v]].end();itr++){
        if(*itr!=v)vec.push_back(*itr);
    }
    return vec;
}
void Tree::printData(int v){
    printf("node %d: ",v);
    printf("parent = %d, ",parent[v]);
    printf("sibling = %d, ",(sibling(v).empty())?-1:sibling(v)[0]);
    printf("degree = %d, ",(int)child[v].size());
    printf("depth = %d, ",depth[v]);
    printf("height = %d, ",height[v]);
    if(isRoot(v))printf("root");
    else if(isLeaf(v))printf("leaf");
    else printf("internal node");
    // printf(", [");
    // for(auto itr=child[v].begin(); itr!=child[v].end(); itr++){
    //     printf("%s%d",(itr==child[v].begin())?"":", ",*itr);
    // }
    printf("\n");
}
void Tree::printData(){
    for(int i=0;i<numVertex;i++)printData(i);
}
void Tree::init(){
    for(int i=0;i<numVertex;i++){
        int id,left,right;
        scanf("%d%d%d",&id,&left,&right);
        if(left>=0)addEdge(id,left);
        if(right>=0)addEdge(id,right);
    }
    computeDepth();
    computeHeight();
}
int main(){
    int n;
    scanf("%d",&n);
    Tree t(n);
    t.init();
    t.printData();
    return 0;
}


Measured memory_bytes: 2776
def main():
    import sys
    input = sys.stdin.readline
    #n = int(input())
    #l = list(map(int, input().split()))
    '''
    A=[]
    B=[]
    for i in range():
        a, b = map(int, input().split())
        A.append(a)
        B.append(b)'''

    n=int(input())
    s=input().rstrip('\n')
    a=0
    b=0
    c=0
    for i in range(n):
        if s[i]=="R":
            a+=1
        elif s[i]=="G":
            b+=1
        elif s[i]=="B":
            c+=1
    num=a*b*c
    #print(num)
    for i in range(n-2):
        for j in range(1,n//2+1):
            if i+2*j<n:
                if s[i]!=s[i+j] and s[i+j]!=s[i+2*j] and s[i]!=s[i+2*j]:
                    num-=1
    print(num)

if __name__ == "__main__":
    main()


Measured memory_bytes: 9228
#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string A , B;
  cin >> A >> B;
  
  for(int i = 0; i < N; i++){
    
    cout << A.at(i) << B.at(i) ;
  }
  cout << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for (ll i=0; i<(n); i++)
using namespace std;
typedef long long ll;

int main(){
    int a,b; cin >> a >> b;
    if((a+b)%2!=0) cout << (a+b)/2+1;
    else cout << (a+b)/2;
}

Measured memory_bytes: 256
def calc(prepoint, nextpoint):
    return abs(nextpoint[0]-prepoint[0]) + abs(nextpoint[1]-prepoint[1])

def main():
    H,W,D = map(int,input().split())
    index  = [(0,0) for i in range(H*W+1)]
    A = []
    for i in range(H):
        temp = list(map(int, input().split()))
        for t in temp:
            index[t] = (i,temp.index(t))
        A.append(temp)
    Q = int(input())
    L_R_List = [list(map(int, input().split())) for i in range(Q)]

    dp = [0 for i in range(H*W+1)]
    for i in range(D, H*W+1):
        dp[i] = dp[i-D] + calc(index[i], index[i-D])
    for L_R in L_R_List:
        L = L_R[0]
        R = L_R[1]
        print(dp[R]-dp[L])

if __name__ == '__main__':
    main()


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

typedef long long int ll;
ll MOD = 1000000007;
ll INFL = 1ll << 60;
ll INF = 1 << 28;

// ====================================================================

int main() {
  ll n, k, s;
  cin >> n >> k >> s;
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (count < k) {
      cout << s;
      count++;
    } else {
      if (s == 1000000000) {
        cout << s - 1;
      } else {
        cout << s + 1;
      }
    }
    if (i < n - 1)
      cout << " ";
  }
  cout << endl;
}


Measured memory_bytes: 1280
n, t = map(int, input().split())
a = list(map(int, input().split()))

ma = a[-1]
m = 1
maxsaeki = 0
ans = 0

for i in range(n-2,-1,-1):
    if a[i] > ma:
        ma = a[i]
        m = 1
    elif a[i] < ma:
        if (ma - a[i]) > maxsaeki:
            maxsaeki = ma-a[i]
            ans = 1
        elif (ma - a[i]) == maxsaeki:
            ans += 1

print(ans)

Measured memory_bytes: 14292
// バケット法
#include <iostream>
using namespace std;

int main() {
    int N;
    int d[110];
    cin >> N;
    for (int i = 0; i < N; ++i) cin >> d[i];

    int num[110] = {0};  // バケット
    for (int i = 0; i < N; ++i) {
        num[d[i]]++;  
    }

    int res = 0;  // 答えを格納
    for (int i = 1; i <= 100; ++i) {  // 1 <= d[i] <= 100 なので 1 から 100 まで探索
        if (num[i]) {  // 0 より大きかったら 0 出なかったらtrue を返す
            ++res;
        }
    }
    cout << res << endl;
}

Measured memory_bytes: 256
def retMin(a,b):
  if a>=b:
    return b
  else:
    return a

n,k = map(int,input().split())
r = list(map(int,input().split()))

dpList = [99999999999] * n

dpList[0] = 0

for i in range(n):
  for s in range(1,k+1):
    if (i+s) >= n:
      break
    dpList[i+s] = retMin(dpList[i+s],dpList[i] + (abs(r[i] - r[i+s])))

print(dpList[n-1])

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

signed main(){
    int n,d,s=0;
    cin>>n>>d;
    for(int i=0;i<n;i++){
    	int x,y;
    	cin>>x>>y;
    	if(x*x+y*y<=d*d) s++;
	}
	cout<<s;
	return 0;
}


Measured memory_bytes: 3600
n,m=map(int,input().split())
ans=[-1]*n

for i in range(m):
    s,c=map(int,input().split())
    s-=1
    if ans[s]>=0 and ans[s]!=c:
        print(-1)
        exit()

    ans[s]=c
if ans[0]==-1:
    if n>=2:
        ans[0]=1
    else:
        ans[0]=0
if ans[0]==0 and n!=1:
    print(-1)
    exit()
for i in range(1,n):
    if ans[i]==-1:
        ans[i]=0
x=0
for i in range(n):
    x+=ans[-1-i]*(10**i)
print(x)


Measured memory_bytes: 61980
#16:18
n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0
import bisect
for i in range(n):
  for j in range(i+1,n):
    ans += max(0,bisect.bisect_left(l,l[i]+l[j])-j-1)
print(ans)

Measured memory_bytes: 45176
package main

import "fmt"

func main() {
	var w, h, x, y float64
	fmt.Scan(&w, &h, &x, &y)
	ans := 0
	if x*2 == w && y*2 == h {
		ans = 1
	}

	fmt.Printf("%.10f %d\n", float64(w*h/2.0), ans)
}


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

int n, x, ans,tmp,tot;

void solve()
{
}

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

  ans=1;
  tot=0;
  for (int i = 0; i < n; ++i)
  {
    cin >> tmp;
    tot += tmp;

    if (tot <= x) {
      ans++;
    }

  }

  solve();

  cout << ans << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <utility>
#include <deque>
#include <sstream>
using namespace std;

#define namefile ""
#define inifile freopen(namefile".inp","r",stdin); freopen(namefile".out","w",stdout)
#define fastio ios_base :: sync_with_stdio(false); cin.tie(NULL);
#define mp make_pair
#define pb push_back
#define fi first
#define se second

typedef unsigned int uint;
typedef unsigned long ulong;
typedef long long llong;
typedef unsigned long long ullong;
typedef pair<int,int> PII;
typedef pair<long,long> PLL;
typedef vector<int> VI;
typedef vector<long> VL;
typedef vector<string> VS;
typedef vector< VI > VVI;
typedef vector< VL > VVL;
typedef vector< PII > VPII;
typedef vector< PLL > VPLL;
typedef set<int> SETI;
typedef set<long> SETL;
typedef map<int,int> MII;
typedef map<long,long> MLL;

const long long MOD = 1e9+7;
const long long INFMAX = 1e9;
const long long INFMIN = -1e9;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
const double epsilon = 1e-9;
const double PI = acos(-1.00);

string s;

int main()
{
    cin >> s;
    if (s == "Sunny") cout << "Cloudy";
    else if (s == "Cloudy") cout << "Rainy";
    else cout << "Sunny";
    return 0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template<class T> using vc = vector<T>;
template<class T> using vvc = vector<vector<T>>;

const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
const ll INF = 1e16;
const ld EPS = 1e-11;
const ld PI = acos(-1.0L);
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n)-1; i >= 0; i--)
#define repe(i, l, r) for (ll i = (l); i < (r); i++)
#define reper(i, l, r) for (ll i = (r)-1; i >= (l); i--)

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

void init() {cin.tie(0);ios::sync_with_stdio(false);cout << fixed << setprecision(15);}
//--------------------------------------------------------------------------------//
ll D[35][35], CL[503][503], cnt[3][35];
int main() {
    init();
    ll N,C;
    cin >> N >> C;
    rep(i, C) rep(j, C) cin >> D[i][j];
    rep(i, N) rep(j, N) cin >> CL[i][j];

    rep(i,N)rep(j,N){
        ll m = (i + j) % 3;
        cnt[m][CL[i][j] - 1]++;
    }

    ll ans = INF;
    rep(i,C)rep(j,C){
        if (i == j) continue;
        rep(k,C){
            if (k == i or k == j) continue;

            ll tmp = 0;
            rep(c, C) tmp += D[c][i] * cnt[0][c];
            rep(c, C) tmp += D[c][j] * cnt[1][c];
            rep(c, C) tmp += D[c][k] * cnt[2][c];
            
            chmin(ans, tmp);
        }
    }

    cout << ans << endl;
}

Measured memory_bytes: 2304