akhauriyash/Code-Regression huggingface dataset:
import java.util.*;
class Main
{
   public static void main(String[] args)
   {
     Scanner sc=new Scanner(System.in);
     int x=sc.nextInt();
     int arr[]=new int[100001];
     long sum=0;
    
     for(int i=0;i<x;i++)
    {
      int temp=sc.nextInt();
        arr[temp]++;
        sum+=temp;
    }
     int op=sc.nextInt();
     
     for(int i=0;i<op;i++)
     {
       int a=sc.nextInt();
       int b=sc.nextInt();
      
       if(arr[a]!=0)
       {
          arr[b]+=arr[a];
         
       sum+=(b-a)*arr[a];
        arr[a]=0;
       }
       System.out.println(sum);
     }
     sc.close();
       
   }
}

Measured memory_bytes: 60620
#include <iostream>
#include <sstream>
#include <array>
#include <vector>
#include <cstdint>

class Number {
public:
	Number(std::int16_t n) : number(n) { }
	virtual std::int16_t operator()() const
	{ return number; }
	virtual std::string to_string() const
	{
		std::ostringstream ostrs;
		ostrs << number;
		return ostrs.str();
	}
private:
	std::int16_t number;
};

class Expression : public Number {
public:
	Expression(Number const* op1, char op, Number const* op2)
		: Number(0), operand1(op1), operand2(op2), op(op) { }
	virtual std::int16_t operator()() const
	{
		switch (op) {
			case '+': return (*operand1)() + (*operand2)();
			case '-': return (*operand1)() - (*operand2)();
			case '*': return (*operand1)() * (*operand2)();
		}
		return 0;
	}
	virtual std::string to_string() const
	{
		std::ostringstream oss;
		oss << "(" << operand1->to_string() << " " << op << " " << operand2->to_string() << ")";
		return oss.str();
	}

private:
	Number const* const operand1;
	Number const* const operand2;
	char const op;
};

typedef std::array<char, 3> OpArray;
typedef std::vector<Number const*> ExpVec;

bool expression(ExpVec& nums)
{
	if (nums.size() == 1) {
		if ((*nums.front())() == 10) {
			std::cout << (*nums.front()).to_string() << std::endl;
			return true;
		}
		return false;
	}

	for (std::size_t i = 0; i < nums.size(); ++i) {
		Number const* num1 = nums[i];
		nums.erase(begin(nums) + i);
		for (std::size_t j = i; j < nums.size(); ++j) {
			Number const* num2 = nums[j];
			nums.erase(begin(nums) + j);
			static OpArray const ops = {'+', '-', '*'};
			for (auto op : ops) {
				Expression exp(num1, op, num2);
				nums.push_back(&exp);
				if (expression(nums)) {
					return true;
				}
				nums.pop_back();
			}
			Expression exp(num2, '-', num1);
			nums.push_back(&exp);
			if (expression(nums)) {
				return true;
			}
			nums.pop_back();

			nums.insert(begin(nums) + j, num2);
		}
		nums.insert(begin(nums) + i, num1);
	}
	return false;
}

int main()
{
	std::int16_t a, b, c, d;
	for (std::cin >> a >> b >> c >> d;
		 not (a == 0 and b == 0 and c == 0 and d == 0);
		 std::cin >> a >> b >> c >> d) {
		Number num_a(a), num_b(b), num_c(c), num_d(d);
		ExpVec exp_vector;
		exp_vector.push_back(&num_a);
		exp_vector.push_back(&num_b);
		exp_vector.push_back(&num_c);
		exp_vector.push_back(&num_d);

		if (!expression(exp_vector)) {
			std::cout << 0 << std::endl;
		}
	}

	return 0;
}

Measured memory_bytes: 1236
#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long ll;
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(v, n) sort(v, v+n)
#define VSORT(v) sort(v.begin(), v.end())
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define INF 999999999
const double EPS = 1e-10;
const double PI  = acos(-1.0);
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    int x;
    cin >> x;
    int war = x/100;
    int ama = x%100;
    int a5 = ama/5;
    int a4 = (ama-a5*5)/4;
    int a3 = (ama-a5*5-a4*4)/3;
    int a2 = (ama-a5*5-a4*4-a3*3)/2;
    int a1 = (ama-a5*5-a4*4-a3*3-a2*2)/1;
    int sum=a1+a2+a3+a4+a5;
    if(war<sum){
        cout << 0<<endl;
        return 0;
    }else{
        cout << 1 <<endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,b,a) for(int i=b;i>=a;i--)
#define fori(a) for(auto i : a )
#define all(a) begin(a), end(a)
#define set(a,b) memset(a,b,sizeof(a))
#define sz(a) a.size()
#define pi 3.14159
#define ll long long
#define ull unsigned long long
#define pb push_back
#define PF push_front //deque
#define mp make_pair
#define pq priority_queue
#define mod 1000000007
#define f first
#define s second
#define pii pair< int, int >
#define vi vector<int>
#define vpii vector<pii>
#define debug(v) for(auto i:v) cout<<i<<" ";
#define tc int t; cin >> t; while(t--)

using namespace std;
string repeat(string s, int n) {
    string s1 = "";
    for (int i=0; i<n;i++)
        s1+=s;
    return s1;
}
string getString(char x) {
    string s(1, x);
    return s;
}

void optimizeIO(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int gcd(int a, int b){
    if (a == 0)  return b;
    return gcd(b % a, a);
}
void  solve(){
  optimizeIO();
  int n,k;
  cin>>n>>k;
  int a[n];
  rep(i,0,n) cin>>a[i];
  rep(i,k,n){
    if(a[i]>a[i-k]){
      cout<<"Yes\n";
    }
    else cout<<"No\n";
  }
}
int main(){
    optimizeIO();
    // tc
    { solve();
    }
}


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

#ifdef LOCAL
#include "../lib/dump.hpp"
#else
#define dump(...)
#define dumpv(...)
#endif

typedef long long ll;
typedef pair<int, int> P;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;

void solve()
{
  int N, K;
  cin >> N >> K;
  vector<ll> a(N);
  ll sum = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    sum += a[i];
  }
  // sort(a.begin(), a.end(), greater<ll>());
  vector<ll> x;
  ll num = sum;
  x.push_back(num);
  for (int i = 1; i * i <= num; i++) {
    if (num % i == 0) {
      x.push_back(i);
      if (i != 1 && i * i != num) {
        x.push_back(num / i);
      }
    }
  }
  sort(x.begin(), x.end(), greater<ll>());
  dump(N, K, x);
  ll ans = 0;
  for (int i = 0; i < x.size(); i++) {
    vector<ll> y;
    for (int j = 0; j < N; j++) {
      if (a[j] % x[i])
        y.push_back(a[j] % x[i]);
    }
    sort(y.begin(), y.end());
    dump(y);
    ll rsum = 0;
    for (int j = 0; j < y.size(); j++) {
      rsum += (x[i] - y[j]);
    }
    ll lsum = 0;
    for (int j = 0; j < y.size(); j++) {
      lsum += y[j];
      rsum -= (x[i] - y[j]);
      dump(j, lsum, rsum);
      if (lsum == rsum) {
          break;
      }
    }
    if (lsum <= K) {
      ans = x[i];
      break;
    }
  }
  cout << ans << endl;
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  // freopen("temp.1", "r", stdin);
  solve();
  return 0;
}

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

typedef long long ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
const int inf = 1e9;
const long long INF = 1e18;
int a;
string s;

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

	cin >> a >> s;

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

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

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

using Graph = vector<vector<int>>;

ll calc(ll a, ll b, ll p){//aのb乗をpで割った余り
  if(b == 0) return 1;

  else if(b%2 == 0){
    ll d = calc(a,b/2,p);
    return (d*d)%p;
  }
  else if(b%2 == 1){
    return (a * calc(a,b-1,p))%p;
  }
}

typedef pair<int,int> P;

bool is_prime(int n){//nが素数であるかどうか判定 iで割り切れると素数でない
    if(n == 1) return false;//1は例外
    for(int i = 2;i*i <= n;i++){
        if(n%i == 0) return false;
    }
    
    return true;
}
int factorial(int a){
  int res = 1;
  while(a){
    res *= a;
    a--;
  }
  return res;
}

int main(){
  ll H,W;
  cin >> H >> W;
  ll ans = 0;
  if(H == 1 || W == 1) cout << 1 << endl;
  else{
  if(W%2 == 0){
    ans = (W/2) * H;
  }
  else {
    if(H%2 == 1) ans = (H/2)*(W/2 + 1 + W/2) + W/2 + 1;
    else ans = (H/2) * (W/2 + 1 + W/2);
  }
  cout << ans << endl;
  }
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b;
    std::cin >> a >> b;
    if(a + b == 3){
        std::cout << 3 << std::endl;
    }
    else if(a + b == 5){
        std::cout << 1 << std::endl;
    }
    else{
        std::cout << 2 << std::endl;
    }
}


Measured memory_bytes: 256
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;


public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
		solutionB(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solutionA(String[] args) throws Exception{
		String s = nextString();
		pw.println(s.substring(0,3));

	}
	public static void solutionB(String[] args) throws Exception{
		long A = nextLong();
		long V = nextLong();
		long B = nextLong();
		long W = nextLong();
		long T = nextLong();

		long dist=Math.abs(A-B);
		long a = V-W;

		if(A==B||a*T >=dist) {
			pw.println("YES");
		}else {
			pw.println("NO");
		}
	}
	public static void solutionC(String[] args) throws Exception{
	}
	public static void solutionD(String[] args) throws Exception{
	}
	public static void solutionE(String[] args) throws Exception{
	}



	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

}



Measured memory_bytes: 25444
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;

public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        long a = 0;
        long b = 0;
        { 
            var ab = Console.ReadLine().Split().Select(int.Parse).ToArray();
            a = ab[0];
            b = ab[1];
        }
        for (int i = 1; i < n; i++)
        {
            var ab = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var newa = ab[0];
            var newb = ab[1];
            var mul = Max((a + newa - 1) / newa, (b + newb - 1) / newb);
            a = newa * mul;
            b = newb * mul;
        }
        Console.WriteLine(a + b);
    }
}


Measured memory_bytes: 13396
///HR_Bappy
//
///*******

#include<bits/stdc++.h>
#define pb push_back
#define mkp make_pair
#define maxx 1000000005
#define MOD 1000003
#define sf(n) scanf("%lld", &n);
#define sff(n,m) scanf("%lld %lld", &n, &m)
#define pf(n) printf("%lld\n", n)
#define pff(n,m) printf("%lld %lld\n", n, m)
#define mem(a) memset(a, 0, sizeof(a))
#define fr(i,n) for(ll i=0; i<n; i++)
#define my_sizeof(type) ((char *)(&type+1)-(char*)(&type))
#define pi 2*acos(0.0)
#define F first
#define S second
#define EPS 1e-9

using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    int a, b;
    while(cin >> a >> b){
        int c = a - b * 2;
        if(c < 0) cout << 0 << endl;
        else cout << c << endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<functional>
#include<fstream>
#include<utility>
#include<bitset>
#include<map>
#include<deque>
#include<cmath>
#include<random>
#include<string.h>
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define rep(N) for (int i = 0; i < N; ++i)
#define Rep(a, b) for (int i = a; i < b; ++i)
#define For(i, N) for (int i = 0; i < N; ++i)
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()
#define makei(N) int N; cin >> N;
#define makel(N) ll N; cin >> N;
#define makes(s) string s; cin >> s;
#define maked(d) double d; cin >> d;
#define makev(v, N) vi v(N); rep(N)cin >> v[i];
#define mod 1000000007
#define re return 0
#define cm(i) Y*i + Z*(i + 1)

using namespace std;
using ll = long long int;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vs = vector<string>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using msi = map<string, int>;

template<typename T>
void say(T s) {
	cout << s << "\n";
}

template<typename T>
void say(vector<T> s) {
	auto itr = s.begin();
	cout << *(itr++);
	while (itr != s.end()) {
		cout << " " << *(itr++);
	}
	cout << "\n";
}

void yn(bool b) {
	if (b)say("Yes");
	else say("No");
}

int main() {
	makei(N);
	makei(M);
	say((int)pow(2, M)*(100 * N + 1800 * M));
}

Measured memory_bytes: 256
/**
 * File              : C.cpp
 * Author            : JCHRYS <jchrys@me.com>
 * Date              : 26.01.2020
 * Last Modified Date: 26.01.2020
 * Last Modified By  : JCHRYS <jchrys@me.com>
 */

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    ll ans = 0;
    for (int i = 0; i < n - k; i++) {
        ans += a[i];
    }
    cout << ans;
    return 0;
}


Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
#define ld long double
#define mod 1000000007
#define endl "\n"
#define pb push_back
#define mp make_pair
int main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	ll n,a,b;
	cin>>n>>a>>b;
	if(b<n*a)
	{
		cout<<b;
	}
	else
	{
		cout<<n*a;
	}	
	return 0;
}

Measured memory_bytes: 256
#include<iostream>

using namespace std;

int main(){
  string str;
  bool hasA = false, hasB = false;

  cin >> str;

  for (int i = 0; i < (int)str.size(); i++){
    if (str[i] == 'A') {
      hasA = true;
    } else if (str[i] == 'B') {
      hasB = true;
    }
  }

  if (hasA && hasB) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  return 0;
}


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

int calc_year_days(int Y, int M, int D) {
  int count = 0;

  if (Y%3 == 0) {
    // ????????????????????\??° 
    count += (20 - D + 1);
    M++;
    
    count += (10 - M + 1)*20; 
  } else {
    // ????????????????????\??°????¨????
    if (M%2 == 1) { 
      count += (20 - D + 1);
    } else {
      count += (19 - D + 1);
    }
    M++;
    // ???????????\??°
    for (int m = M; m <= 10; m++) {
      if (m%2 == 1) {
	count += 20;
      } else {
	count += 19;
      }
    }
  }
    
  return count;
}

int solve(int Y, int M, int D) {
  int count = 0;

  count += calc_year_days(Y, M, D);
  Y++;
  for (int y = Y; y < 1000; y++) {
    if (y % 3 == 0) {
      count += (20*10);
    } else {
      count += (20*5 + 19*5);
    }
  }

  return count;
}

int main() {
  int n;
  cin >> n;
  for (int i=0; i<n; i++) {
    int y, m, d;
    cin >> y;
    cin >> m;
    cin >> d;

    printf("%d\n", solve(y, m, d));
  }
 
}

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

int main() {
	long long n,i,count=1;
	cin>>n;
	string s;
	cin>>s;
	for(i=0;i<s.length()-1;i++)
	{
	    if(s[i]!=s[i+1])
	    {
	        count++;
	    }
	}
	cout<<count;
	return 0;
}

Measured memory_bytes: 512
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

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


typedef struct CARD{
    int num;
    char var;
}CARD;

void BubbleSort(CARD array[], int first, int last){
    
    int i ,j, N;
    CARD tmp;
    
    N = last - first + 1;
    
    for(i=0; i < N; i++){
        for(j = N-1; j > i; j--) {
            if (array[j-1].num > array[j].num) {
                tmp = array[j];
                array[j] = array[j-1];
                array[j-1] = tmp;
            }
        }
    }
    return;
}

void SelectionSort(CARD array[], int first, int last, int* flg){
    
    int i ,j, k,N, mini;
    CARD tmp;
    
    N = last - first + 1;
    
    for(i=0; i < N; i++){
        mini = i;
        for(j=i; j < N; j++) {
            if (array[j].num < array[mini].num) {
                mini = j;
            }
        }
        k=i;
        tmp = array[k];
        for (k=i+1; k < mini; k++) {
            if (tmp.num == array[k].num) {
                *flg = 1;
                break;
            }
        }
        
        tmp = array[i];
        array[i] = array[mini];
        array[mini] = tmp;
    }
    
    return;
}

int main(){
    
    int i,n,flg;
    char input[2];
    flg = 0;
    
    //the number of cards
    scanf("%d",&n);
    
    CARD *cards1 = (CARD*)malloc(sizeof(CARD)*n);
    CARD *cards2 = (CARD*)malloc(sizeof(CARD)*n);
    
    for (i=0; i<n; i++) {
        scanf("%s", input);
        cards1[i].var = input[0];
        cards1[i].num = atoi(&(input[1]));
    }
    memcpy(cards2, cards1, sizeof(CARD) * n);
    
    
    BubbleSort(cards1, 0, n-1);
    for (i=0; i<n; i++) {
        printf("%c%d", cards1[i].var, cards1[i].num);
        if (i != n-1) {
            printf(" ");
        }
    }
    printf("\n");
    printf("Stable\n");
    
    SelectionSort(cards2, 0, n-1, &flg);
    for (i=0; i<n; i++) {
        printf("%c%d", cards2[i].var, cards2[i].num);
        if (i != n-1) {
            printf(" ");
        }
    }
    printf("\n");
    if (flg == 1) {
        printf("Not stable\n");
    }else{
        printf("Stable\n");
    }
    
    free(cards1);
    free(cards2);
    
    return 0;
}

Measured memory_bytes: 624
//Dragon_warrior7(IITK)
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//using namespace __gnu_pbds;
#define ll long long
#define pb push_back
#define nl cout << '\n'
#define sor(x) sort(x.begin(), x.end())
#define rev(v) reverse(v.begin(), v.end())
#define lb(v, temp) lower_bound(v.begin(), v.end(), temp)
#define ub(v, temp) upper_bound(v.begin(), v.end(), temp)
#define fi first
#define se second
#define llmax 1000000000000000000
#define pll pair<ll, ll> 
#define ull unsigned ll
#define vll vector<ll> 
#define rub cout << "\n------------------------------------\n"
#define deb(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) 
{
	cout << *it << " = " << a;
	nl;
	err(++it, args...);
}
//typedef  tree < int ,  null_type ,  greater<int> ,  rb_tree_tag ,  tree_order_statistics_node_update > oset;
void read(vector<ll> &v)
{
	for (int i = 0; i < v.size(); i++)
		cin >> v[i];
}
// const int mod=1e9+7;
// ll power(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
// ll modInverse(ll a){return power(a,mod-2);}
ll n,m,a,b,c,k,temp,x,y;
void solveforthiscase(const int & test)
{//deb(test);
ll a[3][3];
for(int i=0;i<3;i++)
{
    for(int j=0;j<3;j++)
    cin>>a[i][j];
}
cin>>n;
for(int i=0;i<n;i++)
{
    cin>>temp;
    for(int x=0;x<3;x++)
    {
        for(int j=0;j<3;j++)
        {
           if(a[x][j]==temp)
           a[x][j]=-1;
        }
    }
}
for(int i=0;i<3;i++)
{
    if(a[i][0]==a[i][1] && a[i][1]==a[i][2] && a[i][2]==-1)
    {
        cout<<"Yes\n";
        return ;
    }
}
for(int i=0;i<3;i++)
{
    if(a[0][i]==a[1][i] && a[1][i]==a[2][i] && a[2][i]==-1)
    {
        cout<<"Yes\n";
        return ;
    }
}
if(a[0][0]==-1 && a[1][1]==-1 && a[2][2]==-1)
{
    cout<<"Yes\n";
    return ;
}
if(a[0][2]==-1 && a[1][1]==-1 && a[2][0]==-1)
{
    cout<<"Yes\n";
    return ;
}
cout<<"No\n";







return ;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int test=1;
// 	cin>>test;
    for(int i=1;i<=test;i++)
    {
        solveforthiscase(i);
    }
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define  pb push_back
#define sort1(v) sort(v.begin(),v.end())
ll a[3002][3002];
void upd(int i,int j,int n)
{
    a[i+1][j+1]++;
    a[j][j+1]--;
    a[i+1][n+1]--;
    a[j][n+1]++;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    ll a[n];
    for(int i=0;i<n;i++)
        cin>>a[i];
    ll mod=1e9+7;
    ll sum1=0,sum2=0;
    for(int i=0;i<n;i++)
    {
        sum1+=a[i];
        sum2+=a[i]*a[i];
        sum1%=mod;
        sum2%=mod;
    }
    sum1=sum1*sum1;
    sum1%=mod;
    ll ans=(sum1-sum2+mod)%mod;
    ans=ans*(mod+1)/2;
    ans=ans%mod;
    cout<<ans<<"\n";

}








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

int main() {
	std::ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	long long ans = 1;
	vector<long long> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		if (a[i] == 0) {
			cout << "0";
			return 0;
		}
	}
	for (int i = 0; i < n; i++) {
		if (ans > ((long long)(1e18)/a[i])) {
			cout << "-1";
			return 0;
		} else {
			ans *= a[i];
		}
	}
	cout << ans;
}



Measured memory_bytes: 3992
A,B,C,D=int(input()),int(input()),int(input()),int(input())
if A<B:
    if C<D:
        print(int(A)+int(C))
    else:
        print(int(A)+int(D))
else:
    if C<D:
        print(int(B)+int(C))
    else:
        print(int(B)+int(D))

Measured memory_bytes: 3060
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.ArrayList;
import java.util.StringTokenizer;
class Main{
	public static void main(String[] args) {
		SC sc=new SC(System.in);
		int N=sc.nextInt();
		int[] arr=new int[N];
		int counter=0;
		/*
		 * 大きい数を後ろにやっていく
		 *
		 *
		 *
		 */
		ArrayList<Integer> ary=new ArrayList<Integer>();
		for(int i=0; i<N; i++) {
			ary.add(sc.nextInt());
		}
		boolean dekiru=true;

		for(int i=0; i<N; i++) {
			int basyo=0;
			int num=0;
			for(int j=0; j<ary.size(); j++) {
				if(j+1==ary.get(j)) {
					if(ary.get(j)>num) {
						basyo=j;
						num=ary.get(j);
					}
				}
			}
			if(num>0) {
				ary.remove(basyo);
				arr[N-1-counter]=num;
				counter++;
			}

		}
		if(ary.size()==0) {
			for(int i=0; i<N; i++) {
				pl(arr[i]);
			}
		}
		else {
			pl(-1);
		}
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
}

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

#define fr(i, a, b) for(int i = (a); i <= (b); i++)
#define rf(i, a, b) for(int i = (a); i >= (b); i--)
#define fe(x, y) for(auto& x : y)

#define fi first
#define se second
#define pb push_back
#define mp make_pair

#define pw(x) (1LL << (x))
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()

using namespace std;

using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename T>
using ve = vector<T>;

#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template<typename T>
using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define fbo find_by_order
#define ook order_of_key

mt19937_64 rng(chrono::system_clock::now().time_since_epoch().count());

template<typename T>
bool umn(T& a, T b) { return a > b ? a = b, 1 : 0; }
template<typename T>
bool umx(T& a, T b) { return a < b ? a = b, 1 : 0; }

int main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
#endif
    
    int n;
    cin >> n;

    ve<ve<int>> g(n);
    fr(i, 0, n - 2) {
        int a, b;
        cin >> a >> b;
        a--, b--;
        g[a].pb(b);
        g[b].pb(a);
    }

    ll ans = 0;
    fr(i, 1, n) {
        ans += 1LL * i * (n - i + 1);
    }

    fr(i, 0, n - 1) {
        fe(to, g[i]) {
            if(to < i) {
                ans -= 1LL * (to + 1) * (n - i);
            }
        }
    }

    cout << ans << "\n";


    return 0;
}

Measured memory_bytes: 15088
x, y, tx, ty = map(int, input().split())
tx, ty = tx-x, ty-y
s = ty*'U' + tx*'R' +ty*'D' + tx*'L'
s1 = 'L' + 'U'*(ty+1) + 'R'*(tx+1) + 'D' + 'R' +(ty+1)*'D' + 'L'*(tx+1) + 'U'
print(s+s1)

Measured memory_bytes: 3064
def main():

    from bisect import bisect_left as bl, bisect_right as br, insort
    import sys
    import heapq
    # from math import *
    from collections import defaultdict as dd, deque
    def data(): return sys.stdin.readline().strip()
    def mdata(): return map(int, data().split())
    out = sys.stdout.write
    # sys.setrecursionlimit(100000)

    n=int(data())
    A=list(mdata())
    dp=[[0]*n for i in range(n)]
    for i in range(n):
        dp[i][i]=A[i]
    for i in range(n):
        for j in range(i-1,-1,-1):
            dp[j][i]=max(A[j]-dp[j+1][i],A[i]-dp[j][i-1])
    print(dp[0][n-1])

if __name__ == '__main__':
    main()

Measured memory_bytes: 111836
#include<iostream>
#include<cstdlib>
#include<cstdio>
#include<string>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<math.h>
using namespace std;

int n, x;
int minv = 1000000;

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

    vector<int> m(n);
    for(int i=0;i<n;i++){
        cin >> m[i];
        x -= m[i];
        if(minv > m[i]) minv = m[i];
    }

    int res = n + x/minv;

    cout << res << endl;
}   

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

using namespace std;

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

  string Ns; cin>>Ns;
  int K; cin>>K;
  size_t dp[Ns.size()][11][K+1];
  memset(dp, 0, sizeof(size_t)*(Ns.size())*11*(K+1));
  auto ctoi = [](char c) {return c - '0';};
  dp[0][0][0] = 1;
  for (int i = 1; i < ctoi(Ns[0]); i++) {
    dp[0][i][1] = 1;
  }
  dp[0][10][1] = 1;
  for (size_t i = 1; i < Ns.size(); i++) {
    auto th = ctoi(Ns[i]);
    for (int z = 0; z <= K; z++) {
      for (int j = 0; j <= 9; j++) {
        dp[i][0][z] += dp[i-1][j][z];
        if (z < K) {
          for (int n = 1; n <= 9; n++) {
            dp[i][n][z+1] += dp[i-1][j][z];
          }
        }
      }
      // from edge
      if (th == 0) {
        dp[i][10][z] += dp[i-1][10][z];
      } else {
        dp[i][0][z] += dp[i-1][10][z];
        if (z < K) {
          for (int n = 1; n < th; n++) {
            dp[i][n][z+1] += dp[i-1][10][z];
          }
          dp[i][10][z+1] += dp[i-1][10][z];
        }
      }
    }
  }
  size_t ans = 0;
  for (int i = 0; i <= 10; i++) {
    ans += dp[Ns.size()-1][i][K];
  }
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 256
#include "bits/stdc++.h"
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair <ll, ll > pll;

bool comp(const pll &a, const pll &b) {
	return a.first < b.first;
}
std::vector<int> enum_div(int n)//nの約数を列挙
{
	std::vector<int> ret;
	for (int i = 1; i*i <= n; ++i)
	{
		if (n%i == 0)
		{
			ret.push_back(i);
			if (i != 1 && i*i != n)
			{
				ret.push_back(n / i);
			}
		}
	}
	return ret;
}


template<int N>
int factorial() {
	return factorial<N - 1>() * N;
}

template<>  /// 特殊化：factorial<N=”1”>だったら，値を返す
int factorial<1>() {
	return 1;
}
int main()
{
	priority_queue<int> q;
	string s = {};
	string s1 = {};
	ll h = 0, w = 0, k = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, ans = 0;
	//ll x[300005] = {};
	ll y[300005] = {};
	ll z[302][302] = {};
	cin >> a;
	ans = 1;
	a /= 2;
	c = 1;
	while (a!=0)
	{
		c *= 2;
		
		ans += c;
		a /= 2;
	}


	
	
	cout << ans << endl;



	//return 0;

	/*cout << c << endl;
	cout << b << endl;*/
	//cout << fixed << setprecision(10) <<tmp << endl;
	//cout<<factorial<10><<endl;
	return 0;
}
//2つの組の数をソートしたりするやつ
//vector<pair<ll, ll> > hoges(a);
//for (int i = 1; i <= a; i++)
//{
//	cin >> h;
//	hoges[i - 1] = make_pair(h, i);
//}
//sort(hoges.begin(), hoges.end(), comp);
//for (int i = 0; i < a; i++)
//{
//	cout << hoges[i].second << endl;
//}


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

int main(){

  int books;
  int cnt,res;

  while(1){
    cnt=0;
    cin >> res;
    if(res == 0) break;
    for(int i = 0; i < 9; i++){
      cin >> books;
      cnt+=books;
      //    if(i == 9) break;
    }
    
    books = res - cnt;
    cout << books << endl;
  }
  return 0;
}

Measured memory_bytes: 1160
#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll =int long long;
map <int ,int> mpa,mpb;

const int nmax= 8;
bool graph[nmax][nmax];

int DFS(int v, int N, bool visited[nmax]){
  bool all_visited=true;

  for(int i=0;i<N;i++){
    if(visited[i]==false){
      all_visited=false;
    }
  }

  if(all_visited){
    return 1;
  }

  int ret=0;
  for(int i=0;i<N;i++){
    if(graph[v][i]==false) continue;
    if(visited[i]) continue;

    visited[i]=true;
    ret+=DFS(i,N,visited);
    visited[i]=false;
  }
      return ret;
}



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

  for(int i=0;i<M;i++){
    int A,B;
    cin >> A>> B;
    graph[A-1][B-1]=graph[B-1][A-1]=true;
  }

  bool visited[nmax];
  for(int i=0;i<N;i++){
    visited[i]=false;
  }
  visited[0]=true;
  cout << DFS(0,N,visited) << endl;
  return 0;
}

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

using ll = long long;

constexpr int MOD = 1e9+7;
ll powof2(int r)
{
    ll a = 1;
    while (r--)
    {
        a = (a << 1) % MOD;
    }
    return a;
}


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

    int nop_count = 0;
    std::map<std::pair<ll,ll>,int> g;
    for (int i = 0; i < N; i++)
    {
        ll a, b;
        std::cin >> a >> b;

        if (a == 0 && b == 0)
        {
            ++nop_count;
            continue;
        }

        ll l;
        if (a == 0)
            l = std::abs(b);
        else if (b == 0)
            l = std::abs(a);
        else
            l = std::gcd(a, b);

        a /= l;
        b /= l;
        
        if (a < 0 || (a == 0 && b < 0))
        {
            a = -a;
            b = -b;
        }
        
        g[{a, b}]++;
    }

    ll ans = 1;
    for (auto p : g)
    {
        if (auto it = g.find({p.first.second, -p.first.first}); it != g.end() && p.first.second > 0)
        {
            ll mm = (powof2(p.second) + powof2(it->second) - 1) % MOD;
            ans = (ans * mm) % MOD;
        }
        else if (auto it = g.find({-p.first.second, p.first.first}); it != g.end())
        {
            // skip
        }
        else
        {
            ll mm = powof2(p.second);
            ans = (ans * mm) % MOD;
        }
    }
    ans = (ans + nop_count - 1 + MOD) % MOD;

    std::cout << ans << std::endl;
}


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

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

    if(S=="AAA" || S=="BBB") cout << "No" << endl;
    else cout << "Yes" << endl;

}

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

int main() {
  string s;
  cin >> s;
  int l = s.size();
  
  int ans = 0;
  REP(i, l) {
    if (((int)s[i] - '0' - i) % 2)
      ++ans;
  }
  
  cout << min(ans, l - ans) << endl;
  
  return 0;
}

Measured memory_bytes: 512
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <math.h>
#include <bitset>
#include <queue>
#include <set>
#include <iomanip>
#include <math.h>
#include <assert.h>
// #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr long long int INFLL = 1001001001001001LL;
constexpr long long int infll = 1001001001001001LL;
constexpr int INF = 1000000007;
constexpr int inf = 1000000007;
const int mod = 1000000007;

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

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

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

inline double nCr(const int n, int r)
{
    if (n == 0)
    {
        return 0;
    }
    if (r == 0)
    {
        return 1;
    }
    if (r == 1)
    {
        return n;
    }
    if (n == r)
    {
        return 1;
    }

    if (r > n / 2)
    {
        r = n / 2;
    }

    double result = 1;
    for (double i = 1; i <= r; i++)
    {
        result *= (n - i + 1) / i;
    }

    return (result);
}

template <typename T>
T seinomi(T a)
{
    if (a > 0)
    {
        return a;
    }
    else
    {
        return 0;
    }
}

template <typename T>
map<T, T> soinsuubunkai(T n) //連想配列[素因数f.first][個数f.second]
{
    map<T, T> ret;
    for (T i = 2; i * i <= n; i++)
    {
        while (n % i == 0)
        {
            ret[i]++;
            n /= i;
        }
    }
    if (n != 1)
        ret[n] = 1;
    return ret;
}

template <typename T>
T ketasuu(T num)
{
    return std::to_string(num).length();
}

int kaizyou(int k)
{
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}

template <class ForwardIt, class T>
void iota(ForwardIt first, ForwardIt last, T value)
{
    while (first != last)
    {
        *first++ = value;
        ++value;
    }
}

//nの階乗を計算
int factorial(int n)
{
    int answer = 1;
    while (n > 1)
    {
        answer *= n;
        n--;
    }
    return answer;
}
int comb(int n, int r)
{
    return factorial(n) / (factorial(r) * factorial(n - r));
}

long long modpow(long long a, long long n, long long mod)
{
    long long res = 1;
    while (n > 0)
    {
        if (n & 1)
            res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

//小数点以下10桁テンプレート（main関数内の最初に貼付け）
//std::cout << std::fixed << std::setprecision(10);

//----------------------------------------------------------------


int main(){
ll n;
cin>>n;
ll h;
cin>>h;
ll pre=h;
ll cnt=0;
ll ans=0;
for(int i=0;i<n-1;i++){
    cin>>h;
    if(pre>=h){
        cnt++;
        chmax(ans,cnt);
    }else{
        cnt=0;
    }
    pre=h;
}
cout<<ans<<endl;
}





Measured memory_bytes: 256
n = int(input())
l = list(map(int,input().split()))
l.sort()
l.reverse()
c = 0
for i in range(n-2):
    for k in range(i+1,n-1):
        if l[i] == l[k]:continue
        a = l[i] - l[k]
        for m in range(k+1,n):
            if (l[i] == l[m] or l[k] == l[m]):continue
            if a - l[m] < 0:
                c += 1
            else:
                break
print(c)

Measured memory_bytes: 9192
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin>>s;
    int ans=0;
    for(int i=1;i<s.size();i++)
    {
        if(s[i]!=s[i-1])
        {
            ans++;
        }
    }
    cout<<ans;
  	return 0;
}







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


int main(){
    int n, k, cnt = 0;
    cin >> n >> k;
    rep(i,n){
        int h;
        cin >> h;
        if(h >= k) cnt++;
    }
    cout << cnt << endl;
}


Measured memory_bytes: 256
package main

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

var sc *bufio.Scanner

const BufferSize = 1024

func nextInt() int {
	if !sc.Scan() {
		panic(nil)
	}
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func nextString() string {
	if !sc.Scan() {
		panic(nil)
	}
	return sc.Text()
}

var production bool

func debugf(format string, v ...interface{}) {
	if !production {
		fmt.Printf(format, v...)
	}
}

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func answer(reader io.Reader, writer io.Writer) {
	sc = bufio.NewScanner(reader)
	buf := make([]byte, BufferSize)
	sc.Buffer(buf, 1e+6)
	sc.Split(bufio.ScanWords)
	h := nextInt()
	w := nextInt()
	s := make([]string, h)

	for i := range s {
		s[i] = nextString()
	}

	hs := make([][]int, h)
	for i := 0; i < h; i++ {
		hs[i] = make([]int, w)
		blockStart := 0
		for j := 0; j < w; j++ {
			if string(s[i][j]) == "#" {
				for k := blockStart; k < j; k++ {
					hs[i][k] = j - blockStart
				}
				blockStart = j + 1
				hs[i][j] = 0
			}
		}
		for k := blockStart; k < w; k++ {
			hs[i][k] = w - blockStart
		}
	}
	debugf("hs: %v\n", hs)

	ws := make([][]int, h)
	for i := 0; i < h; i++ {
		ws[i] = make([]int, w)
	}
	for i := 0; i < w; i++ {
		blockStart := 0
		for j := 0; j < h; j++ {
			if string(s[j][i]) == "#" {
				for k := blockStart; k < j; k++ {
					ws[k][i] = j - blockStart
				}
				blockStart = j + 1
				ws[j][i] = 0
			}
		}
		for k := blockStart; k < h; k++ {
			ws[k][i] = h - blockStart
		}
	}
	debugf("ws: %v\n", ws)

	ans := 0
	for i := 0; i < h; i++ {
		for j := 0; j < w; j++ {
			ans = max(ans, hs[i][j]+ws[i][j]-1)
		}
	}

	_, _ = fmt.Fprintf(writer, "%d", ans)
}

func main() {
	production = true
	answer(os.Stdin, os.Stdout)
}


Measured memory_bytes: 71552
(defun leader ()
  (setf *gridmap* (loop :for n :from 1 :upto *var* collect(concatenate 'list (read-line)))))


(defun compresser ()
  (setf *gridmap* (remove (loop :for f :from 1 :upto *hol* collect(coerce "." 'character)) *gridmap* :test #'equal))
  (defparameter *nth-comp* 0)
  (defparameter *memo* nil)
  (loop :for a :from 0 :upto (1- *hol*) do(comp-loop a) do(setq *nth-comp* 0))
  (mapcar (lambda (n)
  (setf *gridmap* (mapcar (lambda (g)
                            (remove-if #'(lambda (q) t) g :start n :end (1+ n))) *gridmap*))) *memo*)
)


(defun comp-loop (n)
  (if (equal (nth n (nth *nth-comp* *gridmap*)) (coerce "." 'character))
      (if (= *nth-comp* (1- (length *gridmap*)))
          (setf *memo* (cons n *memo*))
          (progn (setq *nth-comp* (1+ *nth-comp*))
                 (comp-loop n)))
      nil))


(defun main ()
  (defparameter *gridmap* nil)
  (defparameter *var* (read))
  (defparameter *hol* (read))
  (leader)
  (compresser)
  ;                                      (mapcar (lambda (n) (format t "~A~%" (concatenate 'string n))) *gridmap*)
  *gridmap*
  )


(mapcar (lambda (n) (format t "~A~%" (concatenate 'string n))) (main))


Measured memory_bytes: 16228
fn main() {
    let (a, b, c): (usize, usize, usize) = (read::<usize>(), read::<usize>(), read::<usize>());
    if a < b && b < c {
        println!("Yes");
    } else {
        println!("No");
    }
}

// =========
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{HashMap, HashSet};
#[allow(unused_imports)]
use std::process::exit;

#[allow(dead_code)]
const MOD: usize = 1000000007;

fn read<T: std::str::FromStr>() -> T {
    use std::io::Read;
    let stdin = std::io::stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

// =========



Measured memory_bytes: 5020
x, y, z, k = list(map(int, input().split()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

d = []

for e1 in a:
  for e2 in b:
    d.append(e1+e2)

d.sort(reverse=True)
d = d[:k]
e = []

for e1 in d:
  for e2 in c:
    e.append(e1+e2)
    
e.sort(reverse=True)

for i in range(k):
  print(e[i])

Measured memory_bytes: 155448
#include<bits/stdc++.h>
using namespace std;
const int N=10005;
char ch[N];
bool flag[5];
int main()
{
	scanf("%s",ch+1);
	int len=strlen(ch+1);
	for(int i=1;i<=len;i++)
	{
		switch(ch[i])
		{
			case 'N':{
				flag[1]=1;
				break;
			}
			case 'S':{
				flag[2]=1;
				break;
			}
			case 'W':{
				flag[3]=1;
				break;
			}
			case 'E':{
				flag[4]=1;
				break;
			}
		}
	}
	if(flag[1]==flag[2]&&flag[3]==flag[4])
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}
	return 0;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<vector>
#include<functional>
#include<algorithm>
#include<stdlib.h>
#include<string>
#include<string.h>
#define _USE_MATH_DEFINES
#include<math.h>
#include<deque>
#include<set>
#include<map>
#include<iostream>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(auto i=a;i<b;i++)
#define all(_x) _x.begin(), _x.end()
#define r_sort(_x) sort(_x.begin(), _x.end(), std::greater<int>())
#define vec_cnt(_a, _n) (upper_bound(all(_a), _n) - lower_bound(all(_a), _n))
ll gcd(ll a, ll b) { return a % b == 0 ? b : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int main() {
	int n, a;
	cin >> n;
	vector<int> A, B;
	vector<pair<int, int>> n1, n2;
	rep(i, 0, n)cin >> a, (i % 2 ? A : B).push_back(a);
	n1.push_back(make_pair(0, 0)), n2.push_back(make_pair(0, 0));
	sort(all(A));
	sort(all(B));
	auto it = A.begin();
	while (it != A.end()) {
		n1.push_back(make_pair(vec_cnt(A, *it), *it));
		it = it + n1.back().first;
	}
	it = B.begin();
	while (it != B.end()) {
		n2.push_back(make_pair(vec_cnt(B, *it), *it));
		it = it + n2.back().first;
	}
	sort(all(n1), std::greater<pair<int, int>>());
	sort(all(n2), std::greater<pair<int, int>>());
	if (n1[0].second != n2[0].second) {
		printf("%d\n", A.size() - n1[0].first + B.size() - n2[0].first);
	}
	else {
		printf("%d\n", min(A.size() - n1[0].first + B.size() - n2[1].first, A.size() - n1[1].first + B.size() - n2[0].first));
	}
	return 0;
}

Measured memory_bytes: 1784
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int n = sc.nextInt();
		int[] attack = new int[n];
		int[] cost = new int[n];
		for (int i = 0; i < n; i++) {
			attack[i] = sc.nextInt();
			cost[i] = sc.nextInt();
		}
		sc.close();
		int[] dp = new int[100000010];
		Arrays.fill(dp, 0);
		for (int i = 0; i < dp.length; i++) {
			for (int j = 0; j < n; j++) {
				if (cost[j] <= i) {
					if (attack[j] + dp[i - cost[j]] > dp[i]) {
						dp[i] = attack[j] + dp[i - cost[j]];
					}
				}
			}
			if (dp[i] >= h) {
				System.out.println(i);
				break;
			}
		}
	}

	public static int arrayMax(int[] array) {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	}

	public static int[] arrayInt(Scanner sc, int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static Integer[] arrayInteger(Scanner sc, int n) {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static long[] arrayLong(Scanner sc, int n) {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	}

	public static double[] arrayDouble(Scanner sc, int n) {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	}
}

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

typedef long long ll;
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, m; cin >> n >> m;
    vector<int> a[n];
    for (int i = 0; i < n; i++) a[i] = vector<int>(m, 0);
    for (int i = 0; i < n; i++) for (int k = 0; k < m; k++) cin >> a[i][k];
    int ans = -1;
    for (int i = 0; i < m-1; i++) {
        vector<int> tops(n);
        for (int k = 0; k < n; k++) {
            tops[k] = a[k][0];
        }
        sort(tops.begin(), tops.end());
        int cur = 1;
        int maxCon = 0;
        vector<int> maxVals;
        for (int k = 1; k < n; k++) {
            if (k == n-1) {
                if (tops[k] == tops[k-1]) {
                    cur++;
                    if (maxCon < cur) {
                        maxCon = cur;
                        maxVals.clear();
                        maxVals.push_back(tops[k]);
                    } else if (maxCon == cur) {
                        maxVals.push_back(tops[k]);
                    }
                } else {
                    if (maxCon < cur) {
                        maxCon = cur;
                        maxVals.clear();
                        maxVals.push_back(tops[k-1]);
                    } else if (maxCon == cur) {
                        maxVals.push_back(tops[k-1]);
                        if (maxCon == 1) maxVals.push_back(tops[k]);
                    }
                }
            }
            if (tops[k] == tops[k-1]) {
                cur++;
            } else {
                if (maxCon < cur) {
                    maxCon = cur;
                    maxVals.clear();
                    maxVals.push_back(tops[k-1]);
                } else if (maxCon == cur) {
                    maxVals.push_back(tops[k-1]);
                }
                cur = 1;
            }
        }
        for (int k = 0; k < n; k++) {
            for (auto &mv : maxVals) {
                auto index = find(a[k].begin(), a[k].end(), mv);
                if (index != a[k].end()) {
                    a[k].erase(index);
                }
            }
        }
        if (ans < 0) ans = maxCon;
        else ans = min(ans, maxCon);
    }
    if (ans < 0) cout << n << endl;
    else cout << ans << endl;
    return 0;
}


Measured memory_bytes: 640