akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
#define chmin(a, b) ((a)=min((a), (b)))
#define chmax(a, b) ((a)=max((a), (b)))
#define fs first
#define sc second
#define eb emplace_back
using namespace std;

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

const ll MOD=1e9+7;
const ll INF=1e18;
const double pi=acos(-1);
const double eps=1e-10;

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

int main(){
    string s; cin>>s;
    int ans = 700;
    for(int i=0; i<3; i++){
        ans += (s[i] == 'o') * 100;
    }

    cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>  
 
using namespace std;
 
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<string, int> P;

void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}

int main() {
	int N;
	scanf("%d", &N);
	call(N);
	return 0;
}

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

#define INF 1999999999
#define REP(i,n) for(int i=0;i<n;i++)
#define MODA 1000000007 

int main() {
    int ans = 0;
    int N, K, h;
    cin >> N >> K;
    REP(i, N){
        cin >> h;
        if(h>= K)ans++;
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
A = []
for a in range(3):
  A.append(list(map(int, input().split())))
  
N = int(input())
B = []
for b in range(N):
  B.append(int(input()))

C = []
  
C.append(A[0])
C.append(A[1])
C.append(A[2])
C.append([A[0][0], A[1][0], A[2][0]])
C.append([A[0][1], A[1][1], A[2][1]])
C.append([A[0][2], A[1][2], A[2][2]])
C.append([A[0][0], A[1][1], A[2][2]])
C.append([A[0][2], A[1][1], A[2][0]])

flag = False

for c in C:
  if len(set(c)&set(B)) == 3:
    flag = True
    break
    
if flag:
  print("Yes")
else:
  print("No")

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pint = pair<int,int>;
ll mod = 1000000007,mod2 = 998244353;

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

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; }
const long long INF = 1LL<<60;
ll gcd(ll a,ll b){
    if(b == 0) return a;
    else return gcd(b,a%b);
}

bool is_prime[1000010];

void dfs(int d,ll num,vector<ll> &lunlun){
    lunlun.push_back(num);
    if(d == 10) return;

    for (int i = -1; i <= 1; ++i) {
        int tmp = num%10;
        tmp += i;
        if(tmp >= 0 && tmp <= 9){
            dfs(d+1,10*num+tmp,lunlun);
        }
    }
}

int main() {
    int k;
    cin >> k;
    vector<ll> ans;
    for (int i = 1; i <= 9; ++i) {
        dfs(1,i,ans);
    }
    sort(ans.begin(),ans.end());
    cout << ans[k-1] << endl;
    return 0;
}

Measured memory_bytes: 5348
#include<bits/stdc++.h>
using namespace std;
#define FOR(i,l,r) for(long long i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)
#define int long long
#define mp make_pair
const int MOD=1e9+7;
const int INF=1e15;

signed main(){
    int A,B;cin>>A>>B;
    char maze[100][100];
    REP(i,50){
        REP(j,100)maze[i][j]='#';
    }
    REP(i,50){
        REP(j,100)maze[i+50][j]='.';
    }
    REP(i,A-1){
		maze[(i/50)*2][2*(i%50)]='.';
    }
    REP(i,B-1){
		maze[99-(i/50)*2][2*(i%50)]='#';
    }
    cout<<100<<" "<<100<<endl;
    REP(i,100){
        REP(j,100) cout<<maze[i][j];
        cout<<endl;
    }
}

Measured memory_bytes: 256
//{
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(ll i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define FILL(i,n) memset(i,n,sizeof i)
#define X first
#define Y second
#define SZ(_a) (int)_a.size()
#define ALL(_a) _a.begin(),_a.end()
#define pb push_back
#ifdef brian
#define debug(...) do{\
    fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // brian
//}


const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=ll(1e15);

ll d[MAXn], dt[MAXn], u[MAXn];

int main()
{
    IOS();
    ll n;
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> d[i], dt[i] = i;
    sort(dt + 1, dt + 1 + n, [](int a, int b) {return d[a] < d[b];});
    ll c1 = 0, c2 = 0;
    for (int i = 1; i <= n; i++)
        if ((dt[i]&1)^(i&1))
            if (dt[i]&1) c1++;
            else c2++;
    cout << max(c1, c2) << endl;
}


Measured memory_bytes: 1792
import java.util.Scanner;

class Main {
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        long a = 100;
        long b = sc.nextLong();
        int count = 0;
        while(a<b)
        {
            a = (long)(a*1.01);
            count = count+1;
        }
        System.out.print(count);
    }
}


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

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n,a,b;
    cin>>n>>a>>b;
    long arr[n];
    for(long i=0;i<n;i++)
        cin>>arr[i];
    long ans[3];
    ans[0]=ans[1]=ans[2]=0;
    for(long i=0;i<n;i++)
    {
        if(arr[i]<=a)
            ans[0]++;
        else if(arr[i]>=a+1 && arr[i]<=b)
            ans[1]++;
        else if(arr[i]>=b)
            ans[2]++;
    }
    cout<<min(ans[1],min(ans[0],ans[2]));
}

Measured memory_bytes: 256
N = int(input())
lst = list(map(int,input().split()))

def insertionSort(A,N):
    print(" ".join(map(str,A))) 
    for i in range(1,len(A)):
        v = A[i]
        j = i - 1
       
        while j >= 0 and A[j] > v:
            A[j+1] = A[j]
            j -= 1
        A[j+1] = v
        print(" ".join(map(str,A)))
    return A

lst2 = insertionSort(lst,N)



Measured memory_bytes: 5604
#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<utility>
#include<array>
#include<set>
#define EPS (1e-7)
using namespace std;






int main() {

	int N,X,ans=0;
	cin >> N >> X;
	int L,pre=0;

	if (X >= 0) ans += 1;


	for (auto i = 0; i < N; i++)
	{
		cin >> L;
		if (X >= pre + L)ans += 1;
		pre = pre + L;
	}

	cout << ans << endl;

	return 0;
}


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

int main() {

    int n;
    cin >> n;
    int v[n];
    for (int i=0; i<n; i++) {
        cin >> v[i];
    }
    int sm = 0;
    for (int i=0; i<n; i++) {
        int a;
        cin >> a;
        sm += max(0, v[i]-a);
    }
    cout << sm;

}

Measured memory_bytes: 384
import sys

convert = {"1": {"1": "a", "2": "b", "3": "c", "4": "d", "5": "e"},
           "2": {"1": "f", "2": "g", "3": "h", "4": "i", "5": "j"},
           "3": {"1": "k", "2": "l", "3": "m", "4": "n", "5": "o"},
           "4": {"1": "p", "2": "q", "3": "r", "4": "s", "5": "t"},
           "5": {"1": "u", "2": "v", "3": "w", "4": "x", "5": "y"},
           "6": {"1": "z", "2": ".", "3": "?", "4": "!", "5": " "},
           }

for line in sys.stdin:
    line = line[:-1]

    if len(line) % 2 != 0:
        print("NA")
        continue

    message = ""

    line = iter(line)

    for first, second in zip(*[line, line]):

        if "1" <= first <= "6" and "1" <= second <= "5":
            message += convert.get(first).get(second)
        else:
            print("NA")
            break
    else:
        print(message)



Measured memory_bytes: 5564
#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <set>
using namespace std;

int dp[2001][2001];
int used[2001][2001];

string s;
int f(int l,int r){
	if(dp[l][r] != -1) return dp[l][r];
	if(l >= r) return 0;
	if(s[l] == s[r]){
		used[l][r] = 0;
		return dp[l][r] = f(l+1,r-1);
	}else{
		int a = f(l+1,r) + 1;
		int b = f(l,r-1) + 1;
		if(a < b){
			used[l][r] = -1;
			return dp[l][r] = a;
		}else{
			used[l][r] = 1;
			return dp[l][r] = b;
		}
	}
}
int mask[2001];

void get(int l,int r){
	if(l >= r) return;
	if(used[l][r] == 0){
		get(l+1,r-1);
	}else if(used[l][r] == -1){
		mask[l] = 1;
		get(l+1,r);
	}else{
		mask[r] = 1;
		get(l,r-1);
	}
}

int main(){
	while(cin >> s){
		memset(dp,-1,sizeof(dp));
		memset(mask,0,sizeof(mask));
		f(0,s.size()-1);
		get(0,s.size()-1);
		
		for(int i = 0 ; i < s.size() ; i++)
			if(mask[i] == 0) cout << s[i];
		cout << endl;
	}
}

Measured memory_bytes: 29000
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef bitset<35> sta;

int n;

int main(){
	cin>>n;
	if (n==(n&-n)){
		cout<<"No"<<endl;
		return 0;
	}
	printf("Yes\n%d %d\n%d %d\n%d %d\n%d %d\n%d %d\n",1,2,2,3,3,n+1,n+1,n+2,n+2,n+3);
	int x,y;
	for (int i=5;i<=n;i+=2){
		if ((n^1^(i-1))>=2) x=i-1,y=n^1^(i-1);
		if ((n^1^i)>=2) x=i,y=n^i^1;
		printf("%d %d\n%d %d\n%d %d\n%d %d\n",i-1,i,i+n,i-1+n,i-1,n+1,i+n,n+1);
	}
	if (n%2==0){
		if (x==2 || x%2==1) x+=n;
		if (y==2 || y%2==1) y+=n;
		printf("%d %d\n%d %d\n",n,x,2*n,y);
	}
	return 0;
}

Measured memory_bytes: 2816
#include <cstdio>
#include <cmath>
#include <iostream>
#include <set>
#include <algorithm>
#include <vector>
#include <map>
#include <cassert>
#include <string>
#include <cstring>
#include <queue>

using namespace std;

#define rep(i,a,b) for(int i = a; i < b; i++)
#define S(x) scanf("%d",&x)
#define S2(x,y) scanf("%d%d",&x,&y)
#define P(x) printf("%d\n",x)
#define all(v) v.begin(),v.end()
#define FF first
#define SS second
#define pb push_back
#define mp make_pair

typedef long long int LL;
typedef pair<int, int > pii;
typedef vector<int > vi;

int main() {
  int a,b,c,k;
  scanf("%d%d%d%d",&a,&b,&c,&k);
  if(k & 1) {
    P(b - a);
  } else {
    P(a - b);
  }
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
template<class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i,a,n) for(int i=(a);i<(n);++i)
#define eFOR(i,a,n) for(int i=(a);i<=(n);++i)
#define rFOR(i,a,n) for(int i=(n)-1;i>=(a);--i)
#define erFOR(i,a,n) for(int i=(n);i>=(a);--i)
#define each(i, a) for(auto &i : a)
#define SORT(a) sort(a.begin(),a.end())
#define rSORT(a) sort(a.rbegin(),a.rend())
#define fSORT(a,f) sort(a.begin(),a.end(),f)
#define all(a) a.begin(),a.end()
#define out(y,x) ((y)<0||h<=(y)||(x)<0||w<=(x))
#define tp(a,i) get<i>(a)
#define line cout << "-----------------------------\n" 
#define ENDL(i,n) ((i) == (n) - 1 ? "\n" : " ")
#define stop system("pause")
constexpr ll INF = 1000000000;
constexpr ll LLINF = 1LL << 60;
constexpr ll mod = 1000000007;
constexpr ll MOD = 998244353;
constexpr ld eps = 1e-10;
constexpr ld pi = 3.1415926535897932;
template<class T>inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; }return false; }
template<class T>inline bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; }return false; }
inline void init() { cin.tie(nullptr); cout.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); }
template<class T>inline istream& operator>>(istream& is, vector<T>& v) { for (auto& a : v)is >> a; return is; }
template<class T>inline istream& operator>>(istream& is, deque<T>& v) { for (auto& a : v)is >> a; return is; }
template<class T, class U>inline istream& operator>>(istream& is, pair<T, U>& p) { is >> p.first >> p.second; return is; }
template<class T>inline vector<T> vec(size_t a) { return vector<T>(a); }
template<class T>inline vector<T> defvec(T def, size_t a) { return vector<T>(a, def); }
template<class T, class... Ts>inline auto vec(size_t a, Ts... ts) { return vector<decltype(vec<T>(ts...))>(a, vec<T>(ts...)); }
template<class T, class... Ts>inline auto defvec(T def, size_t a, Ts... ts) { return vector<decltype(defvec<T>(def, ts...))>(a, defvec<T>(def, ts...)); }
template<class T>inline void print(const T& a) { cout << a << "\n"; }
template<class T, class... Ts>inline void print(const T& a, const Ts&... ts) { cout << a << " "; print(ts...); }
template<class T>inline void print(const vector<T>& v) { for (int i = 0; i < v.size(); ++i)cout << v[i] << (i == v.size() - 1 ? "\n" : " "); }
template<class T>inline void print(const vector<vector<T>>& v) { for (auto& a : v)print(a); }
inline string reversed(const string& s) { string t = s; reverse(all(t)); return t; }

int main() {
    init();

    string s, t; cin >> s >> t;
    int ans = INF;
    int n = s.length(), m = t.length();
    eFOR(i, 0, n - m) {
        int cnt = 0;
        FOR(j, 0, m)if (s[i + j] != t[j])++cnt;
        chmin(ans, cnt);
    }
    print(ans);

    return 0;
}

Measured memory_bytes: 3636
#include <stdio.h>

double kakuritu_table[21];
double memo[100010][21];
char visited[100010][21];

double tansaku(int rest,int renzoku) {
	double result=0;
	if(rest<=0)return 0;
	if(visited[rest][renzoku])return memo[rest][renzoku];
	if(renzoku<20)result+=(1+tansaku(rest-1,renzoku+1))*kakuritu_table[renzoku];
	result+=tansaku(rest-1,0)*(1-kakuritu_table[renzoku]);
	visited[rest][renzoku]=1;
	memo[rest][renzoku]=result;
	return result;
}

int main(void) {
	int n;
	kakuritu_table[0]=1;
	for(n=1;n<=20;n++)kakuritu_table[n]=kakuritu_table[n-1]/2;
	while(scanf("%d",&n)==1 && n>0) {
		printf("%f\n",tansaku(n,0));
	}
	return 0;
}

Measured memory_bytes: 24712
//#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"

#define rep(i,n) for(ll (i)=0;(i)<(ll)(n);(i)++)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007LL
#define INF (1LL<<60LL)
#define int long long
typedef long long ll;

using namespace std;


signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	bool ans = true;
	int n; cin >> n;
	rep(i, n) {
		int a; cin >> a;
		if (a % 2 == 0) {
			if (a % 3 != 0 && a % 5 != 0) {
				ans = false;
			}
		}
	}
	if (ans)
		cout << "APPROVED" << endl;
	else
		cout << "DENIED" << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string.h>
#include <stack>
#include <queue>
#include <algorithm>
#include <climits>
#include <cmath>
#include <map>
#include <set>
#include <assert.h>
#include <stdio.h>
#define REP(i,n) for(ll i=0;i<(n);i++)
#define MOD 1000000007
#define int long long
#ifdef int
const long long INF = LLONG_MAX / 10;
#else
const int INF = 1010101010;
#endif
using namespace std;
typedef long long ll;
typedef vector<vector<ll> > mat;
typedef pair<int, int> P;
//typedef pair<double, double> P;
const int dx[9] = {-1, 0, 0, 1, -1, -1, 1, 1, 0};
const int dy[9] = {0, -1, 1, 0, -1, 1, -1, 1, 0};
 
int N;
int A[101010];
 
signed main() {
  cin >> N;
  int oddnum = 0;
  REP(i,N) {
    cin >> A[i];
    if (A[i] % 2 == 1) oddnum++;
  }

  if (oddnum % 2 == 1) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  } 
}

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

ll b(string s, string t) {
  int ans = 1000000;
  for(int i= 0;i<= s.size()-t.size();i++) {
    int diff = 0;
    for(int j = i;j<i+t.size();j++) {
      //cout << s[j] << "===" << t[j-i] << endl;
      if(s[j] != t[j-i]) {
	diff++;
      }
    }
    //cout << i << " -> " << diff << endl;
    ans = min(ans, diff);
  }
  return ans;
}

int main() {
  string s, t;
  cin >> s >> t;
  cout << b(s, t);
}

Measured memory_bytes: 3592
import java.util.*;
import java.awt.*;
import java.awt.geom.Point2D;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[]$){
        Scanner sc = new Scanner(in);
        String s=sc.next();
        for(char i='A';i<='Z';i++){
            if(i=='A'||i=='T'||i=='G'||i=='C'){
                continue;
            }
            s=s.replaceAll(Character.toString(i), "-");
        }
        String[] x=s.split("-");
        int ans=0;
        for(int i=0;i<x.length;i++){
            ans=max(ans,x[i].length());
        }
        out.println(ans);
    }
}

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

int main()
{
    int a[110],i,n,d,x;
    scanf("%d%d%d",&n,&d,&x);
    for(i=1;i<=n;i++)
        scanf("%d",&a[i]);
    int total=0;
    for(i=1;i<=n;i++)
    {
          total=total+1;
           int cont=1;
           while(1)
           {
               if(d>=cont*a[i]+1)
                cont++;
               else
                break;
           }
           total=total+cont-1;

    }
    int q;
    q=total+x;
    printf("%d",q);
    return 0;
}


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

int main() {
  string s;
  cin >> s;
  if (s=="RRR") {
    cout << 3 << endl;
    return 0;
  }
  if (s.find("RR")!=std::string::npos) {
    cout << 2 << endl;
    return 0;
  }
  if (s.find("R")!=std::string::npos) {
    cout << 1 << endl;
    return 0;
  }



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


Measured memory_bytes: 3604
/*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;*/
#include<algorithm>
#include <bits/stdc++.h>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<ctype.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define S second
#define F first
#define f(i,n) for(ll i=0;i<n;i++)
#define f1(i,n) for(ll i=1;i<=n;i++)
#define fb(i,n) for(ll i=n-1;i>=0;i--)
#define fb1(i,n) for(ll i=n;i>0;i--)
#define endd cout<<'\n';
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define fr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define all(x) x.begin(), x.end()
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define vi vector<ll>
#define pii pair<ll,ll>
#define CASES  ll t;cin>>t;while(t--)
typedef long long ll;
typedef unsigned long long ull;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
//*X.find_by_order()
//X.order_of_key()
ll mod=1000000007;
const ll N=100005;
int main()
{
fast;
    ll n;
    cin>>n;
    string s;
    cin>>s;
    ll c=0;
    ll k;
    f(i,n)
    {
        if(s[i]=='W')
        {
            k=i;
            break;
        }
    }
    ll c1=0;
    for(ll i=k;i<n;i++)
    {
        if(s[i]=='R')
            c1++;
    }
    ll ans=c1;
    ll l=0,r=n-1;
    while(l<r)
    {
        if(s[l]=='W' && s[r]=='R')
        {
            c++;
            swap(s[l],s[r]);
        }
        else
        {
            if(s[l]=='R')
                l++;
            if(s[r]=='W')
                r--;
        }
    }
    ans=min(ans,c);
    cout<<ans;
    return 0;
    
}

Measured memory_bytes: 3756
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    A, B = LI()
    if A >= 13:
        ans = B
    elif A >= 6:
        ans = B // 2
    else:
        ans = 0
    return ans

print(main())

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

int main() {
	int n;
	cin>>n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) cin>>a[i];
	sort(a.begin(), a.end());
	double d = ((double) (a[0] + a[1]) / (double) 2);
	for (int i = 2; i < n; i++) {
		d = (((double) (a[i]) + d) / (double) 2);
	}
	cout<<d<<endl;
	return 0;
}


Measured memory_bytes: 256
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author champon
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define inf 1e18
#define ceill(a, b) (a+b-1)/b
#define ok cout << "ok" << endl;
#define sp << " " <<
ll mod = 1e9+7;
void ans(bool b, ostream& out=cout){ out << (b ? "Yes" : "No") << endl; }
void ans2(bool b, ostream& out=cout){ out << (b ? "YES" : "NO") << endl; }
template<typename T> inline bool chmax(T &a, T b){ if(a<b) a=b; return a<b; }
template<typename T> inline bool chmin(T &a, T b){ if(b<a) a=b; return b<a; }
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){fill((T*)array, (T*)(array+N), val);}
int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, -1, -1, 1};

#ifndef INCLUDE_DEBUG_HPP
#define INCLUDE_DEBUG_HPP

class debug
{
public:
    template<typename T> void vdeb(T vec);
    template<typename T1, typename T2> void adeb(T1 *arr, T2 n);
    template<typename T> void mdeb(T mp);
};

#endif //INCLUDE_DEBUG_HPP

template<typename T> void debug::vdeb(T vec)
{
    cout << "#vector set debug" << endl;
    for(auto vv : vec) cout << vv << " ";
    cout << endl;
}

template<typename T1, typename T2> void debug::adeb(T1 *arr, T2 n)
{
    cout << "#adebug" << endl;
    for(int i=0; i<=n; i++) cout << arr[i] << " ";
    cout << endl;
}

template<typename T> void debug::mdeb(T mp)
{
    cout << "#map pair debug" << endl;
    for(auto const& m : mp) cout << m.first sp m.second << endl;
}
debug dbg;

class BAdditionAndMultiplication {
public:
	void solve(std::istream& in, std::ostream& out)
	{
	    int n, k;
	    in >> n >> k;
	    int now = 1;
	    while(n > 0){
	        if(now > k) now += k;
	        else now *= 2;
	        n--;
	    }

	    out << now << endl;
	}
};


int main() {
	BAdditionAndMultiplication solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(void)
{
  int a, b, c;

  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);

  if(a < b && b < c) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }

  return 0;
}

Measured memory_bytes: 1752
#include <iostream>

using namespace std;

int main() {
    int n; 
    while (cin >> n) {
        if (n == 0) break;
        int min = 100000, max = 0;
        while (n--) {
            int sum = 0;
            for (int i = 0; i < 5; i++) {
                int s; cin >> s;
                sum += s;
            }
            if (min > sum) min = sum;
            if (max < sum) max = sum;
        }
        cout << max << ' ' << min << endl;
    }
    return 0;
}

Measured memory_bytes: 0
<?php
    $slime_cnt = fgets(STDIN);
    $slimes = fgets(STDIN);
    $slime = explode('', $slimes);

    $cnt = (int)$slime_cnt;
    for($i=0; $i<=$slime_cnt; $i++){
        if($slimes[$i] == $slimes[$i+1]){
            $cnt = $cnt -1;
        }
    }
    echo $cnt;
?>

Measured memory_bytes: 4728
#include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
/* global variables */
/* function */
/* main */
int main(){
    int a, b;
    cin >> a >> b;
    if (a + b == 15) cout << '+' << '\n';
    else if (a * b == 15) cout << '*' << '\n';
    else cout << 'x' << '\n';
}

Measured memory_bytes: 3556
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define debug(x) cerr << "[(" << __LINE__ << ") " << (#x) << "]: " << x << endl;

long double PI = 3.141592653589793238462643383279502884197169399375105820974;

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

    int a, b, h, m;
    cin >> a >> b >> h >> m;

    long double idk = PI / 180;

    cout << setprecision(10) << fixed;
    long double x1 = sin((30*h + 0.5*m) * idk) * a;
    long double x2 = sin(6 * m * idk) * b;

    long double y1 = cos((30*h + 0.5*m) * idk) * a;
    long double y2 = cos(6 * m * idk) * b;

    long double duh = x2 - x1;
    long double duh2 = y2 - y1;
    cout << sqrt(duh*duh + duh2*duh2) << "\n";
}


Measured memory_bytes: 4180
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define mod 1000000007
#define iP pair<int,int>
#define gcd(a,b) __gcd(a,b)
#define pb push_back
#define inf 1e15
#define mod1 998244353
#define pi 3.141592653589793238
int32_t main(void){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);cout<<fixed;cerr.tie(NULL);cout.precision(20);
    double l;
    cin>>l;
    cout<<l*l*l/27.0;
}

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

int main()
{
  
  int n,Y,x,y,z;
  cin>>n>>Y;
  for(x=0;x<=Y/10000;x++)
    for(y=0;y<=Y/5000;y++)
    {
      z=n-x-y;
      if(z>=0 && x*10000+y*5000+z*1000==Y)
      {
       cout<<x<<' '<<y<<' '<<z<<endl;
       return 0;
      }
   }
   cout<<"-1 -1 -1"<<endl;
   return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define STDIO
#define MOD 1000000007
#define testbit(mask,i) (((mask)>>(i))&1)
#define setbit(mask,i) ((mask)|(1<<i))
#define delbit(mask,i) ((mask)^(1<<i))
#define lowbit(x) ((x)&(-x))
#define INF MOD
using namespace std;
int n;
string s;
int p;
int cnt[10010];
int main(){
	#ifndef STDIO
		freopen("input.in","r",stdin);
		freopen("output.out","w",stdout);
	#endif
	ios::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>n>>p>>s;
	if(p==2||p==5){
		long long res=0LL;
		for(int i=0;i<n;i++)
			if((s[i]-'0')%p==0)
				res+=(long long)(i+1);
		cout<<res<<endl;
		return 0;
	}
	int p10=1;
	int cur=0;
	cnt[0]=1;
	long long res=0LL;
	for(int i=n-1;i>=0;i--){
		cur=(cur+p10*(s[i]-'0'))%p;
		p10=(p10*10)%p;
		res+=(long long)(cnt[cur]);
		cnt[cur]++;
	}
	cout<<res<<endl;
	return 0;
}


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

#include <boost/range/adaptors.hpp>
#include <boost/range/irange.hpp>

using namespace std;
using namespace boost;
using namespace boost::adaptors;

int main() {
    int64_t n;
    cin >> n;

    vector<int64_t> a(n);
    for (auto&& aa : a) {
        cin >> aa;
    }

    int64_t ans = numeric_limits<int64_t>::max();
    for (auto sgn : {1L, -1L}) {
        int64_t s = 0;
        int64_t t = 0;
        for (auto aa : a) {
            s += aa;
            if (s * sgn <= 0) {
                t += -(s * sgn) + 1;
                s = sgn;
            }
            sgn *= -1L;
        }
        ans = min(ans, t);
    }

    cout << ans << endl;
}

Measured memory_bytes: 1024
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;

#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;

#define MOD 1000000007

long long modpow(long long a, long long b){ 
  long long r = 1LL;

  while(b){
    if(b & 1LL)r *= a;
    if(r >= MOD)r %= MOD;
    a *= a;
    if(a >= MOD)a %= MOD;
    b >>= 1LL;
  }
  return r;
}

vector<ll> f(ll n){
	set<ll> se;
	for(int i = 1; i * i <= n; i++){
		if(n%i==0){
			se.insert(i);
			se.insert(n/i);
		}
	}
	vector<ll> ret(all(se));
	return ret;
}

ll dp[5000];

int main() {
	ll n,k;
	cin>>n>>k;
	vector<ll> v = f(n);
	clr(dp,0);
	rep(i,0,v.sz){
		ll a = v[i];
		ll c = 0;
		if(a%2==0){
			c += modpow(k,a/2);
			c %= MOD;
		}
		else{
			c += k * modpow(k,(a-1)/2);
			c %= MOD;
		}
		rep(j,0,i){
			ll b = v[j];
			if(a%b==0){
				c += MOD;
				c -= dp[j];
				c %= MOD;
			}
		}
		dp[i] = c;
	}
	ll ans = 0;
	rep(i,0,v.sz){
		if(v[i]%2==0){
			ans += dp[i] * v[i] / 2;
			ans %= MOD;
		} 
		else{
			ans += dp[i] * v[i];
			ans %= MOD;
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 384
# -*- coding:utf-8 -*-
import sys


def binary_search(data, targets, n):
    cnt = 0
    for num in targets:
        small = 0
        big = n - 1
        while small < big:
            index = (small + big) >> 1
            if small < big:
                if num < data[index]:
                    big = index - 1
                if num > data[index]:
                    small = index + 1
                if num == data[index]:
                    cnt += 1
                    break
        if small == big and num == data[small]:
            cnt += 1

    return cnt


if __name__ == "__main__":
    input_data = [val.split() for val in sys.stdin.read().splitlines()]
    n = int(input_data[0][0])
    data = [int(n) for n in input_data[1]]
    targets = [int(n) for n in input_data[3]]
    print(binary_search(data, targets, n))

Measured memory_bytes: 24484
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0, i##_len = (n); i < i##_len; ++i)
#define rep2(i, x, n) for(int i = x, i##_len = (n); i < i##_len; ++i)
#define all(n) begin(n), end(n)
using ll = long long;
using P = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vc = vector<char>;
using vb = vector<bool>;
using vd = vector<double>;
vi dir = {-1, 0, 1, 0, -1, -1, 1, 1, -1};

int main() {
  ll n, k;
  cin >> n >> k;
  vl a(n), f(n);
  rep(i, n) cin >> a[i];
  rep(i, n) cin >> f[i];
  sort(all(a), greater<ll>());
  sort(all(f));
  ll ng = -1, ok = 1e18;
  while(ng + 1 < ok) {
    ll x = (ng + ok) / 2;
    ll now = 0;
    rep(i, n) {
      ll need = a[i] * f[i] - x;
      if(need <= 0) continue;
      now += (need + f[i] - 1) / f[i];
    }
    if(now <= k)
      ok = x;
    else
      ng = x;
  }
  cout << ok << endl;
}

Measured memory_bytes: 6440
#include<bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define sz(a) int(a.size())
#define clr(a) memset(a,0,sizeof(a))
#define all(a) a.begin(),a.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,int> pli;
const int inf=1e9;
const ll Inf=1e18;
const int N=1e5+10;
const int mod=0;
int gi() {
    int x=0,o=1;char ch=getchar();
    while((ch<'0'||ch>'9')&&ch!='-') ch=getchar();
    if(ch=='-') o=-1,ch=getchar();
    while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar();
    return x*o;
}
template<typename T> bool chkmax(T &a,T b) { return a<b?a=b,1:0; };
template<typename T> bool chkmin(T &a,T b) { return a>b?a=b,1:0; };
int add(int a,int b) { return a+b>=mod?a+b-mod:a+b; }
int sub(int a,int b) { return a-b<0?a-b+mod:a-b; }
void inc(int &a,int b) { a=(a+b>=mod?a+b-mod:a+b); }
void dec(int &a,int b) { a=(a-b<0?a-b+mod:a-b); }
int n,s,a[N],l,r,t=0;
ll p[N],ans=0;
int main() {
    n=gi(),s=gi();
    for(int i=1;i<=n;i++) a[i]=gi(),p[i]=gi();
    l=1,r=n;
    while(1) {
        if(s<=a[l]) { ans+=a[r]-s;break; }
        if(s>=a[r]) { ans+=s-a[l];break; }
        if(p[l]>=p[r]) {
            if(t!=1) t=1,ans+=a[r]-a[l];
            p[l]+=p[r--];
        }
        else {
            if(t!=2) t=2,ans+=a[r]-a[l];
            p[r]+=p[l++];
        }
    }
    printf("%lld\n",ans);
    return 0;
}


Measured memory_bytes: 1408
<?php
  fscanf(STDIN,"%d %d %d",$a,$b,$c);
  if($a == 5 && $b == 5 && $c == 7 ||
     $a == 5 && $b == 7 && $c == 5 ||
     $a == 7 && $b == 5 && $c == 5){
    echo "YES\n";
  } else {
    echo "NO\n";
  }

Measured memory_bytes: 4604
/*
Rathin Bhargava
IIIT Bangalore

*/
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define ll long long int
#define ld long double
#define fi first
#define se second
#define pr(v) { for(int i=0;i<v.size();i++) { v[i]==INF? cout<<"INF " : cout<<v[i]<<" "; } cout<<endl;}
#define t1(x)                cerr<<#x<<" : "<<x<<endl
#define t2(x, y)             cerr<<#x<<" : "<<x<<" "<<#y<<" : "<<y<<endl
#define t3(x, y, z)          cerr<<#x<<" : " <<x<<" "<<#y<<" : "<<y<<" "<<#z<<" : "<<z<<endl
#define t4(a,b,c,d)          cerr<<#a<<" : "<<a<<" "<<#b<<" : "<<b<<" "<<#c<<" : "<<c<<" "<<#d<<" : "<<d<<endl
#define t5(a,b,c,d,e)          cerr<<#a<<" : "<<a<<" "<<#b<<" : "<<b<<" "<<#c<<" : "<<c<<" "<<#d<<" : "<<d<<" "<<#e<<" : "<<e<<endl
#define t6(a,b,c,d,e,f)          cerr<<#a<<" : "<<a<<" "<<#b<<" : "<<b<<" "<<#c<<" : "<<c<<" "<<#d<<" : "<<d<<" "<<#e<<" : "<<e<<" "<<#f<<" : "<<f<<endl
#define GET_MACRO(_1,_2,_3,_4,_5,_6,NAME,...) NAME
#define t(...) GET_MACRO(__VA_ARGS__,t6,t5, t4, t3, t2, t1)(__VA_ARGS__)
#define _ cerr<<"here"<<endl;
#define __ {ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);}

using namespace std;
template<class A, class B> ostream& operator<<(ostream& out, const pair<A, B> &a){ return out<<"("<<a.first<<", "<<a.second<<")";}
template <int> ostream& operator<<(ostream& os, const vector<int>& v) { os << "["; for (int i = 0; i < v.size(); ++i) { if(v[i]!=INF) os << v[i]; else os << "INF";if (i != v.size() - 1) os << ", "; } os << "]\n"; return os; } 
template <typename T> ostream& operator<<(ostream& os, const vector<T>& v) { os << "["; for (int i = 0; i < v.size(); ++i) { os << v[i]; ;if (i != v.size() - 1) os << ", "; } os << "]\n"; return os; } 

ll min(ll x, ll y)
{
  if(x<y) return x;
  return y;
}

int main()
{
  __;
  ll n,m;
  cin>>n>>m;
  vector<int> v;
  for(ll i=n;i<=min(m,n+2020);i++) v.pu(i%2019);

  sort(v.begin(),v.end());

  int min1 = INF;
  for(int i=0;i<v.size();i++) for(int j=i+1;j<v.size();j++) min1 = min((v[i]*v[j])%2019,min1);
  cout<<min1<<endl;
  return 0;
}



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

int main()
{
    int n;
    cin>>n;
    vector<int> value;
    for(int i = 0;i < n;i++)
    {
        int temp;
        cin>>temp;
        value.push_back(temp);
    }

    int min;
    int diff;
    min = value.at(0);
    diff = value.at(1) - min;
    for(int i = 1;i < n;i++)
    {
        if((value.at(i) - min) > diff)
            diff = value.at(i) - min;
        if(min > value.at(i))
            min = value.at(i);

    }
    cout<<diff<<endl;
}

Measured memory_bytes: 3928
n=int(input())
s_dic = {}
for _ in range(n):
    s = input()
    if s in s_dic:
        s_dic[s] = s_dic[s] + 1
    else:
        s_dic[s] = 1

max_val = max(s_dic.values())
for s in sorted(s_dic):
    if s_dic[s] == max_val:
        print(s)

Measured memory_bytes: 32096
#include<stdio.h>
int main()
{
    int n;
    scanf("%d",&n);
    if(n == 25)
        printf("Christmas\n");
    else if(n == 24)
        printf("Christmas Eve\n");
    else if(n == 23)
        printf("Christmas Eve Eve\n");
    else printf("Christmas Eve Eve Eve\n");
    return 0;
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key

typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long double ld; 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
typedef set<int>::iterator sit;
typedef map<int,int>::iterator mit;
typedef vector<int>::iterator vit;

ll a[6001];
int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	ll n, x; cin >> n >> x;
	for(int i = 0; i < n; i++)
	{
		cin >> a[i];
		a[n+i] = a[i];
		a[2*n+i] = a[i];
	}
	ll ans = ll(1e18);
	for(int i = 0; i <= n; i++) //number of shifts
	{
		ll cur = 0;
		set<pair<ll,int> > s;
		for(int j = n; j >= n - i; j--)
		{
			s.insert(mp(a[j], j));
		}
		for(int j = 0; j < n; j++)
		{
			cur += (*s.begin()).fi;
			s.erase(mp(a[n + j - i], n + j - i));
			s.insert(mp(a[n + j + 1], n + j + 1));
		}
		ans = min(ans, cur+ll(x)*ll(i));
	}
	cout << ans;
}	


Measured memory_bytes: 384
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    char[] arr = sc.next().toCharArray();
    int total = 0;
    for (char c : arr) {
      if (c == 'R') {
        total++;
      } else {
        total--;
      }
    }
    if (total > 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}

Measured memory_bytes: 22612
#include<iostream>
#include<string>
#include<bits/stdc++.h>
using namespace std;
int main() 
{ 
string name;
getline(cin,name);
 if (name.length() == 0) 
        return 0;
    cout << (char)toupper(name[0]);  
    for (int i = 1; i < name.length() - 1; i++) {
	
        if (name[i] == ' ') 
        {
	
            cout << (char)toupper(name[i + 1]); 
        }
    }
   return 0; 
}

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

using namespace std;
#define llu unsigned long long
#define ll long long
#define p pair<int,int>
#define M 1000000007
//sieve can be used here!
bool isPrime(int n){
	if(n==1)return false;//1 is not prime
	for(int i=2;i*i<=n;i++){
		if(n%i==0)return false;
	}
	return true;
}
bool myComp(p a,p b){
	if(a.first==b.first) return a.second<b.second;
	return a.first>b.first;
}
int row[]={-1,0,1,0};
int col[]={0,-1,0,1};
ll squareRoot(ll x){
	ll low=0;
	ll high=x;
	while(low<=high){
		ll mid= low+(high-low)/2;
		if((mid*mid)>x)high=mid-1;
		else if(mid*mid<x)low=mid+1;
		else return mid;
	}
	return low;
}
void dfs(char par,int r,int c,vector<vector<char>>& arr,vector<vector<bool>>& visited){
	int n=arr.size();
	int m=arr[0].size();
	visited[r][c]=true;
	arr[r][c]=par;
	for(int i=0;i<4;i++){
		int newRow=r+row[i];
		int newCol=c+col[i];
		if(newRow>=0&&newRow<n&&newCol>=0&&newCol<m&&!visited[newRow][newCol]&&arr[newRow][newCol]!='-'){
			if(par=='B') dfs('W',newRow,newCol,arr,visited);
			else dfs('B',newRow,newCol,arr,visited);
		}
	}
}
llu sumDigit(llu x){
	llu ans=0;
	while(x>0){
		ans+=x%10;
		x/=10;
	}
	return ans;
}
llu func(llu a,llu b){
	if(sumDigit(a)==b)return 0;
	llu ans=0;
	llu temp=1;
	while(sumDigit(a)>b){
		int currDigit=((a/temp)%10);
		llu curr=((10-(currDigit))%10)*temp;
		ans+=curr;
		a+=curr;
		temp*=10;
	}
	return ans;
}
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	double a,b,c;
	cin>>a>>b>>c;
	if(c==0)cout<<"No";
	else if(a==0)cout<<"Yes";
	else if(ceil(a/c)>b) cout<<"No";
	else cout<<"Yes";
	
	return 0;
}



Measured memory_bytes: 3748
#include<stdio.h>

int main(){
    int n,q;
    int i,j;
    int count=0;
    scanf("%d",&n);
    int S[n];
    for(i=0;i<n;i++){
        scanf("%d",&S[i]);
    }
    scanf("%d",&q);
    int T[q];
    int T_checked[q];
    for(i=0;i<q;i++){
        scanf("%d",&T[i]);
        T_checked[i]=0;
    }

    for(i=0;i<n;i++){
        for(j=0;j<q;j++){
            if(S[i]==T[j] && T_checked[j]==0){
                count+=1;
                T_checked[j]=1;
                break;
            }
        }
    }
    printf("%d\n",count);
}


Measured memory_bytes: 2048
#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  getline(cin, s);
  for (int i = 0; i < s.size(); i++){
    if ('a' <= s[i] && s[i] <= 'z') s[i] -= 32;
    else if ('A' <= s[i] && s[i] <= 'Z') s[i] += 32;
  }
  cout << s << endl;
}


Measured memory_bytes: 3164
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MAXZ = 1e5;
const ll INF = ll(1e18)+5;

//https://atcoder.jp/contests/abc095/tasks/arc096_a
int main() {
    ll A,B,C,X,Y;
    cin >> A >> B >>C>>X >>Y;
    ll ans = INF;
    for(int z=0;z <=MAXZ;z++){
        ll x = max(0ll,X-z);
        ll y = max(0ll,Y-z);
        ans = min(ans,x*A+ y*B+z*C*2);
    }
    cout << ans << endl;

    return 0;
}

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

int main() {
  int k, n, a1, b, m = 0;
  cin >> k >> n;
  for(int i = 0;i < n;i++) {
    if(i == 0) {
      cin >> a1;
      b = a1;
    } else {
      int a;
      cin >> a;
      if(a - b > m) m = a - b;
      b = a;
      if(i == n - 1 && a1 + k - a > m) m = a1 + k - a;
    }
  }
  cout << k - m << endl;
}

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

using namespace std;
using LL = long long;

constexpr int N = 1e5 + 5;

LL p5(LL v) {
	return v * v * v * v * v;
}

LL r5(LL v) {
	for (LL i = 0; ; i++) {
		LL x = p5(i);
		if (x == v) return i;

		x = p5(-i);
		if (x == v) return -i;
		if (llabs(x) > llabs(v)) return 0;
	}
}

int main() {
	ios::sync_with_stdio(false); cin.tie(nullptr);
	
	LL x;
	cin >> x;


	for (LL i = 0; ; i++) {
		LL B = p5(i);
		LL A = p5(r5(x + B));

		if (A - B == x) {
			cout << r5(x + B) << ' ' << i << endl;
			return 0;
		}

		B = p5(-i);
		A = p5(r5(x + B));

		if (A - B == x) {
			cout << r5(x + B) << ' ' << -i << endl;
			return 0;
		}
	}
}

Measured memory_bytes: 3652
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <math.h>
#include <climits>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <map> 
#include <set>
#include <string>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
const ll MD = 1000000007;

/* sample input

*/

int main()
{
	ll n, m, k;
	cin >> n >> m >> k;
	bool flug;

	if (k > n*m) {
		flug = false;
	}
	else {
		flug = false;
		for (ll i = 0; i <= n; i++) {
			for (ll j = 0; j < m; j++) {
				ll val = (n - i)*j + (m - j)*i;
				if (k == val) {
					flug = true;
					break;
				}
			}
			if (flug) {
				break;
			}
		}
	}

	if (flug) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}
	return 0;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>


int main() {
	char b[12];
	scanf("%s", b);
	int max = 0;
	int temp = 0;
	for (int i = 0; i < sizeof(b) / sizeof(char); i++) {
		if (b[i] == 'A' || b[i] == 'C' || b[i] == 'G' || b[i] == 'T') {
			temp++;
		}
		else {
			if (max < temp) {
				max = temp;
				temp = 0;
			}
		}
	}
	printf("%d", max);

	return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
 //Compiler version g++ 6.3.0
 struct umaaji {
 	long long int y;
 	long long int z;
 	long long int zz;
 };
 int main()
 {
 	int n;
 	cin >> n;
 	vector <umaaji> x;
 	for (int i = 0; i < n; i++){
 		long long int a,b;
 		cin >> a>>b;
 		umaaji c={a+b,a,b};
 		x.push_back(c);
 	}
 	sort(x.begin(), x.end(),[](const umaaji& p, const umaaji& q)
 		{return p.y < q.y;});
 	long long int ans=0,ann=0;
 	if(n%2==1){
 		for (int i = 0; i < n/2; i++){
 			ans=ans+x.at(i*2).z;		
 			ann=ann+x.at(i*2+1).zz;
 		}
 		ans=ans+x.at(n-1).z;
 	}else{
 		for (int i = 0; i < n/2; i++){
 			ann=ann+x.at(i*2).zz;
 			ans=ans+x.at(i*2+1).z;
 		}
 	}
 	cout << ans-ann << endl;
 }

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

int main() {
    int n, m, rr;
    cin >> n >> m >> rr;
    vector<int> r(rr);
    for (auto& e : r) cin >> e, e--;
    sort(begin(r), end(r));
    vector<vector<int>> ab(n, vector<int>(n, 1e9));
    for (int i = 0; i < n; i++) ab[i][i] = 0;
    for (int i = 0; i < m; i++) {
        int a, b, c;
        cin >> a >> b >> c, a--, b--;
        ab[a][b] = ab[b][a] = c;
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            for (int k = 0; k < n; k++) {
                ab[j][k] = min(ab[j][k], ab[j][i] + ab[i][k]);
            }
        }
    }

    int ans = 1e9;
    do {
        int tmp = 0;
        for (int i = 0; i + 1 < rr; i++) {
            tmp += ab[r[i]][r[i+1]];
        }
        ans = min(ans, tmp);
    } while (next_permutation(begin(r), end(r)));

    cout << ans << endl;
}


Measured memory_bytes: 384
// {{{ include
#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
// }}}

//{{{ graph.hpp
#ifndef INCLUDE_GRAPH_HPP
#define INCLUDE_GRAPH_HPP
#include <vector>
#include <climits>
namespace orliv {
namespace graph {
struct Edge {
  typedef long long weight_type;
  static constexpr weight_type INF =
      std::numeric_limits<weight_type>::max() - 100;

  int from, to;
  weight_type w;
  Edge(int from, int to, weight_type w = 1) : from(from), to(to), w(w) {}
  bool operator<(const Edge& rhs) const {
    if (w != rhs.w) return w > rhs.w;
    if (from != rhs.from) return from < rhs.from;
    return to < rhs.to;
  }
};

typedef Edge::weight_type Weight;
typedef std::vector<Edge> Edges;
typedef std::vector<Weight> Weights;
typedef std::vector<int> Path;
}
typedef std::vector<graph::Edges> Graph;
}
#endif
//}}}
//{{{ dijkstra.cc
#ifndef INCLUDE_GRAPH_HPP
#include "graph.hpp"
#endif
#include <queue>

namespace orliv {
namespace graph {
namespace dijkstra_util {
Path buildPath(int t, std::vector<int>& prev) {
  Path path;
  for (int u = t; u >= 0; u = prev[u]) path.emplace_back(u);
  std::reverse(path.begin(), path.end());
  return std::move(path);
}
}

Weights dijkstra(const Graph& g, int s, std::vector<int>& prev) {
  const int V = g.size();
  auto inf = Edge::INF;
  Weights dist(V, inf);
  prev.assign(V, -1);

  dist[s] = 0;
  std::priority_queue<Edge> pq;
  for (pq.emplace(-2, s, 0); !pq.empty();) {
    auto e = pq.top();
    pq.pop();
    if (prev[e.to] != -1) continue;
    prev[e.to] = e.from;
    for (const auto& f : g[e.to]) {
      if (dist[f.to] <= e.w + f.w) continue;
      pq.emplace(f.from, f.to, dist[f.to] = e.w + f.w);
    }
  }
  return std::move(dist);
}

Weights dijkstra(const Graph& g, int s) {
  std::vector<int> prev;
  return std::move(dijkstra(g, s, prev));
}

std::pair<Weight, Path> dijkstra(const Graph& g, int s, int t) {
  std::vector<int> prev;
  auto ws = dijkstra(g, s, prev);
  auto path = dijkstra_util::buildPath(t, prev);
  return std::move(std::make_pair(ws[t], std::move(path)));
}
}
}
//}}}

using namespace std;

typedef long long ll;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}

int main() {
  int V = in(), E = in(), r = in();
  orliv::Graph g(V);
  for (int i = 0; i < E; i++) {
    int s = in(), t = in(), d = in();
    g[s].emplace_back(s, t, d);
  }
  auto ws = orliv::graph::dijkstra(g, r);
  for (auto w : ws) {
    if (w == orliv::graph::Edge::INF) {
      cout << "INF" << endl;
    } else {
      cout << w << endl;
    }
  }

  return 0;
}

Measured memory_bytes: 18008