akhauriyash/Code-Regression huggingface dataset:
void solve();

int main() {
	solve();
	return 0;
}

//////////////////////////////////////////////////
//////////////////////////////////////////////////
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <functional>
#include <map>
#include <string>
#include <boost/multiprecision/cpp_int.hpp>
#include <limits.h>
#include <iomanip>
#include <stack>

using namespace std;
using namespace boost::multiprecision;

int N, M;
int arr[100002];

void solve() {
	cin >> N >> M;
	for (int n = 0; n < N+2; n++)arr[n] = 0;
	for (int m = 0; m < M; m++) {
		int l, r;
		cin >> l >> r;
		arr[l]++;
		arr[r + 1]--;
	}
	for (int i = 2; i <= N; i++)arr[i] += arr[i - 1];
	int ans = 0;
	for (int i = 1; i <= N; i++) {
		if (arr[i] == M)ans++;
	}
	cout << ans << endl;
	return;
}


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

int N, M;
int A[100005], B[100005];

vector<int> Adj[100005];

int check[100005];

vector<int> V1;

void DFS(int K) {
	//cout << "K= " << K << endl;
	V1.push_back(K); check[K]=1;

	for (int h = 0; h < (int)Adj[K].size(); h++) {
		int W = Adj[K][h];
		if (check[W] == 0) { DFS(W); break; }
	}

}

int main(void) {

	cin >> N >> M;

	for (int i = 1; i <= M; i++) {
		cin >> A[i] >> B[i]; 
		Adj[A[i]].push_back(B[i]);
		Adj[B[i]].push_back(A[i]);
	}

	vector<int> ans;

	check[1] = 1;
	int count = 0;

	//=====================
	int W = Adj[1][0];
	DFS(W);
	int J = V1.size();
	for (int j = J - 1; j >= 0; j--) {
		ans.push_back(V1[j]);
	}
	//==================

	ans.push_back(1);

	//=============
	for (int u = 1; u < (int)Adj[1].size(); u++) {
		V1.clear();
		int W = Adj[1][u];
		if (check[W] == 0) {
			DFS(W);

			for (int j = 0; j < (int)V1.size(); j++) {
				ans.push_back(V1[j]);
			}
			break;
		}
		
	}


	cout << ans.size() << endl;
	for (int i = 0; i < (int)ans.size(); i++) {
		if (i != 0) { cout << " "; }
		cout << ans[i];
	}cout << endl;
	
	//system("pause");
	return 0;
}

Measured memory_bytes: 11128
#include <stdio.h>
#include <string.h>

int main(void)
{
	int i;
	int c[26]={};
	char str[1200];
	
	
	while(gets(str)) {
	for(i = 0; i < strlen(str); i++) {
		if(isupper(str[i])) str[i] = tolower(str[i]);
		switch(str[i]) {
			case 'a': c[0]++; break;
			case 'b': c[1]++; break;
			case 'c': c[2]++; break;
			case 'd': c[3]++; break;
			case 'e': c[4]++; break;
			case 'f': c[5]++; break;
			case 'g': c[6]++; break;
			case 'h': c[7]++; break;
			case 'i': c[8]++; break;
			case 'j': c[9]++; break;
			case 'k': c[10]++; break;
			case 'l': c[11]++; break;
			case 'm': c[12]++; break;
			case 'n': c[13]++; break;
			case 'o': c[14]++; break;
			case 'p': c[15]++; break;
			case 'q': c[16]++; break;
			case 'r': c[17]++; break;
			case 's': c[18]++; break;
			case 't': c[19]++; break;
			case 'u': c[20]++; break;
			case 'v': c[21]++; break;
			case 'w': c[22]++; break;
			case 'x': c[23]++; break;
			case 'y': c[24]++; break;
			case 'z': c[25]++; break;
		}
	}
	}
	for(i = 0; i < 26; i++) {
		printf("%c : %d\n", (char)(97+i), c[i]);
	}
	return 0;
}


Measured memory_bytes: 524
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#define mkp(a, b) make_pair(a, b)
#define pb(t) push_back(t)
#define ft first
#define sc second
#define pt(num) cout << num << "\n"
#define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD
#define max(a, b) ((a)>(b) ? (a):(b))
#define min(a, b) ((a)<(b) ? (a):(b))
#define chmax(a, b) (a<b ? a=b : 0)
#define chmin(a, b) (a>b ? a=b : 0)
#define INF 1000000000000000000
#define MOD 1000000007LL
#define MAX 101010
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef map<ll, ll> Map;



int main(void) {
    ll A, B, Q;
    cin >> A >> B >> Q;
    ll i;
    ll s[MAX]={}, t[MAX]={};
    s[A+1]=INF; t[B+1]=INF;
    
    for(i=1; i<=A; i++) {
        cin >> s[i];
    }
    for(i=1; i<=B; i++) {
        cin >> t[i];
    }
    
    
    
    for(i=0; i<Q; i++) {
        ll x;
        cin >> x;
        auto is=lower_bound(s, s+A+2, x);
        auto it=lower_bound(t, t+B+2, x);
        
        ll ls=(*(is-1)!=0) ? abs(x-*(is-1)) : INF;
        ll lt=(*(it-1)!=0) ? abs(x-*(it-1)) : INF;
        ll rs=abs(x-*(is));
        ll rt=abs(x-*(it));
        ll ans=INF;
        
        //pt(ls << " " << lt << " " << rs << " " << rt);
        
        chmin(ans, max(ls, lt));
        chmin(ans, max(rs, rt));
        chmin(ans, (ls+rt)*2-max(ls, rt));
        chmin(ans, (lt+rs)*2-max(lt, rs));
        pt(ans);
    }
    
    
}








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

int main(int argc, char const *argv[])
{
	int n,len = 0;
	cin >> n;
	vector<int> L(n);
	for (int i = 0; i < n; ++i)
	{
		cin >> L.at(i);
	}
	sort(L.begin(), L.end());
	reverse(L.begin(), L.end());
	for (int i = 1; i < n; ++i)	len += L.at(i);
	if(L.at(0) < len)	cout << "Yes" << endl;
	else cout << "No" << endl;
}


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

typedef pair<double,string> P; 

int main(){
  string l;
  int n,p,a,b,c,d,e,f,s,m;
  P seed[100];

  while(cin >> n, n){
    for(int i=0;i<n;i++){
      cin >> l >> p >> a >> b >> c >> d >> e >> f >> s >> m;

      int time = a+b+c + m*(d+e);
      int income = f*m*s - p;
      double ef = -1.0*income/time;
      seed[i] = P(ef,l);
    }

    sort(seed,seed+n);
    for(int i=0;i<n;i++)cout << seed[i].second << endl;
    cout << "#\n";
  }
}
      

Measured memory_bytes: 0
#include<bits/stdc++.h>
///...................................*****.................................................///
///        Author :  MD. Rakibul Islam ( mmdrakibul2912@gmail.com )                         ///
///                  Department of Computer Science                                         ///
///                  & Engineering,                                                         ///
///                  Comilla University , Bangladesh.                                       ///
///...................................*****.................................................///
using namespace std;
int gcd_euclid(int u, int v)
{
    int r;
    while (0 != v)
    {
        r = u % v;
        u = v;
        v = r;
    }
    return u;
}

int main()
{
    int N;
    cin >> N;
    vector<int> A(N);
    for (int i = 0; i < N; i++)
    {
        cin >> A[i];
    }
    int ans = 0;
    vector<int> L(N), R(N);
    L[0] = 0;
    for (int i = 1; i < N; i++)
    {
        L[i] = gcd_euclid(L[i - 1], A[i - 1]);
    }
    R[N - 1] = 0;
    for (int i = N - 2; i >= 0; i--)
    {
        R[i] = gcd_euclid(R[i + 1], A[i + 1]);
    }
    for (int i = 0; i < N; i++)
    {
        ans =max(gcd_euclid(L[i], R[i]), ans);
    }
    cout << ans << std::endl;
    return 0;
}


Measured memory_bytes: 1408
#include <stdio.h>
#define N 101

int main(){

  int i,j,k,m,n;
  int A[N];

  scanf("%d",&n);

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

  for(k=0;k<n;k++){
	  printf("%d",A[k]);
	  if(k==n-1){
	    printf("\n");
	  }else{ printf(" ");
	  }
  }

  for(i=1;i<n;i++){
    m=A[i];
    j=i-1;
    while(j>=0 && m<A[j]){
      A[j+1]=A[j];
      j--;
    }
    A[j+1]=m;
	
    for(k=0;k<n;k++){
	  printf("%d",A[k]);
	  if(k==n-1){
	    printf("\n");
	  }else{ printf(" ");
	  }
    }
  }
  return 0;
}

Measured memory_bytes: 604
n=int(input())
Edges=[]
for i in range(n-1):
  a,b,c=map(int,input().split())
  Edges.append([a,b,c])
q,k=map(int,input().split())
def BFS(K,edges,N):
  roots=[[] for i in range(n)]
  for a,b,c in edges:
    roots[a-1]+=[(b-1,c)]
    roots[b-1]+=[(a-1,c)]
  dist=[-1]*n
  stack=[]
  stack.append(K)
  dist[K]=0
  while stack:
    label=stack.pop(-1)
    for i,c in roots[label]:
      if dist[i]==-1:
        dist[i]=dist[label]+c
        stack+=[i]
  return dist
D=BFS(k-1,Edges,n)
for i in range(q):
  x,y=map(int,input().split())
  print(D[x-1]+D[y-1])


Measured memory_bytes: 58400
import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.math.BigInteger;
    import java.util.StringTokenizer;

public class Main {
  private static class FastScanner {
    private BufferedReader reader = null;
    private StringTokenizer tokenizer = null;

    public FastScanner(InputStream in) {
      reader = new BufferedReader(new InputStreamReader(in));
      tokenizer = null;
    }

    public String next() {
      if (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          tokenizer = new StringTokenizer(reader.readLine());
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      return tokenizer.nextToken();
    }

    public String nextLine() {
      if (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          return reader.readLine();
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }

      return tokenizer.nextToken("\n");
    }

    public long nextLong() {
      return Long.parseLong(next());
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }

    public double nextDouble() {
      return Double.parseDouble(next());
    }

    public int[] nextIntArray(int n) {
      int[] a = new int[n];
      for (int i = 0; i < n; i++)
        a[i] = nextInt();
      return a;
    }

    public long[] nextLongArray(int n) {
      long[] a = new long[n];
      for (int i = 0; i < n; i++)
        a[i] = nextLong();
      return a;
    }
  }

  public static void main(String[] args) {
    FastScanner sc = new FastScanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long d = c - a - b;
    if (d > 0 && 4 * a * b < d * d) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}

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

int main() {
  string str;
  cin >> str;
  string A1,B1,C1,D1,E1;
  A1 = "hi";
  B1 = "hihi";
  C1 = "hihihi";
  D1 = "hihihihi";
  E1 = "hihihihihi";
  
  if (str == A1) {
    cout << "Yes" <<endl;
  }
  else if (str == B1) {
    cout << "Yes" <<endl;
  }
  else if (str == C1) {
    cout << "Yes" <<endl;
  }
  else if(str == D1) {
    cout << "Yes" <<endl;
  }
  else if(str == E1) {
    cout << "Yes" <<endl;
  }
  else  {
    cout << "No" <<endl;
  }
  
}


Measured memory_bytes: 256
#include <iostream>
#include <cfenv>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>

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

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

    string s;
    cin >> s;

    int count = 0;

    for (int i = 0; i<n; i++){
        if (s.find("ABC") < n) {
            s = s.substr(s.find("ABC")+3);
            count++;
        }else{
            break;
        }
    }

    cout << count << endl;
}

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

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = int.Parse(Console.ReadLine());
            List<string> keihin = new List<string>();

            for(int i = 0; i < count; i++)
            {
                keihin.Add(Console.ReadLine());
            }

            Dictionary<string, int> dic = new Dictionary<string, int>();

            foreach (var item in keihin)
            {
                if (dic.ContainsKey(item) == true)
                {
                    dic[item] = dic[item] + 1;
                }
                else
                {
                    dic.Add(item, 1);
                }
            }



            Console.WriteLine(dic.Count());

        }
    }
}


Measured memory_bytes: 51884
from heapq import nsmallest
def main():
    S = input()
    K = int(input())
    N = len(S)
    A = []
    for l in range(N):
        for r in range(l+1, min(N+1, l+K+1)):
            A.append(S[l:r])
    print(nsmallest(K, list(set(A)))[-1])

main()


Measured memory_bytes: 5192
const main = (input) => {
  const [, n] = input.trim().split('\n')
  const LIMIT = BigInt(10 ** 18)
  const nums = n.trim().split(' ').map(v => parseInt(v, 10)).sort((a, b) => a - b)

  if (nums[0] === 0) return console.log(0)

  let ans = BigInt(1)
  for (let v of nums) {
    ans = ans * BigInt(v)
    if (ans > LIMIT) return console.log(-1)
  }

  ans > LIMIT ? console.log(-1) : console.log(ans.toString())
}

process.env.MYTEST ? test() : main(require('fs').readFileSync('/dev/stdin', 'utf8'))

Measured memory_bytes: 59840
fun main() {
    val n = nextInt()
    val x = next().map { (it - 48).toInt() }.toIntArray()
    val popcount = x.filter { it == 1 }.size
    val popcountM = popcount.minus(1).coerceAtLeast(1)
    val popcountP = popcount.plus(1)
    val less = remInt(x, popcount - 1)
    val greater = remInt(x, popcount + 1)
    val lessRems = sizedArray(n, 1.rem(popcountM))
    val greaterRems = sizedArray(n, 1.rem(popcountP))
    (n.minus(2) downTo 0).forEach { index ->
        lessRems[index] = lessRems[index + 1].times(2).rem(popcountM)
        greaterRems[index] = greaterRems[index + 1].times(2).rem(popcountP)
    }

    (0 until n).forEach { index ->
        var count = 1
        var x2 = when {
            x[index] == 0 -> {
                greater.plus(greaterRems[index]).rem(popcountP)
            }
            popcount == 1 -> {
                println(0)
                return@forEach
            }
            else -> {
                less.minus(lessRems[index]).plus(popcountM).rem(popcountM)
            }
        }
        while (x2 > 0) {
            val pc = Integer.toBinaryString(x2).count { it == '1' }
            x2 %= pc
            count += 1
        }
        println(count)
    }
}

private fun remInt(values: IntArray, mod: Int): Int {
    if (mod == 0) return 0
    var operand = 0
    values.forEach { value ->
        operand = operand.shl(1).plus(value).rem(mod)
    }
    return operand
}

// # Utils
// ## Input
fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun nextList() = next().split(" ")
fun nextIntList() = next().split(" ").map(String::toInt)
fun nextLongList() = next().split(" ").map(String::toLong)
fun nextDoubleList() = next().split(" ").map(String::toDouble)

// ## Array
inline fun <reified T> sizedArray(size: Int, default: T) = Array(size) { default }

// ## mod^-1
//    [NOTE] CANNOT use this for 0, mod, 2mod, 3mod ...(return wrong value)
fun modinv(num: Long, mod: Long): Long {
    var a = num
    var b = mod
    var u = 1L
    var v = 0L
    while (b > 0) {
        val t = a.div(b)
        a -= t * b
        a = b.also { b = a } // swap a and b
        u -= t * v
        u = v.also { v = u } // swap u and v
    }
    u %= mod
    if (u < 0) u += mod
    return u
}

Measured memory_bytes: 80796
package main

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

type contest struct {
	in  io.Reader
	out io.Writer
}

func (con *contest) Scan(a ...interface{}) (int, error) {
	return fmt.Fscan(con.in, a...)
}
func (con *contest) Scanln(a ...interface{}) (int, error) {
	return fmt.Fscanln(con.in, a...)
}
func (con *contest) Scanf(f string, a ...interface{}) (int, error) {
	return fmt.Fscanf(con.in, f, a...)
}
func (con *contest) Print(a ...interface{}) (int, error) {
	return fmt.Fprint(con.out, a...)
}
func (con *contest) Println(a ...interface{}) (int, error) {
	return fmt.Fprintln(con.out, a...)
}
func (con *contest) Printf(f string, a ...interface{}) (int, error) {
	return fmt.Fprintf(con.out, f, a...)
}
func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	con := &contest{in: in, out: out}
	con.main()
}

func (con *contest) main() error {
	var h, w int
	con.Scan(&h, &w)
	s := make([]string, h)
	for i := 0; i < h; i++ {
		con.Scan(&s[i])
	}
	for i := 0; i < w+2; i++ {
		con.Print("#")
	}
	con.Println()
	for i := 0; i < h; i++ {
		con.Printf("#%s#\n", s[i])
	}
	for i := 0; i < w+2; i++ {
		con.Print("#")
	}
	con.Println()
	return nil
}


Measured memory_bytes: 640
#include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
#include <vector>
#include <time.h>
#include <string>
#include <stack>
#include <set>
#include <map>
#include <iostream>
#include <algorithm>
using namespace std;
#define MP make_pair
#define PB push_back
typedef long long LL;
typedef pair<int, int> Pii;
const int inf = 0x3f3f3f3f;
const LL INF = (1uLL << 63) - 1;
const LL mod = 1000000007;
const int N = 150 + 5;
const double Pi = acos(-1.0);
const int maxn = 1e5 + 5;
int main() {
#ifdef local
    freopen("in", "r", stdin);
    //  freopen("w","w",stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    LL n,m;
    cin>>n>>m;
    LL l = 0, r = m + 1;
    while(l + 1 < r){
        LL mid = (l + r) / 2;
        LL cut = 0;
        if(n < mid){
            cut = mid - n;
        }
        if(m - cut * 2 >= mid * 2){
            l = mid;
        }
        else {
            r = mid;
        }
    }
    cout<<l<<endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
#define all(x) (x).begin(), (x).end()
#define fsp(x) fixed << setprecision(x)
#define xout cerr
const ll inf = LLONG_MAX;
const long double pi = acos(-1);
void Yes() {cout << "Yes" << endl;}
void No() {cout << "No" << endl;}
void YES() {cout << "YES" << endl;}
void NO() {cout << "NO" << endl;}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	//const ll p = 1e9 + 7;
	//const ll p = 998244353;

	ll n;
	cin >> n;
	vll a(n);
	for (ll i = 0; i < n; i++) cin >> a[i];

	ll ans = 0, rem = 0;
	for (ll i = 0; i < n; i++) {
		ans += (a[i] + rem) / 2;
		if (a[i]) rem = (a[i] + rem) % 2;
		else rem = 0;
	}
	cout << ans << endl;
}


Measured memory_bytes: 1024
def chmin(a, b) a < b ? a : b end

D, G = gets.strip.split.map(&:to_i)

counts = []
points = []
D.times { |i| counts[i], points[i] = gets.strip.split.map(&:to_i) }

res = 10 ** 6
(1<<D).times do |mask|
  sum = 0
  count = 0
  D.times do |i|
    unless (mask & (1<<i)).zero?
      sum += (counts[i] * (i + 1) * 100) + points[i]
      count += counts[i]
    end
  end

  if sum < G
    (D - 1).downto(0) do |i|
      next unless (mask & (1<<i)).zero?
      (0...counts[i]).each do
        break if sum >= G
        sum += (i + 1) * 100
        count += 1
      end
    end
  end
  res = chmin(count, res)
end

puts res


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

using namespace std;

// #typedef ll long long;

int main()
{
    string s, t;
    cin >> s;
    cin >> t;
    const char* cs = s.c_str();
    const char* ct = t.c_str();
    char s_o = cs[0];
    char t_o = ct[0];
    int cnt = 0;
    for(int i = 1; s_o != '\0'; i++){
        if(s_o != t_o){
            cnt++;
        }
        s_o = cs[i];
        t_o = ct[i];
    }

    cout << cnt << endl;
    return 0;
}

Measured memory_bytes: 3836
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
using Graph = vector<vector<int> >;
using GraphC = vector<vector<char> >;
const int INF = 100000000;
typedef pair<int, int> P;

int N, x = 0,tmp=0;
string S;

int main() {
	cin >> N >> S;
	rep(i, N) {
		if (S.at(i) == 'I') tmp++;
		if (S.at(i) == 'D')tmp--;
		x = max(x, tmp);
	}
	cout << x << endl;
}

Measured memory_bytes: 3576
#include <iostream>

using namespace std;

int main() {
    int n;
    int A[210];
    cin >> n;

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

    int res = 0;
    while (true) {
        bool is_odd = false;
        for (int i = 0; i < n; ++i) {
            if (A[i] %2 != 0) is_odd = true;
        }
        if (is_odd) break;

        for (int i = 0; i < n; ++i) {
            A[i] /= 2;
        }

        ++res;
    }
    cout << res << endl;

    return 0;
}


Measured memory_bytes: 256
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input().rstrip()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
# mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file = 1




    
def solve():

    
    # for _ in range(ii()):

        n,x,t=mi()
        print(ceil(n/x)*t)













        
if __name__ =="__main__":

    if(file):

        if path.exists('input.txt'):
            sys.stdin=open('input.txt', 'r')
            sys.stdout=open('output.txt','w')
        else:
            input=sys.stdin.readline
    solve()


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

int main(void){
    char c;
    cin >> c;
    string s = "aiueo";
    bool ok = false;
    for(int i=0;i<5;i++) if(c==s[i]) ok = true;
    if(ok) cout << "vowel" << endl;
    else cout << "consonant" << endl; 

}

Measured memory_bytes: 256
<?php
fscanf(STDIN, "%d %d", $a, $b);
$loop = 1;
$multi = 1;
while($loop === 1) {
    if(($a * $multi) % $b === 0) {
    $loop = 0;
    break;
    } else {
        $multi++;
    }
}
echo $multi * $a;

Measured memory_bytes: 4604
#include<bits/stdc++.h>
using namespace std;int i,j,N,M,C[1000],K[1000],T[1000],X[2];
main(){cin>>N>>M;
for(i=0;i<N;i++){cin>>C[i];}
for(i=0;i<M;i++){cin>>K[i];
for(j=0;j<N;j++){if(C[j]<=K[i]){T[j] += 1;break;}}}X[0]=0;
for(i=0;i<N;i++){if(T[i]>X[0]){X[0]=T[i];X[1]=i+1;}}cout<<X[1]<<endl;}

Measured memory_bytes: 1172
import java.util.*;

public class Main {

    static long mod = 1000000007;

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        init(500001);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = m - n;

        long res = perm(m, n) * perm(m, n) % mod;
        for(int i=1; i<=n; i++) {
            long a = conv(n, i) * perm(m, i);
            a %= mod;
            a *= perm(m-i, n-i);
            a %= mod;
            a *= perm(m-i, n-i);
            a %= mod;
            if(i % 2 == 1) {
                res += mod - a;
            } else {
                res += a;
            }
            res %= mod;
        }


        System.out.println(res);
    }



    static long[] fac;
    static long[] finv;
    static long[] inv;
    static void init(int max) {
        fac = new long[max];
        finv = new long[max];
        inv = new long[max];
        fac[0] = fac[1] = 1;
        finv[0] = finv[1] = 1;
        inv[1] = 1;
        for(int i=2; i<max; i++) {
            fac[i] = fac[i-1] * i % mod;
            inv[i] = mod - inv[(int)mod%i] * (mod / i) % mod;
            finv[i] = finv[i-1] * inv[i] % mod;
        }
    }
    static long conv(int n, int k) {
        if(n<k || n<0 || k<0) return 0;
        return perm(n, k) * finv[k] % mod;
    }
    static long perm(int n, int k) {
        if(n<k || n<0 || k<0) return 0;
        return fac[n] * finv[n-k] % mod;
    }

}

Measured memory_bytes: 47996
#include <bits/stdc++.h>
using namespace std;
int N,M,R,ans;
const int RMAX=10;
const int INF=1000000010;
const int NMAX=210;
int r[RMAX];
int dis[NMAX][NMAX];
vector<bool> flag;

void init(){
  cin>>N>>M>>R;
  for(int i=0;i<R;i++){
    cin>>r[i]; r[i]--;
  }
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      dis[i][j]=INF;
    }
  }
  for(int i=0;i<M;i++){
    int x,y,z; cin>>x>>y>>z;
    x--; y--;
    dis[x][y]=z;
    dis[y][x]=z;
  }
  flag.resize(R,true);
  return ;
}

void dfs(int count,int now,int d){
  if(count==R){
    if(ans>d) ans=d;
    return;
  }
  for(int i=0;i<R;i++){
    if(!flag[i]) continue;
    flag[i]=false;
    if(count==-1) dfs(1,i,0);
    else dfs(count+1,i,d+dis[r[now]][r[i]]);
    flag[i]=true;
  }
  return;
}

int main(){
  init();
  vector<bool> flag(R,true);
  ans=INF;
  for(int k=0;k<N;k++){
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        dis[i][j]=min(dis[i][j],dis[i][k]+dis[k][j]);
      }
    }
  }
  dfs(-1,0,0);
  cout<<ans<<endl;
}

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

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

  vector<int> h(N);
  rep(i, N) {
    cin >> h[i];
  }

  vector<int> dp(N);
  dp[1] = abs(h[1] - h[0]);

  rep(i, N - 2) {
    vector<int> cost(2);
    cost[0] = abs(h[i + 2] - h[i + 1]);
    cost[1] = abs(h[i + 2] - h[i]);
    dp[i + 2] = min(dp[i + 1] + cost[0], dp[i] + cost[1]);
  }

  cout << dp[N - 1] << endl;
}


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

ll x, powA, powB, ansA, ansB;
bool found = false;

int main() {
  cin >> x;
  for (ll a = 1; a < 120; a++) {
    powA = pow(a,5);
    for (ll b = a; true; b--) {
      powB = pow(b, 5);
      if (powA - powB == x) {
        ansA = a;
        ansB = b;
        found = true;
        break;
      }else if (b < 0 and powA - powB > x) {
        break;
      }
    }
    if (found) break;
  }
  cout << ansA << " " << ansB << endl;
  return 0;
}


Measured memory_bytes: 4096
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define repR(i, n) for(int i = n; i >= 0; ++i)
#define FDS(i, n) for(int i = 0; i < n; ++i)
#define FDSR(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 VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define itn int
#define ednl endl
using namespace std;
typedef long long ll;
int main(){
	int a,b;
	cin>>a>>b;
	if(a%3==0||b%3==0||(a+b)%3==0){
		cout<<"Possible"<<endl;
	}
	else{
		cout<<"Impossible"<<endl;
	}
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
constexpr ll mod=1e9+7;

int main()
{
  string s;
  cin>>s;
  ll ans=0;
  for (int i = 0; i < (1<<s.size()-1); ++i)
  {
    vector<int> split;
    for (int j = 0; j < s.size()-1; ++j)
    {
      if(1&i>>j) split.push_back(j);
    }
    split.push_back(s.size()-1);
    int pos=0;
    for(const auto& e: split) 
    {
      string t=s.substr(pos,e-pos+1);
      ans+=stoll(t);
      pos=e+1;
    }
  }
  cout<<ans<<endl;
}

Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main(){
  int a;
  int b;
  int c;
  cin >> a >> b >> c;
  int n=0;
  if(a<b){
    for(int i=a;i<=b;i++){
      if(c%i==0){
        n=n+1;
      }
    }
  }
  if(a==b){
    if(c%a==0){
      n=1;
    }
  }
  cout << n << endl;
}

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

using namespace std;

bool solve(const vector<int>& a){
	long long n = a.size();
	long long sumN = n*(n+1)/2;
	long long sum = 0;
	for(int i=0;i<n;i++) sum += a[i];
	if(sum%sumN != 0) return false;
	long long sumC = sum/sumN;
	long long cntC = 0;
	for(int i=0;i<n;i++){
		long long dif = a[i] - a[(i+n-1)%n];
		if(sumC - dif < 0) return false;
		if((sumC - dif)%n != 0) return false;
		cntC += (sumC-dif)/n;
	}
	return cntC == sumC;
}

int main(){
	int N;
	while(cin >> N){
		vector<int> a(N);
		for(int& t : a) cin >> t;
		cout << (solve(a) ? "YES" : "NO") << endl;
	}
}



Measured memory_bytes: 768
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
#include <ctime> 
#include <bitset>
#include <complex>
#include <chrono>
#include <random>
#include <functional>

using namespace std;

#define int long long

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

	int a, b, c, d;
	cin >> a >> b >> c >> d;
	cout << max({a * c, a * d, b * c, b * d}) << endl;
}

Measured memory_bytes: 3164
#include <stdio.h>
#define MAX_N (105)

int n;
int G[MAX_N + 1][MAX_N + 1];
int main()
{
    scanf("%d", &n);
    
    for ( int i = 0; i < n; i++ ) {
	int u, k;
	scanf("%d %d", &u, &k);
	for ( int j = 0; j < k; j++ ) {
	    int v;
	    scanf("%d", &v);
	    G[u][v] = 1;
	}
    }

    for ( int i = 1; i <= n; i++ ) {
	for ( int j = 1; j <= n; j++ ) {
	    printf("%d%c", G[i][j], ( j==n ) ? '\n' : ' ');
	}
    }
    
    return 0;
}

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

const int _ = 5e5 + 3;
char str[_]; int trans[_][26] , pre[_] , L; bool vis[_];

void output(int x){
	if(pre[x] == -1) return;
	output(pre[x]);
	for(int i = 0 ; i < 26 ; ++i) if(trans[pre[x]][i] == x){putchar('a' + i); break;}
}

int main(){
	scanf("%s" , str + 1); L = strlen(str + 1);
	for(int i = L - 1 ; i >= 0 ; --i){
		memcpy(trans[i] , trans[i + 1] , sizeof(trans[i]));
		trans[i][str[i + 1] - 'a'] = i + 1;
	}
	queue < int > q; q.push(0); vis[0] = 1; pre[0] = -1;
	while(!q.empty()){
		int t = q.front(); q.pop();
		for(int i = 0 ; i < 26 ; ++i)
			if(!trans[t][i]){output(t); putchar('a' + i); return 0;}
			else if(!vis[trans[t][i]]){
				vis[trans[t][i]] = 1; pre[trans[t][i]] = t;
				q.push(trans[t][i]);
			}
	}
	assert(-1);
	return 0;
}


Measured memory_bytes: 26240
#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define IOS ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
#define ff first
#define ss second
#define pb push_back
#define debug(val) cerr << "The Value Of " << #val << " is : " << val << '\n';
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const ll inf = 0x3f3f3f3f;
const ll mininf = -922337203685477;
const ll nax = 1e5+5;
ll n, arr[nax];
unordered_map<ll, bool>vis;
unordered_map<ll, ll>cnt;
vector<ll>v;

int main(){
	IOS
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> arr[i];
		cnt[arr[i]]++;
		if(!vis[arr[i]]){
			vis[arr[i]]=1;
			v.pb(arr[i]);
		}
	}
	sort(v.rbegin(), v.rend());
	bool udah=0;
	ll satu;
	for(auto x:v){
		if(cnt[x]>=4 && !udah){
			cout << x * x << '\n';
			return 0;
		}
		if(cnt[x]>=2){
			if(udah){
				cout << satu * x << '\n';
				return 0;
			}
			else{
				udah=1;
				satu=x;
			}
		}
	}
	cout << 0 << '\n';
}


Measured memory_bytes: 13040
#include<stdio.h>

int main(void){

    long long int a;
    long double b;
    // scanf("%.2f",&a,&b);
    // printf("%.2f %.2f",a,b);
    scanf("%lld %Lf",&a,&b);
    // scanf("%f",&b);
    // printf("%lld %Lf\n",a,b);

    long double tmp=0;
    tmp=a*b;
    long long int ans=0;
    ans=tmp;
    printf("%lld\n",ans); 

    return 0;
}

Measured memory_bytes: 1752
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <bitset>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
ll mod = 1000000007;

int main() {
    int a;
    cin >> a;
    int ans = a + a * a + a * a * a;
    cout << ans << endl;
}


Measured memory_bytes: 3564
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
 
int main() {
  string s, t;
  cin >> s >> t;
  if(s.size()>t.size()) cout << "GREATER" << endl;  
  else if(t.size()>s.size()) cout << "LESS" << endl;
  else {
    for(int i=0; i<s.size(); i++) {
      if(s[i]>t[i]) {
        cout << "GREATER" << endl;
        break;
      }
      else if(s[i]<t[i]) {
        cout << "LESS" << endl;
        break;
      }
      if(i==s.size()-1) cout << "EQUAL" << endl;
    }
  }
  return 0;
}

Measured memory_bytes: 3628
#include<bits/stdc++.h>
#define MOD 1000000007
#define ll long long
#define mp make_pair
#define pb push_back 
using namespace std;
int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	string s;
	cin >> s;
	if(s[2] == s[3] && s[4] == s[5])
		cout << "Yes\n";
	else cout << "No\n";

}

Measured memory_bytes: 256
k=int(input())
ok=3234566667
ng=0
while ok-ng>1:
  mid=(ok+ng)//2
  s=str(mid)
  dp=[[[0]*2 for _ in range(10)] for _ in range(len(s))]
  for i in range(1,int(s[0])):
    dp[0][i][1]+=1
  dp[0][int(s[0])][0]+=1
  for i in range(1,len(s)):
    for j in range(10):
      if j!=0:
        dp[i][j][1]+=dp[i-1][j][1]+1
      else:
        dp[i][j][1]+=dp[i-1][j][1]
      if j>=1:
        dp[i][j-1][1]+=dp[i-1][j][1]
        if int(s[i])==j-1 and int(s[i-1])==j:
          dp[i][j-1][0]+=dp[i-1][j][0]
        if int(s[i])>j-1:
          dp[i][j-1][1]+=dp[i-1][j][0]
      if j<=8:
        dp[i][j+1][1]+=dp[i-1][j][1]
        if int(s[i])==j+1 and int(s[i-1])==j:
          dp[i][j+1][0]+=dp[i-1][j][0]
        if int(s[i])>j+1:
          dp[i][j+1][1]+=dp[i-1][j][0]
      if int(s[i])==j and int(s[i-1])==j:
        dp[i][j][0]+=dp[i-1][j][0]
      if int(s[i])>j:
        dp[i][j][1]+=dp[i-1][j][0]
  cnt=0
  for i in range(10):
    cnt+=sum(dp[len(s)-1][i])
  if cnt>=k:
    ok=mid
  else:
    ng=mid
print(ok)

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

int main()
{
	int N;
	cin >> N;
	vector<int> L(2 * N);
	int ans = 0;
	for (int i = 0; i < 2 * N; i++) {
		cin >> L[i];
	}
	sort(L.begin(), L.end());
	for (int j = 0; j < N; j++) {
		ans += L[j * 2];
	}
	cout << ans << endl;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(){

	int n,h[21],i,sum=0,max=0;

	scanf("%d",&n);


	for(i=0;i<n;i++){
	scanf("%d",&h[i]);
	
	if(max<=h[i]){max=h[i];	sum+=1;}}

	printf("%d",sum);

	return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
#define DUMP(x)  cout << #x << " = " << (x) << endl;
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define IFOR(i, m, n) for(int i = n - 1; i >= m; i-- )
#define REP(i, n) FOR(i,0,n)
#define IREP(i, n) IFOR(i,0,n)
#define FOREACH(x,a) for(auto& (x) : (a) )
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
/* テンプレートここまで */

int main() {
  int a, b, c; cin >> a >> b >> c;
  cout << min({abs(a-b)+abs(b-c), abs(a-c)+abs(c-b), abs(a-b)+abs(c-a)}) << endl;
}


Measured memory_bytes: 764
N = int(input())
T, A = map(int,input().split())
H = list(map(int, input().split()))

n = 0
t_best = 100000
for i in range(N):
    if abs(A - (T-H[i]*0.006)) < t_best:
        t_best = abs(A - (T-H[i]*0.006))
        n = i+1
    
print("{}".format(n))

Measured memory_bytes: 9252
# nPi mod
def permutation(n,i,mod):
    count = 1
    for _ in range(i):
        count = count * n % mod
        n -= 1
    return count

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N, K = map(int,input().split())
MOD = 10**9 + 7

# 頂点0から頂点N-1のN個
ab = [[int(i)-1 for i in input().split()] for _ in range(N-1)]

V = [[] for _ in range(N)]
for a,b in ab:
    V[a].append(b)
    V[b].append(a)

# 頂点nowの子ノードの数をchild[now]に格納
def dfs(now, before):
    count = 0
    for after in V[now]:
        if after == before:
            continue
        count += 1
        dfs(after, now)
    if count == 0:
        return
    else:
        child[now] = count

child = [0] * N
dfs(0,0)

answer = 1
for i in range(N):
    if i == 0:
        answer *= permutation(K-1, child[i], MOD)
    else:
        answer *= permutation(K-2, child[i], MOD)
    answer %= MOD

print(answer * K % MOD)

Measured memory_bytes: 99940
A, B = map(int, input().split())
l = []
for i in range(1, 10000):
  a = i * 0.08
  b = i * 0.1
  if a > A+1 and b > B+1:
    break
  elif A <= a < A+1 and B <= b < B+1:
    l.append(i)

if len(l) == 0:
  print(-1)
else:
  print(min(l))

Measured memory_bytes: 9192
#include <bits/stdc++.h>
using namespace std;
const int maxn =1e5+10;
typedef long long ll;
typedef struct
{
    ll price,sum;
}qq;
qq a[maxn];
bool cmp(qq r,qq t)
{
    return r.price<t.price;
}
int main()
{
    int n,m;
    cin>>n>>m;
    for(int i=0;i<n;i++)
    {
        scanf("%lld%lld",&a[i].price,&a[i].sum);
    }
    sort(a,a+n,cmp);
    ll ans=0;
    for(int i=0;i<n;i++)
    {
       if(m>a[i].sum)
       {
           m-=a[i].sum;
           ans+=a[i].sum*a[i].price;
       }
       else
       {
           ans+=m*a[i].price;
           break;
       }
    }
    printf("%lld\n",ans);
    return 0;
}


Measured memory_bytes: 1792
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
using static System.Math;
using static ConsoleApplication.Utils;

namespace ConsoleApplication
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var n = ReadInt();
            var res = Enumerable.Range(1, n).Sum();
            WriteLine(res);
        }
    }

    public static class Utils
    {
        #region Extensions for IO

        public static int ReadInt()
            => ReadInts().First();

        public static IEnumerable<int> ReadInts()
            => ReadStrings().Select(int.Parse);

        public static IEnumerable<String> ReadStrings()
            => ReadLine().Split(' ');

        #endregion

        #region Extensions of int

        public static bool IsOdd(this int n)
            => !n.IsEven();

        public static bool IsEven(this int n)
            => n % 2 == 0;

        public static bool CanDivideWith(this int n, int divisor)
            => n % divisor == 0;

        #endregion

        #region Extensions of string

        public static int ToInt(this string str)
            => int.Parse(str);

        public static long ToLong(this string str)
            => long.Parse(str);

        public static bool IsNullOrEmpty(this string str)
            => string.IsNullOrEmpty(str);

        #endregion

        public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
        {
            foreach (var item in source)
            {
                action(item);
            }
        }

        public static IEnumerable<T> Peek<T>(this IEnumerable<T> source, Action<T> action)
        {
            foreach (var item in source)
            {
                action(item);
            }
            return source;
        }
    }
}


Measured memory_bytes: 2776
#include<cstdio>
using namespace std;

int a[100000];
int main(void){
  int n, s;
  scanf("%d%d", &n, &s);
  for(int i = 0;i < n;++i)scanf("%d", &a[i]);
  int res = n + 1, sum = 0, l = 0, r = 0;
  for(;l < n;){
    if(l == r)sum = a[r++];
    else{
      if(sum >= s)sum -= a[l++];
      else if(r < n)sum += a[r++];
      else break;
    }
    if(sum >= s && res > r - l)res = r - l;
  }
  if(res <= n)printf("%d\n", res);
  else puts("0");

  return 0;
}

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

int main() {
  int N,K;
  int a,b;
  b = 0;
  cin >> N >> K;
  
  
  for (int i=0;i < N;i++){
    cin >> a;
    if (K-a >= a){
      b = b + (a * 2);
    }
    if (K-a < a){
      b = b + (K - a) * 2;
    }
  }  
  cout << b << endl;
}


Measured memory_bytes: 3608
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define Int int64_t
#define dump(x) cout << (x) << endl
Int mod = 1e9+7;

int main() {
    Int a, p;
    cin >> a >> p;
    p += a * 3;
    dump(p / 2);
    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main()
{
	int get_weekday(int year,int month,int day)
	{	
		int weekday,tmp;
		if(month==1||month==2){
		year--;month+=12;
		}
		tmp = year/100;
		weekday=(year+(year>>2)-tmp+(tmp>>2)+(13*month+8)/5+day)%7;
		return weekday;
	}
	int m,d;
	char week_data[7][10] = {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
	while(scanf("%d%d",&m,&d),m){
		printf("%s\n",week_data[get_weekday(2004,m,d)]);
	}
	return 0;
}

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<char, ll> pcl;

#define m0(x) memset(x, 0, sizeof(x))
#define all(x) x.begin(), x.end()
#define rep(i, n) for(int i = 0; i < (n); i++)
#define asort(x) sort(all(x));
#define dsort(x, t) sort(x.begin(), x.end(), greater<t>());
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define MINS(m, s) m.insert(mp(s, 1));
#define MFIN(m, s) m.find(s) != m.end()
#define mp make_pair
#define pb push_back
#define INF (1 << 29)
const int mod = 1000000007;

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

    int n = s.size() - 1;
    ll ans = 0;
    for(int bit = 0; bit < (1 << n); bit++) {
        ll sum = 0, pre = 0;
        for(int i = 0; i <= n; i++) {
            pre *= 10;
            pre += s[i] - '0';
            if(i == n) {
                sum += pre;
                break;
            }
            if(bit & (1 << i)) {
                sum += pre;
                pre = 0;
            }
        }
        ans += sum;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
public class Hello{
    public static void Main(){

        string[] num = System.Console.ReadLine().Split(' ');
        int ab = int.Parse(num[0] + num[1]);

        bool state = false;
        for(int i = 0; i <= ab; i++){
            if(i*i == ab){
                state = true;
                break;
            }
        }
        System.Console.WriteLine( state ? "Yes" : "No");
    }
}


Measured memory_bytes: 11092
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

string inl;
vector<string> svs;
string ww[3] ={"the","this","that"};
	while(getline(cin,inl)){
		rep(i,26){
			rep(j,inl.size()){
				if(inl[j] >= 'a' && inl[j] <= 'z') inl[j] += 1;
				if(inl[j] > 'z' ) inl[j] -= 26;
				
				}
			if(inl.find(ww[0]) != string::npos 
				|| inl.find(ww[1]) != string::npos
				|| inl.find(ww[2]) != string::npos )  cout << inl << endl;
	//		 cout << i << "::" << inl << endl;

		}
	}
	
	return 0;
}

Measured memory_bytes: 1184
from itertools import product
N = int(input())
lsF = [[]]
for i in range(N):
    lsF.append(list(map(int,input().split())))
lsP = [[]]
for i in range(N):
    lsP.append(list(map(int,input().split())))
bita = list(product(range(2),repeat=10))
bita.pop(0)
ans = -10**10
for bit in bita:
    count = [0 for i in range(N+1)]
    for i in range(10):
        for j in range(1,N+1):
            count[j] += bit[i]*lsF[j][i]
    benifit = 0
    for i in range(1,N+1):
        benifit += lsP[i][count[i]]
    ans = max(ans,benifit)
print(ans)

Measured memory_bytes: 9216
#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<complex>
using namespace std;
typedef long long int llint;
int main(){
	char c;
	cin >> c;
	if (c == 'a' ||
		c == 'i' ||
		c == 'u' ||
		c == 'e' ||
		c == 'o'){
		cout << "vowel" << endl;
	}
	else{
		cout << "consonant" << endl;
	}
	return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<queue>
#include<string>
#include<map>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
 
using namespace std;

int main(){
    int X;  cin >> X;
    if(X >= 30) cout << "Yes";
    else    cout << "No";
}

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

#define endl '\n'

using namespace std;

int h[100001];

int a[100001];       

int main(){

  cin.tie(0);     // cout と cin の同期を切る
  ios::sync_with_stdio(false);  /* cの stdioストリーム (printfとか)と*/


  int N;

  cin>>N;

  
  for(int i=1;i<=N;i++){
    cin>>h[i];

    if(h[i]<=h[i-1]){
      a[i]=1;
    }
  }

  int cnt=0;

  int max=0;

  for(int i=1;i<=N;i++){


    if(a[i]==1){
      cnt++;
    }else{
      cnt=0;
    }

    if(cnt>max){
      max=cnt;
    }
  }

  cout<<max<<endl;

  
  
  
  return 0;

}


Measured memory_bytes: 1024
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};}
//pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define SWAP(type, x, y) do { type tmp = x; x = y; y = tmp; } while (0)

#define MOD 1000000007 

int main(void){
    int N;
    scanf("%d",&N);

    long* A;
    NEW(A,N);
    for(int i=0;i<N;i++){
        scanf("%ld",&A[i]);
    }

    long sum;

    //偶数番目を正にする
    long ans1=0;
    if(A[0]<=0){
        ans1+=labs(1-A[0]);
        sum=1;
    }
    else sum=A[0];
    for(int i=1;i<N;i++){
        //もし符号が同じなら
        if(sum*(sum+A[i])>=0){
            if(i%2==0){
                ans1+=labs(sum+A[i]-1);
                sum=1;
            }
            else{
                ans1+=labs(sum+A[i]-(-1));
                sum=-1;
            }
        }
        else sum+=A[i];
    }

    //奇数番目を正にする
    long ans2=0;
    if(A[0]>=0){
        ans2+=labs(-1-A[0]);
        sum=-1;
    }
    else sum=A[0];
    for(int i=1;i<N;i++){
        //もし符号が同じなら
        if(sum*(sum+A[i])>=0){
            if(i%2==1){
                ans2+=labs(sum+A[i]-1);
                sum=1;
            }
            else{
                ans2+=labs(sum+A[i]-(-1));
                sum=-1;
            }
        }
        else sum+=A[i];
    }

    long ans=MIN(ans1,ans2);
    printf("%ld\n",ans);

    return 0;
}

//偶数番目と奇数番目、どちらを正にするかで2通りある→調べて小さい方。
//↑この2通りに絞る考え方が出てくるか？

Measured memory_bytes: 896
import sys
from collections import defaultdict
def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    dict = defaultdict(int)
    for _ in range(N):
        string = input()
        dict[string] += 1
    M = int(input())
    for _ in range(M):
        string = input()
        dict[string] -= 1

    ans = 0
    for key in dict: ans = max(ans, dict[key])
    print(ans)


if __name__ == "__main__":
    main()


Measured memory_bytes: 65092
#include <memory.h>

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>

using namespace std;

#define MOD 1000000007
#define INIT -1

int main() {
	int n;
	cin >> n;
	int cnt[3] = {};
	for (int i = 0; i < n; i++) {
		int a;
		cin >> a;
		if (a % 4 == 0)
			cnt[2]++;
		else if (a % 2 == 0)
			cnt[1]++;
		else
			cnt[0]++;
	}
	if (cnt[0] <= cnt[2] || (cnt[0] == cnt[2] + 1 && cnt[1] == 0))
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}

Measured memory_bytes: 256
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
    string s; cin>>s;
    int n=s.size();
    int ct=0;
    for(int i=0; i<n; i++){
        if((i%2==0 && s[i]=='0') || (i%2==1 && s[i]=='1')) ct++;
    }
    int ct2=0;
    for(int i=0; i<n; i++){
        if((i%2==0 && s[i]=='1') || (i%2==1 && s[i]=='0')) ct2++;
    }
    cout<<min(ct, ct2)<<endl;
    return 0;
}

Measured memory_bytes: 512