akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define lson l,mid,p<<1
#define rson mid+1,r,p<<1|1
#define ll long long
using namespace std;
const int inf=1e9;
const int mod=1e9+7;
const int maxn=1e5+10;
int a,b,c;
int main(){
    //ios::sync_with_stdio(false);
    //freopen("in","r",stdin);
    cin>>a>>b>>c;
    if(a+b+c>=22) puts("bust");
    else puts("win");
    return 0;
}

Measured memory_bytes: 256
#pragma GCC optimize("O3")
#include<bits/stdc++.h> 
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
template<class T> using V=vector<T>; 
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
const ll inf=(1e18);
//const ll mod=998244353;
const ll mod=1000000007;
ll GCD(ll a,ll b) {return b ? GCD(b,a%b):a;}
ll LCM(ll c,ll d){return c/GCD(c,d)*d;}
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
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; }
ll dp[(1<<16)][20];
struct edge{
    int s,t;
    ll d;
};
int main(){
    int n,m;
    cin>>n>>m;
    for(int i=0;i<(1<<16);i++)for(int j=0;j<20;j++)dp[i][j]=inf;
    dp[0][0]=0;
    V<edge> v(m);
    for(int i=0;i<m;i++){
        cin>>v[i].s>>v[i].t>>v[i].d;
    }
    for(int i=0;i<(1<<n);i++){
        for(int j=0;j<n;j++){
            for(int k=0;k<m;k++){
                if(v[k].s!=j)continue;
                if(i&(1<<v[k].t))continue;
                chmin(dp[i|(1<<v[k].t)][v[k].t],dp[i][j]+v[k].d);
            }
        }
    }
    if(dp[(1<<n)-1][0]>=inf)cout<<-1<<"\n";
    else cout<<dp[(1<<n)-1][0]<<"\n";
}


Measured memory_bytes: 13448
// https://atcoder.jp/contests/abc172/tasks/abc172_b
#include <iostream>
#include <cstring>
#include <cmath>
#include <vector>
#include <set>
#include <queue>
#include <algorithm>

using namespace std;
#define lli long long int
#define numberofdigits(x) floor(log10(x)) + 1

int main()
{
    lli i,c,l;
    string s,t;
    cin>>s;
    cin>>t;
    l=s.size();
    c=0;
    for(i=0;i<l;i++)
    {
        if(s[i]!=t[i])
            c++;
    }
    cout<<c<<"\n";
    return 0;
}

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

long long gcd(long long a, long long b) {return b ? gcd(b, a % b) : abs(a);}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  
  int k;
  cin >> k;
  vector<int> cnt(k + 1);
  for (int i = 1; i < k + 1; i++) {
    for (int j = 1; j < k + 1; j++) {
      cnt[gcd(i, j)]++;
    }
  }
  int res = 0;
  for (int i = 1; i < k + 1; i++) {
    for (int j = 1; j < k + 1; j++) {
      res += cnt[i] * gcd(i, j);
    }
  }
  cout << res << '\n';
  return 0;
}

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

int main(){
  int a, b;
  cin >> a >> b;
    
  if (a % 2 == 1 && b % 2 == 1){
    cout << "Odd" << endl;
  }
  else {
    cout << "Even" << endl;
  }
}

Measured memory_bytes: 256
import java.util.Scanner;

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

        int[] p = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }

        int count = 0;
        for (int i = 1; i < n - 1; i++) {
            if (p[i] < Math.max(p[i - 1], p[i + 1]) &&
            p[i] > Math.min(p[i - 1], p[i + 1])) {
                count++;
            }
        }

        System.out.println(count);

    }
}


Measured memory_bytes: 22740
#include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
 
 int main()
 {
   int n;
   cin>>n;
   getchar();
   while(n--)
   {
     string s;
     getline(cin,s);
     while(s.find("Hoshino")!=string::npos)
     {
       s.replace(s.find("Hoshino"),7,"Hoshina");                                      
     }          
     cout<<s<<endl;
   }
   //while(1);
   return 0;
 }

 
 

Measured memory_bytes: 3172
// #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <locale>
#include <cctype>
#include <sstream>
using namespace std;

typedef long long LL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef map<int, int> MAPII;
typedef vector<pair<int, int> > VPII;

#define MP make_pair
#define fastIO	cin.tie(0); ios::sync_with_stdio(false);
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
//for gcc (未test)
// #define FOREACH_IT(it,c)	for(typeof(c)::iterator it=(c).begin(); it!=(c).end(); ++it)
//for Visual Studio
#define foreach_it(type,it,c) for(type::iterator it=c.begin(), c_end=c.end(); it!=c_end; ++it)

// ------------------- include, typedef, define END. -------------------

void solve(VVI &in, int n){
	int rowSum = 0, columnSum = 0;
	int allSum=0;
	FOR(i, 0, in.size()-1){
		rowSum = 0;
		columnSum = 0;
		FOR(j, 0, in[i].size()-1){
			rowSum += in[i][j];
			columnSum += in[j][i];
		}
		allSum += rowSum;
		in[i][n] = rowSum;
		in[n][i] = columnSum;
	}
	in[n][n] = allSum;
	FOR(i, 0, in.size()){
		FOR(j, 0, in[i].size()){
			printf("%5d", in[i][j]);
		}
		puts("");
	}
}

int main(){
	fastIO;
	int n, in = 0;
	while (cin >> n, n){
		VVI inNum(n + 1, VI(n + 1));
		FOR(i, 0, n){
			FOR(j, 0, n){
				cin >> in;
				inNum[i][j] = in;
			}
		}
		solve(inNum,n);
	}
	return 0;
}

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

#define for_(i,a,b) for(int i=a;i<b;++i)
#define ALL(a) a.begin(),a.end()
#define INIT(a,b) memset(a,b,sizeof(a))
using lint = long long int;

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

    int cnt = 0;
    for_(i,0,N) {
        int a, b;
        cin >> a >> b;
        if (a == b) ++cnt;
        else cnt = 0;
        if (cnt >= 3) {
            puts("Yes");
            return 0;
        }
    }
    puts("No");
}

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

struct three {
	int a_pos;
	int b_pos;
	int discount;
};

int a[100000];
int b[100000];
three m[100000];

int a_min = 99999999;
int b_min = 99999999;
int total_min = 99999999;

int main(void)
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);

	int A, B, M;
	cin >> A >> B >> M;
	for (int i = 0; i < A; i++) {
		cin >> a[i];
		a_min = min(a_min, a[i]);
	}

	for (int i = 0; i < B; i++) {
		cin >> b[i];
		b_min = min(b_min, b[i]);
	}
	
	total_min = a_min + b_min;

	int temp;
	for (int i = 0; i < M; i++) {
		cin >> m[i].a_pos >> m[i].b_pos >> m[i].discount;
		temp = a[m[i].a_pos - 1] + b[m[i].b_pos - 1] - m[i].discount;
		total_min = min(total_min, temp);
	}

	cout << total_min;
	return 0;
}

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




main(){

  
  int n;
  
  cin  >> n;
  double x1,y1,x2,y2,x3,y3,x4,y4;

  for(int i=0;i<n;i++)
    {
  
      cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;

      double hoge=(x1-x2)*(y3-y4);//,

      double hoge2=(x3-x4)*(y1-y2);

      if(hoge == hoge2)cout << "YES"<<endl;
      else cout << "NO"<< endl;
      
      
  
    }
  
  return 0;
}

Measured memory_bytes: 0
#A
if False:
    A=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    K=int(input())
    print(A[K-1])

#B
H,W=map(int,input().split())
ans=0
if H==1 or W==1:
    ans+=1
else:
    ans+=(H//2)*W
    if H%2!=0:
        ans+=W//2
        ans+=W%2
print(ans)
#C
if False:
    A,B,C=map(int,input().split())
    if 4*A*B<(C-A-B)**2:
        if C-A-B>=0:
            print('Yes')
        else:
            print('No')
    else:
        print('No')

#D


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

public class Main {
    public static void main(String[] args) {

        in = new BufferedReader(new InputStreamReader(System.in));

        try {
            c = in.read();

            int i = 1;
            while (getToken() == TK_NUM && num != 0) {
                System.out.printf("Case %d: %d\n", i++, num);
            }
        } catch (IOException e) {
            System.err.println(e.getMessage());
        }
    }

    private static final int TK_END = 1;
    private static final int TK_NUM = 2;

    private static BufferedReader in;
    private static int c;
    private static int num;

    public static int getToken() throws IOException {
            if (c == -1) {
                return TK_END;
            } else if (Character.isDigit(c)) {
                num = Character.getNumericValue(c);
                while (Character.isDigit(c = in.read()))
                    num = num * 10 + Character.getNumericValue(c);
                return TK_NUM;
            }
            while ((c = in.read()) != -1 && !Character.isDigit(c))
                    ;
        return getToken();
    }
}

Measured memory_bytes: 58260
H, Y = map(int, input().split())
P = 0
out = "Possible"
for i in range(H):
	inp = input()
	for j in range(Y):
		if inp[j] == "#" and j > P:
			P = j
		if inp[j] == "#" and j < P:
			out = "Impossible"
print(out)

Measured memory_bytes: 3064
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define invrepr(i,a,b) for(int i=b-1;i>=a;i--)
#define invrep(i,n) invrepr(i,0,n)
#define repitr(itr,a) for(auto itr=a.begin();itr!=a.end();++itr)
const int MOD=1e9+7;


int main() {
    ios_base::sync_with_stdio(false);
    string s;
    cin >> s;
    int n=s.size(),cnt=1;
    vector<int> a(n+1);
    repr(i,1,n) {
        if (s[i]!=s[i-1]) {
            if (s[i-1]=='<') {
                repr(j,0,cnt+1) a[i-cnt+j]=max(j,a[i-cnt+j]);
            } else {
                repr(j,0,cnt+1) a[i-cnt+j]=max(cnt-j,a[i-cnt+j]);
            }
            cnt=1;
        } else ++cnt;
        if (i==n-1) {
            if (s[i]=='<') {
                repr(j,0,cnt+1) a[n-cnt+j]=max(j,a[n-cnt+j]);
            } else {
                repr(j,0,cnt+1) a[n-cnt+j]=max(cnt-j,a[n-cnt+j]);
            } 
        }
    }
    ll ans=0;
    rep(i,n+1) {
        ans+=a[i];
    }
    if (n==1) ans=1;
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 2844
#include <bits/stdc++.h>
#define rua system("pause")
using namespace std;
typedef long long ll;
inline int read()
{
	int x = 0, f = 1; char c = getchar();
	while (!isdigit(c)) {if (c == '-') f = -1; c = getchar();}
	while (isdigit(c)) {x = x * 10 + c - '0', c = getchar();}
	return x * f;
}

const int MAXN = 3e5 + 10;
int n, a[MAXN];
ll s1[MAXN], s2[MAXN], dp[MAXN];

inline bool check(ll x)
{
	dp[0] = 0;
	for (int i = 1; i <= n; i ++)
	{
		ll now = s1[i] - s2[i];
		
		if (i & 1)
		{
			if (i != n)
			{
				dp[i] = dp[i - 1];
				if (now - dp[i - 1] >= x)
					dp[i] = min(dp[i], s1[i + 1] - s2[i + 1]);
			}
			else
			{
				if (now - dp[i - 1] >= x) return 1;
				else return 0;
			}
		}
		
		else dp[i] = dp[i - 1];
	}
	assert(0);
	return 0;
}

int main()
{
	n = read();
	for (int i = 1; i <= n; i ++) a[i] = read();
	for (int i = 1; i <= n; i ++)
	{
		s1[i] = s1[i - 1];
		s2[i] = s2[i - 1];
		if (i & 1) s1[i] += a[i];
		else s2[i] += a[i];
	}
	
	if (!(n & 1))
	{
		printf("%lld %lld\n", max(s1[n], s2[n]), min(s1[n], s2[n]));
		return 0;
	}
	
	ll ans = s2[n], L = 0, R = s1[n] + s2[n], res = 0;
	while (L <= R)
	{
		ll MID = (L + R) >> 1;
		if (check(MID)) L = MID + 1, res = MID;
		else R = MID - 1;
	}
	printf("%lld %lld\n", ans + res, s1[n] + s2[n] - ans - res);
	return 0;
}

Measured memory_bytes: 8448
#include <bits/stdc++.h>
#define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++)
#define irep(i,a,b) for(ll i=ll(a);i>=ll(b);i--)
#define pb push_back
#define mp make_pair
#define pll pair<ll,ll>
#define endl "\n"
using ll=long long;
using ld=long double;
using namespace std;
const ll mod= 1e9+7;
const ll INF = 1LL<<40;
ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }

int main(){
  ll h,w;
  cin>>h>>w;
  if(h==1||w==1)cout<<1;
  else if(h%2==1&&w%2==1)cout<<(h*w+1)/2;
  else cout<<h*w/2;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long 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; }
 
/* attention
    long longのシフト演算には気をつけよう
    タイポした時のデバッグが死ぬほどきつくなるので変数名は最低3字くらい使った方がいいかも
*/

int main(){
    vector<int> name(5, 0);
    int n; cin >> n;
    for(int i=0; i<n; i++){
        string s; cin >> s;
        if(s[0] == 'M') name[0]++;
        if(s[0] == 'A') name[1]++;
        if(s[0] == 'R') name[2]++;
        if(s[0] == 'C') name[3]++;
        if(s[0] == 'H') name[4]++;
    }

    ll ans = 0LL;
    for(int bit=0; bit<1<<5; bit++){
        int cnt = 0;
        for(int i=0; i<5; i++) if(bit&1<<i) cnt++;
        if(cnt != 3) continue;

        ll tmp = 1LL;
        for(int i=0; i<5; i++) if(bit&1<<i) tmp *= (ll)name[i];
        ans += tmp;
    }

    cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
    vector<int> numVec;
    int ct; cin>> ct;
    int counter = 0;
    for(int i=0; i<ct; i++){
        int temp; cin >> temp;
        numVec.push_back(temp);
    }

    for(int i=0; i<ct; i++){
        if(numVec.at(i) != i+1) counter ++;
    }

    if(counter <= 2) cout << "YES" << endl;
    else cout << "NO" << endl;
}


Measured memory_bytes: 256
n, s = map(int, input().split())
c = [0 for i in range(n)]
t = [0 for i in range(n)]
for i in range(n):
    c[i], t[i] = map(int, input().split())
mi = 1001
ans = 0
for i in range(n):
    if s >= t[i] and mi > c[i]:
        mi = c[i]
        ans = c[i]
if ans == 0:
    print("TLE")
else:
    print(ans)

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

string s;
map<char, int> m;
int n;
int main()
{
    cin >> n >> s;
    for (int i = 0; i < n; i++)
    {
        m[s[i]]++;
    }
    if (m['R'] > m['B'])
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
N, M = [int(c) for c in input().split()]

s = []
for i in range(M):
    s.append([int(c) for c in input().split()][1:])

p = [int(c) for c in input().split()]

sw = [0]*N
n = [0]

def f(i):
    if i==N:
        n[0]+=check()        
    else:
        sw[i]=0
        f(i+1)
        sw[i]=1
        f(i+1)

def check():
    all_light = True
    for s_m, p_m in zip(s,p):
        d=0
        for ss in s_m:
            d += sw[ss-1]
        if d%2 != p_m:
            all_light = False
            break
    return 1 if all_light else 0
            
f(0)

print(n[0])


Measured memory_bytes: 3188
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
#define ALL(n) begin(n), end(n)

int main()
{
    char C;
    cin >> C;
    cout << char(C + 1) << endl;
    return 0;
}


Measured memory_bytes: 256
package main

import (
	"fmt"
)

func main() {
  var s string
  fmt.Scan(&s)
  
  for i := 0; i < len(s) - 1; i++ {
    if s[i] == 'A' && s[i+1] == 'C' {
      fmt.Println("Yes")
	  return
    }
  }
  fmt.Println("No")
  
}

Measured memory_bytes: 1768
#include <bits/stdc++.h>
#define st first
#define nd second

using namespace std;

void debug_out() { cerr << endl; }
template<class T> ostream& prnt(ostream& out, T v) { out << v.size() << '\n'; for(auto e : v) out << e << ' '; return out;}
template<class T> ostream& operator<<(ostream& out, vector <T> v) { return prnt(out, v); }
template<class T> ostream& operator<<(ostream& out, set <T> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, map <T1, T2> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, pair<T1, T2> p) { return out << '(' << p.st << ' ' << p.nd << ')'; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << H; debug_out(T...);}

#define dbg(...) cerr << #__VA_ARGS__ << " ->", debug_out(__VA_ARGS__)
#define dbg_v(x, n) do{cerr<<#x"[]: ";for(long long _=0;_<n;++_)cerr<<x[_]<<" ";cerr<<'\n';}while(0)
#define dbg_ok cerr<<"OK!\n"

const long long N = 100100;
const long long MOD = 1e9 + 7;
long long n, a[N], ff[N];
long long f[N];

long long powMod(long long base, long long exp) {
	if(exp == 0) return 1;
	if(exp == 1) return base;
	long long tmp = powMod(base, exp / 2);
	tmp = (tmp * tmp) % MOD;
	if(exp % 2 == 1) tmp = (tmp * base) % MOD;
	return tmp;
}

long long invMod(long long nr) {
	return powMod(nr, MOD - 2);
}

long long comb(long long k, long long n) {
	if(k > n) return 0;
	// dbg(k, n);
	// dbg(f[n]);
	// dbg((f[k] * f[n - k]));
	return (f[n] * invMod((f[k] * f[n - k]) % MOD)) % MOD;
}

int main() {
	ios_base::sync_with_stdio(false);

	cin >> n;
		
	f[0] = 1;
	for(long long i = 1; i <= n + 3; i++)
		f[i] = (f[i - 1] * i) % MOD;

	pair<long long, long long> pos;

	for(long long i = 1; i <= n + 1; i++) {
		cin >> a[i];
		// dbg(i, a[i]);
		if(ff[a[i]]) pos = {ff[a[i]], i};
		else ff[a[i]] = i;
	}
	// dbg_v(ff, 4);
	long long l = pos.st;
	long long r = pos.nd;
	long long d = r - l + 1;
	// dbg(l, r);

	for(long long i = 1; i <= n + 1; i++) {
		long long ans = comb(i, n + 1);
		// dbg(ans);
		ans -= comb(i - 1, n + 1 - d);
		ans %= MOD;
		if(ans < 0) ans += MOD;
		cout << ans << '\n';
	}
}	


Measured memory_bytes: 3584
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using Console = System.Console;

namespace Atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var firstLine = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var dif = firstLine[1] - firstLine[0];
            int lastTree = 0;
            for (int i = 1; i < 1000; i++)
            {
                if (lastTree == 0)
                {
                    lastTree = i;
                    continue;
                }

                var nowTree = lastTree + i;
                if (nowTree - lastTree == dif)
                {
                    Console.WriteLine(lastTree - firstLine[0]);
                    return;
                }

                lastTree = nowTree;
            }
        }
    }
}

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

using namespace std;

#define S scanf
#define P printf
#define G getline
#define SZ size()
#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 MP make_pair
#define LL long long int
#define ULL unsigned long long int
#define PII pair<int,int>
#define PSI pair<string,int>
#define PIS pair<int,string>
#define PLI pair<long long int,int>
#define PLL pair<long long int,long long int>
#define MII map<int,int>
#define MSI map<string,int>
#define MIS map<int,string>
#define MLI map<long long int,int>
#define FAST() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)





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






int main()
{
    FAST();

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

    int n,x,y;
    cin >> n >> x >> y;
    if((y/n)*n >= x)cout << "OK";
    else cout << "NG";
    return 0;
}


Measured memory_bytes: 3648
import numpy as np

n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))

cum = np.cumsum(a1)
revcumrev = np.cumsum(a2[::-1])[::-1]

get = 0
for i in range(n):
  get = max(get, cum[i] + revcumrev[i])
  
print(get)

Measured memory_bytes: 19104
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>*/
 
#define pll              pair <long long,long long>
#define pb               push_back
#define ll               long long
#define ff               first
#define ss               second
#define D(x)             cerr<<#x " = "<<(x)<<endl
#define vll              vector <ll>
#define IOS              ios_base::sync_with_stdio(0); cin.tie(NULL);
#define endl             '\n'   
using namespace std;

void solve()
{
		string s;
		cin>>s;
		if(s[2]==s[3] && s[4]==s[5])
		{
			cout<<"Yes"<<endl;
		}
		else
		{
			cout<<"No"<<endl;
		}
}

int main()
{
    IOS
 	// freopen("input.txt","r",stdin);
 	// freopen("output.txt","w",stdout);
 	// freopen("error.txt","w",stderr);
 	ll t;
 	// cin>>t;
 	t=1;
 	while(t--)
 	{
 		solve();
 	}	
    return 0;
}


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

int mod = 1000000007;
int64_t large = 9223372036854775807;
double PI = 3.141592653589793;

int main()
{
    int64_t x;
    cin >> x;
    int64_t ans = (x / 11) * 2, amari = x % 11;
    if (amari > 0 && amari < 7)
        ans++;
    if (amari > 6)
        ans += 2;
    cout << ans;
}

Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
#define MAX 100005
int incoming[MAX];
int dist[MAX];
bool visited[MAX];

void bfs(vector<vector<int>>& adj, int p)
{
	visited[p] = true;
	for(int c: adj[p])
	{
		dist[c] = max(dist[c], dist[p] + 1);
		incoming[c]--;
		if(incoming[c] == 0)
			bfs(adj,c);
	}
}

int main()
{
	int n,m;
	cin>>n>>m;
	vector<vector<int>> adj(n+1,vector<int>());
	for(int i=0;i<m;i++)
	{
		int x,y;
		scanf("%d%d",&x,&y);
		adj[x].push_back(y);
		incoming[y]++;
	}
	for(int i=1;i<=n;i++)
	{
		if(!visited[i] && incoming[i] == 0)
			bfs(adj,i);
	}
	int res = 0;
	for(int i=1;i<=n;i++)
		res = max(res, dist[i]);
	cout<<res<<'\n';
}

Measured memory_bytes: 11264
#include<stdio.h>

#define MAX 250
#define NIL -2000000000

int key[MAX];
int p(int c);
int r(int c);
int l(int c);

int main(){
  int i,n,h;
  scanf("%d",&n);
  for(i=0;i<MAX;i++){
    key[i]=NIL;
  }
  for(i=0;i<n;i++){
    scanf("%d",&h);
    key[i]=h;
  }
  for(i=0;i<n;i++){
    printf("node %d: key = %d, ",i+1,key[i]);
    if(key[p(i)]!=NIL&&i!=0){
      printf("parent key = %d, ",key[p(i)]);
    }
    if(MAX>l(i)&&key[l(i)]!=NIL){
      printf("left key = %d, ",key[l(i)]);
    }
    if(MAX>r(i)&&key[r(i)]!=NIL){
      printf("right key = %d, ",key[r(i)]);
    }
    printf("\n");
  }
  return 0;
}

int p(int c){
  return (c-1)/2;
}

int r(int c){
  return 2*c+2;
}

int l(int c){
  return 2*c+1;
}



Measured memory_bytes: 2052
#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef pair<int, int> pi;
const int mod = 1e9 + 9;
const int MAXN = 100005;
 
int n;
vector<int> gph[MAXN];
 
int f(int x, int p){
	int ans = 0;
	for(auto &i : gph[x]){
		if(i == p) continue;
		ans ^= f(i, x) + 1;
	}
	return ans;
}
 
int main(){
	scanf("%d",&n);
	for(int i=1; i<n; i++){
		int x, y;
		scanf("%d %d",&x,&y);
		gph[x].push_back(y);
		gph[y].push_back(x);
	}
	cout << (f(1, 0) ? "Alice" : "Bob");
}


Measured memory_bytes: 10368
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define ALL(a)  (a).begin(),(a).end()
typedef long long ll;

int main (){
   int n,m;
  cin >> n;
  vector<ll> d(n);
  rep(i,n)cin >> d[i];

  cin >> m;
  vector<ll> t(m);
  rep(i,m)cin >> t[i];

  map<ll,int> mpd,mpt;
  rep(i,n)mpd[d[i]]++;
  rep(i,m)mpt[t[i]]++;


  rep(i,m){
     ll x=t[i];
     if(mpt[x] > mpd[x] ){
      cout << "NO" <<endl;
      return 0;
     }
    }
  cout << "YES"  <<endl;

}


Measured memory_bytes: 28416
#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
signed main(){
  int N; cin>>N;
  vector<pii> A(N);
  rep(i,0,N) cin>>A[i].first>>A[i].second;
  sort(ALL(A));
  cout<<A[N-1].first+A[N-1].second<<endl;
  }


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

int main()
{
    string s;
    cin>>s;
    int len=s.size()-1;
    if(s[len]!='s')s+='s';
    else if(s[len]=='s')s+='e',s+='s';
    cout<<s<<endl;
}


Measured memory_bytes: 3584
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using ll = long long;
using namespace std;

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

    bool judge = true;

    for(int i=0;i<S.length();i++){
        for(int j=0;j<S.length();j++){
            if(i == j){
                continue;
            }

            if(S.at(i) == S.at(j)){
                judge = false;
            }
        }
    }

    if(judge){
        cout << "yes" << endl;
    } else {
        cout << "no" << endl;
    }

    return 0;
}




Measured memory_bytes: 256
#[allow(unused_macros)]
macro_rules! get {
    ($t:ty) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.trim().parse::<$t>().unwrap()
        }
    };
    ($($t:ty),*) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            let mut iter = line.split_whitespace();
            (
                $(iter.next().unwrap().parse::<$t>().unwrap(),)*
            )
        }
    };
    ($t:ty; $n:expr) => {
        (0..$n).map(|_|
            get!($t)
        ).collect::<Vec<_>>()
    };
    ($($t:ty),*; $n:expr) => {
        (0..$n).map(|_|
            get!($($t),*)
        ).collect::<Vec<_>>()
    };
    ($t:ty ;;) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.split_whitespace()
                .map(|t| t.parse::<$t>().unwrap())
                .collect::<Vec<_>>()
        }
    };
    ($t:ty ;; $n:expr) => {
        (0..$n).map(|_| get!($t ;;)).collect::<Vec<_>>()
    };
}

#[allow(unused_macros)]
macro_rules! get_chars {
    () => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.trim().chars().collect::<Vec<_>>()
        }
    };
    ($n:expr) => {
        {
            (0..$n)
                .map(|_| get_chars!())
                .collect::<Vec<_>>()
        }
    };
}

fn main() {
    let (n, m) = get!(usize, usize);
    let h = get!(u64;;);
    let mut deleted = vec![false; n];
    let ab = get!(usize, usize; m);

    for (a, b) in ab.into_iter() {
        let ah = h[a - 1];
        let bh = h[b - 1];
        if ah > bh {
            deleted[b - 1] = true;
        } else if ah < bh {
            deleted[a - 1] = true;
        } else {
            deleted[a - 1] = true;
            deleted[b - 1] = true;
        }
    }
    println!("{}", deleted.into_iter().filter(|n|!*n).count());
}


Measured memory_bytes: 4328
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] s = new int[n];
		int sum = 0;
		for (int i = 0; i<n; i++) {
			s[i] = sc.nextInt();
			sum += s[i];
			}
		Arrays.sort(s);

		if (sum%10 != 0) {
			System.out.println(sum);
			return;
			}
		else {
			for (int i=0; i<n;i++) {
				if (s[i]%10!=0) {
					System.out.println(sum-s[i]);
					return;
				}
			}
		}
		System.out.println(0);


	}
}

Measured memory_bytes: 21972
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fip ios_base::sync_with_stdio(false); cin.tie(NULL) 
#define reptUsual(b) for(i=0; i<b; ++i)
#define reptArIn(i,a,b,ar) for( i=a; i<b; ++i) cin>>ar[i];
#define rept(i,a,b) for(i=a; i<b; ++i)
#define all(a)  a.begin(), a.end()
#define maX(a,b)    ( (a) > (b) ? (a) : (b))
#define miN(a,b)    ( (a) < (b) ? (a) : (b))
#define sz(a) ((int)(a.size()))
#define pb(a) push_back(a)
#define ins(a) insert(a)
#define mkpr make_pair
#define fi first
#define se second
#define newln cout<<"\n"
#define bigPrime 1000000007
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef pair<ll , ll> pll;
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds; 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>  new_data_set;
// continue // break // greater // string // length // while

int main()
{
    fip;
    int n,i,a;
    cin>>n;
    vi id;
    rept(i,1,n+1)
    {
        cin>>a;
        if(a!=i)
            id.pb(i);
    }
    if(id.size()>2)
        cout<<"NO";
    else
    {
        cout<<"YES";
    }
    return 0;

}


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

namespace ConsoleApp1
{
	class Program
	{
		static void Main(string[] args)
		{
			var input = long.Parse(Console.ReadLine());
			Console.WriteLine(input % 2 == 0 ? input : input * 2);
		}
	}
}


Measured memory_bytes: 11220
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update>
using namespace std;
#pragma GCC optimize(3)   
#define ll long long
#define pb push_back
#define F first
#define S second
#define all(c)  c.begin(), c.end()
#define rep(i,n) for(int i=0 ; i<n ; i++)
#define llv vector< ll >
#define mp make_pair
#define endl "\n"
#define N (ll)2e5+10
#define M (ll)1e18 
#define matrix vector<vector<ll> >
#define sz(x) (int)x.size()
 


int main(){
    // #ifndef ONLINE_JUDGE
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    // #endif
    // ios::sync_with_stdio(0);
    
   int n , m , k ;
   cin >> n >> m >> k ;
   char c[n][m] ;
   rep(i,n){
     rep(j,m){
       cin >> c[i][j] ;
    }
    }
   int w=0 ;

    rep(x , (1<<n)){
    	rep(y , (1<<m)){
    		int cnt=0 ;
    		rep(i,n){
    			rep(j,m){
    				
                  if(c[i][j]=='#' && ((x&(1<<i))!=0 ) && ((y&(1<<j))!=0) )cnt++ ;
    			}
    		}

    		if(cnt==k)w++ ;
    	}
    }
     
    cout << w ;
     return 0 ;
    
    
 }

Measured memory_bytes: 3592
#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rrep(i, n) for(int i = 0; i <= (n); i++)
using namespace std;
typedef long long ll;
const int MOD = 1000000007;
const ll INF = 1LL<<60;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;

typedef pair<int, int> P;
typedef priority_queue<int, vector<int>, greater<int>> PQ;

int main(){
    ll N; cin >> N;
    vector<ll> A(N);
    rep(i,N) cin >> A[i];
    ll Q; cin >> Q;
    vector<ll> B(Q), C(Q);
    rep(i,Q) cin >> B[i] >> C[i];

    map<ll,ll> d;
    ll sum = 0;
    rep(i,N){
        d[A[i]]++;
        sum += A[i];
    }

    rep(i,Q){

        sum += d[B[i]]*C[i];
        sum -= B[i]*d[B[i]];
        d[C[i]] += d[B[i]];
        d[B[i]] = 0;

        cout << sum << endl;
    }

    
}

Measured memory_bytes: 11364
//g++ -std=c++17 -Wshadow -Wall -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG -g $PROGRAM -o $OUTPUT -DLOCAL -lasan -lubsan
#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>

#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define alli(a, n, k) (a + k), (a + n + k)
#define FP(i, a, b, k) for (__typeof(a) i = a; i < b; i += k)
#define FS(i, a, b, k) for (__typeof(a) i = a; i > b; i -= k)
#define IT(it, a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); ++it)
#define eps 1e-6
#define pi 3.141592653589793
using namespace std;
using namespace __gnu_pbds;

template <class T>
inline T gcd(T x, T y)
{
	if (!y)
		return x;
	return gcd(y, x % y);
}
typedef vector<int> VII;
typedef vector<ll> VLL;
typedef pair<int, int> PII;
typedef vector<pair<int, int>> VPII;
typedef vector<pair<int, PII>> VPPI;
const int MOD = 1e9 + 7;
const int INF = 1e9;

inline ll modulo(ll a, ll m)
{
	return (a % m + m) % m;
}

inline ll modInverse(ll a, ll m)
{
	assert(__gcd(a, m) == 1);
	ll m0 = m;
	ll y = 0, x = 1;

	if (m == 1)
		return 0;

	while (a > 1)
	{
		ll q = a / m;
		ll t = m;

		m = a % m, a = t;
		t = y;

		y = x - q * y;
		x = t;
	}

	if (x < 0)
		x += m0;

	return x;
}

inline ll modPow(ll x, ll y, ll m)
{ //x^y % m
	if (y == 0)
		return 1LL;
	else if (y == 1)
		return x;
	else
	{
		ll ans = modPow(x, y / 2, m) % m;
		if (y & 1)
		{
			return (((ans * ans) % m) * x) % m;
		}
		else
		{
			return (ans * ans) % m;
		}
	}
}

vector<string> split(char d,string s)
{
	stringstream ss(s);
	string t;
	vector<string> words;
	while(getline(ss,t,d))
	{
		words.pb(t);
	}

	return words;
}

int main(int argc, char *argv[])
{
#ifdef LOCAL
	auto start = chrono::high_resolution_clock::now();
#endif
	
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	string s,t;
	cin >> s >> t;
	bool ok = true;
	for (int i = 0; i < s.size();++i)
	if(s[i]!=t[i])
		ok = false;

	if(ok)
		cout << "Yes";
	else
		cout << "No";

#ifdef LOCAL
	auto end = chrono::high_resolution_clock::now();
	double time_taken =
		chrono::duration_cast<chrono::nanoseconds>(end - start).count();

	time_taken *= 1e-9;

	cerr << "\nTime taken by program is : " << fixed
		 << time_taken << setprecision(9);
	cerr << " sec" << endl;
#endif
	return 0;
}


Measured memory_bytes: 3656
// AOJ 2008: Dragon Fantasy
// 2017.11.22 bal4u@uu

#include <stdio.h>
#include <string.h>
#include <math.h>

int cx[22], cy[22], n;
double dh[22], dd[22];
double dc[22][22];

double dist(int x1, int y1, int x2, int y2)
{
	return hypot(x1-x2, y1-y2);
}

int rec(int i, int s, double d)
{
	int j, jj;

	if (s == (1<<n) - 1) return 1;
	for (jj = 1, j = 0; j < n; j++, jj <<= 1) {
		if (s & jj) continue;
		if (dd[j] < d + dc[i][j]) return 0;
	}
	for (jj = 1, j = 0; j < n; j++, jj <<= 1) {
		if (s & jj) continue;
		if (dd[j] > d + dc[i][j] && rec(j, s | jj, d + dc[i][j])) return 1;
	}
	return 0;
}

int main()
{
	int i, j, hx, hy, dx, dy;

	while (scanf("%d%d%d%d%d", &n, &hx, &hy, &dx, &dy) && n > 0) {
		n++;
		cx[0] = hx, cy[0] = hy;	for (i = 1; i < n; i++) scanf("%d%d", cx+i, cy+i);
		for (i = 0; i < n; i++) {
			dd[i] = dist(cx[i], cy[i], dx, dy);
			dh[i] = dist(cx[i], cy[i], hx, hy);
			dc[i][i] = 0;
			for (j = i+1; j < n; j++) {
				dc[i][j] = dc[j][i] = dist(cx[i], cy[i], cx[j], cy[j]);
			}
		}

		for (i = 1; i < n; i++) if (dh[i] > dd[i]) break;
		if (i < n) puts("NO");
		else puts(rec(0, 0, 0) ? "YES" : "NO");
	}
	return 0;
}

Measured memory_bytes: 1680
#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(long long)(n);++i)
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
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; }
 
const ll MOD=1e9+7;
const ll INF=1e18;
const double pi=acos(-1);
int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,-1,1,1,-1};

const int MAX=510000;
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false); 
  
  int x,a;
  cin >> x >> a;
  if(x<a)cout<<0;
  else cout << 10;
  cout << endl;
  return 0;
}

Measured memory_bytes: 3640
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<string>
#include<queue>
#include<vector>
#include<cstdlib>
#include<ctime>
#include<set>
#include<bitset>
#include<map>
#include<iostream>
#define ll long long
#define rep(i,a,b) for(register ll i=a;i<=b;++i)
#define fd(i,a,b) for(register int i=a;i>=b;--i)
#define Max(a,b) ((a)>(b)?(a):(b))
#define Min(a,b) ((a)<(b)?(a):(b))
#define Abs(a) ((a<0)?-(a):(a))
namespace io{
//    char buf[1<<17],*p1=buf,*p2=buf;
//    inline int getc(){
//         return p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<17,stdin),p1==p2)?EOF:*p1++;
//    }
	#define getc() getchar()
    template<class T>
    inline void Read(T &x){
        x=0;T f=1;char c;
        for(c=getc();c<'0'||c>'9';f=((c=='-')?-1:f),c=getc());
        for(;c>='0'&&c<='9';x=x*10+(c^48),c=getc());
        x*=f;
    }
    template<class T>
    inline void write(T a){
        if(a==0){putchar('0');return;}
        if(a<0)putchar('-'),a=-a;
        char c1[120];
        int h=0;
        while(a)c1[++h]=a%10+'0',a/=10;
        for(int i=h;i>=1;i--)putchar(c1[i]);
        return;
    }
    template<class T>
    inline void write_(T a){write(a);putchar(' ');}
    template<class T>
    inline void writeln(T a){write(a);putchar('\n');}
}
using namespace io;
template<class T>
inline T gcd(T a,T b){return a==0?b:gcd(b%a,a);}
template<class T>
inline T lcm(T a,T b){return 1ll*a/gcd(a,b)*b;}
/*----------------------------------------------------------------------*/
int n, d;
int x[12][12], ans;

int main(){
	Read(n);Read(d);
	rep(i,1,n)
		rep(j,1,d) Read(x[i][j]);
	rep(i,1,n){
		rep(j,i + 1, n){
			int tem = 0;
			rep(k,1,d) tem += pow(x[i][k] - x[j][k], 2);
			int tmp = sqrt(tem);
			if (tmp * tmp == tem) ans++;
		}
	}
	writeln(ans);
	return 0;
}

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

int main()
{
    int n, m, x;
    cin >> n >> m >> x ;
    vector<int> c(n);
    vector<vector<int>> a(n, vector<int>(m));
    for (int i = 0; i < n; i++)
    {
        cin >> c.at(i) ;
        for (int j = 0; j < m; j++)
        {
            cin >> a.at(i).at(j) ;
        }
    }
    
    int min1 = 12e5+1 ;
    for (int bit = 0; bit < (1<<n); bit++)
    {
        vector<int> ability(m) ;
        int total_cost = 0 ;
        for (int i = 0; i < n; i++)
        {
            if(bit&(1<<i))
            {
                total_cost += c.at(i) ;
                for (int j = 0; j < m; j++)
                {
                    ability.at(j) += a.at(i).at(j) ;
                }
                
            }
        }

        bool flag = true ;
        for (int i = 0; i < m; i++)
        {
            if (ability.at(i) < x)
            {
                flag = false ;
            }
        }
        if(flag)
        {
            min1 = min(min1, total_cost) ;
        }
        
    }
    
    if(min1==12e5+1)
    {
        cout << -1 << endl ;
    }
    else
    {
        cout << min1 << endl ;
    }
    
}

Measured memory_bytes: 3612
#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
using namespace std;
//cout << fixed << setprecision(0)
int main() { 
  int a,b;cin>>a>>b;
  cout << max(a+b,max(a-b,a*b)) << endl;
}


Measured memory_bytes: 256
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = sc.nextInt();
        int basePoint = sc.nextInt();
        int answerCount = sc.nextInt();
        int eachPoint[] = new int[count];
        for (int i = 0; i < eachPoint.length; i++) {
            eachPoint[i] = basePoint - answerCount;
        }
        
        for (int i = 0; i < answerCount; i++) {
            int answerPerson = sc.nextInt() - 1;
            eachPoint[answerPerson]++;
        }
        sc.close();

        for (int point : eachPoint) {
            if (point > 0) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}

Measured memory_bytes: 66232
#include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

typedef unsigned long ul;
typedef pair<ul, ul> P;
map<int, int> dp;
#define REP(i, n) for (int i = 0; i < n; i++)

ul N, M, T;
std::string S;
ul gcd(ul m, ul n) {
  if ((0 == m) || (0 == n)) return 0;
  while (m != n) {
    if (m > n)
      m = m - n;
    else
      n = n - m;
  }
  return m;
}  // gcd

ul lcm(ul m, ul n) {
  if ((0 == m) || (0 == n)) return 0;

  return ((m / gcd(m, n)) * n);  // lcm = m * n / gcd(m,n)
}  // lcm

ul B, K;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  list<ul> ans_list;
  vector<ul> A(N, 0);
  ul ans = 0;
  REP(i, N) cin >> A[i];
  sort(A.begin(), A.end());
  ans += A.back() - A.front();
  ul fitr = 0;
  bool flag = true;
  if (N == 2) {
    cout << ans << endl;
    return 0;
  }
  ul num = 2;
  if (N % 2 == 0) {
    while (num != N) {
      // cout << ans  <<" "<< fitr << " " << num << " " << N<< endl;
      if (flag) {
        ans += A[N - 1 - fitr] - A[fitr + 1];
        // cout <<"u" << A[N-1 - fitr] << ", " << A[fitr+1] << endl;
      } else {
        ans += A[N - 1 - fitr - 1] - A[fitr];
        // cout << A[N-1 - fitr -1 ] << ", " << A[fitr] << endl;
        ++fitr;
      }
      ++num;
      flag = !flag;
    }
  } else {
    while (num + 1 != N) {
      // cout << ans  <<" "<< fitr << " " << num << " " << N<< endl;
      if (flag) {
        ans += A[N - 1 - fitr] - A[fitr + 1];
        // cout <<"u" << A[N-1 - fitr] << ", " << A[fitr+1] << endl;
      } else {
        ans += A[N - 1 - fitr - 1] - A[fitr];
        // cout << A[N-1 - fitr -1 ] << ", " << A[fitr] << endl;
        ++fitr;
      }
      ++num;
      flag = !flag;
    }
    if (A[N - 1 - fitr] - A[fitr + 1] > A[N - 1 - fitr - 1] - A[fitr]) {
      ans += A[N - 1 - fitr] - A[fitr + 1];
    } else {
      ans += A[N - 1 - fitr - 1] - A[fitr];
    }
  }

  cout << ans << endl;
}

Measured memory_bytes: 1024
// 2011/06/23 Tazoe

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	getline(cin, str);

	for(int i=0; i<str.size(); i++)
		if(str[i]>='a'&&str[i]<='z')
			str[i] = (str[i]-'a')+'A';

	cout << str << endl;

	return 0;
}

Measured memory_bytes: 0
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < b; i++)
//'A' = 65, 'a' = 97

int main()
{
    int x, y;
    while (1) {
        cin >> x >> y;
        if (x == 0 && y == 0) break;
        if (x < y) cout << x << " " << y << endl;
        else cout << y << " " << x << endl;
    }
}



Measured memory_bytes: 2988
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cassert>
#include <tuple>

using namespace std;

using ll = long long;

int main() {
    int n, k;
    cin >> n >> k;
    
    string s;
    cin >> s;
    
    vector<int> a;
    a.reserve(n);
    
    if (s[0] == '0') {
        a.push_back(0);
    }
    
    for (int i = 0; i < n;) {
        int cnt = 1;
        int j = i + 1;
        while(j < n && s[i] == s[j]) {
            cnt++;
            j++;
        }
        
        a.push_back(cnt);
        i = j;
    }
    
    if (s[n - 1] == '0') {
        a.push_back(0);   
    }
    
    for (int i = 0; i <= 3 * k; i++) {
        a.push_back(0);   
    }
    
    int m = a.size();
    
    vector<int> c(m + 1);
    
    for (int i = 0; i < m; i++) {
        c[i + 1] = c[i] + a[i];   
    }
    
    int ans = 0;
    
    for (int i = 1; i + 2 * k <= m; i += 2) {
        ans = max(ans, c[i + 2 * k] - c[i - 1]);   
    }
    
    cout << ans << endl;
}

Measured memory_bytes: 2856
#include<bits/stdc++.h>
#define s second
#define f first
using namespace std;
typedef long long ll;
typedef pair<char,ll> P;
vector<P> A[3],ans;
ll len[3];

int main(){
  char c;
  ll n;
  for(int i=0;i<3;i++){
    while(cin>>c,c!='$')
      cin>>n,A[i].push_back(P(c,n));
    len[i]=A[i].size();
  }
  int F=0;
  for(int i=0;i<len[0];i++){
    if(i>len[0]-len[1]&&A[0][i].s){
      ans.push_back(A[0][i]);
      continue;
    }
    int flag=0;
    for(int j=0;j<len[1];j++){
      ll a=A[0][i+j].s,b=A[1][j].s;
      if(A[0][i+j].f!=A[1][j].f)flag=1;
      if(!j&&a<b)flag=1;
      if(j&&j!=len[1]-1&&a!=b)flag=1;
      if(j==len[1]-1&&a<b)flag=1;
    }
    if(!F&&!flag){
      F=1;
      if(A[0][i].s>A[1][0].s&&len[1]!=1)
	ans.push_back(P(A[1][0].f,A[0][i].s-A[1][0].s));
      for(int j=0;j<len[2];j++)
	ans.push_back(A[2][j]);
      A[0][i+len[1]-1].s-=A[1][len[1]-1].s;
      i+=len[1]-2;
    }else if(A[0][i].s)ans.push_back(A[0][i]);
  }
  char ch=ans[0].f;
  ll sum=ans[0].s;
  for(int i=1;i<ans.size();i++){
    if(ch==ans[i].f)sum+=ans[i].s;
    else cout<<ch<<' '<<sum<<' ',ch=ans[i].f,sum=ans[i].s;
  }
  cout<<ch<<' '<<sum<<" $"<<endl;
  return 0;
}

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

int main() {
  ll x, k, d;
  cin >> x >> k >> d;

  // x を正の座標にする
  x = abs(x);

  // x 座標から 0 に向かって移動可能な回数を算出する
  //
  // * 移動回数は基本 x/d 回だが、k < x/d の場合は k となる
  // * 0 を超えてマイナスには移動しない
  // * 最大でも座標 0 に着地する
  //   * 例えば x = 8, d = 4, k = 100 の場合
  //   * x/d = 8/4 = 2 で、2回 -4 側に移動し、x=0 に着地する
  //
  ll straight = min(k, x/d);

  // 座標と回数を変化させる
  k = k - straight;
  x = x - (straight * d);

  // 残りの移動回数が偶数回の場合
  //
  // * 移動して戻ってくるを繰り返すことで、現在の座標に留まることが、最小値となる
  // * 0の場合も同様
  //
  if (k % 2 == 0) {
    cout << x << endl;
  // 残りの移動回数が奇数回の場合
  //
  // * 偶数回往復を繰り返した後、最後に1回移動する
  // * この際、x は 0 以上の値となっているため、マイナス側に d だけ移動する
  // * マイナス座標となる可能性があるため、絶対値を abs で出力する
  //
  } else {
    cout << abs(x-d) << endl;
  }

  return 0;
}


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

#define pb push_back
#define fi first
#define se second
#define eb emplace_back
#define deb(x) (cout << #x << ": " << x << endl)

using namespace std;

typedef pair<int, int> ii;
typedef long long ll;
const int N = 1000007, inf = 0x3f3f3f3f;

vector<int> vec[N];
int ans[N], a[N];

void no() {
	cout << "No" << endl;
	exit(0);
}
int main() {
	ios::sync_with_stdio(0); cin.tie(0);

	int n; cin >> n;

	for(int i = 1; i <= n; ++i) {
		int x; cin >> x;
		a[i] = x;
		vec[x].eb(i);
	}

	for(int j = 1; j <= n; ++j) {
		int x; cin >> x;
		vec[x].eb(0);
	}

	priority_queue<ii> pq;
	for(int i = 1; i < N; ++i) {
		if(vec[i].size()) pq.emplace((int) vec[i].size(), i);
	}
	// simula 2 em 2
	vector<ii> A, B;
	while(pq.size() >= 2) {
		int tot1, x, tot2, y;
		
		tie(tot1, x) = pq.top();
		pq.pop();

		// deb(tot1);
		// deb(x);

		if(pq.size() == 0) break;

		tie(tot2, y) = pq.top();
		pq.pop();

		// deb(tot2);
		// deb(y);

		assert(x != y);

		int i = vec[x].back(); vec[x].pop_back();
		int j = vec[y].back(); vec[y].pop_back();

		// deb(i);
		// deb(j);

		if(i and j) A.eb(i, j);
		else if( (i|j) == 0) B.eb(x, y);
		else if(i) ans[i] = y;
		else ans[j] = x;

		if(--tot1) pq.emplace(tot1, x);
		if(--tot2) pq.emplace(tot2, y);
	}

	// deb(pq.size());
	if(pq.size()) no();

	assert(A.size() == B.size());


	while(A.size()) {
		if(a[A.back().fi] == B.back().fi or a[A.back().se] == B.back().se) swap(B.back().fi, B.back().se);
		ans[A.back().fi] = B.back().fi;
		ans[A.back().se] = B.back().se;

		assert(a[A.back().fi] != B.back().fi);
		assert(a[A.back().se] != B.back().se);
		A.pop_back();
		B.pop_back();
	}

	cout << "Yes" << endl;
	for(int i = 1; i <= n; ++i) cout << ans[i] << ' ';
	cout << endl;
}

Measured memory_bytes: 38508
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc131_a

s = input()
is_good = True
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        is_good = False
        break

print('Good') if is_good else print('Bad')



Measured memory_bytes: 8996