akhauriyash/Code-Regression huggingface dataset:
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;
import java.util.Scanner;
import static java.lang.Math.*;

public class Main {

	static Scanner scan = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) {
		TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
		int max = 0;
		while(scan.hasNext()){
			int a = si();
			if(!map.containsKey(a)){
				map.put(a, 1);
				max = max(max,1);
			}
			else{
				int tmp = map.get(a)+1;
				map.put(a, tmp);
				max = max(max,tmp);
			}
		}
		for (Map.Entry<Integer, Integer> e : map.entrySet())
			if(e.getValue()==max) out.println(e.getKey());
		out.flush();
	}

	static int si() {
		return Integer.parseInt(scan.next());
	}
}

Measured memory_bytes: 17272
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <cmath>

using namespace std;
#define PI 3.1415926535897932384626433832795
#define MOD (1000000007)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repc(i, s, n) for (int i = (s); i <= (n); i++)
#define rrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define rrepc(i, s, n) for (int i = (s); i >= (n); i--)
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	ll N, K, ans = 0;

	cin >> N >> K;

	ans = (N / K) * (N / K) * (N / K);
	if (K % 2 == 0 && N - K / 2 >= 0) ans += ((N - K / 2) / K + 1) * ((N - K / 2) / K + 1) * ((N - K / 2) / K + 1);

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<unordered_map>
#include<random>
#include<array>
#include<cassert>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())





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

	int n, a, b;
	cin >> n >> a >> b;

	cout << min(b, n * a) << endl;





	return 0;
}

Measured memory_bytes: 256
cards = []
mark = ["S","H","C","D"]
for i in range(4):
    mk = mark[i]
    for j in range(1,14):
        cards.append("{} {}".format(mk,j))
n = int(input())
for _ in range(n):
    card = input()
    cards.remove(card)
for i in cards:
    print(i)

Measured memory_bytes: 7608
#include<stdio.h>
int main(){
  char x[1000];
  int i, sum;
  while(2){
    scanf("%s", x);
    if(x[0] == '0')break;
      sum = 0;//入れないと...?
    for(i = 0;x[i] != '\0';i++){
      sum += x[i] - '0';
    }
    printf("%d\n", sum);
  }
  return 0;
}



Measured memory_bytes: 2728
#include <bits/stdc++.h>
#define rep3(i, s, n, a) for (int i = (s); i < (int)(n); i += a)
#define rep2(i, s, n) rep3(i, s, n, 1)
#define rep(i, n) rep2(i, 0, n)

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;

int main(){
    int n;
    cin >> n;
    vector<ll> a;
    rep(i, n*3){
        ll x;
        cin >> x;
        a.push_back(x);
    }
    sort(a.begin(), a.end());
    ll sum=0;
    rep(i, n){
        sum += a[n*3-2-i*2];
    }
    cout << sum << endl;
    return 0;
}

Measured memory_bytes: 7440
#include<stdio.h>

int main(void)
{
   int a, b, k, i, x=0, z=1;

   scanf("%d%d%d",&a,&b,&k);

   if(a>b){
      i=a;
      a=b;
      b=i;
   }

   i=a;
   while(x==0){
      if((a%i==0)&&(b%i==0)){
         if(z!=k)
            z++;
         else
            x=i;
      }
      i--;
   }

   printf("%d\n",x);
   return 0;
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
#define endl '\n'
#define pb push_back
#define fr first
#define sc second
#define ll long long int
#define bit(idx) idx&(-idx)
#define bin(x, a) bitset<a>(x)
#define all(A) A.begin(), A.end()
#define debug(x) cout << #x << " = " << x << endl;
using namespace std;



int main(){
	ios_base::sync_with_stdio(NULL); cin.tie(); cout.tie();
	int a, b, c, k; cin >> a >> b >> c >> k;
	if(k <= a) cout << k << endl;
	else if(k > a && (k - a) <= b) cout << a << endl;
	else if(k >= a + b) cout << a - (k - (a + b)) << endl;
}
/**

*/

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

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

  int ans;
  if (n%2 == 0) {
    ans = n/2 -1;
  }
  else {
    ans = (n-1)/2;
  }
  cout << ans << endl;

}

Measured memory_bytes: 256
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	nextReader = newScanner()

	n := nextInt()
	p := make([]int, n)
	for i := 0; i < n; i++ {
		p[i] = nextInt()
	}

	var cnt int
	for i := 1; i < n-1; i++ {
		if p[i] > p[i-1] && p[i] > p[i+1] {
			continue
		}
		if p[i] < p[i-1] && p[i] < p[i+1] {
			continue
		}
		cnt++
	}
	fmt.Println(cnt)
}

// ---------------------------------------------------------------
// I/O
// ---------------------------------------------------------------
var nextReader func() string

func newScanner() func() string {
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(make([]byte, 1024), int(1e11))
	sc.Split(bufio.ScanWords)
	return func() string {
		sc.Scan()
		return sc.Text()
	}
}

func nextInt() int { n, _ := strconv.Atoi(nextReader()); return n }


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


def solve(N: int, A: "List[int]", B: "List[int]"):
    if N % 2 == 1:
        left = statistics.median(A)
        right = statistics.median(B)
        print(right - left + 1)

    else:
        left = statistics.median(A)
        right = statistics.median(B)
        print(int((right - left) * 2 + 1))
    return


# Generated by 1.1.7.1 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
    A = [int()] * (N)  # type: "List[int]"
    B = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        A[i] = int(next(tokens))
        B[i] = int(next(tokens))
    solve(N, A, B)

if __name__ == '__main__':
    main()


Measured memory_bytes: 28812
package main

import "fmt"

type station struct {
	c, s, f int
}

func main() {
	var n int
	fmt.Scan(&n)

	n--

	stations := make([]station, n)
	for i := range stations {
		fmt.Scan(&stations[i].c, &stations[i].s, &stations[i].f)
	}

	for i := 0; i < n; i++ {
		time := 0
		for j := i; j < n; j++ {
			s := stations[j]
			switch {
			case time < s.s:
				time = s.s
			case time%s.f != 0:
				time += s.f - (time % s.f)
			}
			time += s.c
		}
		fmt.Println(time)
	}
	fmt.Println(0)
}


Measured memory_bytes: 512
import sys

input = sys.stdin.readline


def main():
    s = input().rstrip()
    K = int(input())

    N = len(s)
    sub = []
    for i in range(N):
        for j in range(K):
            sub.append(s[i:i+j+1])
    sub = set(sub)
    sub = sorted(sub)
    ans = sub[K-1]
    print(ans)


if __name__ == "__main__":
    main()


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

using namespace std;

int main(){
  int n, m;
  cin >> n >> m;
  vector<int> v(n);

  for (int i=0; i<m; i++) {
    int a, b;
    cin >> a >> b;
    v[a-1]++;
    v[b-1]++;
  }

  for (int i=0; i<n; i++) {
    printf("%d\n", v[i]);
  }
  return 0;
}

Measured memory_bytes: 256
N=int(input())
x=[0]*N
y=[0]*N
h=[0]*N

ti=0

for i in range(N):
    x[i],y[i],h[i]=map(int,input().split())
    if h[i]!=0:
        ti=i



flag=0
for tx in range(101):
    if flag==1:
        break
    for ty in range(101):
        th=h[ti]+abs(tx-x[ti])+abs(ty-y[ti])
        flag=1
        for i in range(N):
            nh=h[i]+abs(tx-x[i])+abs(ty-y[i])
            if (h[i]!=0 and nh!=th) or (h[i]==0 and nh<th ):
                flag=0
                break
        if flag==1:
            ans=[tx,ty,th]
            break

print(' '.join(map(str, ans)))      
            

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

public class Main {

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.nextLine();
			char[] arr = str.toCharArray();
			Arrays.sort(arr);
			char tmp = ' ';
			for (char c : arr) {
				if (tmp == c) {
					System.out.println("no");
					return;
				}
				tmp = c;
			}
			System.out.println("yes");
		}
	}
}

Measured memory_bytes: 21716
src = input()
dest = input()

if len(src) != len(dest):
    print("No")
    exit()

# srcを大文字に変換し、１文字ずつ比較。
# 同じだったら小文字に変換、違ったらsrc内の文字をすべてこもじの該当文字に変換
# そもそも小文字だったらスキップ
src = src.upper()

for i in range(len(src)):
    if src[i].islower():
        pass
    elif dest[i] in src[0:i]:
        print('No')
        exit()
    else:
        src = src.replace(src[i], dest[i])

if src == dest:
    print("Yes")
else:
    print("No")


Measured memory_bytes: 3632
#include<bits/stdc++.h>
using namespace std;
main()
{
    int k,a,b,i,d=0;
    cin>>k>>a>>b;
    for(i=a;i<=b;i++)
    {
        if(i%k==0)
        {
            d++;
            break;
        }
    }
    if(d>0)
        cout<<"OK"<<endl;
    else cout<<"NG"<<endl;
}


Measured memory_bytes: 3632
#include <bits/stdc++.h>
using namespace std;
int main(void){
    long long X;
    long long ans=0;
    int i,j;
    cin >>X;
    for(i=0;i<X;i++){
        if(X<500*(i+1)){
            break;
        }
    }
    ans+=1000*i;
    for(j=0;j<X;j++){
        if(X-(500*i)<5*(j+1)){
            break;
        }
    }
    ans+=5*j;
    cout<<ans;
    return 0;
}


Measured memory_bytes: 256
def gcd(x, y):
    if x > y:
        y, x = x, y
    if x == 0:
        return y
    return gcd(y % x, x)


def lcm(x, y):
    d = gcd(x, y)
    return x * y // d


N = int(input())

ans = 1
for _ in range(N):
    a = int(input())
    ans = lcm(ans, a)
print(ans)

Measured memory_bytes: 3060
#include <iostream>
#include <algorithm>
#include <memory.h>
#define MAX_N 50

using namespace std;

int n;
int p[MAX_N], p_copy[MAX_N];

void solve()
{
    int count = 0;
    memcpy(p_copy, p, sizeof(p));
    sort(p, p + n);
    for (int i = 0; i < n; i++)
    {
        if (p[i] != p_copy[i])
            count++;
    }
    if (count == 0 || count == 2)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
}

int main()
{
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> p[i];
    }

    solve();
}


Measured memory_bytes: 256
num = int(input())
mem = list(map(int, input().split()))

dic = {}
mod = 10 ** 9 + 7
zeros = 0
flag = True
for i in range(num):
    temp = mem[i]
    if not temp == 0:
        dic.setdefault(str(temp), 0)
        dic[str(temp)] += 1
    else:
        zeros += 1
for key in dic:
    if not dic[key] == 2:
        flag = False
        break
        
if (zeros == 0 or zeros == 1) and flag:
    print(int((2 ** (len(mem) // 2) % mod)))
else:
    print(0)

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

namespace AOJ0519
{
    class Program
    {
        static void Main()
        {
            var teams = int.Parse(Console.ReadLine() ?? "");
            var nodes = Enumerable.Range(1, teams).Select(i => new Node(i)).ToArray();

            var count = int.Parse(Console.ReadLine() ?? "");
            for (var i = 0; i < count; i++)
            {
                var values = (Console.ReadLine() ?? "").Split(' ').Select(int.Parse).ToArray();
                Node.Connect(nodes[values[0] - 1], nodes[values[1] - 1]);
            }

            var noInputs = new Queue<Node>(from node in nodes
                                           where node.Inputs.Count == 0
                                           select node);
            var sorted = new List<Node>();
            var unique = true;

            while (noInputs.Any())
            {
                if (noInputs.Count != 1) unique = false;
                var node = noInputs.Dequeue();
                sorted.Add(node);
                foreach (var next in new List<Node>(node.Outputs))
                {
                    Node.Disconnect(node, next);
                    if(next.Inputs.Count == 0) noInputs.Enqueue(next);
                }
            }

            foreach (var node in sorted)
            {
                Console.WriteLine(node.Value);
            }

            Console.WriteLine(unique ? 0 : 1);
        }
    }

    public class Node
    {
        public List<Node> Inputs { get; set; }
        public List<Node> Outputs { get; set; }
        public int Value { get; set; }

        public Node(int value)
        {
            Inputs = new List<Node>();
            Outputs = new List<Node>();
            Value = value;
        }

        public static void Connect(Node from, Node to)
        {
            from.Outputs.Add(to);
            to.Inputs.Add(from);
        }

        public static void Disconnect(Node from, Node to)
        {
            from.Outputs.Remove(to);
            to.Inputs.Remove(from);
        }
    }
}

Measured memory_bytes: 12328
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    long long h, r = 0;
    long n, i, j;
    long long a[100000], b[100000];
    cin >> n;
    cin >> h;
    for(i = 0; i < n; i++)
    {
        cin >> a[i];
        cin >> b[i];
    }
    sort(a, a+n);
    sort(b, b+n);
//    for(i = n-1; i >= 0; i--)
 //   {
        for(j = n-1; j >= 0; j--)
        {
            if(a[n-1] < b[j])
            {
                h = h - b[j];
                r++;
                if(h <= 0)
                {
                    break;
                }
            }
            else
            {
                break;
            }
        }
        if(h > 0)
        {
            if(h%a[n-1] == 0)
            {
                r = r + h/a[n-1];
            }
            else
            {
                r = r + h/a[n-1] + 1;
            }

        }
//        break;

 //   }
    cout << r << endl;
    return 0;
}

Measured memory_bytes: 1792
Edge = Struct.new(:from, :to, :cost)

class PriorityQueue
  def initialize
    @elements = []
  end
  
  def push(n)
    i = @elements.size
    while i > 0
      p = (i-1) / 2
      break if @elements[p].cost <= n.cost
      @elements[i] = @elements[p]
      i = p
    end
    @elements[i] = n
  end
  alias :<< :push
  
  def pop
    min = @elements[0]
    n   = @elements.pop
    unless @elements.empty?
      i = 0
      while i * 2 + 1 < @elements.size
        if @elements[i * 2 + 2].nil? or @elements[i * 2 + 1].cost < @elements[i * 2 + 2].cost
          buf = i * 2 + 1
        else
          buf = i * 2 + 2
        end
        break if @elements[buf].cost >= n.cost
        @elements[i] = @elements[buf]
        i = buf
      end
      @elements[i] = n
    end
    min
  end
  
  def empty?
    @elements.empty?
  end
end

N, M = gets.split.map(&:to_i)

E = Array.new(M)
M.times do
  a, b = gets.split.map(&:to_i)
  a -= 1
  b -= 1
  E << [a, b]
end

sum = 0
E.size.times do |i|
  edges = Hash.new { |h, k| h[k] = [] }
  
  [*0..E.size-1].reject { |x| x == i }.each do |j|
    a, b = E[j]
    edges[a] << Edge.new(a, b, 1)
    edges[b] << Edge.new(b, a, 1)
  end
  
  queue = PriorityQueue.new
  edges[0].each { |e| queue << e }
  
  visit = Array.new(N, false)
  visit[0] = true
  
  dist = Array.new(N, Float::INFINITY)
  dist[0] = 0
  
  until queue.empty?
    e1 = queue.pop
    unless visit[e1.to]
      visit[e1.to] = true
      dist[e1.to] = e1.cost
      edges[e1.to].each { |e2| queue << Edge.new(e2.from, e2.to, e1.cost + e2.cost) }
    end
  end
  sum += 1 if dist.any? { |d| d == Float::INFINITY }
end
puts sum

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

int main() {
    string w;
    cin >> w;
    map<char, int> m;

    rep(i, w.size()) m[w[i]]++;

    bool ok = true;
    for (auto e: m) if (e.second % 2 != 0) ok = false;

    if (ok) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}


Measured memory_bytes: 256
//
// Created by kota_ on 2019/12/30.
//

#include <stdio.h>
#include <stdlib.h>

typedef struct node{
    int id;
    struct node *child_left;
    struct node *child_right;
    struct node *parent;
}Node;

typedef Node* Nodepointer;
void print_preorder(Nodepointer root);
void print_inorder(Nodepointer root);
void print_postorder(Nodepointer root);

Node make_1node(int id){
    Node ret;
    ret.id = id;
    ret.child_left = NULL;
    ret.child_right = NULL;
    ret.parent = NULL;
    return ret;
}

int main(){
    int i, j, n, id;
    Nodepointer nodes, parent;
    scanf("%d", &n);
    nodes = malloc(sizeof(Node) * n);
    for(i = 0; i < n; i++){
        // nodeを全部初期化
        nodes[i] = make_1node(i);
    }
    for(i = 0; i < n; i++){
        scanf("%d", &id);
        parent = &nodes[id];
        for(j = 0; j < 2; j++){
            scanf("%d", &id);
            if(id == -1){
                continue;
            }
            if(j == 0){
                parent->child_left = &nodes[id];
            }
            else{
                parent->child_right = &nodes[id];
            }
            nodes[id].parent = parent;
        }

    }
    //root探す！
    for(i = 0; i < n; i++){
        parent = &nodes[i];
        if(parent->parent == NULL){
            break;
        }
    }
    printf("Preorder\n");
    print_preorder(parent);
    printf("\nInorder\n");
    print_inorder(parent);
    printf("\nPostorder\n");
    print_postorder(parent);
    printf("\n");

    free(nodes);
    return 0;
}

void print_preorder(Nodepointer root){
    if(root == NULL){
        return;
    }
    printf(" %d", root->id);
    print_preorder(root->child_left);
    print_preorder(root->child_right);
}

void print_inorder(Nodepointer root) {
    if(root == NULL){
        // 安全対策、ヨシ！
        return;
    }
    if(root->child_left != NULL){
        print_inorder(root->child_left);
    }
    printf(" %d", root->id);
    if(root->child_right != NULL){
        print_inorder(root->child_right);
    }
}

void print_postorder(Nodepointer root) {
    if(root == NULL){
        // 安全対策、ヨシ！
        return;
    }
    if(root->child_left != NULL){
        print_postorder(root->child_left);
    }
    if(root->child_right != NULL){
        print_postorder(root->child_right);
    }
    printf(" %d", root->id);
}




Measured memory_bytes: 2140
N = int(input())

r = []
for _ in range(N):
    x,y = map(int, input().split())
    r.append((-y,x))

b = []
for _ in range(N):
    x,y = map(int, input().split())
    b.append((x,y))

r.sort()
b.sort()

ans = 0
for my,x in r:
    for j in range(len(b)):
        if  -my < b[j][1] and x < b[j][0]:
            ans += 1
            b.pop(j)
            break

print(ans)


Measured memory_bytes: 3064
#include<iostream>
    using namespace std;
    int main()
    {
      int a;
      char op;
      int b;

      std::cin >> a;
      std::cin >> op;
      std::cin >> b;
      if ( op == '+') {
        std::cout << a+b << '\n';
        /* code */
      }

      else {
        std::cout << a-b << '\n';
      }
        return 0;
      }


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

int main() {
	string S; long long K;
	cin >> S >> K;
	for (int i = 0; i < min((long long)S.size(), K); i++) {
		if (S[i] >= '2') { cout << S[i] << endl; return 0; }
	}
	cout << '1' << endl;
	return 0;
}


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

#define REP(i,n) for(int i=0;i<n;++i)
using namespace std;

int main(){
  int n;
  string s, t;
  vector<char> r;
  cin >> n >> s >> t;
  REP(i, n) {
    cout << s[i] << t[i];
  }
  cout << endl;
}

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

using namespace std;

int main() {
	string s;
	cin >> s;
	int res = 0;
	for (int i = 0; i < 6; i++) {
		if (s[i] == '1') {
			res++;
		}
	}
	cout << res << endl;
	return 0;
}

Measured memory_bytes: 256
package main

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

func main() {
	_, A, B := ReadInt(), ReadInt(), ReadInt()
	if A > B {
		A, B = B, A
	}
	if (B-A+1)%2 == 0 {
		fmt.Println("Borys")
	} else {
		fmt.Println("Alice")
	}
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int)       { Scan(&i); return }
func ReadString() (s string) { Scan(&s); return }
func ReadInts(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}


Measured memory_bytes: 1844
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

    n = int(input())
    color_dict = {}
    ans = 1
    front_c = 0
    for _ in range(n):
        c = input().rstrip()
        if c != front_c:
            try:
                ans += color_dict[c]
                color_dict[c] = ans
            except KeyError:
                color_dict[c] = ans
            front_c = c
    print(ans%(10**9+7))


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

int main() {

	int n; cin >> n;
	
	vector<int> a(n + 1, 0); for (int i = 1; i <= n; i++) cin >> a[i];

	sort(a.begin(), a.end());
	
	int ans = 0;
	for (int i = n; i >= 3; i--) {
		for (int j = i - 1; j >= 2 ; j--) {
			int cnt = 0;
			cnt += a.end() - upper_bound(a.begin(), a.end(), a[i] - a[j]); // a[i] - a[j] より大きい要素の個数
			cnt -= (n + 1) - j;                                            // インデックス j 以上の要素はカウントしない
			ans += max(0, cnt);
		}	
	}

	cout << ans << endl;
	return 0;

}

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

int main() {
    char x, y;
    cin >> x >> y;
    if (x == y)
        cout << '=' << endl;
    else if (x < y)
        cout << '<' << endl;
    else
        cout << '>' << endl;
    return 0;
}

Measured memory_bytes: 3636
import numpy as np

h, w = map(int, input().split())
al = list(list(input()) for _ in range(h))
al_n = np.array(al)
row = [0]*w
col = [0]*h
for i in range(h):
    for j in range(w):
        if al_n[i][j] == '.':
            row[j] += 1
            col[i] += 1
row_ = []
col_ = []
for i in range(w):
    if row[i] == h:
        row_.append(i)

for j in range(h):
    if col[j] == w:
        col_.append(j)

if len(col_) > 0:
    al_n = np.delete(al_n, col_, axis=0)

if len(row_) > 0:
    al_n = np.delete(al_n, row_, axis=1)

for a in al_n:
    print(*a, sep='')

Measured memory_bytes: 13912
#include <bits/stdc++.h>
#include <unordered_map>
typedef long long ll;
#define rep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define print2(x,y) cout << (x) << " " << (y) << endl;
#define printa(x,n) for(ll i = 0; i < n; i++){ cout << (x[i]) << " \n"[i == n-1];}
#define printp(x,n) for(ll i = 0; i < n; i++){ cout << "(" << x[i].first << ", " << x[i].second << ") "; } cout << endl;
#define INF (1e18)
using namespace std;
const ll MOD = 1e9 + 7;
typedef pair<ll, ll> lpair;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll m;
    cin >> m;
    print(48-m);

}


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

int main()
{
    using namespace std;
    int n;

    cin >> n;
    for( int i=0; i<n; ++i ) {
        double x1, y1, x2, y2, x3, y3;
        cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;

        double const p
            = ( ( y1 - y3 ) * ( y1 * y1 - y2 * y2 + x1 * x1 - x2 * x2 ) - ( y1 - y2 ) * ( y1 * y1 - y3 * y3 + x1 * x1 - x3 * x3 ) )
            / ( 2 * ( y1 - y3 ) * ( x1 - x2 ) - 2 * ( y1 - y2 ) * ( x1 - x3 ) );

        double const q
            = ( ( x1 - x3 ) * ( x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2 ) - ( x1 - x2 ) * ( x1 * x1 - x3 * x3 + y1 * y1 - y3 * y3 ) )
            / ( 2 * ( x1 - x3 ) * ( y1 - y2 ) - 2 * ( x1 - x2 ) * ( y1 - y3 ) );

        double const r1 = sqrt( pow( p - x1, 2 ) + pow( q - y1, 2 ) );
        double const r2 = sqrt( pow( p - x2, 2 ) + pow( q - y2, 2 ) );
        double const r3 = sqrt( pow( p - x3, 2 ) + pow( q - y3, 2 ) );
        double const r = ( r1 + r2 + r3 ) / 3.0;

        cout << showpoint << fixed << setprecision( 3 );
        cout << p << " " << q << " " << r << endl;
    }
}

Measured memory_bytes: 1288
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdlib>
#include<iomanip>
#include<iostream>
#include<numeric>
#include<string>
using namespace std;

long gcd(long x, long y) { if (x > y) { return gcd(y, x); } long r; while (y != 0) { r = x % y; x = y; y = r; }return x; }
long lcm(long x, long y) { return(x / gcd(x, y)) * y; }
void indexsort(long* first, long* last, long* func) { sort(first, last, [&](long a, long b) {return func[a] < func[b]; }); }
//--------------------

int main() {

	long N; cin >> N;
	long res = 0;
	long A[100009], B[100009]; for (int i = 0; i < N; i++) cin >> A[i] >> B[i];

	for (int i = N - 1; i >= 0; i--) if ((A[i] + res) % B[i] != 0)res += (B[i] - (A[i] + res) % B[i]);

	cout << res << endl;
}

Measured memory_bytes: 1792
#include <iostream>
#include <vector>
#include <map>

#define PI 3.14159265359	

using namespace std;

int main(){
	int r, c, sum;
	cin >> r >> c;
	vector<vector<int> > table(r + 1, vector<int>(c + 1));
	for (int i = 0; i < r; i++){
		sum = 0;
		for (int j = 0; j < c; j++){
			cin >> table[i][j];
			sum += table[i][j];
		}
		table[i][c] = sum;
	}
	for (int j = 0; j < c + 1; j++){
		sum = 0;
		for (int i = 0; i < r; i++)	{
			sum += table[i][j];
		}
		table[r][j] = sum;
	}
	for (int i = 0; i < r + 1; i++){
		for (int j = 0; j < c + 1; j++){
			cout << table[i][j];
			if (j != c) cout << " ";
		}
		cout << endl;
	}
}

Measured memory_bytes: 3156
//Dijkstra法(蟻本p96)
//負の辺がない時のグラフの最短路
//値の代入と最小値の取り出し→priority_queueを利用
#include<bits/stdc++.h>
using namespace std;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define repr(i,a,b) for(int i=(a); i>=(b); i--)
#define all(x) (x).begin(),(x),end()
typedef long long ll;

struct edge{int to,cost;};//辺の状態(toはどのノードに伸びているか、costは重み)
typedef pair<int,int> P;//firstは最短距離、secondは頂点の番号

const int INF=1<<29;
int N;//ノードの数
vector<edge> G[10010];//グラフの隣接リスト表示
int d[10010];//各頂点の最短距離

void dijkstra(int s){
    //greater<P>を指定しておくことでfirstが小さい順に取り出せるようにする
    priority_queue<P,vector<P>,greater<P> > que;
    fill(d,d+N,INF);//始めに全てのノードへの最短距離をINFとする
    d[s]=0;//探索を開始する地点の最短距離を0に設定
    que.push(P(0,s));//最短距離0で頂点sへのびる辺をqueに入れてスタート
    
    while(!que.empty()){//queueが空==全ての辺の探索が終わったので終了
        P p=que.top();//queueの先頭を取得←最も重みの小さい辺を取得
        que.pop();
        int v=p.second;//もっとも重みの小さい辺が向かうノード
        if(d[v]<p.first)continue;//ノードvへの最短距離が既に求まっている場合はスルー
        //ノードvから伸びている辺を全てqueに入れる(ダイクストラの最短路の候補)
        for(int i=0; i<G[v].size(); i++){
            edge e=G[v][i];
            //辺eの向かうノードが既に探索し終わっていて、かつそれが更新されないとき
            if(d[e.to]>d[v]+e.cost){
                d[e.to]=d[v]+e.cost;
                //queに辺の情報を入れる
                //d[e.to](暫定で)始点からの距離d[e.to]
                //ノードe.toへ向かう辺
                que.push(P(d[e.to],e.to));
            }
        }
    }
}

int main(){
    
    //入力
    cin>>N;
    rep(i,0,N){
        int a,b;
        cin>>a>>b;
        rep(j,0,b){
            int c,d;
            cin>>c>>d;
            G[a].push_back({c,d});
        }
    }
    
    dijkstra(0);
    
    rep(i,0,N){
        cout<<i<<" "<<d[i]<<endl;
    }
    return 0;
}


Measured memory_bytes: 3428
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

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

int64_t f(int64_t x, int c, int d){
    int64_t ret = 0;
    ret = x - x/c - x/d + x/lcm(c,d);
    return ret;
}
void Main() {
    int64_t a,b;
    int c,d;

    cin >> a >> b >> c >> d;
    int64_t res = f(b, c, d) - f(a-1, c, d);
    cout << res << endl;
}

int main() {
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define forE(i,x) for(int i=head[x];i!=-1;i=ne[i])
using namespace std;
typedef long long i64;
typedef unsigned long long u64;
typedef unsigned u32;
typedef pair<int,int> pin;
#define mk(a,b) make_pair(a,b)
#define lowbit(x) ((x)&(-(x)))
#define sqr(a) ((a)*(a))
#define clr(a) (memset((a),0,sizeof(a)))
#define ls ((x)<<1)
#define rs (((x)<<1)|1)
#define mid (((l)+(r))>>1)
#define pb push_back
#define w1 first
#define w2 second
inline void read(int &x){
	x=0;int f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	x*=f;
}
inline void judge(){
	freopen("in.txt","r",stdin);
	freopen("out.txt","w",stdout);
}
/*******************************head*******************************/
const int maxn=205;
struct Point{
	int x,y;
	inline Point(int _x,int _y){x=_x;y=_y;}
	inline Point(){}
	inline void init(){
		read(x);read(y);
	}
}p[maxn];
inline Point operator + (const Point &a,const Point &b){
	return Point(a.x+b.x,a.y+b.y);
}
inline Point operator - (const Point &a,const Point &b){
	return Point(a.x-b.x,a.y-b.y);
}
inline int cross(const Point &a,const Point &b){
	return a.x*b.y-a.y*b.x;
}
int n;
const int mod=998244353;
int main(){
	read(n);
	rep(i,1,n)p[i].init();
	i64 ans=1;
	rep(i,1,n)ans=2ll*ans%mod;
	ans=(ans-n+mod)%mod;
	ans=(ans-1+mod)%mod;
	rep(i,1,n)rep(j,1,i-1){
		int sub=1;
		rep(k,1,j-1){
			if(cross(p[k]-p[i],p[j]-p[i])==0)sub=2*sub%mod;
		}
		ans=(ans-sub+mod)%mod;
	}
	printf("%d\n",ans);
	return 0;
}


Measured memory_bytes: 256
/*********************************************************************| 
|---------|    /\  ....                  ....                         |         
     |        /  \   \                    /  /------| ----- |-------| |
     |       /    \   \                  /  /           |   |         |
     |      /      \   \       /\       /  |            |   |         |
     |     /        \   \     /  \     /   |---|        |   |----|    |
     |    /__________\   \   /    \   /        |---|    |   |         |
     |   /            \   \ /      \ /              |   |   |         |
     |  /              \   |        |               /   |   |         |
     _ __              __ ...      ...      |------/  ----- _         |
                                                                      |  
        Md Tawsif Rahman                                              |
        Institute Of Information Technology                           |
        Jahangirnagar University                                      |                                                                         
                                                                      |
**********************************************************************/                 
#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define pii pair <int, int>
#define xx first
#define yy second
#define vc vector < int >
#define vcll vector < ll > 
#define f(i, c, n) for(i = c; i < n; i++)
#define fr(i, n, c) for(i = n - 1; i >= 0; i--) 
#define vbe(a) a.begin(), a.end()
#define mem(a) memset(a, 0, sizeof(a))
#define memn(a) memset(a, -1, sizeof(a))

#define srti(a, n) sort(a, a + n)
#define srtd(a, n) sort(a, a + n, greater<int>())
#define LB(a, x) (lower_bound(vbe(a), x) - a.begin())
#define UB(a, x) (upper_bound(vbe(a), x) - a.begin())

#define fast ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

int i, j, k;
vc prime;
vc is_prime;

int gcd(int a, int b) {
    if(b == 0) return a;
    else return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
    return (a * b) / (__gcd(a, b));
}
 
void solve() {

    ll n;
    cin >> n;
    ll cnt = 1;
    while(n > 1) {
        n = n / 2;
        cnt++;
    }
    ll temp = 1, ans = 1;
    f(i, 1, cnt) {
        temp = temp * 2;
        ans += temp;
    }
    cout << ans << endl;
}
int main() {
    // int t; cin >> t; while(t--) 
    solve();
    
   
}  

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    int t=0;
    int o=0;
    while(c>0){
        c-=b;
        t++;
    }
    while(a>0){
    a-=d;
    o++;
    }
    if(t<=o) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Measured memory_bytes: 3564
$<.each_line do |l|
  cs = l.split(?,).map(&:to_i)
  case
  when cs.any? {|c| cs.count {|d| c == d } == 4 }
    puts 'four card'
  when cs.any? {|c| cs.count {|d| c == d } == 3 } && cs.any? {|c| cs.count {|d| c == d } == 2 }
    puts 'full house'
  when cs.sort == (cs.min..cs.max).to_a || cs.sort == [1, 10, 11, 12, 13]
    puts 'straight'
  when cs.any? {|c| cs.count {|d| c == d } == 3 }
    puts 'three card'
  when cs.uniq.size == 3
    puts 'two pair'
  when cs.uniq.size == 4
    puts 'one pair'
  else
    puts 'null'
  end
end

Measured memory_bytes: 8712
#include<bits/stdc++.h>
using namespace std;
#define bolt ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define text_wali_bakchodi freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define F first
#define S second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define endl "\n"
typedef long long ll;
typedef long double ld;
const ll mod = 1e9+7 ;
const ld pi=3.1415926535897932384626433;
const ll inf = 1e18;
bool isprime(ll n){for(ll i=2;i*i<=n;++i){if(n%i==0){return false;}}return true;}
ll factorial(ll n){return (n==1 || n==0) ? 1:n*factorial(n-1);}
ll power(ll x,ll y){ll res=1;x=x%mod;while(y>0){if(y&1)res=((res%mod)*(x%mod))%mod;y=y>>1;x=((x%mod)*(x%mod))%mod;}return res;}
ll gcd(ll a,ll b){if (a==0)return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return (a/gcd(a,b)*b);}
ll max(ll a,ll b){ll sol=a>b?a:b;return sol;}
ll min(ll a,ll b){ll sol=a<b?a:b;return sol;}


int main ()
{
   bolt;
   ll n,m;
   cin>>n>>m;
   vector <ll> a(n);
   ll s=0;
   for (ll i=0;i<n;i++)
   {
      cin>>a[i];
      s+=a[i];
   }
   sort (a.rbegin(),a.rend());
   if (a[m-1]*4*m>=s)
   {
      cout<<"Yes";
   }
   else
      cout<<"No";
}


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

using namespace std;

map<pair<long long, long long>, long long> mapp;
long long counter[10];

int main() {
    long long r,c;
    cin>>r>>c;

    long long n,x,y;
    cin>>n;

    for(int i=0;i<n;i++) {
        cin>>x>>y;
        if(x > 0 and y > 0 and x+2 <= r and y+2 <= c) {
            if(mapp.find(make_pair(x, y)) == mapp.end()) {
                mapp[make_pair(x, y)] = 1;
            } else {
                mapp[make_pair(x, y)] += 1;
            }
        }

        if(x > 0 and y-1 > 0 and x+2 <= r and y+1 <= c) {
            if(mapp.find(make_pair(x, y-1)) == mapp.end()) {
                mapp[make_pair(x, y-1)] = 1;
            } else {
                mapp[make_pair(x, y-1)] += 1;
            }
        }

        if(x > 0 and y-2 > 0 and x+2 <= r and y <= c) {
            if(mapp.find(make_pair(x, y-2)) == mapp.end()) {
                mapp[make_pair(x, y-2)] = 1;
            } else {
                mapp[make_pair(x, y-2)] += 1;
            }
        }

        if(x-1 > 0 and y > 0 and x+1 <= r and y+2 <= c) {
            if(mapp.find(make_pair(x-1, y)) == mapp.end()) {
                mapp[make_pair(x-1, y)] = 1;
            } else {
                mapp[make_pair(x-1, y)] += 1;
            }
        }

        if(x-1 > 0 and y-1 > 0 and x+1 <= r and y+1 <= c) {
            if(mapp.find(make_pair(x-1, y-1)) == mapp.end()) {
                mapp[make_pair(x-1, y-1)] = 1;
            } else {
                mapp[make_pair(x-1, y-1)] += 1;
            }
        }

        if(x-1 > 0 and y-2 > 0 and x+1 <= r and y <= c) {
            if(mapp.find(make_pair(x-1, y-2)) == mapp.end()) {
                mapp[make_pair(x-1, y-2)] = 1;
            } else {
                mapp[make_pair(x-1, y-2)] += 1;
            }
        }

        if(x-2 > 0 and y > 0 and x <= r and y+2 <= c) {
            if(mapp.find(make_pair(x-2, y)) == mapp.end()) {
                mapp[make_pair(x-2, y)] = 1;
            } else {
                mapp[make_pair(x-2, y)] += 1;
            }
        }

        if(x-2 > 0 and y-1 > 0 and x <= r and y+1 <= c) {
            if(mapp.find(make_pair(x-2, y-1)) == mapp.end()) {
                mapp[make_pair(x-2, y-1)] = 1;
            } else {
                mapp[make_pair(x-2, y-1)] += 1;
            }
        }

        if(x-2 > 0 and y-2 > 0 and x <= r and y <= c) {
            if(mapp.find(make_pair(x-2, y-2)) == mapp.end()) {
                mapp[make_pair(x-2, y-2)] = 1;
            } else {
                mapp[make_pair(x-2, y-2)] += 1;
            }
        }
    }


    long long ans = 0;
    for(auto it = mapp.begin(); it!=mapp.end();it++) {
        counter[it->second]++;
    }

    for(int i=1;i<10;i++) ans+=counter[i];

    cout<<(r-2)*(c-2)-ans<<endl;

    for(int i=1;i<10;i++) cout<<counter[i]<<endl;

}


Measured memory_bytes: 56448
let input=readLine()!.characters.split(" ").map{Int(String($0))!}
let N=input[0]
var x=input[1]
let a=readLine()!.characters.split(" ").map{Int(String($0))!}.sort()
for i in 0..<N {
  x-=a[i]
  if x<=0 {
    print(i+(x<0 ?0:1))
    break
  }
}
if x>0{print(N-1)}

Measured memory_bytes: 4208
package main

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

type bufReader struct {
	r   *bufio.Reader
	buf []byte
	i   int
}

var reader = &bufReader{
	bufio.NewReader(os.Stdin),
	make([]byte, 0),
	0,
}

func (r *bufReader) readLine() {
	if r.i < len(r.buf) {
		return
	}
	r.buf = make([]byte, 0)
	r.i = 0
	for {
		line, isPrefix, err := r.r.ReadLine()
		if err != nil {
			panic(err)
		}
		r.buf = append(r.buf, line...)
		if !isPrefix {
			break
		}
	}
}

func (r *bufReader) next() string {
	r.readLine()
	from := r.i
	for ; r.i < len(r.buf); r.i++ {
		if r.buf[r.i] == ' ' {
			break
		}
	}
	s := string(r.buf[from:r.i])
	r.i++
	return s
}

func (r *bufReader) nextLine() string {
	r.readLine()
	s := string(r.buf[r.i:])
	r.i = len(r.buf)
	return s
}

var writer = bufio.NewWriter(os.Stdout)

func next() string {
	return reader.next()
}

func nextInt64() int64 {
	i, err := strconv.ParseInt(reader.next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return i
}

func nextInt() int {
	return int(nextInt64())
}

func nextLine() string {
	return reader.nextLine()
}

func out(a ...interface{}) {
	fmt.Fprintln(writer, a...)
}

func max64(x, y int64) int64 {
	if x > y {
		return x
	}
	return y
}

func max(x, y int) int {
	return int(max64(int64(x), int64(y)))
}

func min64(x, y int64) int64 {
	if x < y {
		return x
	}
	return y
}

func min(x, y int) int {
	return int(min64(int64(x), int64(y)))
}

func abs64(x int64) int64 {
	if x < 0 {
		return -x
	}
	return x
}

func abs(x int) int {
	return int(abs64(int64(x)))
}

func joinInt64s(a []int64, sep string) string {
	b := make([]string, len(a))
	for i, v := range a {
		b[i] = strconv.FormatInt(v, 10)
	}
	return strings.Join(b, sep)
}

func joinInts(a []int, sep string) string {
	b := make([]string, len(a))
	for i, v := range a {
		b[i] = strconv.Itoa(v)
	}
	return strings.Join(b, sep)
}

func divUp64(x, y int64) int64 {
	return (x + y - 1) / y
}

func divUp(x, y int) int {
	return int(divUp64(int64(x), int64(y)))
}

func gcd64(x, y int64) int64 {
	if x < y {
		x, y = y, x
	}
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

func gcd(x, y int) int {
	return int(gcd64(int64(x), int64(y)))
}

func lcm64(x, y int64) int64 {
	return x * y / gcd64(x, y)
}

func lcm(x, y int) int {
	return int(lcm64(int64(x), int64(y)))
}

func pow64(x, y int64) int64 {
	return int64(math.Pow(float64(x), float64(y)))
}

func pow(x, y int) int {
	return int(pow64(int64(x), int64(y)))
}

func main() {
	solve()
	writer.Flush()
}

func solve() {
	_, s := nextInt(), next()
	ans := s
	r := 0
	for _, c := range s {
		if c == '(' {
			r++
			continue
		}
		if r > 0 {
			r--
			continue
		}
		ans = "(" + ans
	}
	if r > 0 {
		ans += strings.Repeat(")", r)
	}
	out(ans)
}


Measured memory_bytes: 640
#include <iostream>
#include <bits/stdc++.h>
#include <cstring>
using namespace std;
int main(){
    int count=0;
    string s;
    cin>>s;
    char temp=s[0];
    for(int i=1;i<s.length();i++){
        if(s[i]!=temp){
            count++;
        }
        temp=s[i];
    }
    if (count==0){
        cout<<0;
    }else{
        cout<<count;
    }
    
    return 0;
}

Measured memory_bytes: 512
#include<bits/stdc++.h>
                using namespace std;
                typedef long long ll;
                #define MAX 200005
                int main()
                {
                      int n;
                      scanf("%d",&n);
                      int arr[n+1] = {0};
                      for(int i = 1 ; i <= n ; i++)scanf("%d",&arr[i]);
                      int m;
                      int sum = accumulate(arr,arr+n+1,0);
                      scanf("%d",&m);
                      for(int i = 0 ; i < m ; i++)
                      {
                            int a , b;
                            scanf("%d%d",&a,&b);
                            printf("%d\n",sum - arr[a] + b);
                      }
                }


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define inf INT_MAX
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define M (int)(1e9+7)
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++)
#define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0)
#define all(a) a.begin(),a.end()
#define IN(a,n) rep(i,n){ cin>>a[i]; }
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265
#define F first
#define S second
#define PB push_back
#define EB emplace_back
#define int ll
#define vi vector<int>



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

  int a;
  string s;
  cin>>a;
  cin>>s;

  if(a>=3200) cout<<s<<endl;
  else cout<<"red"<<endl;

}

Measured memory_bytes: 764
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define fill(x,v) memset(x, v, sizeof(x))
#define PI (ld)acos(-1)
#define endl '\n'
#define dbg(x) cout<<#x<<"="<<(x)<<endl;
#define dbg2(x,y) cout<<#x<<"="<<(x)<<" "<<#y<<"="<<(y)<<endl; 
#define fio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); 
#define IO freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
const ld eps=(ld)1e-9;
const ll inf=(ll)1e18;
const ll mod=(ll)1e9+7;

void solve(){
	int n,m;
	cin>>n>>m;
	int dp[n][m];
	char a[n][m];
	string s;
	for (int i = 0; i < n; ++i)
	{
		cin>>s;
		for (int j = 0; j < m; ++j)
		{
			a[i][j]=s[j];
		}
	}
	fill(dp,0);

	for (int i = 0; i < n; ++i)
	{
		if(a[i][0]=='.'){
			dp[i][0]=1;
		}
		else break;
	}
	for (int i = 0; i < n; ++i)
	{
		for (int j = 1; j < m; ++j)
		{
			if(a[i][j]=='#'){
				dp[i][j]=0;
			}
			else{
				dp[i][j]=(i>0?dp[i-1][j]:0)+dp[i][j-1];
				dp[i][j]%=mod;
			}
		}
	}
	cout<<dp[n-1][m-1];
}

int main(){fio;
int test=1;
// cin>>test;
while(test--){
	solve();
	cout<<endl;
}
return 0;
}


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

typedef pair<int,int> P;

int n;
vector<int> L;
map<int,int> C;

signed main(){
  
  cin>>n;
  
  for(int i=0;i<n;i++){
    int l;
    cin>>l;
    L.push_back(l);
    C[l]++;
  }
  
  sort(L.begin(),L.end());
  
  int ans = 0;
  
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      
      int cnt = lower_bound(L.begin(),L.end(),L[i]+L[j]) - L.begin();
      
      //cnt = cnt - (lower_bound(L.begin(),L.end(),L[j]) - L.begin());
      cnt-=j;
      
      cnt--;
      
      ans += cnt;
      
    }
  }
  /*
  for(P p : C ){
    
    int num = p.second;
    
    if(num>=2){
      
      int cnt = lower_bound(L.begin(),L.end(),p.first*2) - L.begin();
      
      cnt = cnt - (lower_bound(L.begin(),L.end(),p.first) - L.begin());
      
      cnt-= 2;
      
      if(cnt) ans -= cnt * ( num * ( num - 1 ) / 2 - 1 );
      
    }
    
    if(num>=3) ans -= num * ( num - 1 ) * ( num - 2 ) / 6 - 1;
    
  }
  */
  cout<<ans<<endl;
  
  return 0;
}


Measured memory_bytes: 384
package main
import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	buf := make([]byte, 1024*1024)
	sc.Buffer(buf, bufio.MaxScanTokenSize)
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	S := chars(next())
	T := chars(next())
	ans := 0
	for i:=0; i<len(S); i++{
		if S[i]!=T[i]{
			ans++
		}
	}
	fmt.Fprintln(out, ans)
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int{
	ret := make([]int, n)
	for i := 0; i < n; i++ {
		ret[i] = nextInt()
	}
	return ret
}

func nextStrings(n int) []string {
	ret := make([]string, n)
	for i := 0; i < n; i++ {
		ret[i] = next()
	}
	return ret
}

func chars(s string) []string {
	ret := make([]string, len([]rune(s)))
	for i, v := range []rune(s) {
		ret[i] = string(v)
	}
	return ret
}

Measured memory_bytes: 10800
#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define ANS cout << ans << endl
#define all(a) a.begin(),a.end()
#define SORT(a) sort(all(a))
#define REVERSE(a) reverse(all(a))
#define int long long
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define VIin(a) for(int i=0; i<a.size(); i++) cin >> a[i]
#define OUT(a) cout << a << endl
typedef vector<int> VI;
typedef vector<VI> VVI;
const int MOD=1e9+7;
const long long INF = 1LL << 60;
/*最大公約数*/int gcd(int x, int y) { return y ? gcd(y,x%y) : x;}
/*最小公倍数*/int lcm(int a, int b) { int g = gcd(a, b); return a / g * b; }
/*素数判定*/int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*約数列挙*/vector<int> getDivisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}
//----------------------------------------------
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
	int n; cin >> n;
  	if(n <= 999) OUT("ABC");
  	else OUT("ABD");

    return 0;
}

Measured memory_bytes: 256
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

beat=0
for i,b in enumerate(B):
    if A[i]>=b:
        beat+=b
    elif A[i+1]>=b-A[i]:
        beat+=b
        A[i+1]-=b-A[i]
    else:
        beat+=A[i] + A[i+1]
        A[i+1]=0

print(beat)


Measured memory_bytes: 19156
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef multiset<int>::iterator msi;
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 1000000000
#define LLINF 1000000000000000ll
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define all(x) (x).begin(),(x).end()
#define sq(x) ((x)*(x))
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define repn(i,a,n) for(int (i)=(a);(i)<(int)(n);(i)++)
#define EQ(a,b) (abs((a)-(b))<eps)
template<class T> void chmin(T& a,const T& b){if(a>b)a=b;}
template<class T> void chmax(T& a,const T& b){if(a<b)a=b;}
set<string> ss;
int main(){
	string s;
	int K;
	cin >> s;
	cin >> K;
	if(s.size()>5){
		for(int i=0;i<s.size();i++){
			for(int j=1;j<=5;j++){
				ss.insert(s.substr(i,j));
			}
		}
	}else{
		for(int i=0;i<s.size();i++){
			for(int j=1;j<=s.size()-i;j++){
				ss.insert(s.substr(i,j));
			}
		}
	}
	set<string>::iterator it = ss.begin();
	for(int i=0;i<K-1;i++)it++;
	cout << *it << endl;
	return 0;
}

Measured memory_bytes: 1664