akhauriyash/Code-Regression huggingface dataset:
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

  public static void main(String[] args) {
    InputReader in = new InputReader(System.in);
    PrintWriter out = new PrintWriter(System.out);

    int n = in.nextInt();
    String s = in.next();

    int res = 0;

    for (int i = 0; i <= n - 3; i++) {
      if (s.charAt(i) == 'A' &&
          s.charAt(i + 1) == 'B' &&
          s.charAt(i + 2) == 'C') {
        res++;
        i += 2;
      }
    }

    out.println(res);

    out.close();
  }

  static class InputReader {

    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
      reader = new BufferedReader(new InputStreamReader(stream), 32768);
      tokenizer = null;
    }

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

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

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

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

Measured memory_bytes: 21972
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, e) for (int i = (int)(s); i <= (int)(e); i++)
#define printYesNo(is_ok) puts(is_ok ? "Yes" : "No");
#define printVector(v) rep(i, v.size()) cout << v[i] << endl;
using ll = long long;
using P = pair<int, int>;

struct Sieve
{
  int n;
  vector<int> f, primes;
  Sieve(int n = 1) : n(n), f(n + 1)
  {
    f[0] = f[1] = -1;
    for (ll i = 2; i <= n; ++i)
    {
      if (f[i])
        continue;
      primes.push_back(i);
      f[i] = i;
      for (ll j = i * i; j <= n; j += i)
      {
        if (!f[j])
          f[j] = i;
      }
    }
  }
  bool isPrime(int x) { return f[x] == x; }
  vector<int> factorList(int x)
  {
    vector<int> res;
    while (x != 1)
    {
      res.push_back(f[x]);
      x /= f[x];
    }
    return res;
  }
  vector<P> factor(int x)
  {
    vector<int> fl = factorList(x);
    if (fl.size() == 0)
      return {};
    vector<P> res(1, P(fl[0], 0));
    for (int p : fl)
    {
      if (res.back().first == p)
      {
        res.back().second++;
      }
      else
      {
        res.emplace_back(p, 1);
      }
    }
    return res;
  }
};

int main()
{
  int N;
  cin >> N;
  Sieve sieve(55555);
  vector<vector<int>> rest5(5);
  FOR(i, 2, 55555)
  {
    if (sieve.isPrime(i))
      rest5[i % 5].push_back(i);
  }

  rep(i, 5)
  {
    if (rest5[i].size() >= N)
    {
      rep(j, N)
      {
        cout << rest5[i][j] << " ";
      }
      cout << endl;
      return 0;
    }
  }
  return 0;
}

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

int main() {
	int i, j;
	for (i = 1; i < 10; i = i + 1) {
		for (j = 1; j < 10;j=j+1) {
			cout << i << "x" << j << "=" << i*j << endl;

		}
	}
}

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

int main()
{
    int n, m, a, b, c;

    cin >> n >> m >> c;
    
    int l[c];
    for( int i = 0; i < c; i++ )
        cin >> l[i];

    vector< vector<int> > v = vector< vector<int> >( 1001 );
    for( int i = 0; i < n; i++ )
    {
        cin >> a >> b;
        v[b].push_back(a);
    }

    int sum = 0, cnt = 0;
    for( int i = 1000; i >= 0; i-- )
        for( int j = 0; j < v[i].size(); j++ )
        {
            if( l[v[i][j]-1] > 0 )
            {
                sum += i;
                l[v[i][j]-1]--;
                cnt++;
            }
            if( cnt == m )
            {
                cout << sum << endl;
                return 0;
            }
        }

    cout << sum << endl;

    return 0;
}


Measured memory_bytes: 3904
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;

#define ll long long
#define ull unsigned long long
#define REP(i, n) for(int i=0; i<n; i++)

int main(){
    int N;
    cin >> N;
    int last;
    int inp;
    int num=0;
    bool skip = false;
    REP(i,N){
        cin >> inp;
        if(i==0) last = inp;
        else if(skip){
            skip = false;
            last = inp;
        }
        else{
            if(inp==last){
                num++;
                skip = true;
            }
            last = inp;
        }
    }

    cout << num << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define all(x) (x).begin(),(x).end()
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; }
typedef long long ll;
const long long INF = 1LL << 60;
int main()
{
    int N, K;
    cin >> N >> K;

    int ans = 0;
    rep(i, N) {
        int h;
        cin >> h;
        if (h >= K) ans++;
    }

    cout << ans << endl;
    return 0;
}

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

using namespace std;

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	string a, b, c;
	cin >> a >> b >> c;
	map<char, string> players;
	players['a'] = a, players['b'] = b, players['c'] = c;
	char turn = 'a', next_turn;
	while (1) {
		if (players[turn].size() == 0) {
			char winner;
			if (turn == 'a') winner = 'A';
			else if (turn == 'b') winner = 'B';
			else winner = 'C';
			cout << winner << '\n';
			break;
		}
		else {
			next_turn = players[turn][0];
			players[turn] = players[turn].substr(1, players[turn].size() - 1);
			turn = next_turn;
		}
	}
	return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
	int X;
	cin >> X;
	if (X >= 30)
	{
		cout<<"Yes"<<endl;
	}
	else
	{
		cout << "No" << endl;
	}
}

Measured memory_bytes: 3636
N,H=map(int,input().split())
iAB=[]
a_max=(0,0,0)
for i in range(N):
    a,b=map(int,input().split())
    iAB.append((i,a,b))
    if a_max[1]<a or (a_max[1]==a and a_max[2]>b):
        a_max=(i,a,b)

#最大ダメージの刀以外を振る意味はない
#振った場合の最大ダメージを超えるダメージを投げて出せる刀はどんどん投げる
#最大ダメージの刀を投げて1撃で倒せる状態なら投げる

#投げダメージの降順でソート
iAB.sort(key=lambda x:x[2], reverse=True)

ans=0 #攻撃回数
throw_idx=0 if a_max[0]!=iAB[0][0] else 1 #投げチェックindex

#倒すまでループ
#print(a_max,throw_idx)###########
while H>0:
    if a_max[2]>=H:
        #最大ダメージの刀を投げて1撃で倒せる状態なら投げて終わり
        #print("{0}を最後に投げてHPは{1}になった".format(a_max,H-a_max[2]))
        ans+=1
        break
    if throw_idx<N and iAB[throw_idx][2]>a_max[1]:
        #最大じゃない刀を投げる
        H-=iAB[throw_idx][2]
        #print("{0}を投げてHPは{1}になった".format(iAB[throw_idx],H))
        throw_idx+=1
        throw_idx+=1 if throw_idx<N and iAB[throw_idx][0]==a_max[0] else 0
        ans+=1
        continue
    #もう投げられるものがない
    #振りまくる(投げ分のHPは残す)
    furi=(H-a_max[2])//a_max[1] +(1 if (H-a_max[2])%a_max[1] else 0)
    #print("{0}を{1}回振ってHPは{2}になった".format(a_max,furi,furi*a_max[1]))
    ans+=furi
    H-=furi*a_max[1]
    if a_max[1]>=H:
        #1回振って倒せるなら振って終わり
        #print("{0}を最後に1回振ってHPは{1}になった".format(a_max,H-a_max[1]))
        ans+=1
        break

print(ans)

Measured memory_bytes: 21968
/*input
5
6 9 4 2 11
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie(0) , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 100900
#define INF 0x3f3f3f3f

int n , x[MAX];
int32_t main(){
	IOS;
	cin >> n;
	REP(i , 1 , n + 1) cin >> x[i];
	sort(x + 1 , x + 1 + n);
	int ans = x[1];
	REP(i , 1 , n + 0){
		if(min(ans , x[n] - ans) < min(x[i] , x[n] - x[i])) ans = x[i];
	}
	cout << x[n] << " " << ans << endl;
    return 0;
}

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

int main() {
	int n,d;
	while (1) {
		int minv = 1000001;
		cin >> n;
		if (n == 0) break;
		vector<int> a(n);
		for (int i = 0; i < n; i++) cin >> a[i];

		sort(a.begin(), a.end());
		for (int i = 0; i < (n-1); i++) {
			d = a[i + 1] - a[i];
			if (min(minv, d) == d) {
				minv = d;
			}
		}
		cout << minv << endl;
	}

}


Measured memory_bytes: 3152
#!/usr/bin/env python3
import sys


def solve(L: int):
    v = pow(L/3, 3)
    print(v)


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    L = int(next(tokens))  # type: int
    solve(L)

if __name__ == '__main__':
    main()


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

typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define REP(i, a, b) for(ll i = a; i < b; i++)
#define out(x) std::cout << x << '\n'
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define sz(x) ((int)(x).size())
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; }
const int dx[4] = { 1, 0, -1,  0 };
const int dy[4] = { 0, 1,  0, -1 };
const int INF = INT_MAX / 2;
const ll  inf = LLONG_MAX / 2;
const int mod = 1000000007;
const int MAX_N = 101010;
const long double PI = acos(-1);

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(10);
	/*------------------------------*/

	ll n, a, b;
	cin >> n >> a >> b;

	if (a > b) {
		out(0);
		return 0;
	}

	if (n == 1) {
		if (a != b) {
			out(0);
		}
		else {
			out(1);
		}
		return 0;
	}

	ll mi = a * (n - 1) + b;
	ll ma = a + (n - 1) * b;

	out(ma - mi + 1);

	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>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
	int A, B, K;
	cin >> A >> B >> K;
	vector<int> cd;
	for (int i = 1; i <= max(A, B); i++) {
		if (A % i == 0 && B % i == 0) {
			cd.push_back(i);
		}
	}
	sort(cd.begin(), cd.end(), greater<int>());
	cout << cd[K - 1];
	return 0;
}

Measured memory_bytes: 256
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    a = I()
    b = I()
    print(6 - a - b)
    return


# B
def B():
    n = I()
    s, t = input().split(' ')
    ans = []
    for i in range(n):
        ans.append(s[i])
        ans.append(t[i])
    print(''.join(ans))
    return


# C
def C():
    def GCD(a, b):
        if (b == 0):
            return a
        else:
            return GCD(b, a % b)

    a, b = LI()
    print(a * b // GCD(a, b))
    return


# D
def D():
    n = I()
    a = LI()
    cnt = 0
    for i in range(n):
        if a[i] == cnt + 1:
            cnt += 1
    if cnt == 0:
        print(-1)
    else:
        print(n - cnt)
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    D()
    return


# Solve
if __name__ == "__main__":
    D()


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

using namespace std;
typedef long long int ll;

int main() {

  int r;
  cin>>r;

  if(r< 1200){
    cout<<"ABC"<<endl;
  }else if(r>= 1200 && r < 2800){
    cout<<"ARC"<<endl;
  }else{
    cout<<"AGC"<<endl;
  }


    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
using namespace std;

#define rep(i, s) for (int i = 0; i < s; ++i)
#define all(v) (v.begin(), v.end())
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
/*
sort(sp.begin(), sp.end(), [](PAIR l, PAIR r){
        return l.first<r.first || (l.first==r.first && l.second > r.second);
        });
*/

typedef long long  ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
    int n,a,b;
    cin>>n>>a>>b;
    cout<<min(n*a,b)<<endl;





    return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(System.in);
    private static int n;

    public static void main(String[] args) {
        n = sc.nextInt();

        Point p1 = new Point(0.0, 0.0);
        Point p2 = new Point(100.0, 0.0);

        System.out.println(p1.toSring());
        koch(n, p1, p2);
        System.out.println(p2.toSring());
    }

    private static void koch(int d, Point p1, Point p2) {
        if (d == 0) {
            return;
        }

        Point s = new Point((2.0 * p1.getX() + 1.0 * p2.getX()) / 3.0, (2.0 * p1.getY() + 1.0 * p2.getY()) / 3.0);
        Point t = new Point((1.0 * p1.getX() + 2.0 * p2.getX()) / 3.0, (1.0 * p1.getY() + 2.0 * p2.getY()) / 3.0);

        Point u = calcPointU(s, t);

        koch(d - 1, p1, s);
        System.out.println(s.toSring());
        koch(d - 1, s, u);
        System.out.println(u.toSring());
        koch(d-1, u, t);
        System.out.println(t.toSring());
        koch(d - 1, t, p2);
    }

    private static Point calcPointU(Point s, Point t) {
        double cos60 = Math.cos(Math.toRadians(60));
        double sin60 = Math.sin(Math.toRadians(60));
        double xDiff = t.getX() - s.getX();
        double yDiff = t.getY() - s.getY();

        double x = xDiff * cos60 - yDiff * sin60 + s.getX();
        double y = xDiff * sin60 + yDiff * cos60 + s.getY();

        return new Point(x, y);
    }
}

class Point {
    double x;
    double y;

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public String toSring() {
        return String.format("%f %f", getX(), getY());
    }
}

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


int main() {
	
	int n;
	cin >> n;
	string s,t;
	cin >> s >> t;
	for(int i=0; i<n; i++) cout << s.at(i) << t.at(i);
	cout << endl;
	
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
constexpr ll INF = LLONG_MAX;
constexpr double DINF = DBL_MAX;
constexpr ll mod = 1e9+7;
constexpr double PI = M_PI;

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

int main(){
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
 
  string s, t = "";
  long long n;
  cin >> n >> s;
  for(size_t i = 0; i < s.size(); i++){
    t += (s[i]-'A'+n)%26+'A';
  }
  cout << t << endl;
  return 0;
}


Measured memory_bytes: 256
N, M = map(int, input().split())
AB_C = [[list(map(int, input().split())) for _ in range(2)] for _ in range(M)]

keys = []
for i, ((a, b), c) in enumerate(AB_C):
    key_flag = 0
    for c_i in c:
        key_flag |= 1<<(c_i-1)
    keys.append((a, key_flag))

dp = [[10**18 for _ in range(1<<N)] for _ in range(M+1)]
dp[0][0] = 0

for i, (price, flag) in enumerate(keys):
    for j in range(1<<N):
        dp[i+1][j] = min(
            dp[i+1][j],
            dp[i][j]
        )
        dp[i+1][j|flag] = min(
            dp[i+1][j|flag],
            dp[i+1][j] + price
        )

r = dp[M][(1<<N)-1]
print(-1 if r == 10**18 else r)

Measured memory_bytes: 80856
#include <bits/stdc++.h>
#include <iomanip>
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#define rep(i,x) for(ll i = 0;i<x;i++)
#define all(a) (a).begin(),(a).end()
#define vecin(a) rep(i,a.size())cin >> a[i]
#define vecout(a) rep(i,a.size())cout << a[i] << " "
using ll = long long;
using ld = long double;
using namespace std;
using dou = double;
const ll inf = 2147483647;
const ll INF = 1LL << 60;
const ld pi = 3.14159265358;
const ll mod = 1000000007;
typedef pair<ll,ll> P;
using graph = vector<vector<ll>>;
template<class T> inline bool chmax(T& a, T b){if(a < b){a = b; return true;}return false;}
template<class T> inline bool chmin(T& a, T b){if(a > b){a = b; return true;}return false;}
template<class T> inline bool change(T a,T b){if(a > b){swap(a,b);return true;}return false;}
ll gcd(ll a,ll b){
    if(a < b)swap(a,b);
    if(a % b == 0)return b;
    else return gcd(b,a%b);
}
//素数判定O(sqrt(N))
bool isp(ll n){
    bool res = true;
    if(n == 1)return false;
    else{
        for(ll i = 2;i * i <= n;i++){
            if(n % i == 0){
                res = false;
                break;
            }
        }
        return res;
    }
}
const ll cmax = 1000000;
ll fac[cmax], finv[cmax], inv[cmax];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < cmax; i++){
        fac[i] = fac[i - 1] * i % mod;
        inv[i] = mod - inv[mod%i] * (mod / i) % mod;
        finv[i] = finv[i - 1] * inv[i] % mod;
    }
}

// 二項係数計算
ll nCk(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
//nのm乗をMODで割ったあまりO(logN)
ll modpow(ll n,ll m,ll MOD){
    ll res = 1;
    while(m){
        if(m & 1)res = (res * n) % MOD;
        m >>= 1;
        n *= n;
        n %= MOD;
    }
    return res;
}

//printf("%.10f\n", N);
/*  vector<ll> vec = {1,2,5,6,8,9,10};
    cout << binary_search(all(vec),5) << endl; -> true*/
/*
    vector<ll> vec = {1,2,5,6,8,9,10};
    auto n = upper_bound(all(vec),4);
    cout << *n << endl; -> 5*/

//    cout << fixed << setprecision(15);

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll N;
    cin >> N;
    vector<ll> vec(10005);
    for(ll i = 1;i <= 105;i++){
        for(ll j = 1;j <= 105;j++){
            for(ll k = 1;k <= 105;k++){
                ll num = i * i + j * j + k * k + i * j + j * k + k * i;
                if(num <= 10004)vec[num]++;
            }
        }
    }
    for(ll i = 1;i <= N;i++){
        cout << vec[i] << "\n";
    }
}


Measured memory_bytes: 3640
import java.util.*;
import java.io.*;
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		
		long n  =sc.nextLong();
		long m = sc.nextLong();
		long a1 = ((n)*(n-1))/2;
		long a2 = ((m)*(m-1))/2;
		System.out.println(a1+a2);
	}
}

Measured memory_bytes: 23764
a = [input().split() for i in range(3)]
n = int(input())
b = [input() for i in range(n)]
for i in range(len(a)):
  for j in range(len(a[i])):
    for k in b:
      if int(a[i][j]) == int(k):
        a[i][j] = 0
if a[0][0] == 0 and a[0][1] == 0 and a[0][2] == 0 :
   print("Yes")
elif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0 :
   print("Yes")
elif a[1][0] == 0 and a[1][1] == 0 and a[1][2] == 0 :
   print("Yes")
elif a[2][0] == 0 and a[2][1] == 0 and a[2][2] == 0 :
   print("Yes")
elif a[0][0] == 0 and a[1][0] == 0 and a[2][0] == 0 :
   print("Yes")
elif a[0][1] == 0 and a[1][1] == 0 and a[2][1] == 0 :
   print("Yes")
elif a[0][2] == 0 and a[1][2] == 0 and a[2][2] == 0 :
   print("Yes")
elif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0 :
   print("Yes")
else:
   print("No")


Measured memory_bytes: 3064
#include <iostream>

using namespace std;

int main()
{
    int p;
    char a;
    p=700;
    for(int i=1; i<=3; i++)
    {
        cin >> a;


        if(a=='o')
            p=p+100;
        }
        if(a=='o' || a=='x')
   cout << p;


    return 0;
}


Measured memory_bytes: 256
package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int64 {
	sc.Scan()
	i, e := strconv.ParseInt(sc.Text(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	sc.Split(bufio.ScanWords)
	n := nextInt()
	m := nextInt()
	k := nextInt()
	a := make([]int64, n+10)
	b := make([]int64, m+10)
	a[0] = 0
	b[0] = 0
	for i := int64(1); i <= n; i++ {
		a[i] = a[i-1] + nextInt()
	}
	for i := int64(1); i <= m; i++ {
		b[i] = b[i-1] + nextInt()
	}
	res := int64(0)
	for i, j := int64(0), int64(m); i <= n; i++ {
		if a[i] > k {
			break
		}
		for a[i]+b[j] > k {
			j--
		}
		if i+j > res {
			res = i + j
		}
	}
	fmt.Println(res)
}


Measured memory_bytes: 8288
import java.util.Scanner;

public class Main {

	public static void main(String[] args) 
	{
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		long[] a = new long[n];
		
		long[] sumo = new long[n];
		long[] sumx = new long[n];
		//assume n is odd
		long curso = 0; long cursx = 0;
		for(int i = 0; i < n; i++)
		{
			a[i] = sc.nextLong();
			if(i%2 == 0)
			{
				curso += a[i];
			}
			else
			{
				cursx += a[i];
			}
			sumo[i] = curso;
			sumx[i] = cursx;
		}
		//start with o
		if(n==2)
		{
			System.out.println(Math.max(a[0], a[1]));
			return;
		}
		
		if(n%2!=0)
		{
			//state 0 means start with o
			long shiftxscore = 0;
			long shiftxindex = 0;
			
			long max = -999999999999999999l;
			for(int i = n-1; i >= 0; i--)
			{
				int state = i%2==0?0:1;
				long con = 0;
				
				if(state == 1)
				{
					shiftxscore += a[i]; //update if we shift from x at old best spot
				}
				
				if(state == 0)
				{ //currently o, shift to x here? (then probably shift back at best spot)
					long sofar = 0;
					if(i>0)sofar=sumo[i-1];
					
					//rest
					long noshiftback = cursx; //rest would be all of x, except before this
					if(i>0)noshiftback-=sumx[i-1];
					//if we shift back, then we would gain shiftxscore
					long consi = sofar + Math.max(noshiftback, shiftxscore);
					
//					System.out.println(i + " consider " + consi);
					max = Math.max(max, consi);
				}
				else
				{ //currently x. should we shift from x here instead?
					con=curso; //o from here on
					if(i>0)con-=sumo[i-1];
					if(con > shiftxscore)
					{
						shiftxscore = con;
						shiftxindex = i;
					}
//					System.out.println(i + " considerx " + con);
				}
//				System.out.println(i + ": " + shiftxscore);
			}
			System.out.println(max);
		}
		else
		{ //even case: shift once
			long max = -999999999999999999l;
			for(int i = 0; i < n; i++)
			{
				if(i%2==0)
				{
					long con = 0;
					if(i>0)con+=sumo[i-1];
					long contem = con;
					con+=cursx;
					if(i>0)con-=sumx[i-1];
//					if(max<con)System.out.println(i + ": " + contem + " " + cursx);
					max = Math.max(max, con);
				}
			}
			max = Math.max(max, curso);
			max = Math.max(max, cursx);
			System.out.println(max);
		}
	}

}


Measured memory_bytes: 54652
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 87;
int h[N];
vector<int> g[N];
int main()
{
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; ++i)
        cin >> h[i];
    for (int i = 0; i < m; ++i) {
        int a, b;
        cin >> a >> b;
        g[a].push_back(b);
        g[b].push_back(a);
    }
    int ans = 0;
    for (int i = 1; i <= n; ++i) {
        bool ok = 1;
        for (int j : g[i])
            if (h[j] >= h[i])
                ok = 0;
        ans += ok;
    }
    cout << ans << endl;
}


Measured memory_bytes: 9128
import java.util.Scanner;


public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		final int size = 5;
		
		int sum = 0;
		for(int i = 0; i < size; i++){
			sum += Math.max(40, sc.nextInt());
		}
		
		System.out.println(sum / size);
		
	}

}

Measured memory_bytes: 17160
#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i,n) for(int i=(0);i<(n);i++)

using namespace std;
using namespace atcoder;

typedef long long ll;

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }

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

	string s = "ACL";
	int k;
	cin >> k;

	rep(i, k) cout << s;
	cout << endl;

}


Measured memory_bytes: 3648
#pragma GCC optimize("Ofast")
  
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <string>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <unordered_set>
#include <list>
#include <tuple>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <cassert>
#include <numeric>
#include <math.h>
#include <bitset>
#include <random>
#include <regex>

using namespace std;
  
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define Fixed fixed << setprecision(14)
#define int int64_t
using pii = pair<int,int>;
constexpr int INF  = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod1 = 1e9+7; 
constexpr int mod2 = 998244353;
constexpr int dy[] = {0,1,0,-1,1,-1,-1,1};
constexpr int dx[] = {1,0,-1,0,1,1,-1,-1};
 
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }

template <class A, class B> inline A updiv(const A a,const B b){ return (a + b - 1) / b; }
template <class A, class B> inline A gcd(const A a,const B b){ return b ? gcd(b,a % b) : a; }
template <class A, class B> inline A lcm(const A a,const B b){ return a / gcd(a,b) * b; }

template <class T> using min_heap = priority_queue<T,vector<T>,greater<T> >;
template <class T> using max_heap = priority_queue<T>;
template <class A,class B> using umap = unordered_map<A,B>;


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

    int n;
    cin >> n;

    umap<string, bool> mp;
    int res = 0;

    rep(i,n){
        string s;
        cin >> s;
        if(!mp[s]){
            ++res;
        }
        mp[s] = true;
    }

    cout << res << '\n';

    return 0;
}

Measured memory_bytes: 17680
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(i,n) RREP(i,n-1,0)
#define REPL(i,m,n) for(ll i=(ll)(m); i<(ll)(n); i++)
#define repl(i,n) REPL(i,0,n)
#define all(v) v.begin(), v.end()
const int inf = 1e9+7;
const ll longinf = 1LL<<60;
const ll mod = 1e9+7;
int main() {
  ll N;
  cin >> N;
  if(N % 2 == 1) cout << 0 << endl;
  else {
    N /= 2;
    ll cnt2 = N, cnt5 = 0;
    ll tmp;
    tmp = N;
    while(tmp > 0) {
      cnt2 += tmp / 2;
      tmp /= 2;
    }
    tmp = N;
    while(tmp > 0) {
      cnt5 += tmp / 5;
      tmp /= 5;
    }
    cout << min(cnt2, cnt5) << endl;
  }
  return 0;
}


Measured memory_bytes: 256
X, K, D = map(int, input().split())
X = abs(X)

# K*Dが小さすぎる
if K * D < X:
    ans = X - (K * D)
else:
    # toutatu:何回で0を超えるか？(0ちょうどになってもよい)
    
    rest = X % D
    
    if rest==0:
        # 答えは 0 と　D　のどちらか
        # 偶奇で場合分け
        toutatu = X / D
        if (K - toutatu)%2==0:
            ans = 0
        else:
            ans = D
    
    else:
        toutatu = X // D + 1
        # 答えは |D-rest| と　|rest|　のどちらか
        # K - toutatuの偶奇で場合分け
        if (K - toutatu)%2==0:
            ans = D-rest
        # そうでないなら打ち消しあえない
        else:
            ans = rest

print(ans)


Measured memory_bytes: 9184
import bisect
N= int(input())
L = list(map(int, input().split()))

L.sort(reverse=True)

#print(L)
for i in range(N):
    L[i] *= -1
count = 0
for i in range(N-2):
    #print(i)
    for j in range(i+1, N-1):
        if -L[i] >= -L[j] * 2:
            break
        data = L[i] - L[j]
        #print(data, L[j + 1 : N])
        #print(bisect.bisect_left(L[j + 1 : N], data))
        count += bisect.bisect_left(L, data) - (j+1)

print(count)

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

int main() {
    int n , k;
    cin >> n >> k;
    vector<int> l(n);
    for (int i = 0;i < n; i++) cin >> l.at(i);
    sort(l.begin(), l.end());
    reverse(l.begin(), l.end());
    int ans = 0;
    for (int i = 0;i < k; i++) {
        ans += l.at(i);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) FOR(i, 0, (n))
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define LAR(a, b) ((a)=max((a),(b)))
#define SML(a, b) ((a)=min((a),(b)))
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using pii = pair<int, int>;
using vpii = vector<pair<int, int>>;
template<typename T>
using pque = priority_queue<T, vector<T>, greater<T>>;
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define ALL(a) (a).begin(), (a).end()
#ifdef LOCAL_DEBUG
#define DEBUG(...) printf(__VA_ARGS__)
#else
#define DEBUG(...)
#endif

char s[30] = {};

int main(){
	ll n; scanf("%lld", &n); n--;
	ll a = 1;
	FOR(k, 1, 30){
		a *= 26;
		if(n < a){
			REP(i, k){
				s[i] = 'a' + n%26;
				n /= 26;
			}
			reverse(s, s+k);
			printf("%s\n", s);
			return 0;
		} else {
			n -= a;
		}
	}
}


Measured memory_bytes: 3760
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = (1e+9) + 7;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
typedef complex<ld> Point;
const ld eps = 1e-4;
const ld pi = acos(-1.0);
typedef pair<ll, ll> LP;
typedef pair<ld, ld> LDP;
ll a[101];
int main() {
	int n; cin >> n;
	vector<ll> ans; vector<ll> rest;
	rep(i, n) {
		cin >> a[i];
	}
	if (n == 1) {
		cout << a[0] << endl; return 0;
	}
	sort(a, a + n);
	int c0 = 0, c1 = 0;
	rep(i, n) {
		if (a[i] == 0) {
			c0++;
		}
		else if (a[i] == 1)c1++;
		else rest.push_back(a[i]);
	}
	if (c0%2 && c1 == 0) {
		rep(i, c0 / 2) {
			rep(j, 2) {
				ans.push_back(0);
			}
		}
		if (!rest.empty()) {
			ans.push_back(rest[0]);
			rest.erase(rest.begin());
		}
			ans.push_back(0);
		int len = rest.size();
		if (len >= 2 && rest[len - 2] == 2 && rest[len - 1] == 3) {
			swap(rest[len - 2], rest[len - 1]);
		}
	}
	else {
		rep(i, c0 / 2) {
			rep(j, 2) {
				ans.push_back(0);
			}
		}
		if (c1)ans.push_back(1);
		if (c0 % 2)ans.push_back(0);
		rep(i, c1 - 1) {
			ans.push_back(1);
		}
		int len = rest.size();
		if (len >= 2 && rest[len - 1] == 3 && rest[len - 2] == 2) {
			swap(rest[len - 2], rest[len - 1]);
		}
	}
	rep(i, ans.size()) {
		rest.push_back(ans[i]);
	}
	rep(i, n) {
		cout << rest[i] << endl;
	}
	return 0;
}



Measured memory_bytes: 3168
#include<cstdio>
#include<deque>
#define LL long long
using namespace std;
typedef deque<int>::iterator diter;
LL n;
int cnt;
deque<int> x,y;
void solve(LL n)
{
	if(n==1) return;
	solve(n/2);
	x.push_front(++cnt); y.push_front(cnt);
	if(n&1) { x.push_front(++cnt); y.push_back(cnt); }
}
int main()
{
	scanf("%lld",&n); n++;
	solve(n);
	printf("%d\n",cnt*2);
	for(diter it=x.begin();it!=x.end();it++) printf("%d ",*it);
	for(diter it=y.begin();it!=y.end();it++) printf("%d ",*it);
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using  namespace std;
#define    ll  long long int
int main( )
{
    int n, i, x, k, mx = 0;
    map<int, int> mp;
    vector<int> v;
    cin >> n;
    for (i = 1; i <= n; i++)
    {
        cin >> x  >>k;

        mx+=abs(x-k)+1;

    }
   cout<<mx<<endl;
    return 0;
}



Measured memory_bytes: 256
#include<iostream>
#include<cstdio>
#include<cstring>
#include <cstdlib>  
#include <cmath>   
#include<cctype>
#include<string>
#include<set>
#include<iomanip>
#include <map>
#include<algorithm>
#include <functional>
#include<vector>
#include<climits>
#include<stack>
#include<queue>
#include <deque>
#include <climits>
#include <typeinfo>
#include <utility> 
#define all(x) (x).begin(),(x).end()
#define rep(i,m,n) for(int i = m;i < n;++i)
#define pb push_back
#define fore(i,a) for(auto &i:a)
#define rrep(i,m,n) for(int i = m;i >= n;--i)
#define INF INT_MAX/2
using namespace std;
using ll = long long;
using R = double;
using Data = pair<ll, vector<int>>;
const ll MOD = 1e9 + 7;
const ll inf = 1LL << 50;
struct edge { ll from; ll to; ll cost; };




int main() {
	int n, k;
	cin >> n >> k;
	string s;
	cin >> s;

	int res = 0;
	int right = 0;
	int pre = 0;
	int zerocnt = 0;
	rep(left, 0, n) {
		if (left != 0) {
			if (s[left] == '1' && s[left - 1] == '0')zerocnt--;
		}
		while (right < n) {
			if (right == 0) {
				if (s[0] == '0') {
					pre = 0;
					zerocnt++;
				}
				else pre = 1;
				right++;
			}
			else {
				if (pre == 0) {
					if (s[right] == '0') {
						++right;
						pre = 0;
					}
					else {
						++right;
						pre = 1;
					}
				}
				else {
					if (s[right] == '1') {
						++right;
						pre = 1;
					}
					else {
						if (zerocnt == k)break;
						else {
							++right;
							++zerocnt;
							pre = 0;
						}
					}
				}
			}
		}
		res = max(res, right - left);
		if (right == left) {
			++right;
			pre = s[left];
		}
	}

	cout << res << endl;
	return 0;
}

Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
using int64 = long long;
const int mod = 1e9 + 7;
const long long INF = 1e18;
#define PI 3.141592653589793
int W;
int A[10000]{};
int B[10000]{};
int N,M;

  int main()
{
  cin>>N>>M;
  cout<<N*M;
  return 0;
}



Measured memory_bytes: 3636
#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
#include<numeric>
using namespace std;
#define INF (1 << 30) - 1
#define LINF 1LL << 60
const int MOD = 1000000007;
using ll = long long;
using P = pair<int, int>;

struct UnionFind{
	vector<int> p;
	UnionFind(int n){
		p.resize(n, -1);
	}

	int find(int x){
		if(p[x] == -1)return x;
		else return p[x] = find(p[x]);
	}

	void unite(int x, int y){
		x = find(x);
		y = find(y);
		if(x == y)return;
		p[x] = y;
	}
};

struct Edge{
	int from, to, cost;
	Edge(int from, int to, int cost) : from(from), to(to), cost(cost){}

	bool operator<(const Edge& e) const {
		return cost < e.cost;
	}
};

struct Graph{
	int n;
	vector<Edge> es;

	Graph(int n) : n(n){}

	tuple<ll, vector<Edge>> kruskal(){
		vector<Edge> min_spanning;
		sort(es.begin(), es.end()); 

		UnionFind uf(n);
		ll min_cost = 0;
		for(auto e : es){
			if(uf.find(e.from) == uf.find(e.to))continue;
			min_cost += e.cost;
			uf.unite(e.from, e.to);
			min_spanning.push_back(e);
		}
		return forward_as_tuple(min_cost, min_spanning);
	}

	ll kruskal_ignore(int s, int d){
		sort(es.begin(), es.end()); 

		UnionFind uf(n);
		ll min_cost = 0;
		for(auto e : es){
			if(e.from == s && e.to == d)continue;
			if(uf.find(e.from) == uf.find(e.to))continue;
			min_cost += e.cost;
			uf.unite(e.from, e.to);
		}
		return min_cost;
	}

	void addEdge(int a, int b, int c){
		es.push_back(Edge(a, b, c));
	}
};

int main(){
  int n, m;
  cin >> n >> m;
  Graph g(n);
  vector<Edge> es;
  for(int i = 0; i < m; ++i){
  	int s, d, c;
  	cin >> s >> d >> c;
  	--s;
  	--d;
  	g.addEdge(s, d, c);
  }

  ll total;
  tie(total, es) = g.kruskal(); 

  int cnt = 0;
  ll sum = 0;
  for(auto e : es){
  	if(g.kruskal_ignore(e.from, e.to) != total){
  		++cnt;
  		sum += e.cost;
  	}
  }

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



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

int main(){
  string a,b;
  cin >> a >> b;
  if(a.size() > b.size()){
    cout << "GREATER" << endl;
  }else if(a.size() < b.size()){
    cout << "LESS" << endl;
  }else{
    int l = a.size();
    for(int i = 0; i < l; i++){
      if(a[i] > b[i]){
        cout << "GREATER" << endl;
        return 0;
      }else if(a[i] < b[i]){
        cout << "LESS" << endl;
        return 0;
      }
    }
    cout << "EQUAL" << endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define LL long long int
#define DL double
#define MLL map<LL,LL>::iterator
#define MSL map<string,L>::iterator
#define MLS map<LL,string>::iterator
#define MSS map<string,string>::iterator
#define MCL map<char,LL>::iterator
#define SL set<LL>::iterator
#define SS set<string>::iterator sl
#define G getline
#define SZ size()
#define IN insert
#define C clear()
#define B begin()
#define F front()
#define T top()
#define E end()
#define EM empty()
#define V vector
#define Q queue
#define DQ deque
#define PQ priority_queue
#define ST stack
#define FI first
#define SE second
#define PI acos(-1)
#define PS push
#define PP pop()
#define PSF push_front
#define PSB push_back
#define PPF pop_front()
#define PPB pop_back()
#define endl "\n"
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
V<LL>v;
map<LL,LL>u;
int main()
{
    FAST;
    LL n,m,i,j,k,p,q,o,l,s,t,z;
    cin>>n;
    for(i=0; i<n; i++)
    {
        cin>>o;
        u[o]++;
    }
    k=0;
    for(MLL it=u.B; it!=u.E; it++)
    {
        if(it->SE>it->FI)
        {
            k+=((it->SE)-(it->FI));
        }
        else if(it->SE<it->FI)
        {
            k+=it->SE;
        }
    }
    cout<<k<<endl;
    return 0;
}


Measured memory_bytes: 6272
#include<bits/stdc++.h>
using namespace std;
#define rg register
#define ll long long 
#define maxn 233333
inline ll read()
{
    ll x=0,f=1;
    char c=getchar();
    while(c<'0'||c>'9')
    {
        if(c=='-')
        {
            f=-1;
        }
        c=getchar();
    } 
    while(c<='9'&&c>='0')
    {
        x=(x<<1)+(x<<3)+(c^48);
        c=getchar();
    }
    return x*f;
}
string s;
ll len;
int a[maxn];
bool vis[maxn];
inline void debug()
{
	cout<<endl;
	for(rg int i=0;i<len;++i) cout<<a[i]<<" ";
	cout<<endl;
}
int main()
{
	cin>>s;
	len=s.length();
	for(rg int i=0;i<len;++i)//L向左   R向右走 
	{
	//	debug();
		if(s[i]=='R'&&s[i+1]=='L'&&i+1<=len-1)
		{
			vis[i]=vis[i+1]=1;
			a[i]++;
			a[i+1]++;
			for(rg int j=i-1;j>=0;--j)
			{
				if(vis[j]==1) break;
				if(s[j]=='R') 
				{
					if((i-j)%2==0) a[i]++,vis[j]=1;
					else a[i+1]++,vis[j]=1;
				}
				else break;
			}
			for(rg int j=i+2;j<len;++j)
			{
				if(vis[j]==1) break;
				if(s[j]=='L') 
				{
					if((j-(i+1))%2==0) a[i+1]++,vis[j]=1;
					else a[i]++,vis[j]=1;
				}
				else break;
			}
		}
	}
	for(rg int i=0;i<len;++i) cout<<a[i]<<" ";
}

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

int main() {
	int a,b;
	cin>>a>>b;
	if (a>b){
		cout<<"a > b"<<endl;
	}
	if (a<b){
		cout<<"a < b"<<endl;
	}
		if (a==b){
		cout<<"a == b"<<endl;
	}
	// your code goes here
	return 0;
}

Measured memory_bytes: 1156
import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws Exception {
		FastScanner scanner = new FastScanner(System.in);
		int size = (int) scanner.nextInt();
		int[] nums = scanner.nextIntArray(size);

		List<Point> list = new ArrayList<>();

		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		int maxIndex = -1;
		int minIndex = -1;

		for (int i = 0; i < nums.length; i++) {
			int num = nums[i];
			if (num > max) {
				max = num;
				maxIndex = i;
			}
			if (num < min) {
				min = num;
				minIndex = i;
			}
		}

		boolean isAllNeg = true;

		if (min >= 0) {
			isAllNeg = false;
		}
		if (max <= 0) {
			isAllNeg = true;
		} else {
			int value = min;
			int valueIndex = minIndex;
			if (Math.abs(min) <= Math.abs(max)) {
				value = max;
				valueIndex = maxIndex;
				isAllNeg = false;
			}
			for (int i = 0; i < nums.length; i++) {
				nums[i] += value;
				list.add(new Point(valueIndex, i));
			}
		}

		if (!isAllNeg) {
			for (int i = 1; i < nums.length; i++) {
				if (nums[i - 1] > nums[i]) {
					nums[i] += nums[i - 1];
					list.add(new Point(i - 1, i));
				}
			}
		} else {
			for (int i = nums.length - 2; i >= 0; i--) {
				if (nums[i] > nums[i + 1]) {
					nums[i] += nums[i + 1];
					list.add(new Point(i + 1, i));
				}
			}
		}

		System.out.println(list.size());
		list.forEach(p -> {
			System.out.println((p.x + 1) + " " + (p.y + 1));
		});
	}

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

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

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

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

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

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

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

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

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

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

Measured memory_bytes: 26708
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<unordered_map>
#include<deque>
using namespace std;
const int dx[4]={1,-1,0,0};
const int dy[4]={0,0,1,-1};
constexpr long mod=1000000007;



int main(){
	int h,w;
	cin>>h>>w;
	vector<string>s(h+20);
	vector<vector<int>>num(h+30,vector<int>(w+30,0));
	for(int i=0;i<h;i++){
		cin>>s[i];
		s[i].push_back('#');
		s[i].push_back('#');
		s[i].push_back('#');

		s[i].push_back('#');
		s[i].push_back('#');
	}
	string block(w+20,'#');
	s[h]=block;
	s[h+1]=block;
	s[h+2]=block;
	s[h+3]=block;
	int start,end;
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			if(s[i][j]=='.'){
				start=j;
				break;
			}
		}
		for(int j=start+1;j<=w;j++){
			if(s[i][j]=='#'){
				end=j-1;
				int light=end-start+1;
				for(int k=start;k<=end;k++){
					num[i][k]+=light;
				}
				start=end+2;
			}
		}
	}


	for(int i=0;i<w;i++){
		for(int j=0;j<h;j++){
			if(s[j][i]=='.'){
				start=j;
				break;
			}
		}
		for(int j=start+1;j<=h;j++){
			if(s[j][i]=='#'){
				end=j-1;
				int light=end-start;
				for(int k=start;k<=end;k++){
					num[k][i]+=light;
				}
				start=end+2;
			}
		}
	}
	int ans=0;
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			ans=max(num[i][j],ans);
		}
	}
	cout<<ans;
    return 0;
}

Measured memory_bytes: 20480
#!/usr/bin/env ruby

n = gets.chomp.to_i

words = Array.new
hash = Hash.new(0)

n.times do
  str = gets.chomp
  words << str
  hash[str] += 1
end
result = nil
vals = hash.values.uniq
vals.each do |v|
  if (v > 1)
    result = 'No'
  end
end

first = words.shift
e = first.split(//)[-1]

if (result != 'No')
  words.each do |w|
    sp_string = w.split(//)
    s = sp_string[0]
    if (e == s)
      e = sp_string[-1]
    else
      result = 'No'
      break
    end
  end
  result ||= 'Yes'
end

puts result


Measured memory_bytes: 3836
#include "bits/stdc++.h"
// #include <boost/multi_array.hpp>
// #include <boost/optional.hpp>
// #include <boost/range/irange.hpp>
// #include <boost/range/algorithm.hpp>
// #include <boost/range/adaptors.hpp>

// namespace adaptor = boost::adaptors;

using ll = long long;
using i64 = int64_t;

double calc(ll n, ll K)
{
   double y = 1.0;
   while (1)
   {
      if (n >= K)
      {
         break;
      }
      n *= 2;
      y *= 0.5;
   }
   return y;
}

void Main()
{
   ll N, K;
   std::cin >> N >> K;
   double ans = 0;
   for (ll i = 1; i <= N; i++)
   {
      ans += calc(i, K) / N;
   }
   std::cout << ans << std::endl;
}

int main()
{
   std::cin.tie(nullptr);
   std::ios_base::sync_with_stdio(false);
   std::cout << std::fixed << std::setprecision(15);
   Main();
   return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<queue>
#include<stack>
#include<deque>
#include<map>
#include<unordered_map>
#include<set>
#include<cmath>
#include<random>
using namespace std;
 
#define pb push_back
#define ff first
#define ss second
#define endl '\n'
#define fast ios::sync_with_stdio(false); cin.tie(NULL);
const double eps = 1e-6;



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

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

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

#define int long long
const int mod = 1e9 + 7;
int power(int a , int n){

	int res = 1;

	while(n){

		if(n&1)
			res*=a , res%=mod;
		a*=a;
		a%=mod;
		n/=2;
	}
	return res;
}
void solve(){

	int n , k;
	cin>>n>>k;
	int ans[k+1];
	memset(ans , 0 , sizeof ans);
	for(int i = k ; i >=1 ; --i){

		if(i==k)
			ans[i] = 1;

		else {

			int fact = k/i;

			ans[i] = power(fact , n);
			for(int j = 2*i ; j <= k ; j+=i){
				ans[i]-=ans[j];

				if(ans[i] < 0)
					ans[i] += mod;
			}
		}
	}
	int tot = 0;
	cerr<<ans[1]<<" "<<ans[2]<<endl;
	for(int i = 1 ; i <= k ; ++i){

		tot += i*ans[i];
		tot%=mod;
	}
	tot%=mod;
	cout<<tot<<endl;
}

signed main(){

    fast;
    int t = 1;
    //cin>>t;
    for(int i = 1 ; i <= t ; ++i){

    	solve();
    	
    	//cout<<"Case #"<<i<<": ";
    }
}


Measured memory_bytes: 4448