akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<algorithm>
#include<queue>
#include<tuple>
#include<cstdlib>
template<typename T>
void fin(T const& t){ std::cout << t << std::endl; exit(0); }

template<typename T>
std::vector<std::vector<T>> mk2d(size_t s1, size_t s2, T const& val) {
  std::vector<T> tmp(s2, val);
  return std::vector<std::vector<T>>(s1, tmp);
}
int const dx[4] = {0, 1, 0, -1};
int const dy[4] = {1, 0, -1, 0};
int main() {
  std::cin.tie(0); std::ios::sync_with_stdio(false);
  int H, W; std::cin >> H >> W;
  auto bm = mk2d(H+2, W+2, '#');
  std::queue<std::tuple<int,int,int>> q;
  for(int h = 1; h <= H; ++h) {
    for(int w = 1; w <= W; ++w) {
      std::cin >> bm[h][w];
      if(bm[h][w]=='#') q.emplace(w, h, 0);
    }
  }
  auto dist = mk2d(H+2, W+2, H*W+1);
  while(!q.empty()) {
    int x, y, c;
    std::tie(x, y, c) = q.front(); q.pop();
    if(dist[y][x] <= c) continue;
    dist[y][x] = c;
    for(int i = 0; i < 4; ++i) {
      int nx = x + dx[i];
      int ny = y + dy[i];
      if(bm[ny][nx] == '.') q.emplace(nx, ny, c+1);
    }
  }
  int ans = 0;
  for(int h = 1; h <= H; ++h) {
    for(int w = 1; w <= W; ++w) ans = std::max(ans, dist[h][w]);
  }
  fin(ans);
  return 0;
}


Measured memory_bytes: 20640
import itertools

N, M, X = map(int, input().split())
CA = [list(map(int, input().split())) for _ in range(N)]

mn = 10**10
for pat in itertools.product([0,1], repeat=N):
    cost = 0
    skills = [0]*M
    for i in range(N):
        cost += pat[i] * CA[i][0]
        for j in range(M):
            skills[j] += pat[i] * CA[i][j+1]
    ok = True
    for j in range(M):
        if skills[j] < X:
            ok = False
    if ok:
        mn = min(mn, cost)

if mn == 10**10:
    print(-1)
else:
    print(mn)


Measured memory_bytes: 68396
#include <bits/stdc++.h>
typedef long long LL;
using namespace std;

const int maxn = 1e5+10;
const int mod = 1e9+7;
int n,k;
int arr[maxn];

int32_t main()
{
    cin >> n >> k;
    for(int i = 1;i<=n;i++){
        cin >> arr[i];
    }
    int dp[maxn];
    dp[1] = 0;
    dp[2] = abs(arr[2] - arr[1]);
    for(int i = 3;i<=k+1;i++){
        dp[i] = abs(arr[i] - arr[1]);
        for(int j = 1;j<i;j++){
            dp[i] = min(dp[i],dp[j] + abs(arr[i] - arr[j]));
        }
    }
    for(int i = k+1;i<=n;i++){
        dp[i] = dp[i-k] + abs(arr[i-k] - arr[i]);
        for(int j = i - k;j<i;j++){
            dp[i] = min(dp[i],dp[j] + abs(arr[i] - arr[j]));
        }
    }
    cout << dp[n] << endl;
}


Measured memory_bytes: 4384
#include <iostream>
#include <string>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

int main()
{
  string s;
  cin >> s;
  int sum = 700;
  for (auto e : s) {
    if (e == 'o') sum += 100;
  }
  cout << sum << endl;
}


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

using namespace std;
#define ll long long int

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

	// ll n;
	// cin>>n;
	// if(n>=30){
	// 	cout<<"Yes"<<endl;
	// }
	// else
	// 	cout<<"No"<<endl;

	// return 0;

	ll m, n,a,b,count=0;
	cin>>m>>n;
	while(m--){
		cin>>a>>b;
		double temp= double(sqrt(a*a+b*b));
		if(temp<=(double)n)
			count++;
	}
	cout<<count<<endl;
	return 0;
}


Measured memory_bytes: 3648
#include <bits/stdc++.h>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
    string S;
    cin >> S;
    int n = S.size();
    for (int i=0; i < n; i++) {
        cout << "x";
    }

    cout << endl;
    return 0;
}

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

#define V vector
typedef long long ll;
typedef unsigned long long ull;

typedef V<int> vi;
typedef V<ll> vll;
typedef V<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define f(i,a) for(int i = 0 ; i < a ; i++)
#define fll(i,a) for(ll i = 0 ; i < a ;i++)
#define forab(i,a,b) for(int i = a ; i < b ; i++)
#define prec(x) cout<<fixed<<setprecision(x)
#define ff first
#define ss second

#define pb push_back
#define mp make_pair
#define numberofdigits(x) floor(log10(x)) + 1

ll M = 1e7 + 7;

ll binpow(ll a, long long b) {
	ll res = 1;
	while (b > 0) {
		if (b & 1)
			res = (res * a);
		a = (a * a);
		b >>= 1;
	}
	return res;
}



int main() {

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);


	int H , W , M;
	cin >> H >> W >> M;

	set<pair<int, int>> target;

	ll row[H + 1] = {0LL} , col[W + 1] = {0LL};
	int R = 1, C = 1 , mxr = -1 , mxc = -1;

	for (int i = 0 ; i < M ; i++)
	{
		int h , w;
		cin >> h >> w;
		target.insert({h, w});

		row[h]++ , col[w]++;
		if (mxr < row[h])
		{
			mxr = row[h];
			R = h;
		}

		if (mxc < col[w])
		{
			mxc = col[w];
			C = w;
		}
	}

	ll ans = 0;

	for (int j = 1 ; j <= W ; j++)
	{
		if (mxc == col[j])
		{
			ll d = row[R] + col[j];

			if (target.count({R , j}) > 0)
				d--;
			ans = max(ans , d);

		}
	}

	for (int i = 1 ; i <= H ; i++)
	{
		if (mxr == row[i])
		{
			ll d = row[i] + col[C];
			if (target.count({i , C}) > 0)
				d--;
			ans = max(ans , d);
		}
	}

	cout << ans << "\n";

	return 0;
}





Measured memory_bytes: 22376
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let aaa = readInts()
    if aaa[0] + aaa[1] + aaa[2] >= 22 {
        print("bust")
    } else {
        print("win")
    }
}

main()


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

int main(void){
  int a, b, c;
  cin >> a >> b >> c;
  
  int number = a * 100 +  b * 10 + c;
  if (number % 4 == 0){
  	cout << "YES" << endl;
  }else{
  	cout << "NO" << endl;
  }
  
}


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

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		int n;
		String[] token;
		int rank;
		boolean[] S = new boolean[13]; 
		boolean[] H = new boolean[13]; 
		boolean[] C = new boolean[13]; 
		boolean[] D = new boolean[13];
		
		for (int i = 0; i < 13; i++) {
			S[i] = H[i] = C[i] = D[i] = false;
		}
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		n = Integer.parseInt(br.readLine());
		
		for (int i = 0; i < n; i++) {
			token = br.readLine().split(" ");
			rank = Integer.parseInt(token[1]);
			if (token[0].equals("S")) {
				S[rank - 1] = true;
			} else if (token[0].equals("H")) {
				H[rank - 1] = true;
			} else if (token[0].equals("C")) {
				C[rank - 1] = true;
			} else if (token[0].equals("D")) {
				D[rank - 1] = true;
			}
		}
		
		for (int i = 0; i < 13; i++) {
			if (!S[i]) System.out.println("S " + (i + 1));
		}
		for (int i = 0; i < 13; i++) {
			if (!H[i]) System.out.println("H " + (i + 1));
		}
		for (int i = 0; i < 13; i++) {
			if (!C[i]) System.out.println("C " + (i + 1));
		}
		for (int i = 0; i < 13; i++) {
			if (!D[i]) System.out.println("D " + (i + 1));
		}
	}
}

Measured memory_bytes: 24372
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using vec = vector<ll>;
using vec2 = vector<vector<ll>>;
ll inf = pow(2, 62);

int main()
{
    ll n;
    cin >> n;
    vec A(n);
    rep(i,n){
        cin >> A[i];
    }
    ll mon = 1000;
    for(ll i = 0;i < n-1;i++){
        if(A[i] < A[i+1]){
            ll e = mon/A[i];
            mon = mon - e*A[i] + e*A[i+1];
        }
    }
    cout << mon << endl;
}

Measured memory_bytes: 3620
#include <bits/stdc++.h>
using namespace std;
int main(void){
    int n; cin>>n;
    int ans = 0;
    vector <int> a(n),b(n);
    for(int i=0;i<n;i++){
         cin>>a[i];
    }
    for(int i=0;i<n;i++){
         cin>>b[i];
    }
    for(int i=0;i<n;i++){
         if(a[i]>b[i]) ans+=a[i]-b[i];
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define gc() getchar()
template <typename tp>
inline void read(tp& x) {
  x = 0; char tmp; bool key = 0;
  for (tmp = gc() ; !isdigit(tmp) ; tmp = gc())
    key = (tmp == '-');
  for ( ; isdigit(tmp) ; tmp = gc())
    x = (x << 3) + (x << 1) + tmp - '0';
  if (key) x = -x;
}
const int N = 1000010;
struct edge {
  int la,b;
} con[N << 1];
int tot,fir[N];
void add(int from,int to) {
  con[++tot] = (edge) {fir[from],to};
  fir[from] = tot;
}
int n,dp[N][2][2],tmp[2][2][2];
inline void ckmn(int& x,int y) {
  x = x > y ? y : x;
}
void dfs(int pos,int fa) {
  int rec[2][2][2];
  memset(rec,0x3f,sizeof rec);
  rec[0][0][1] = 0;
  rec[0][1][0] = 1;
  for (int i = fir[pos] ; i ; i = con[i].la) {
    if (con[i].b == fa) continue;
    dfs(con[i].b,pos);
    memset(tmp,0x3f,sizeof tmp);
    for (int t = 0 ; t < 2 ; ++ t)
      for (int a = 0 ; a < 2 ; ++ a)
	for (int b = 0 ; b < 2 ; ++ b)
	  for (int c = 0 ; c < 2 ; ++ c)
	    for (int d = 0 ; d < 2 ; ++ d) {
	      if (t == 1 && c == 0) continue;
	      ckmn(tmp[t+(!c)][a|c][(b&(!c))|(d&(!a))],rec[t][a][b]+dp[con[i].b][c][d]);
	    }
    for (int t = 0 ; t < 2 ; ++ t)
      for (int a = 0 ; a < 2 ; ++ a)
	for (int b = 0 ; b < 2 ; ++ b)
	  rec[t][a][b] = tmp[t][a][b];
  }
  for (int t = 0 ; t < 2 ; ++ t)
    for (int a = 0 ; a < 2 ; ++ a)
      for (int b = 0 ; b < 2 ; ++ b) {
	ckmn(dp[pos][a][b|(t && pos != 1)],rec[t][a][b]);
      }
}
int main() {
  int x,y;
  read(n);
  if (n == 1) return puts("0"), 0;
  if (n == 2) return puts("1"), 0;
  for (int i = 1 ; i < n ; ++ i) {
    read(x), read(y);
    ++ x;
    ++ y;
    add(x,y);
    add(y,x);
  }
  memset(dp,0x3f,sizeof dp);
  dfs(1,0);
  printf("%d\n",dp[1][1][0]);
  return 0;
}


Measured memory_bytes: 34560
n, m, l = list(map(int, input().split(" ")))
matrix_a = [list(map(int, input().split(" "))) for i in range(n)]
matrix_b = [list(map(int, input().split(" "))) for j in range(m)]
matrix_c = [[0 for k in range(l)] for o in range(n)]
ans = 0

for a in range(n):
    for b in range(l):
        ans = 0
        for c in range(m):
            ans += matrix_a[a][c] * matrix_b[c][b]
        matrix_c[a][b] = ans       

for matrix in matrix_c:
    print(*matrix)


Measured memory_bytes: 7068
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef tuple<ll,ll,ll> T;
const long long INF = 1LL<<60;
// const int MOD = 1000000000+7;
#define rev(s) (string((s).rbegin(), (s).rend()))
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
// cout << fixed << setprecision(10) << ans << endl; 有効桁数指定
// *min_element(c + l, c + r) *max_element(c + l, c + r) 配列の中のmin-max
// int dx[8]={1,1,0,-1,-1,-1,0,1};
// int dy[8]={0,1,1,1,0,-1,-1,-1};
// int dx[4]={1,0,-1,0};
// int dy[4]={0,1,0,-1};
// ~ は、-1の時だけfalse
const int MAX = 2000010;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

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

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

// int main() {
//     // 前処理
//     COMinit();

//     // 計算例
//     cout << COM(100000, 50000) << endl;
// }

int main () {

    COMinit();

    int r1,c1,r2,c2;cin>>r1>>c1>>r2>>c2;

    ll ans=0;

    for (int i=r1;i<=r2;i++) {
        ans = (ans+(COM(i+c2+1,i+1)-COM(i+c1,i+1)+MOD)%MOD)%MOD;
    }

    cout<<ans<<endl;

}

Measured memory_bytes: 47104
#include <stdio.h> 
int main(void)
{
	int H, W, i, j;
	H = 1;
	W = 1;
	while (1)
	{
		scanf("%d %d", &H, &W);
		if ((H == 0) && (W == 0))
		{
			break;
		}
		for (i = 0;i < H;i++)
		{
			for (j = 0;j < W;j++)
			{
				if ((i + j) % 2 == 0)
				{
					printf("#");
				}
				if ((i + j) % 2 == 1)
				{
					printf(".");
				}
			}
			printf("\n");
		}
		printf("\n");
	}




	return 0;
}

Measured memory_bytes: 572
#include <iostream>
#include <math.h>
using namespace std;

int main(){
  int n, a, i, tmp;
  int cnt = 0;

  cin>>n;

  while(cin>>a){
    if(a%2 != 0){
      tmp = 0;
      for(i = 2; i <= sqrt(a); i++){
        if((a%i) == 0) tmp++;
      }
      if(tmp == 0) cnt++;
    }else if(a == 2) cnt++;
  }

   cout<<cnt<<endl;
}

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

int main() {
  int x, N;
  cin >> x >> N;
  vector<int> A(N);
  int count = 0;
  int counta = 0;
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  for (int j = 0; j <= 100; j++) {
    count = 0;
    counta = 0;
    for (int i = 0; i < N; i++) {
      if (!(x + j == A.at(i))) {
        count++;
      }
      if (!(x - j == A.at(i))) {
        counta++;
      }
      if (counta == N) {
        cout << x - j << endl;
        break;
      }
      else if (count == N) {
        cout << x + j << endl;
        break;
      }
    }
    if (count == N || counta == N) {
        break;
    }
  }
  if (N == 0) {
    cout << x << endl;
  }
}

Measured memory_bytes: 3632
'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const a = parseInt(args[0][0], 10)
	const b = parseInt(args[0][1], 10)
	const c = parseInt(args[0][2], 10)
	if (a < c && c < b) console.log('Yes')
	else if (b < c && c < a) console.log('Yes')
	else console.log('No')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


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

class PaizaSample
{

    static void Main()
    {
        Dictionary<char, string> hyo1 = new Dictionary<char, string>()
        {
            {' ', "101"},{'\'', "000000"},{',', "000011"},{'-', "10010001"},{'.', "010001"},{'?', "000001"},
            {'A', "100101"},{'B', "10011010"},{'C', "0101"},{'D', "0001"},{'E', "110"},{'F', "01001"},
            {'G', "10011011"},{'H', "010000"},{'I', "0111"},{'J', "10011000"},{'K', "0110"},{'L', "00100"},
            {'M', "10011001"},{'N', "10011110"},{'O', "00101"},{'P', "111"},{'Q', "10011111"},{'R', "1000"},
            {'S', "00110"},{'T', "00111"},{'U', "10011100"},{'V', "10011101"},{'W', "000010"},{'X', "10010010"},
            {'Y', "10010011"},{'Z', "10010000"}
        };

        Dictionary<string, char> hyo2 = new Dictionary<string, char>()
        {
            {"00000", 'A'},{"00001", 'B'},{"00010", 'C'},{"00011", 'D'},{"00100", 'E'},{"00101", 'F'},{"00110", 'G'},
            {"00111", 'H'},{"01000", 'I'},{"01001", 'J'},{"01010", 'K'},{"01011", 'L'},{"01100", 'M'},{"01101", 'N'},
            {"01110", 'O'},{"01111", 'P'},{"10000", 'Q'},{"10001", 'R'},{"10010", 'S'},{"10011", 'T'},{"10100", 'U'},
            {"10101", 'V'},{"10110", 'W'},{"10111", 'X'},{"11000", 'Y'},{"11001", 'Z'},{"11010", ' '},{"11011", '.'},
            {"11100", ','},{"11101", '-'},{"11110", '\''},{"11111", '?'}
        };

        string input;
        while ((input = Console.ReadLine()) != null)
        {
            string crypt = "";
            foreach (char c in input)
            {
                crypt += hyo1[c];
            }

            int length = crypt.Length;
            if (length % 5 != 0)
            {
                for (int i = 0; i < 5 - length % 5; i++)
                {
                    crypt += "0";
                }
            }

            for (int i = 0; i < crypt.Length / 5; i++)
            {

                string sub = crypt.Substring(i * 5, 5);
                //Console.WriteLine(sub);
                //Console.WriteLine(hyo2[sub]);
                Console.Write(hyo2[sub]);
            }
            Console.WriteLine();
        }
       // Console.ReadKey();

    }
}

Measured memory_bytes: 9984
#include <bits/stdc++.h>
using namespace std;
#define ll                      long long int
#define pb                      push_back
#define MOD                     1000000007
#define inf                     3e18
#define ld                      long double
//#define mp                      make_pair
#define vpll                    vector<pair<ll,ll>>
#define sll                     set<ll>
#define vll                     vector<ll>
#define vld                     vector<ld>
#define vvll                    vector<vector<ll>>
#define vvld                    vector<vector<ld>>
#define pll                     pair<ll,ll>
#define vvpll                   vector<vector<pair<ll,ll>>>
#define pqll                    priority_queue<ll>
#define mll                     map<ll,ll>
#define mlc                     map<ll,char>
#define um                      unordered_map
#define umll                    um<ll,ll>
#define umlc                    um<ll,char>
#define umcl                    um<char,ll>
#define all(x)                  x.begin(),x.end()
#define fi                      first
#define se                      second
#define test                    ll Testcases;cin>>Testcases;while(Testcases--)
#define fastIO                  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << " "<< name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
    const char* comma = strchr(names + 1, ',');
    cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

void inp_out()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("debug.txt", "w", stderr);
    #endif
}

int main()
{
	fastIO
//	inp_out();
	string s;
	cin>>s;
	if((s[2]==s[3])&&(s[4]==s[5]))
	{
		cout<<"Yes";
	}	

	else
	{
		cout<<"No";
	}

	return 0;
}

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

using namespace std;
typedef unsigned int uint;
typedef long long int ll;
typedef unsigned long long int ull;

#define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout<<e<<" ";}cout<<endl;
#define debugm(m) printf("L%d %s is..\n",__LINE__,#m);for(auto v:m){for(auto e:v){cout<<e<<" ";}cout<<endl;}
#define debuga(m,w) printf("L%d %s is => ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout<<endl;
#define debugaa(m,w,h) printf("L%d %s is..\n",__LINE__,#m);for(int y=0;y<(h);y++){for(int x=0;x<(w);x++){cout<<(m)[x][y]<<" ";}cout<<endl;}
#define ALL(v) (v).begin(),(v).end()
#define BIGINT 0x7FFFFFFF
#define E107 1000000007
void printbit(int u){if(u==0)cout<<0;else{int s=0,k=0;for(;0<u;u>>=1,k++)s=(s<<1)|(u&1);for(;0<k--;s>>=1)cout<<(s&1);}}

#define TIME chrono::system_clock::now()
#define MILLISEC(t) (chrono::duration_cast<chrono::milliseconds>(t).count())

template<typename T1,typename T2>
ostream& operator <<(ostream &o,const pair<T1,T2> p){o<<"("<<p.first<<":"<<p.second<<")";return o;}

int width,height;
int m,n;

string str;

bool check(int idx,char* target){
    if (*target==0){
        return true;
    }
    if (str.size()<=idx || *target!=str[idx]){
        return false;
    }
    return check(idx+1,target+1);
}

int main(){
    int i,j,k;
    int x,y,a,b;
    
    cin >> str;
    
    priority_queue<int> pq;
    
    pq.push(0);
    
    while (!pq.empty()){
        int e = pq.top();pq.pop();
        
        if (e==str.size()){
            cout << "YES" << endl;
            return 0;
        }
        
        if (check(e,"dream")){
            pq.push(e+5);
        }if (check(e,"dreamer")){
            pq.push(e+7);
        }if (check(e,"erase")){
            pq.push(e+5);
        }if (check(e,"eraser")){
            pq.push(e+6);
        }
    }
    
    cout << "NO" << endl;
    

    return 0;
}

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

int main() { 
	int a, b;
	cin >> a >> b;
	int d = a / b;
	int r = a % b;
	double f = (double)a / (double)b;
	cout << d << " " << r << " " << setprecision(5) << fixed << f << endl;
	
}


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

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, K;
  cin >> N >> K;
  vector<vector<int>> board(2 * K + 1, vector<int>(2 * K + 1));
  int sum = 0, white = 0;
  for (int i = 0; i < N; i++) {
    int x, y;
    string c;
    cin >> x >> y >> c;
    x = x % (2 * K), y = y % (2 * K);
    if (c == "B") {
      board[x + 1][y + 1]++;
      sum++;
    }
    if (c == "W") {
      board[x + 1][y + 1]--;
      sum--;
      white++;
    }
  }

  for (int i = 1; i <= 2 * K; i++) {
    for (int j = 1; j <= 2 * K; j++) {
      board[i][j] += board[i][j - 1];
    }
  }
  for (int i = 1; i <= 2 * K; i++) {
    for (int j = 1; j <= 2 * K; j++) {
      board[i][j] += board[i - 1][j];
    }
  }

  int res = -(1 << 28);
  for (int i = 0; i <= K; i++) {
    for (int j = 0; j <= K; j++) {
      int a = board[i][j];
      int b =
          board[i + K][j + K] - board[i + K][j] - board[i][j + K] + board[i][j];
      int c = board[2 * K][j] - board[i + K][j];
      int d = board[i][2 * K] - board[i][j + K];
      int e = board[2 * K][2 * K] - board[2 * K][j + K] - board[i + K][2 * K] +
              board[i + K][j + K];
      int tmp = a + b + c + d + e;
      res = max({res, tmp, sum - tmp});
    }
  }
  res += white;
  cout << res << '\n';
  return 0;
}


Measured memory_bytes: 16128
import statistics
n=int(input())
a=[0 for _ in range(n)]
b=[0 for _ in range(n)]
for i in range(n):
	a[i],b[i] = map(int,input().split())
#やさしい
#つまりは, n=奇数のとき x_((n+1)//2)の値
#つまりは, n=偶数のとき x_(n//2)+x_(n//2+1)の値
#がどのくらいあるかを求める

#さすがに全探索はヤバイ
#奇数→すっっくない。中間として存在する範囲すべてをとりうるか？
ans = 0
if n % 2 == 1:
	ans = statistics.median(b)-statistics.median(a)+1
else:
	ans = int(statistics.median(b)*2-statistics.median(a)*2+1)
print(ans)

Measured memory_bytes: 28820
#include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#define INF 999999999

using namespace std;

int n, s, k, ans;
int a[105000];



void solve()
{

	int ret = n + 1;

	int l = 0, r = 0;
	map<int,int> m;
	while (1) {

		while (r < n && (int)m.size()<k) {
			if (a[r] <= k) {
				m[a[r]]++;
			}
			r++;
		}
		if ((int)m.size() < k)break;
		ret = min(ret, r-l);
		if (a[l] <= k) {
			if (m[a[l]] == 1)m.erase(a[l]);
			else m[a[l]]--;
		}
		l++;
	}

	if (ret > n)ret = 0;
	printf("%d\n", ret);

}


int main()
{
	scanf("%d %d", &n, &k);
	for (int i = 0; i < n; i++) {
		scanf("%d", &a[i]);
		
	}
	solve();

	return 0;
}

Measured memory_bytes: 8284
//by Top1
#include <bits/stdc++.h>
          
#define f first
#define s second
#define int long long
#define ld long double
#define ull unsigned long long
#define pii pair <int, int>
#define pll pair <long, long>
#define mp make_pair
#define pb push_back
#define pf push_front
#define pp pop_back
#define cerr cout
#define rev reverse
#define all(s) s.begin(), s.end()
#define sz(s) (int)s.size()
#define forn(i, a, b) for (int i = a; i <= b; i++)
#define boost ios_base::sync_with_stdio(false); cin.tie(0),cout.tie(0);
#define nxtp next_permutation
#define pvtp prev_permutation
#define KZ return 
#define x1 x21212121
#define y1 y21212121
#define sqr(x) x * x 
      
const int inf = (1e9) + 1;
const int mod = 479001599;
const int maxn = 1e6 + 111;
        
using namespace std;          

int n, m;

void solve(){
	string s;

	cin >> s;

	bool ch = true;

	for (int i = 0, j = sz(s) - 1; i < j; i++, j--)
		if (s[i] != s[j]){
			ch = false;
			break;
		}

	for (int i = 0, j = (sz(s) - 1) / 2 - 1; i < j; i++, j--)
		if (s[i] != s[j]){
			ch = false;
			break;
		}

	for (int i = (sz(s) + 3) / 2 - 1, j = sz(s) - 1; i < j; i++, j--)
		if (s[i] != s[j]){
			ch = false;
			break;
		}

	if (ch)
		cout << "Yes";
	else
		cout << "No";		
}                              
      
main(){
    boost;
    
    int q = 1;
 
    //cin >> q;
    
    while (q--){
        solve();
    }
}


Measured memory_bytes: 256
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		no3();
	}

	static void no3() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int K = sc.nextInt();
			Long[] a = new Long[N];

			for (int i = 0; i < N; i++) {
				a[i] = sc.nextLong();
			}

			Map<Long, Long> map = new HashMap<Long, Long>();
			for (int i = 0; i < N; i++) {
				if (map.containsKey(a[i])) {
					map.put(a[i], map.get(a[i]).longValue() + 1);
				} else {
					map.put(a[i], 1L);
				}
			}

			List<Entry<Long, Long>> entries = new ArrayList<Entry<Long, Long>>(map.entrySet());

			Collections.sort(entries, new Comparator<Entry<Long, Long>>() {
				// 比較関数
				@Override
				public int compare(Entry<Long, Long> o1, Entry<Long, Long> o2) {
					return o1.getValue().compareTo(o2.getValue());
				}
			});

			int size = map.size();
			int ans = 0;
			for (int i = 0; i < N; i++) {
				if (size > K) {
					Long t = entries.get(i).getValue();
					size = size - 1;
					ans += t;
				} else {
					break;
				}
			}
			System.out.println(ans);
		}
	}

	static void no2() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			long[] a = new long[N];

			for (int i = 0; i < N; i++) {
				a[i] = sc.nextLong();
			}

			int flg = 0;
			int ans = -1;
			for (int i = 0; i < 100; i++) {
				ans++;
				for (int n = 0; n < N; n++) {
					if (a[n] % 2 == 0) {
						a[n] = a[n] / 2;
					} else {
						flg = 1;
					}
				}
				if (flg == 1) {
					break;
				}
			}
			System.out.println(ans);
		}
	}

	static void no1() {
		try (Scanner sc = new Scanner(System.in)) {
			String t = sc.next();

			int a = Integer.parseInt(t.substring(0, 1));
			int b = Integer.parseInt(t.substring(1, 2));
			int c = Integer.parseInt(t.substring(2, 3));

			System.out.println(a + b + c);
		}
	}
}


Measured memory_bytes: 98212
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
typedef long long ll;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define rrep(i,n,a) for(int i=n;i>=a;i--)
#define FOR(i,n) for(int i=0;i<n;i++)
#define all(s) s.begin(),s.end()
#define vi vector<int>
#define vvi vector<vector<int>>
#define pcnt(n) __builtin_popcount(n)
const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const int INF = 1e18;
const double PI = acos(-1);

int n,m,k;
vvi s(15);
vi p(15);

int solve(){
    int N = (1<<n);
    int ret = 0;
    rep(i,0,N){
        int sw[n];
        int count[n];
        rep(j,0,n){
            count[j]=0;
            if((i>>j)&1){sw[j] = 1;}
            else{sw[j] = 0;}
        }
        rep(j,0,m){
            for(int x:s[j]){
                if(sw[x]){count[j]++;}
            }
        }
        bool ok = true;
        rep(j,0,m){
            if(p[j]!=count[j]%2){ok=false;break;}
        }
        ret+=(ok?1:0);
    }
    return ret;
}

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cin>>n>>m;
    p.resize(m);
    s.resize(m);
    rep(i,0,m){
        cin>>k;
        s[i].resize(k);
        rep(j,0,k){
            int b;
            cin>>b;
            b--;
            s[i][j] = b;
        }
    }
    rep(i,0,m){
        cin>>p[i];
    }

    cout<<solve()<<endl;
}

Measured memory_bytes: 256
import itertools

n = int(input())
count = 0
for i in range(3,10):
    li = list(itertools.product(range(3), repeat=i))
    #print(li)
    for l in li:
        st = ''
        for ll in l:
            if ll == 0:
                st += '3'
            elif ll == 1:
                st += '5'
            else:
                st += '7'
        if len(set(list(st))) == 3 and int(st)<=n:
            count += 1
print(count)

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

using namespace std;
#define int long long
int MOD = 1000000007;

signed main(){
    int N;
    cin >> N;
    
    int cnt = 0,tmp = 0;
    for(int i=1;i<=N;i+=2){
        for(int k=1;k<=i;k++){
            if(i%k==0) tmp++;
        }
        if(tmp==8) cnt++;
        tmp = 0;
    }
    
    cout << cnt << endl;
    return 0;
}


Measured memory_bytes: 256
# abc169_d.py

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


N = int(input())
lis = factorization(N)
ans = 0
# print(lis)
if N == 1:
    print(0)
    exit()
for i in lis:
    cnt = 1
    target = i[1]
    while target > 0:
        if target - cnt >= 0:
            ans += 1
        target -= cnt
        cnt+=1
print(ans)


Measured memory_bytes: 9488
#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long LL;
typedef pair<int,int> P;
const LL mod=1000000007;
const LL LINF=1LL<<60;
const int INF=1<<30;
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};

int imos[1<<17];
int a[1<<17],b[1<<17],ca[1<<17],cb[1<<17];

int main(){
    int n;cin >> n;
    vector<P> p(n);
    for (int i = 0; i < n; i++) {
        cin >> p[i].fs >> p[i].sc;
        p[i].fs--,p[i].sc--;
        imos[p[i].fs]++;
        imos[p[i].sc]--;
        a[p[i].sc-1]++;
        b[p[i].fs]++;
    }
    for (int i = 0; i <= 100000 ; i++) {
        ca[i+1] = ca[i] + a[i];
    }
    for (int i = 100000; i >= 0 ; i--) {
        cb[i] = cb[i+1] + b[i];
    }
    int ans1 = 0;
    for (int i = 0; i < n; i++) {
        int tmp = ca[p[i].fs] + cb[p[i].sc];
        ans1 = max(ans1, n - tmp);
    }
    for (int i = 0; i < 100000; i++) {
        imos[i+1] += imos[i];
    }
    int ans2 = 0;
    for (int i = 0; i <= 100000; i++) {
        ans2 = max(ans2,imos[i]);
    }
    cout << ans1 << " " << ans2 << endl;
    return 0;
}




Measured memory_bytes: 6148
#include<stdio.h>
int main(void)
{
	int a,b,c,i,j;
	scanf("%d %d %d",&a,&b,&c);
	j=0;
	for(i=a;i<=b;i++)
	{
		if(c%i==0)
		 j++;
	}
	printf("%d\n",j);
	return 0;
}

Measured memory_bytes: 596
//includes
#include<iostream>
#include<vector>
#include<set>
#include<tuple>
#include<algorithm>
#include<cmath>
#include<string>
#include<stack>
#include<map>
#include<queue>
#include<iomanip>
#include<numeric>
#include<assert.h>
#include<cstring>
#include<unordered_map>
#include<bitset>


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

//macros and consts
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(),(a).end()
#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define FORE(i,a) for(auto &i : a)
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define accm accumulate
#define Fi first
#define Se second
#define INF 1e9
#define llINF (1LL<<60)
#define mINF -1e9
#define mllINF -(1LL<<60)
#define endl "\n"
#define CONT continue
#define BRK break
#define modulo(n, m) (((n)%(m)+(m))%m)

//shorter types
using namespace std;
using ll = long long;
using vi = std::vector<int>;
using vc = std::vector<char>;
using vll = std::vector<long long>;
using vs = std::vector<string>;
using Mi = map<int,int>;
using Mll = map<ll,ll>;
using UMi = unordered_map<int,int>;
using UMll = unordered_map<ll,ll>;
using Pi = pair<int,int>;
using Pll = pair<ll,ll>;
using vPi = vector<Pi>;
using vPll = vector<Pll>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<ll>>;
using vvc = vector<vector<char>>;
using vvs = vector<vector<string>>;
using pqgi = priority_queue<int,vector<int>,greater<int>>;
using pqsi = priority_queue<int,vector<int>,less<int>>;
using pqgll = priority_queue<int,vector<int>,greater<int>>;
using pssll = priority_queue<int,vector<int>,less<int>>;
template<class T>
using vec = vector<T>;
#define int long long



int A[3][3];
int B[3][3];
//here begins your code
signed main(){
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  REP(i,3){
    REP(j,3){
      cin >> A[i][j];
    }
  }

  int N;
  cin >> N;
  REP(i, N){
    int b;
    cin >> b;
    REP(p,3){
      REP(q,3){
        if(A[p][q] == b){
          B[p][q] = 1;
        }
      }
    }
  }

  REP(i, 3){
    if((B[i][0] == 1) && (B[i][1] == 1) && (B[i][2] == 1)){
      cout << "Yes" << endl;
      return 0;
    }
  }

  REP(i, 3){
    if((B[0][i] == 1) && (B[1][i] == 1) && (B[2][i] == 1)){
      cout << "Yes" << endl;
      return 0;
    }
  }

  if((B[0][0] == 1) && (B[1][1] == 1) && (B[2][2]) == 1){
    cout << "Yes" << endl;
    return 0;
  }

  if((B[2][0] == 1) && (B[1][1] == 1) && (B[0][2]) == 1){
    cout << "Yes" << endl;
    return 0;
  }

  cout << "No" << endl;
  //check types
  //do not eb if you resize
  //resize before you access by idx
  return 0;
} 

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

/* short names and const
using ll = long long;
using vll = vector<long long>;
using df = vector<vector<long long>>;
df data(n, vector<long long>(m));
const int MOD = 1e9 + 7;
const long long INF = 1e18;
*/

/* Boost!
#include <boost/algorithm/string/classification.hpp> // is_any_of
#include <boost/algorithm/string/split.hpp>
using boost::algorithm::split; // split(result, s, boost::is_any_of(","));
#include <boost/algorithm/string/join.hpp>
using boost::algorithm::join; // string s = join(arr, "");
#include <boost/algorithm/string/replace.hpp>
using boost::algorithm::replace_all; // replace_all(s, "AtCoder", "A");
#include <boost/range/algorithm.hpp> // boost::sort(arr)
#include <boost/multiprecision/cpp_int.hpp>
using boost::multiprecision::cpp_int;
*/

/* print(arr)
template <class T>
void print(vector<T> &vec) {
  for (auto& a : vec) {
    cout << a;
    if (&a != &vec.back()) cout << " ";
  }
  cout << endl;
}
*/

/* fast cin and precise cout
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  getline(cin, s);
  cout << fixed << setprecision(15);
*/

/* sum function
int sum(vector<int> &arr) {
  int res = accumulate(arr.begin(), arr.end(), 0);
  return res;
}
*/

#include <boost/range/algorithm.hpp> // boost::sort(arr)


int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  
  int n, m;
  cin >> n >> m;
  vector<vector<pair<int, int>>> pref_city(n, vector<pair<int, int>>{});
  map<int, string> id;
  rep(i, m) {
    int p, y;
    cin >> p >> y;
    pref_city[p - 1].emplace_back(y, i);
  }
  rep(i, n) {
    boost::sort(pref_city[i]);
    string pref_id = to_string(i + 1);
    while (pref_id.size() < 6) {
      pref_id.insert(0, "0");
    }
    int cnt = 1;
    for (auto& year_city : pref_city[i]) {
      int city;
      tie(ignore, city) = year_city;
      string city_id = to_string(cnt);
      while (city_id.size() < 6) {
        city_id.insert(0, "0");
      }
      city_id.insert(0, pref_id);
      id[city] = city_id;
      ++cnt;
    }
  }
  rep(i, m) cout << id[i] << endl;
}


Measured memory_bytes: 19456
//Author: Fuadul Hasan(fuadul202@gmail.com)
//BSMRSTU,Gopalganj
#include<bits/stdc++.h>
using namespace std;int tc = 1;
#define happy ios::sync_with_stdio(false);
#define coding  cin.tie(0);
#define F first
#define S second
#define mp make_pair
#define ll long long
#define Pi atan(1)*4
#define pb  push_back
#define vpr vector<pr> 
#define pr pair<int, int> 
#define vi std::vector<int>
#define vll std::vector<ll>
#define YES printf("YES\n");
#define NO printf("NO\n");
#define Yes printf("Yes\n");
#define No printf("No\n");
#define all(n) n.begin(),n.end()
#define point(x) setprecision(x)
#define Test printf("Case %d: ",tc++);
#define Unique(c) (c).resize(unique(all(c))-(c).begin())
#define vout(v) for (auto z: v) cout << z << " "; cout << endl;

const int M = 1e9 + 7;
const ll  Inf = (ll)2e18 + 5;
const int N   = 2e5 + 5;
ll vis[N],res[N];

int solve() 
{
	//happy coding


	int n;
	cin>>n;
	int x = n%500;
	n -= x;
	cout<<n*2+x-(x%5)<<endl;
	
	return 0;
}
int main(){
	int test = 1;
	//scanf("%d", &test);
	while (test--)solve();return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<functional>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
const int mod = 1000000007;
const ll INF = 1000000000000000000;

int main()
{
	int A, B;
	cin >> A >> B;
	cout << 6 - A - B << endl;
}


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

struct segment{
    segment *next, *file;
    int id, head, length;
};

segment S[20000];
segment *head, *blank;

void W(int I, int S){
    segment *p=head, *last=NULL;
    while(S){
        while(p->id!=-1) p=p->next;
        if(p->length>S){
            p->id=I;
            segment *b=blank++;
            b->next=p->next;
            p->next=b;
            b->head=p->head+S;
            b->length=p->length-S;
            p->length=S;
            S=0;
            if(last!=NULL)last->file=p;
        }else{
            p->id=I;
            S-=p->length;
            if(last!=NULL)last->file=p;
            last=p;
            p=p->next;
        }
    }
    return;
}

void D(int I){
    segment *p=head,*next;
    while(p->id!=I) p=p->next;
    while(p!=NULL){
        p->id=-1;
        next=p->file;
        p->file=NULL;
        p=next;
    }
    return;
}

void R(int P){
    segment *p=head;
    while(p!=NULL){
        if(p->head<=P && P<p->head+p->length){
            cout<<p->id<<endl;
            return;
        }else{
            p=p->next;
        }
    }
}

int main(){
    int N;
    while(cin>>N,N){
        for(int i=0;i<20000;i++){
            S[i].next=S[i].file=NULL;
            S[i].id=S[i].head=S[i].length=-1;
        }
        blank=&S[1];
        head=&S[0];
        head->id=-1;
        head->head=0;
        head->length=1000000001;
        for(int i=0;i<N;i++){
            char c;
            cin>>c;
            int I,S,P;
            switch(c){
                case 'W':
                    cin>>I>>S;
                    // cout<<'W'<<' '<<I<<' '<<S<<endl;
                    W(I,S);
                    break;
                case 'D':
                    cin>>I;
                    // cout<<'D'<<' '<<I<<endl;
                    D(I);
                    break;
                case 'R':
                    cin>>P;
                    // cout<<'R'<<' '<<P<<endl;
                    R(P);
                    break;
                default:
                    break;
            }
        }
        cout<<endl;
    }
    return 0;
}

Measured memory_bytes: 3720
import collections
N = int(input())
A = [int(_) for _ in input().split()]


class Prime:
    @staticmethod
    def trial_division(x):
        if x % 2 == 0:
            return True
        for p in range(3, int(x**0.5 + 1), 2):
            if x % p == 0:
                return False
        return True

    @staticmethod
    def factorization(x):
        ret = {}
        i = 0
        while True:
            if x % 2:
                break
            x //= 2
            i += 1
        if i:
            ret[2] = i
        f = 3
        while True:
            if f * f > x:
                break
            i = 0
            while True:
                if x % f:
                    if i:
                        ret[f] = i
                    f += 2
                    break
                x //= f
                i += 1
        if x > 1:
            ret[x] = 1
        return ret

    @staticmethod
    def miller_rabin(n):
        def suspect(a, t, n):
            x = pow(a, t, n)
            n1 = n - 1
            while t != n1 and x != 1 and x != n1:
                x = pow(x, 2, n)
                t <<= 1
            return t & 1 or x == n1

        if n == 2:
            return True
        if n < 2 or n % 2 == 0:
            return False
        d = (n - 1) >> 1
        while d & 1 == 0:
            d >>= 1

        if n < 2**32:
            check_list = (2, 7, 61)
        elif n < 2**48:
            check_list = (2, 3, 5, 7, 11, 13, 17, 19, 23)
        else:
            check_list = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37)

        for i in check_list:
            if i >= n:
                break
            if not suspect(i, d, n):
                return False
        return True


c = collections.defaultdict(int)
for a in A:
    for p in Prime.factorization(a):
        c[p] += 1
ans = 'pairwise coprime'
if c:
    x = max(c.values())
    if x == 1:
        ans = 'pairwise coprime'
    elif x == N:
        ans = 'not coprime'
    else:
        ans = 'setwise coprime'
print(ans)


Measured memory_bytes: 179632
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_set tree < pairs ,  null_type , greater<pairs>,  rb_tree_tag ,  tree_order_statistics_node_update > 
#define ll long long
#define lld long double
#define vc vector<ll>
const ll MOD=(1e9 +7);
typedef pair<ll,ll>pairs;
ll power(ll a, ll b){ll res=1;a=a%MOD;while(b>0){if(b&1){res=(res*a)%MOD;b--;}a=(a*a)%MOD;b>>=1;}
    return res;}

int main() {
	// your code goes here
	std::ios::sync_with_stdio(false);
	cin.tie(NULL);cout.tie(NULL);
	ll t,n,i,j,k,c,f;
	lld d,s;
	cin>>d>>t>>s;
	if(d/s<=t)cout<<"Yes";
	else cout<<"No";
	return 0;
}


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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()

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

    // start
    int n, i;
    cin >> n >> i;
    cout << n - i + 1 << endl;
    // end

    return 0;
}


Measured memory_bytes: 256
package main

import (
	"fmt"
)

func main() {
	var today string
	fmt.Scan(&today)
	if today == "Sunny" {
		fmt.Println("Cloudy")
	} else if today == "Cloudy" {
		fmt.Println("Rainy")
	} else {
		fmt.Println("Sunny")
	}
}

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


int main() {
  string n;
  cin >> n;
  for (char c: n) {
    if (c == '1') cout << '9';
    else cout << '1';
  }
  cout << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
int main() {
	string s;
	cin >> s;
	int n = s.size();
	string s1 = "";
	int now = 0;
	int co = 0;
	for (int i = 1; i <= n; i++) {
		if (s.substr(now, i - now) != s1) {
			s1 = s.substr(now, i - now);
			now = i;
			co++;
		}
	}
	cout << co << endl;
	return 0;
}


Measured memory_bytes: 640
import sys
input = sys.stdin.buffer.readline

def main():
    n, w = map(int,input().split())
    wei = []
    val = []
    for i in range(n):
        a, b = map(int,input().split())
        wei.append(a)
        val.append(b)

    max_v = 10**5 + 10
    dp = [[float('inf') for i in range(max_v)] for j in range(100+10)]

    dp[0][0] = 0

    for i in range(n):
        for sum_v in range(max_v):

            # i 番目の品物を選ぶ場合
            if sum_v - val[i] >= 0:
                dp[i+1][sum_v] = min(dp[i][sum_v], dp[i][sum_v - val[i]] + wei[i])
            else:
                # i 番目の品物を選ばない場合
                dp[i+1][sum_v] = dp[i][sum_v]

    res = 0
    for i in range(100+10):
        for sum_v in range(max_v):
            if dp[i][sum_v] <= w and res < sum_v:
                res = sum_v

    print(res)

if __name__ == '__main__':
    main()

Measured memory_bytes: 283004
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <utility>
#include <algorithm>
#include <iomanip>

using namespace std;

using ll = long long;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)


ll count_start_end(ll s, ll e, ll max_v) {
	int ans = 0;

	for (int i = e; i <= max_v; i+= 10) {
		ll cur_s = i;
		if (i >= 100000) {
			cur_s = i / 100000;
		} else if (i >= 10000) {
			cur_s = i / 10000;
		} else if (i >= 1000) {
			cur_s = i / 1000;
		} else if (i >= 100) {
			cur_s = i / 100;
		} else if (i >= 10) {
			cur_s = i / 10;
		} else {
			cur_s = i;
		}
		if (s == cur_s) {
			ans++;
		}
	}
	return ans;
}

int main() {
 	ll n;
 	ll ans = 0;
 	cin >> n;

 	for (ll s = 1; s < 10; s++) {
 		for (ll e = 1; e < 10; e++) {
 			ll cur = 0;
 			cur += count_start_end(s, e, n);
 			ans += cur * count_start_end(e, s, n);
 		}
 	}
 	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 384
#include <stdio.h>

int main(){
    int N, M, X, Y, x[100], y[100];
    int i, j, maxx=-101, miny=101, check=0;

    scanf("%d %d %d %d", &N, &M, &X, &Y);

    for(i=0; i<N; i++){
        scanf("%d", &x[i]);
        if(maxx < x[i])
            maxx = x[i];
    }

    for(j=0; j<M; j++){
        scanf("%d", &y[j]);
        if(miny > y[j])
            miny = y[j];
    }
    
    for(i=X+1; i<Y; i++){
        if(maxx<i && i<=miny){
            check = 1;
        }
    }

    if(check == 1)
        printf("No War\n");
    else
        printf("War\n");
    
    return 0;
}

Measured memory_bytes: 128
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;

typedef long long llong;

int main()
{
	int N;
	while (scanf("%d", &N) != EOF)
	{
		int h, n, w;
		bool has_ans = false;

		for (int i = 1; i <= 3500; i++)
			{
				for (int j = 1; j <= 3500; j++)
				{
					llong up = (llong)4 * i * j - N * (i + j);
					llong down = (llong) N * i * j;
					if (up == 0)
                        continue;
//printf("up=%lld down=%lld\n", up, down);
                    llong t = down / up;
					if (down % up == 0 && t > 0)
					{
						h = i;
						n = j;
						w = t;
						has_ans = true;
						break;
					}
				}
				if (has_ans)
					break;
			}

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


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

int main() {
    int n, a, b;
    cin >> n >> a >> b;
    int x = 0, y = 0, z = 0;
    rep(i, n) {
        int p;
        cin >> p;
        if (p <= a)
            x++;
        else if (p <= b)
            y++;
        else
            z++;
    }
    cout << min({x, y, z}) << endl;
}

Measured memory_bytes: 3556
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i=0;i < (int)(n);i++)


int main(){
    int n;
    cin >> n;
    vector<int> v(5,0);
    rep(i,n){
        int tmp;
        cin >> tmp;
        if (tmp%4 == 0) v[4]++;
        else if (tmp%2 == 0) v[2]++;
        else v[1]++;
    }
    int x,y;
    x = v[1]; y = v[4];
    if (v[2] > 0) x++;

    if (x <= y+1) cout << "Yes" << endl;
    else cout << "No" << endl;


    return 0;
}

Measured memory_bytes: 256
def Fliegel(y, m, d):
    if m <= 2:
        m += 12
        y -= 1
    return int(365.25*y) + int(30.59*(m-2)) + (y//400) - (y//100) + d - 678912

def InvFliegel(mjd):
    mjd += 678881
    a = 4*mjd + 3 + 4*(3*(1 + 4*(mjd+1)//146097)//4)
    b = 2 + 5*((a%1461)//4)
    y = a//1461
    m = 3 + b//153
    d = 1 + (b%153)//5
    if m > 12:
        m -= 12
        y += 1
    return y, m, d

mjd_base = Fliegel(2012, 12, 21)
maya_unit = [13, 20, 20, 18, 20]
maya_cycle = 13*20*20*18*20

while 1:
    s = input()
    if s == '#':
        break
    v = list(map(int, s.split(".")))
    if len(v) == 3:
        mjd = (Fliegel(v[0], v[1], v[2]) - mjd_base)%maya_cycle
        m = []
        for u in reversed(maya_unit) :
            m.append( mjd%u )
            mjd /= u
        print("%d.%d.%d.%d.%d" % (m[4], m[3], m[2], m[1], m[0]))
    else:
        mjd = v[0]
        for i in range(1,5):
            mjd *= maya_unit[i]
            mjd += v[i]
        y, m, d = InvFliegel(mjd + mjd_base)
        print("%d.%d.%d" % (y, m, d))



Measured memory_bytes: 5636
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>
#include<functional>
#include<stack>
#include<utility>
#include<map>

using namespace std;

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

Measured memory_bytes: 256