akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define ALL(obj)   (obj).begin(),(obj).end()

#define debug(var)  do{std::cout << __LINE__ << "> " << #var << ": ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }

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

using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;

void Main() {
	int N; cin >> N;
	vvi F(N, vi(10));
	REP(i,N) REP(j,10) cin >> F[i][j];
	vvl P(N, vl(10));
	REP(i,N) REP(j,11) cin >> P[i][j];
	ll res = numeric_limits<ll>::min();
	for (int bit = 1; bit < (1 << 10); ++bit) {
		vi match_num(N,0);
		for (int i = 0; i < 10; ++i) {
			if (bit & (1 << i)) {
				REP(j,N) {
					if (F[j][i] == 1) ++match_num[j];
				}
			}
		}
		ll sum = 0;
		REP(i,N) {
			sum += P[i][match_num[i]];
		}
		chmax(res, sum);
	}
	cout << res << endl;
}

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


Measured memory_bytes: 3684
package main

import "fmt"

const (
	MAX_N = 50
	MAX_A = 50
)

var (
	N, A int
	x     [MAX_N + 1]int
	dp [MAX_N + 1][MAX_N + 1][MAX_N*MAX_A + 1]int64
)

func main() {

	fmt.Scanf("%d %d", &N, &A)
	for i := 0; i < N; i++ {
		fmt.Scanf("%d", &x[i+1])
	}

	for i := 0; i < N; i++ {
		dp[i][0][0] = 1
	}

	for i := 1; i <= N; i++ {
		for j := 1; j <= i; j++ {
			for k := 1; k <= A*N; k++ {
				if k < x[i] {
					dp[i][j][k] = dp[i-1][j][k]
				} else {
					dp[i][j][k] = dp[i-1][j][k] + dp[i-1][j-1][k-x[i]]
				}
			}
		}
	}

	ans := int64(0)
	for j := 1; j <= N; j++ {
		ans += dp[N][j][j*A]
	}

	fmt.Printf("%d\n", ans)
}


Measured memory_bytes: 51072
//Moh_K_Imar .......
//22/08/2020  ... 12,35 .
//Ya Rab....
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
int main(){
    ll a,b;
    cin>>a>>b;
    ll res=0,sum=0;
    for(ll i=a-1;i>0;i--){
        sum+=i;
        a--;
    }
    for(ll i=b-1;i>0;i--){
        res+=i;
        b--;
    }
    cout<<sum+res<<endl;
    sum=0,res=0;
  
    return 0;
}



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

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

	cin >> n >> m >> c;
	for (int i = 0; i < m; i++) cin >> b[i];
	int ans = 0;
	for (int i = 0; i < n; i++) {
		int sum = 0;
		for (int i = 0; i < m; i++) {
			cin >> a[i];
			sum += a[i] * b[i];
		}
		sum += c;
		if (sum > 0) ans++;
	}
	cout << ans << "\n";
	return 0;
}

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


void primeFact(long long n, map<long long,long long> &m) {
    long long count=0;
    while(n%2 == 0) {
        n=n/2;
        count++;
    }
    m[2] = count;
    for(long long i = 3; i*i <=n ;i+=2) {
        long long count = 0;
        while(n%i == 0) {
            count++;
            n=n/i;
        }
        m[i] = count;
    }
    if(n>2)
    m[n] = 1;
}
int main()
 {   
    long long n;
    cin>>n;
    map<long long,long long> m;
    primeFact(n,m);
    long long ans = 0;
    for(auto it : m) {
        long long fact = it.second;
        for(int i=1;i<=10000 ; i++) {
            if(fact < i){
                break;
            }
            ans++;
            fact-=i;
        }
    }
    cout << ans << endl;

	return 0;
}

Measured memory_bytes: 34840
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define ll long long
using namespace std;
//typedef vector<unsigned int>vec;
//typedef vector<ll>vec;
//typedef vector<vec> mat;
typedef pair<int, int> P;
typedef pair<ll,ll> LP;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const int INF = 1000000000;
const ll LINF = 1000000000000000000;//1e18
const ll MOD = 1000000007;
//const ll MOD = 998244353;
const double PI = acos(-1.0);
const double EPS = 1e-10;


void solve(){
    int a, b;
    cin >> a >> b;
    cout << a * b << endl;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    solve();
    // int T; cin >> T; REP(t,T) solve();
}

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

#define REP(i,n) for(int i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<29
#define LINF LLONG_MAX/3
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(v) (v).begin(),(v).end()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
#define CININIT cin.tie(0),ios::sync_with_stdio(false)
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;

constexpr ll mod = 1e9+7;

const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
int H,W;
vector<vector<int>> maze;
int sx,sy,gx,gy;

bool in(int x,int y,int h,int w){
    if(x<0||y<0||x>=h||y>=w) return false;
    else return true;
}

int dfs(int x,int y,int cost){
    if(cost>9) return -1;

    rep(i,4){
        for(int j=1;x+dx[i]*j>=0 and x+dx[i]*j<H and y+dy[i]*j>=0 and y+dy[i]*j<W;j++){
            int nx=x+dx[i]*j,ny=y+dy[i]*j;
            if(maze[nx][ny]==1) break;
            if(nx==gx and ny==gy){
                return cost + 1;
            }
        }
    }

    int ret = -1;
    rep(i,4){
        if(in(x+dx[i],y+dy[i],H,W) and maze[x+dx[i]][y+dy[i]]==1) continue;
        for(int j=1;x+dx[i]*j>=0 and x+dx[i]*j<H and y+dy[i]*j>=0 and y+dy[i]*j<W;j++){
            int nx=x+dx[i]*j,ny=y+dy[i]*j;
            if(maze[nx][ny]==1){
                maze[nx][ny]=0;
                int tmp=dfs(x+dx[i]*(j-1),y+dy[i]*(j-1),cost+1);
                maze[nx][ny]=1;
                if(tmp>=0){
                    if(ret==-1) ret = tmp;
                    else ret = min(ret,tmp);
                }
                break;
            }
        }
    }
    return ret;
}

void solve(){
    vvi tmp;
    swap(maze,tmp);
    maze = vvi(H,vi(W));
    rep(i,H) rep(j,W){
        cin>>maze[i][j];
        if(maze[i][j]==2){
            sx=i;
            sy=j;
        }
        if(maze[i][j]==3){
            gx=i;
            gy=j;
        }
    }

    int ans = dfs(sx,sy,0);
    cout << ans << endl;
}

int main(){
    while(cin>>W>>H){
        if(H==0 and W==0) break;
        solve();
    }
}

Measured memory_bytes: 3124
#include<iostream>
#include<algorithm>
using namespace std;
int a[4][4];
int x[4],y[4];
int main()
{
    for(int i=1;i<=3;i++)
    {
        for(int j=1;j<=3;j++)
        {
            cin>>a[i][j];
        }
    }
    int ax = min(min(a[1][1],a[1][2]),a[1][3]);
    int now = 0;
    for(int i=0;i<=ax;i++)
    {
        int ok = 0;
         x[1] = i;
         y[1] = a[1][1]-x[1];
         y[2] = a[1][2]-x[2];
         y[3] = a[1][3]-x[3];
         x[2] = a[2][1]-y[1];
         x[3] = a[3][1]-y[1];
        for(int j=1;j<=3;j++)
        {
            for(int k=1;k<=3;k++)
            {
                if(x[j]+y[k]!=a[j][k])
                {
                    ok = 1;
                    break;
                }
            }
        }
        if(ok==0)now = 1;
    }
    if(now)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}


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 IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int k = Integer.parseInt(str[0]);
		int t = Integer.parseInt(str[1]);

		int a[] = new int[t];

		str = br.readLine().split(" ");

		int max = 0;
		int maxI = 0;

		for (int i = 0; i < t; i++) {
			a[i] = Integer.parseInt(str[i]);
			if (a[i] > max) {
				max = a[i];
				maxI = i;
			}
		}

		int sum = 0;
		for (int i = 0; i < t; i++) {
			if (i == maxI) {
				continue;
			}
			sum += a[i];
		}
		if (sum > max) {
			System.out.println("0");
		} else {
			int n = max - sum;
			System.out.println(n - 1);
		}
	}
}


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

using namespace std;
typedef long long int ll;
typedef pair <ll,ll> P;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define REPR(i, n) for(int i = n-1; i > 0; i--)
#define FOR(i, n, m) for(int i = n; i < (int)(m); i++)
#define PRINT(x) cout << x << endl
#define ALL(v) v.begin(), v.end()
#define INF (ll)1e18
#define PI 3.14159265358979

ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

ll MOD = 1000000007;

int main()
{
    string N;
    cin >> N;
    ll K;
    cin >> K;
    vector<ll> n(N.length());
    REP(i, N.length()) n[i] = N[i] - '0';
    ll dp[101][2][5];
    REP(i, 101) {
        REP(j, 2) {
            REP(k, 5) {
                dp[i][j][k] = 0;
            }
        }
    }

    dp[0][0][0] = 1;
    REP(i, N.length()) {
        REP(j, 2) {
            REP(k, 4) {
                REP(l, j ? 10 : n[i]+1) {
                    dp[i+1][j || l < (n[i])][k + (l != 0)] += dp[i][j][k];
                }
            }
        }
    }
    PRINT(dp[N.length()][0][K] + dp[N.length()][1][K]);
    return 0;
}


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

int main() {
  int t; std::cin >> t;

  int h = t / 3600;
  int m = (t%3600) / 60;
  int s = (t%3600) % 60;
   
  std::cout << h << ":" << m << ":" << s << std::endl;

  return 0; 
}


Measured memory_bytes: 3076
#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;
const int maxn=15;
const int maxq=55;
int n,m,q,a[maxq],b[maxq],c[maxq],d[maxq];
int ans,arr[maxn];
void solve(int cur)
{
    if(cur==n+1)
    {
        int cur=0;
        for(int i=1;i<=q;i++)
            cur+=((arr[b[i]]-arr[a[i]])==c[i])*d[i];
        ans=max(ans,cur);
        return;
    }
    for(int i=arr[cur-1];i<=m;i++)
    {
        arr[cur]=i;
        solve(cur+1);
    }
    return;
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    cin>>n>>m>>q;
    for(int i=1;i<=q;i++)
        cin>>a[i]>>b[i]>>c[i]>>d[i];
    arr[0]=1;
    solve(1);
    cout<<ans<<'\n';
    return 0;
}


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

int main()
{
    string s;
    cin >> s;
    int cnt = 0;
    for (auto c : s) {
        if (c == 'o') {
            cnt++;
        }
    }
    cout << 700 + 100 * cnt << endl;
    return 0;
}

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

int main() {
  string s;
  cin >> s;
  
  vector<int> c(26, 0);
  for(int i=0; i<s.size(); i++){
    c.at((int)(s.at(i)-'a')) += 1;
  }
  
  int c_max = 0;
  for(int i: c){
    c_max = max(c_max, i);
  }
  if(c_max > 1) cout << "no" << endl;
  else cout << "yes" << endl;
  
  return 0;
}


Measured memory_bytes: 256
import std.stdio, std.conv, std.functional, std.string;
import std.algorithm, std.array, std.container, std.range, std.typecons;
import std.numeric, std.math, std.random;
import core.bitop;

string FMT_F = "%.10f";

static string[] s_rd;
T RD(T = long)() { while(!s_rd.length) s_rd = readln.chomp.split; string res = s_rd[0]; s_rd.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }
T[] ARR(T = long)(in string str, T fix = 0) { auto r = str.split.to!(T[]); r[] += fix; return r; }
size_t[] MAKE_IDX(alias less = "a < b", Range)(Range range) { auto idx = new size_t[](range.length); makeIndex!(less)(range, idx); return idx;}
size_t MIN_POS(alias less = "a < b", Range)(Range range) { auto r = minPos!(less)(range); return range.length - r.length; }

bool inside(T)(T x, T b, T e) { return x >= b && x < e; }
long lcm(long x, long y) { return x * y / gcd(x, y); }

long mod = 10^^9 + 7;
//long mod = 998244353;
void moda(ref long x, long y) { x = (x + y) % mod; }
void mods(ref long x, long y) { x = ((x + mod) - (y % mod)) % mod; }
void modm(ref long x, long y) { x = (x * y) % mod; }

void main()
{
	auto N = RD;
	long[2][] nodes;
	auto edges = new long[2][][](N);
	foreach (i; 0..N-1)
	{
		auto u = RD-1;
		auto v = RD-1;
		auto w = RD;
		edges[u] ~= [v, w];
		edges[v] ~= [u, w];
	}

	auto cost = new long[](N);
	fill(cost, long.max);
	cost[0] = 0;
	long[2][] open = [[0, 0]];
	while (!open.empty)
	{
		auto n = open.front; open.popFront;
		auto from = n[0];
		foreach (edge; edges[from])
		{
			auto to = edge[0];
			auto c = n[1] + edge[1];
			if (c < cost[to])
			{
				cost[to] = c;
				open ~= [to, c];
			}
		}
	}

	auto ans = new long[](N);
	foreach (i; 0..N)
	{
		ans[i] = cost[i] % 2;
	}

	foreach (e; ans)
		writeln(e);
	stdout.flush();
	debug readln();
}

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

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

    int n = s.length();
    vector<char> S;
    for (int i = 0; i < n; i++) {
        if (s[i] == 'B' && S.size() > 0) {
            S.pop_back();
        } else if (s[i] != 'B') {
            S.push_back(s[i]);
        }
    }

    for (int i = 0; i < S.size(); i++) {
        cout << S[i];
    }
    cout << endl;

    return 0;
}


Measured memory_bytes: 3516
program test
implicit none

integer :: i,j,k,l,m,n,sn,nn

read(*,*) n

sn = 0
nn = n
do 
sn = sn + mod(nn,10)
if(nn <= 9) then
goto 100
else
nn = nn / 10
endif
enddo
100 continue

if(mod(n,sn) == 0)then
write(*,*) 'Yes'
else
write(*,*) 'No'
endif

end program

Measured memory_bytes: 768
import math
import queue
import bisect
import heapq

mod = 1e9+7

def swap(a,b):
    return (b,a)

def gcd(a,b):
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a):
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def main():
    n = int(input())
    odd = n//2
    ans = 1 - odd/n
    print(ans)
    return

if __name__ == '__main__':
    main()

Measured memory_bytes: 4336
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define EQ(a,b) (abs((a)-(b))<EPS)
vector<int> card;
vector<int> tmp;
vector<int> tm2;
int n;
void cut(int k)
{
	for(int i=0;i<k;i++)
	{
		tmp.pb(card[i]);
	}
	for(int i=k;i<card.size();i++)
	{
		tm2.pb(card[i]);
	}
	for(int i=0;i<tmp.size();i++)
	{
		tm2.pb(tmp[i]);
	}
	card.clear();
	card=tm2;
	tmp.clear();
	tm2.clear();
	return ;
}
void riffle()
{
	tmp=card;
	for(int i=0;i<n;i++)
	{
		card[2*i]=tmp[i];
	}
	for(int i=n;i<2*n;i++)
	{
		card[(i-n)*2+1]=tmp[i];
	}
	tmp.clear();
	return ;
}
int main()
{
	cin >> n;
	for(int i=1;i<=2*n;i++)
	{
		card.pb(i);
	}
	int m;
	cin >> m;
	for(int i=0;i<m;i++)
	{
		int k;
		cin >> k;
		if(k==0)
		{
			riffle();
		}
		else
		{
			cut(k);
		}
	}
	for(int i=0;i<sz(card);i++)
	{
		cout << card[i] << endl;
	}
	return 0;
}

Measured memory_bytes: 1220
#include <iostream>
using namespace std;
long long int happy[105];
int main()
{
    long long int k, c;
    cin >> k >> c;
    long long int totalhappy = 0;
    for ( int i = 1; i <= k; i++ )
    {
        cin >> happy[i];
        totalhappy = totalhappy + happy[i];
    }
    long long int maxhappy = 0, candyused = 0;
    if ( totalhappy == c )
    {
        cout << k;
    }
    else if ( totalhappy < c )
    {
        cout << k - 1;
    }
    else
    {
        long long int deposit;
        for ( int i = 1; i <= k; i++ )
        {
            for ( int j = i+1; j <= k; j++ )
            {
                if ( happy[j] < happy[i] )
                {
                    deposit = happy[i];
                    happy[i] = happy[j];
                    happy[j] = deposit;
                }
            }
        }
        for ( int i = 1; i <= k; i++ )
        {
            candyused = candyused + happy[i];
            if ( candyused <= c )
            {
                maxhappy++;
            }
            else
            {
                break;
            }
        }
        cout << maxhappy;
    }
}

Measured memory_bytes: 256
#include<cstdio>
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<map>
#include<stack>

typedef long long ll;
using namespace std;
int main()
{
    int n;
    cin>>n;
    ll sum=0;
    for(int i=1;i<=n;i++)
    {
        if(i%3==0||i%5==0)
        {
            continue;
        }
        sum+=i;
    }
    cout<<sum;
    return 0;
}



Measured memory_bytes: 3644
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<iterator>
#include<complex>
#include<stack>
#include "stdio.h"
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const long long mod_const = 1e9+7;
using MIte = multimap<long, long, greater<long> >::iterator;

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

	//
	int N, M, X;
	cin >> N >> M >> X;

	vector<int> vA(M, 0);
	rep(i, M) cin >> vA[i];

	int cnt1 = 0;
	int cnt2 = 0;
	for (int i = 0; i != M; ++i) {
		if (vA[i] < X) {
			cnt1++;
		}
		else if (vA[i] > X) {
			cnt2++;
		}
	}

	cout << min(cnt1, cnt2) << endl;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << (x) << '\n';
#define fi first
#define se second
typedef int64_t Int;
Int mod = 1e9+7;
Int INF = 1e9+7;

int main() {
    Int n;
    cin >> n;
    vector<pair<double, double>> v(n);
    for (Int i = 0; i < n; i++) {
        cin >> v[i].fi >> v[i].se;
    }
    double sum = 0.0;
    for (Int i = 0; i < n; i++) {
        for (Int j = 0; j < n; j++) {
            if (i == j) continue;
            double x = v[i].fi - v[j].fi;
            double y = v[i].se - v[j].se;
            sum += sqrt(x * x + y * y);
        }
    }
    double div = n;
    // for (Int i = 1; i <= n; i++) {
    //     div *= (double)i;
    // }
    printf("%.12lf", sum / div);
    return 0;
}

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


int main()
{
	int n;
	while (true)
	{
		cin >> n;
		if (n == 0)
			break;
		n /= 4;
		int c = 0;
		for (int m; n > 0; n--)
		{
			cin >> m;
			c += m;
		}
		cout << c << endl;
	}
}



Measured memory_bytes: 3076
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int P = sc.nextInt();
    int[] A = new int[N];
    boolean odd = false;
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
      if (A[i] % 2 == 1) {
        odd = true;
      }
    }
    long ans = 1;
    if (odd) {
      for (int i = 0; i < N - 1; i++) {
        ans *= 2;
      }
      System.out.println(ans);
    } else {
      if (P == 1) {
        System.out.println(0);
      } else {
        for (int i = 0; i < N; i++) {
          ans *= 2;
        }
        System.out.println(ans);
      }
    }
  }
}

Measured memory_bytes: 23764
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
  int ban[31];
  int a,b;
  int w;
  int n;
  cin >> w >> n;
  for(int i = 1;i <= w;i++){
    ban[i] = i;
  }
  for(int i = 0;i < n;i++){
    scanf("%d,%d",&a,&b);
    swap(ban[a],ban[b]);
  }
  for(int i = 1;i <= w;i++){
    cout << ban[i] << endl;
  }
  return(0);
}

Measured memory_bytes: 1240
#include<iostream>

int main(){
    int A, B, C;
    std::cin >> A >> B >> C;
    if(A == B){
        if(A == C){
            std::cout << "No" << std::endl;
            return 0;
        }else{
            std::cout << "Yes" << std::endl;
            return 0;
        }
    }else{
        if(A == C){
            std::cout << "Yes" << std::endl;
            return 0;
        }else{
            if(B == C){
                std::cout << "Yes" << std::endl;
                return 0;
            }else{
                std::cout << "No" << std::endl;
                return 0;
            }
        }
    }
    return 0;
}

Measured memory_bytes: 256
k, n = [int(i) for i in input().split()]
a_list = [int(i) for i in input().split()]
distances_between_houses = []

for i in range(n-1):
    distances_between_houses.append(a_list[i+1]-a_list[i])

distances_between_houses.append(k-a_list[n-1]+a_list[0])

max_distance = max(distances_between_houses)
distances_between_houses.remove(max_distance)

print(sum(distances_between_houses))


Measured memory_bytes: 24948
#include<bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;

int main(){
  int N,T;
  cin >> N >> T;
  int mini = INF;
  for (int i=0; i<N; i++) {
    int c, t;
    cin >> c >> t;
    if (t <= T && c < mini) {
      mini = c;
    }
  }
  if (mini != INF) {
    cout << mini << endl;
  } else {
    cout << "TLE" << endl;
  }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main() {
  int s1, s2, s3, s;
  cin >> s;
  s1= s /100;
  s2= (s - s1 * 100) /10;
  s3= s - s1 * 100 - s2 * 10;
  cout << s1 + s2 + s3 << endl;
}


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


public class Main {
    static Scanner s = new Scanner(System.in);

    public static void main(String[] args) {
        while (true){
            int n=s.nextInt();
            if(n==0)break;
            int trainNum=0;
            int maxNum=0;
            int[] startTrain = new int[n];
            int[] endTrain = new int[n];
            double[] train = new double[n*2];

            for(int i=0;i<n;i++) {
                String str = s.next();
                String[] startTime = str.split(":");
                int startH =Integer.parseInt(startTime[0]);
                int startM=Integer.parseInt(startTime[1]);
                int startS=Integer.parseInt(startTime[2]);
                train[i]=startH*3600+startM*60+startS+0.1;

                str = s.next();
                String[] endTime = str.split(":");
                int endH=Integer.parseInt(endTime[0]);
                int endM=Integer.parseInt(endTime[1]);
                int endS=Integer.parseInt(endTime[2]);
                train[n+i]=endH*3600+endM*60+endS;
            }

//            Arrays.sort(startTrain);
//            Arrays.sort(endTrain);
            Arrays.sort(train);

//            int j=0;
//            for (int i=0;i<n;i++){
//                trainNum++;
//                for(;j<n;){
//                    if(startTrain[i]<endTrain[j]) break;
//                    trainNum--;
//                    j++;
//                }
//                if(maxNum<trainNum) maxNum=trainNum;
//            }

            for(int i=0;i<n*2;i++){
                if(train[i]- Math.floor(train[i])==0.0) trainNum--;
                else trainNum++;
                if(maxNum<trainNum) maxNum=trainNum;
            }

            System.out.println(maxNum);
        }
    }
}

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

int main()
{
  string s;
  cin >> s;
  bool can=true;
  for(int i=0; i<s.size(); ++i)
    if ((i+1) %2==0 && s[i]=='R') can=false;
  	else if ((i+1)%2!=0 && s[i]=='L') can=false;
  if (can) cout << "Yes"; else cout << "No";
      
  return 0;
}

Measured memory_bytes: 256
main = do
  li <- getLine
  let k = read li
  let ans = compute k
  print ans

{- naive -}

compute :: Int -> Int
compute k = sum
  [ gcd g c
  | a <- [1..k]
  , b <- [1..k]
  , let g = gcd a b
  , c <- [1..k]
  ]


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

using namespace std;

#define lli long long int

lli a[200000],dp[200000];

lli dynamic(lli pos)
{
    if(dp[pos]!=-1)
        return dp[pos];
    if(pos==0)
        return 0;
    if(pos==1)
    {
        dp[pos]=abs(a[pos]-a[pos-1]);
        return dp[pos];
    }
    lli dif1=abs(a[pos]-a[pos-1]);
    lli dif2=abs(a[pos]-a[pos-2]);
    dp[pos]=min(dif1+dynamic(pos-1),dif2+dynamic(pos-2));
    return dp[pos];
}

int main()
{
    lli n;
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        dp[i]=-1;
    }
    lli sum=dynamic(n-1);
    cout<<sum<<endl;
    return 0;
}


Measured memory_bytes: 4096
#include <iostream>

using std::cin;
using std::cout;
using std::endl;

void solve() {
  int a, b;
  cin >> a >> b;

  if (a <= 8 and b <= 8) {
    cout << "Yay!" << endl;
  }
  else {
    cout << ":(" << endl;
  }
}

int main() {
  solve();
  return 0;
}

Measured memory_bytes: 256
N = gets.to_i
x = 0
y = 0
t = 0
ans = "Yes"
for i in 0...N
  t_, x_, y_ = gets.chomp.split.map(&:to_i)
  if (x-x_).abs + (y-y_).abs > (t_-t) || (t_ - t - (x-x_).abs - (y-y_).abs)%2 == 1
    ans = "No"
  end
  x = x_
  y = y_
  t = t_
end
puts ans

Measured memory_bytes: 1788
#include<bits/stdc++.h>
using namespace std;
int n, m, p[100007][2], res;
bitset<407>is[407], no;
int read()
{
	int num = 0;
	char c = getchar();
	while (c < '0' || c>'9')c = getchar();
	while (c >= '0' && c <= '9')num = num * 10 + c - '0', c = getchar();
	return num;
}
int main()
{
	n = read();
	m = read();
	for (int i = 1; i <= m; i++)
	{
		p[i][0] = read();
		p[i][1] = read();
	}
	for (int i = 1; i <= n; i++)
	{
		is[i][i] = 1;
		for (int j = m; j >= 1; j--)
		{
			if (!is[i][p[j][0]] && !is[i][p[j][1]])continue;
			if (is[i][p[j][0]] && is[i][p[j][1]])
			{
				no[i] = 1;
				break;
			}
			if (!is[i][p[j][0]])is[i][p[j][0]] = 1;
			if (!is[i][p[j][1]])is[i][p[j][1]] = 1;
		}
	}
	for (int i = 1; i <= n; i++)if (!no[i])
		for (int j = i + 1; j <= n; j++)if (!no[j])
			if (!((is[i] & is[j]).count()))
				res++;
	cout << res << endl;
	return 0;
}

Measured memory_bytes: 1024
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <algorithm>
using namespace std;
int KK(int n,int x,int a[101]){
    int ans=0;
    for(int i=0;i<n;i++)
        ans+=pow(a[i]-x,2);
    return ans;
}
int main(){
int n;
int sum=0;
int a[101]={0};
scanf("%d",&n);
for(int i=0;i<n;i++) {
    scanf("%d", &a[i]);
    sum += a[i];
}
double x=sum/n;
int ave=(double(x+0.5));
int ans=0;
ans=min(KK(n,ave,a),min(KK(n,ave+1,a),KK(n,ave-1,a)));
cout<<ans<<endl;

}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> pll;
const ll mod=1e9+7;
//const ll mod=998244353;
const ll inf=5e18;

int main() {
  ll k;
  cin >> k;
  vec a(k);
  for(ll i=0;i<k;i++) {
    cin >> a[i];
  }
  ll mx=3;
  ll mn=2;
  if(a[k-1]!=2) {
    cout << -1 << endl;
    return 0;
  }
  for(ll i=1;i<k;i++) {
    ll team=a[k-1-i];
    if(mx<team) {
      cout << -1 << endl;
      return 0;
    }
    mx=mx/team*team+team-1;
    mn=(mn+team-1)/team*team;
    if(mn>mx) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << mn << " " << mx << endl;
}

Measured memory_bytes: 1024
# import sys

d, g = map(int, input().split())
A = []

for i in range(d):
    p, c = map(int, input().split())
    A.append([p, c])

ans = 10000

for i in range(2**d):
    score = 0
    num = [0 for _ in range(d)]
    cur = i
    for j in range(d):
        if cur % 2 == 1:
            num[j] = A[j][0]
            score += A[j][0] * 100 * (j+1) + A[j][1]
        cur //= 2
    if score < g:
        for j in range(d)[::-1]:
            if num[j] == 0:
                rest = g - score
                poi = 100 * (j+1)
                tmp = - (- rest // poi)
                if tmp < A[j][0]:
                    num[j] = tmp
                else:
                    num[j] = 10000
                break
    ans = min(ans, sum(num))

print(ans)


Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> i_i;

#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define ALL(v) v.begin(), v.end()
#define SZ(x) ((int)(x).size())

const double PI  = acos(-1.0);
const double EPS = 1e-9;
const ll INF = 1e9+10;
const ll mod = 998244353;
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; }
#define print(x) cerr << #x << " is " << x << endl;
//#define print(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; 

vector<pair<ll, ll> > pairs;
int cnt[100005], flag[100005];
int main()
{
    int N, aa = 0, bb = 0, ans = 0;
    cin >> N;
    vector<int>A(N), B(N), C(N);
    
    rep(i, N){
        
        cin >> A[i];
        aa = aa * 10 + A[i];
    }
    rep(i, N){
        cin >> B[i];
        bb = bb * 10 + B[i];
    }
    if (aa == bb){
        cout << 0;
        return 0;
    }
    if (bb <= aa){
        C = B;
        B = A;
        A = C;
    }
    while(next_permutation(ALL(A))){
        ans++;
        if (A == B){
            cout << ans;
            return 0;
        }
    }
    return 0;    
}


Measured memory_bytes: 256
a = int(input())
b = int(input())
c = int(input())
x = int(input())

mach_num = 0
for i in range(a + 1):
  for j in range(b + 1):
    for k in range(c + 1):
      if 500*i + 100*j + 50*k == x:
        mach_num += 1
    
print(mach_num)

Measured memory_bytes: 3060
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>
#define endl "\n"
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector < vi >
#define pii pair<int,int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001;
#define all(c) c.begin(),c.end()
#define mp(x,y) make_pair(x,y)
#define mem(a,val) memset(a,val,sizeof(a))
#define pb push_back
#define f first
#define s second
#define pi 3.141592653589793238
using namespace std;

ll gcd( ll a, ll b )
{
	if(b==0)
	{
		return a;
	}
	else
	{
		return gcd( b, a%b );
	}
}
ll lcm (ll a, ll b)
{
	return (a*b)/gcd(a,b);
}

ll power(ll a, ll b)	//a is base, b is exponent
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	if(b%2 == 1)
		return (power(a,b-1)*a)%mod;
	ll q = power(a,b/2);
	return (q*q)%mod;
}
map<string,int> mp;

int main()
{
	std::ios::sync_with_stdio(false);
	int n,m;
	cin >> n;
	string s[n*2];
	for(int i =0;i<n;i++) {cin >> s[i];mp[s[i]]++;}

	cin >> m;
	string t[m*2];
	for(int i =0;i<m;i++) {cin >> t[i];mp[t[i]]--;}	
	int ma = 0;
	for(auto x:mp)
	{
		ma = max(x.s,ma);
	}

	cout << ma << endl;
	return 0;	
}


//Hello, this is a snippet.


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

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main(){
	int n,k;
	ll a[10000];

	cin >> n >> k;
	
	for(int i=0;i<n;i++) cin >> a[i];
	sort(a,a+n);
	
	ll ans = 0;
	for (int i = 0; i < k; i++) ans += a[i];

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

Measured memory_bytes: 3676
#include <iostream>
using namespace std;
 
int main(){
    int x,y;
    int tmp;
    int count = 0;
    while(cin >> x >> y){
        tmp = x + y;
        count = 0;
        while(tmp != 0){
            tmp /= 10;
            count++;
        }
        cout << count << endl;
    }
    return 0;
}       

Measured memory_bytes: 3100
#include <stdio.h>
#include <stdlib.h>

int main(){
    char s[4];
    
    scanf("%s",s);
    int i;
    int cnt = 0;
    for(i=0;i<3;i++){
        if(s[i] == 'o'){
            cnt += 1;
        }
    }
    printf("%d",700+cnt*100);
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
int main()
{
  string a;
  cin>>a;
  int res=0,ans=0;
  for(int i=0;i<a.size();i++)
  {
    if(a[i]=='R')
      res++;
    else
      res=0;
    ans=max(res,ans);
  }
  cout<<ans;
}

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

int main() {
    int n;
    cin >> n;
    int l[n];
    rep(i, n) cin >> l[i];
    sort(l, l + n);
    int sum = 0;
    rep(i, n - 1) sum += l[i];
    string ans = "No";
    if (sum > l[n-1])  ans = "Yes";
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int N=500+10;
char a[N][N];

int main()
{
	int n,m;scanf("%d %d",&n,&m);
	for(int i=1;i<=n;++i) scanf("%s",a[i]+1);
	for(int i=1;i<=n;++i)
	{
		for(int j=1;j<=m;++j)
			printf("%c",(((i&1)&&j<m)||(!(i&1)&&j==1)||a[i][j]=='#')?'#':'.'); 
		puts("");
	};
	puts("");
	for(int i=1;i<=n;++i)
	{
		for(int j=1;j<=m;++j)
			printf("%c",(((i&1)&&j==m)||(!(i&1)&&j>1)||a[i][j]=='#')?'#':'.'); 
		puts("");
	};
	return 0;
}

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

using namespace std;
using ll  = long long;
using ii  = pair < int , int >;
using pll = pair < ll , ll >;
using i3  = pair < int , ii >;
using vi  = vector < int >;
using vl  = vector < ll >;
using vii = vector < ii >;
using vi3 = vector < i3 >;

const int N = 2e6 + 5;
const ll INF = 1e12 , mod = 1e9 + 7;
const double eps = 1e-9 , PI = acos(-1);

ll n , m , a , b;

ll f[N],inv[N];
ll pow_(ll a,ll b,ll mod=1e9+7){
    ll ans=1ll;
    while(b){
        if(b&1)ans=ans*a%mod;
        a=a*a%mod;
        b>>=1;
    }
    return ans;
}
void init(){
    f[0]=inv[0]=1;
    for(int i=1; i<N; i++){
            f[i]=1ll*i*f[i-1]%mod,inv[i]=pow_(f[i],mod-2);
    }
}
ll C(ll n , ll m){
    return f[n]*inv[n-m]%mod*inv[m]%mod;
}

ll num_of_way(ll xa,ll ya,ll xb,ll yb){
	ll xx=abs(xa-xb);
	ll yy=abs(ya-yb);
	return C(xx + yy,xx);
}

void solve(){
    init();
    scanf("%lld %lld" , &n , &m);
    scanf("%lld %lld" , &a , &b);

    ll a2 = n - a;

    ll sub = 0;
    for(int i = a2 + 1 ; i <= n ; i ++){
        sub += num_of_way(i , b , n , m);
        sub %= mod;
    }


    ll ans = 0ll;
    for(ll i = 1 ; i <= a2 ; i ++){

        /*
        cout << "x = " << x << endl;
        cout << "y = " << y << endl;

        cout << "rect: (1 , 1) -> (" << x << " , " << y << ")\n";
        cout << "rect: (" << x << " , " << y << " -> (" << n << " , " << m << ")\n";
        */


        ll add1 = num_of_way(1 , 1 , i , b) ;
        ll add2 = num_of_way(i , b+1 , n , m);
        //cout << "1 , 1 to " << i << " " << b << " = " << add1 << endl;
        //cout << i << " , " << b+1 << " to " << n << " " << m << " = " << add2 << endl;

        add1 = add1 * add2;
        ans = (ans%mod + add1%mod) %mod;
    }

    printf("%lld\n" , ans);
}

main(){
    int t = 1;
    //scanf("%d" , &t);

    while( t -- ){
            solve();
    }

    return 0;
}





Measured memory_bytes: 31616
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
using vi = vector<ll>;
using vvi = vector<vi>;
using vb = vector<bool>;
using vs = vector<string>;
using vp = vector<pii>;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define sz(x) (ll)((x).size())
#define all(x) (x).begin(), (x).end()
#define each(a, x) for (auto&& a : (x))
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, n) for (ll i = (a); i < (n); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep)(__VA_ARGS__)
#define _per(i, n) peri(i, 0, n)
#define peri(i, a, n) for (ll i = (n) - 1; i >= (a); --i)
#define per(...) _overload3(__VA_ARGS__, peri, _per)(__VA_ARGS__)
const int INF = 1e9;
const int MOD = 1e9 + 7;
const double EPS = 1e-9;
const double PI = acos(-1.0);
const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
template<typename T> inline void chmax(T& a, const T& b) {if (a < b) a = b;}
template<typename T> inline void chmin(T& a, const T& b) {if (a > b) a = b;}
template<typename T> inline void print(const T& x) {cout << x << "\n";}
template<typename T, typename U> istream& operator>>(istream& is, pair<T, U>& p) {is >> p.fi >> p.se; return is;}
template<typename T, typename U> ostream& operator<<(ostream& os, const pair<T, U>& p) {os << p.fi << " " << p.se; return os;}
template<typename T> istream& operator>>(istream& is, vector<T>& v) {each(in, v) is >> in; return is;}
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {rep(i, sz(v)) {os << v[i] << (i + 1 != sz(v) ? " " : "");} return os;}
struct Init {Init() {ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(10);}} init;

int main() {
    ll n, k;
    cin >> n >> k;
    ll ans = 0;
    rep(i, k, n + 2) {
        ans = (ans + ((2 * n - i + 1) * i / 2) - (i * (i - 1) / 2) + 1) % MOD;
    }
    print(ans);
}

Measured memory_bytes: 3576
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <functional>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <tuple>
#include <complex>
#include <cassert>
#include <exception>
#include <iomanip>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<P> vp;
#define rep(i,a,n) for(ll i = (a);i < (n);i++)
#define per(i,a,n) for(ll i = (a);i > (n);i--)
#define lep(i,a,n) for(ll i = (a);i <= (n);i++)
#define pel(i,a,n) for(ll i = (a);i >= (n);i--)
#define clr(a,b) memset((a),(b),sizeof(a))
#define pb push_back
// #define mp make_pair
#define all(c) (c).begin(),(c).end()
#define sz size()
#define print(X) cout << (X) << "\n"
static const int INF = 1e+9+7;
ll n,m,l;
string s,t;
ll d[200010],dp[300][300];
char field[200][200];

int main(){
  cin >> n;
  ll ans = 0;
  rep(i,1,100){
    rep(j,2,100){
      if(pow(i,j) <= n){
        ans = max(ans,(ll)pow(i,j));
      }
    }
  }
  print(ans);
  return 0;
}

Measured memory_bytes: 512
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

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

    vector<int>v(n);

    for(int i = 0;i < n;i++)
        cin >> v[i];
    
    for(int i = 0;i < n-1;i++){
        for(int j = i+1;j < n;j++)
            ans = max(ans,abs(v[i]-v[j]));
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
import java.util.*;
 
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String str = "";
        int x;
         
        for(int i=1; i<=n; i++) {
            x = i;
            if(x%3 == 0) {
                str += " "+i;
                continue;
            }
            if(x%10 == 3) {
                str += " "+i;
                continue;
            }
            x /= 10;
            while(x != 0) {
                if(x%10 == 3) {
                    str += " "+i;
                    break;
                }
                x /= 10;
            }
        }
         
        System.out.println(str);
    }
}


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

int main(){
  int a,b,c,k;
  cin>>a>>b>>c>>k;
  if(a>k){
    cout<<k<<endl;
  }else if(a+b>=k){
    cout<<a<<endl;
  }else{
    cout<<a-(k-a-b)<<endl;
  }
  return 0;
}  

Measured memory_bytes: 3632
N, C, K = gets.split.map &:to_i
T = N.times.map{ gets.to_i }.sort
ans = 0
seats = 0
dep = nil
T.each do |ti|
    if dep && dep < ti
        ans += 1
        seats = 0
        dep = nil
    end
    dep = ti + K if !dep
    seats += 1
    if seats == C
        ans += 1
        seats = 0
        dep = nil
    end
end
ans += 1 if dep
p ans

Measured memory_bytes: 4272
import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

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

	public static void solve() {
		int d = sc.nextInt();
		int t = sc.nextInt();
		int s = sc.nextInt();
		if (t * s >= d)
			System.out.println("Yes");
		else
			System.out.println("No");
		System.out.println();

	}
}


Measured memory_bytes: 27072
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>

#define MAXN 300005
#define INF 2000000090

using namespace std;

int n, sum[MAXN];
char line[MAXN];

int main()
{
    //freopen("c.txt", "r", stdin);
    while (scanf("%d", &n) == 1) {
        scanf("%s", line);
        sum[0] = 0;
        for (int i = 0; i < n; i++) {
            sum[i + 1] = sum[i] + (line[i] == 'E' ? 1 : 0);
        }
        sum[n + 1] = sum[n];
        int ans = n - 1;
        for (int i = 1; i <= n; i++) {
            int len_l = i - 1;
            int c_l = len_l - sum[i - 1];
            int c_r = sum[n] - sum[i];
            ans = min(ans, c_l + c_r);
        }
        cout << ans << endl;
    }

    return 0;
}


Measured memory_bytes: 1664
#include<bits/stdc++.h>
using namespace std;
#define INF (1LL<<60)
#define DEKAI 1000000007
#define lp(i,n) for(int i=0;i<n;i++)
#define int long long

#define N 100


signed main(){
	int n;
	cin>>n;
	vector<int> v;
	int sum=0;
	lp(i,n){
		int a;
		cin>>a;
		v.push_back(a);
	}
	sort(v.begin(),v.end());
	vector<pair<int,int>> ans;
	int maxi=v[n-1];
	int mini=v[0];
	for(int i=1;i<n-1;i++){
		if(v[i]<0){
			ans.push_back({maxi,v[i]});
			maxi-=v[i];
			continue;
		}
		ans.push_back({mini,v[i]});
		mini-=v[i];
	}
	cout<<maxi-mini<<endl;
	lp(i,ans.size()){
		cout<<ans[i].first<<" "<<ans[i].second<<endl;
	}
	cout<<maxi<<" "<<mini<<endl;
  	return 0;
}

Measured memory_bytes: 4336
#include<bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
#define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
#define all(v) (v).begin(), (v).end()
#define eb emplace_back
#define Cout(s) cout << s << endl
string Yes(bool b) {if(b){return "Yes";} else {return "No";}}
string YES(bool b) {if(b){return "YES";} else {return "NO";}}


int main(){
	int N, H, W;
	cin >> N >> H >> W; N++;
	Cout((N-H)*(N-W));
}


Measured memory_bytes: 256
Main(myin());
function myin(){return require("fs").readFileSync("/dev/stdin", "utf8").trim();}
function myout(t){console.log(t);}//standard output
function myerr(t){console.error(t);}//standard error
//[no]param
//不明値:何もしない  1:数値へ変換  2:半角SPで分割  3:改行で分割  4:半角SPで分割し、数値配列へ
//5:改行で分割し、数値配列へ  6:1文字に分割  7:1文字に分割し、数値配列へ
//8:半角SPで結合　9:改行で結合　0:文字なしで結合
function myconv(i,no){switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 3:return i.split("\n");case 4:return i.split(" ").map((a)=>Number(a));case 5:return i.split("\n").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}
function Main(input) {
  input = myconv(input,5);
  var H = input[0];
  var W = input[1];
  var N = input[2];
  myout(Math.min(Math.ceil(N/H),Math.ceil(N/W)));
}

Measured memory_bytes: 22076
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int sum = 0;
		int n = sc.nextInt();
		int[] x=new int[n];
		
		for(int i=0;i<n;i++){
			int t = sc.nextInt();
			sum = sum^t;
			x[i] = t;
		}
		
		for(int i=0;i<n;i++){
			System.out.println(sum^x[i]);
		}
	}
}

Measured memory_bytes: 60032
#include<bits/stdc++.h>
typedef long long ll;
ll gi(){
	ll x=0,f=1;
	char ch=getchar();
	while(!isdigit(ch))f^=ch=='-',ch=getchar();
	while(isdigit(ch))x=x*10+ch-'0',ch=getchar();
	return f?x:-x;
}
int T[100010];
int main(){
#ifdef XZZSB
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	int n=gi(),C=gi(),K=gi(),ans=0;
	for(int i=1;i<=n;++i)T[i]=gi();
	std::sort(T+1,T+n+1);
	for(int l=1,r;l<=n;l=r+1){
		r=l;while(r-l+1<C&&r<n&&T[r+1]<=T[l]+K)++r;
		++ans;
	}
	printf("%d\n",ans);
	return 0;
}


Measured memory_bytes: 640
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int k = sc.nextInt();

		if (a >= b && a >= c) {
			for (int i = 0; i < k; i++) {
				a *= 2;
			}
		} else if (b >= a && b >= c) {
			for (int i = 0; i < k; i++) {
				b *= 2;
			}
		} else {
			for (int i = 0; i < k; i++) {
				c *= 2;
			}
		}
		
		System.out.println((a + b + c));

		sc.close();
	}
}


Measured memory_bytes: 23124
package main

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

//scanで一行づつ読み込む
var sc = bufio.NewScanner(os.Stdin)
var wtr = bufio.NewWriter(os.Stdout)

//sort
// array := []int{5, 1, 4, 2, 3}
// sort.Sort(sort.IntSlice(array))

func main() {
	// a := make([]int, n)
	// A := strings.Split(nextLine(), " ")

	N := nextLine()
	// n, _ := strconv.Atoi(input[0])

	n, _ := strconv.Atoi(N)

	var ans int64 = 0
	var against int64 = 0
	var arr dish = []dishh{}
	for i := 0; i < n; i++ {
		A := strings.Split(nextLine(), " ")
		curA, _ := strconv.Atoi(A[0])
		curB, _ := strconv.Atoi(A[1])

		// dishCur := []dishh{{curA, curB}}
		arr = append(arr, dishh{curA, curB})

	}

	sort.Sort(arr)

	for i := 0; i < n; i++ {
		if i%2 == 0 {
			ans += int64(arr[i].first)
		} else {
			against += int64(arr[i].second)
		}

		// fmt.Fprintln(wtr, arr[i].first, arr[i].second)
	}

	fmt.Fprintln(wtr, ans-against)
	_ = wtr.Flush()
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}
func com(a, b int) int {

	if a > b {
		return 0
	}
	return abs(a - b)
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

type dishh struct {
	first  int
	second int
}

// 構造体のスライス
type dish []dishh

// 以下インタフェースを満たす

func (p dish) Len() int {
	return len(p)
}

func (p dish) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p dish) Less(i, j int) bool {

	return p[i].first+p[i].second > p[j].first+p[j].second
}


Measured memory_bytes: 9236
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <tuple>
#include <iomanip>
#include <numeric>
#include <unordered_map>
#include <sstream>   
#include<limits.h>
using namespace std;
#define i64  long long
#define lint long long
 
#define I32_MAX 2147483647
#define I64_MAX 9223372036854775807
#define MOD 1000000007

#define int long long

int N_global;


void solve()
{
  int N,K;
  cin>>N>>K;
  vector<int> vec(N,0);
  
  for (int i = 0; i < N; i++)
  {
    cin>>vec[i];
  }

  sort(vec.begin(),vec.end());
  int MIN = I64_MAX;
  for (int i = 0; i <= N - K; i++)
  {
    int diff;
    diff = (vec[i+K-1] - vec[i]);
    MIN = min(MIN,diff);
    // cout<<vec[i]<<endl;
  }

  cout<<MIN<<endl;
  

  
  
  
}
 
int32_t main(int32_t argc, const char *argv[])
{
 
  solve();
 
  return 0;
}

Measured memory_bytes: 1024