akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>

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

using namespace std;

int main(){
  string s;cin>>s;
  map<char, int> m;
  rep(i,s.size()){
    char c = s[i];
    m[c]++;
    if(m[c]>1){
      cout<<"no";
      return 0;
    }
  }
  cout<<"yes";

  return 0;
}

Measured memory_bytes: 256
fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    let v : Vec<i64> = s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect();
    let mut x = v[0];
    let y = v[1];

    let mut ans = 0;
    while x <= y {
        ans += 1;
        x *= 2;
    }
    println!("{}", ans);
}


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

signed main()
{
    int n;
    cin>>n;
    int m;
    cin>>m;
    int arr[m];
    for(int i=0;i<m;i++)
        cin>>arr[i];
    int x=0;
    for(int i=0;i<m;i++)
    {
        x=x+(arr[i]);
    }
    if(n-x<0)
        cout<<-1;
    else
        cout<<n-x;
}


Measured memory_bytes: 3628
import sys
input = sys.stdin.buffer.readline
#input = sys.stdin.readline

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))

# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())

def main():
	n=II()
	li=[105,135,165,189,195]
	ans=0
	for i in range(n+1):
		if i in li:
			ans+=1
	print(ans)















if __name__ == "__main__":
	main()


Measured memory_bytes: 3060
fun main(args: Array<String>) {
    abc057c()
}

fun abc057c() {
    val n = readLine()!!.toLong()

    var answer = n.toString().length
    for (a in 1..Math.pow(n.toDouble(), 1 / 2.0).toInt()) {
        if (n % a != 0L) continue
        val b = n / a
        answer = Math.min(answer, Math.max(a.toString().length, b.toString().length))
    }

    println(answer)
}


Measured memory_bytes: 33652
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int k,n,x[100],y[100];
    long long ans=4e19;
    int left,right,up,down;
    scanf("%d%d",&n,&k);
    for (int i=0;i<n;i++) scanf("%d%d",&x[i],&y[i]);
    for (int a=0;a<n;a++)
        for (int b=0;b<n;b++)
            for (int c=0;c<n;c++)
                for (int d=0;d<n;d++)
                    {
                        left=min(x[a],min(x[b],min(x[c],x[d])));
                        right=max(x[a],max(x[b],max(x[c],x[d])));
                        up=max(y[a],max(y[b],max(y[c],y[d])));
                        down=min(y[a],min(y[b],min(y[c],y[d])));
                        long long wide=right-left,deep=up-down;
                        long long temp=wide*deep;
                        int num=0;
                        for (int i=0;i<n;i++) if (x[i]>=left && x[i]<=right && y[i]<=up && y[i]>=down) num++;
                        if (num>=k && temp<ans) ans=temp;
                    }
    printf("%lld",ans);
    return 0;
}


Measured memory_bytes: 256
#pragma GCC optimize "-O3"
#include <bits/stdc++.h>
using namespace std;
#define lo long
const int lmax=1999999999;
const long long lmx=1999999999999999999;
int main(){std::ios::sync_with_stdio(false);
int n[4],a=0,b=0,c=0,d=0;
for(int i=0;i<5;i++){
	cin>>n[i];
	if(n[i]==1)a++;
	if(n[i]==9)b++;
	if(n[i]==7)c++;
	if(n[i]==4)d++;
}
if(c+b+c+d==4){
	cout<<"YES"<<endl;
}
else cout<<"NO"<<endl;
}
/*

                   *         *
                  * *       * *
                 *   *     *   *
                *     *   *     *
               *       * *       *
               *        *        *
                *               *
                 *             *
                  *           *
                   *         *
                    *       *
                     *     *
                      *   *
                       * *
                        *



*/





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

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

  string s;
  cin >> s;
  string ans = "Yes";
  for (int i = 0; i < s.size(); i++) {
    if (i & 1 && s[i] == 'R' || !(i & 1) && s[i] == 'L') {
      ans = "No";
      break;
    }
  }
  cout << ans << '\n';
  return 0;
}

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

using namespace std;

bool isPrime[1001];

void isPrime_(int t) {
    for (int i = 2; i < sqrt(t); ++i) {
        if (t % i == 0) {
            isPrime[t] = false;
            return;
        }
    }
    isPrime[t] = true;
    return;
}

void checkPrime() {
    for (int i = 2; i < 1001; ++i) 
        isPrime_(i);
}

const int mod = 1e9+7;

int main() {
    int N;
    cin>>N;
    int count[1001][1001] = {0};
    checkPrime();
    for (int i = 2; i <= N; ++i) {
        int temp = i;
        for (int j = 2; j <= i; ++j) {
            if (temp == 1)
                break;
            if (isPrime[j]) {
                while (temp % j == 0) {
                    temp /= j;
                    count[i][j] += 1;
                }
            }
        }
    }
    int count_[1001] = {0};
    for (int i = 2; i <= N; ++i) {
        for (int j = 2; j <= N; ++j) {
            count_[i] += count[j][i];
        }
    }
    long long ans = 1;
    for (int i = 2; i <= N; ++i) {
        ans *= count_[i] + 1;
        ans %= mod;
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 4096
using System;
using System.Collections.Generic;
using System.Linq;

class PaizaSample
{

    static void Main()
    {

        string input;
        while ((input = Console.ReadLine()) != null)
        {
            List<double> list = new List<double>();

            string[] set = input.Split(' ');

            for (int i = 0; i < set.Length; i++)
            {
                switch (set[i])
                {
                    case "+":
                        list[list.Count - 2] = list[list.Count - 2] + list[list.Count - 1];
                        list.RemoveAt(list.Count - 1);
                        break;
                    case "-":
                        list[list.Count - 2] = list[list.Count - 2] - list[list.Count - 1];
                        list.RemoveAt(list.Count - 1);
                        break;
                    case "*": 
                        list[list.Count - 2] = list[list.Count - 2] * list[list.Count - 1];
                        list.RemoveAt(list.Count - 1);
                        break;
                    case "/": 
                        list[list.Count - 2] = list[list.Count - 2] / list[list.Count - 1];
                        list.RemoveAt(list.Count - 1);
                        break;
                    default:
                        list.Add(double.Parse(set[i]));
                        break;
                }
            }

            Console.WriteLine(list[0]);

        }
        //Console.ReadKey();

    }
}

Measured memory_bytes: 9264
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<cstdlib>
#include<map>
#include<queue>
#include<stack>
#include<deque>
#include<fstream>
#include<string>
#include<sstream>
#include<iomanip>
#include<numeric>
#include<cctype>
#include<random>

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

int keta(int a){
    int count=0;
    while(a!=0){
        a/=10;
        count++;
    }
    return count;
}


int main(){
    long long int n;
    bool auth = true;

    cin>>n;
    vector<long long int> a(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }

    sort(a.begin(),a.end());

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

    if(auth){
        cout<<"YES"<<endl;
    }
    else{
        cout<<"NO"<<endl;
    }

    return 0;
} //カモンAC

Measured memory_bytes: 1792
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <climits>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <map>
#include <tuple>
#include <iostream>
#include <deque>
#include <array>
#include <set>
#include <functional>
#include <memory>
#include <stack>
#include <numeric>
#include <climits>
#include <cfloat>
#include <bitset>

int main() {
	int a, b;
	std::cin >> a >> b;
	std::cout << std::max({ a + b, a - b, a * b }) << std::endl;
}

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

long long X, Y, Z, K;
vector<long long> A;
vector<long long> B;
vector<long long> C;
vector<long long> ans;

int main(){
	cin >> X >> Y >> Z >> K;
	for(long long  i = 0; i < X; i++){
		long long a;
		cin >> a;
		A.push_back(a);
	}
	for(long long  i = 0; i < Y; i++){
		long long b;
		cin >> b;
		B.push_back(b);
	}
	for(long long  i = 0; i < Z; i++){
		long long c;
		cin >> c;
		C.push_back(c);
	}
	sort(A.begin(), A.end(), greater<long long>());
	sort(B.begin(), B.end(), greater<long long>());
	sort(C.begin(), C.end(), greater<long long>());

	for(long long i = 0; i < X; i++){
		for(long long j = 0; j < Y; j++){
			if(i * j > K){
				break;
			}
			for(long long k = 0; k < Z; k++){
				if(i * j * k > K){
					break;
				}
				ans.push_back(A[i] + B[j] + C[k]);
			}
		}
	}

	sort(ans.begin(), ans.end(), greater<long long>());
	for(long long i = 0; i < K; i++){
		cout << ans[i] << endl;
	}
}



Measured memory_bytes: 34800
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

#include <iostream>
#include <fstream>

#include <string>
#include <vector>
#include <math.h>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <bitset>
using namespace std;
using ll = long long;
constexpr ll INF = 1010000000000000017LL;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define all(v) v.begin(), v.end()

class CTravelingPlan {
public:
	void solve(std::istream& in, std::ostream& out) {
        ll n;
        in>>n;
        vector<ll> a(n+2);
        ll sum=0;
        a[0]=0;
        rep(i,n+1){
            in>>a[i+1];
        }
        a[a.size()-1];
        for(int i=1; i<a.size(); i++){
            sum+=abs(a[i]-a[i-1]);
        }


        for(int i=1; i<a.size()-1; ++i){
            out<<sum-abs(a[i]-a[i-1])-abs(a[i]-a[i+1])+abs(a[i-1]-a[i+1])<<endl;
        }
	}
};


int main() {
	CTravelingPlan solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 2048
/**
 * File    : A.cpp
 * Author  : Kazune Takahashi
 * Created : 2018-10-31 22:29:52
 * Powered by Visual Studio Code
 */

#include <iostream>
#include <iomanip>   // << fixed << setprecision(xxx)
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <vector>
#include <string> // to_string(nnn) // substr(m, n) // stoi(nnn)
#include <complex>
#include <tuple>
#include <queue>
#include <stack>
#include <map> // if (M.find(key) != M.end()) { }
#include <set>
#include <functional>
#include <random> // auto rd = bind(uniform_int_distribution<int>(0, 9), mt19937(19920725));
#include <chrono> // std::chrono::system_clock::time_point start_time, end_time;
// start = std::chrono::system_clock::now();
// double elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end_time-start_time).count();
#include <cctype>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
using namespace std;

#define DEBUG 0 // change 0 -> 1 if we need debug.

typedef long long ll;

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

// const int C = 1e6+10;
// const ll M = 1000000007;

int main()
{
  int N, i;
  cin >> N >> i;
  cout << N - i + 1 << endl;
}

Measured memory_bytes: 256
def rle(s):
    run_s, run_length, compressed_s = s[0], 1, []
    for next in range(1, len(s)):
        if run_s == s[next]:
            run_length += 1
        else:
            compressed_s.append((run_s, run_length))
            run_s = s[next]
            run_length = 1
    compressed_s.append((run_s, run_length))
    return compressed_s

s = input()
gathered = [0] * len(s)
separating_index = -1
rle_s = rle(s)
for i in range(len(rle_s) // 2):
    separating_index += rle_s[2*i][1]
    gathered[separating_index] = -(-rle_s[2*i][1] // 2) + (rle_s[2*i + 1][1] // 2)
    gathered[separating_index + 1] = (rle_s[2*i][1] + rle_s[2*i + 1][1]) - gathered[separating_index]
    separating_index += rle_s[2*i + 1][1]

for i in range(len(s)):
    print(gathered[i], end=' ')

Measured memory_bytes: 11896
#include <iostream>
#include <algorithm>
#include <string>
#include <numeric>
#include <vector>
#include <queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long int
#define ii pair<int,int>
#define MAX 1000000007

using namespace std;

int main(void){
	int n,k;
	cin>>n>>k;
	int x[n];
	rep(i,n)cin>>x[i];

	int l,r;
	ll ans=MAX;
	for(int i=0;i<n-k+1;i++){
		l=i;
		r=i+k-1;
		if(0<=x[l]){
			if(ans > x[r])ans=x[r];
		}
		else if(x[r] <= 0){
			if(ans > abs(x[l]))ans=-x[l];
		}
		else{
			if(2*x[r]-x[l] < -2*x[l]+x[r] && ans > 2*x[r]-x[l])ans=2*x[r]-x[l];
			else if(2*x[r]-x[l] >= -2*x[l]+x[r] && ans > -2*x[l]+x[r])ans=-2*x[l]+x[r];
		}
	}
	cout<<ans<<endl;
	return 0;

}


Measured memory_bytes: 640
// https://atcoder.jp/contests/abc117/tasks/abc117_b

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))

int main() {
    int n, m;
    vector<int> v;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> m;
        v.push_back(m);
    }
    sort(v.begin(), v.end());

    int sum = 0;
    for (int i = 0; i < n - 1; i++) {
        sum += v[i];
    }
    // 一番長い辺よりも、他の辺の合計が大きければ多角形が成立
    if (v[n - 1] < sum) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

    return 0;
}


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

int main() {
  string c;
  cin >> c;
  
  if (c == "a" || c == "i" || c == "u" || c == "e" || c == "o"){
    cout << "vowel" << endl;
  }
  else cout << "consonant" << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define REP(i,n) for(int i=0,i##_len=int(n);i<i##_len;++i)
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define All(x) (x).begin(),(x).end()
#define rAll(x) (x).rbegin(),(x).rend()
using namespace std;
using ll = long long;

int main(){
    int N;cin>>N;
    vector<int> a(N);
    REP(i, N) cin >> a[i];
    bool fs=false;
    REP(i,N) if(a[i]&1) fs=true;
    if(fs) cout<<"first"<<endl;
    else cout<<"second"<<endl;
}


Measured memory_bytes: 640
import java.util.*;


public class Main
{
	
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int i,j,k,flag;
		int  n,r;
		n=sc.nextInt();
		r=sc.nextInt();
		if(n>=10)
			System.out.println(r);
		else
			System.out.println(r+(100*(10-n)));
		
		
	}
}

Measured memory_bytes: 22868
//package Contest168;

import java.util.*;
import java.io.*;
import java.math.*;


class Main {
    public static void main(String args[] ) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        String input[]=br.readLine().split(" ");
        
        int n=Integer.parseInt(input[0]);
        
        int m=Integer.parseInt(input[1]);
        
        ArrayList<ArrayList<Integer>> graph=new ArrayList<>();
        
        for(int i=0;i<n;i++)
        {
        	ArrayList<Integer> list=new ArrayList<>();
        	graph.add(i,list);
        }
        
        for(int i=0;i<m;i++)
        {
        	String s[]=br.readLine().split(" ");
        	int u=Integer.parseInt(s[0])-1;
        	int v=Integer.parseInt(s[1])-1;
        	
        	graph.get(u).add(v);
        	graph.get(v).add(u);
        }
        
        Queue<Integer> queue=new LinkedList<>();
        
        int visited[]=new int[n];
        int ans[]=new int[n];
        Arrays.fill(ans,-1);
        
        int level=0;
        int curr=1;
        int next=0;
        
        queue.add(0);
        visited[0]=1;
        int ans2[]=new int[n];
        while(queue.size()>0)
        {
        	int pre=queue.poll();
        	ans[pre]=level;
        	curr--;
        	ArrayList<Integer> neigh=graph.get(pre);
        	for(int i=0;i<neigh.size();i++)
        		{
        			int e=neigh.get(i);
        			if(visited[e]==0)
        			{
        				queue.add(e);
        				visited[e]=1;
        				next++;
        				ans2[e]=pre+1;
        			}
        		}
        	
        	if(curr==0)
        	{
        		curr=next;
        		next=0;
        		level++;
        	}
        }
        //System.out.println(Arrays.toString(ans2));
        
        boolean flag=true;
        
        for(int i=1;i<n;i++)
        {
        	if(ans[i]==-1)
        	{
        		flag=false;
        		break;
        	}
        }
        if(flag==false)
        {
        	System.out.println("No");
        }
        else
        {
        	System.out.println("Yes");
        	for(int i=1;i<n;i++)
        	{
        		System.out.println(ans2[i]);
        	}
        }
        

    }
}

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

long long gcd(long long a,long long b){
  if(a%b==0) return b;
  return gcd(b,a%b);
}
int main(void){
  long long A,B;
  cin>>A>>B;
  long long ans;
  ans=A*B/gcd(A,B);
  cout<<ans<<endl;
  return 0;
}


Measured memory_bytes: 256
#include<algorithm>
#include<limits.h>
#include<stdio.h>
#include<string.h>
#include<vector>
#include<queue>

using namespace std;

int C = 0;
int N = 0;
int R[10][10] = { 0 };
int M[10] = { 0 };

bool solve() {
	int sum = INT_MAX,ans = 0;
	for (int i = 0; i <= C; i++) {
		queue<int> q;
		q.push(i);
		M[i] = 0;
		while (!q.empty()) {
			for (int j = 0; j <= C; j++) {
				if (R[q.front()][j] != -1 && (M[j] == -1 || M[q.front()] + R[q.front()][j] < M[j])) {
					
					M[j] = R[q.front()][j] + M[q.front()];
					q.push(j);
				}
			}
			q.pop();
		}
		int s = 0;
		for (int j = 0; j <= C; j++)
			s += M[j];
		if (sum > s) {
			sum = s;
			ans = i;
		}
		memset(M, -1, sizeof(int) * 10);
	}
	printf("%d %d\n", ans,sum);
}

int main(void) {
	while(true){
		C = 0;
		memset(R, -1, sizeof(int) * 100);
		memset(M, -1, sizeof(int) * 10);
		scanf("%d", &N);
		if (N == 0)
			break;
		for (int j = 0; j < N; j++) {
			int a, b, c;
			scanf("%d%d%d", &a, &b, &c);
			R[a][b] = c;
			R[b][a] = c;
			C = max(C, max(a, b));
		}
		solve();
	}
}

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

int main() {
    using namespace std;

    cin.tie(0);
   	ios::sync_with_stdio(false);

    int n;
    cin >> n;

    vector<pair<pair<string, int>, int>> rest;

    for (int i = 0; i < n; i++) {
        string s;
        int p;
        cin >> s >> p;
        rest.push_back(make_pair(make_pair(s, -p), i));
    }

    sort(rest.begin(), rest.end());

    for (int i = 0; i < n; i++) {
        cout << rest[i].second + 1 << endl;
    }
}

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

typedef long long ll;
typedef pair<ll, ll> pll;

#define m0(x) memset(x, 0, sizeof(x))
#define all(x) x.begin(), x.end()
#define rep(i, n) for(int i = 0; i < (n); i++)
#define asort(x) sort(all(x));
#define dsort(x, t) sort(x.begin(), x.end(), greater<t>());
#define dump(x)  cout << #x << " = " << (x) << endl
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define MINS(m, s) m.insert(make_pair(s, 1));
#define MFIN(m, s) m.find(s) != m.end()
#define YES(n) cout << ((n) ? "YES" : "NO" ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl

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

int main(){
    int a, b;
    cin >> a >> b;
    int ans = 0;
    int cnt = 1;
    while(cnt < b){
        cnt += a-1;
        ans++;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3612
#include <iostream>

using namespace std;

typedef long long Long;

Long extgcd(Long a, Long b, Long& x, Long& y) {
    Long g = a; x = 1LL; y = 0LL;
    if (b != 0LL) {
        g = extgcd(b, a % b, y, x);
        y -= (a / b) * x;
    }
    return g;
}

int main() {
    int a, b; cin >> a >> b;
    Long x, y; extgcd(a, b, x, y);
    cout << x << " " << y << endl;
    return 0;
}

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

int main() {
  string S;
  cin>>S;
  if(S=="Sunny") puts("Cloudy");
  else if(S=="Cloudy") puts("Rainy");
  else if(S=="Rainy") puts("Sunny");
  
  return 0;
}

Measured memory_bytes: 256
#include<cstdio>
using namespace std;
int a,b,c;//b,c-->oishii
int main()
{
	scanf("%d%d%d",&a,&b,&c);
	if(a+b>=c-1) {printf("%d",b+c);return 0;}
	printf("%d",(a+b+1)+b);
	return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <vector>

using namespace std;

int n, m;
int dp [100005];
vector <int> sus [100005];

int rek (int depth, int node) {
	int ret = depth;
	if (dp [node]) return dp [node] + depth;
	//cout << node << " " << depth << " " << sus [node].size () << endl;
	if (sus [node].empty()) {
		dp [node] = 0;
		return depth;
	}
	for (int i = 0; i < sus [node].size(); i++) {
		ret = max (ret, rek (depth + 1, sus [node] [i]));
	}
	dp [node] = ret - depth;
	return ret;
}

int main () {
	int i;
	cin >> n >> m;
	for (i = 0; i < m; i++) {
		int a,b;
		cin >> a >> b;
		sus [a].push_back (b);
	}
	int sol = 0;
	for (i = 1; i <= n; i++) {
		sol = max (sol, rek (0, i));
	} 
	cout << sol;
	return 0;
}


Measured memory_bytes: 9472
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep1(i, n) for(int i = 1; i < n+1; i++)
#define sort(A) sort(A.begin(),A.end())
#define reverse(A) reverse(A.begin(),A.end());
typedef long long ll;

int main(){
  string s;
  cin >> s;
  if(s == "ABC") cout << "ARC" << endl;
  else cout << "ABC" << endl;
}

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

int main() {
  int N, M;
  cin >> N >> M;
  vector<vector<char>> data(N, vector<char>(M));
  vector<int> n(N), m(M);
  for (int i = 0; i < N; i++){
    for (int j = 0; j < M; j++){
      cin >> data.at(i).at(j);
    }
  }
  for (int i = 0; i < N; i++){
    for (int j =0; j < M; j++){
      if (data.at(i).at(j) == '#'){
        n.at(i) = 1;
        break;
      }
    }
  }
  for (int i = 0; i < M; i++){
    for (int j =0; j < N; j++){
      if (data.at(j).at(i) == '#'){
        m.at(i) = 1;
        break;
      }
    }
  }
  for (int i = 0; i < N; i++){
    for (int j = 0; j < M; j++){
      if (n.at(i) == 1 && m.at(j) == 1){
        if (j == M-1){
          cout << data.at(i).at(j) << endl;
        }
        else {
          cout << data.at(i).at(j);
        }
      }
      else {
        if (n.at(i) == 1 && j == M-1){
          cout << "" << endl;
        }
      }
    }
  }
}


Measured memory_bytes: 256
// abc176-A
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <string>

using namespace std;
typedef long long ll;
ll n,m,t;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll ans=0;
	cin>>n>>m>>t;
	if (n%m!=0)
	{
		ans+=1;
		ans+=n/m;
		cout<<t*ans<<endl;
	}
	else 
	{
		ans+=n/m;
		cout<<t*ans<<endl;
	}
	return 0;
}

Measured memory_bytes: 3604
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
  int i,j;
  long cnt = 0;
  int D;
  scanf("%d", &D);
  int C[26];
  int S[D][26];
  int T[D];
	for (j = 0; j < 26; j++)	  {
		scanf("%d", &C[j]);
	}
  for (i = 0; i < D; i++)  {
	  for (j = 0; j < 26; j++)	  {
		  scanf("%d", &S[i][j]);
	  }
  }
//   for (i = 0; i < D; i++)  {
// 		  scanf("%d\n", &T[i]);
//   }
  int sat[D];

  for (i = 0; i < D; i++)  {
	  printf("1\n");
  }
  return 0;
}


Measured memory_bytes: 2144
#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<utility>
#include<map>
#include<stack>
#include<queue>
#include<math.h>


#define square(x) x*x;
#define ll long long;



using namespace std;

long long int arr[1000001];



int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    long long int n;
    cin >> n;

    long long int ans = 0;
    for (long long int i = 1; i < n  ; i++)
    {   
        for (long long int j = 1; j * i < n ; j++)
        {   ans++;
        }

    }
    cout << ans << endl;

    return 0;
}



Measured memory_bytes: 3600
#!/usr/bin/env python3
import sys


def solve(N: int, S: str):
    ans = 0
    for i in range(N):
        Z = set(S[:i]) & set(S[i:])
        ans = max(len(set(Z)), ans)
    print(ans)

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, S)

if __name__ == '__main__':
    main()


Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
int main(){
    double N,K;
    cin >> N >> K;
    double ans=0;
    double count=1;
    for(int i=0;i<N;i++){
        double now = i+1;
        if(now<=K-1){
            while(1){
                count = count * ((double)1/2);
                now = now * 2;
                if(now>K-1){
                    break;
                } 
            }
        }
        ans = ans + ((double)1/N)*count;
        count = 1;
    }
    printf("%.11f\n",ans);
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
 
//LIFE IS NOT A PROBLEM TO BE SOLVED
 
#define rep(i,a,b) for( int i = (int) a; i < (int) b; i++ )
#define REP(i,a,b) for( int i = (int) a; i <= (int) b; i++ )
#define PER(i,a,b) for( int i = (int) a; i >= (int) b; i-- )
#define F first
#define S second
#define mk make_pair
#define pb push_back
#define debug(a) cout << #a << " = " << a << endl;
#define debug2(a,b) cout << #a << " = " << a << " --- " << #b << " = " << b << endl;
#define debugP(a) cout << a.F << " " << a.S << endl;
#define debugV(v, n) { rep( i, 0, n ) { if(i) printf(" "); printf("%d", v[i]); } printf("\n"); }
#define debugM(mat,n,m) rep( i, 0, n ){ rep( j, 0, m ) { if(j) printf(" "); printf("%d", mat[i][j]); } printf("\n"); }
#define debugMD(mat,n,m) rep( i, 0, n ){ rep( j, 0, m ) { if(j) printf(" "); printf("%.2lf", mat[i][j]); } printf("\n"); }
#define all(s) s.begin(), s.end()
 
using namespace std;
 
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair <double, double> ii;
typedef pair <double, ii> iii;
 
const int MAX = 2e3+3;
const int mod = 1e9+7;
 

int main(){
	
	int n; scanf("%d", &n);
	int xr = 0, a[n];
	rep(i, 0, n) scanf("%d", &a[i]), xr^=a[i];
	rep(i, 0, n){
		if(i) printf(" ");
		printf("%d", xr^a[i]);
	}	printf("\n");
	
	
    return 0;
}

Measured memory_bytes: 4428
#include <iostream>
#include <array>
#include <algorithm>
#include <vector>
#include <bitset>
#include <set>
#include <unordered_set>
#include <cmath>
#include <complex>
#include <deque>
#include <iterator>
#include <numeric>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <limits>
#include <iomanip>
#include <functional>
#include <cassert>
using namespace std;

using ll=long long;
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
#define rep(i, k, n) for (ll i=k; i<(ll)n; ++i)
#define REP(i, n) rep(i, 0, n)
#define ALL(v) v.begin(),v.end()
template < class T > inline bool chmax(T& a, T b) {if (a < b) { a=b; return true; } return false; }
template < class T > inline bool chmin(T& a, T b) {if (a > b) { a=b; return true; } return false; }
#define DEBUG_VLL(vec) REP(sz, vec.size()) std::cerr<<vec[sz]<<(sz==vec.size()-1?'\n':' ');

const long long MOD = 1000000007;
const long long HIGHINF = (long long)1e18;
const int INF = (int)1e9;

ll n, a, b, c, d;
map<ll, ll> dp;

ll dfs(ll x) {
    if (x == 0) return 0;
    if (x == 1) return d;
    if (dp.find(x) != dp.end()) return dp[x];
    ll ret = HIGHINF + 5;
    if (x < ret / d) ret = x * d;
    chmin(ret, a + min(dfs(x / 2) + abs(x - x / 2 * 2) * d, dfs((x + 1) / 2) + abs(x - (x + 1) / 2 * 2) * d));
    chmin(ret, b + min(dfs(x / 3) + abs(x - x / 3 * 3) * d, dfs((x + 2) / 3) + abs(x - (x + 2) / 3 * 3) * d));
    chmin(ret, c + min(dfs(x / 5) + abs(x - x / 5 * 5) * d, dfs((x + 4) / 5) + abs(x - (x + 4) / 5 * 5) * d));
    return dp[x] = ret;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int t; cin >> t;
    while (t-->0) {
        cin >> n >> a >> b >> c >> d;
        dp = map<ll, ll>();
        cout << dfs(n) << '\n';
    }
    return 0;
}


Measured memory_bytes: 4428
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int l = Integer.parseInt(sc.next());

		String[] ans = new String[n];
		for (int i=0; i< n; i++) {
			ans[i] = sc.next();
		}

		Arrays.sort(ans);

		for (String a: ans)
			System.out.print(a);
	}
}


Measured memory_bytes: 23380
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
    int A, B, N;
    cin >> A >> B >> N;
    int ans = -1;
    int x = min(B - 1, N);
    while (true) {
        int cur = (A * x) / B - A * (x / B);
        ans = max(ans, cur);
        ++x;
        break;
    }
    cout << ans;
}
//x=100*(1 + 0.01*n)

Measured memory_bytes: 3648
#include <stdio.h>
int main(void){
	int W,H,x,y,r,a,b,c,d;
	scanf("%d %d %d %d %d",&W,&H,&x,&y,&r);
	a=x-r; b=x+r; c=y+r; d=y-r;
	if (a>=0 && b<=W && c<=H && d>=0){
		printf("Yes\n");
	}else{
		printf("No\n");
	}


	return 0;
}


Measured memory_bytes: 2112
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
 int x=n%1000;
 int p=1000-x;
 if(x==0){
 	cout<<"0";
 }
 else{
 	cout<<p;
 }
 
  
	
	
}

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

int main() {
  int N;
  cin>>N;
  
  bool ike =false;
  for(int i=0;i<40;i++){
    for(int j=0;j<20;j++){
      if(4*i+7*j==N){
        ike=true;
        break;
      }
    }
  }
  if(ike) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}
      

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

using namespace std ;

int main(void) {
    int n ;
    vector<int> p(20) ;

    cin >> n ;
    for (int i = 0; i < n; i++) 
        cin >> p[i];
    
    int cnt = 0 ;
    for (int i = 0; i < n-2; i++) {
        if ((p[i] < p[i+1] && p[i+1] <= p[i+2]) || p[i+2] < p[i+1] && p[i+1] <= p[i])
            cnt++ ;
    }

    cout << cnt << endl ;

    return 0 ;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;


const int N = 500 + 5;

int n;
int movex[] = {0, -1, 0, 1};
int movey[] = {-1, 0, 1, 0};
int occ[N][N], f[N][N];

void dp(int x, int y) {
  if (!x || !y || x > n || y > n) return;
  for (int i = 0; i < 4; i++) {
    int tx = x + movex[i];
    int ty = y + movey[i];
    if (occ[x][y] + f[x][y] < f[tx][ty]) {
      f[tx][ty] = occ[x][y] + f[x][y];
      // printf("change!\n");
      dp(tx, ty);
    }
  }
}

int main()
{
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        occ[i][j] = 1;
        int temp[] = {i-1, j-1, n-i, n-j};
        f[i][j] = *min_element(temp, temp + 4);
      }
    }
    int hate = 0;
    for (int i = 1; i <= n*n; i++) {
      int p, row, col;
      scanf("%d", &p);
      row = (p - 1) / n + 1;
      col = (p + n - 1) % n + 1;
      // printf("%d %d\n", row, col);
      occ[row][col] = 0;
      hate += f[row][col];
      // printf("hate=%d\n", hate);
      dp(row, col);
    }
    printf("%d\n", hate);
  }
  return 0;
}

Measured memory_bytes: 16780
#include<bits/stdc++.h>
using namespace std;
int N = 2;
priority_queue<long long, vector<long long>> asc;
vector<long long> A(2000, 0), B(2000, 0), C(2000, 0), AB(4000000, 0);
long long X, Y, Z;
long long AQ;

int main(){
    long long K;
    vector<int> v(3);
    cin >> X >> Y >> Z >> K;
    
    AQ = max(X, max(Y, Z));
    AQ = min(AQ, K);
	
    for(int i=0; i<X; i++)
	cin >> A[i];
    for(int i=0; i<Y; i++)
	cin >> B[i];
    for(int i=0; i<Z; i++)
	cin >> C[i];

    sort(A.begin(), A.end(), greater<long long>());
    sort(B.begin(), B.end(), greater<long long>());
    sort(C.begin(), C.end(), greater<long long>());    
    long long k = 0;
    for(int i = 0; i < min(AQ, X); i++){
	for(int j = 0; j < min(AQ, Y); j++){
	    AB[k] = A[i]+B[j];
	    k++;
	}	
    }
    sort(AB.begin(), AB.end(), greater<long long>());    

    for(int i = 0; i <min(K, k); i++){
	for(int j = 0; j < min(AQ, Z); j++){
	    asc.push(AB[i]+C[j]);
	}	
    }
      
    for(int i=0; i<K; i++){
	cout << asc.top() << "\n";
	asc.pop();		
    }
                
}



Measured memory_bytes: 66408
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
#include <memory>
#include <regex>
using namespace std;

int main()
{
    string s;
    cin >> s;
    int n = s.size();

    stack<char> stk;
    int ans = 0;
    for(int i=0; i<n; ++i){
        if(!stk.empty() && stk.top() != s[i]){
            ans += 2;
            stk.pop();
        }
        else{
            stk.push(s[i]);
        }
    }
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 512
A = int(input())
B = int(input())
C = int(input())
X = int(input())
a = range(A+1)
b = range(B+1)
c = range(C+1)
count = 0
for i in a:
    for p in b:
        for o in c:
            if (i*500+p*100+o*50)==X:
                count += 1
print(count)

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const int inf = 1e9;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, b, a) for (int i = a - 1; i >= b; i--)
#define int long long
using Graph = vector<vector<int>>;
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int dxx[8] = {1, 1, 1, 0, 0, -1, -1, -1}, dyy[8] = {-1, 0, 1, -1, 1, -1, 0, 1};

struct UnionFind {
    vector<int> par;

    UnionFind (int n) : par (n, -1) {} //親は-1

    int root (int x) {
        if (par[x] < 0) return x; //自身が親
        else
            return par[x] = root (par[x]); //再帰
    }

    bool same (int x, int y) { return root (x) == root (y); }

    void merge (int x, int y) {
        x = root (x);
        y = root (y);
        if (x == y) return; //既に同じ根
        // xとyのサイズの大きいほうにまとめたい
        if (size (x) < size (y)) swap (x, y);
        par[x] += par[y]; //根のparは-(要素数)になる
        par[y] = x;       //親を更新
        return;
    }

    int size (int x) { return -par[root (x)]; }
};

signed main() {
    int n, k, l;
    cin >> n >> k >> l;
    UnionFind tree_walk (n), tree_train (n);
    rep (i, 0, k) {
        int p, q;
        cin >> p >> q;
        tree_walk.merge (--p, --q);
    }
    rep (i, 0, l) {
        int p, q;
        cin >> p >> q;
        tree_train.merge (--p, --q);
    }
    map<pint, int> mp;
    rep (i, 0, n) { mp[{tree_walk.root (i), tree_train.root (i)}]++; }
    rep (i, 0, n) {
        cout << mp[{tree_walk.root (i), tree_train.root (i)}] << " ";
    }
    cout << "\n";
}


Measured memory_bytes: 17732
#include<stdio.h>

int main(){

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

max=0;

for (int i = 0; i <N; i++)
{
  if (i!=s && max < A[i]){ max = A[i]; t = i;}
}

for (int i = 0; i < N; i++)
{
  A[i] == A[s] ? printf("%d\n",A[t]) : printf("%d\n",A[s]);
}

return 0;

}

Measured memory_bytes: 2456
#include<stdio.h>

    int main()
    {
        int n;
        scanf("%d",&n);
        int a[200000],i;
        long long b[200000]={0},x;
        for (i=0;i<n;i++)
        {
            scanf("%d",&a[i]);
            a[i]=a[i]-1;
            b[a[i]]++;
        }
        for (i=0;i<n;i++)
        {
            x=x+b[i]*(b[i]-1)/2;
        }
        long long s;
        for (i=0;i<n;i++)
        {
            s=x;
            s=s-(b[a[i]]*(b[a[i]]-1)/2);
            s=s+(b[a[i]]-1)*(b[a[i]]-2)/2;
            printf("%lld\n",s);
        }
        return 0;
    }


Measured memory_bytes: 4864
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double D;
typedef pair<ll,ll> P;
#define M 1000000007
#define F first
#define S second
#define PB push_back
#define INF 100000000000000000
ll l,n,a;
string s;
int main(void){
    cin>>l>>n>>s;
    for(int i=0;i+1<l;i++){
        if(s[i]=='o'&&s[i+1]=='o')a++;
    }
    while(n--){
        l+=a*3LL;
        a*=2LL;
    }
    cout<<l<<endl;
}



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

#define bug(x) cout << #x << " = " << x << endl;
#define fr(a) freopen(a,"r",stdin);
#define fw(a) freopen(a,"w",stdout);
#define tc() int tc;cin >> tc; for (int _tc=1;_tc<=tc;_tc++)
#define up(i,l,r) for (int i=l;i<=r;i++)
#define down(i,r,l) for (int i=r;i>=l;i--)
#define rep(i,l,r) for (int i=l;i<r;i++)
#define pb push_back
#define mp make_pair
#define ins insert
#define fi first
#define se second
using namespace std;
typedef long long int ll;
typedef unsigned long long int llu;
typedef pair<int,int> ii;

/****************************************************/
void printArr(int a[], int l, int r)
{
    up(i,l,r) {
        cout << a[i] << " ";
    }
    cout << endl;
}

void printMtx(int a[][1010],int n, int m)
{
    up(i,1,n) {
        up(j,1,m) {
            cout << a[i][j] << " ";
        }
        cout << endl;
    }
}
/****************************************************/

bool check = true;
string s;
ll x,y, dp[2][16010],cnt, curDir;
vector<ll> v[2];

int main()
{
    ios_base::sync_with_stdio(0);

   // fr("test.in");
    cin >> s;
    cin >> x >> y;

    x+=8000;
    y+=8000;
    curDir = 0;
    rep(i,0,s.length()) {
        if (s[i] == 'T') {
            if (cnt!= 0) v[curDir].pb(cnt);
            curDir = 1-curDir;
            cnt = 0;
        }
        else cnt++;
    }
    if (cnt!=0) v[curDir].pb(cnt);

    memset(dp,false,sizeof(dp));
    dp[1][8000] = true;
    rep(i,0,v[0].size()) {
        up(j,0,16000) {
            dp[i%2][j] = false;
            if (i == 0 && s[0] == 'F') {
                if (j - v[0][i] >= 0 && dp[1-i%2][j-v[0][i]]) dp[i%2][j] = true;
            }
            else {
                if (j - v[0][i] >= 0 && dp[1-i%2][j-v[0][i]]) dp[i%2][j] = true;
                if (j + v[0][i] <= 16000 && dp[1-i%2][j+v[0][i]]) dp[i%2][j] = true;
            }
        }
    }
    if (v[0].size() > 0) check &= dp[(v[0].size()-1)%2][x];
    else {
        if (x!=8000) check = false;
    }

    memset(dp,false,sizeof(dp));
    dp[1][8000] = true;
    rep(i,0,v[1].size()) {
        up(j,0,16000) {
            dp[i%2][j] = false;
            if (j - v[1][i] >= 0 && dp[1-i%2][j-v[1][i]]) dp[i%2][j] = true;
            if (j + v[1][i] <= 16000 && dp[1-i%2][j+v[1][i]]) dp[i%2][j] = true;
        }
    }
    if (v[1].size() > 0) check &= dp[(v[1].size()-1)%2][y];
    else {
        if (y!=8000) check = false;
    }
    if (check) cout << "Yes\n";
    else cout << "No\n";
}


Measured memory_bytes: 640
#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <string>
#include <bitset>
#include <algorithm>
#include <cstring>
#include <cstdlib>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
using vp = vector<pii>;
using vs = vector<string>;
using qi = queue<int>;
using qp = queue<pii>;
using pqi = priority_queue<int>;
using pqim = priority_queue<pii, vector<pii>, greater<pii> >;
using ppp = pair<int, pair<int, int>>;
#define all(vec) vec.begin(), vec.end()
#define rall(vec) vec.rbegin(), vec.rend()
#define pb push_back
const ll mod = 998244353;
const ll inf = 1e18;

ll n;
bool prime[1000001] = { 1, 1 };

void input() {
	cin >> n;
}
void solve() {
	if (n == 1) {
		cout << 0;
		return;
	}
	vi ppp;
	for (int i = 2; i <= 1000000; ++i) {
		if (prime[i]) continue;
		ppp.push_back(i);
		for (int j = 2 * i; j <= 1000000; j += i)
			prime[j] = 1;
	}
	vl factor;
	ll ans = 0;
	for (int x : ppp) {
		ll p = x;
		if (p > n) break;
		if ((n % p) != 0) continue;
		factor.push_back(p);
		ll c = 0;
		while ((n % p) == 0) {
			c++;
			n /= p;
		}
		ll cnt = 0;
		if (c < 3) cnt = 1;
		else if (c < 6) cnt = 2;
		else if (c < 10) cnt = 3;
		else if (c < 15) cnt = 4;
		else if (c < 21) cnt = 5;
		else if (c < 28) cnt = 6;
		else if (c < 36) cnt = 7;
		else if (c < 45) cnt = 8;
		else if (c < 55) cnt = 9;
		else if (c < 66) cnt = 10;
		ans += cnt;
	}
	if (n > 1) ans++;
	if (factor.empty()) cout << 1;
	else cout << ans;

	return;
}

int main() {
	cin.tie(NULL); ios_base::sync_with_stdio(false);

	//int tc; cin >> tc;
	//while (tc--) {
	input();
	solve();
	//}
}

Measured memory_bytes: 4868
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if ((a * b) % 2 == 0) {
            System.out.println("Even");
        } else {
            System.out.println("Odd");
        }
    }
}


Measured memory_bytes: 21716
import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
	int a = sc.nextInt();
    double h1 = 999;
    int answer = 0;
    for(int i = 0; i < n; i++){
      int h = sc.nextInt();
	  double b = t-h*0.006;
	  if(Math.abs(b-a) < h1){
	  	h1 = Math.abs(b-a);
		answer = i+1;
	  }
    }
    System.out.print(answer);
  }
}


Measured memory_bytes: 25172
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <string>
#include <cmath>

using ll = long long;
using namespace std;


int main() {
	int n;
  	cin >> n;
  	int v[n];
  	for(int i=0;i<n;i++) cin >> v[i];
  
  	int b4 = v[0];
  	int ans = 0;
  	
  	int t = 0;
  	for(int i=1;i<n;i++) {
    	if(b4 >= v[i]) {
          t+=1;
          ans = max(ans, t);
          //cout << "A" << endl;
        } else {
          t=0;
          //cout << i << endl;
        }
      	b4 = v[i];
    }
    cout << ans << endl;
}

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

typedef pair<int, int> pii;
typedef long long ll;
template<class T> using V = vector<T>;
template<class T> using VV = V<V<T>>;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define ALL(c) (c).begin(),(c).end()
#define dump(x) cout << #x << " = " << (x) << endl
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n-1); }

template<class T, class U> void chmin(T& t, const U& u) { if (t > u) t = u; }
template<class T, class U> void chmax(T& t, const U& u) { if (t < u) t = u; }

template<class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
    os<<"("<<p.first<<","<<p.second<<")";
    return os;
}

template<class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
    os<<"{";
    rep(i, v.size()) {
        if (i) os<<",";
        os<<v[i];
    }
    os<<"}";
    return os;
}

int main() {
    int L, R; cin >> L >> R;
    int ans = TEN(9);
    for (int i = L; i <= R && ans != 0; ++i) {
        for (int j = L; j < i && ans != 0; ++j) {
            chmin(ans, (ll)i * j % 2019);
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.begin(), v.end(), x) != v.end())

using namespace std;
typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const int INF = 1001001001;
const long long INFL = (1LL<<60);
const double eps = (1e-9);

bool check(int n, const vector<int>& d) {
  while (n != 0) {
    if (EXIST(d, n % 10)) return false;
    n /= 10;
  }
  return true;
}

int main(int argc, char* argv[])
{
  int n, k;
  cin >> n >> k;
  vector<int> d(k);
  rep(i, k) {
    cin >> d[i];
  }

  int ans = n;
  while (!check(ans, d)) {
    ans++;
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS 
#include <stdio.h>

int main()
{
	int s,hour,min,sec;
	s = 0, hour = 0, min = 0, sec = 0;

	scanf("%d", &s);
	if (s >= 0 && s <= 86400) {
		hour = s / (60 * 60);
		min = (s - (hour*(60*60))) / 60;
		sec = s % 60;

		printf("%d:%d:%d\n", hour, min, sec);
	}

	return 0;
}


Measured memory_bytes: 2080
#!/usr/bin
# -*- coding="utf-8" -*-
 
s = input()[:-1]
sn = len(s)

if sn % 2 == 1:
  sn = sn -1
for i in range(sn, 0, -2):
  if s[:i//2] == s[i//2:i]:
    break
print(len(s[:i]))

Measured memory_bytes: 2940
#include<stdio.h>
#define N 50010
#define M 25
#define INF 666666 

int a[N],v[M];

int main(){
	int m,n,Min,i,j,t;
	scanf("%d%d",&n,&m);
	for(i=1;i<=m;i++)
		scanf("%d",&v[i]);
	v[0] = 0;
	for(i=1;i<N;i++)
		a[i] = INF;
	a[0]=0;
	for(i=1;i<=n;i++){
		Min = t = INF;
		for(j=1;j<=m;j++){
			if(i-v[j]>=0) t = a[i-v[j]]+1;
			if(t<Min) Min = t;
		}
		a[i] = Min;
	}
	printf("%d\n",a[n]);
	return 0;
}

Measured memory_bytes: 792
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <vector>
#include <algorithm>

using namespace std;
//n以下の素数列
void LF_Prime_Sequence(const long &n, vector<long> &viPrime){
    if(n < 2){
        return;
    }
    viPrime.clear();
    vector<char> aiType(n + 1,0);
    for (long i = 2; i * i <= n; i++){
        for(long j = 2; j * i <= n; j++){
            aiType[j * i] = 1;
        }
    }
    for (long i = 2; i <= n; i++){
        if(aiType[i] == 0){
            viPrime.push_back(i);
        }
    }
    return;
}
int main(){
    const long nValue = 1000000;
    vector<long> viPrime;
    LF_Prime_Sequence(nValue, viPrime);
    int n;
    scanf("%d", &n);
    int nPrime = viPrime.size();
    vector<int> viCount(nValue + 1, 0);
    for(int i = 0; i < n; i++){
        long a;
        scanf("%ld", &a);
        for(int j = 0; j < nPrime; j++){
            if(a < viPrime[j] * viPrime[j]){
                break;
            }
            bool bDivide = false;
            while(a % viPrime[j] == 0){
                a /= viPrime[j];
                bDivide = true;
            }
            if(bDivide){
                viCount[viPrime[j]]++;
            }
        }
        if(a > 1){
            viCount[a]++;
        }
    }
    
    int nMax = 0;
    for(int i = 0; i < nPrime; i++){
        nMax = max(nMax, viCount[viPrime[i]]);
    }
    if(nMax == n){
        printf("not coprime");
    }
    else if(nMax >= 2){
        printf("setwise coprime");
    }
    else {
        printf("pairwise coprime");
    }
   
    return 0;
}


Measured memory_bytes: 7436
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int n=s.length();
	for(int i=0;i<n;i++)
	{
		if((i+1)%2==1)
		{
			cout<<s[i];
		}
	}
	return 0;
}

Measured memory_bytes: 512
import collections
n,k,q = map(int,input().split())
alist = [int(input()) for i in range(q)]

atuple = tuple(alist)

acount = collections.Counter(atuple)
#print(acount,q,k)

for i in range(1,n+1):
    if q - acount[i] < k:
        print("Yes")
    else:
        print("No")

Measured memory_bytes: 62808