akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <string>
#include <set>
#include <bitset>
#include <unordered_map>

using namespace std;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
template <class T>
using Vvec = vector<vector<T> >;

int main()
{
    int r;
    cin >> r;
    cout << r*r << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
 
using namespace std;
 
#define lli long long int
#define LOOP(i,s,l) for(lli i=s;i<l;i++)
#define DEBUG 0
#define INF (1LL<<50)
#define MOD 1000000007

signed main(){
	
	lli n,defeated;
	cin>>n;
	vector<lli> a(n+1),b(n);
	LOOP(i,0,n+1)cin>>a[i];
	LOOP(i,0,n)cin>>b[i];

	defeated=0;

	for(lli i=n-1;i>=0;i--){
		
		if(a[i+1]>=0) {
			defeated += min(a[i+1],b[i]);
			b[i] -= min(a[i+1],b[i]);
		}
		if(a[i]>=0){
			defeated += min(a[i],b[i]);
			a[i] -= min(a[i],b[i]);
		}
	}
	cout<<defeated<<endl;

	return 0;
}

Measured memory_bytes: 1920
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define REP(i, n) for(int i = 0; i < (n); ++i)
typedef long long ll;
const ll MOD = 1000000007;
using namespace std;

int main(){
    ll n, m, ans=0; cin >> n >> m;
    ans += min(n, m/2);
    m -= 2 * min(n, m/2);
    ans += m / 4;
    cout << ans << "\n";
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)

using namespace std;

int main() {
    int n;

    cin >> n;

    if (n % 2 == 0) {
        cout << n << endl;
    } else {
        cout << 2*n << endl;
    }
    return 0;
}

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

using namespace std;
#define MX 1e5+1
#define pb push_back
#define prr pair<int,int> 
#define int long long


int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);    
    int n,k;
    cin>>n>>k;
    int arr[n];
    int ans=0;
    
    int a1,a2;
    for(int i=0;i<k;i++){
        cin>>arr[i];
        
        
    }
    int diff=0;
    for(int i=0;i<k;i++){
        if(i==0){
            a1=arr[k-1]-arr[0];
            a1=n-a1;
            diff=max(diff,a1);
        }
        a1=arr[i]-arr[i-1];
        diff=max(diff,a1);
    }

    ans=n-diff;
    cout<<ans;
    
    

    
}



















Measured memory_bytes: 3840
#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
typedef vector<int> VI;
typedef priority_queue<int> PQ;
typedef pair<int, int> pii;
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#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 SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
//vector<vector<int> > dp;
//vector<vector<vector<int> > > vvvi;
//dp=vector<vector<int> >(N, vector<int>(M,0));
//vector<pair<int,int> > v;
//v.push_back(make_pair(x,y));
//priority_queue<int,vector<int>, greater<int> > q2;



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

	int N, M;
	cin >> N >> M;
	bool F[100010] = { false };
	VI dp(N+1,0);
	REP(i, M) {
		int a;
		cin >> a;
		F[a] = true;
	}
	REP(i, N-1) {
		if (F[i] && F[i + 1]) {
			cout << 0 << endl;
			return 0;
		}
	}
	dp[0] = 1;


	eFOR(i, 1, N) {
		
		if (!F[i-1]) {
			dp[i] += dp[i - 1];
		}
		if (!F[i - 2] && i != 1) {
			dp[i] += dp[i - 2];
		}
		dp[i] %= mod;
		//cout << dp[i] << endl;
	}
	//cout << endl;
	cout << dp[N] << endl;
	return 0;
}



Measured memory_bytes: 1152
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String str = bf.readLine();
		String[] str1 = str.split(" ");
		int N = Integer.parseInt(str1[0]);
		int K = Integer.parseInt(str1[1]);
		str = bf.readLine();
		str1 = str.split(" ");
		int[] data = new int[N];

		int res = 0;
		int start = Integer.parseInt(str1[0]);
		int end = Integer.parseInt(str1[N - 1]);
		if (start >= 0) {
			res = Integer.parseInt(str1[K - 1]);
			System.out.println(res);
			return;
		}
		if (end <= 0) {
			res = Integer.parseInt(str1[N - K]);
			System.out.println(Math.abs(res));
			return;
		}

		if (K == N) {
			if (Math.abs(start) < Math.abs(end)) {
				res = Math.abs(end - start) + Math.abs(start);
			} else {
				res = Math.abs(end - start) + Math.abs(end);
			}

			System.out.println(res);
			return;
		}

		end = Integer.parseInt(str1[K - 1]);
		int sum = 0;
		if (Math.abs(start) < Math.abs(end)) {
			sum = Math.abs(end - start) + Math.abs(start);
		} else {
			sum = Math.abs(end - start) + Math.abs(end);
		}
		int tmpSum = 0;
		for (int i = 0; i < N; i++) {
			end = Integer.parseInt(str1[i]);
			data[i] = end;
			if (i >= K) {
				start = data[i - K + 1];
				if (Math.abs(start) < Math.abs(end)) {
					tmpSum = Math.abs(end - start) + Math.abs(start);
				} else {
					tmpSum = Math.abs(end - start) + Math.abs(end);
				}

				if (tmpSum < sum) {
					sum = tmpSum;
				}
			}
		}

		System.out.println(sum);
		return;
	}
}

Measured memory_bytes: 39744
use std::str::FromStr;
use std::io::stdin;

fn main() {
    let n = read::<i32>();
    let vec = read_vec::<i32>();
    let mut sum = 0.0;
    for i in 0..n {
        let v = vec[i as usize] as f64;
        sum += 1.0 / v;
    }
    let result = 1.0 / sum;
    println!("{}", result);
}

fn read<T: FromStr>() -> T {
    let mut line = String::new();
    stdin().read_line(&mut line).ok();
    line.trim().parse().ok().unwrap()
}

fn read_vec<T: FromStr>() -> Vec<T> {
    let mut line = String::new();
    stdin().read_line(&mut line).ok();
    line.trim().split_whitespace()
        .map(|i| i.parse().ok().unwrap()).collect()
}

Measured memory_bytes: 4352
import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.util.*

fun main(args: Array<String>) {
    val sc = FastScanner(System.`in`)
    val R = sc.nextInt()
    val G = sc.nextInt()
    val B = sc.nextInt()
    val n = sc.nextInt()

    val use = listOf(R, G, B)
    val dp = Array(7000) { Array(3) { 0 } }
    dp[0][0] = 1

    for (x in 0..n) {
        for (u in 0..2) {
            for (k in u..2) {
                dp[x + use[k]][k] += dp[x][u]
            }
        }
    }

    println(dp[n][0] + dp[n][1] + dp[n][2] )
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}


Measured memory_bytes: 31940
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pi = pair<int, int>;
using vi = vector<int>;
using vii = vector<pi>;
#define endl '\n'
#define fast_io ios_base::sync_with_stdio(0); cin.tie(NULL);
#define all(a) (a).begin(),(a).end()
#define sz(a) int((a).size())
#define clr(a,x) memset((a),(x)sz(a))
#define present(t, x) (t.find(x) != t.end())
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define rep(i, x, y) for(decltype(y) i = (x) - ((x) > (y)); i != (y) - ((x) > (y)); i += 1 - 2 * ((x) > (y)))
#define forall(it, a) for(decltype((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define what_is(x) cerr << #x << " is " << (x) << endl;
#define db(x) cerr << __LINE__ << ": " << #x << " = " << (x) << endl
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define time__(d) \
	for(long blockTime=(long)NULL;(blockTime==(long)NULL?(blockTime=clock())!=(long)NULL:false); \
	debug("%s:%.4fs\n",(d),(double)(clock()-blockTime)/CLOCKS_PER_SEC))
const int MOD = (int) 1e9 + 7;
const int FFTMOD = 1007681537;
const int INF = (int) 1e9;
const ll LINF = (ll) 1e18;
const ld PI = acos((ld) -1); // pi
const ld EPS = 1e-9; // epsilon
#define eb emplace_back
#define ef emplace_front
#define mp make_pair
#define fi first
#define se second
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
template<class T> inline int imin(T& a, const T& val) {return val < a ? a = val, 1 : 0;}
template<class T> inline int imax(T& a, const T& val) {return a < val ? a = val, 1 : 0;}
inline ll isqrt(ll k) {ll r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline void addmod(int& a, int val, int p = MOD) {if ((a = (a + val)) >= p) a -= p;}
inline void submod(int& a, int val, int p = MOD) {if ((a = (a - val)) < 0) a += p;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}
inline int inv(int a, int p = MOD) {return fpow(a, p - 2, p);}
inline int sign(ld x) {return x < -EPS ? -1 : x > +EPS;}
inline int sign(ld x, ld y) {return sign(x - y);}

//time__("program time")

void solve(){

}

int main(){

	fast_io;
	//solve();
	int a,b;
	cin >> a >> b;

	if(a+b == 15) cout << "+\n";
	else if(a*b == 15) cout << "*\n";
	else cout << "x\n";


return 0;
}


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

struct mint{
    static const long long MOD = 1000000007;

    long long v;

    mint() : v(0) {}
    mint(long long x){
        x = x % MOD;
        if(x < 0){ x += MOD; }
        v = x;
    }
    mint& operator+=(mint a){
        v += a.v;
        if(v >= MOD){ v -= MOD; }
        return *this;
    }
    mint& operator*=(mint a){
        v *= a.v;
        v %= MOD;
        return *this;
    }
    mint& operator-=(mint a){
        v -= a.v;
        if(v < 0){ v += MOD; }
        return *this;
    }
    mint& operator/=(mint a){
        return (*this) *= a.inv();
    }

    mint operator*(mint a) const{
        return mint(v) *= a;
    }

    mint operator+(mint a) const {
        return mint(v) += a;
    }

    mint operator-(mint a) const {
        return mint(v) -= a;
    }

    mint operator/(mint a) const {
        return mint(v) /= a;
    }

    mint pow(long long k) const {
        mint res(1),tmp(v);
        while(k){
            if(k&1) res *= tmp;
            tmp *= tmp;
            k >>= 1;
        }
        return res;
    }
    mint inv(){return pow(MOD - 2); }

    static mint comb(long long n, int k){
        mint res(1);
        for(int i = 0; i < k; ++i){
            res *= mint(n - i);
            res /= mint(i + 1);
        }
        return res;
    }

    static mint factorial(long long n){
        mint res(1);
        for(int i = n; i > 1; --i){
            res *= mint(i);
        }
        return res;
    }

    bool operator<(const mint &a) const {
        return v < a.v;
    };
};

mint operator*(long long l, mint r){ return r * l; }

std::ostream& operator<<(std::ostream& stream, const mint& m){
    stream << m.v;
    return stream;
}

ll gcd(ll a, ll b) {
    if(a < b){
        return gcd(b, a);
    }
    ll r;
    while ((r=a%b)) {
        a = b;
        b = r;
    }
    return b;
}


void solve(long long H, long long W, long long T){
    const ll ght = gcd(H, T);
    const ll gwt = gcd(W, T);
    const ll h2 = H / ght;
    const ll w2 = W / gwt;
    const ll g = gcd(h2, w2);
    mint ans = mint(2).pow(g);
    ans += mint(2).pow(h2) + mint(2).pow(w2) - 3;
    ans = ans.pow(ght * gwt);
    cout << ans << endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
int main(){
    long long H;
    scanf("%lld",&H);
    long long W;
    scanf("%lld",&W);
    long long T;
    scanf("%lld",&T);
    solve(H, W, T);
    return 0;
}


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

int main(){
    string ch,s1(1000,'a'),s2(1000,'a'),p;
    int n,i,a,b,j,k;
    cin>>s1;
    cin>>n;
    for(k=0;k<n;k++){
        cin>>ch;
        if(ch=="replace"){
            cin>>a>>b>>p;
            s1.replace(a,b-a+1,p);
        }else if(ch=="reverse"){
            cin>>a>>b;
            j=b;
            s2=s1;
            for(i=a;i<b+1;i++){
                s1[i]=s2[j];
                j=j-1;
            }

        }else{
            cin>>a>>b;
            for(i=a;i<b+1;i++){
                cout<<s1[i];
            }
            cout<<endl;
        }
    }
    return 0;
}


Measured memory_bytes: 3224
using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
           var line = Console.ReadLine();

          var strs =  line.Split(' ');
            var a = int.Parse(strs[0]);
            var b = int.Parse(strs[1]);
            var c = int.Parse(strs[2]);

            var o1 = Math.Min(c, a);
            c = Math.Max(c-a,0);
            o1 += Math.Min(c, b);
            c -= Math.Min(c, b);
            o1 += b;
            o1 += (c > 0 ? 1 : 0);

            Console.WriteLine(o1);
        }
    }
}


Measured memory_bytes: 13140
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Competitive
{
    internal class Solution
    {
        public int N;
        public long MOD = 1000000007;
        public double[,] DP;
        public double[] P;
        public void Run()
        {
            N = Input.ReadInt();
            P = Input.ReadDoubleArray();
            DP = new double[N, N+1];
            DP[0, 0] = 1 - P[0];
            DP[0, 1] = P[0];

            for (int i = 1; i < N; i++)
            {
                for (int j = 0; j <= N; j++)
                {
                    if (j > 0)
                    {
                        DP[i, j] += DP[i - 1, j - 1] * P[i];
                    }
                    DP[i, j] += DP[i - 1, j] * (1 - P[i]);
                }
            }

            double ret = 0;
            for (int i = 0; i <= N; i++)
            {
                if (i > N / 2) ret += DP[N - 1, i];
            }

            Console.WriteLine(ret);
        }
    }

    // libs ----------
    

    // common ----------

    internal static class Input
    {
        public static string ReadString()
        {
            string line = Console.ReadLine();
            return line;
        }

        public static int ReadInt()
        {
            string line = Console.ReadLine();
            return int.Parse(line);
        }

        public static int[] ReadIntArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(int.Parse).ToArray();            
        }

        public static long ReadLong()
        {
            string line = Console.ReadLine();
            return long.Parse(line);
        }

        public static long[] ReadLongArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(long.Parse).ToArray();
        }

        public static double[] ReadDoubleArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(double.Parse).ToArray();
        }
    }
    
    internal class Program
    {
        public static void Main(string[] args)
        {
            var s = new Solution();
            s.Run();
        }
    }
}

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

typedef long long int ll;

int main()
{
	ll i,j,k,l,m,n,t,a,b,c,d;

	cin >> a >> b >> c >> d;

	i = 0;
	j = -1;
	while(1)
	{
		if(i%2 == 1)
			a -= d;
		else
			c -= b;

		if(a<=0)
		{
			j = 1;
			break;
		}

		if(c<=0)
		{
			j = 0;
			break;
		}

		i++;


	}

	if(j==0)
		cout << "Yes\n";
	else
		cout << "No\n";
	
}

Measured memory_bytes: 3652
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


l = int(input())
n = 20
es = []
for i in range(n-1):
    es.append((i,i+1,0))
    if pow(2,i+1)<=l:
        es.append((i,i+1,pow(2,i)))
v = 1
while v*2<=l:
    v *= 2
for i in range(n-1):
    if l>>i&1 and (l>>i)>1:
        es.append((i,n-1,v))
        v += pow(2,i)
print(20, len(es))
for u,v,c in es:
    print(u+1,v+1,c)

Measured memory_bytes: 62472
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <functional>
#include <map>
#include <queue>
#include <algorithm>
using namespace std;

string S, T;

int main() {
	cin >> S >> T;
	for (int i = 0; i < S.size(); i++) {
		S = S.substr(1, S.size() - 1) + S.substr(0, 1);
		if (S == T) {
			cout << "Yes" << endl;
			return 0;
		}
	}
	cout << "No" << endl;
	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define  ft  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define  ll  long long
#define  pi  pair<int,int>
#define  pb  push_back
#define  F   first
#define  S   second
const int N=2e5+3;
//string s,p;
//vector<int>v;
//map<int,int>mp;
int a[]={1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
int main()
{
    ft
    int t,i,j,n,m,l,r;
    cin>>n;
    cout<<a[n-1]<<"\n";
    return 0;
}



Measured memory_bytes: 256
import java.io.*;

class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        double result = 100000;

        for(int i=0; i<n; i++){
            result *= 1.05;
            result = Math.ceil(result/1000)*1000;
        }
        System.out.println((int)result);

    }
}

Measured memory_bytes: 23908
<?php
fscanf(STDIN, "%d %d %d", $N, $H, $W);
$ans = 0;
for ($i = 0; $i < $N; $i++) {
    fscanf(STDIN, "%d %d", $A, $B);
    $ans += ($A >= $H && $B >= $W);
}
echo $ans;


Measured memory_bytes: 4604
import java.util.Scanner;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true){
      String s = sc.nextLine();
      if(s.equals("END OF INPUT"))break;
      String[] t = s.split(" ");
      for(int i=0;i<t.length;i++){
        System.out.print(t[i].length());
      }
      System.out.println();
    }
  }
}

Measured memory_bytes: 25704
import sys

input = sys.stdin.readline


def main():
    N, W = [int(x) for x in input().split()]
    wv = [[int(x) for x in input().split()] for _ in range(N)]

    dp = [[0] * (W + 1) for j in range(N)]

    for j in range(N):
        for i in range(W + 1):
            if j == 0:
                if i < wv[j][0]:
                    continue
                dp[j][i] = wv[j][1]
            else:
                if i < wv[j][0]:
                    dp[j][i] = dp[j - 1][i]
                else:
                    dp[j][i] = max(dp[j - 1][i], dp[j - 1][i - wv[j][0]] + wv[j][1])

    print(max(dp[-1]))

if __name__ == '__main__':
    main()


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

# define x first
# define y second
# define mp make_pair
// everything goes according to my plan
# define pb push_back
# define sz(a) (int)(a.size())
# define vec vector
// shimkenttin kyzdary, dzyn, dzyn, dzyn...
# define y1    Y_U_NO_y1
# define left  Y_U_NO_left
# define right Y_U_NO_right

# ifdef Local
# define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
# else
# define debug(...) (__VA_ARGS__)
# define cerr if(0)cout
# endif

using namespace std;

typedef pair <int, int> pii;
typedef long long ll;
typedef long double ld;

const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 4e18;
const int Sz = 1110111;
// a pinch of soul
inline void Read_rap () {
  ios_base :: sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}
inline void randomizer3000 () {
  unsigned int seed;
  asm ("rdtsc" : "=A"(seed));
  srand (seed);
}
void files (string problem) {
  if (fopen ((problem + ".in").c_str(),"r")) {
    freopen ((problem + ".in").c_str(),"r",stdin);
    freopen ((problem + ".out").c_str(),"w",stdout);
  }
}
void localInput(const char in[] = "s") {
  if (fopen (in, "r")) {
    freopen (in, "r", stdin);
  }
  else
    cerr << "Warning: Input file not found" << endl;
}
int n;
double x[Sz], y[Sz];
double dist(int i, int j) 
{
	ll a = x[i]-x[j];
	ll b = y[i] - y[j];
	return sqrt(a*a+b*b);
}

int main()
{
  # ifdef Local
    //localInput();
  # endif
  Read_rap();
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++)
  {
  	cin >> x[i] >> y[i];
  }
  ll pm = 1;
  for (int i = 1; i <= n-2; i++)
  	pm *= i;
  pm *= (n-1);
  double sum = 0;
  for (int i = 1; i <= n; i++)
  	for (int j = 1; j <= n; j++)
  		if (i != j)
  		sum += pm * dist(i,j);
  sum /= pm*n;
  cout << fixed << setprecision(6) << sum;

  return 0;
}






// Coded by Z..

Measured memory_bytes: 2304
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
#define SortAsc(c) std::sort(c.begin(), c.end())
#define SortDesc(c) std::sort(c.rbegin(), c.rend())
int dx[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int dy[8] = {1, 0, -1, 0, 1, -1, 1, -1};
using Graph = vector<vector<int>>;

const ll TARGET = 100000;

int res = 0;

void dfs(Graph &g, unordered_set<ll> &connected, int depth, int from, int via,
         int to) {
  ll key = max(to, from) * TARGET + min(to, from);

  if (depth == 3) {
    if (connected.count(key)) {
      // cout << from << " - " << to << " connected,";
      return;
    }

    // cout << "connect " << from << " - " << to << endl;

    g.at(from).push_back(to);
    g.at(to).push_back(from);
    connected.insert(key);

    res++;
    return;
  }

  for (int i = 0; i < g.at(to).size(); i++) {
    int n = g.at(to).at(i);

    if (via == n || from == n) {
      continue;
    }

    // cout << from << " -> " << to << " -> " << n << " @ " << depth + 1 <<
    // endl;
    dfs(g, connected, depth + 1, from, to, n);
  }
}

bool isBipartite(Graph &g, vector<int> &colors) {
  colors.resize(g.size());
  colors.assign(g.size(), -1);

  struct Node {
    int number;
    int color;
  };

  stack<Node> s;

  for (int i = 0; i < g.size(); i++) {
    if (colors[i] == -1) {
      s.push(Node{number : i, color : 0});
    }

    while (!s.empty()) {
      auto node = s.top();
      s.pop();

      colors.at(node.number) = node.color;

      for (int i = 0; i < g[node.number].size(); i++) {
        auto next = g[node.number].at(i);

        if (colors[next] == node.color) {
          return false;
        }

        if (colors[next] != -1) {
          continue;
        }

        s.push(Node{number : next, color : 1 - node.color});
      }
    }
  }

  return true;
}

int main() {
  ll N, M;
  cin >> N >> M;

  Graph g(N);
  unordered_set<ll> connected;
  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    g.at(a).push_back(b);
    g.at(b).push_back(a);

    ll key = max(a, b) * TARGET + min(a, b);
    connected.insert(key);
  }

  // 愚直にDFSで繋ぐとTLE
  // for (int i = 0; i < N; i++) {
  //   dfs(g, connected, 0, i, i, i);
  // }

  // cout << res << endl;

  vector<int> colors;

  if (isBipartite(g, colors)) {
    ll B = 0, W = 0;

    for (int i = 0; i < colors.size(); i++) {
      if (colors[i] == 0) {
        B++;
      } else if (colors[i] == 1) {
        W++;
      }
    }

    if (B + W < N) {
      cout << g.at(N * 2)[0];
    }

    cout << B * W - M << endl;

  } else {
    cout << N * (N - 1) / 2LL - M << endl;
  }
}

Measured memory_bytes: 10404
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>

using namespace std;

int main(){
  int r, D, x;
  cin >> r >> D >> x;
  for(int i=0; i < 10; i++){
    x = x*r-D;
    cout << x << endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG //GCC5.4.1で配列の範囲外アクセスをエラーにする

//cmdで g++ test.cpp とするとコンパイルできる
//制限1秒なら10^6は余裕 10^7は多分間に合う 10^8はよほど単純でないと厳しい

#define ALL(x) x.begin(),x.end()
typedef long long ll; //long long
typedef pair<int,int> pii; //pair<int,int>
typedef vector<int> vi; //vector<int>
typedef vector<vector<int>> vvi; //vector<vector<int>>
typedef vector<ll> vll; //vector<long long>
typedef vector<vector<ll>> vvll; //vector<vector<long long>>
typedef priority_queue<int, vector<int>, greater<int> > gpq; //逆順priority_queue
typedef priority_queue<int> pq;

//const int MOD=998244353;
const int MOD=1000000007; //10^9+7
const double PI=3.1415926535;

int main(){
    ll N;
    cin>>N;
    ll ans=0;
    for(ll i=1;i<=N;i++){
        if(i%3==0 || i%5==0){

        }else{
            ans+=i;
        }
    }
    cout<<ans<<endl;
}


Measured memory_bytes: 3596
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException {
//		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//		String W	 = in.readLine();
//		int num = Integer.parseInt(W.split(" ")[0]);

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int ans = 0;

		int[] p = new int[N];
		for(int i = 0;i<N ; i++) {
			p[i] = sc.nextInt();
		}

		Arrays.sort(p);

		for(int i = 0;i<K ; i++) {
			ans += p[i];
		}


		System.out.println(ans);

	}

	//	//二分探索
	//k <= num となる最小の配列要素kのインデックスを返す
	static private int binarySearch(long num, long[] orderedArray){
		int lowerBorder = -1;
		int upperBorder = orderedArray.length;
		int mid;

		while(upperBorder - lowerBorder >1) {
			mid = (upperBorder + lowerBorder)/2;
			if(orderedArray[mid]<=num) {
				lowerBorder = mid;
			}else {
				upperBorder = mid;
			}
		}
		return lowerBorder;
	}

	//二分探索
	//k <= num となる最小のList要素kのインデックスを返す
	static private int binarySearch(long num, ArrayList<Long> orderedList){
		int lowerBorder = -1;
		int upperBorder = orderedList.size();
		int mid;

		while(upperBorder - lowerBorder >1) {
			mid = (upperBorder + lowerBorder)/2;
			if(orderedList.get(mid)<=num) {
				lowerBorder = mid;
			}else {
				upperBorder = mid;
			}
		}
		return lowerBorder;
	}

	//aとbの最小公倍数を求める
	public static int gcd(int a, int b) {
        return b == 0 ? a: gcd(b, a % b);
	}
	public static long gcd(long a, long b) {
        return b == 0 ? a: gcd(b, a % b);
	}



}


Measured memory_bytes: 38788
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<queue>
#include<climits>
#include<set>
#include<map>
#define ll long long
using namespace std;


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

	ll a = stoll(s);
	while (true){
		if (a<100) {
			cout << 0 << endl;
			exit(0);
		}
		else if (a % 100 == 0) {
			break;
		}
		else if (a % 101 == 0) {
			break;
		}
		else if (a % 102 == 0) {
			break;
		}
		else if (a % 103 == 0) {
			break;
		}
		else if (a % 104 == 0) {
			break;
		}
		else if (a % 105 == 0) {
			break;
		}
		else if (a <= 945 && a >= 900) {
			break;
		}
		else if (a <= 840 && a >= 800) {
			break;
		}
		else if (a <= 735 && a >= 700) {
			break;
		}
		else if (a <= 630 && a >= 600) {
			break;
		}
		else if (a <= 525 && a >= 500) {
			break;
		}
		else if (a <= 420 && a >= 400) {
			break;
		}
		else if (a <= 315 && a >= 300) {
			break;
		}
		else if (a <= 210 && a >= 200) {
			break;
		}
		



		else if (s[s.size() - 1] >= '5') {
			a -= 105;
			//cout << a << endl;
		}
		else if (s[s.size() - 1] == '4') {
			a -= 104;
			//cout << a << endl;
		}
		else if (s[s.size() - 1] == '3') {
			a -= 103;
			//cout << a << endl;
		}
		else if (s[s.size() - 1] == '2') {
			a -= 102;
		}
		else if (s[s.size() - 1] == '1') {
			a -= 101;
		}
		else if (s[s.size() - 1] == '0') {
			a -= 100;
		}
		
		
		s = to_string(a);
		
	}
	cout << 1 << endl;


}


Measured memory_bytes: 256
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <utility>
#include <stack>
#include <queue>
#include <set>
#include <list>

using namespace std;

#define fi first
#define se second
#define long long long
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main()
{
    // ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	// freopen("input.in", "r", stdin);
	long res = 0, mn = 1e18;
	int n; scanf("%d", &n);
	for(int i = 0; i < n; i++)
	{
		long x, y;
		scanf("%lld %lld", &x, &y);
		res += x;
		if(y < x)
			mn = min(y, mn);
	}
	if(mn == 1e18) printf("%lld\n", 0LL);
	else  printf("%lld\n", res-mn);
}





Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include <map>
#include <fstream>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <assert.h>
#include <complex>
#include <omp.h>
using namespace std;
#define eps 0.000001
#define LONG_INF 10000000000000
#define GOLD 1.61803398874989484820458
#define seg_size 65536*4
#define REP(i,n) for(long long i = 0;i < n;++i)
unsigned long xor128() {
	static unsigned long x = time(NULL), y = 362436069, z = 521288629, w = 88675123;
	unsigned long t = (x ^ (x << 11));
	x = y; y = z; z = w;
	return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)));
}



void solve(long long N, std::vector<long long> H){
    int now_max = -1;
    int ans = 0;
    REP(i,N){
        if(now_max <= H[i]){
            now_max = H[i];
            ans++;
        }
    }
    cout << ans << endl;
}

// Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long N;
    scanf("%lld",&N);
    std::vector<long long> H(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&H[i]);
    }
    solve(N, std::move(H));
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <limits.h>
#include <algorithm>
#include <math.h>
#include <time.h>
#include <vector>
#include <map>
#include <queue>
#include <string>
#include <tuple>
using namespace std;
typedef long long ll;

int par[100010];
int rnk[100010];
ll sze[100010];

// 初期化
void init(int n) {
    for (int i = 0; i < n; i++) {
        par[i] = i;
        rnk[i] = 0;
        sze[i] = 1;
    }
}

// 親探し
int find(int x) {
    if (par[x] == x) return x;
    else return par[x] = find(par[x]);
}

// 併合
void unite(int x, int y) {
    x = find(x);
    y = find(y);
    if (x == y) return;
    if (rnk[x] < rnk[y]) {
        sze[y] = sze[x] + sze[y];
        par[x] = y;
    }
    else {
        sze[x] = sze[x] + sze[y];
        par[y] = x;
        if (rnk[x] == rnk[y]) rnk[x]++;
    }
    
}

// 同じ木にあるか
bool same(int x, int y) {
    return find(x) == find(y);
}

int main(void){
    ll n, m, a[100010], b[100010];
    cin >> n >> m;
    
    init(n);
    for (int i = 0; i < m; i++) {
        cin >> a[i] >> b[i];
        a[i]--;  b[i]--;
    }
    
    int ans = 0;
    for (int i = 0; i < m; i++) {
        init(n);
        for (int j = 0; j < m; j++) {
            if (i == j) ;
            else {
                if (!same(a[j], b[j])) {
                    unite(a[j], b[j]);
                }
            }
        }
        if (find(a[i]) != find(b[i])) {
            ans++; //cout << i << endl;
        }
    }
    
    cout << ans << endl;
    
    
}


Measured memory_bytes: 256
s[61][61],q[200];
main(x,y,i,j,f,g,_x,_y){
	for(;scanf("%d%d",&x,&y),x;){
		memset(s,0xff,sizeof(s));
		for(j=1;j<2*y;j++)
			for(i=1;i<2*x;i++)
				s[i][j]=0;
		for(j=1;j<2*y;j++)
			for(i=(j&1)?2:1;i<2*x;i+=2)scanf("%d",s[i]+j);
		q[0]=0x10001;s[1][1]=1;f=0;g=1;
		for(;f!=g;){
			_x=q[f]>>16,_y=q[f]&0xffff;f=(f+1)%200;
			if(s[_x][_y-1]==0&&s[_x][_y-2]==0)q[g]=((_x)<<16)|(_y-2),g=(g+1)%200,s[_x][_y-2]=s[_x][_y]+1;
			if(s[_x][_y+1]==0&&s[_x][_y+2]==0)q[g]=((_x)<<16)|(_y+2),g=(g+1)%200,s[_x][_y+2]=s[_x][_y]+1;
			if(s[_x-1][_y]==0&&s[_x-2][_y]==0)q[g]=((_x-2)<<16)|(_y),g=(g+1)%200,s[_x-2][_y]=s[_x][_y]+1;
			if(s[_x+1][_y]==0&&s[_x+2][_y]==0)q[g]=((_x+2)<<16)|(_y),g=(g+1)%200,s[_x+2][_y]=s[_x][_y]+1;
			if(s[2*x-1][2*y-1])break;
		}
		printf("%d\n",s[2*x-1][2*y-1]);
	}
	exit(0);
}

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

#define rep(i,n) for (int i = 0; i< (n); ++i)
#define vvec(m,n) vector<vector<int>> (int(m), vector<int>(n))
#define ALL(a) (a).begin(), (a).end()

using ll = long long;

int main(){
    int x, y;
    cin >> x >> y;
    if(x == 2 && y == 2){
        cout << "Yes" << endl;
    }else if((x == 4 || x == 6 || x == 9 || x == 11)&&(y == 4 || y == 6 || y == 9 || y == 11)){
            cout << "Yes" << endl;
    }else if((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x == 12)&&(y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12)){
            cout << "Yes" << endl; 
    }else{
         cout << "No" << endl;
    }
}

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

int main(){
    int x, a, b;
    cin >> x >> a >> b;
    if(a >= b){
        cout << "delicious"  << endl;
    }
    else if(b - a <= x){
        cout << "safe" << endl; 
    }
    else{
        cout << "dangerous" << endl;
    }
    
}

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

int main(){
ll test,i,j,count,flag=0,n,o1=0,o2=0,b1,x,y,m,l,z,max1,x1,y1,x2,y2,z1,k,sum,f,r,ans1,min1;
cin>>x1>>y1>>x;
cout<<((y1/x)-(x1/x))+(x1%x==0)<<"\n";
return 0;
}

Measured memory_bytes: 3640
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
long long n,a[300000];
long long ans;
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		scanf("%lld",&a[i]);
	}
	sort(a+1,a+1+n,greater<int>());
	for(int i=2;i<=n;i++){
		ans+=a[(i+1)>>1];
	}
	cout<<ans;
	return 0;
}

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

#define MAX 100005
#define int long long
#define IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

int dp[3][100005];

//Memoization
int helper(int arr[][100005], int n, int prevOption, int index){
	if(index == n){
		return 0;
	}
	if(prevOption != -1 && dp[prevOption][index] != -1){
		return dp[prevOption][index];
	}

	int tempAns1 = INT_MIN, tempAns2 = INT_MIN, tempAns3 = INT_MIN;
	if(prevOption == -1){
		tempAns1 = arr[0][index] + helper(arr, n, 0, index + 1);
		tempAns2 = arr[1][index] + helper(arr, n, 1, index + 1);
		tempAns3 = arr[2][index] + helper(arr, n, 2, index + 1);
	}

	if(prevOption == 0){
		tempAns1 = arr[1][index] + helper(arr, n, 1, index + 1);
		tempAns2 = arr[2][index] + helper(arr, n, 2, index + 1);
	}
	if(prevOption == 1){
		tempAns1 = arr[0][index] + helper(arr, n, 0, index + 1);
		tempAns2 = arr[2][index] + helper(arr, n, 2, index + 1);
	}
	if(prevOption == 2){
		tempAns1 = arr[0][index] + helper(arr, n, 0, index + 1);
		tempAns2 = arr[1][index] + helper(arr, n, 1, index + 1);
	}
	if(prevOption != -1){
		dp[prevOption][index] = max(tempAns1, max(tempAns2, tempAns3));
	}
	return max(tempAns1, max(tempAns2, tempAns3));
}

int32_t main(){
	//Initialize DP array with -1.
	for(int i = 0; i < 100005; i++){
		dp[0][i] = -1;
		dp[1][i] = -1;
		dp[2][i] = -1;
	}
	int n;
	cin>>n;
	int arr[3][100005];

	for(int i = 0; i < n; i++){
		cin>>arr[0][i]>>arr[1][i]>>arr[2][i];
	}

	// cout<<helper(arr, n, -1, 0); Memoization Method

	int tabDp[3][100005];
	/* tabDp[i][j] represents maximum if we choose activity i till index j. */

	tabDp[0][0] = arr[0][0];
	tabDp[1][0] = arr[1][0];
	tabDp[2][0] = arr[2][0];

	for(int i = 1; i < n; i++){
		tabDp[0][i] = arr[0][i] + max(tabDp[1][i - 1], tabDp[2][i - 1]);
		tabDp[1][i] = arr[1][i] + max(tabDp[0][i - 1], tabDp[2][i - 1]);
		tabDp[2][i] = arr[2][i] + max(tabDp[1][i - 1], tabDp[0][i - 1]);
	}

	int ans = max(tabDp[0][n - 1], max(tabDp[1][n - 1], tabDp[2][n - 1]));//Maximum of all three options we choose.

	cout<<ans;
}

Measured memory_bytes: 7296
# -*- coding: utf-8 -*-
N,M = map(int, input().split())
A = list(map(int, input().split()))

vote = sum(A)
count = 0

for a in A:
  if 4*a*M >= vote:
    count += 1

if count >= M:
  print('Yes')
else:
  print('No')

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

int main()
{
    int n, r;
    char ch;
    int s[13] = {0}, h[13] = {0}, c[13] = {0}, d[13] = {0};

    cin >> n;

    for (int i = 0; i < n; i++) {
        cin >> ch >> r;

        if (ch == 'S') {
            s[r - 1] = 1;
        } else if (ch == 'H') {
            h[r - 1] = 1;
        } else if (ch == 'C') {
            c[r - 1] = 1;
        } else if (ch == 'D') {
            d[r - 1] = 1;
        }
    }

    for (int i = 0; i < 13; i++) {
        if (s[i] != 1) {
            cout << "S " << i + 1 << endl;
        }
    }
    for (int i = 0; i < 13; i++) {
        if (h[i] != 1) {
            cout << "H " << i + 1 << endl;
        }
    }
    for (int i = 0; i < 13; i++) {
        if (c[i] != 1) {
            cout << "C " << i + 1 << endl;
        }
    }
    for (int i = 0; i < 13; i++) {
        if (d[i] != 1) {
            cout << "D " << i + 1 << endl;
        }
    }

    return 0;
}

Measured memory_bytes: 1160
#include <bits/stdc++.h>
using namespace std;
string S;
long long ans = 0;
void f(int p, long long n) {
	if (p == S.length()) {
		ans += n;
		return;
	}
	for (int i = p+1; i <= S.length(); ++ i) {
		f(i, n + atoll(S.substr(p, i-p).c_str()));
	}
}
int main() {
	cin >> S;
	f(0, 0);
	cout << ans << endl;
}


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

int FindSumOfDigits(int n) {
    int sum = 0;
    while(n > 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}

int main() {
    int n;
    cin >> n;
    
    int sum = FindSumOfDigits(n);
    
    if(n % sum == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
}


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

int main() {
  int n; cin >> n;
  vector<int> p(n);
  for(int i = 0; i < n; i++){
    cin >> p.at(i);
  }
  int cnt = 0;
  for(int i = 0; i < n-2; i++){
    if(p.at(i+1)>p.at(i) && p.at(i+1)<p.at(i+2)
       || p.at(i+1)<p.at(i) && p.at(i+1)>p.at(i+2)){
      cnt++;
    }
  }
  cout << cnt << endl;
}

Measured memory_bytes: 3540
import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**19
MOD = 10**9 + 7
EPS = 10**-10

def factorize(num: int) -> dict:
    """ 素因数分解 """
    from math import sqrt
    from collections import Counter

    d = Counter()
    for i in range(2, int(sqrt(num))+1):
        while num % i == 0:
            num //= i
            d[i] += 1
        if num == 1:
            break
    if num != 1:
        d[num] += 1
    return d

def extgcd(a, b, x, y):
    """ 拡張ユークリッドの互除法(ax+by=gcd(a, b)の解を求める) """

    if b == 0:
        x = 1
        y = 0
        return (y, x)
    else:
        x, y = extgcd(b, a%b, y, x)
        y -= a // b * x
        return (y, x)

N = INT()

fact = list(factorize(N*2).items())
M = len(fact)

ans = N
for bit in range(1<<M):
    a = b = 1
    for i in range(M):
        if (bit>>i) & 1:
            a *= fact[i][0] ** fact[i][1]
        else:
            b *= fact[i][0] ** fact[i][1]
    y, x = extgcd(a, b, 0, 0)
    if x == 0 or y == 0:
        continue
    res = min(abs(a*x), abs(b*y))
    ans = min(ans, res)
print(ans)


Measured memory_bytes: 71940
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	In := strings.Split(readLine(), " ")
	if In[0] < In[1] {
		fmt.Println("<")
	} else if In[0] == In[1] {
		fmt.Println("=")
	} else {
		fmt.Println(">")
	}
}

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

//func readLineInt() []int {
//	result := make([]int, 0)
//	for _, v := range strings.Split(readLine(), " ") {
//		i, _ := strconv.Atoi(v)
//		result = append(result, i)
//	}
//	return result
//}

var reader = bufio.NewReaderSize(os.Stdin, 1e6)

func readLine() string {
	result := make([]byte, 0, 1e6)
	for {
		line, remains, e := reader.ReadLine()
		if e != nil {
			panic(e)
		}
		result = append(result, line...)
		if !remains {
			break
		}
	}
	return string(result)
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
#define rep0(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef tuple<string, int, int> TU;
typedef tuple<int, int, int> TI;

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


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

int main()
{
	int K;
  cin >> K;
  int x = 7 % K;
  for(int i = 1; i <= K; ++i){
  	if(x == 0){
    cout << i << endl;
      return 0;
    }
    x = (x * 10 + 7) % K;
  }
  cout << -1 << endl;
  return 0;
}

Measured memory_bytes: 3628
#include "bits/stdc++.h"
using namespace std;
const int MAX = 700000;
const int MOD = 1000000007;

long long  fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
long long COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
/*第二引数で第一引数を割ったときの切り上げの計算*/
long long int maxtime(long long int x, long long int y){
	return(x + y - 1) / y;

}
/*最大公約数*/
long long int lcm(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;

	if (number2 > number1) {
		m = number2;
		n = number1;
	}
	long long int s = -1;
	while (s != 0) {
		s = m % n;
		m = n;
		n = s;
	}
	return m;
}
/*最大公倍数*/
long long int gcd(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;
	return m / lcm(m, n) * n;
}
/*逆元計算*/
long long int  modinv(long long a, long long m) {
	long long int b = m, u = 1, v = 0;
	while (b) {
		long long int t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}
// index が条件を満たすかどうか
vector<long long int >meguru;
bool isOK(int index, int key) {
	if (meguru[index] >= key) return true;
	else return false;
}
// 汎用的な二分探索のテンプレ
int binary_search(int key) {
	int left = -1; //「index = 0」が条件を満たすこともあるので、初期値は -1
	int right = (int)meguru.size(); // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()
	/* どんな二分探索でもここの書き方を変えずにできる！ */
	while (right - left > 1) {
		int mid = left + (right - left) / 2;

		if (isOK(mid, key)) right = mid;
		else left = mid;
	}
	/* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
	return right;
}
long long modpow(long long a, long long n, long long mod) {
	long long res = 1; 
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}

int main() {
	int d, t, s;
	cin >> d >> t >> s;
	if (s * t >= d) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}
}

Measured memory_bytes: 3636
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define all(n) begin(n),end(n)
using ll = long long;
using P = pair<int,int>;
ll mod = 1e9+7;

int main() {
    ll n;
    cin >> n;
    string s;
    cin >> s;
    map<char, int>mp;
    for(char c : s) mp[c]++;
    ll ans = 1;
    for(auto x : mp){
        ans*=(x.second+1)%mod;
        ans%=mod;
    }
    cout << ans-1 << endl;
    return 0;
}

Measured memory_bytes: 3772
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#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>
#include <regex>
#define REP(i,n) for(int i = 0; i < n; i++)
#define FOR(i,j,n) for(int i = j; i < n; i++)
#define RFOR(i,j,n) for(int i = j-1; i >= n; i--)
#define PREC(n) fixed << setprecision(n)
#define print_array(v) REP(__k, v.size()) { cout << v[__k]; if(__k != v.size()-1) cout << " "; else cout << endl; }
#define YesorNo(a) printf(a?"Yes\n":"No\n")
#define _LIBCPP_DEBUG 0
using namespace std;
int64_t MOD = 1000000007;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  char c;
  cin >> c;
  cout << (char)(c + 1) << endl;
  return 0;
}
//templete by private_yusuke

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define FORD(i,a,b) for (int i = (a); i >= (b); i--)
#define REP(i,a) FOR(i,0,(int)(a)-1)
#define reset(a,b) memset(a,b,sizeof(a))
#define BUG(x) cout << #x << " = " << x << endl
#define mod 1000000007
#define pi acos(-1)
#define eps 0.00000001
#define pb push_back
#define sqr(x) (x) * (x)
#define _1 first
#define _2 second

long long n, m, cur, las, val, ans;

int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> las;
  if (las > m) {
    ans += las - m;
    las = m;
  }
  REP (i, n - 1) {
    cin >> val;
    if (val + las > m) {
      ans += val + las - m;
      las = m - las;
    } else las = val;
  }
  cout << ans;
}


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

int main() {
    int a,b,ans=0;
    cin>>a>>b;
    for (int i=a; i<=b; i++) {
        string s=to_string(i);
        if (s[0]==s[4]&&s[1]==s[3]) ans++;
    }
    cout<<ans<<endl;
} 


Measured memory_bytes: 256