akhauriyash/Code-Regression huggingface dataset:
a, b = map(int, input().split())
a -= 1
b -= 1

# 上半分は'#'，下半分は'.'
B = [['#'] * 100 if i < 50 else ['.'] * 100 for i in range(100)]

# 上から49行目までを，上下左右斜めで隣接しないように'#'を'.'に塗り替える
for h in range(0, 49, 2):
    tmp = 0
    while a != 0 and tmp < 100:
        B[h][tmp] = '.'
        a -= 1
        tmp += 2

# 下から49行目までを，上下左右斜めで隣接しないように'.'を'#'に塗り替える
for h in range(51, 100, 2)[::-1]:
    tmp = 0
    while b != 0 and tmp < 100:
        B[h][tmp] = '#'
        b -= 1
        tmp += 2

print(100, 100)
for b in B:
    print(*b, sep='')

Measured memory_bytes: 4468
A,B = map(int,input().split())
def f(n):
    if n < 0:
        n = 0
    if n%2 == 0:
        res = n
        res ^= n//2%2
    else:
        res = (n+1)//2%2
    return res
print(f(B)^f(A-1))

Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
string s;
int w;
int main() {
	cin>>s>>w;
	if (w == 1) {
		cout<<s;
		return 0;
	}
	for (int i = 0; i < s.size(); i++) {
		if (i % w == 0) {
			cout<<s[i];
		}
	}
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;


int main(){
    string S;
    string A = "AAA";
    string B = "BBB";

    //input
    cin >> S;

    if(A.compare(S)  == 0 || B.compare(S) == 0){
        cout << "No" << endl;
    }else{
        cout << "Yes" << endl;
    }

    return 0;
}


Measured memory_bytes: 256
/**
  * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_4_B
  * ????????¢?????¨?????¨
  * ?????? r ???????????¢?????¨?????¨?????????????±???????????????°?????????????????????????????????
  */
object Main {
  def main(args: Array[String]): Unit = {
    val r = io.StdIn.readDouble()
    val s = math.Pi * math.pow(r, 2)
    val l = 2 * math.Pi * r
    println(f"$s%.6f $l%.6f")
  }
}

Measured memory_bytes: 43920
import itertools
n,m,q = map(int,input().split())
A = []
for i in range(q):
    A.append(list(map(int,input().split())))
cand = [i for i in range(1,m+1)]
ans = 0
for v in itertools.combinations_with_replacement(cand,n):
    total = 0
    for j in range(q):
        # print(v[A[j][1]-1], v[A[j][0]-1], A[j][2])
        if (v[A[j][1]-1] - v[A[j][0]-1]) == A[j][2]:
            total += A[j][3]
    ans = max(ans,total)
print(ans)



Measured memory_bytes: 9216
#include <stdio.h>

int main() {
	int A, B;
	scanf("%d %d", &A, &B);
	if (A >= 13) {
		printf("%d\n", B);
	}
	else if (A >= 6) {
		printf("%d\n", B / 2);
	}
	else {
		printf("0\n");
	}
	return 0;
}

Measured memory_bytes: 128
#18:27
h,w = map(int,input().split())
raw = []
n = 0
ans = []
for j in range(h):
  tmp = list(map(lambda x: int(x)%2,input().split()))
  for i in range(w-1):
    tmp[i+1] ^= tmp[i]
    n += tmp[i]
    if tmp[i] == 1:
      ans.append([j+1,i+1,j+1,i+2])
  raw.append(tmp[-1])
for j in range(h-1):
  raw[j+1] ^= raw[j]
  n += raw[j]
  if raw[j] == 1:
    ans.append([j+1,w,j+2,w])
print(n)
for k in range(n):
  print(' '.join(list(map(str,ans[k]))))

Measured memory_bytes: 27676
import bisect

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

a.sort()
c.sort()

sum = 0
for j in range(n):
  atemp = bisect.bisect_left(a, b[j])
  ctemp = n - bisect.bisect_right(c, b[j])
  sum += atemp * ctemp

print(sum)

Measured memory_bytes: 23328
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
 
int main()
{
  int  a, b, c, d, X, Y;
//  double  c;
//  long long  a, b, c, d, X, Y;
  int D, G;
  //char s[101][101]={};
  char sv[101]={};
  char ss[101]={};
//  char s_temp[101]={};
  char t[12]={};
//  char s[10000000000000000001]={};
  char s[2][100001]={};
  int len=0;
//  int N, M;
  int A[11]={};
//  long long  A[101]={};
//  long int A[1001]={};
  long long  B[101]={};
  long long  C[101]={};
  int i,j,k;
  int flag=0;
  int tmp=0;
  int min=1000;
  int cnt=0;
  double ans=1000;
  int max=-1;

  int  Cen_X=0;
  int  Cen_Y=0;
  long long  H=0;
  
  //  int ans=0;
  int str_len=0;
//  char alp[26]={'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 ans_o[1001]={};
  double N[1001]={};
  int ans_e[100001]={};
//  scanf("%lld %lld", &a, &b);
  scanf("%d", &a);
  b=0;
  for(i=0;i<a;i++){
    scanf("%d", &c);
    if(max<c) max=c;
    b=b+c;
  }
  b=b-(max/2);

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


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

#ifdef LOCAL
#define debug(var) cerr << #var << " = " << var << endl;
#else
#define debug(var)
#endif

void init() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
}

long long dp[100];

long long lucas(int n) {
	if (n == 1) return 1;
	if (n == 0) return 2;
	if (dp[n]) return dp[n];
	return dp[n] = lucas(n-1)+lucas(n-2);
}

void solve() {
	int n; scanf("%d", &n);
	//printf("%lld", lucas(n));
	long long a = 2, b = 1;
	for (int i = 2; i <= n; ++i) {
		a += b;
		swap(a, b);
	}
	printf("%lld", b);
}

int main() {
	init();
	int t = 1; //scanf("%d", &t);
	while (t--) {
		solve();
	}
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define all(x) (x).begin(),(x).end()
using namespace std;
const int INF=1145141919,MOD=1e9+7;
const int64_t LINF=8931145141919364364,LMOD=998244353;
// const int dy[]={0,-1,0,1,1,-1,-1,1};
// const int dx[]={1,0,-1,0,1,1,-1,-1};

int main() {
	int n; cin >> n;
	int64_t sum = 0;
	int64_t a[n]; rep(i,n) {cin >> a[i]; sum+=a[i];}
	int64_t ans = LINF;
	int64_t cnt = 0;
	for(int i = 0; i < n - 1; ++i) {
		cnt += a[i];
		ans = min(ans, abs(sum - cnt * 2));
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 1792
def main():
    N = int(input())
    cnt = 0 # 連続ゾロ目カウンター
    ans = 'No'

    for n in range(N):
        if len(set(map(int, input().split()))) == 1: # ゾロ目だったら
            cnt += 1
        else:
            cnt = 0
        if cnt >= 3:    # 三回連続で出たら
            ans = 'Yes'
    else:
        print(ans)

if __name__ == '__main__':
    main()

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

int main(){
    int n, m;
    cin >> n >> m;
    
    
    const int max = 50;
    int road1[max];
    int road2[max];
    vector<int> counter(n, 0);
    
    for(int i = 0; i < m; i++){
        cin >> road1[i] >> road2[i];
    }
    
    for(int i = 0; i < m; i++){
        counter[road1[i] - 1] += 1;
        counter[road2[i] - 1] += 1;
    }
    
    for(int i = 0; i < n; i++){
        cout << counter[i] << endl;
    }
}

Measured memory_bytes: 256
import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		long a[] = new long[n];
		for(int i=0;i<n;i++)
			a[i] = s.nextInt();
		
		Arrays.parallelSort(a);
		int ctr = 0;
		for(int i=0;i<n;i++) {
			for(int j=i+1;j<n;j++) {
				for(int k=j+1;k<n;k++) {
					if(a[i]+a[j]>a[k] && a[i]!=a[j] && a[j]!=a[k] && a[k]!=a[i]) {
						ctr++;
					}
				}
			}
		}
		System.out.println(ctr);
		
	}
}


Measured memory_bytes: 36352
#include <iostream>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <unordered_map>
#include <random>
#include <queue>
#include <iomanip>

#define BIG 1000000007
#define LLMAX 9223372036854775807
#define LLMIN (-9223372036854775808)
#define long long long

using namespace std;

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




Measured memory_bytes: 256
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
 
a,b = [0],[0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])
 
ans,j = 0,M
for i in range(N+1):
    if a[i]>K:
        break    
    while b[j]>K-a[i]:
        j -= 1    
    ans = max(ans,i+j)
print(ans)

Measured memory_bytes: 47376
#include <bits/stdc++.h>
#define rep(n) for(int I = 0; (I) < (n); ++(I) )
#define repeat(i, n) for( int i = 0; (i) < (n); ++(i) )
#define repeat_to(i, n) for( int i = 0; (i) <= (n); ++(i) )
#define repeat_from(i, m, n) for( int i = (m); (i) < (n); ++(i) )
#define repeat_from_to(i, m, n) for( int i = (m); (i) <= (n); ++(i) )
#define el cout<<endl
#define dump(x) cout<<" "<<#x<<"="<<x
#define vdump(v) for(size_t I=0; I<v.size(); ++I){cout<<" "<<#v<<"["<<I<<"]="<<v[I];} cout<<endl
using namespace std;
using lint = long long;
using ld = long double;

int main(void) {
    string s;
    cin >> s;
    
    auto iseven = [](string s) {
        int n = s.length();
        if (n % 2 != 0) {
            return false;
        }
        else {
            string former = s.substr(0, n/2);
            string latter = s.substr(n/2, n);
            if (former == latter) {
                return true;
            }
            else {
                return false;
            }
        }
    };
    
    int n = s.length();
    for(int i = n-1; i >= 1; --i) {
        string sub_s = s.substr(0, i);
        if (iseven(sub_s)) {
            cout << i << endl;
            break;
        }
    }
    return 0;
}   

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

flag=[False]*n
result=[0]*n
result[0]=1

temp=[]
for _ in range(m):
    l=list(map(int,input().split()))
    temp.append(l)

res_flag=0
if n == 1 and m == 0:
    print("0")
    res_flag=1

for i in range(len(temp)):
    if temp[i][0]==1 and temp[i][1]==0 and n != 1:
        print("-1")
        res_flag=1
        break
    else:
        if flag[temp[i][0]-1]==True and result[temp[i][0]-1] != temp[i][1]:
            print("-1")
            res_flag=1
            break
        else:
            result[temp[i][0]-1]=temp[i][1]
            flag[temp[i][0]-1]=True

f_res=map(str,result)
if res_flag==0:
    print("".join(f_res))

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
int i_max(int arr[],int n){
    int MAX=arr[0];
   int  i1=0,i2=0;
    for (int i= 0;i<n;i++)
    {
        if (arr[i]>MAX)
        {
            MAX =arr[i];
            i1=i;
            i2=i;
        }
        else if (arr[i]==MAX)
        {
            i2=i;
        }
   }
    return max(i1,i2);
}
int i_min(long long int arr[],int n,int& i1,int& i2){
    long long int min=arr[0];
    i1=0;
    i2=0;
     for (int i= 0;i<n;i++)
     {
         if (arr[i]<min)
         {
             min =arr[i];
             i1=i;
             i2=i;
         }
         else if (arr[i]==min)
         {
             i2=i;
         }
    }
     return max(i1,i2);
}

int main (){
    // two magical lines to speed up IO
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    int a,b,c,d;
    cin >>a>>b>>c>>d;
    if (a<=c){
        if (d<=b){
            cout <<(d-c);
        }
        else if (b<d && b>c)
        {
            cout <<(b-c);
        }
        else
            cout <<0;
    }

if (a>c){
        if (d>=b){
            cout <<(b-a);
        }
        else if (b>d && d>a)
        {
            cout <<(d-a);
        }
        else
            cout <<0;
    }
    cout <<endl;
}
 // a c d b
            //a c b d
            // a b c d
  


Measured memory_bytes: 256
#include <stdio.h>
int main(){
 
  int d1[6],d2[6],i,j,blank;
 
  for(i = 0; i < 6; i++){
 
    scanf("%d",&d1[i]);
     
  }
   
  for(i = 0; i < 6; i++){
     
    scanf("%d",&d2[i]);
     
  }
 
  for(i = 0; d1[1] != d2[1] && i < 3; i++){
     
    //3S
    blank=d2[0];
    d2[0]=d2[4];
    d2[4]=d2[5];
    d2[5]=d2[1];
    d2[1]=blank;
     
  }
   
  if(d1[1] != d2[1]){
     
    //1E
    blank=d2[0];
    d2[0]=d2[3];
    d2[3]=d2[5];
    d2[5]=d2[2];
    d2[2]=blank;
 
    for(i = 0; d1[1] != d2[1] && i < 3; i++){
 
      //3S
      blank=d2[0];
      d2[0]=d2[4];
      d2[4]=d2[5];
      d2[5]=d2[1];
      d2[1]=blank;
 
    }
 
  }
 
  if(d1[1] != d2[1]){
 
    printf("No\n");
 
    return 0;
 
  }
   
  for(i = 0; d1[0] != d2[0]; i++){
     
    //3E
    blank=d2[0];
    d2[0]=d2[3];
    d2[3]=d2[5];
    d2[5]=d2[2];
    d2[2]=blank;
 
  }
 
  if(d1[0] != d2[0]){
     
    printf("No\n");
     
    return 0;
     
  }
 
  if(d1[2] == d2[2] && d1[3] == d2[3] && d1[4] == d2[4] && d1[5] == d2[5]){
 
    printf("Yes\n");
 
  } else {
 
    printf("No\n");
 
  }
 
  return 0;
 
}
                      


Measured memory_bytes: 2104
from collections import defaultdict
S = input()
T = input()

dicS = defaultdict(int)
dicT = defaultdict(int)
for s, t in zip(S, T):
    dicS[s] += 1
    dicT[t] += 1
    if dicS[s] != dicT[t]:
        print('No')
        exit()
print('Yes')


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

#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}
#define Yes(condition) if(condition){cout << "Yes" << endl;}else{cout << "No" << endl;}
#define Cout(x) cout<<(x)<<endl
#define POSSIBLE(condition) if(condition){cout << "POSSIBLE" << endl;}else{cout << "IMPOSSIBLE" << endl;}
#define Possible(condition) if(condition){cout << "Possible" << endl;}else{cout << "Impossible" << endl;}
#define possible(condition) if(condition){cout << "possible" << endl;}else{cout << "impossible" << endl;}
#define Size(n) (n).size()

typedef long long ll;


using namespace std;

const int INF = 1e9,MOD = 1e9 + 7,ohara = 1e6;
const ll LINF = 1e18;


long long int n,cnt=0,ans=0,a,b,c,d,cmp,cmpp,m,h,w,x,y,sum[600][600],pos,q,ma[ohara];
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl=true;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

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

      scanf("%d %d %d",&n,&m,&q);

      map<ll,ll> kazu;
      rep(i,m){
        scanf("%d %d",&a,&b);
        if(ma[a]<=b)ma[a]=b;
        kazu[a]++;
        sum[a][b]++;
      }

      rep(i,n){
        rep(j,n){
          sum[i][j+2]+=sum[i][j+1];
        }
      }

      rep(i,q){
        scanf("%d %d",&a,&b);
        cnt=0;
        rrep(j,a,n+1){
          if(ma[j]<=b){ans+=kazu[j];}
          else{
           cnt=sum[j][n]-sum[j][b];
            ans+=kazu[j]-cnt;
          }
        }
        printf("%d\n",ans);
        ans=0;
      }
     

       
return 0;
}


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

int a[200002], b[200002];
signed main(){
	int n, q, s, t, ans = 0;
	scanf("%lld%lld%lld%lld", &n, &q, &s, &t);
	for(int i = 0;i <= n;i++)scanf("%lld", &a[i]);
	for(int i = 1;i <= n;i++){
		b[i] = a[i]-a[i-1]; 
		int d = abs(a[i-1]-a[i]);
		if(a[i-1] < a[i])ans -= d*s;
		else ans += d*t;
	}
	
	int l, r, x, d[4];
	while(q--){
		fill(d, d+4, 0);
		scanf("%lld%lld%lld", &l, &r, &x);
		if(0 < b[l])d[0] = -b[l]*s;
		else d[0] = -b[l]*t;
		if(r != n && 0 < b[r+1])d[1] = -b[r+1]*s;
		if(r != n && 0 >= b[r+1])d[1] = -b[r+1]*t;
		
		b[l] += x;
		if(r != n)b[r+1] -= x;
		
		if(0 < b[l])d[2] = -b[l]*s;
		else d[2] = -b[l]*t;
		if(r != n && 0 < b[r+1])d[3] = -b[r+1]*s;
		if(r != n && 0 >= b[r+1])d[3] = -b[r+1]*t;
		
		ans += d[2]-d[0];
		ans += d[3]-d[1];
		printf("%lld\n", ans);
	}
	return 0;
}


Measured memory_bytes: 6348
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(int i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(int i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define uniq(x) (x).erase(unique((x).begin(), (x).end()), (x).end())

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int N;
    cin >> N;
    vector<int> a(N);
    rep(i, N) cin >> a[i];
    int l = INT_MAX, r = INT_MIN, li = -1, ri = -1;
    vector<pair<int, int>> ans;
    
    rep(i, N) {
        if (l > a[i]) {
            l = a[i];
            li = i;
        }
        
        if (r < a[i]) {
            r = a[i];
            ri = i;
        }
    }
    
    if ((l == 0) && (r == 0)) {
        printf("0\n");
        return 0;
    }
    
    if ((l < 0) && (r < 0)) {
        rrep(i, N - 1) {
            ans.emplace_back(i + 1, i);
        }
    }
    else if ((l > 0) && (r > 0)) {
        rep(i, N - 1) {
            ans.emplace_back(i, i + 1);
        }
    }
    else {
        if (abs(l) > abs(r)) {
            rep(i, N) {
                if (i == li) {
                    continue;
                }
                
                ans.emplace_back(li, i);
            }
            
            rrep(i, N - 1) {
                ans.emplace_back(i + 1, i);
            }
        }
        else {
            rep(i, N) {
                if (i == ri) {
                    continue;
                }
                
                ans.emplace_back(ri, i);
            }
            
            rep(i, N - 1) {
                ans.emplace_back(i, i + 1);
            }
        }
    }
    
    printf("%d\n", sz(ans));
    
    rep(i, sz(ans)) {
        printf("%d %d\n", ans[i].first + 1, ans[i].second + 1);
    }
    
    return 0;
}

Measured memory_bytes: 256
#pragma warning disable IDE0011
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using static System.Convert;
using static System.Math;
using static Extentions;

class IO
{
    int idx;
    string[] line;

    public void R(params char[] sep) { line = Console.ReadLine().Split(sep); idx = 0; }
    public string S => line[idx++];
    public string[] Ss => line.Skip(idx++).ToArray();
    public char C => char.Parse(line[idx++]);
    public char[] Cs => line.Skip(idx++).Select(char.Parse).ToArray();
    public int I => int.Parse(line[idx++]);
    public int[] Is => line.Skip(idx++).Select(int.Parse).ToArray();
    public long L => long.Parse(line[idx++]);
    public long[] Ls => line.Skip(idx++).Select(long.Parse).ToArray();
    public double F => double.Parse(line[idx++]);
    public double[] Fs => line.Skip(idx++).Select(double.Parse).ToArray();
    public decimal D => decimal.Parse(line[idx++]);
    public decimal[] Ds => line.Skip(idx++).Select(decimal.Parse).ToArray();
    public BigInteger B => BigInteger.Parse(line[idx++]);
    public BigInteger[] Bs => line.Skip(idx++).Select(BigInteger.Parse).ToArray();

    public void Write(params object[] xs)
    {
        Console.Write(xs.First());
        foreach (var x in xs.Skip(1)) Console.Write(" " + x);
        Console.WriteLine();
    }
}

static class Extentions
{
}

static class Program
{
    static void Main()
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        Solve(new IO());
        Console.Out.Flush();
    }

    static void Solve(IO io)
    {
        io.R();
        var s = io.S;
        do { s = s.Remove(s.Length - 2); } while (!Check(s));
        io.Write(s.Length);
    }

    static bool Check(string s)
    {
        if (s.Length % 2 != 0) return false;
        return s.Substring(s.Length / 2) == s.Substring(0, s.Length / 2);
    }
}

Measured memory_bytes: 13268
# D - Non-decreasing

import math

N = int(raw_input())
a = map(int, raw_input().split())
a_abs = [ math.fabs(i) for i in a ]
a_start = a_abs.index(max(a_abs))

if a[a_start] > 0:
  print N*2
  for message in range(2): print str(a_start+1) + " 1"
  for i in range(1, N):
    for message in range(2): print str(i) + " " + str(i+1)
elif a[a_start] < 0:
  print N*2
  for message in range(2): print str(a_start+1) + " " + str(N)
  for i in range(N-1, 0, -1):
    for message in range(2): print str(i+1) + " " + str(i)
else: print 0

Measured memory_bytes: 2948
#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define FAST ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);srand(time(NULL))
int main()
{
     ll n,k;
     cin>>n>>k;
     ll ans = 0;
     for(ll i=0;i<n;i++)
     {
          ll x;
          cin>>x;
          if(x>=k)   ans++;
     }
     cout<<ans;
}

Measured memory_bytes: 256
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<vector>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<functional>
#include<algorithm>
#include<bitset>
#include<utility>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
using namespace std;
int n,x;
long long l[105],d[105];
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>n>>x;
	for(int i=1;i<=n;i++)
		cin>>l[i];
	for(int i=1;i<=n;i++)
		d[i]=d[i-1]+l[i];
	cout<<upper_bound(d,d+n+1,x)-d;
	return 0;
}

Measured memory_bytes: 256
#include <iostream>

using namespace std;

int main(int argc, char* argv[]) {
    int N, M, X, Y;
    std::cin >> N >> M >> X >> Y;

    int x[N];
    for (int i = 0; i < N; i++) {
        std::cin >> x[i];
    }
    int y[M];
    for (int i = 0; i < M; i++) {
        std::cin >> y[i];
    }

    if (X >= Y) {
        std::cout << "War" << std::endl;
        return 0;
    }

    // X < Y
    //std::cout << X + 1 << " 0 " << Y << std::endl;
    for (int z = X + 1; z <= Y; z++) {
        bool xfailed = false;
        bool yfailed = false;
        //std::cout << " z " << z  << std::endl;
        for (int i = 0; i < N; i++) {
            if (x[i] < z) {
                //std::cout << z << " a " << x[i] << std::endl;
            } else {
                xfailed = true;
                break;
            }
        }
        if (xfailed) continue;
        for (int i = 0; i < M; i++) {
            if (y[i] >= z) {
                //std::cout << z << " b " << x[i] << std::endl;
            } else {
                yfailed = true;
                break;
            }
        }
        if (yfailed == false) {
            std::cout << "No War" << std::endl;
            return 0;
        }
    }
    std::cout << "War" << std::endl;

    return 0;
}

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

using namespace std;

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

    double ans = 0.0;
    for(int p=1;p<=N;p++) {
        double prob = 1.0/double(N);

        int now = p;
        while(now < K) {
            prob /= 2;
            now *= 2;
        }
        ans += prob;
    }
    cout << setprecision(10) << ans << endl;
    return 0;
}



Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <iterator>
#include <numeric>
#include <bitset>
#include <cassert>
#include <functional>

using namespace std;
typedef long long int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << (x) << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)

int main() {
	int N, K;
	cin >> N >> K;
	int judge;
	if (N % 2 == 0) {
		judge = N / 2;
	}
	else {
		judge = N / 2 + 1;
	}
	if (K <= judge) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
	return 0;
}

Measured memory_bytes: 256
import java.util.*;

public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		int age = Integer.parseInt(sc.next());
        int cost = Integer.parseInt(sc.next());
      if (age <= 5) {
        System.out.println(0);
    } else if (age <= 12) {
        System.out.println(cost/2);
    } else {
    	System.out.println(cost);
    }
  }
}

Measured memory_bytes: 23124
# ABC088D - Grid Repainting
import sys
input = sys.stdin.readline

from collections import deque

def bfs() -> None:
    q = deque([(0, 0)])
    while q:
        x, y = q.popleft()
        for dx, dy in dxy:
            nx, ny = x + dx, y + dy  # next x, y
            if 0 <= nx < H and 0 <= ny < W and S[nx][ny] == "." and dist[nx][ny] == 0:
                q += [(nx, ny)]
                dist[nx][ny] = dist[x][y] + 1


def main():
    global H, W, S, dist, dxy
    H, W = tuple(map(int, input().split()))
    S = tuple(input().rstrip() for _ in range(H))
    dist = [[0] * W for _ in range(H)]  # distance from (0, 0) to (x, y)
    dist[0][0] = 1
    dxy = [(1, 0), (-1, 0), (0, 1), (0, -1)]
    bfs()
    white, x = sum(s.count(".") for s in S), dist[-1][-1]
    ans = white - x if x else -1
    print(ans)


if __name__ == "__main__":
    main()

Measured memory_bytes: 3440
#include<iostream>
#include<string>
#include<vector>
#include<map>

using namespace std;

class team {
public:
	int kasu[4];
	team(int a, int b, int c, int d){
		
		kasu[0] = a;//id
		kasu[1] = b;//????±?
		kasu[2] = c;//??£?§£
		kasu[3] = d;//??????
	}
	int back(int a) {
		return kasu[a];
	}
};

vector<team> t;
map<int, int> mp;
vector<int> res;
vector<vector<int>> l (10, vector<int>(0));
int n;

int val(int x, int y) {
	for (int i = 0; i < y; i++) {
		x /= 10;
	}
	return x % 10;
}

void kitei(int x, int y) {//???????????????????????°, ???
	for (int i = 0; i < 10; i++) {
		l[i].push_back(-1);
	}
	for (int i = 0; i < 10; i++) {
		while (l[i][0] != -1) {
			l[val(t[l[i][0]].kasu[x], y)].push_back(l[i][0]);//?????°??????????????????????????£??????
			l[i].erase(l[i].begin());//?¶????
		}
		l[i].erase(l[i].begin());
	}
	return;
}

int main() {
	while (1) {
		cin >> n;
		if (n == 0)
			break;
		for (int i = 0; i < n; i++) {
			int a, b, c, d;
			cin >> a >> b >> c >> d;
			t.emplace_back(a, b, c, d);
			l[0].push_back(i);
		}

		for (int i = 0; i < 6; i++) {
			kitei(0, i);
		}

		for (int i = 0; i < 6; i++) {//??????????????£????????????
			kitei(3, i);
		}
		kitei(2, 0);
		int num = 0;
		for (int i = 9; i >= 0; i--) {
			for (int j = 0; j < l[i].size(); j++) {
				if (num < 10) {
					if (mp[t[l[i][j]].kasu[1]] < 3) {
						res.push_back(t[l[i][j]].kasu[0]);
						num++;
						mp[t[l[i][j]].kasu[1]]++;
					}
				}
				else if (num < 20) {
					if (mp[t[l[i][j]].kasu[1]] < 2) {
						res.push_back(t[l[i][j]].kasu[0]);
						num++;
						mp[t[l[i][j]].kasu[1]]++;
					}
				}
				else if (num < 26) {
					if (mp[t[l[i][j]].kasu[1]] < 1) {
						res.push_back(t[l[i][j]].kasu[0]);
						num++;
						mp[t[l[i][j]].kasu[1]]++;
					}
				}
			}
		}
		for (auto q : res) {
			cout << q << endl;
		}
		res.clear();
		mp.clear();
		t.clear();
		for (int i = 0; i < 10; i++) {
			l[i].clear();
		}
	}
	return 0;
}

Measured memory_bytes: 3140
import Text.Printf

main :: IO()
main = do
  input <- readLn
  let [s,m,h] = toTime input [60, 60]
  printf "%d:%d:%d\n" h m s

toTime :: Int -> [Int] -> [Int]
toTime s [] =[s]
toTime s units = let u:us = units
               in (s `mod` u) : toTime (s `div` u) us

Measured memory_bytes: 3748
#include <iostream>
#include <utility>
#include <algorithm>
using namespace std;
int c[500010],last[500010],ans[500010];
pair<pair<int,int>,int> p[500010];
int n,seg[1000010];
void update(int p,int val){
    for(seg[p += n] = val;p>1;p>>=1){
        seg[p>>1] = seg[p] + seg[p^1];
    }
}

int query(int l,int r){
    int res = 0;
    for(l += n,r += n; l<r;l>>=1,r>>=1){
        if(l&1) res += seg[l++];
        if(r&1) res += seg[--r];
    }
    return res;
}

int main(){
    int i,q; cin >> n >> q;
    for(i=0;i<n;i++){
        cin >> c[i]; c[i]--; last[i] = -1;
    }
    for(i=0;i<q;i++){
        int l,r; cin >> l >> r; l--; r--;
        p[i] = {{r,l},i};
    }
    sort(p,p + q);
    int r = 0;
    for(i=0;i<q;i++){
        pair<int,int> pp = p[i].first;
        while(r<=pp.first){
            if(last[c[r]]!=-1) update(last[c[r]],0);
            update(r,1);
            last[c[r]] = r; r++;
        }
        ans[p[i].second] = query(pp.second,pp.first + 1);
    }
    for(i=0;i<q;i++) cout << ans[i] << endl;
}

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

int main() {
  long N, M;
  cin >> N >> M;
  
  long A[N], B[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i] >> B[i];
  }
  
  vector<pair<long, long>> stores; //pair<price, count>
  for (int i = 0; i < N; i++) {
    pair<long, long> store = make_pair(A[i], B[i]);
    stores.push_back(store);
  }
  
  sort(stores.begin(), stores.end());
  
  long ans = 0;
  for (auto store : stores){
    ans += store.first * min(store.second, M);
    M -= min(store.second, M);
    if (M == 0) break;
  }
  
  cout << ans << endl;
  
  return 0;
}


Measured memory_bytes: 3956
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
d1=defaultdict(int)
d2=defaultdict(int)

ans=0
for g in range(n):
    ans+=d1[a[g]-g]
    ans+=d2[a[g]+g]
    d1[-a[g]-g]+=1
    d2[-a[g]+g]+=1
print(ans)

Measured memory_bytes: 169716
import java.util.*;

public class Main{
      public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int num1 = sc.nextInt();
            int num2 = sc.nextInt();
            int num3 = sc.nextInt();
            if(num1 == num2){
              System.out.println(num3);
            } else if(num2 == num3) {
              System.out.println(num1);
            } else {
              System.out.println(num2);
            }
      }
}

Measured memory_bytes: 23380
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

int main() {
    int H, W;
    cin >> H >> W;

    vector<string> A(H);
    vector<vector<int>> dist(H, vector<int>(W, 1e9));
    queue<pair<int, int>> q;
    for (int i = 0; i < H; i++) {
        cin >> A[i];
        for (int j = 0; j < W; j++) {
            if (A[i][j] == '#') {
                dist[i][j] = 0;
                q.emplace(i, j);
            }
        }
    }

    int output = 0;
    while (!q.empty()) {
        int h = q.front().first;
        int w = q.front().second;
        q.pop();
        for (int i = 0; i < 4; i++) {
            if (h + dx[i] < 0 || h + dx[i] >= H || w + dy[i] < 0 ||
                w + dy[i] >= W)
                continue;
            if (dist[h + dx[i]][w + dy[i]] > dist[h][w] + 1) {
                dist[h + dx[i]][w + dy[i]] = dist[h][w] + 1;
                output = max(output, dist[h][w] + 1);
                q.emplace(h + dx[i], w + dy[i]);
            }
        }
    }

    cout << output << endl;

    return 0;
}


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

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

int main(){
  int64_t x;
  cin >> x;
  
  int64_t ans;

  bool flag = false;
  
  while(!flag){
    flag = true;
    for(int i=2; i<sqrt(x); i++){
      if(x%i==0){
        flag=false; 
        break;
      }
    }
    x++;
  }

  cout << x-1;
}


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;

namespace MyProject
{
    class Program
    {
        static void Main(string[] args)
        {
#if Local
            var sw = new Stopwatch();
            sw.Start();
            Console.SetIn(new StreamReader("input.in"));
#endif

            var solver = new Solver();
            solver.Solve();
#if Local
            Console.WriteLine($"{sw.ElapsedMilliseconds}ms");
#endif
        }
    }

    class Solver
    {
        public void Solve()
        {
            var S = Console.ReadLine();
            var T = Console.ReadLine();
            var answer = Enumerable.Range(0, 3).Count(i => S[i] == T[i]);
            Console.WriteLine(answer);
        }
    }
}


Measured memory_bytes: 13268
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define zero_pad(num) setfill('0') << std::right << setw(num)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;

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

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

int main() {
    int n;
    cin >> n;
    vector<long long> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    
    long long sum = a[0];
    vector<long long> dp(n + 1, 0);
    for (int i = 1; i < n; i++) {
        if (i&1) {
            dp[i + 1] = max(dp[i - 1] + a[i], sum);
        } else {
            dp[i + 1] = max(dp[i - 1] + a[i], dp[i]);
            sum += a[i];
        }
    }
    
    cout << dp[n] << '\n';
    return 0;
}

Measured memory_bytes: 6428
/// Bismillahir Rahmanir Rahim
/* Mohammad Morsalin
   Dept of ICE, NSTU
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ll long long
#define pb push_back
#define mp make_pair
//#define endl "\n"
#define int long long
#define f0(n) for(int i=0;i<n;i++)
#define ms(x) memset(x,0,sizeof(x))
#define ms2d(x,m,n) memset(x, 0, sizeof(x[0][0]) * m * n)
#define uniq(vec) vec.resize(distance(vec.begin(),unique(vec.begin(),vec.end())))
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define pi pair<int,int>
#define tc(t) int t;cin>>t;while(t--)
#define bits(n) __builtin_popcount(n)
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define ins insert
#define ALL(v) v.begin(),v.end()
#define highest(x) numeric_limits<x>::max()
#define lowest(x) numeric_limits<x>::min()
#define Inf INFINITY
#define minv(v) *min_element(v.begin(),v.end())
#define maxv(v) *max_element(v.begin(),v.end())
#define fi first
#define se second
#define PI acos(-1)
#define sz(a) (int)a.size();
#define IOS ios::sync_with_stdio(false);
using namespace std;
int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a);}
typedef tree<pair<int, int>,null_type,less<pair<int, int>>,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset;
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int dx4[] = {0, 0, 1, -1};
int dy4[] = {1, -1, 0, 0};
const long long MOD = 1000000007;
double sq(double x) {return x*x;}
template<typename T>inline T Bigmod(T base, T power, T MOD){
    T ret=1;
    while(power)
    {
        if(power & 1)ret=(ret*base)%MOD;
        base=(base*base)%MOD;
        power>>=1;
    }
    return ret;
}

bool sortinrev(const pair<int,int> &a,
               const pair<int,int> &b)
{
       return (a.first > b.first);
}
signed main()
{
    IOS
    int n;
    cin>>n;
    vector<pair<int,int> > vp;
    for(int i=0;i<n;i++){
        int x,y;
        cin>>x>>y;
        vp.pb(mp(x,y));
    }
    bool ok=0;
    for(int i=0;i<n-2;i++){
        if(vp[i].fi==vp[i].se && vp[i+1].fi==vp[i+1].se && vp[i+2].fi==vp[i+2].se){
            ok=1;
            break;
        }
    }
    if(ok){
        cout << "Yes\n";
    }
    else{
        cout << "No\n";
    }
    return 0;
}
///Alhamdulillah


Measured memory_bytes: 3652
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
 
int main(){
    ll N,K,R,S,P;
  char T[100000];
  cin >>N>>K;
  cin>>R>>S>>P;
  cin>>T;
  
  ll ans=0;
  ll a;
  for(a=0;a<N;a++){

    
    if(a>=K){
    if(T[a]==T[a-K]){T[a]='c';}
      else{  if(T[a]=='r'){ans=ans+P;}
    if(T[a]=='s'){ans=ans+R;} 
    if(T[a]=='p'){ans=ans+S;}
      }
    }
    else{  if(T[a]=='r'){ans=ans+P;}
     if(T[a]=='s'){ans=ans+R;} 
    if(T[a]=='p'){ans=ans+S;}
        }
  }
  
   cout << ans << endl;
}


Measured memory_bytes: 384
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	public static void main(String args[]) throws Exception {
		MyScanner sc = new MyScanner();
		int n = sc.nextInt();
		int ar[] = new int[n + 1];
		
		for(int i = 2; i <= n; i++) {
			ar[sc.nextInt()]++;
		}
		
		for(int i = 1; i <= n; i++)
			System.out.println(ar[i]);
	}

	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;
		}
	}
}

Measured memory_bytes: 56008
using System;
using System.Collections;
using System.Collections.Generic;

class Program {
    static void Main (string[] args) {
        long N = long.Parse (Console.ReadLine ());
        long AC = 0;
        long WA = 0;
        long TLE = 0;
        long RE = 0;
        for (int i = 0; i < N; i++) {
            var s = Console.ReadLine ();
            if (s == "AC") {
                AC++;
            } else if (s == "WA") {
                WA++;
            } else if (s == "TLE") {
                TLE++;
            } else {
                RE++;
            }
        }
        Console.Write ("AC x ");
        Console.WriteLine (AC);

        Console.Write ("WA x ");
        Console.WriteLine (WA);

        Console.Write ("TLE x ");
        Console.WriteLine (TLE);

        Console.Write ("RE x ");
        Console.WriteLine (RE);
    }

}

//dotnet run --project test

Measured memory_bytes: 30632
import java.io.*
import java.util.*
import java.lang.*
import java.lang.Math.*


fun solve() {
    val S = rd.readString()
    val N = S.length

    val hist = IntArray(26){0}
    for (i in 0 until N) {
        hist[S[i]-'a']++
    }

    var ans = 1 + N.toLong() * (N-1)/2
    for (c in 'a' .. 'z') {
        val z = hist[c-'a'].toLong()
        ans -= z * (z-1) / 2
    }

    println(ans)
}


//val rd = debug.Reader("agc", "019", "b", "sample-1")
val rd = Reader()


fun main(args: Array<String>) {
    try {
        var exception: Throwable? = null
        val sth = Thread(null, SolveThread(), "solveThread", 128 * 1024 * 1024)
        sth.setUncaughtExceptionHandler { _, e -> exception = e }
        sth.start(); sth.join()
        if (exception != null) throw exception!!
    } catch (e: Exception) { throw e }
}
const val MOD = 1_000_000_007L; const val INF = Int.MAX_VALUE/2; const val LINF = Long.MAX_VALUE/2
data class IntPair(val first: Int, val second: Int); data class LongPair(val first: Long, val second: Long)
val errPrintln: (Any) -> Unit = { msg -> System.err.println(msg) }
fun rAssert(exp: Boolean, lazyMsg: () -> String = {""}) {
    if (!exp) { val msg = lazyMsg(); errPrintln("EAssert Error: $msg"); throw Error(msg) }
}
fun tAssert(exp: Boolean, lazyMsg: () -> String = {""}) {
    if (!exp) { val msg = lazyMsg(); errPrintln("TAssert Error: $msg"); Thread.sleep(3000) }
}
class SolveThread : Runnable {
    override fun run() { solve() }
}
class Reader {
    private val br = BufferedReader(InputStreamReader(System.`in`))
    val readString: () -> String = { br.readLine() }
    val readInt: () -> Int = { br.readLine().toInt() }
    val readLong: () -> Long = { br.readLine().toLong() }
    val readIntArray: () -> IntArray = { br.readLine().split(' ').map { it.toInt() }.toIntArray() }
    val readLongArray: () -> LongArray = { br.readLine().split(' ').map { it.toLong() }.toLongArray() }
    val readListInt: () -> List<Int> = { br.readLine().split(' ').map { it.toInt() } }
    val readListLong: () -> List<Long> = { br.readLine().split(' ').map { it.toLong() } }
}


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

#define int long long
typedef pair<int, int> P;
#define mod 1000000007
#define INF (1LL<<60)
 
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define rep1(i,a,n) for(int i=(a), i##_len=(n); i<i##_len; ++i)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define YES puts("YES")
#define Yes puts("Yes")
#define NO  puts("NO")
#define No  puts("No")
#define ALL(v) (v).begin(), (v).end()
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
 
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };
 
 
#if 1
//-------------
// DUMPマクロ
// https://www.creativ.xyz/dump-cpp-652/
 
// vector
template <typename T>
istream& operator>>(istream& is, vector<T>& vec) {
    for (T& x : vec) is >> x;
    return is;
}
// pair
template <typename T, typename U>
ostream& operator<<(ostream& os, pair<T, U>& pair_var) {
    os << "(" << pair_var.first << ", " << pair_var.second << ")";
    return os;
}
// vector
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
    os << "{";
    for (int i = 0; i < vec.size(); i++) {
        os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
    }
    os << "}";
    return os;
}
// map
template <typename T, typename U>
ostream& operator<<(ostream& os, map<T, U>& map_var) {
    os << "{";
    repi(itr, map_var) {
        os << *itr;
        itr++;
        if (itr != map_var.end()) os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
// set
template <typename T>
ostream& operator<<(ostream& os, set<T>& set_var) {
    os << "{";
    repi(itr, set_var) {
        os << *itr;
        itr++;
        if (itr != set_var.end()) os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
 
#define DUMPOUT cerr
 
void dump_func() {
    DUMPOUT << endl;
}
template <class Head, class... Tail>
void dump_func(Head&& head, Tail&& ... tail) {
    DUMPOUT << head;
    if (sizeof...(Tail) > 0) {
        DUMPOUT << ", ";
    }
    dump_func(std::move(tail)...);
}
#ifdef DEBUG
#define DEB
#define dump(...)                                                              \
    DUMPOUT << "  " << string(#__VA_ARGS__) << ": "                            \
            << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]"        \
            << endl                                                            \
            << "    ",                                                         \
        dump_func(__VA_ARGS__)
#else
#define DEB if (false)
#define dump(...)
#endif
#endif



void solve(){
    string S;
    cin >> S;
    rep(i,S.size()){
        cout << "x";
    }
    cout << endl;
}

signed main(){
    cout << fixed << setprecision(18);
    cerr << fixed << setprecision(18);
    solve();
}


Measured memory_bytes: 256
h, w = map(int, input().split())
mat = [[0 for i in range(w)] for j in range(h)]
for i in range(h):
    mat[i] = list(map(int, input().split()))

cnt = 0
ans = []
for y in range(h):
    if y % 2 == 0:
        for x in range(w):
            if y == h-1 and x == w-1:
                break
            if x == w-1 and mat[y][x] % 2 == 1:
                mat[y][x] -= 1
                mat[y+1][x] += 1
                cnt += 1
                ans.append([y+1, x+1, y+2, x+1])
            elif mat[y][x] % 2 == 1:
                mat[y][x] -= 1
                mat[y][x+1] += 1
                cnt += 1
                ans.append([y+1, x+1, y+1, x+2])
    else:
        for x in reversed(range(w)):
            if y == h-1 and x == 0:
                break
            if x == 0 and mat[y][x] % 2 == 1:
                mat[y][x] -= 1
                mat[y+1][x] += 1
                cnt += 1
                ans.append([y+1, x+1, y+2, x+1])
            elif mat[y][x] % 2 == 1:
                mat[y][x] -= 1
                mat[y][x-1] += 1
                cnt += 1
                ans.append([y+1, x+1, y+1, x])

print(cnt)
for a in ans:
    print(' '.join(str(tmp) for tmp in a))

Measured memory_bytes: 29836
n,d = map(int,input().split())
x = [list(map(int,input().split())) for _ in range(n)]
ans = 0
for i in range(n):
	for j in range(i):
		ans += (sum((a-b)**2 for a,b in zip(x[i],x[j]))**0.5).is_integer()
print(ans)

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

typedef unsigned long long ll;
#define Inf 1 << 20
#define MInf -(1 << 20)
 
#define rep(i,n) for(int i = 0;i < (int)(n);i++)
#define Rep(i,n,m) for(int i = (int)(n); i < (int)(m);i++)
#define rrep(i,n) for(int i = (int)(n - 1); i > -1;i--)
#define RRep(i,n,m) for(int i = (int)(n - 1); i > (int)(m);i--)
#define trav(a, x) for(auto& a : x)
 
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V))
#define REVERSE(V) reverse(ALL(V))
#define RSORT(V) SORT(V);REVERSE(V)
 
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;
#define yes(n) cout << ((n) ? "yes" : "no") << endl;


int main()
{
    int r;
    cin >> r;
    cout << 3 * r * r;
}



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

typedef long long ll;
using namespace std;
template<class T> inline void chmax(T &a, const T &b) {if(a < b) a = b;}
template<class T> inline void chmin(T &a, const T &b) {if(a > b) a = b;}
const long long INF = 1LL<<60;

const ll MAXN = (ll)2e3+10;
const ll DIV = (ll)1e9+7;

class Node {
   public:
   vector<long> to;
   ll group = -1;
   bool seen = false;
   bool finish = false;
   Node(){;};
};
vector<Node> vGr;
queue<int> vq;

bool bfs(int vertex) {
   for(auto el : vGr[vertex].to) {
      if (vGr[el].group<0) {
         vGr[el].group = vGr[vertex].group+1;
         vq.push(el);
      } else if (vGr[el].group == vGr[vertex].group){
         return false;
      }
   }
   return true;
}

int main(void) {
   ll N;
   cin>>N;
   vGr.resize(N);
   rep(i,N) {
      string s;
      cin>>s;
      rep(j,N) {
         if (s[j]=='1') vGr[i].to.push_back(j);
         if (s[j]=='1') vGr[j].to.push_back(i);
      }
   }

   ll ngr = 0;
   rep(st,N) {
      std::queue<int>().swap(vq);
      rep(i,N) vGr[i].group = -1;
      ll ngr_this = 0;
      vq.push(st);
      vGr[st].group = 1;
      bool flag = true;
      while(vq.size()) {
         int ne = vq.front();
         if (!bfs(ne)) {
            flag = false;
            break;
         }
         chmax(ngr_this,vGr[ne].group);
         vq.pop();
      }
      // rep(i,N) cout<<i<<" "<<vGr[i].group<<endl;
      if (flag) chmax(ngr,ngr_this);
   }
   if (ngr==0) cout<<"-1"<<endl;
   else cout<<ngr<<endl;

   // if (!flag) cout<<-1<<endl;
   // else cout<<ngr<<endl;
   return 0;
}

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

int main(){
	string s; cin >> s;
	if (s[0] == s[1] && s[1] == s[2]) cout << "Yes" << endl;
	else if (s[1] == s[2] && s[2] == s[3]) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

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

namespace ABC106_A
{
    class Program
    {
        static void Main(string[] args)
        {
            var AB = Console.ReadLine().Split().Select(int.Parse).ToArray();
            Console.WriteLine((AB[0] - 1) * (AB[1] - 1));
        }
    }
}


Measured memory_bytes: 13268