akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#include<string.h>
 
typedef long long int ll;
#define all(x) (x).begin(), (x).end()
 
using namespace std;

int nxt() {
    int x;
    cin >> x;
    return x;
}

ll nxtl(){
    ll x;
    cin>>x;
    return x;
}
 
void SieveOfEratosthenes(int n,vector <int> &primes) 
{ 
    // Create a boolean array "prime[0..n]" and initialize 
    // all entries it as true. A value in prime[i] will 
    // finally be false if i is Not a prime, else true. 
    bool prime[n+1]; 
    memset(prime, true, sizeof(prime)); 
  
    for (int p=2; p*p<=n; p++) 
    { 
        // If prime[p] is not changed, then it is a prime 
        if (prime[p] == true) 
        { 
            // Update all multiples of p greater than or  
            // equal to the square of it 
            // numbers which are multiple of p and are 
            // less than p^2 are already been marked.  
            for (int i=p*p; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
  
    // Print all prime numbers 
    for (int p=2; p<=n; p++) 
       if (prime[p]) 
          primes.push_back(p);
} 
 
ll max(ll a,ll b)
{
    if(a>b)
        return a;
    return b;
}
 
ll power(ll x, ll y,ll mod) 
{ 
    ll temp; 
    if( y == 0) 
        return 1; 
    temp = power(x, y/2,mod); 
    if (y%2 == 0) 
        return (temp*temp)%mod; 
    else
        return (((x*temp)%mod)*temp)%mod; 
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n=nxt();
    set <string> s;
    for(int i=0;i<n;i++)
    {
        string x;
        cin>>x;
        s.insert(x);
    }
    cout<<s.size()<<endl;
    
    return 0;   
}




 
 


Measured memory_bytes: 19216
#include <iostream>
#include<string>
#include<time.h>
#include<math.h>
#include<stdlib.h>
#include<map>
using namespace std;

int main() {
	int A, N, X;
	cin >> N >> A;
	X = N % 500;
	if (X > A) {
		cout << "No" << endl;
	}
	else {
		cout << "Yes" << endl;
	}
	return 0;
}

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        int H = 0;  //??????????????°
        int W = 0;  //??????????????°

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

//      ?????°????????????????????????????§????????????????????????????????????????1????????????????????????????????????
        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            H = Integer.parseInt(strArray[0]);
            W = Integer.parseInt(strArray[1]);

//          H??¨W?????±???0?????¨??????????????????
            if(H == 0 && W == 0){
                break;
            }

//          ??????????????°?????°?????????
            for(int i = 0; i < H; i++){
//              ?\???°???
                if(i % 2 == 1){
                    for(int j = 0; j < W; j++){
//                      ?\???°??????"#"
                        if(j % 2 == 1){
                        output.append("#");

//                      ??¶??°??????"."
                        }else{
                            output.append(".");
                        }
                    }
//              ??¶??°???
                }else{
                    for(int j = 0; j < W; j++){
//                      ?\???°??????"."
                        if(j % 2 == 1){
                        output.append(".");

//                      ??¶??°??????"#"
                        }else{
                            output.append("#");
                        }
                    }
                }output.append("\n");
            }
            output.append("\n");
        }
        System.out.print(output);
    }
}

Measured memory_bytes: 25420
import sys
N = int(input())
if not ( 1 <= N <= 100 ):
    sys.exit()

for I in range(N // 4 + 1):
    for J in range(N // 7 + 1):
        if 4 * I + J * 7 == N:
            print('Yes')
            sys.exit()
print('No')

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

void optimize_cp_stdio() {
    std::ios::sync_with_stdio(false);
    std::cout.tie(nullptr);
    std::cin.tie(nullptr);
}

int main() {
    optimize_cp_stdio();
    int n;
    std::cin >> n;
    std::vector<int> a(n);
    for (int i = 0; i < n; i++)
        std::cin >> a[i];
    std::vector<int> add_sum(n), xor_sum(n);
    std::partial_sum(a.begin(), a.end(), add_sum.begin());
    std::partial_sum(a.begin(), a.end(), xor_sum.begin(), [](int a, int b) { return a ^ b; });
    int64_t ans = 0;
    for (int i = 0; i < n; i++) {
        int lo = i, hi = n;
        auto ok = [&](int x) {
            return i == 0 ? add_sum[x] == xor_sum[x] : (add_sum[x] - add_sum[i - 1]) == (xor_sum[x] ^ xor_sum[i - 1]);
        };
        while (lo + 1 != hi) {
            int mi = lo + hi >> 1;
            ok(mi) ? lo = mi : hi = mi;
        }
        ans += lo - i + 1;
    }
    std::cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 2560
#include <bits/stdc++.h>
using namespace std;
#define int long long
int mod = 1e9 + 7;
int INF = 2e18;

signed main() {
    int N;
    string S;
    cin >> N >> S;
    string ans = "";
    ans += S[0];
    for (int i = 1; i < N; i++) {
        if (S[i - 1] != S[i]) ans += S[i];
    }
    cout << ans.length() << endl;
}


Measured memory_bytes: 512
N, K = gets.chomp.split(' ').map(&:to_i)
A = gets.chomp.split(' ').map(&:to_i)

count = 0

A.each do |a|
  if K <= count
    c = count - K
    if A[c] < a
      puts 'Yes'
    else
      puts 'No'
    end
  end
  count += 1
end


Measured memory_bytes: 35916
N = int(input())
A = input()
B = input()
C = input()
cnt = [0 for i in range(len(A))]
for i in range(len(A)):
    if A[i] == B[i] == C[i]:
        cnt[i] = 0
    elif A[i] == B[i]:
        cnt[i] = 1
    elif B[i] == C[i]:
        cnt[i] = 1
    elif C[i] == A[i]:
        cnt[i] = 1
    else:
        cnt[i] = 2

print(sum(cnt))

Measured memory_bytes: 3064
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gamma, log
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = float('INF')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


n = I()
dp = [[0] * 3 for _ in range(62)]
dp[0][0] = 1
for i in range(61):
    zero, one, two = dp[i]
    if n >> (60 - i) & 1:
        zero, one, two = zero, zero + one, 2 * one + 3 * two
    else:
        zero, one, two = zero + one, one, one + 3 * two
    dp[i + 1] = [zero % mod, one % mod, two % mod]


print(sum(dp[-1]) % mod)



Measured memory_bytes: 39920
#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

ll gcd(ll a,ll b){
  a=abs(a); b=abs(b);
  if(a==0 || b==0){
    return abs(a+b);
  }
  if(a<b){
    ll tmp=a; a=b; b=tmp;
  }
  ll r=a%b;
  while(r!=0){
    a=b;
    b=r;
    r=a%b;
  }
  return b;
}

ll RepSq(ll a,ll n,ll mod){
  if(n==0){
    return 1;
  }else if(n%2!=0){
    return (a*RepSq(a,n-1,mod))%mod;
  }else{
    ll x=RepSq(a,n/2,mod);
    return (x*x)%mod;
  }
}

int main(){
  ll n;
  cin>>n;
  ll mod=1000000007;
  ll a[n],b[n],g[n];
  map<pair<ll,ll>,ll> mp;
  ll iwashinainotoissyo=0;
  rep(i,n){
    cin>>a[i]>>b[i];
    if(a[i]!=0 || b[i]!=0){
      g[i]=gcd(a[i],b[i]);
      a[i]/=g[i]; b[i]/=g[i];
      if(a[i]<0 || (a[i]==0 && b[i]>0)){
        a[i]*=-1; b[i]*=-1;
      }
    mp[make_pair(a[i],b[i])]++;
    }else{
      iwashinainotoissyo++;
    }
  }
  ll ans=1; ll rest=n-iwashinainotoissyo;
  for(auto p:mp){
    ll x,y,z,w;
    x=p.first.first; y=p.first.second;
    z=p.second;
    if(y<0){
      w=mp[make_pair(-y,x)];
      if(w!=0){
        ans=(ans*(RepSq(2,z,mod)+
                  RepSq(2,w,mod)-1))%mod;
        rest=rest-z-w;
      }
    }
  }
  ans=(RepSq(2,rest,mod)*ans)%mod;
  cout<<(ans+mod-1+iwashinainotoissyo)%mod;
}


Measured memory_bytes: 26884
#include<iostream>
#include<string>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<queue>

using namespace std;


int main(){
  int n;cin>>n;
  if(n/100 == n%10) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}


Measured memory_bytes: 256
a, b, k = map(int,raw_input().split())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ab = list(set(make_divisors(a)) & set(make_divisors(b)))
ab.sort()
print ab[len(ab)-k]

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

long long Div(long long a, long long b) {
    return a/b;
}

long long gcd(long long x, long long y) {
    if(y == 0) return x;
    else return gcd(y, x % y);
}

int main() {
    long long a, b, c, d; cin >> a >> b >> c >> d;
    long long res = b - a + 1;
    long long divc = Div(b, c) - Div(a-1, c);
    long long divd = Div(b, d) - Div(a-1, d);
    long long lcm = c * d / gcd(c, d);
    long long divcd = Div(b, lcm) - Div(a-1, lcm);
    cout << res - divc - divd + divcd << endl;
	return 0;
}


Measured memory_bytes: 256
#include <iostream>

using namespace std;

int lis[100];

int main() {
  int n, m, x, soma1, soma2, elemento;
  soma2 = 0;
  soma1 = 0;
  cin >> n >> m >> x;
  
  for (int i = 0; i < m; i++){
    cin >> elemento;
    lis[elemento]++;
  }
  
  for (int i = x; i < n; i++){
    if (lis[i] == 1){
      soma1++;
    }
  }
  for (int i = x; i >= 0; i--){
    if (lis[i] == 1){
      soma2++;
    }
  }
  
  cout << min(soma1, soma2) << endl;
  
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a), i##_len = (b); i < i##_len; ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define _repr(i, n) repri(i, n, 0)
#define repri(i, a, b) for(int i = int(a), i##_len = (b); i >= i##_len; --i)
/* 閉区間で定義しているので注意！repr(i,n,m)でn〜mまで */
#define repr(...) _overload3(__VA_ARGS__, repri, _repr, )(__VA_ARGS__)
/* 逆回しのループ。両閉区間であることに注意 */
#define all(x) (x).begin(), (x).end()
#define debug(x) cerr << #x << ": " << (x) << '\n'
typedef long long lint;
#define int lint
const int INF = (int)1145141919;
int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const lint LINF = (lint)1e18;
typedef vector<int> vint;
typedef pair<int, int> pint;
template <class T> bool chmax(T &a, const T &b) {
    if(a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T> bool chmin(T &a, const T &b) {
    if(a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T, class U>
std::ostream &operator<<(std::ostream &os, const std::pair<T, U> p) {
    os << "(" << p.first << "," << p.second << ")";
    return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
    os << p.first << " " << p.second;
    return os;
}

template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
    is >> p.first >> p.second;
    return is;
}

template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
    os << "[";
    for(int i = 0; i < (int)v.size(); i++) {
        os << v[i] << (i + 1 != v.size() ? ", " : "");
    }
    os << "]";
    return os;
}

template <typename T> istream &operator>>(istream &is, vector<T> &v) {
    for(T &in : v)
        is >> in;
    return is;
}

template <typename T = lint> vector<T> make_v(size_t a) { return vector<T>(a); }

template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}

template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) {
    t = v;
}

template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) {
    for(auto &e : t)
        fill_v(e, v);
}

signed main() {
#ifdef LOCAL
    // ifstream in("in_1.txt");
    // cin.rdbuf(in.rdbuf());
#else
    cin.tie(0);
    ios::sync_with_stdio(false);
#endif

    /* input part */
    int N;
    cin >> N;
    vector<int> a(3 * N);
    cin >> a;
    sort(all(a));
    lint ans = 0;
    rep(i, N) { ans += a[N + 2 * i]; }
    cout << ans << endl;
}


Measured memory_bytes: 2560
#include <vector>
#include <list>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <cstdio>
#include <climits>
#include <complex>
#include <cstdint>
#include <tuple>

#define M_PI       3.14159265358979323846

using namespace std;

//conversion
//------------------------------------------
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(); }
inline int readInt() { int x; scanf("%d", &x); return x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;

//container util

//------------------------------------------
#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 SQ(a) ((a)*(a))
#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(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,s,n) for(int i=s;i<(int)n;++i)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
int n, m;


int GCD(int a, int b){
    if(a < b) swap(a, b);
    if(b==0) return a;
    return GCD(b, a%b);
}
int main() {
    string s; cin >> s;

    int a = (s[0]-'0')*10+s[1]-'0';
    int b = (s[2]-'0')*10 + s[3]-'0';

    if(a>=1 && a<=12 && b>=1 && b<=12){
        cout << "AMBIGUOUS" << endl;
    }else if(a >= 1 && a<= 12) {
        cout << "MMYY" << endl;
    }else if(b >= 1 && b<= 12) {
        cout << "YYMM" << endl;
    }else{
        cout << "NA" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
using namespace std;
main()
{
	int n,q;
	while(cin>>n>>q,n)
	{
		int c[101]={};
		int maxc=-1,maxi;
		for(int i=0;i<n;i++)
		{
			int m;cin>>m;
			for(int j=0;j<m;j++)
			{
				int C;cin>>C;
				c[C]++;
				if(c[C]>maxc||c[C]==maxc&&maxi>C)
				{
					maxc=c[C];
					maxi=C;
				}
			}
		}
		cout<<(q>maxc?0:maxi)<<endl;
	}
}



Measured memory_bytes: 3080
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] input = sc.nextLine().split("[\\s]+");
    int H = Integer.parseInt(input[0]);
    int W = Integer.parseInt(input[1]);
    String[][] a = new String[H][W];
    int[] rowCount = new int[W];
    int[] colCount = new int[H];
    for(int i = 0; i < W; i++) {
      rowCount[i] = 0;
    }
    for(int i = 0; i < H; i++) {
      colCount[i] = 0;
    }
    for(int i = 0; i < H; i++) {
      String col = sc.nextLine();
      for(int j = 0; j < W; j++) {
        a[i][j] = col.substring(j,j+1);
      }
    }
    for(int i = 0; i < H; i++) {
      for(int j = 0; j < W; j++) {
        if(a[i][j].equals(".")) {
          rowCount[j] += 1;
          colCount[i] += 1;
        }
      }
    }
    for(int i = 0; i < H; i++) {
      if(colCount[i] == W) {
        continue;
      }
      for(int j = 0; j < W; j++) {
        if(rowCount[j] == H) { continue; }
        System.out.print(a[i][j]);
      }
      System.out.println();
    }
  }
}

Measured memory_bytes: 26964
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cctype>
#define len length()
#define sz size()
#define rng(i, a, b) for(int i = a; i < b; i++)
#define rep(i, n) rng(i, 0, n)
#define srt(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define vi(a, n) vector<int> a(n)
#define vs(a, n) vector<string> a(n)
#define vc(a, n) vector<char> a(n)
#define psb(a) push_back(a)
#define ppb pop_back()
#define erc(S, i) S.erase(S.begin() + i)
#define ers(S, i, j) S.erase(S.begin() + i, S.begin() + j)
#define sp(n) cout << setprecision(n) << fixed
#define fst(s) s.at(0)
#define lst(s) s.at(s.len - 1)
using namespace std;

int main(){
    string S;
    cin >> S;
    for(int i = 'a'; i <= 'z'; i++){
        if(S.find(i) == -1){
            cout << char(i) << endl;
            return 0;
        }
    }
    cout << "None" << endl;
    return 0;
}

Measured memory_bytes: 512
n=int(input())
h=[list(map(int,input().split()))for _ in range(n)]
dp=[[h[0][0],h[0][1],h[0][2]] for _ in range(n)]
for i in range(1,n):
    for j in range(3):
        dp[i][j]=max(dp[i-1][(j+1)%3]+h[i][j],dp[i-1][(j+2)%3]+h[i][j])
print(max(dp[n-1][0],dp[n-1][1],dp[n-1][2]))

Measured memory_bytes: 47348
#include<stdio.h>
int main()
{
	int n, m;
	scanf("%d %d", &n, &m);
	long long int ans, i, p = 1000000007;
	if (n == m)
	{
		ans = 2;
		for (i = 0; i < n; i++)
		{
			ans *= i + 1;
			ans %= p;
		}
		for (i = 0; i < m; i++)
		{
			ans *= i + 1;
			ans %= p;
		}
	}
	else if (n - m == 1 || m - n == 1)
	{
		ans = 1;
		for (i = 0; i < n; i++)
		{
			ans *= i + 1;
			ans %= p;
		}
		for (i = 0; i < m; i++)
		{
			ans *= i + 1;
			ans %= p;
		}
	}
	else
		ans = 0;
	printf("%lld\n", ans);
	return 0;
}

Measured memory_bytes: 128
#define _DEBUG
#include "bits/stdc++.h"
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0,a1,a2,a3,a4,x,...) x
#define debug_1(x1) cout<<#x1<<": "<<x1<<endl
#define debug_2(x1,x2) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<endl
#define debug_3(x1,x2,x3) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<endl
#define debug_4(x1,x2,x3,x4) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<", "#x4<<": "<<x4<<endl
#define debug_5(x1,x2,x3,x4,x5) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<", "#x4<<": "<<x4<<", "#x5<<": "<<x5<<endl
#ifdef _DEBUG
#define debug(...) CHOOSE((__VA_ARGS__,debug_5,debug_4,debug_3,debug_2,debug_1,~))(__VA_ARGS__)
#else
#define debug(...)
#endif
#define rep(index,num) for(int index=0;index<(int)num;index++)
#define rep1(index,num) for(int index=1;index<=(int)num;index++)
#define brep(index,num) for(int index=(int)num-1;index>=0;index--)
#define brep1(index,num) for(int index=(int)num;index>0;index--)
#define scan(argument) cin>>argument
#define prin(argument) cout<<argument<<endl
#define kaigyo cout<<endl
#define eps 1e-7
#define mp(a1,a2) make_pair(a1,a2)
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef long long ll;
typedef long double ld;
using namespace std;
typedef pair<ll,ll> pll;
typedef pair<int,int> pint;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<pint> vpint;
typedef vector<pll> vpll;
ll INFl=(ll)1e+18+1;
int INF=1e+9+1;
int main(){
	ll A;
	string B;
	scan(A>>B);
	ll ans=100*A*(B[0]-'0')+10*A*(B[2]-'0')+A*(B[3]-'0');
	ans/=100;
	prin(ans);
	return 0;
}


Measured memory_bytes: 3628
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main(){

    input!{
        n: usize,
        k: usize,
        a: [usize;n],
    }

    // let mut score = 1;
    // for i in 0..k{
    //     score *= a[i];
    // }
    //let mut score_next = score;
    for i in k..n{
        // score_next /= a[i-k];
        // score_next *= a[i];

        if a[i-k] < a[i] {
            println!("Yes");
        } else {
            println!("No");
        }
        // score = score_next;
    }

}

Measured memory_bytes: 3560
#include<bits/stdc++.h>
using namespace std;
vector<int> G[100010];

#define MAX_N 1<<17
int n,dat[2*(MAX_N)-1];

void init(int n_){
  n=1;
  while(n<n_)n*=2;
  for(int i=0;i<2*n-1;i++)dat[i]=0;
}

int find(int k){
  k+=n-1;
  int ans=dat[k];
  while(k>0){
    k=(k-1)/2;
    ans+=dat[k];
  }
  return ans;
}


void update(int a,int b,int x,int k=0,int l=0,int r=n){
  if(r<=a||b<=l)return;
  if(a<=l&&r<=b){
    dat[k]+=x;
  }else{
    update(a,b,x,k*2+1,l,(l+r)/2);
    update(a,b,x,k*2+2,(l+r)/2,r);
  }
}

int num[2][200010];
int a;
void dfs(int k=0){
  num[0][k]=a;
  a++;
  for(int i=0;i<G[k].size();i++){
    dfs(G[k][i]);
  }
  num[1][k]=a;
}

int main(){
  int N;
  cin>>N;
  for(int i=0;i<N;i++){
    int k;
    cin>>k;
    for(int j=0;j<k;j++){
      int a;
      cin>>a;
      G[i].push_back(a);
    }
  }
  dfs();
  init(a);
  // cout<<num[1][0]<<" happy"<<endl;
  int q;
  cin>>q;
  for(int i=0;i<q;i++){
    int x;
    cin>>x;
    if(x==0){
      int w,v;
      cin>>v>>w;
      update(num[0][v],num[1][v],w);
    }else{
      int u;
      cin>>u;
      cout<<find(num[0][u])<<endl;
    }
  }
  return 0;
}



Measured memory_bytes: 13472
import bisect
import sys
import math

n,h = map(int,input().split())
ab = [list(map(int,input().split())) for i in range(n)]

b = [ab[i][1] for i in range(n)]

if n == 1:
    if h <= ab[0][1]:
        print(1)
        sys.exit()
    
    
    else:
        if ab[0][1] >= ab[0][0]:
            print(1+(math.ceil((h-ab[0][1])/ab[0][0])))
            sys.exit()
        
        else:
            print(math.ceil(h/ab[0][1]))
            sys.exit()

max_a = 0

for i in range(n):
    max_a = max(max_a, ab[i][0])

b.sort()
idx = bisect.bisect_right(b,max_a)

ans = 0

for i in b[idx:][::-1]:
    h -= i
    ans += 1
    
    if h <= 0:
        break
    
if h <= 0:
    print(ans)

else:
    print(ans + math.ceil(h/max_a))
    

Measured memory_bytes: 29716
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const int INT_INF = 2147483647;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
typedef pair<int,int> P;

int main() {
  int n;
  cin >> n;
  int a[n];
  rep(i,n)cin >> a[i];

  // DP の遷移を bitset に落とし込む
  bitset<4000005> dp(1);
  rep(i,n) dp |= (dp << a[i]);

  // 答えを出力
  int sum=0;
  rep(i,n)sum+=a[i];
  for(int i=(sum+1)/2;i<=sum;i++){
    if(dp[i]==1){
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}


Measured memory_bytes: 1664
#include <bits/stdc++.h>
using namespace std;
using Int = long long;
struct UnionFind {
    vector<int> A;
    UnionFind(int n) : A(n, -1) {}
    int find(int i) {
        if (A[i] < 0) return i;
        return A[i] = find(A[i]);
    }
    void unite(int i, int j) {
        i = find(i), j = find(j);
        if (i == j) return;
        if (A[i] > A[j]) swap(i, j);
        A[i] += A[j];
        A[j] = i;
    }
};
int main()
{
    int N; cin >> N;
    UnionFind uf(N);
    struct Point { int x, y; };
    vector<Point> X(N);
    for (int i = 0; i < N; i++) {
        int x, y; cin >> x >> y;
        X[i] = Point{x, y};
    }
    map<int, int> A, B;
    for (int i = 0; i < N; i++) {
        if (!A.count(X[i].x)) A[X[i].x] = i;
        if (!B.count(X[i].y)) B[X[i].y] = i;
        uf.unite(A[X[i].x], i);
        uf.unite(B[X[i].y], i);
    }
    map<int, pair<set<int>, set<int>>> M;
    for (int i = 0; i < N; i++) {
        auto &p = M[uf.find(i)];
        p.first.insert(X[i].x);
        p.second.insert(X[i].y);
    }
    Int cnt = 0;
    for (auto &p : M) {
        auto &q = p.second;
        cnt += (Int)q.first.size() * q.second.size();
    }
    cout << cnt - N << '\n';
    return 0;
}

Measured memory_bytes: 10752
N = int(input())
count = [0]*4
for i in range(N):
  s = input()
  if s=='AC':
    count[0] += 1
  elif s=='WA':
    count[1] += 1
  elif s=='TLE':
    count[2] += 1
  else:
    count[3] += 1
    
for i,j in enumerate(count):
  if i==0:
    print('AC x',j)
  elif i==1:
    print('WA x',j)
  elif i==2:
    print('TLE x',j)
  else:
    print('RE x',j)

Measured memory_bytes: 9216
#include <numeric>
#include <iostream>
#include <array>
#include <string>
#include <vector>
#include <cassert>
#include <algorithm>
#include <math.h> 
#include <set>
#include <map>
#include <utility>
#include <deque>
#include <queue>
#include <iomanip>

using namespace std;

#define ll long long int
#define rep(i, n) for(ll i = 0; i < n; i++)
#define repp(i, n) for(ll i = 1; i <= n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define riverse(v) reverse((v).begin(), (v).end())
#define pb push_back
#define mp make_pair
#define all(a)  (a).begin(),(a).end()
using vi = vector<int>;
using vs = vector<string>;
using vc = vector<char>;
using vll = vector<ll>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vb = vector<bool>;
using vvb = vector<vb>;
const ll MOD = 1e9 + 7;
set<char> alphabet = { 'a','b','c','d','e','f','g','h','i','j','k','l','m',
               'n','o','p','q','r','s','t','u','v','w','x','y','z' };

int main() {
    ll N;
    cin >> N;
    ll ans = 0;
    vll A(N);
    rep(i, N) cin >> A[i];
    vector<vll>  B(61, vll(2,0));
    rep(i, 61) {
        rep(j, N) {
            if (A[j] % 2 == 1) B[i][1]++;
            else B[i][0]++;
            A[j] /= 2;
        }
    }
    rep(i, 61) {
        ll a = B[i][0] * B[i][1];
        a = a % MOD;
        ll j = 1;
        while (j <= i) {
            a = 2 * a;
            a = a % MOD;
            j++;
        }
        ans += a;
        ans %= MOD;
    }
    cout << ans << endl;
}

Measured memory_bytes: 2560
N=int(input())
AB=[list(map(int,input().split())) for _ in range(N)]
AB.sort(key=lambda x:x[1])

able = True
sum = 0

for i in range(N):
  sum += AB[i][0]
  if (sum > AB[i][1]):
    able = False
    break

print("Yes" if able else "No")

Measured memory_bytes: 53728
# 2020/08/15
# AtCoder Beginner Contest 175 - B

# Input
n = int(input())
l = list(map(int,input().split()))

# Calc
cnt = 0
for i in range(0, n-2):
    for j in range(i+1, n-1):
        for k in range(j+1, n):
            if l[i] != l[j] and l[j] != l[k] and l[i] != l[k]:
                wkl = list()
                wkl.append(l[i])
                wkl.append(l[j])
                wkl.append(l[k])
                wkl.sort()
                if wkl[0] + wkl[1] > wkl[2]:
                    cnt = cnt + 1

# Output
print(cnt)


Measured memory_bytes: 9200
n, m = map(int, input().split())
p = [0]*n
num_wa = [0]*n
wa = 0
for i in range(m):
    a, b= map(str, input().split())
    if 0 == p[int(a)-1] and b == "AC":
        p[int(a)-1] = 1
        wa += num_wa[int(a)-1]
    elif 0 == p[int(a)-1] and b == "WA":
        num_wa[int(a)-1] += 1
print(sum(p), wa)

Measured memory_bytes: 4596
import java.util.*;
import java.io.*;

public class Main {
  public static void main(String[] args) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}


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

int main() {
 string s,t;
 cin >> s >> t;
  bool id = true;
 for(int i = 0; i < s.size(); i++){
   if(s.at(i) != t.at(i)){
     id = false;
     break;
   }
 }
  if(id) cout << "Yes" << endl;
  else cout << "No" << endl;
}

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

int main() {
    
	int a, b; cin >> a >> b;
	int p = a * b;
	if (p % 2 == 0) cout << "Even" << endl;
	else cout << "Odd" << endl;
    return 0;
}

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

using namespace std;

typedef double D;
typedef long long int LL;

#define st first
#define nd second
#define pb push_back
#define PLL pair <LL, LL>
#define PII pair <int, int>

const int N = 1e5 + 7;
const int MX = 1e9 + 7;
const LL INF = 1e18 + 9LL;

int n, m;
int val[N];
bool vis[N];
vector <int> G[N];

set <int> S;
vector <int> cur;

void dfs(int u){
	vis[u] = true;

	S.insert(u);
	cur.push_back(val[u]);
	
	for(int v: G[u])
		if(!vis[v])
			dfs(v);
}

int main(){
	scanf("%d %d", &n, &m);
	for(int i = 1; i <= n; ++i)
		scanf("%d", &val[i]);
	for(int i = 1; i <= m; ++i){
		int u, v;
		scanf("%d %d", &u, &v);

		G[u].push_back(v);
		G[v].push_back(u);
	}
	
	int res = 0;
	for(int i = 1; i <= n; ++i)
		if(!vis[i]){
			dfs(i);
			for(int v: cur)
				if(S.find(v) != S.end())
					++res;
			
			cur.clear();
			S.clear();
		}
	
	printf("%d\n", res);
	return 0;
}

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

#include <ext/pb_ds/assoc_container.hpp> //required
#include <ext/pb_ds/tree_policy.hpp> //required

using namespace __gnu_pbds; 
using namespace std;

template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; 
typedef long long  ll;
typedef vector<ll> VL;
typedef vector<int> VI;
typedef pair<ll,ll> PLL;
typedef pair<int,int> PII;
#define pb push_back

#define F first
#define S second
#define SZ(a) int((a).size())
#define ALL(a) a.begin(),a.end()
#define fr(i,x,y) for(ll i=x;i<y;i++)
#define frr(i,x,y) for(ll i=x-1;i>=y;i--)
#define inf 1e18+1
const ll mod=1000000007;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll power(ll a,ll b){ll ans=1;while(b!=0){if(b&1){ans*=a;}a=a*a;b>>=1;}return ans;}
ll powerm(ll a,ll b){ll ans=1;while(b!=0){if(b&1){ans*=a;ans%=mod;}a=a*a;a%=mod;b>>=1;}return ans%mod;}
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();

void solve()
{
    ll n,m,x;
    cin>>n>>m>>x;
    vector<VL> arr(n,VL(m+1));
    fr(i,0,n)
    {
        fr(j,0,m+1)
        {
            cin>>arr[i][j];
        }
    }
    ll pset=power(2,n);
    ll ans=inf;
    fr(i,0,pset)
    {
        VL check(m+1,0);
        ll ct=0;
        fr(j,0,n)
        {
            if(i&(1<<j))
            {
                ct+=arr[j][0];
                fr(k,1,m+1)
                {
                    check[k]+=arr[j][k];
                }
            }
        }
        ll fg=1;
        fr(k,1,m+1)
        {
            if(check[k]<x)
                fg=0;
        }
        if(fg==1)
        {
            ans=min(ans,ct);
        }
    }
    if(ans==inf)
    {
        cout<<"-1\n";
        return;
    }
    cout<<ans<<endl;
    return;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    ll t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}

Measured memory_bytes: 3648
#include<bits/stdc++.h>
#define ford(i,a,b) for(int i=(a);i>=b;i--)
#define rep1(i,a,b) for(int i=(a);(i)<=(b);(i)++)
#define rep0(i,a,b) for(int i=(a);(i)<(b);(i)++)
#define ll long long
#define re return
#define mp map<int,int>
#define N 200005
#define pql priority_queue<ll>
#define all(v) (v).begin(),(v).end()
#define str stringstream
using namespace std;
int main() {
	int a,b;
	cin>>a>>b;
	if(a<10)cout<<(10-a)*100+b;
	else cout<<b;
	re 0;
}


Measured memory_bytes: 256
#include <stdio.h>
int main(){
	int n,x;
	scanf("%d%d",&n,&x);
	int l[n+1];
	for(int i=1; i<=n; i++) scanf("%d",&l[i]);
	
	int ans=0,np=0;
	for(int i=1; np<=x; i++){
		np+= l[i];
		ans++;
	}
	printf("%d",ans);
}

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

std::vector<int> find_all(const std::string str, const std::string subStr)
{
    std::vector<int> result;

    int subStrSize = subStr.size();
    int pos = str.find(subStr);

    while (pos != std::string::npos)
    {
        result.push_back(pos);
        pos = str.find(subStr, pos + subStrSize);
    }

    return result;
}

int main(int argc, char const *argv[])
{
    int n;
    string s;
    cin >> n >> s;
    string abc = "ABC";
    int result = find_all(s, abc).size();
    cout << result << endl;
}


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

using namespace std;

int main() {

	int n,l;
	cin >> n >> l;
	vector<string> s(n);
	for (int i = 0; i < n; i++) {
		cin >> s[i];
	}
	sort(s.begin(), s.end());
	for (int i = 0; i < n; i++) {
		cout << s[i];
	}
	cout << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(long long int i = 0; i < n; i++)
#define _rep(i,m,n) for(long long int i = m; i < n; i++)
#define print(n) std::cout << n << std::endl
#define _print(n) std::cout << n
using namespace std;
typedef long long ll;
const int N = 1000000;
const ll mod = 1000000007;
using Graph = vector<vector<int>>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

int main(){
   ll n; cin >> n;
   vector<ll> a(n + 1);
   vector<ll> b(n);
   rep(i,n + 1) cin >> a[i];
   rep(i,n) cin >> b[i];

   ll sum = 0;
   rep(i,n){
      if(b[i] >= a[i]){
         sum += a[i];
         ll diff = min(a[i + 1],max(b[i] - a[i], ll(0)));
         a[i + 1] -= diff;
         sum += diff;
      }else{
         sum += b[i];
      }
     //cout << sum << endl;  
   }
   cout << sum << endl;
}

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


#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define repr(x,fr,to) for(int (x)=(fr);(x)>=(to);(x)--)
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()

using namespace std;
typedef long long ll; typedef vector<int> VI; typedef pair<int,int> pii;
const int MD = (int)1e9 + 7; typedef vector<ll> VL;
void dbg(){ cerr << "\n"; }  template <class T, class ...T2>
void dbg(const T& fst, const T2&...rst){ cerr << fst << ": "; dbg(rst...); }
template <class T, class T2> void amax(T& a,T2 b){ if(a < b) a = b;}


int main()
{
	cin.tie(0); ios_base::sync_with_stdio(false);
	int n, m;
	cin >>n >>m;
	vector<vector<pii>> r(n);
	rep(i, m){
		int a, b, d;
		cin >> a >>b >>d;
		r[a-1].emplace_back(b-1, d);
		r[b-1].emplace_back(a-1, -d);
	}
	const int INF= 1<<28;
	VI dd(n, INF);
	auto bfs = [&](int sy){
		queue<int> que;
		que.emplace(sy); dd[sy]=0;
		while(!que.empty()){
			int cy = que.front();
			que.pop();
			//rep(i,4){
			for(auto v: r[cy]){
				if(dd[v.first] == INF){
					que.emplace(v.first);
					dd[v.first] = dd[cy] + v.second;
				}else if(dd[v.first] != dd[cy] + v.second){
					return false;
				}
			}
		}
		return true;
	};
	
	rep(i, n) if(dd[i] == INF){
		if(!bfs(i)){
			puts("No"); return 0;
		}
	}
	puts("Yes");
	return 0;
}


Measured memory_bytes: 9344
#include<bits/stdc++.h>
#define REP(x,y,z) for(int x=y;x<=z;x++)
#define MSET(x,y) memset(x,y,sizeof(x))
#define M 
using namespace std;
int main()
{
    char in[200];
    while (~scanf("%s", in+1)) {
        int n = strlen(in+1);
        REP(i,1,n) {
            if (in[i]=='A') putchar('T');
            if (in[i]=='T') putchar('A');
            if (in[i]=='C') putchar('G');
            if (in[i]=='G') putchar('C');
        }
        puts("");
    }
    
    return 0;
}



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

using namespace std;

typedef pair<int, int> pii;

const int MAXN = 305;

int h, w, k, ans[MAXN][MAXN];
char s[MAXN][MAXN];
vector<int> pos[MAXN];

int main() {
    scanf("%d%d%d", &h, &w, &k);
    for(int i = 0; i < h; ++i)
        scanf("%s", s[i]);

    int maxI = 0;
    for(int i = 0; i < h; ++i) {
        for(int j = 0; j < w; ++j) {
            if (s[i][j] == '#') {
                pos[i].push_back(j);
                maxI = max(maxI, i);
            }
        }
    }

    int id = 0;
    int lastI = -1;
    for(int x = 0; x < h; ++x) {
        if (pos[x].size() == 0)
            continue;

        int x1 = lastI + 1;
        int x2 = (x == maxI) ? (h-1) : x;

        for(int j = 0; j < pos[x].size(); ++j) {
            int y1 = (j == 0) ? 0 : (pos[x][j-1]+1);
            int y2 = (j+1 == pos[x].size()) ? (w-1) : pos[x][j];

            ++id;
            for(int u = x1; u <= x2; ++u)
                for(int v = y1; v <= y2; ++v)
                    ans[u][v] = id;
        }

        lastI = x;
    }

    for(int x = 0; x < h; ++x) {
        for(int y = 0; y < w; ++y)
            printf("%d ", ans[x][y]);
        puts("");
    }

    return 0;
}


Measured memory_bytes: 1792
#include<stdio.h>
#include<math.h>
int main()
{
	int a, b, c, d, f=0;
	scanf("%d%d%d%d", &a, &b, &c, &d);
	if (abs(a-c)<=d)
	{
		f=1;
	}
	else if ((abs(a-b)<=d) && (abs(b-c)<=d))
	{
		f=1;
	}
	if (f==1)
	{
		printf("Yes\n");
	}
	else
	{
		printf("No\n");
	}
	return 0;
}

Measured memory_bytes: 128
class Stack
  def initialize
    @sz = 0
    @elem = []
  end

  def push obj
    @elem << obj
    @sz += 1
  end

  # returns obj or nil if the stack is empty
  def pop
    obj = @elem.last
    @sz -= 1 if @sz > 0
    @elem = @elem[0..-2]
    obj
  end

  def peak
    obj = @elem.last
    obj
  end
end

def main
  str = gets
  exp = str.chomp.split(/\s/)
  stack = Stack.new
  exp.each do |elem|
    if operator? elem
      oprand2 = stack.pop
      oprand1 = stack.pop
      stack.push(evaluate(elem, oprand1, oprand2))
    else
      stack.push elem
    end
  end
  puts stack.pop
end


def operator? str
  str == "+" or str == "-" or str == "*" or str == "/"
end

def evaluate(op,oprand1,oprand2)
  num1 = oprand1.to_i
  num2 = oprand2.to_i
  res = case op
        when "+"
          num1 + num2
        when "-"
          num1 - num2
        when "*"
          num1 * num2
        when "/"
          num1 / num2
        end
  res
end


main

Measured memory_bytes: 6124
def Candies(n , a1l , a2l):

    ans = 0

    for i in range(n):
        count = sum(a1l[:i + 1]) + sum(a2l[i:])
        ans = max(ans , count)
    return ans

def main():
    n = int(input())
    a1l = list(map(int , input().split()))
    a2l = list(map(int , input().split()))
    print(Candies(n , a1l , a2l))

if __name__ == '__main__':
    main()


Measured memory_bytes: 39876
class UnionFind:

    def __init__(self, n):
        self.par = [-1] * n


    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return False
        if self.par[x] > self.par[y]:
            x, y = y, x
        self.par[x] += self.par[y]
        self.par[y] = x
        return True


    def root(self, x):
        path = []
        while self.par[x] >= 0:
            path.append(x)
            x = self.par[x]
        for y in path:
            self.par[y] = x
        return x


    def same(self, x, y):
        return self.root(x) == self.root(y)


    def size(self, x):
        return -self.par[self.root(x)]


n, m = map(int, input().split())

uni = UnionFind(n)
for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    uni.unite(a, b)

ans = 0
for i in range(n):
    ans = max(ans, uni.size(i))

print(ans)

Measured memory_bytes: 14560
import java.util.*;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = a * b;

    if (c % 2 == 0) {
      System.out.print("Even");
    } else {
      System.out.print("Odd");
    }
  }
}


Measured memory_bytes: 21588
#include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
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();}
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 EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define EACH(t,i,c) for(t::iterator i=(c).begin(); i!=(c).end(); ++i)
const double EPS = 1e-10;
const double PI  = acos(-1.0);


ll mypow10(ll n){
	ll ret=1;
	for(ll i=0;i<n;i++){
		ret*=10;
	}
	return ret;
}

ll get_chs(ll n){
	ll digit=toString(n).size();
	ll chs=0;
	for(ll i=1;i<digit;i++){
		chs+=i*(mypow10(i)-mypow10(i-1));
	}
	assert(chs>=0);
	for(ll i=1;i<digit;i++){
		ll a=mypow10(i)-1;
		ll b=mypow10(i-1)-1;
		chs+=(a/3-b/3)*4+(a/5-b/5)*4;
		chs-=(a/3-b/3)*i+(a/5-b/5)*i-(a/15-b/15)*i;
	}
	assert(chs>=0);
	ll remain=n-(mypow10(digit-1)-1);
	ll n2=mypow10(digit-1)-1;
	assert(n2>=0);
	chs+=remain*digit;
	assert(chs>=0);
	chs+=(n/3-n2/3)*4+(n/5-n2/5)*4;
	assert(chs>=0);
	chs-=(n/3-n2/3)*(digit)+(n/5-n2/5)*(digit)-(n/15-n2/15)*digit;
	assert(chs>=0);
	return chs;
}

int main(){
	ll n;
	cin>>n;
	ll lb=0,ub=n;
	while(ub-lb>1){
		ll mid=(lb+ub)/2;
		ll chs=get_chs(mid);
		if(chs>=n){
			ub=mid;
		}else{
			lb=mid;
		}
	}

	ll prev_chs=(ub==1?0:get_chs(ub-1));
	ll cur_chs=get_chs(ub);
	string s;
	ll cur=ub;
	while(s.size()<20+n-(prev_chs+1)){
		if(cur%3==0){
			if(cur%5==0){
				s+="FizzBuzz";
			}else{
				s+="Fizz";
			}
		}else{
			if(cur%5==0){
				s+="Buzz";
			}else{
				s+=toString(cur);
			}
		}
		cur++;
	}

	cout<<s.substr(n-(prev_chs+1),20)<<endl;
}

Measured memory_bytes: 1220
N = int(input())
a = []
for i in range(0, N):
  a.append(int(input()))

first_max = max(a)

former_arr = [0] + a[0:a.index(first_max)]
latter_arr = [0] + a[a.index(first_max) + 1:]
second_max = (max(max(former_arr), max(latter_arr)))

ans = ""
ans += (str(first_max) + '\n') * (a.index(first_max))
ans += (str(second_max) + '\n')
ans += (str(first_max) + '\n') * (N - a.index(first_max) - 1)
print(ans.rstrip('\n'))

Measured memory_bytes: 19364
lst = [(i**2+j**2,i,j) for i in range(1,201) for j in range(i+1,201)]
lst.sort(key = lambda x:(x[0],x[1]))
while True:
	a,b = map(int,input().split(" "))
	if a == 0 and b == 0:
		break
	else:
		obj = a**2 + b**2
		for i in range(40000):
			if lst[i] == (obj,a,b):
				print(lst[i+1][1],lst[i+1][2])
				break


Measured memory_bytes: 8972
#include<iostream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<bitset>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<long long, int> ll_i;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define int4(v, x, y, z) int v, x, y, z; scanf("%d%d%d%d", &v, &x, &y, &z)
#define int5(v, w, x, y, z) int v, w, x, y, z; scanf("%d%d%d%d%d", &v, &w, &x, &y, &z)
#define pri(x) cout << (x) << "\n"
#define pri2(x, y) cout << (x) << " " << (y) << "\n"
#define pri3(x, y, z) cout << (x) << " " << (y) << " " << (z) << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << (x) << "\n"
#define debug2(x, y) cout << " --- " << (x) << " " << (y) << "\n"
#define debug3(x, y, z) cout << " --- " << (x) << " " << (y) << " " << (z) << "\n"
#define X first
#define Y second
#define eps 0.0001
#define prid(x) printf("%.15lf\n", x)


signed main(void){
  int i, j;
  for(int testcase = 0;testcase >= 0;testcase++){
    int(x);
    puts((x < 1200) ? "ABC" : "ARC");

/*/

//*/ break;
  }
  return 0;
}


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

const int MAXN = 200010;
struct Work {
	int spend, until;
	bool operator<(const Work &rhs) const {
		return until < rhs.until;
	}
}work[MAXN];

int main() {
	int n;
	cin>>n;
	for (int i=0; i<n; i++)
		cin>>work[i].spend>>work[i].until;
	sort(work, work+n);
	for (int i=0, time=0; i<n; i++) {
		if (time + work[i].spend > work[i].until) {
			cout<<"No"<<endl;
			return 0;
		}
		time += work[i].spend;
	}
	cout<<"Yes"<<endl;
	return 0;
}


Measured memory_bytes: 1792
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
#define bs binary_search
#define pb push_back
#define pp pair<int,int>
#define F first 
#define S second 
#define lc "\n"
ll power(ll x,ll y,ll p){ll res=1;x=x%p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;} 
ll MAX=1e18 , MIN=-1e18 , MOD=1000000007;
int main()
{
    fastio
    string s="abcdefghijklmnopqrstuvwxyz",ans="";
    ll n; cin>>n; 
    if(n<=26) return cout<<s[n-1], 0;
    while(n>0) 
    {
        if(n%26!=0) ans+=s[(n%26)-1],n/=26;
        else ans+=s[25],n/=26,n--;
    }
    reverse(ans.begin(),ans.end());
    cout<<ans;
    return 0;
}

Measured memory_bytes: 3652