akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <iomanip>
#include <string>
#include <algorithm>
#include <functional>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <deque>
#include <cmath>
#include <cstdio>

using namespace std;

typedef long long ll;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)


int N, M, Q;
int a[50], b[50], c[50], d[50];
int state[11];

int search(int cur)
{
    if (cur == N + 1) {
        int score = 0;
        REP(i, Q) {
            if (state[b[i]] - state[a[i]] == c[i]) score += d[i];
        }
        return score;
    }
    else {
        int score = 0;
        FOR(i, state[cur - 1], M + 1) {
            state[cur] = i;
            score = max(score, search(cur + 1));
        }
        return score;
    }
}

int main(int argc, char **argv)
{
    cin >> N >> M >> Q;
    REP(i, Q) cin >> a[i] >> b[i] >> c[i] >> d[i];

    state[0] = 1;
    cout << search(1) << endl;

    return 0;
}


Measured memory_bytes: 3636
#include<bits/stdc++.h>
using namespace std;
 
int main() {
  int k;
  string s;
  cin>>k;
  cin>>s;
  if(s.length()>k){
    for(int i(0);i<k;i++)	cout<<s[i];
    cout<<"...";
  }
  else	cout<<s;
}

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

int main(){
    int ans=0;
    vector<int> a(5);
    for(int i=0;i<5;i++){
        cin >> a.at(i);
    }
    for(int i=0;i<5;i++){
        if(a.at(i)==0){
            ans=i+1;
        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 3628
import java.util.*;

class Main {
	static final int MOD = 998244353;
	Scanner sc;
	int N;
	int[][] XD;
	int[] c;
	
	int[] seg;
	int m;
	
	void calc() {
		sc = new Scanner(System.in);
		N = sc.nextInt();
		XD = new int[N*2][2];
		for (int i = 0; i < N; i++) {
			XD[i*2][0] = sc.nextInt();
			XD[i*2][1] = i*2;
			XD[i*2+1][0] = XD[i*2][0] + sc.nextInt();
			XD[i*2+1][1] = i*2+1;
		}
		Arrays.sort(XD,
			Comparator.comparingInt( (int[] xd) -> xd[0])
				.thenComparingInt( (int[] xd) -> 1-xd[1]%2));
		int[] d = new int[N];
		int i = 0;
		for (int j = 0; j < 2*N; j++) {
			int xd = XD[j][1];
			if (xd%2 == 0) d[xd/2] = i++;
		}
		
		c = new int[N];
		i = 0;
		for (int k = 0; k < 2*N; k++) {
			if (XD[k][1]%2 == 0) i++;
			else c[d[(XD[k][1]-1)/2]] = i - 1;
		}
		
		m = N-1;
		m = m | (m >>> 1);
		m = m | (m >>> 2);
		m = m | (m >>> 4);
		m = m | (m >>> 8);
		m = m | (m >>> 16);
		m += 1;
		
		seg = new int[2*m-1];
		for (int j = 0; j < N; j++) seg[m-1+j] = c[j];
		for (int j = m-2; j >= 0; j--)
			seg[j] = Math.max(seg[j*2+1], seg[j*2+2]);
		for (int j = N-1; j >= 0; j--) {
			c[j] = calc(j, c[j]+1);
			update(j, c[j]);
		}
		
		int[] off = new int[N];
		for (i = N-1; i >= 0; i--) {
			calcOnOff(off, i, c[i]);
		}
		calcOnOff(off, -1, N-1);
		System.out.println( ((long)off[0])%MOD );
	}
	
	private void calcOnOff(int[] off, int i, int e) {
		if (i == e) {
			off[i] = 1;
			return;
		}
		long _off = 1;
		int j = i+1;
		if (i == -1) i = 0;
		while (j <= e) {
			_off = (_off * (1 + off[j]))%MOD;
			j = c[j] + 1;
		}
		off[i] = (int)_off;
	}
	
	private void update(int index, int c) {
		int i = m-1+index;
		seg[i] = c;
		while (i > 0) {
			i = (i-1) >>> 1;
			seg[i] = Math.max(seg[i*2+1], seg[i*2+2]);
		}
	}
	
	private int calc(int s, int eExclusive) {
		return calcImpl(s, eExclusive, 0, 0, m);
	}
	
	private int calcImpl(int s, int eExclusive, int n, int l, int r) {
		if (r <= s || eExclusive <= l) return -1;
		if (s <= l && r <= eExclusive) return seg[n];
		int i = (l>>>1)+(r>>>1);
		int vl = calcImpl(s, eExclusive, 2*n + 1, l, i);
		int vr = calcImpl(s, eExclusive, 2*n + 2, i, r);
		return Math.max(vl, vr);
	}
	
	public static void main(String[] args) {
		new Main().calc();
	}
}


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

public class Main implements Runnable {
    
    private String s;

    public static void main(String[] args) throws IOException {
        Main m = new Main();
	m.run();
    }

    private void set() {
	try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
	    s = br.readLine();
	} catch (IOException e) {
	    e.printStackTrace();
	}
    }

    @Override
    public void run() {
	set();
	if (s.contains("keyence")) {
	    System.out.println("YES");
	    System.exit(0);
	}
	int len = s.length();
	for (int i=1;i<=6;i++) {
	    String t = s.substring(0,i) + s.substring(len-7+i,len);
	    if (t.equals("keyence")) {
		System.out.println("YES");
		System.exit(0);
	    }
	}
	System.out.println("NO");
    }

}

Measured memory_bytes: 21972
use proconio::input;

fn main() {
  input! {
    n: usize,
    hs: [usize;n],
  }
  let mut result = 0;
  let mut max = 0;
  let mut last = 0;
  for v in hs {
    if last < v {
      result = std::cmp::max(max, result);
      max = 0;
    } else {
      max += 1;
    }
    last = v;
  }
  println!("{}", std::cmp::max(max, result)); 
}

Measured memory_bytes: 3696
#include <bits/stdc++.h>
 
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
 
#define pb push_back 
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second 
#define debug(x)  do{cerr<<#x<<": "<<x<<"\n";}while(0)
#define debugv(x) do{cerr<<#x<<": ";for(auto&e: (x))cerr<<e<<" ";cerr<<"\n";}while(0)
#define fori(i, n) for (int i = 0; i < (int)(n); ++i)
#define forn(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n); i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
template<typename T> bool mmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
template<typename T> bool mmin(T &m, const T q) { if (m > q) {m = q; return true;} else return false; }
#define RETURN(x) do{cout << x << '\n'; return 0;}while(0)
#define FIRSTWIN do{cout << "Monocarp\n"; return 0;}while(0)
#define SECONDWIN do{cout << "Bicarp\n"; return 0;}while(0)
 
const int MAXN = 3e5+5;
const int MOD = 1e9+7;
const int INF = 1e9+1;

int N;
vector<pii> edges[MAXN];
int ans;

int nbits(int x) {
    int r = 0;
    while(x) {
        r += x%2;
        x /= 2;
    }

    return r;
}

int main() {
#ifdef OJ
    freopen("input.txt", "rt", stdin);
    //freopen("output.txt", "wt", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin >> N;
    fori(i,N) {
        int a; cin >> a;
        fori(j,a) {
            int x,y;
            cin >> x >> y;
            x--;
            edges[i].eb(x,y);
        }
    }

    fori(b,1<<N) {
        int ok = 1;
        for(int i = 0; i < N; i++) {
            if((1<<i)&b) {
                for(auto p: edges[i]) {
                    int x = p.fi, y = p.se;
                    if(((b>>x)&1) != y) ok = 0;
                }
            }
        }
        if(ok) {
            mmax(ans, nbits(b));
            //debug(b);
        }
    }

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


Measured memory_bytes: 7424
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] d = new int[n];
        for (int i = 0; i < n; i++) {
            d[i] = sc.nextInt();
        }
        Arrays.sort(d);
        int count = 1;
        for (int i = 0; i < n - 1; i++) {
            if (d[i] == d[i + 1])
                ;
            else
                count++;
        }
        System.out.println(count);
    }
}

Measured memory_bytes: 21844
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int D = sc.nextInt();
        int N = sc.nextInt();
        
        int powD = 1;
        for(int i = 0; i < D; i++){
            powD *= 100;
        }
        int ans = N * powD;
        if((ans == 100 && powD == 1) || (ans == 10000 && powD == 100) || (ans == 1000000 && powD == 10000)){
            System.out.println(ans + 1 * powD);
        }else{
            System.out.println(ans);
        }
        
    }
}


Measured memory_bytes: 21204
#include "bits/stdc++.h"

using namespace std;
#ifdef _DEBUG
#define _GLIBCXX_DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif

#define int long long
#define ll long long
#define DBG 1
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define loop(n) rep(loop, (0), (n))
#define all(c) begin(c), end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9) + 7;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
using pii = pair<int, int>;
// template<class T> ostream &operator<<(ostream &os,T &t){dump(t);return os;}
template <typename T, typename S>istream &operator>>(istream &is, pair<T, S> &p) { is >> p.first >> p.second; return is; }
//template <typename T, typename S>ostream &operator<<(ostream &os, pair<T, S> &p) {os << p.first << " " << p.second;return os;}

template <typename T> void printvv(const vector<vector<T>> &v) {
	cerr << endl;
	rep(i, 0, v.size()) rep(j, 0, v[i].size()) {
		if (typeid(v[i][j]).name() == typeid(INF).name() and v[i][j] == INF) {
			cerr << "INF";
		}
		else
			cerr << v[i][j];
		cerr << (j == v[i].size() - 1 ? '\n' : ' ');
	}
	cerr << endl;
}

#ifndef _DEBUG
#define printvv(...)
#endif
void YES(bool f) { cout << (f ? "YES" : "NO") << endl; }
void Yes(bool f) { cout << (f ? "Yes" : "No") << endl; }
template <class T, class U>bool chmin(T& a, U b) { if (a > b) { a = b; return true; }return false; }
template <class T, class U>bool chmax(T& a, U b) { if (a < b) { a = b; return true; }return false; }

signed main(signed argc, char *argv[]) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(12);

	int N; cin >> N;
	vector<string>S(N); rep(i, 0, N) { cin >> S[i]; }
	int endA = 0, sB = 0, both = 0;
	int ans = 0;

	rep(i, 0, N) {
		rep(j, 0, S[i].size() - 1) {
			if (S[i][j] == 'A' and S[i][j + 1] == 'B') {
				ans++;
			}
		}
		if (S[i][0] == 'B' and S[i].back() == 'A')both++;
		else if (S[i][0] == 'B')sB++;
		else if (S[i].back() == 'A')endA++;
	}
	dump(ans);
	dump(endA, both, sB);
	if (both > 0) {
		ans += both - 1;
		both = 1;
	}
	int m = min({ endA,both,sB });
	ans += 2 * m;
	endA -= m;
	sB -= m;
	both -= m;

	if (endA == 0) {
		ans += min(both, sB);
	}
	else if (both == 0) {
		ans += min(endA, sB);
	}
	else if (sB == 0) {
		ans += min(endA, both);
	}
	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 768
#include <iostream>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <math.h>
//#include <queue>
//#include <stack>
//#include <iomanip>

// sometimes used
//#include <set>
//#include <map>
//#include <numeric>
//#include <list>
//#include <deque>
//#include <unordered_map>

typedef long long LL;
typedef long double LD;
using namespace std;
 
//#define MOD 1000000007
//#define MAX 100100
//#define NIL -1

int main(){
    LL a;
    LD b;
    cin >> a >> b;
    LL tmp_b = (LL)(b*1000);
    tmp_b++;
    tmp_b/=10;
    LL ans=a*tmp_b;
    ans/=100;
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 3724
#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL<<60;
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; }
int main(void){
    int n, W; cin>>n>>W;
    vector <int> v(110);
    vector <int> w(110);
    vector <vector<long long>> dp(110 ,vector <long long>(100100,INF));
    for(int i=0;i<n;i++){
    cin>>w[i]>>v[i];
    }
    dp[0][0]=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<100010;j++){
            //i番目を選ぶとき
            if(j>=v[i]){
               chmin(dp[i+1][j],dp[i][j-v[i]]+w[i]);
            }
            chmin(dp[i+1][j],dp[i][j]);
        }
    }
      long long ans = 0;
   for (int j = 0; j < 100100; ++j) {
        if (dp[n][j] <= W) ans = j;
    }
    cout << ans << endl;
}

Measured memory_bytes: 87296
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
const int maxn=1e5;
int main(){
	int k; 
	char a[maxn+3];
    scanf(" %s",a);
    cin>>k;
    int n=strlen(a);
  	for(int i=0;i<n;i++){
  		if(a[i]=='a')continue;
  		else if(k==0)break;
  		else if(k>='z'-a[i]+1){
			k-=('z'-a[i])+1;
			a[i]='a';
					}
			}
	if(k!=0)a[n-1]+=k%26;
    for(int i=0;i<n;i++)printf("%c",a[i]);
    printf("\n");
}




Measured memory_bytes: 384
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
while(true){
String s = r.readLine();
if(s == null) break;
int i = s.indexOf(" ");
int sum = Integer.valueOf(s.substring(0, i)) +  Integer.valueOf(s.substring(i+1));
System.out.println(Integer.toString(sum).length());
}
}
}

Measured memory_bytes: 10000
#include<bits/stdc++.h>
#define F first
#define S second
#define endl '\n'
#define lcm( a, b ) ((a)/__gcd(a,b)*(b))
#define MP make_pair
#define pb push_back
#define all(x) (x).begin(),(x).end()

using namespace std;

typedef long long LL;
typedef pair<int, int> P;
typedef pair<int, P> i_P;
typedef pair< LL, LL > L_P;

const int INF = INT_MAX;
const int MIN = INT_MIN;
const LL LINF = LLONG_MAX;
const int MOD = 1000000000 + 7;
const int SIZE = 100005;

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

    LL l, r;
    cin >> l >> r;
    LL res = INF;
    if( r - l >= 2018 ) cout << 0 << endl;
    else {
        for( LL i = l; i <= r; ++i ) {
            for( LL j = i + 1; j <= r; ++j ) {
                res = min( res, i * j % 2019 );

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



Measured memory_bytes: 256
x, y = [int(item) for item in input().split()]

res = 0

if x == 1:
    res += 300000
elif x == 2:
    res += 200000
elif x == 3:
    res += 100000

if y == 1:
    res += 300000
elif y == 2:
    res += 200000
elif y == 3:
    res += 100000

if x == 1 and y == 1:
    res += 400000

print(res)

Measured memory_bytes: 3064
/**********************************************
 *Author*        :XzzF
 *Created Time*  : 2018/9/24 13:42:48
 *Ended  Time*  : 2018/9/24 14:03:56
*********************************************/

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <ctime>
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
const LL INF = 1LL << 60;
const int MaxN = 200000;
const int MOD = 1e9 + 7;

int N;
LL M;
LL fac[MaxN + 5];

LL qwr(LL x, LL y) {
	LL res = 1LL;
	while(y > 0) {
		if(y & 1) res = (res * x) % MOD;
		x = (x * x) % MOD;
		y = y >> 1;
	}
	return res;
}

LL C(int n, int m) {
	return (fac[n] * qwr(fac[n - m], MOD - 2) % MOD) * qwr(fac[m], MOD - 2) % MOD;
}

void Init() {
	fac[0] = 1LL;
	for(int i = 1; i <= MaxN; i++)
		fac[i] = 1LL * i * fac[i - 1] % MOD;
}

struct Decom {
	int p, k;
	Decom () {}
	Decom (int _p, int _k) {
		p = _p; k = _k;
	}
	friend bool operator < (const Decom A, const Decom B) {
		return A.p < B.p;
	}
};

vector <Decom> d;

void Decompose(LL x) {
	d.clear();
	LL tu = (LL)sqrt(1.0 * x + 0.5);
	for(int i = 2; i <= tu; i++) {
		if(x % i == 0) {
			int cnt = 0;
			while(x % i == 0) {
				cnt++; x /= i;
			}
			d.push_back(Decom(i, cnt));
		}
	}
	if(x > 1) d.push_back(Decom(x, 1));
}

void Solve() {
	LL ans = 1LL;
	for(int i = 0; i < d.size(); i++) {
		Decom now = d[i];
		ans = (ans * C(now.k + N - 1, now.k)) % MOD;
	}
	printf("%lld\n", ans);
}

int main()
{
	Init();
	while(scanf("%d %lld", &N, &M) != EOF)
	{
		Decompose(M);
		Solve();
	}
    return 0;
}

Measured memory_bytes: 1792
package main

import (
	"fmt"
	"math"
	"strconv"
)

func main() {
	var S string
	fmt.Scan(&S)

	ans := 999
	for i := 0; i < len(S)-2; i++ {
		s := S[i : i+3]
		n, _ := strconv.Atoi(s)
		d := int(math.Abs(float64(753 - n)))
		if d < ans {
			ans = d
		}
	}
	fmt.Println(ans)
}


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

int main(void){
	int n, m=0, d[101]={0};

	while (cin>>n) 	d[n]++;
	for (int i=0; i<101; i++) if (d[i]>m) m=d[i];
	for (int i=0; i<101; i++) if (d[i]==m) cout<<i<<endl;

	return 0;
}

Measured memory_bytes: 1160
A, B, C, X, Y = map(int, input().split())


check = 0
ans = 0
if 2 * C < A + B:
    #ABピザを買ったほうが良いケース（同数までは）
    ans += min(X, Y) * 2 * C
    if 2 * C < A and X - Y > 0:
        #最後のAの枚数調整でもCを買ったほうが良い場合
        ans += (X - Y) * 2 * C
    elif X - Y > 0:
        check = 1
    if 2 * C < B and Y - X > 0:
        #最後のBの枚数調整でもCを買ったほうが良い場合
        ans += (Y - X) * 2 * C
    elif Y - X > 0:
        check = 2
    if check == 1:
        #最後の枚数調整でAだけ個別に買ったほうが良い場合
        ans += (X - Y) * A
    elif check == 2:
        #最後の枚数調整でBだけ個別に買ったほうが良い場合
        ans += (Y - X) * B
else:
    #どちらについても個別に買ったほうが安い場合
    ans = A * X + B * Y

print(ans)

Measured memory_bytes: 3064
#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,c;
  cin >> a >> b >> c;
  if(a < b && b < c){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
    return 0;
}



Measured memory_bytes: 3080
#include <bits/stdc++.h>
using namespace std;
int a[200005], b[200005];
int main(){
    int n;
    scanf("%d" ,&n);
    for(int i=1;i<=n;i++){
        scanf("%d", &a[i]);
    }    
    for(int i=1;i<=n;i++){
        scanf("%d", &b[i]);
    }
    reverse(b+1, b+1+n);
    int l = -1, r = -1;
    for(int i=1;i<=n;i++){
        if(a[i] == b[i]){
            if(l == -1) l = i;
            r = i;
        }
    }
    if(l == -1){
        printf("Yes\n");
        for(int i=1;i<=n;i++){
            printf("%d ", b[i]);
        }
    }
    else{
        vector<int> sw;
        for(int i=1;i<=n;i++){
            if(a[i] != b[i] && b[i] != b[l] && a[i] != b[l]){
                sw.emplace_back(i);
            }
        }
        if(sw.size() >= r-l+1){
            for(int i=l;i<=r;i++){
                swap(b[i], b[sw.back()]);
                sw.pop_back();
            }

            printf("Yes\n");
            for(int i=1;i<=n;i++){
                printf("%d ", b[i]);
            }
        }
        else{
            printf("No\n");       
        }
    }
}

Measured memory_bytes: 5864
#include <stdio.h>
#include <string.h>

#define M 1046527
#define NIL -1
#define L 14

char H[M][L];

int getChar(char ch){
  if(ch=='A') return 1;
  else if(ch=='C') return 2;
  else if(ch=='G') return 3;
  else if(ch=='T') return 4;
  else return 0;
}

long long getkey(char str[]){
  long long sum = 0, p = 1, i;

  for(i=0; i<strlen(str); i++){
    sum += p*(getChar(str[i]));
    p *= 5;
  }

  return sum;
}

int findabc(char str[]){
  long long key, i,h;

  key = getkey(str);

  for(i=0;; i++){
    h = (key%M + i * (key %(M - 1))) % M; 
  if(strcmp(H[h],str)==0)return 1;
  else if (strlen(H[h])==0)return 0;
  }

  return 0;
}

int insert(char str[]){
  long long key, i, h;

  key = getkey(str);

  for(i=0;;i++){

    h = (key%M + i * (key %(M - 1))) % M;
    if(strcmp(H[h],str)==0)return 1;

    else if (strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }

  return 0;
}

int main(){
  int i, n, h;
  char str[L], com[9];

  for(i=0; i<M; i++)
    H[i][0] = '\0';

  scanf("%d", &n);

  for(i=0; i<n; i++){

    scanf("%s %s", com, str);

    if(com[0]=='i')

      insert(str);

    else {
      if(findabc(str)){

        printf("yes\n");

      } else {

        printf("no\n");

      }
    }
  }
  return 0;
}

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


void solve(long long N, std::vector<std::string> S){
    map<string, long long> mp;
    for (auto s: S) {
        mp[s]++;
    }
    for (auto s: {"AC", "WA", "TLE", "RE"}) {
        cout << s << " x " << mp[s] << endl;
    }
}

// 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)
int main(){
    long long N;
    scanf("%lld",&N);
    std::vector<std::string> S(N);
    for(int i = 0 ; i < N ; i++){
        std::cin >> S[i];
    }
    solve(N, std::move(S));
    return 0;
}


Measured memory_bytes: 6436
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
mod = 10**9 + 7

pat = [1 for _ in range(N+1)]
for j in a :
    pat[j] = 0

for i in range(2,N+1) :
    if pat[i] == 0 :
        continue
    else :
        pat[i] = (pat[i-1] + pat[i-2])%mod

print(pat[N])



Measured memory_bytes: 7856
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)

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; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }


int N;

int main() {
  cin >> N;
  cout << 48 - N << endl;
}




Measured memory_bytes: 256
#include <iostream>
#include <map>
#include <queue>
#include <cmath>
#include <limits>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
using namespace std;

int BASE = 1000;

long long N, V[1 << 19], W[1 << 19];
long long Q, A[1 << 19], B[1 << 19];
vector<pair<long long, long long>> E[1 << 19];

long long query(long long pos, long long maxw) {
	if (pos <= BASE) {
		int pos1 = lower_bound(E[pos].begin(), E[pos].end(), make_pair(maxw + 1LL, -1LL)) - E[pos].begin();
		pos1--;
		return E[pos][pos1].second;
	}

	vector<long long> vec; int cx = pos;
	while (cx > BASE) {
		vec.push_back(cx);
		cx >>= 1;
	}

	long long Answer = 0;
	for (int i = 0; i < (1 << vec.size()); i++) {
		long long v1 = 0, v2 = 0;
		for (int k = 0; k < vec.size(); k++) {
			if ((i & (1 << k)) != 0) { v1 += V[vec[k]]; v2 += W[vec[k]]; }
		}
		if (v2 > maxw) continue;
		int pos1 = lower_bound(E[cx].begin(), E[cx].end(), make_pair((maxw - v2) + 1LL, -1LL)) - E[cx].begin();
		pos1--;
		Answer = max(Answer, E[cx][pos1].second + v1);
	}
	return Answer;
}

int main() {
	cin >> N;
	for (int i = 1; i <= N; i++) cin >> V[i] >> W[i];
	cin >> Q;
	for (int i = 1; i <= Q; i++) cin >> A[i] >> B[i];

	for (int i = 1; i <= min(N, 1LL * BASE); i++) {
		vector<int> vec; int cx = i;
		while (cx >= 1) {
			vec.push_back(cx);
			cx >>= 1;
		}
		for (int j = 0; j < (1 << vec.size()); j++) {
			long long v1 = 0, v2 = 0;
			for (int k = 0; k < vec.size(); k++) {
				if ((j & (1 << k)) != 0) { v1 += V[vec[k]]; v2 += W[vec[k]]; }
			}
			E[i].push_back(make_pair(v2, v1));
		}
		sort(E[i].begin(), E[i].end());
		for (int j = 1; j < E[i].size(); j++) E[i][j].second = max(E[i][j].second, E[i][j - 1].second);
	}
	
	for (int i = 1; i <= Q; i++) {
		printf("%lld\n", query(A[i], B[i]));
	}
	return 0;
}

Measured memory_bytes: 32020
#include <stdio.h>

int main(void){

   int n;
   int a,b,c,d;
   int cnt = 0;
   
   while(1){
       n=-1;
       scanf("%d", &n);
       if(n==-1)break;
       
       for(a=0; a<=9; a++){
           for(b=0; b<=9; b++){
               for(c=0; c<=9; c++){
                   for(d=0; d<=9; d++){
                       if(a+b+c+d == n)cnt++;
                   }
               }
           }
       
       }
       printf("%d\n", cnt);
       cnt=0;
   }
   return 0;
}

Measured memory_bytes: 596
#include <bits/stdc++.h>
using namespace std;
 
#define mod 1000000000
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vs vector<string>
#define psi pair<string,ll>
#define pii pair<ll,ll>
#define vsi vector<psi>
#define vii vector<pii>
#define mp make_pair
#define pb push_back
#define rep(n) for(long i=0;i<n;i++)
#define repr(n) for(long i=(n-1);i>=0;i--)
#define fori(i,a,b) for(auto i=a;i<=b;i++)
#define ford(i,b,a) for(auto i=b;i>=a;i--)
#define mset(a,i) memset(a,i,sizeof(a))
#define minv(a) min_element(a.begin(),a.end())
#define maxv(a) max_element(a.begin(),a.end())
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define sotit(a) sort(a.begin(),a.end());
#define sot(a) sort(a,a+n);
#define ff first
#define maxheap(v) priority_queue<v>
#define minheap(v) priority_queue<v, vector<v>, greater<v>>
#define ss second
#define endl "\n"
#define NL cout<<endl;
#define printmat(a,m,n) for(int i=0;i<m;i++){       \
                            for(int j=0;j<n;j++){   \
                                cout<<a[i][j]<<" "; \
                            }                       \
                            cout<<endl;             \
                        }
#define dbgn(x) cout<<" $ "<<x<<" $ "<<endl;
#define dbg(x) cout<<" $ "<<x<<" $ ";
#define all(v) v.begin(),v.end()
#define show(a,n) for(int i=0;i<n;i++){ cout<<a[i]<<" "; } NL
#define fast_io() cin.sync_with_stdio(false);cout.sync_with_stdio(false);cin.tie(NULL);
 
// lower_bound - which does not compare less than val
// upper_bound - which compares greater than val
int main() {
    fast_io()
 
    ll n;
    cin>>n;
    ll m=ceil(sqrt(n));
    for(int i=m;i>=1;i--){
        if(n%i==0){
            cout<<(n/i)-2+i;
            return 0;
        }
    }
 
    return 0;
}

Measured memory_bytes: 256
def main():

    s = input()
    
    ans = 0

    if s == "RRR":
        ans = 3
    elif "RR" in s:
        ans = 2
    elif "R" in s:
        ans = 1
    else:
        ans = 0

    print(ans)
    
    return 0

if __name__ == "__main__":
    main()


Measured memory_bytes: 8848
#include<bits/stdc++.h>
#define int long long
#define P pair<int,int>
#define PP pair<P,int>
#define F first
#define S second
#define f(i,n) for(int i=0;i<(n);i++)
#define INF LLONG_MAX/3
#define eps LDBL_EPSILON
#define mod (int)(1000000007)
#define pie 3.141592653589793238462643383279
#define Bpri priority_queue
#define Spri priority_queue<P,vector<P>,greater<P>>
using namespace std;
signed main(){
	int n,a,b,c,d;
	cin>>n>>a>>b>>c>>d;
	a--,b--,c--,d--;
	string s;
	cin>>s;
	int z=0;
	f(i,n){
		if(i==a)z++;
		if(i==b)z++;
		if(i==c)z--;
		if(i==d)z--;
		if(i&&z&&s[i]=='#'&&s[i-1]=='#'){
			puts("No");
			return 0;
		}
	}
	if(c<d){
		puts("Yes");
		return 0;
	}
	else{
		int cnt=0;
		if(s[b+1]=='.'){
			for(int i=b-1;s[i]=='.'&&i>=0;i--){
				cnt++;
			}
		}
		for(int i=b;i<=d||s[i]=='.';i++){
			if(cnt>=3){
				puts("Yes");
				return 0;
			}
			if(s[i]=='#'){
				cnt=0;
			}
			else{
				cnt++;
			}
		}
		if(s[d-1]=='.'&&cnt>=3){
			puts("Yes");
			return 0;
		}
	}
	puts("No");
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll MOD = 1000000007;
const ll INF = 9999999999;
template<class T> inline bool chmin(T& a, T b){if (a>b){a = b; return true;}return false;}
template<class T> inline bool chmax(T& a, T b){if (a<b){a = b; return true;}return false;}
template<class T> inline T powerM(T a,T b){if (b==0) return 1;
  T tmp = powerM(a,b/2); if (b%2==0) return tmp*tmp%MOD; else return tmp*tmp%MOD*a%MOD; }



int main() {
  int n; cin >>n;
  vector<int> x(n),l(n);
  rep(i, n) cin >>x.at(i) >>l.at(i);
  vector<pair<ll,ll>> p(n);
  rep(i, n){
    p.at(i).first = x.at(i) + l.at(i); // アーム範囲の後ろの方
    p.at(i).second = x.at(i) - l.at(i); // アーム範囲の前の方
  }
  sort(all(p));
  int res = 0;
  int pos = -1000000000;

  for (int i=0; i<n; i++){
    if (p.at(i).second >= pos){
      pos = p.at(i).first;
      res++;
    }
  }
  cout <<res <<endl;
}

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

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }

  ll tmp, ans = 0;

  sort(begin(A), end(A));
  tmp = 0;
  for (int i = 0; i < N - 1; i++) {
    tmp += abs(A[N - 1 - i / 2] - A[(i == 0) ? (N - 1) / 2 : (i - 1) / 2]);
  }
  ans = max(ans, tmp);

  sort(begin(A), end(A), greater<int>());
  tmp = 0;
  for (int i = 0; i < N - 1; i++) {
    tmp += abs(A[N - 1 - i / 2] - A[(i == 0) ? (N - 1) / 2 : (i - 1) / 2]);
  }
  ans = max(ans, tmp);

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


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

#define     ll      long long int

int main( )
{
    ll n, m, i, j, s = 0;
    cin >> n >> m;
    for (i = 1; i <= m; i++) {
        cin >> j;
        s += j;
    }
    if (s > n) {
        cout << "-1\n";
    }
    else {
        cout << (n - s) << '\n';
    }
    return 0;
}


Measured memory_bytes: 3636
N, M=map(int,input().split())
 
ans=[0]*N
pena=[0]*N
AC=[0]*N
 
for i in range(M):
    p,s=input().split()
    p=int(p)
    if s=="WA":
        pena[p-1]+=1
        #print(pena)
    else:
        if AC[p-1]==0:
            ans[p-1]+=pena[p-1]
        AC[p-1]=1
        #print(AC)
 
print(AC.count(1),sum(ans))

Measured memory_bytes: 5364
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
int min(int a,int b)
{
	if(a<b) return a;
	else return b;
}
int a[2001][2001],b[2001];
int main(){
	 int i,j,x,y,n,k=1,l=1;
	 memset(b,0,sizeof(b));
	 cin>>n>>x>>y;
	 for(i=1;i<=n;i++)
	  for(j=i+1;j<=n;j++)
	   {
	   	a[i][j]=min(j-i,fabs(i-x)+1+fabs(j-y));
	   	b[a[i][j]]++;
	   }
	  
	  for(i=1;i<=n-1;i++)
	  cout<<b[i]<<endl;
	 return 0;
}

Measured memory_bytes: 15360
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>


using namespace std;

typedef long long ll;

const ll INF = 1ll << 60;
const ll MOD = 1e9 + 7;

ll dp[100100] = { 0 };

int main(void){
	int a, p;
	cin >> a >> p;

	int total = 3 * a + p;

	int ans = total / 2;

	cout << ans << endl;
}


Measured memory_bytes: 256
# coding: utf-8
# Your code here!
import itertools
import math

def dist(a,b):
    res=0
    for i in range(D):
        res+=(abs(a[i]-b[i]))**2
    res=res**0.5
    return res


N,D = map(int, input().split())
List = [list(map(int, input().split())) for i in range(N)]

ans=0
for i in range(N-1):
    for j in range(i+1,N):
        if dist(List[i],List[j]).is_integer()==True:
            ans+=1
            
print(ans)


Measured memory_bytes: 3188
using System;

class Atcoder117
{
    public static void Main()
    {
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        int c = int.Parse(Console.ReadLine());
        int d = int.Parse(Console.ReadLine());
        int e = int.Parse(Console.ReadLine());
        int k = int.Parse(Console.ReadLine());

        if (e - a > k)
            Console.WriteLine(":(");
        else
            Console.WriteLine("Yay!");
    }
}

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

#define int long long

using namespace std;

const int N = 1e6 + 9;

int n, w, mx;
int a[N], b[N], ans[N];

bool dp[N];

main(){
  cin>> n>> w;
  for(int i = 1; i <= n; i++){
  	cin>> a[i]>> b[i];
  }
  dp[0] = 1;
  ans[0] = 0;
  for(int i = 1; i <= n; i++){
  	  for(int j = w; j >= 0; j--){
      	if(dp[j] == 1){
        	dp[j + a[i]] = 1;
          	ans[j + a[i]] = max(ans[j + a[i]], ans[j] + b[i]);
        }
      }
  }
  for(int i = w; i >= 0; i--)mx = max(mx, ans[i]);
  cout<< mx;
}


Measured memory_bytes: 7680
n, q = [int(i) for i in input().split()]
s = input()
ans = ""
table = [0] * n
cnt = 0
for i in range(n-1):
  if s[i:i+2] == "AC":
    cnt += 1
  table[i+1] = cnt
for i in range(q):
  l, r = [int(j) for j in input().split()]
  print(table[r-1] - table[l-1])

Measured memory_bytes: 6060
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
 
#define pb push_back
#define fi first
#define se second
 
const ll MOD = 1000000007;

int main() {
   int n; scanf("%d", &n);
   vector<int> h(n);
   for (int &i : h)
      scanf("%d", &i);
   for (int i = 1; i < n; ++i) {
      if (h[i] > h[i - 1])
         --h[i];
   }
   bool ans = true;
   for (int i = 0; i < n - 1; ++i) {
      if (h[i] > h[i + 1]) {
         ans = false;
         break;
      }
   }
   if (ans) {
      puts("Yes");
   } else {
      puts("No");
   }
   return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
const ll INF = 1LL << 60;
const ll MOD = (int) 1e9 + 7;

int main(){
    ll n;
    cin >> n;
    if (n % 2 == 1) {
        cout << 0 << "\n";
        return 0;
    }
    ll ans = n / 10;
    ll p = 50;
    while (n >= p) {
        ans += n / p;
        p *= 5;
    }
    cout << ans << "\n";
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <tuple>
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;

signed main() {
	string s;
	cin >> s;
	if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3]) {
		cout << "Bad" << endl;
	}
	else {
		cout << "Good" << endl;
	}
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#define llint long long
#define inf 1e18
#define rep(x, s, t) for(llint (x) = (s); (x) < (t); (x)++)
#define Rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)

using namespace std;

string s[3];
bool conf[3][3][10005];

bool check(string &s, string &t, llint p)
{
	llint q = 0;
	for(int i = p; i < s.size(); i++){
		if(q >= t.size()) break;
		if(s[i] != '?' && t[q] != '?' && s[i] != t[q]) return true;
		q++;
	}
	return false;
}

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	rep(i, 0, 3) cin >> s[i];
	llint p[] = {0, 1, 2};
	
	rep(i, 0, 3){
		rep(j, 0, 3){
			if(i == j) continue;
			rep(k, 0, s[i].size()){
				conf[i][j][k] = check(s[i], s[j], k);
			}
		}
	}
	
	llint ans = inf;
	do{
		for(int i = 0; i <= 2005; i++){
			if(conf[p[0]][p[1]][i]) continue;
			for(int j = 0; j <= 4005; j++){
				if(conf[p[1]][p[2]][j]) continue;
				if(conf[p[0]][p[2]][i+j]) continue;
				llint len = s[p[0]].size();
				len = max(len, (llint)s[p[1]].size() + i);
				len = max(len, (llint)s[p[2]].size() + i + j);
				ans = min(ans, len);
			}
		}
	}while(next_permutation(p, p+3));
	cout << ans << endl;
	
	return 0;
}

Measured memory_bytes: 384
#pragma GCC optimize (2)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int f[10];

inline int read()
{
    int x=0,f=1;char ch=getchar();
    for (;ch<'0'||ch>'9';ch=getchar()) if (ch=='-') f=-1;
    for (;ch>='0'&&ch<='9';ch=getchar()) x=(x<<1)+(x<<3)+ch-'0';
    return x*f;
}

int main()
{
	int a=read(), b=read(), c=read(), d=read();
	f[a]=1; f[b]=1; f[c]=1; f[d]=1;
	if (f[1] && f[4] && f[7] && f[9]) puts("YES"); else puts("NO");
	return 0;
}


Measured memory_bytes: 256
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<climits>
#include<iostream>
#include<sstream>
#include<utility>
#include<map>
#include<vector>
#include<queue>
#include<algorithm>
#include<set>
#include<stack>
#include <functional>

using namespace std;
typedef long long ll;
typedef pair<int,int>P;

int main()
{
	int A,B,C;
	cin>>A>>B>>C;
	cout<<(max(0,C-(A-B)))<<endl;

}

Measured memory_bytes: 256
#include<stdio.h>

 int main(void)

{

   int W,H,x,y,r;

   scanf("%d %d %d %d %d",&W,&H,&x,&y,&r);

   if(W<x+r||x-r<0||H<y+r||y-r<0){

      printf("No\n");

   }else{

      printf("Yes\n");

   }

   return 0;

}

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

int main(){
	int a,b,c,x;
	cin >> a >> b >> c >> x;
	int ans = 0;
	for(int A = 0; A <= a; ++A){
		for(int B = 0; B <= b; ++B){
			for(int C = 0; C <= c; ++C){
				int total = 500*A+100*B+50*C;
				if(total == x) ++ans;
			}
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define show(x) for(auto i: x){cout << i << " ";}
typedef long long ll;

#define MAX_NUM 1 << 12

int status[MAX_NUM] = {0};

vector<int> bitNumSorted(int n){

    vector<vector <int>> tmp(n + 1);
    int max = 1 << n;
    rep(i, max){
        int j = i;
        int bitn = 0;
        while(j > 0){
            if (j % 2 != 0) bitn++;
            j >>= 1;
        }
//        cout << i << bitn << endl;
        tmp[bitn].push_back(i);
    }
    vector<int> ans;
    rep(i, n + 1){
        for(auto x: tmp[i]) {ans.push_back(x);}
    }
    return ans;
}

int main()
{
    int n, m;
    cin >> n >> m;
    vector<int> a;
    vector<int> c;

    rep(i, m){ 
        int tmp; cin >> tmp; a.push_back(tmp);
        int tmp_b; cin >> tmp_b;
        int c_bit = 0;
        rep(j, tmp_b){
            int tmp_c; cin >> tmp_c;
            c_bit += (1 << (tmp_c - 1));
        }
        c.push_back(c_bit);
    }

    //show(bitNumSorted(n));

    status[0] = 0;
    for (auto x: bitNumSorted(n))
    {
        if (status[x] == 0 && x != 0) continue;
        for (int i = 0; i < m; i++)
        {
            int tmp = x | c[i];
            if (status[tmp] == 0){
                status[tmp] = status[x] + a[i];
            } else {
                status[tmp] = min(status[tmp], status[x] + a[i]);
            }
        }
    }
        
    cout << (status[(1 << n) - 1] == 0 ? -1 : status[(1 << n) - 1]) << endl;   

}


/*
bitDPっぽい

Nが12しかないので2^Nの計算量が許容される

開けられる宝箱の状態をbitで表すと12bit 2^N個あり、
書く状態に対して必要な費用の最小値を算出する。

状態遷移の仕方は、鍵の種類に依存。
　分散型　ある地点から可能な遷移をメモ、不可能な状態は無視
　
辿る順番は、遷移の逆順を取らないことが補償されればよい。
よって、
0000 
0001 0010 0100 1000
0011 0101 1001 1010 0110 1100
0111 1011 1101 1110
1111
の辿り方（どうやって実装しよう？）

①上記の順序を担保するvector配列を作成
②状態を-1で初期化。0000のみ0にしておく。
③上記の順序のvector配列でforeachかける
　　foreach内で、下記の処理
　　-1ならばcontinue
      でなければMパターンの推移処理
      　　要素にMを足した要素を更新する　　
　　　　　　　費用は-1を除外したminを取る。
*/


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

public class Main {
	final int _intMax = Integer.MAX_VALUE; // =2147483647>10^9
	final int _intMin = Integer.MIN_VALUE;
	final long _longMax = Long.MAX_VALUE; // =9223372036854775807L>10^18
	final long _longMin = Long.MIN_VALUE;
	static boolean bElapsed = false;

	void solve() {
		int[][] map = new int[3][3];
		for (int i = 0; i < 3; i++) {
			int[] ia = readNums();
			for (int j = 0; j < 3; j++) {
				map[i][j] = ia[j];
			}
		}
		int d1 = map[0][1] - map[0][0];
		int d2 = map[1][1] - map[1][0];
		int d3 = map[2][1] - map[2][0];
		if (d1 != d2 || d2 != d3) {
			pln("No");
			return;
		}
		d1 = map[0][2] - map[0][1];
		d2 = map[1][2] - map[1][1];
		d3 = map[2][2] - map[2][1];
		if (d1 != d2 || d2 != d3) {
			pln("No");
			return;
		}
		d1 = map[1][0] - map[0][0];
		d2 = map[1][1] - map[0][1];
		d3 = map[1][2] - map[0][2];
		if (d1 != d2 || d2 != d3) {
			pln("No");
			return;
		}
		d1 = map[2][0] - map[1][0];
		d2 = map[2][1] - map[1][1];
		d3 = map[2][2] - map[1][2];
		if (d1 != d2 || d2 != d3) {
			pln("No");
			return;
		}
		pln("Yes");
	}

	int abs(int a) {
		return (a >= 0) ? a : -a;
	}

	int max(int a, int b) {
		return (a > b) ? a : b;
	}

	int min(int a, int b) {
		return (a < b) ? a : b;
	}

	int pint(String s) {
		return Integer.parseInt(s);
	}

	long plong(String s) {
		return Long.parseLong(s);
	}

	String readLine() {
		try {
			return _in.readLine();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	int readNum() {
		String line = readLine();
		return pint(line);
	}

	String[] readFlds() {
		String line = readLine();
		return line.split(" ");
	}

	int[] readNums() {
		String[] flds = readFlds();
		int[] nums = new int[flds.length];
		for (int i = 0; i < flds.length; i++) {
			nums[i] = pint(flds[i]);
		}
		return nums;
	}

	void p(char c) {
		_out.print(c);
	}

	void pln(char c) {
		_out.println(c);
	}

	void p(double d) {
		_out.print(d);
	}

	void pln(double d) {
		_out.println(d);
	}

	void p(long l) {
		_out.print(l);
	}

	void pln(long l) {
		_out.println(l);
	}

	void p(String s) {
		_out.print(s);
	}

	void pln(String s) {
		_out.println(s);
	}

	static BufferedReader _in;
	static PrintWriter _out;

	public static void main(String[] args) {
		long start = System.currentTimeMillis();
		_in = new BufferedReader(new InputStreamReader(System.in));
		_out = new PrintWriter(System.out);
		new Main().solve();
		_out.flush();
		long end = System.currentTimeMillis();
		if (bElapsed) {
			System.err.println((end - start) + "ms");
		}
	}
}


Measured memory_bytes: 21204
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long int
#define pb push_back
#define ff first
#define ss second
#define all(v) (v).begin(), (v).end()
#define mod (int)(998244353)
#define PI 3.14159265358979323846264338327950L
// ------------------ Debugging ------------------
#define trace(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args);cout << endl; }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << "[ " << *it << " = " << a << " ] ";
    err(++it, args...);
}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const pair<Tk, Tv> &p){os << "{" << p.first << ',' << p.second << "}";return os;}
template <typename T> ostream& operator<<(ostream& os, const vector<T> &p){os << "[ "; for (T x: p) os << x << " "; os << "]" << endl; return os;}
template <typename T> ostream& operator<<(ostream& os, const set<T> &p){os << "{ "; for (T x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const map<Tk, Tv> &p){os << "{ "; for (pair<Tk, Tv> x: p) os << x << " "; os << "}" << endl; return os;}
// -----------------------------------------------

signed main(){

    fastIO

    int t = 1;
    // cin >> t;
    while (t--){
   		int d, t, s;
   		cin >> d >> t >> s;
   		int tt = (d + s - 1) / s;
   		if (tt <= t) {
   			cout << "Yes\n";
   		} else {
   			cout << "No\n";
   		}
    }
    
    return 0;
}

Measured memory_bytes: 3636
#include <bits/stdc++.h>
 
using namespace std;
 
#define MAX_N 100
#define MAX_C 100001
#define INF (1<<29)
typedef pair<int, int> pii;
 
int m[MAX_N];
pii dp[2][MAX_C];
 
void set_m(vector<int> &p)
{
    for (int i = 0; i < (int)p.size(); i++) {    
        m[i] = ((p[i] - 1) / 1000 + 1) * 1000;
    }
}
 
void update(pii &a, pii &b)
{
    if (a.first < b.first) {
        a = b;
    } else if (a.first == b.first) {
        if (a.second > b.second) {
            a = b;
        }
    }
}
 
int main()
{
    int N;
    while (cin >> N, N) {
        vector<int> p(N);
        for (int i = 0; i < N; i++) {
            cin >> p[i];
        }
         
        set_m(p);
         
        memset(dp, -1, sizeof(dp));
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < MAX_C; j++) {
                dp[i][j] = pii(-1, INF);
            }
        }
         
        dp[0][0] = pii(0, 0);
        for (int i = 0; i < N; i++) {
            int curr = (i & 1), next = !(i & 1);
            for (int j = 0; j < MAX_C; j++) {
                if (dp[curr][j].first == -1) continue;
                 
                update(dp[next][j], dp[curr][j]);
                 
                {
                    int pay = m[i];
                    int change = pay - p[i];                    
 
                    int _500 = (change / 500);
                    int nc = j + change - _500 * 500;                    
                     
                    pii ncost = pii(dp[curr][j].first + _500,
                                    dp[curr][j].second + p[i]);                    
                     
                    update(dp[next][nc], ncost);
                }
                 
                {
                    int pp = p[i] % 1000;
                    if (pp > 500 || pp == 0) {
                        if (abs(pp - 500) <= j) {
                            int pay = m[i] + abs(pp - 500);
                            int change = pay - p[i];
                            int _500 = (change / 500);
                            int nc = j - abs(pp - 500) + change - _500 * 500;
                             
                            pii ncost = pii(dp[curr][j].first + _500,
                                            dp[curr][j].second + p[i]);                    
                     
                            update(dp[next][nc], ncost);
                        }
                    } 
                }
            }
             
            for (int j = 0; j < MAX_C; j++) {
                dp[curr][j] = pii(-1, INF);
            }
        }
         
        pii res = pii(-1, INF);
        for (int i = 0; i < MAX_C; i++) {
            update(res, dp[N&1][i]);            
        }
        cout << res.first << " " << res.second << endl;
    }
    return 0;
}

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

int C[3][3];
int A[3];
int B[3];

int main(void) {
	for (int j = 0; j < 3; ++j) {
		for (int i = 0; i < 3; ++i)
			cin >> C[j][i];
	}

	A[0] = 0;
	for (int i = 0; i < 3; ++i)
		B[i] = C[0][i] - A[0];
	for (int j = 1; j < 3; ++j)
		A[j] = C[j][0] - B[0];

	bool ans = true;
	for (int j = 0; j < 3; ++j) {
		for (int i = 0; i < 3; ++i) {
			if (C[j][i] != A[j] + B[i]) {
				ans = false;
				break;
			}
		}
		if (!ans)
			break;
	}

	if (ans)
		cout << "Yes\n";
	else
		cout << "No\n";
	return 0;
}


Measured memory_bytes: 256
using System;

class Plogram
{
    static void Main()
    {
        var day = int.Parse(Console.ReadLine());

        string D = "Christmas";
        if(day==24)
        {
            D = "Christmas Eve";
        }
        else if(day == 23)
        {
            D = "Christmas Eve Eve";
        }
        else if(day == 22)
        {
            D = "Christmas Eve Eve Eve";
        }
        
        Console.WriteLine(D);
    }
}


Measured memory_bytes: 13140