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

void create_map_base(char *map, int x, int y)
{       
        int i;
        int j;
        
        j = -1;
        while (++j < y)
        {       
                i = -1;
                while (++i < x) 
                        map[j * x + i] = '.';
        }
}

void create_map(char *map, int x, int y)
{
        int i;
        int j;
   		string a;
  
        j = 0;
        while (++j < y + 1)
        {      
                cin >> a;
                i = 0;
                while (++i < x + 1)
                        map[j * (x + 2) + i] = a[i - 1];
        } 
}

int count_num(char *map, int x, int i, int j)
{
		int count;
  
  		count = 0;
        if (map[(j - 1) * (x + 2) + (i - 1)] == '#')
                count++;
        if (map[(j - 1) * (x + 2) + i] == '#')
                count++;
        if (map[(j - 1) * (x + 2) + (i + 1)] == '#')
                count++;
        if (map[j * (x + 2) + (i - 1)] == '#')
                count++;
        if (map[j * (x + 2) + (i + 1)] == '#')
                count++;
        if (map[(j + 1) * (x + 2) + (i - 1)] == '#')
                count++;
        if (map[(j + 1) * (x + 2) + i] == '#')
                count++;
        if (map[(j + 1) * (x + 2) + (i + 1)] == '#')
                count++;
  		return (count);
}

void write_num(char *map, int x, int y)
{
        int i;
        int j;
  
        j = 0;
        while (++j < y + 1)
        {
                i = 0;
                while (++i < x + 1)
                {
        				if (map[j * (x + 2) + i] == '.')
                        		cout << count_num(map, x, i, j);
                		else
                				cout << '#';
                }
                cout << endl;
        }
}

int main()  
{       
        int x;
        int y;
        
        cin >> y >> x;
        char map[y + 2][x + 2];
        create_map_base(&map[0][0], x + 2, y + 2);
  		create_map(&map[0][0], x, y);
        write_num(&map[0][0], x, y);
  
  		return (0);
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define VV vector
#define pb push_back
#define bitc  __builtin_popcountl
#define m_p make_pair
#define inf 200000000000000
#define MAXN 1000001
#define eps 0.0000000001
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();

//////////////

#define S second
#define F first
#define int long long  

/////////////

long long powerm(long long x, unsigned long long y, long long p) 
{ 
    long long res = 1;
    x = x % p;
    while (y > 0) 
    { 
        if (y & 1) 
            res = (res*x) % p; 
        y = y>>1;
        x = (x*x) % p;   
    } 
    return res; 
} 
signed main()
{
	fastio;
	#ifdef ANIKET_GOYAL
		freopen("inputf.in","r",stdin);
		freopen("outputf.in","w",stdout);
	#endif
	int n,k;
	int mo=1000000007;
	int fac[3000];
	int ifac[3000];
	fac[0]=1;
	ifac[0]=1;
	for(int i=1;i<3000;++i)
	{
		fac[i]=(i*fac[i-1])%mo;
		ifac[i]=powerm(fac[i],mo-2,mo);
	}
	cin>>n>>k;
	for(int i=1;i<=k;++i)
	{
		if(i>n-k+1)
		{
			cout<<"0\n";
		}
		else
		{
			int r=n-k;
			int b=k;
			int v=(fac[b-1]*((ifac[b-i]*ifac[i-1])%mo))%mo;
			int v2=0;
			if(r!=0){
				if(i!=1)
					v2=(fac[r-1]*((ifac[r-(i-1)]*ifac[i-2])%mo))%mo;
				if(r>=i)
				{
					v2+=(((fac[r-1]*((ifac[r-(i)]*ifac[i-1])%mo))%mo)*2)%mo;
				}
				if(r>=i+1)
				{
					v2+=(((fac[r-1]*((ifac[r-(i+1)]*ifac[i])%mo))))%mo;
				}
			}
			else
				v2=1;
			// cout<<v<<" "<<v2<<"\n";
			cout<<(v*v2)%mo<<"\n";
		}
	}
}

Measured memory_bytes: 256
#include<iostream>
#include <bits/stdc++.h>
#include<string>
#include<algorithm>
using namespace std;
typedef pair<int,int> P;


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


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

int main(){
    int N;
    scanf("%d", &N);
    vector<long long> L(100);
    L[0] = 2;
    L[1] = 1;
    for(int i = 2; i <= N; i++){
        L[i] = L[i - 1] + L[i - 2];
    }
    
    printf("%lld\n", L[N]);
}

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



int main(){
	int x[4];
	int y[4];
	cin >> x[0];
	cin >> y[0];
	cin >> x[1];
	cin >> y[1];
	int dx = x[1] - x[0];
	int dy = y[1] - y[0];
	y[2] = y[1] + dx;
	x[2] = x[1] - dy;
	y[3] = y[0] + dx;
	x[3] = x[0] - dy;
	cout << x[2] << " " << y[2] << " " << x[3] << " " << y[3] << endl;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;

signed main(){
    string s,t;
    int a,b;
    string u;
    cin >> s >> t;
    cin >> a >> b;
    cin >> u;
    if(s == u) a--;
    else b--;
    cout << a << " " << b << endl;
    return 0;
}

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

int main() {
  int x;
  cin >> x;
  int a = x % 10, b = x / 10 % 10, c = x / 100 % 10, d = x / 1000;

  if ( (a == b && b == c) || (b == c && c == d) ) {
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Measured memory_bytes: 256
n = int(input())
a = list(map(int, input().split()))

ans = []

a_min = 10**6+1
a_max = -(10**6+1)
for i in range(n):
    if a[i] > a_max:
        a_max = a[i]
        i_max = i
    if a[i] < a_min:
        a_min = a[i]
        i_min = i

if a_max > abs(a_min):
    for i in range(n):
        if a[i] < 0:
            a[i] += a_max
            ans.append(str(i_max+1)+' '+str(i+1))
    for i in range(1, n):
        a[i] += a[i-1]
        ans.append(str(i)+' '+str(i+1))
else:
    for i in range(n):
        if a[i] > 0:
            a[i] -= a_min
            ans.append(str(i_min+1)+' '+str(i+1))
    for i in range(n-2, -1, -1):
        a[i] += a[i+1]
        ans.append(str(i+2)+' '+str(i+1))

print(len(ans))
for i in range(len(ans)):
    print(ans[i])

Measured memory_bytes: 3064
#include<bits/stdc++.h>
typedef long long ll;
const int maxn = 1e5 + 10;
using namespace std;

int n, m, T, kase = 1;
vector<int> G[maxn];

int main() {
    while(scanf("%d %d %d", &n, &m, &T) != EOF) {
        if(n + m >= T) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
    return 0;
}


Measured memory_bytes: 2560
N, MOD = int(input()), 10 ** 9 + 7
memo = [{} for i in range(N+1)]
def ok(last4):
    for i in range(4):
        t = list(last4)
        if i >= 1:
            t[i-1], t[i] = t[i], t[i-1]
        if ''.join(t).count('AGC') >= 1:
            return False
    return True
def dfs(cur, last3):
    if last3 in memo[cur]:
        return memo[cur][last3]
    if cur == N:
        return 1
    ret = 0
    for c in ['A', 'C', 'G', 'T']:
        if ok(last3 + c):
            ret = (ret + dfs(cur + 1, last3[1:] + c)) % MOD
    memo[cur][last3] = ret
    return ret
print(dfs(0, 'TTT'))

Measured memory_bytes: 3872
#include <array>
#include <deque>
#include <forward_list>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <iterator>
#include <algorithm>
#include <cfenv>
#include <random>
#include <numeric>
#include <cmath>
#include <iosfwd>
#include <iostream>
#include <ios>
#include <streambuf>
#include <istream>
#include <ostream>
#include <iomanip>
#include <sstream>
#include <fstream>
using namespace std;
typedef long long ll;

int main(){
    ll K;
    cin >> K;
    
    vector<ll> q;
    for(ll i = 1 ; i <= 9 ; i++){
        q.push_back(i);
    }
    ll x;
    for(int i = 0 ; i < K ; i++){
        x = q.at(i);
        if(x % 10 - 1 <= 9 && x % 10 - 1 >= 0){
            q.push_back(x*10 + x %10 - 1);
        }
        q.push_back(x*10 + x %10);
        if(x % 10 + 1 >= 0 && x % 10 + 1 <= 9){
            q.push_back(x*10 + x %10 + 1);
        }

    }
    cout << x;

    return 0;
}

Measured memory_bytes: 6384
#pragma GCC optimize("Ofast")
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip> // setprecision
#include <complex> // complex
#include <math.h> 
#include <functional>
using namespace std;
using ll = long long;
using P = pair<int,int>;
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod2 = 1000000007;
constexpr ll mod = 998244353;
const int dx[8] = {1, 0, -1, 0,1,1,-1,-1};
const int dy[8] = {0, 1, 0, -1,1,-1,1,-1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
// --------------------------------------------------------------------------

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  int K = 9;
  vector<int> V(N+1),W(N+1);
  for(int i=1; i<=N; i++){
    cin >> V[i] >> W[i];
  }
  vector<int> depth(N+1,0);
  for(int i=2; i<=N; i++){
    depth[i] = depth[i/2] + 1;
  }
  vector<vector<int>> dp((1LL<<K),vector<int>(100005,0));
  for(int i=1; i<min((1<<K),N+1); i++){
    for(int j=0; j<=100000; j++){
      chmax(dp[i][j],dp[i/2][j]);
      chmax(dp[i][j+1],dp[i/2][j]);
      if(j+W[i] <= 100000){
        chmax(dp[i][j+W[i]],dp[i/2][j]+V[i]);
      }
    }
  }
  int Q;
  cin >> Q;
  for(int i=0; i<Q; i++){
    int v,L;
    cin >> v >> L;
    if(depth[v] < K){
      cout << dp[v][L] << "\n";
    }else{
      vector<int> now;
      while(depth[v] >= K){
        now.emplace_back(v);
        v /= 2;
      }
      int ans = 0;
      for(int bit=0; bit<(1LL<<(now.size())); bit++){
        int sum_V=0,sum_W=0;
        for(int k=0; k<now.size(); k++){
          if(bit & (1LL<<k)){
            sum_V += V[now[k]];
            sum_W += W[now[k]];
          }
        }
        if(sum_W <= L){
          chmax(ans,sum_V + dp[v][L-sum_W]);
        }
      }
      cout << ans << "\n";
    }
  }
  return 0;
}

Measured memory_bytes: 207552
H,W,K = list(map(int,input().split()))
MAP = [input() for i in range(H)]
CNT = [line.count("#") for line in MAP]
stack = 1
strcnt = 0
for idx, cnt in enumerate(CNT):
  sharp_cnt = 0
  if cnt == 0:
    stack += 1
  else:
    strcnt += 1
    line_lst = []
    for char in MAP[idx]:
      if char == "#":
        sharp_cnt += 1
        if sharp_cnt >= 2:        
          strcnt += 1
      line_lst += [str(strcnt)]
    for i in range(stack):
      print(" ".join(line_lst))
    stack = 1
else:
  if cnt == 0:
    for i in range(stack-1):
      print(" ".join(line_lst))
    stack = 1

Measured memory_bytes: 42560
#include <bits/stdc++.h>
#include <math.h>
#include <cmath>

using namespace std;
using ll =long long;
using vi = vector<int>; 
using vvi = vector<vi>; 
using vl = vector<ll>; 
using vvl = vector<vl>; 
using vs = vector<string>;
using vvs = vector<vs>; 
using vc = vector<char>;
using vvc = vector<vc>; 
using vb = vector<bool>;
using vvb = vector<vb>; 

#define rep(i,n) ;for( int i =0; i < n ; i ++)
#define all(a) a.begin(),a.end()
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define f(i,a,b) for(int i=a;i<b;i++)
#define pri(a)  printf("%.14lf\n",a);
#define MOD 1000000007
bool is_int_lround(double x){
  return std::lround(x)==x;
}
ll keta(ll x){
  ll n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}

ll conbi(int n,int m){
  
  cin>>n>>m;
  vector<ll> a(100);
  a[0] =1;
  for(int i=0;i<14;i++){
    a[i+1]=a[i]*(i+1);
  }
  return a[n] /(a[m] *a[n-m]);
}

long long modpow(long long a, long long n, long long mod) {
    long long res = 1;//繰り返し二乗法
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
ll kaijo(ll x){
  ll z=1;
  if(x==0){
    return 1;
  }
  while(x>0){
    z *=x;
    z %=MOD;
    x--;
  }
  return z;
}
ll yakusu_num(ll n){
  vl yakusu(n+1,1);
  for(ll i=2;i*i<=n;i++){ 
    while(n%i==0){
      n /=i;
      yakusu[i]++;
    }
  }
  if(n!=1)yakusu[n]++;
  ll num=1;
  for(ll i=0;i <=n;i++){
    num*=yakusu[i];
  }
  return num;
}


//cout<<""<<endl;
int main(){
  ll H,N;cin>>H>>N;
  ll wa=0;
  vl a(N);rep(i,N){
    cin>>a[i];
    wa +=a[i];
  }
  if(wa>=H)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  

}





Measured memory_bytes: 1024
N = gets.chomp.to_i
s = gets.chomp.split.map(&:to_i)
Q = gets.chomp.to_i
t = gets.chomp.split.map(&:to_i)

ans = 0
t.each do |e|
  if s.bsearch {|u| u >= e} == e
    ans += 1
  end
end
p ans



Measured memory_bytes: 15624
from collections import deque

def f(x, y):
    if x == 0:
        return y
    if y == 0:
        return -x
    if x == r:
        return -(x + y)
    if y == c:
        return x + y

r, c, n = map(int, input().split())
xy = []
lxy = 0
for i in range(n):
    x1, y1, x2, y2 = map(int, input().split())
    d = []
    if min(x1, y1) == 0 or x1 == r or y1 == c:
        d.append([f(x1, y1), i])
    if min(x2, y2) == 0 or x2 == r or y2 == c:
        d.append([f(x2, y2), i])
    if len(d) == 2:
        xy.append(d[0])
        xy.append(d[1])
        lxy += 2
xy.sort()
q = deque()
for i in range(lxy):
    if not q:
        q.append(xy[i][1])
    else:
        if q[-1] == xy[i][1]:
            q.pop()
        else:
            q.append(xy[i][1])
print("YES" if not q else "NO")

Measured memory_bytes: 100780
using System;
using System.Linq;

public class Program
{
    static void Main()
    {
        string[] input = Console.ReadLine().Split(' ');
        int n = int.Parse(input[0]);
        int a = int.Parse(input[1]);
        int b = int.Parse(input[2]);
        
        int sum;
        int ans = 0;
        for(int i = 1;i<=n;i++)
        {
            sum = sumDigits(i);
            if(a<=sum && sum <= b)
            {
                ans += i;
            }
        }
        Console.WriteLine(ans);
    }

    static int sumDigits(int num)
    {
        int sum = 0;
        while(num != 0)
        {
            sum += num % 10;
            num /= 10;
        }
        return sum;
    }
}

Measured memory_bytes: 13140
#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
long long dp[100100][4];
int main() {
    string s;
    cin >> s;
    int N = s.size();
    dp[0][0] = 1;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < 4; j++) {
            dp[i + 1][j] += dp[i][j] * (s[i] == '?' ? 3 : 1);
            dp[i + 1][j] %= M;
            if (j < 3 && (s[i] == "ABC"[j] || s[i] == '?')) {
                dp[i + 1][j + 1] += dp[i][j];
                dp[i + 1][j + 1] %= M;
            }
        }
    }
    cout << dp[N][3] << endl;
}

Measured memory_bytes: 3584
#include <bits/stdc++.h>
#define ll long long
#define f(i, a, b) for(ll i=a; i<b; i++)
#define fr(i,a,b) for(ll i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define LB lower_bound
#define UB upper_bound
#define endl "\n"
using namespace std;

bool sortbysec(const pair<ll,ll> &a, 
              const pair<ll,ll> &b) 
{ 
    return (a.second < b.second); 
} 

ll maxSubArraySum(ll a[], ll size) 
{ 
    ll max_so_far = INT_MIN, max_ending_here = 0; 
  
    for (ll i = 0; i < size; i++) 
    { 
        max_ending_here = max_ending_here + a[i]; 
        if (max_so_far < max_ending_here) 
            max_so_far = max_ending_here; 
  
        if (max_ending_here < 0) 
            max_ending_here = 0; 
    } 
    return max_so_far; 
} 

ll findSubarraySum(ll arr[], ll n, ll sum = 0) 
{
    unordered_map<ll, ll> prevSum;
    ll res = 0;
    ll currsum = 0;
    for (ll i = 0; i < n; i++)
    {
        currsum += arr[i];
        if (currsum == sum) res++;
        if (prevSum.find(currsum - sum) != prevSum.end()) res += (prevSum[currsum - sum]);
        prevSum[currsum]++;
    }
    return res; 
} 
ll gcd(ll a, ll b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 
  
ll powmp(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; 
} 

int main()
{
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    ll n,m;cin>>n>>m;
    ll h[n+1];
    f(i,1,n+1) cin>>h[i];
    vector<ll> adj[n+1];
    f(i,0,m)
    {
        ll u,v;cin>>u>>v;
        adj[u].pb(v);
        adj[v].pb(u);
    }
    ll ans=0;
    int visited[n+1]={};
    f(i,1,n+1)
    {
        if(visited[i]) continue;
        visited[i]++;
        int f=0;
        for(auto k:adj[i])
        {
            if(h[k]<h[i]) visited[k]++;
            else if(h[k]==h[i])
            {
                visited[k]++;
                f++;
            }
            else f++;
        }
        if(!f) ans++;
    }
    cout<<ans<<endl;
}


Measured memory_bytes: 10648
#include<bits/stdc++.h>
using namespace std;
char x[5];
int main(){
	cin>> x[1]>> x[2]>> x[3];
	if(x[2] == 'B') cout<< "ARC";
	if(x[2] == 'R') cout<< "ABC";
	return 0;
} 

Measured memory_bytes: 3620
# -*- coding: utf-8 -*-
import math


def main():

    a, b, c = map(int, input().split())

    if (c - a - b) > 0 and 4 * a * b < (c - a - b) * (c - a - b) :
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()


Measured memory_bytes: 2940
#include<bits/stdc++.h>
using namespace std;
int main()
{
    bool flag=false;
    string a;
    cin>>a;
    for(int i=0;i<=a.length();i++)
    {
        if(a[i]=='C')
        flag=true;
        if(a[i]=='F'&&flag)
        {
            cout<<"Yes";
            return 0;
        }
    }
    cout<<"No";
    return 0;
}

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

const int MAX_N = 2e5+10;
int N;
int a[MAX_N], ans[MAX_N];

void solve()
{
	int M = 0;
	for(int i=N;i>=1;--i){
		int cur = 0;
		for(int j=i+i;j<=N;j+=i){
			cur += ans[j];
		}
		if(a[i]){
			if(cur%2 == 0) ans[i]=1;
		}else{
			if(cur%2 == 1) ans[i]=1;
		}
	}
	for(int i=1;i<=N;++i)if(ans[i])M++;
	cout << M << "\n";
	for(int i=1;i<=N;++i)if(ans[i])cout << i << " ";
	cout << "\n";
}

int main()
{
	cin >> N;
	for(int i=1;i<=N;++i) cin >> a[i];
	solve();
	return 0;
}

Measured memory_bytes: 2432
///----------------------///
///---Code Written by----///
///-----Al-Shahreyaj-----///
///----------------------///

///PRAGMA
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("unroll-loops")

#include<bits/stdc++.h>

///PBDS
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
using namespace std;

//PBDS_SET
//Index of Value - .order_of_key()
//Value at Index - .find_by_order()
//typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update> pbds_set; 
//typedef tree<int, null_type, lessorequal<int>, rb_tree_tag,tree_order_statistics_node_update> pbds_multiset; 

#define mem(a, x) memset(a, x, sizeof(a))
#define MP make_air
#define inf 1e8
#define INF 1e18
#define CP(x) printf("Case %d: ", x);
#define unq(v) v.erase(unique(all(v)),v.end())
#define one(x) __builtin_popcount(x)
#define onel(x) __builtin_popcountll(x)
#define ll long long
#define ld long double
#define LMX LLONG_MAX
#define fixpre(x) cout << fixed << setprecision(x)
#define endl "\n"
#define vi vector<int>
#define vll vector<long long>
#define pii pair<int,int>
#define pil pair<int,ll>
#define pll pair<ll,ll>
#define matrix vector<vector<ll> >
#define F first
#define S second
#define pb push_back
#define pq priority_queue
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define INT ini()
#define LONG inl()
#define M 1000000007
#define N 100005

int ini(){int x;scanf("%d",&x);return x;}
ll inl(){ll x;scanf("%lld",&x);return x;}


int main()
{
	ll a = INT, b = INT;
	cout << a * b << endl;
	return 0;
}





Measured memory_bytes: 3764
#include <stdio.h>

int main(){
  
  int a,b;
  scanf("%d%d",&a,&b);
  
  int i,ans;
  for(i = 1; i <= 12; i++){
    if((a == i&&b >= i)||(a == i + 1&&b <= i)){
      ans = i;
    }
  }
  printf("%d",ans);
  return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
#define  rep(i,n) for(li i=0;i<n;i++)
using namespace std;
typedef vector<int> vi;
typedef long int li;
typedef unsigned long long ull;

int main()
{
    li a,b;
    cin>>a>>b;
    if(a>0 && b>0) cout<<"Positive\n";
    if(a<=0&&b>=0) cout<<"Zero\n";
    if(a<0&&b<0) {
        if((b-a)%2) cout<<"Positive\n";
        else cout<<"Negative\n";
    }
    return 0;
}

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

using namespace std ;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)
#define ll long long int 

#define fr first
#define se second

#define all(v) v.begin(),v.end() 
#define rall(v) v.rbegin(),v.rend()
#define sz(v) v.size() 

#define pb push_back
#define mp make_pair 

#define PI 3.141592653589793238



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


//bool valid(int x, int y){return x > 0 && x < n && y > 0 && y < m;}


int n, t, mm = INT_MIN, c;
vector<pair<int,int>>vp;


int main(){
  cin >> n >> t;
  for(int i = 0 ; i < n ; i++){
    int x ,y;
    cin >> x >> y;
    if(y <= t)
      vp.pb(mp(x,y));
  }
  sort(all(vp));
  if(!vp.size())
    cout << "TLE";
  else
    cout << vp[0].fr;
  return 0;
}


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

int main(){
  using namespace std;
  int n;
  long long sum=0;
  cin >> n;
  for(int i=1; i<=n; i++){
    if(i%3==0 || i%5==0) continue;
    sum+=i;
  }
  cout << sum << endl;
  return 0;
}


Measured memory_bytes: 3648
#include <stdio.h>

int main() {
    int n, m;
    scanf("%d %d", &n, &m);

    int a[n], b[n], min[n], min_index[n], i;
    for(i=0; i<n; i++) {
        scanf("%d %d", &a[i], &b[i]);
        min[i] = 500000000;
    }
    int c[m], d[m], j;
    int dist;
    for(j=0; j<m; j++) {
        scanf("%d %d", &c[j], &d[j]);
        for(i=0; i<n; i++) {
            dist=0;
            if(a[i]-c[j]<0) {
                dist = c[j]-a[i];
            } else {
                dist = a[i]-c[j];
            }
            if(b[i]-d[j]<0) {
                dist += d[j]-b[i];
            } else {
                dist += b[i]-d[j];
            }
            // printf("%d\n", dist);
            if(dist<min[i]) {
                min_index[i] = j+1;
                min[i] = dist;
            }
            // printf("%d\n", min[i]);
        }
    }

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



    return 0;
    
}

Measured memory_bytes: 128
/*input
100000
*/

#include<bits/stdc++.h>

using namespace std;

int getDigits(int x)
{
	int digits = 0;
	while(x>0){
		digits++;
		x = x/10;
	}
	return digits;
}

int main(){
	int N;
	cin>>N;
	int sum=0;
	int d = getDigits(N);

	for(int i=1; i < d; i+=2){
		// a number of odd digits
		sum += 9 * pow(10, i-1);
	}
	if(d % 2 == 1){
		// add numbers from this term as well
		sum += (N - pow(10, d-1) + 1);
	}
	cout<<sum<<"\n";
	return 0;
}


Measured memory_bytes: 256
#Tenka1 Programmer Contest-C 4/N
"""
nが与えられるので、
4/n = 1/a + 1/b + 1/c　となるa,b,cを出力せよ
なお、a,b,c<=3500となる中で1つは解があることが保証される。

多分半分全列挙のような解法になると思う

"""
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
n = int(readline())
flag = 0
for a in range(1,3501):
    for b in range(1,3501):
        try:
            c = int(a*b*n/(4*a*b-n*b-n*a))
            if c<0:
                continue
            if 4*a*b*c//(b*c+c*a+a*b)==n:
                print(a,b,c)
                flag = 1
        except:
            pass
        if flag:
            exit()


Measured memory_bytes: 41324
#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define PI acos(-1.0)
#define mod 1000000007
#define matrixDimension 50
using namespace std;
struct matrix
{
    ll mat[matrixDimension][matrixDimension];
    matrix()
    {
        memset(mat, 0, sizeof mat);
    }
};
matrix operator*(matrix x, matrix y)
{
    matrix ans;
    for(int i=0; i<matrixDimension; i++)
    {
        for(int j=0; j<matrixDimension; j++)
        {
            for(int k=0; k<matrixDimension; k++)
            {
                ans.mat[i][j]=(ans.mat[i][j]+(x.mat[i][k]*y.mat[k][j])%mod)%mod;
            }
        }
    }
    return ans;
}
matrix I;
matrix matrix_exponential(matrix M, ll x)
{
    matrix ans=I;
    while(x>0)
    {
        if(x%2)
            ans=ans*M;
        M=M*M;
        x/=2;
    }
    return ans;
}
void createIndentity()
{
    for(int i=0; i<matrixDimension; i++)
        I.mat[i][i]=1;
}

int main()
{
    createIndentity();
    ll n, m;
    cin>>n>>m;
    matrix M;
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
            scanf("%d", &M.mat[i][j]);
    }
    M=matrix_exponential(M, m);
    ll ans=0;
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            ans=(ans+M.mat[i][j])%mod;
        }
    }
    printf("%lld\n", ans);
    return 0;
}


Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
#define int long long
void Digvijay()
{
    string s,t;
    cin>>s>>t;
    int ans=1e9;
    for(int i=0;i<=s.length()-t.length();i++)
    {
        int cnt=0;
        for(int j=0;j<t.length();j++)
        {
            if(s[i+j]!=t[j])cnt++;
        }
        ans=min(ans,cnt);
    }
    cout<<ans<<"\n";
}
signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int _=1;
    //cin>>_;
    for(int __=1;__<=_;__++)
    {
        Digvijay();
    }
}



Measured memory_bytes: 3608
#include <stdio.h>
#include <math.h>

int main(){
  int cnt, i, j;
  double x[3],y[3], xp, yp, r;
  scanf("%d", &cnt);
  for(i = 0;i < cnt;i++){
    for(j = 0; j < 3; j++){
      scanf("%lf %lf", &x[j], &y[j]);
    }
    xp = ((y[0]-y[2])*(y[0]*y[0]-y[1]*y[1]+x[0]*x[0]-x[1]*x[1])-(y[0]-y[1])*(y[0]*y[0]-y[2]*y[2]+x[0]*x[0]-x[2]*x[2]))/(2*(y[0]-y[2])*(x[0]-x[1])-2*(y[0]-y[1])*(x[0]-x[2]));
    yp = ((x[0]-x[2])*(x[0]*x[0]-x[1]*x[1]+y[0]*y[0]-y[1]*y[1])-(x[0]-x[1])*(x[0]*x[0]-x[2]*x[2]+y[0]*y[0]-y[2]*y[2]))/(2*(x[0]-x[2])*(y[0]-y[1])-2*(x[0]-x[1])*(y[0]-y[2]));
    r = sqrt((x[0]-xp)*(x[0]-xp)+(y[0]-yp)*(y[0]-yp));
    
    printf("%.3f %.3f %.3f\n", xp, yp, r);
  }
  return 0;
}

Measured memory_bytes: 664
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define INF 2147483647
//static const double INF = (1 << 31)-1;

int n,l;
double d[4000000];

void update(int k,double a){
	k += n - 1;
	d[k] = a;
	while(k > 0){
		k = (k - 1)/2;
		d[k] = min(d[k*2+1], d[k*2+2]);
	}
}


double query(int a, int b, int k, int l, int r){
	if(r <= a || b <= l){
		return INF;
	}
	else if(a <= l && r <= b){
		return d[k];
	}

	double vl = query(a, b, k*2+1, l, (l + r)/2);
	double vr = query(a, b, k*2+2, (l + r)/2, r);
	return min(vl, vr);
}


double findMin(int a, int b){
	return query(a, b+1, 0, 0, n);
}

int main(){
	vector<double> v;
	int n_;
	cin >> n_ >> l;

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

	double s,x,y;
	for(int i = 0;i < n_;i++){
		cin >> x;
		update(i,x);
	}
	double ans;
	v.clear();
	for(int i = 0;i+l-1 < n_;i++){
		ans = findMin(i,i+l-1);
		v.push_back(ans);
	}

	for(int i = 0;i < n_-l+1;i++){
		if(i == n_-l){
			printf("%.0f\n",v[i]);
		}
		else{
			printf("%.0f ",v[i]);
		}
	}

	return 0;
}



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

int main(){
  ll n;
  cin>>n;
  int j=0;
  int ans=0;
  for(ll i=2;i*i<=n;i++){
    j=0;
    if(n%i==0){
      while(n%i==0){
        n/=i;
        j++;
      }
      for(int k=1;k<=200;k++){
        if(((k+1)*k)/2<=j&&j<((k+2)*(k+1))/2){
          ans+=k;
        }
      }
    }
  }
  if(n>1){
    ans++;
  }
  cout<<ans<<endl;
}

Measured memory_bytes: 3636
#include <iostream>

using namespace std;

#define max(A,B) (((A)>(B)) ? (A) : (B))
#define min(A,B) (((A)<(B)) ? (A) : (B))
#define abs(A) (((A)<0) ? (-(A)):(A))
#define celi(A,B) (((A)+(B)-1) / (B))
#define rep(i, n) for(l i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)

#define MAX_N 1510
int dp[MAX_N][MAX_N];

void solve(int tc) {
	int n, x, t;
	cin >> n >>x >> t;
	cout << celi(n, x) * t << endl;
}
signed main() {
	int T = 1, tc;
//	cin >> T;
	for (tc = 1; tc <= T; tc++) solve(tc);
}

Measured memory_bytes: 3628
#include <stdio.h>

int main(){
    int n, m;
    scanf("%d %d", &n, &m);
    if(n == 1 && m == 1) printf("1");
    else if(n == 1) printf("%d", m - 2);
    else if(m == 1) printf("%d", n - 2);
    else{
        long long int ans = (long long int)(n - 2) * (m - 2);
        printf("%lld", ans);
    }
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  long long N;
  string s;
  cin >> s;
  N = s.size() + 1;
  vector<long long> c1(N, 0);
  vector<long long> c2(N, 0);
  long long t1 = 0, t2 = 0;
  for(int i = 0; i < N - 1; i++){
    if(s.at(i) == '<'){
      t1++;
      c1.at(i + 1) = t1;
    }
    else{
      t1 = 0;
      c1.at(i + 1) = t1;
    }
    if(s.at(N - 2 - i) ==  '>'){
      t2++;
       c2.at(N - 2 - i) = t2;
    }
    else{
      t2 = 0;
      c2.at(N - 2 - i) = t2;
    }     
  }
  long long ans = 0;
  for(int i = 0; i < N; i++){
    ans += max(c1.at(i), c2.at(i));
  }
  cout << ans << endl;
}

Measured memory_bytes: 8708
#include<stdio.h>
#include<stdio.h>

void vdUppercase2Lowercase(char *chString, int iStringLength);

int main()
{
	//変数の宣言
	char chInputString[1200];	//標準入力された文字列を格納する文字列
	int iStringSize;
	int iInputStringSize;

	iStringSize = sizeof(chInputString) / sizeof(char);

	//文字列入力
	if (fgets(chInputString, iStringSize, stdin) == NULL || chInputString[0] == '\n')
	{
		return 1;
	}

	iInputStringSize = strlen(chInputString);

	//文字列の最後の'\n'→'\0'に変更
	if (chInputString[iInputStringSize - 1] == '\n')
	{
		chInputString[iInputStringSize - 1] = '\0';
		iInputStringSize--;
	}

	//大文字 - 小文字に変換
	vdUppercase2Lowercase(chInputString, iInputStringSize);

	//文字列の出力
	printf("%s\n", chInputString);

	return 0;
}

void vdUppercase2Lowercase(char* chString, int iStringLength)
{		
	int iCount = 0;
	
	for (iCount = 0; iCount < iStringLength; iCount++)
	{
		if ('a' <= chString[iCount] && chString[iCount] <= 'z')
		{
			chString[iCount] = chString[iCount] - ('a' - 'A');
		}
		else if ('A' <= chString[iCount] && chString[iCount] <= 'Z')
		{
			chString[iCount] = chString[iCount] + ('a' - 'A');
		}
		else
		{
			//何もしない
		}
	}

	return 0;
}


Measured memory_bytes: 2060
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>

// Acknowledgement: Special thanks to kyomukyomupurin, who developed this
// template.
template <class T, class U>
std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& p) {
  return os << '(' << p.first << ", " << p.second << ')';
}

template <class T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) {
  int n = 0;
  for (auto e : vec) os << (n++ ? ", " : "{") << e;
  return os << (n ? "}" : "{}");
}

template <class T>
std::ostream& operator<<(std::ostream& os, const std::set<T>& st) {
  int n = 0;
  for (auto e : st) os << (n++ ? ", " : "{") << e;
  return os << (n ? "}" : "{}");
}

template <class T, class U>
std::ostream& operator<<(std::ostream& os, const std::map<T, U>& mp) {
  int n = 0;
  for (auto e : mp) os << (n++ ? ", " : "{") << e;
  return os << (n ? "}" : "{}");
}

template <class T>
std::istream& operator>>(std::istream& is, std::vector<T>& vec) {
  for (T& e : vec) is >> e;
  return is;
}

#ifdef LOCAL
#define debug(...) \
  std::cerr << "[" << #__VA_ARGS__ << "]: ", debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif

void debug_out() { std::cerr << '\n'; }

template <class Head, class... Tail>
void debug_out(Head&& head, Tail&&... tail) {
  std::cerr << head;
  if (sizeof...(Tail) != 0) std::cerr << ", ";
  debug_out(std::forward<Tail>(tail)...);
}
using namespace std;
using int64 = long long;

constexpr int64 divide_by = (int64)1e9 + 7;

int64 repeat_squareing(int64 n, int64 p) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    int64 tmp = repeat_squareing(n, p / 2);
    return tmp * tmp % divide_by;
  } else {
    int64 tmp = repeat_squareing(n, p - 1);
    return n * tmp % divide_by;
  }
}

int64 gyakugen(int64 n) { return repeat_squareing(n, divide_by - 2); }

int64 combination(int64 n, int64 p) {
  int64 bunshi = 1;
  int64 bunbo = 1;
  for (int64 i = n; i > n - p; i--) {
    bunshi *= i;
    bunshi %= divide_by;
  }
  for (int64 i = 1; i <= p; i++) {
    bunbo *= i;
    bunbo %= divide_by;
  }
  int64 gyaku = gyakugen(bunbo);
  return bunshi * gyaku % divide_by;
}

int main() {
  int64 n;
  int64 a, b;
  cin >> n >> a >> b;
  int64 all = repeat_squareing(2, n) - 1;
  int64 comb_a = combination(n, a);
  int64 comb_b = combination(n, b);
  int64 ans = all - comb_a - comb_b;
  while (ans < 0) {
    ans += divide_by;
  }
  cout << ans % divide_by << endl;
  return 0;
}

Measured memory_bytes: 3636
#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define int ll
using namespace std;
using ll=long long;
using pii=pair<int,int>;

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

int32_t main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int n,k; cin>>n>>k;
	int now=(n-1)*(n-2)/2;
	if(now<k)
	{
		cout<<"-1\n";
		return 0;
	}
	vector<pii> v;
	For(i,2,n) v.emplace_back(1,i);
	For(i,2,n-1)
	{
		For(j,i+1,n)
		{
			if(now==k) goto END;
			now--;
			v.emplace_back(i,j);
		}
	}
END:
	cout<<sz(v)<<"\n";
	for(auto &i:v) cout<<i.F<<" "<<i.S<<"\n";
	return 0;
}















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


class Main {
    static MyScanner sc;
    static String[] app(String[]q,int v,boolean right){
        char c1=v/2==1?'#':'.';
        char c2=v%2==1?'#':'.';
        return new String[]{right?q[0]+c1:c1+q[0],right?q[1]+c2:c2+q[1]};
    }
    static boolean ask(String[]p){
        System.out.println(p[0]);
        System.out.println(p[1]);
        String res=sc.next();
        return res.equals("T");
    }
    public static void main(String[] args) {
        sc = new MyScanner();
        int n=sc.nextInt();
        int len=0;
        String[] q=new String[]{"",""};
        while(len<n){
            boolean ok=false;
            for(int i=0;i<4;++i){
                String[]nn=app(q,i,false);
                if(ask(nn)){
                    q=nn;
                    ok=true;
                    break;
                }
            }
            if(!ok)break;
            len++;
        }
        while(len<n){
            boolean ok=false;
            for(int i=0;i<4;++i){
                String[]nn=app(q,i,true);
                if(ask(nn)){
                    q=nn;
                    ok=true;
                    break;
                }
            }
            if(!ok)break;
            len++;
        }
        if(len<n)throw new Error();
    }
    // http://codeforces.com/blog/entry/7018
    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;
    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        int[] nextIntArray(int n){
            int[]r=new int[n];
            for(int i=0;i<n;++i)r[i]=nextInt();
            return r;
        }
    }
}


Measured memory_bytes: 24104
#include <bits/stdc++.h>
#define mod 1000000007
#define ll long long int
#define pb(x) push_back(x)
#define MP(x,y) make_pair(x,y)
using namespace std;
ll power(ll a,ll b,ll m)
{
    if(b==0)
        return(1);
    ll sol=power(a,b/2,m);
    sol=(sol*sol)%m;
    if(b%2==1)
        sol=(sol*a)%m;
    return(sol);
}
ll gcd(ll a,ll b)
{
	if(a%b==0)
		return b;
	else
		return gcd(b,a%b);
}

void solve()
{
    int a,b,x;
    cin>>a>>b>>x;
    if(x>=a&&x<=a+b)
    {
        cout<<"YES";
    }
    else
        cout<<"NO";

}
int main()
{
    int t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
	return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Diagnostics;
using System.Threading.Tasks;

class Sobaya
{
    static void Main(){
      new Sobaya().calc();
      return;
    }
      
    Scanner cin;
    
    void calc(){
        cin = new Scanner();
        int n = cin.nextInt();
        string s = cin.next();
        char[] k = new char[s.Length];
        for(int i=0; i<s.Length; i++){
            k[i] = (char) ((int)'A' + ((int)s[i] - (int)'A' + n)%26);
            //Console.WriteLine(k[i]);
        }
        Console.WriteLine(new string(k));

    }
}




class Scanner
{
    string[] s;
    int i;
 
    char[] cs = new char[] { ' ' };
 
    public Scanner()
    {
        s = new string[0];
        i = 0;
    }
 
    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return next();
        i = 0;
        return s[i++];
    }
 
    public int nextInt()
    {
        return int.Parse(next());
    }
    public int[] ArrayInt(int N, int add = 0)
    {
        int[] Array = new int[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextInt() + add;
        }
        return Array;
    }
 
    public long nextLong()
    {
        return long.Parse(next());
    }
 
    public long[] ArrayLong(int N, long add = 0)
    {
        long[] Array = new long[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextLong() + add;
        }
        return Array;
    }
 
    public double nextDouble()
    {
        return double.Parse(next());
    }
 
 
    public double[] ArrayDouble(int N, double add = 0)
    {
        double[] Array = new double[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextDouble() + add;
        }
        return Array;
    }
}


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

using namespace std;

int main() {
  int n, m, x;
  cin >> n >> m >> x;
  int cnt = 0;
  bool flag = true;
  while ( flag ) {
    int a;
    cin >> a;
    if ( a < x ) cnt++;
    else flag = false;
  }
  cout << min( cnt, m - cnt ) << endl;

  return 0;
}

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

int main()
{
  int n, mili;
  cin >> n >> mili;
  auto q = queue<pair<string, int>>{};
  auto res = vector<pair<string, int>>{};

  for (auto i = 0; i < n; i++)
  {
    string s;
    int time;

    cin >> s >> time;
    q.push(make_pair(s, time));
  }

  auto time = 0;
  while (!q.empty())
  {
    auto task = q.front();
    q.pop();

    if (task.second > mili)
    {
      q.push(make_pair(task.first, task.second - mili));
      time += mili;
      continue;
    }
    else
    {
      time += task.second;
      res.push_back(make_pair(task.first, time));
    }
  }

  for (auto i : res)
  {
    cout << i.first << " " << i.second << endl;
  }

  return 0;
}



Measured memory_bytes: 7000
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
typedef pair<int, int> P;
typedef vector<vector<int>> Matrix;
static const int INF = 2000000000;



int main(){
  int x, y;
  cin >> x >>y;
  
  auto f = [&](int c){
    if (c==2) return 1;
    else if (c==4 || c==6 || c==9 || c==11) return 2;
    else return 3;
  };

  int a = f(x);
  int b = f(y);

  if (a == b) cout << "Yes\n";
  else cout << "No\n";
}

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


a_min = float("inf")
a_max = 0
a_diff = 0

ans = 0
a_diff = -1

for a in A:

    hasModefied = False
    if a_min > a:
        a_min = a
        a_max = a
    if a_max < a:
        a_max = a
        hasModefied = True
        
    if hasModefied:
        if a_diff == a_max-a_min:
            ans += 1
        elif a_diff < a_max-a_min:
            a_diff = a_max - a_min
            ans = 1
            
print(ans)

Measured memory_bytes: 15020
#include<bits/stdc++.h>
#include"atcoder/all"
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using namespace atcoder;
int main(){
  int N,M,i,a,b;scanf("%d%d",&N,&M);
  int ans = N-1;
  dsu D(100000);
  for(i=0;i<M;i++){
    scanf("%d%d",&a,&b);a--;b--;
    if(!D.same(a,b)){
      ans--;
      D.merge(a,b);
    }
  }
  printf("%d\n",ans);
}

Measured memory_bytes: 3852
#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
#define allR(v) v.rbegin(), v.rend()
#define PRINT(v) for (auto x : (v)) cout <<x <<" " ; cout <<endl;
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
typedef pair<int,int> Pi;
const ll MOD = 1000000007;
const ll INF = 10000000000000000;
const int inf = 1001001001;
vector<int> x4 = {0, 1, 0, -1}, x8 = {0, 1, 1, 1, 0, -1, -1, -1};
vector<int> y4 = {1, 0, -1, 0}, y8 = {1, 1, 0, -1, -1, -1, 0, 1};
template<class T> inline bool chmin(T& a, T b){if (a>b){a = b; return true;}return false;}
template<class T> inline bool chmax(T& a, T b){if (a<b){a = b; return true;}return false;}
template<class T> inline T powerM(T a,T b){if (b==0) return 1;
T tmp = powerM(a,b/2); if (b%2==0) return tmp*tmp%MOD; else return tmp*tmp%MOD*a%MOD; }
template<class T> inline T power(T a,T b,T m){ if (b==0) return 1;
  T tmp = power(a,b/2,m); if (b%2==0) return tmp*tmp%m; else return tmp*tmp%m*a%m; }
template<class T> inline T gcd(T a, T b){if (b==0) return a; return gcd(b, a%b);}
template<class T> inline T lcm(T a, T b){return a / gcd(a,b) * b;}
// ax+by=gcd(a,b)を解く
template<class T> inline T extgcd(T a,T b,T &x,T &y){if (b==0){x=1; y=0; return a;} T d=extgcd(b,a%b,y,x); y -= a/b*x; return d;}
void hey(){ cout <<"hey" <<endl; }

template<class T> struct edge { int to; T cost;};

/*
『中央値が k 以下である』と『 k 以下の数が M/2 個より多い』が同値である
真の中央値は、この条件を満たす k の中で最小の数

値xが中央値となりうる：
うまいこと数列を決めた時に、条件を満たすkの最小値がxになりうる

*/

int main() {
  int N; cin >>N;
  vector<pair<ll,ll>> BA(N),AB(N);
  vector<ll> A(N),B(N); rep(i, N) cin >>A[i] >>B[i];
  rep(i, N) BA[i] = {B[i], A[i]};
  rep(i, N) AB[i] = {A[i], B[i]};
  // rep(i, N){ A[i] *= 2; B[i] *= 2; }
  // Xi は 偶数値のみを取りうる、とする
  if (N%2 == 1){
    sort(all(BA));
    sort(all(AB));
    ll res = BA[N/2].first - AB[N/2].first + 1;
    cout <<res <<endl; return 0;
  }else{
    sort(all(BA));
    sort(all(AB));
    ll larger1,larger2,smaller1,smaller2;
    larger1 = AB[N/2].first;
    larger2 = BA[N/2].first;
    smaller1 = AB[N/2-1].first;
    smaller2 = BA[N/2-1].first;
    // X[N/2]が取りうる値は larger1 - larger2
    // X[N/2-1]が取りうる値は smaller1 - smaller2
    ll res = (larger2+smaller2) - (larger1+smaller1) + 1;
    cout <<res <<endl; return 0;
    // Nが偶数であれば中央値はソートして(X[N/2-1] + X[N/2]) / 2 ということになる
    /*
    値xが中央値を取る場合、ソートした時の並びが
    ? ? ? ? a b ? ? ? ? となり、なおかつa + b / 2 = x となる
    */
  }
  // 値xが中央値を取りうるか？という問題に帰着したい
  // 値x以下をとりうるもの、値x以上をとりうるものが両方ともN/2子あればよい？
}


Measured memory_bytes: 12744
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  //input&compute
  long long s; cin>>s;
  long S=s;
  int digit=0;
  while(S!=0){
    S/=10;
    digit++;
  }
  vector<long long>vec(digit);
  for(int i=0;i<digit;i++){
    vec[i]=s%10;
    s/=10;
  }
  reverse(vec.begin(),vec.end());
  
  vector<long long>vecABS(vec.size()-2);
  for(int i=0;i<vec.size()-2;i++){
    int num=0;
    num=vec[i]*100+vec[i+1]*10+vec[i+2];
    vecABS[i]=abs(num-753);
  }
  
  sort(vecABS.begin(),vecABS.end());
  
  //output
    cout<<vecABS[0]<<endl;
  
}
  



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif

struct dsu {
    vector<int> p;
    vector<int> sz;
    int n;

    dsu(int _n) : n(_n) {
        p.resize(n);
        iota(p.begin(), p.end(), 0);
        sz.assign(n, 1);
    }

    inline int get(int x) {
        if (p[x] == x) {
            return x;
        } else {
            return p[x] = get(p[x]);
        }
    }
    inline bool unite(int x, int y) {
        x = get(x);
        y = get(y);
        if (x == y) {
            return false;
        }
        if (sz[x] < sz[y]) {
            swap(x, y);
        }
        p[x] = y;
        sz[y] += sz[x];
        return true;
    }
    inline bool same(int x, int y) {
        return (get(x) == get(y));
    }
};

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, m;
    cin >> n >> m;
    dsu uf(n);
    while (m--) {
        int a, b;
        cin >> a >> b;
        a--, b--;
        uf.unite(a, b);
    }
    int ans = 0;
    for (int i = 0; i <n; i++){
        ans = max(ans, uf.sz[i]);
    }
    cout << ans << '\n';
    return 0;
}

Measured memory_bytes: 4768