akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool Finish_read;
template<class T>inline void read(T &x){Finish_read=0;x=0;int f=1;char ch=getchar();while(!isdigit(ch)){if(ch=='-')f=-1;if(ch==EOF)return;ch=getchar();}while(isdigit(ch))x=x*10+ch-'0',ch=getchar();x*=f;Finish_read=1;}
template<class T>inline void print(T x){if(x/10!=0)print(x/10);putchar(x%10+'0');}
template<class T>inline void writeln(T x){if(x<0)putchar('-');x=abs(x);print(x);putchar('\n');}
template<class T>inline void write(T x){if(x<0)putchar('-');x=abs(x);print(x);}
/*================Header Template==============*/
#define PAUSE printf("Press Enter key to continue..."); fgetc(stdin);
const int N=1e5+500;
typedef pair<int,int>P;
#define fi first
#define se second
#define mk make_pair
int n,res;
int a[N],b[N],c[N],d[N],vis[N],cnt[N];
int Xor=0;
std::map<int,int>Mp;
typedef std::map<int,int>::iterator Mpit;
std::vector<P>G[N];
/*==================Define Area================*/
void Bo() {
	freopen("duliu.in","r",stdin);
	freopen("duliu.out","w",stdout);
}

void Dfs(int o) {
	for(int i=0;i<(int)G[o].size();i++) {
		int to=G[o][i].fi;
		if(G[o][i].se) continue ;
		// printf("%d->%d\n",o,to);
		G[o][i].se=1;
		vis[to]++;
		res++;
		Dfs(to);
	}
}

int main() {
	// Bo();
	read(n);
	for(int i=1;i<=n;i++) {
		read(a[i]);c[i]=a[i];Xor^=a[i];
	}
	c[n+1]=Xor;
	sort(c+1,c+2+n);
	for(int i=1;i<=n;i++) {
		read(b[i]);d[i]=b[i];
	}
	sort(d+1,d+1+n);
	int now=1;
	for(int i=1;i<=n+1;i++) {
		if(now<=n&&d[now]==c[i]) now++;
	}
	if(now!=n+1) return puts("-1"),0;
	for(int i=1;i<=n;i++) {
		Mp[a[i]]=1;Mp[b[i]]=1;
	}
	Mp[Xor]=1;
	int tot=0;
	for(Mpit it=Mp.begin();it!=Mp.end();++it) it->se=++tot;
	for(int i=1;i<=n;i++) {
		a[i]=Mp[a[i]];b[i]=Mp[b[i]];
		if(a[i]==b[i]) continue ;
		cnt[a[i]]++;
		G[b[i]].push_back(mk(a[i],0));
	}
	Xor=Mp[Xor];
	// for(int i=1;i<=n;i++) {
	// 	printf("%d ",a[i]);
	// }
	// puts("");
	// for(int i=1;i<=n;i++) {
	// 	printf("%d ",b[i]);
	// }
	// puts("");
	// printf("%d\n",Xor);
	Dfs(Xor);
	// puts("Complete");
	// for(int i=1;i<=n;i++) {
	// 	printf("%d %d\n",vis[i],cnt[i]);
	// }
	// printf("%d\n",res);
	for(int i=1;i<=n;i++) {
		if(vis[i]!=cnt[i]) {
			// printf("Dfs:%d\n",i);
			Dfs(i);
			res++;
		}
	}
	printf("%d\n",res);
	return 0;
}


Measured memory_bytes: 17408
#include<iostream>
using namespace std;
int main(){
  int x;
  cin>>x;
  if(400<=x && 599>=x)
    cout<<'8';
  else if(600<=x && 799>=x)
    cout<<'7';
  else if(800<=x && 999>=x)
    cout<<'6';
  else if(1000<=x && 1199>=x)
    cout<<'5';
  else if(1200<=x && 1399>=x)
    cout<<'4';
  else if(1400<=x && 1599>=x)
    cout<<'3';
  else if(1600<=x && 1799>=x)
    cout<<'2';
  else cout<<'1';
}

Measured memory_bytes: 3556
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fi(i,a,b) for(ll i=a-1;i>=b;i--)
#define endl '\n'
#define spc " "
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi 3.14159265358979323

void Fast_IO() {
   ios::sync_with_stdio(0);
   cin.tie(0);
   #ifndef ONLINE_JUDGE
   freopen("in.txt","r",stdin);
   freopen("output.txt","w",stdout);
   #endif
} 

vector<vector<ll> >vii;
int main(){
   //Fast_IO();
   double a,b,h,m;
   cin>>a>>b>>h>>m;
   double x = (h*60+m)/2;  
   double y = 6*m;   
   double angle = abs(x - y);  
   angle = min(360 - angle, angle); 
   //cout<<angle<<spc;
   double k = pi/180;
   if(angle==180){
      double ans = a+b;
      cout<<fixed<<setprecision(18)<<ans;
   }
   else if(angle==0){
      double ans = abs(a-b);
      cout<<fixed<<setprecision(18)<<ans;
   }
   else{
      angle = angle*k;
      double p = cos(angle);
      //cout<<p<<spc;
      if(p<-1) p=0;
      double ans=0.000000000000000001;
      ans+=pow(a,2)+pow(b,2)- 2*a*b*p;
      ans = sqrt(ans);

      cout<<fixed<<setprecision(18)<<ans;
   }
   
}


Measured memory_bytes: 4292
#include <iostream>
#include <vector>

using namespace std;
typedef long long ll;

int main()
{
    int m, k;
    cin >> m >> k;
    
    if (m == 1) {
        if (k == 0) {
            cout << "0 0 1 1" << endl;
            return 0;
        }
        else {
            cout << "-1" << endl;
            return 0;
        }
    }

    ll p2M = 1 << m;

    if ( k >= p2M) {
        cout << "-1" << endl;
        return 0;
    }

    else {
        cout << k;
        for (ll i = 0; i < k; i++) {
            cout << " " << i; 
        }
        for (ll i = k + 1; i < p2M; i++) {
            cout << " " << i;
        }
        cout << " " << k;
        for (ll i = p2M - 1; i > k; i--) {
            cout << " " << i;
        }
        for (ll i = k-1; i >= 0; i--) {
            cout << " " << i;
        }
        cout << endl;
    }

    return 0;
}

Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define pa(x,n) for(ll i=0;i<n;i++){cout<<(x[i])<<" \n"[i==n-1];};
#define pb push_back
#define fi first
#define be begin()
#define en end()
#define se second

using ll = long long;
using namespace std;
using pint = pair<int,int>;
using pll = pair<ll,ll>;
const int INFint = 1e9;
const ll INFll = 1e18;
ll MOD=1e9+7;

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; } //最大公倍数

// aのn乗をMODで割りながら計算する
ll modpow(ll a, ll n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % MOD;
    a = a * a % MOD;
    n >>= 1; // right shift
  }
  return res;
}

// MODを法としたaの逆元を計算する
ll modinv(ll a) {
  return modpow(a, MOD - 2);
}

int main(){
  string s;
  cin>>s;
  if ((s[0] == s[1] && s[1] == s[2]) || (s[1] == s[2] && s[2] == s[3])){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}



Measured memory_bytes: 256
#include<iostream>
#include<cstdlib>
#include<utility>
#include<tuple>
#include<string>
#include<vector>
#include<numeric>
#include<algorithm>
#include<queue>
#include<cmath>
#include<map>
using namespace std;
using ll = long long;

int main() {
	
	int n;

	cin >> n;

	vector<int> p(n);
	vector<int> q(n);
	vector<int> x(n);
	int i, j;

	for (i = 0; i < n; i++) cin >> p[i];
	for (i = 0; i < n; i++) cin >> q[i];
	for (i = 0; i < n; i++) x[i] = i + 1;
	
	int pa, qa, count = 0;

	do {
		if (p == x) pa = count;
		if (q == x) qa = count;
		count++;
	} while (next_permutation(x.begin(), x.end()));

	cout << abs(pa - qa) << endl;

	return 0;
}

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

int main(){

	int a, b, c;
	int count = 0;

	cin >> a >> b >> c;

	for (int i = a; i <= b; ++i) {
		if (c % i == 0) {
			++count;
		}
	}
	cout << count << endl;

	return 0;
}

Measured memory_bytes: 1160
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    h=II()
    s=h.bit_length()
    print(pow(2,s)-1)

main()

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

const ll MX = 1e18;
const long double PI = acos(-1);

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

    int count = 0;
    for(int i=0; i < n; i+=2)
    {
        if(a[i] % 2)
            ++count;
    }
    pri(count);
    return 0;
}


Measured memory_bytes: 3584
/*{{{*/
#include <bits/stdc++.h>
#ifdef _GLIBCXX_DEBUG
int c_;
#define cout (c_?cerr:cout)
#define dbg(...) {if (!c_)cerr<<"\033[96;1m";++c_;\
__VA_ARGS__;--c_;if(!c_)cerr<<"\033[0m";}
#else
#define dbg(...)
#endif
#define st first
#define nd second
#define dump(...) dbg(print(#__VA_ARGS__,'=',__VA_ARGS__))
#define all(...) begin(__VA_ARGS__), end(__VA_ARGS__)
#define range_dump(...) dbg(cerr<<#__VA_ARGS__<<':';range_print(__VA_ARGS__));
using namespace std; using ll = long long;
template< typename t > using V = vector< t >;
template< typename t > void print(const t& a){cout<<a<<'\n';}
template< typename t, typename... v > void print(const t& a, v&&... b)
{cout<<a<<' ';print(b...);}
template< typename t > void range_print(t a, const t& b)
{while (a!=b)cout<<(*a++)<<' ';cout << '\n';}
/*}}}*/



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

    int n, m;cin >> n >> m;
    V< pair< int, int > > ilo;

    for (int i = 0; i < n; ++i)
    {
        string s; cin >> s;
        for (int k = 0; k < m; ++k)
            if (s[k] == '#')
                ilo.push_back({i, k});
    }

    for (auto& p : ilo)
        for (auto& q : ilo)
            if (not ((p.st <= q.st and p.nd <= q.nd) or
                (q.st <= p.st and q.nd <= p.nd)))
                return print("Impossible"), 0;

    print("Possible");
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main()
{
    int n,a=0;
    cin>> n;
    if(n>=105)a++;
    if(n>=135)a++;
    if(n>=165)a++;
    if(n>=189)a++;
    if(n>=195)a++;
    //for(int i=1;i<=n;i+=2){
    //int d=0;
    //for(int j=1;j<=i;j+=2)
    //if(i%j==0)d++;
    // if(d==8)a++;
    //}
    cout<<a;
    return 0;
}

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

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

  int H, W;
  cin >> H >> W;
  vector<vector<char>> s(H+2, vector<char>(W+2, '.'));
  for(int i = 1; i <= H; i++) {
    for(int j = 1; j <= W; j++) {
      cin >> s[i][j];
    }
  }

  int cnt = 0;
  for(int i = 1; i <= H; i++) {
    for(int j = 1; j <= W; j++) {
      if(s[i][j]     == '#' &&    // own color
         s[i][j - 1] != '#' &&    // left color
         s[i - 1][j] != '#' &&    // up color
         s[i][j + 1] != '#' &&    // right color
         s[i + 1][j] != '#') {    // down color
           cnt++;
      }
    }
  }

  if(cnt == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }

  return 0;
}


Measured memory_bytes: 3648
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
#define fst first
#define snd second

/* clang-format off */
template <class T, size_t D> struct _vec { using type = vector<typename _vec<T, D - 1>::type>; };
template <class T> struct _vec<T, 0> { using type = T; };
template <class T, size_t D> using vec = typename _vec<T, D>::type;
template <class T> vector<T> make_v(size_t size, const T& init) { return vector<T>(size, init); }
template <class... Ts> auto make_v(size_t size, Ts... rest) { return vector<decltype(make_v(rest...))>(size, make_v(rest...)); }
/* clang-format on */

int main() {
  int N;
  while (cin >> N) {
    vector<int> p(N);
    for (int i = 0; i < N; i++) cin >> p[i];
    int sum = accumulate(p.begin(), p.end(), 0);
    int mx = *max_element(p.begin(), p.end());
    int res = (sum - mx) + mx / 2;
    cout << res << endl;
  }
  return 0;
}


Measured memory_bytes: 256
/*
Miles Morales : When will I know I'm ready?
Peter B. Parker : You won't. It's a leap of faith. That's all it is, Miles. A leap of faith.
*/
//KEEP IT SIMPLE STUPID

#include <bits/stdc++.h>

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

#define ll long long
#define MP make_pair
#define ERR cout << "================================================\n"
#define fi first
#define se second
#define PB push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i)
#define ford(i, n) for (ll i = (ll)(n)-1; i >= 0; --i)
#define fore(i, a, b) for (ll i = (ll)(a); i <= (ll)(b); ++i)
#define print(v)          \
    for (auto x : v)      \
    {                     \
        cout << x << " "; \
    }
#define MAX(v) *max_element(all(v))
#define MIN(v) *min_element(all(v))
#define SP << " " <<
#define W(t)  \
    ll t;     \
    cin >> t; \
    while (t--)
#define FIO                           \
    freopen("input.txt", "r", stdin); \
    freopen("output.txt", "w", stdout);
#define FAST                 \
    ios::sync_with_stdio(0); \
    cin.tie(0);              \
    cout.tie(0);

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

const ll INF = 1e18;
const ll NEG_INF = -1 * (1e18);
using namespace std;

void usaco(string prob)
{
    freopen((prob + ".in").c_str(), "r", stdin);
    freopen((prob + ".out").c_str(), "w", stdout);
}

/* Function to check primality in O(sqrt(n)) */
bool prime(int n)
{
    if (n < 2)
        return false;
    for (int x = 2; x * x <= n; x++)
    {
        if (n % x == 0)
            return false;
    }
    return true;
}

/* Function to get prime factorization of n */
vector<int> getFactors(int n)
{
    vector<int> f;
    for (int x = 2; x * x <= n; x++)
    {
        while (n % x == 0)
        {
            f.push_back(x);
            n /= x;
        }
    }
    if (n > 1)
        f.push_back(n);
    return f;
}

void solve()
{
    /* Write Solution Here */
    string s, t;
    cin >> s;
    t = s;
    ll n = s.length();
    reverse(all(t));
    ll ans = 0;
    forn(i, s.length() / 2)
    {
        ans += s[i] != s[n - 1 - i];
    }
    cout << ans << "\n";
}

int main()
{
    //FIO
    FAST

        //usaco("cowlands");

        ll TC = 1;
    /*
	Uncomment when multiple test cases
	*/

    // cin>>TC;
    for1(tt, TC)
    {
        solve();
    }
    return 0;
}

/* stuff you should look for
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* WRITE STUFF DOWN
*/


Measured memory_bytes: 3664
#include "bits/stdc++.h"
using namespace std;

int main() {
	int sx, sy, tx, ty;
	cin >> sx >> sy >> tx >> ty;
	int x = tx - sx;
	int y = ty - sy;
	string s;
	for (int i = 0;i<x;++i) {
		s += "R";
	}
	for (int i = 0;i<y;++i) {
		s += "U";
	}
	for (int i = 0; i < x; ++i) {
		s += "L";
	}
	for (int i = 0; i < y; ++i) {
		s += "D";
	}
	s += "D";	
	for (int i = 0; i <= x; ++i) {
		s += "R";
	}
	for (int i = 0; i <= y; ++i) {
		s += "U";
	}
	s += "L";
	s += "U";
	for (int i = 0; i <= x; ++i) {
		s += "L";
	}
	for (int i = 0; i <= y; ++i) {
		s += "D";
	}
	s += "R";
	cout << s << endl;
	return 0;
}

Measured memory_bytes: 3628
import sys
input = sys.stdin.readline
n,ma,mb=map(int,input().split())
dp=[[[float("inf")]*500 for _ in range(500)] for i in range(n+1)]
dp[0][0][0]=0
for i in range(n):
    a,b,c=map(int,input().split())
    for j in range(450):
        for k in range(450):
            dp[i+1][j][k]=min(dp[i+1][j][k],dp[i][j][k])
            dp[i+1][j+a][k+b]=min(dp[i+1][j+a][k+b],dp[i][j][k]+c)
ans=float("inf")
i=1
#print(dp[-1])
while i*ma<450 and i*mb<450:
    ans=min(ans,dp[-1][ma*i][mb*i])
    i+=1
print(ans if ans!=float("inf") else -1)


Measured memory_bytes: 175752
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i=(a); i<(b); i++)
#define PPC(x) __builtin_popcount((x))
#define ALL(x) (x).begin(), (x).end()
#define pb push_back
using namespace std;

const int maxN = 1 << 20, mod = 1000000007;

long long dp[maxN], pref[maxN];

inline void add_mod(long long& a, long long b)	{   a = (a + b) % mod;  }
inline void mult_mod(long long& a, long long b)	{   a = a * b % mod;    }

long long qpow(long long a, long long b)
{
    long long res0 = 1;
    for (; b!=0; b>>=1)
    {
        if (b & 1)  mult_mod(res0, a);
        mult_mod(a, a);
    }
    return res0;
}

long long sumOnInt(int a, int b)
{
	long long res = pref[b];
	if (a > 0)
		res = (res - pref[a-1] + mod) % mod;
	return res;
}

int main()
{
	int n, h, d;
	scanf ("%d%d%d", &n, &h, &d);
	long long fact = 1, w = 0;
	FOR(i, 1, n+1)
		mult_mod(fact, i), add_mod(w, fact);
		
	dp[0] = pref[0] = 1;
	FOR(i, 1, h+1)
	{
		dp[i] = sumOnInt(i-d, i-1) * w % mod;
		pref[i] = (pref[i-1] + dp[i]) % mod;
	}
	
	long long res = dp[h] * qpow(w, mod-2) % mod;
	mult_mod(res, fact);
	
	printf("%lld\n", res);	
	return 0;
}


Measured memory_bytes: 16640
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int main()
{
    ll N,M;
    cin >> N>>M;

    ll num = N;
    int cnt=0;
    while(num<=M){
        //cout << num << endl;
        cnt++;
        num *=2;
    }

    cout << cnt << endl;

    
    return 0;
}

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

using namespace std; 

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef pair<LL, LL> PLL;
typedef vector<PLL> VPLL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_ASC;
typedef priority_queue<PII> PQ_DESC_PII;
typedef priority_queue<PII, vector<PII>, greater<PII>> PQ_ASC_PII;

#define ALL(c) (c).begin(),(c).end()
#define PB push_back
#define MP make_pair
#define SORT_ASC(c) sort(ALL(c))
//#define SORT_DESC(c) sort(ALL(c), greater<typeof(*((c).begin()))>())
#define SORT_DESC(c) sort((c).rbegin(),(c).rend())
#define REV(c) reverse((c).begin(), (c).end())
#define SIZE(a) int((a).size())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ROF(i,a,b) for(int i=(b-1);i>=(a);--i)
#define REP(i,n) FOR(i,0,n)
#define PER(i,n) ROF(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int LARGE_INT = 1e9+100;
const int INF = 2e9+100;
const LL INF_LL = (LL)INF * 300 * 300;
const int MOD = 1e9+7;

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

LL modpow(LL a, LL n) {
    LL res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

void Main()
{
    string s;cin>>s;
    if(s == "ABC"){
        cout<<"ARC"<<endl;
    }
    else{
        cout<<"ABC"<<endl;
    }
	return;
}

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

Measured memory_bytes: 3604
from collections import defaultdict
from itertools import accumulate


def main():
    n = int(input())
    prime_counter = defaultdict(int)
    acc = tuple(accumulate(range(1, 42)))  # 10^12 < 2^39

    f = 2
    while n % f == 0:
        n //= f
        prime_counter[f] += 1
    f = 3
    while f * f <= n:
        if n % f == 0:
            n //= f
            prime_counter[f] += 1
        else:
            f += 2
    if n != 1:
        prime_counter[n] += 1

    ans = 0
    for c in prime_counter.values():
        for accum_index, x in enumerate(acc):
            if c < x:
                break
        ans += accum_index
    print(ans)


if __name__ == '__main__':
    main()


Measured memory_bytes: 9484
import java.io.FileNotFoundException;
import java.util.Scanner;

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

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    }
}


Measured memory_bytes: 23636
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cassert>
#include<cmath>
using namespace std;
#define fi first
#define se second
#define rep(i,s,t) for(int i=(s),_t=(t);i<_t;++i)
#define per(i,s,t) for(int i=(t)-1,_s=(s);i>=_s;--i)
#define debug(x) cerr<<#x<<" == "<<(x)<<endl
#define bug(x) cerr<<#x<<" == "<<(x)<<" "
typedef long long ll;
typedef unsigned long long ull;
typedef long double db;
typedef pair<int,int> pii;
template<class T>inline void rd(T &x){
	x=0;char c;int f=1;
	while(c=getchar(),c<48)if(c=='-')f=-1;
	do x=x*10+(c&15);
	while(c=getchar(),c>47);
	x*=f;
}
template<class T>void pf(T x){
	if(x<0)putchar('-'),x=-x;
	else if(!x){
		putchar('0');
		return ;
	}
	static int stk[100],tp;
	for(tp=0;x;x/=10)stk[tp++]=x%10;
	while(tp)putchar(stk[--tp]^48);
}
template<class T>void ptn(T x){
	pf(x),putchar('\n');
}
template<class T>void ptk(T x){
	pf(x),putchar(' ');
}
template<class T>void Min(T &A,T B){
	if(A>B)A=B;
}
template<class T>void Max(T &A,T B){
	if(A<B)A=B;
}

const int N=(int)1e5+5,mod=(int)1e9+7;
int Pow(int x,int y){
	int res=1;
	for(;y;y>>=1,x=(ll)x*x%mod)
		if(y&1)res=(ll)res*x%mod;
	return res;
}
int n,a[N],F[N],FL[N];
int C(int n,int m){
	if(n<m)return 0;
	return (ll)F[n]*FL[m]%mod*FL[n-m]%mod;
}
int main(){
	rd(n);
	F[0]=FL[0]=1;
	int f=0,s=0;
	rep(i,1,n+2){
		F[i]=F[i-1]*(ll)i%mod;
		FL[i]=Pow(F[i],mod-2);
		int x;
		rd(x);
		if(a[x])f=a[x],s=i;
		a[x]=i;
	}
	rep(k,1,n+2){
		ptn((C(n+1,k)-C(n+1-(s-f+1),k-1)+mod)%mod);
	}
	return 0;
}

Measured memory_bytes: 2432
#include <bits/stdc++.h>
using namespace std;
template<class t> inline t read(t &x){
	x=0;char c=getchar();bool f=0;
	while(!isdigit(c)) f|=c=='-',c=getchar();
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	if(f) x=-x;return  x;
}
template<class t> inline void write(t x){
	if(x<0){putchar('-'),write(-x);}
	else{if(x>9)write(x/10);putchar('0'+x%10);}
}

#include <tr1/unordered_map>
#define int long long

const int N=2e5+5;
int n,k,a[N],s[N],ans;
tr1::unordered_map<int,queue<int> > mp;

signed main(){
	read(n);read(k);
	for(int i=1;i<=n;i++){
		read(a[i]);
		s[i]=s[i-1]+a[i];
	}
	// mp[0].push(1);
	for(int i=1;i<=n;i++){
		int now=s[i]-i;
		now=(now%k+k)%k;
		while(!mp[now].empty()&&i-mp[now].front()>=k) mp[now].pop();
		// printf("$%d %d\n",now,mp[now].size());
		ans+=mp[now].size();
		if(s[i]%k==i) ans++;
		mp[now].push(i);
	}
	write(ans);
}


Measured memory_bytes: 145992
// itne me hi thakk gaye?
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize ("-O3")
#define ll long long 
#define ull unsigned long long
using ld = long double;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const ll rk = 256;
const ll mod2 = 998244353;
const ld PI = 3.141592653589793;
#define pb push_back
#define mp make_pair
#define vc vector
#define fs first
#define sec second
#define pq priority_queue
#define lb lower_bound
#define ub upper_bound
#define pll pair<ll,ll> 
#define pls pair<ll,string>
#define psl pair<string,ll>
#define plc pair<ll,char>
#define pcl pair<char,ll>
#define pss pair<string,string>
#define all(x) (x).begin(), (x).end()
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower);
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper);
#define print(a) for(auto j:a) {cout<<j<<",";} cout << "\n";
#define endl '\n'
#define whatis(x) cout << "> "<<#x << " ==> " << x << endl;
#define lwi(x) cout << " your " << #x << " is ---> " << x << " ";
#define FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
 
// // Printing pair
ostream & operator << (ostream & os, pair <ll, ll> const& x) {
    os << x.first << "," << x.second;
    return os;
}
 
// printing vector
template <class T>
ostream & operator << (ostream & os, vector <T> const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ";
    return os << "}";
}
 
// printing set
template <class T>
ostream & operator << (ostream & os, set <T> const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ";
    return os << "}";
}
 
template <class Ch, class Tr, class Container>
basic_ostream <Ch, Tr> & operator << (basic_ostream <Ch, Tr> & os, Container const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ";
    return os << "}";
}
 
template <class X, class Y>
ostream & operator << (ostream & os, pair <X, Y> const& p) {
    return os << "[ " << p.first << ", " << p.second << "]" ;
}
const int mxn = 1e6+5;
int32_t main(){
    FastIO;
    ll n, d;
    cin >> n >> d;
    int ans = 0;
    for(int i=0; i<n; i++) {
        ll a, b;
        cin >> a >> b;
        if (a*a + b*b <= d*d) ans++;
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3612
#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
typedef long long int ll;
#define BIG_NUM 2000000000
#define MOD 1000000007
using namespace std;

int main(){

	int N,W,ans = 0,sum = 0;
	scanf("%d %d",&N,&W);

	int** dp = new int*[N+1];
	int* friends = new int[N+1];
	for(int i = 0; i <= N; i++){
		dp[i] = new int[W+1];
	}

	friends[0] = 0;
	for(int i = 1; i <= N; i++){
		scanf("%d",&friends[i]);
		sum += friends[i];
	}

	sort(friends,friends+(N+1));

	if(sum <= W || W < friends[1]){
		printf("1\n");
		return 0;
	}

	sum = 0;
	for(int i = 1; i <= N; i++){
		sum += friends[i-1];
		if(sum > W)break;

		if(i == N){
			ans = (ans + 1)%MOD;
			break;
		}

		for(int a = 0; a <= N; a++){
			for(int b = 0; b <= W; b++)dp[a][b] = 0;
		}

		for(int a = 0;a <= N; a++)dp[a][0] = 1;

		for(int a = i+1; a <= N; a++){
			for(int b = 1; b <= W-sum; b++){
				if(b < friends[a])dp[a][b] = dp[a-1][b]%MOD;
				else{
					dp[a][b] = (dp[a-1][b] + dp[a-1][b-friends[a]])%MOD;
				}
			}
		}

		for(int a = 0; a <= W-sum; a++){
			if(W-sum-a < friends[i]){
				ans = (ans + dp[N][a])%MOD;
			}
		}
	}

	printf("%d\n",ans%MOD);

	return 0;
}

Measured memory_bytes: 10500
#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() {
    ll s, w;
    cin >> s >> w;
    if (w >= s)
        cout << "unsafe" << endl;
    else
        cout << "safe" << endl;

    return 0;
}


Measured memory_bytes: 3632
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]
a.append(-1)
idx = 0
mod = 10**9+7
dp = [0]*(n+1)

dp[0] = 1
if a[idx] == 1: idx += 1
else: dp[1] = 1

for i in range(2,n+1):
    if i == a[idx]:
        dp[i] = 0
        idx += 1
    else:
        dp[i] = (dp[i-1] + dp[i-2])%mod
        
print(dp[n])

Measured memory_bytes: 7848
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
using namespace std;

#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}
#define pq_pair_tB priority_queue <pair<ll,ll>, vector<pair<ll,ll> > , greater<pair<ll,ll> > > 
#define pq_pair_ts priority_queue <pair<ll,ll> > //第二成分の大きさが関係ない
template<typename X> bool exist(vector<X> vec, X item){return find(all(vec), item)!=vec.end();}
ll gcd(ll a, ll b){if(b==0)return a;return gcd(b,a%b);}
ll lcm(ll a, ll b){return a/gcd(a,b)*b;}


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    ll N ;
    cin >> N ;
    
    
    ll ans = 0;
    ll mi = 10000000000;
    
    ll minus = 0;
    
    rep(i, N){
        ll inp;
        cin >> inp;
        if(inp < 0) minus ++;
        ans += abs(inp);
        mi = min(mi, abs(inp));
    }
    
    if(minus % 2 == 1){
        ans -= (mi * 2LL);
    }
    cout << ans << endl;
    
    //cout << fixed << setprecision(16) << ans << endl;
    return 0;
}


Measured memory_bytes: 256
#![allow(non_snake_case,unused_imports,dead_code)]
use std::cmp::max;
use std::cmp::min;
use std::str::FromStr;
use std::collections::{HashMap,HashSet,VecDeque,BinaryHeap};
use std::cmp::Ordering;

use proconio::input;
use proconio::marker::{Chars,Usize1,Isize1};

fn comp_f64(a: &f64, b: &f64) -> Ordering {
    if a < b {
        return Ordering::Less;
    } else if a > b {
        return Ordering::Greater;
    }
    Ordering::Equal
}

fn main() {
    input!{
        H:usize,
        W:usize,
        N:usize,
        A:[usize;N],
    }

    let mut ans = Vec::new();
    for (i,&a) in A.iter().enumerate(){
        for _ in 0..a{
            ans.push(i+1);
        }
    }

    for i in 0..H{
        let range = (i*W)..(i+1)*W;
        let out;
        if i%2==1{
            out = range.rev().map(|i| format!("{}",ans[i])).collect::<Vec<_>>().join(" ");
        } else {
            out = range.map(|i| format!("{}",ans[i])).collect::<Vec<_>>().join(" ");
        }
        println!("{}",out);
    }
}

Measured memory_bytes: 2228
N = int(input())
A = [[0]*10 for _ in range(10)]
ans = 0
for i in range(1,N+1):
    A[(int(str(i)[0]))][int(str(i)[-1])] += 1

for i in range(10):
    for j in range(10):
        ans += A[i][j]*A[j][i]

print(ans)

Measured memory_bytes: 40428
// vim: shiftwidth=2 expandtab foldmethod=marker

// include {{{
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <utility>
#include <cstdlib>
// }}}

// misc {{{
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
// }}}

// debug(...) {{{
static bool debug_enabled = false;
static int debug_max_elms = 10;

static int debug_max_count = 50;
static int debug_current_count = 0;

void debug1(char const * x) { cout << x; }
template<class T> void debug1(const T& x) { cout << x; }
template<class T1, class T2> void debug1(const pair<T1, T2>& x) { cout << "(" << x.first << ", " << x.second << ")"; }
template<class T> void debug1(const vector<T>& x) {
  cout << "[";
  auto i = x.begin();
  while(i != x.end()) {
    debug1(*i);
	++i;
	if(i != x.end()) cout << ", ";
    if(std::distance(x.begin(), i) > debug_max_elms) {
      cout << "...";
      break;
    }
  }
  cout << "]";
}
template<class K, class V> void debug1(const map<K, V>& x) {
  cout << "{";
  auto i = x.begin();
  while(i != x.end()) {
    debug1(get<0>(*i));
    cout << ": ";
    debug1(get<1>(*i));
    ++i;
    if(i != x.end()) cout << ", ";
  }
  cout << "}";
}

void debug2() { cout << endl; }
template<class T, class... Ts> void debug2(const T& x, const Ts&... xs) {
  cout << ' ';
  debug1(x);
  debug2(xs...);
}

template<class T, class... Ts> void debug(const T& x, const Ts&... xs) {
  if(debug_enabled) {
    ++debug_current_count;
    if(debug_current_count > debug_max_count) debug_enabled = false;
	cout << "[D] ";
	debug1(x);
	debug2(xs...);
  }
}
// }}}

// main {{{
void solve();
int main() {
  auto v = getenv("DEBUG");
  if(v && string(v) == "1") debug_enabled = true;
  if(false) debug("dummy for suppress warnings", vector<int>(0));
  solve();
}
// }}}

void solve() {
  int N;
  cin >> N;
  vector<double> V(N);
  rep(i, N) {
    cin >> V[i];
  }
  sort(V.begin(), V.end());
  rep(i, N - 1) {
    V[i + 1] = (V[i] + V[i + 1]) / 2.0;
    sort(V.begin() + i + 1, V.end());
  }
  cout << V[N - 1] << endl;
}


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

using namespace std;

int main() {
    string s;
    cin >> s;
    int total = 0;
    for (int i = 0; i < s.size(); i++) {
        total = s[i] == '+' ? total+1 : total-1;
    }
    cout << total << endl;
    return 0;
}

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

int main()
{
    int a,b,c,x; cin >> a >> b >> c >> x;
    int tmp = 0, ans = 0;
    rep(i,a+1) {
        rep(j,b+1) {
            rep(k,c+1) {
                tmp = 500*i + 100*j + 50*k;
                if(tmp == x) ans++;
            }
        }
    }
    cout << ans << endl;
}

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

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

    int res = 0;
    for (int i = 1; i < 100000; i++)
        res = max(res, v[i - 1] + v[i] + v[i + 1]);

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

Measured memory_bytes: 640
sx,sy,tx,ty=map(int,input().split())

r1=["R"]

for i in range(tx-sx-1):
    r1.append("R")

for i in range(ty-sy):
    r1.append("U")

for i in range(tx - sx):
    r1.append("L")

for i in range(ty - sy):
    r1.append("D")

r1.append("D")

for i in range(tx-sx+1):
    r1.append("R")

for i in range(ty-sy+1):
    r1.append("U")

r1.append("LU")

for i in range(tx-sx+1):
    r1.append("L")

for i in range(ty-sy+1):
    r1.append("D")

r1.append("R")

print("".join(r1))


Measured memory_bytes: 3188
N,Y=map(int,input().split())
answer=0
for n in range(0,N+1):
    for n_ in range(0,N+1-n):
        n__=N-n-n_
        if 10000*n+5000*n_+1000*n__==Y:
            answer=1
            kotae=str(n)+' '+str(n_)+' '+str(n__)
            break
if answer==0:
    print(-1,-1,-1)
else:
    print(kotae)
    

Measured memory_bytes: 66692
def main():
    n, w = [int(x) for x in input().split()]
    itens = []
    dp = [[-1]*w for i in range(n)]
    
    for _ in range(n):
        itens.append([int(x) for x in input().split()])#item([peso, valor])

    print(knapsack(n, w, itens, dp))

def knapsack(n, w, itens, dp):

    if n == 0 or w == 0:
        return 0

    if dp[n-1][w-1] != -1:
        return dp[n-1][w-1]

    if itens[n-1][0] > w:
        dp[n-1][w-1] = knapsack(n-1, w, itens, dp)
        return dp[n-1][w-1]

    else:
        dp[n-1][w-1] = max(itens[n-1][1] + knapsack(n-1, w - itens[n-1][0], itens, dp),
                           knapsack(n-1, w, itens, dp))

        return dp[n-1][w-1]

main()

Measured memory_bytes: 178940
#include <bits/stdc++.h>
using namespace std;
#define MAXN 200002
#define LL long long

struct Node {
    LL a, b;
    Node () {}
    Node (LL x, LL y) { a = x, b = y; }
} s[MAXN];

int n, ans = 0, B[MAXN];
LL t, dp[33] = {0};
int cnt = 0, pf = 0;

bool cmp (Node x, Node y) {
    return x.a * (y.b + 1) > y.a * (x.b + 1);
}

int main () {
    cin >> n >> t;
    for (int i = 0; i < 33; i ++) dp[i] = 2e9; 
    for (int i = 1; i <= n; i ++) {
        int a, b; cin >> a >> b;
        if (a == 0) B[++ cnt] = b;
        else s[++ pf] = Node (a, b);
    }
    sort (B + 1, B + cnt + 1);
    sort (s + 1, s + pf + 1, cmp);

    int k = (int) (log2 (t));

    dp[0] = 0, dp[1] = 1 + s[1].a + s[1].b;

    for (int i = 2; i <= pf; i ++) 
        for (int j = min (k, i); j >= 1; j --)
            dp[j] = min (dp[j], dp[j - 1] + 1 + s[i].a * (dp[j - 1] + 1) + s[i].b);
    
    LL sum[cnt + 1] = {0}; sum[1] = B[1];
    for (int i = 2; i <= cnt; i ++) sum[i] = sum[i - 1] + 1 + 1LL * B[i];

    int i = 0;
    while (i <= min (k, pf)) {
        if (dp[i] > t) break;
        int j = cnt;
        LL rem = t - dp[i] - 1;
        while (j >= 1) {
            if (rem - sum[j] >= 0) break;
            j --;
        }
        ans = max (ans, i + j);
        i ++;
    }

    cout << ans;

    return 0;
}

Measured memory_bytes: 3328
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
const int maxn = 100000;
int n,k;
ll a[maxn];
int check(ll p){
	int j = 0;
	for(int i=0;i<k;i++){
		ll s = 0;
		while(s+a[j]<=p){
			s += a[j++];
			if(j==n) return n;
		}
	}
	return j;
}

int main() {
	cin>>n>>k;
	for(int i=0;i<n;i++)
		scanf("%d",&a[i]);
	ll l = 0;
	ll r = maxn * 10000;
	ll m = 0;
	while(r-l>1){
		m = l + (r-l)/2;
		int v = check(m);
		if(v==n) r = m;
		else l = m;
	}
	cout<<r<<endl;
	return 0;
}


Measured memory_bytes: 4012
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long int lli;
const lli mod = 1e9+7;

int main(){
    string t,p;
    cin >> t >> p;
    t = "." + t + ".";
    vector<int> a,b;
    int n=t.length(), m=p.length();
    for(int i=0,j=0; i<m; i++){
        while(j<n and p[i]!=t[j]) j++;
        if(p[i] == t[j]){
            a.push_back(j);
            j++;
        }
    }
    if((int)a.size() < m){
        cout << "no" << endl;
        return 0;
    }

    for(int i=m-1,j=n-1; i>=0; i--){
        while(j>=0 and p[i]!=t[j]) j--;
        if(p[i] == t[j]){
            b.push_back(j);
            j--;
        }
    }
    reverse(b.begin(), b.end());

    if(a == b){
        cout << "yes" << endl;
    }else{
        cout << "no" << endl;
    }
    return 0;
}


Measured memory_bytes: 8916
N = int(input())

AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    s = input()
    if s == 'AC':
        AC += 1
    if s == 'WA':
        WA += 1
    if s == 'TLE':
        TLE += 1
    if s == 'RE':
        RE += 1

print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))

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

vector<long long> Divisor(long long N) {
    vector<long long> ret;
    for (long long i = 1; i * i <= N; i++) {
        if (N%i == 0) {
            if (i*i == N) {
                ret.push_back(i);   
            } else {
                ret.push_back(i);
                ret.push_back(N/i);
            }
        }
    }
    return ret;
}

int main(void){
    long long N;
    cin >> N;
    auto divs_N = Divisor(N);
    long long ans = 0;
    for (int i = 0; i < divs_N.size(); i++) {
        long long n = N;
        long long divisor = divs_N[i];
        if (divisor == 1) continue;
        while (n%divisor == 0) {
            n /= divisor;
        }
        if (n%divisor == 1) ans++;
    }
    
    auto divs = Divisor(N-1);
    ans += divs.size() - 1;
    cout << ans << endl;
}


Measured memory_bytes: 384
#include <cstdio>
#include <algorithm>
#include <vector>
#include <limits>
#include <numeric>
#include <type_traits>
#include <iostream>

typedef long long ll;
typedef long long int lli;

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

template<class T>bool umax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool umin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

using namespace std;

struct py{
    int p;
    int y;
    int num;
};
int main() {
    int A,B;
    cin >> A >> B;
    if(B%A == 0){
        cout << A+B << endl;
    }else{
        cout << B-A << endl;
    }
    return 0;
}



Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {
        var ab = Console.ReadLine().Split().Select(int.Parse).ToArray();
        if (ab.Sum() >= 10) Console.WriteLine("error");
        else Console.WriteLine(ab.Sum());
    }
}

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

int main(){
    int n, t;
    cin >> n >> t;
    
    int mincost = 1001;
    for (int i = 0; i < n; i++) {
        int cost, time0;
        cin >> cost >> time0;
        if (time0 <= t) {
            mincost = min(mincost,cost);
        }
    }
    
    if (mincost == 1001) {
        cout << "TLE" << endl;
        return 0;
    }
    
    cout << mincost << endl;
    return 0;
}


Measured memory_bytes: 256
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        if (str.equals("ABC")) {
            System.out.println("ARC");
        } else {
        System.out.println("ABC");
        }
    }
}


Measured memory_bytes: 35660
#include<stdio.h>
            int a,b,c;
            int main(void){
              scanf("%d%d%d",&a,&b,&c);
              if((a==b&&b!=c)||(b==c&&a!=b)||(c==a&&b!=c)){
                printf("Yes");
              }
              else{
                printf("No");
              }
                return 0;
              }

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

void main_()
{
    ll S;
    cin >> S;

    ll X2 = 1e9;
    ll Y2 = 1;
    ll Y3 = (S + X2 - 1) / X2;
    ll X3 = ((S + X2 - 1) / X2 != S / X2) ? X2 - S % X2 : 0;
    cout << 0 << " "
         << 0 << " "
         << X2 << " "
         << Y2 << " "
         << X3 << " "
         << Y3 << endl;
}
int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    main_();
    return 0;
}


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

// 型名の省略
typedef unsigned int uint;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> P;
typedef pair<lint, lint> Plint;
 
const int MOD = 1e9+7;
const int INF = 1<<18;
const lint INFLINT = 1LL<<60;
const double PI=acos(-1.0);
 
// cinとcoutの高速化
#define endl "\n"
struct cinacc{cinacc(){cin.tie(0);ios::sync_with_stdio(false);}}cinaccc;
struct coutacc{coutacc(){cout.setf(ios::fixed);cout.precision(12);}}coutaccc;
 
// 繰り返し
#define rep(i,n) for(lint i=0;i<(lint)(n);i++)
#define reps(i,n) for(lint i=0;i<=(lint)(n);i++)
#define rrep(i,n) for(lint i=(lint)(n)-1;i>0;i--)
#define rreps(i,n) for(lint i=(lint)(n)-1;i>=0;i--)

#define pb push_back

#define ALL(s) (s.begin(), s.end())
#define SZ(s) (s.size())

template<class T>bool chmax(T&a,const T&b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T&a,const T&b){if(b<a){a=b;return true;}return false;}

// Union-Find-Tree
class UnionFind {
	vector<int> par;
	UnionFind(int n):par(n){rep(i,n)par[i]=i;}
	int root(int x){if(par[x]==x)return x;return par[x]=root(par[x]);}
	void unite(int x,int y){int rx=root(x);int ry=root(y);if(rx==ry)return;par[rx]=ry;}
	bool same(int x,int y){return root(x)==root(y);}
};

// Final Weapon!
// #define int lint

int main() {
    int n, k;
    cin >> n >> k;
    
    double ans = 0, coin, coinCnt;
    for(int i = 1; i <= n; i++) {
        coin = i;
        coinCnt = 0;
        while(coin < k) {
            coin *= 2;
            coinCnt++;
        }
        ans += pow(0.5, coinCnt);
    }
    ans /= n;
    
    cout << ans;
    
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include <bits/stdc++.h>
#include<string>
#include<algorithm>
using namespace std;
typedef pair<int,int> P;


int main(){
    int N;
    cin >> N;
    long long A[200010];
    for (int i =0; i<N;i++){
        cin >> A[i];
    }
    long long mut=1;
    for(int i=0;i<N;i++){
        if(A[i]==0){
            cout << 0 << endl;
            return 0;
        }
    }
    for (int i=0; i<N;i++){
        if(log10((long double)mut)+log10((long double)A[i]) > 18.0) {
            cout << -1 << endl;
            return 0;
        }
        mut = mut*A[i];
        if(mut > 1000000000000000000){
            cout << -1 << endl;
            return 0;            
        }
    }
    cout << (long long )mut << endl;
    return 0;
}

Measured memory_bytes: 4488
#include <bits/stdc++.h>
#include <vector>
#include <cmath>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP2(i, m, n) for (int i = (m); i < (int)(n); ++i)
#define REPR(i, n) for (int i = (n)-1; i >= 0; --i)
#define REPR2(i, m, n) for (int i = (n)-1; i >= (m); --i)
#define REPx(x, a) for(auto x : a)
#define ALL(a) a.begin(), a.end()
#define SORT(a) sort(ALL(a))
#define SORTR(a) sort(ALL(a), greater<int>())
#define REVERSE(a) reverse(ALL(a))
#define bit_search(bit, n) REP(bit, 1<<(n))
#define bit_check(bit, i) (bit>>(i)) & 1
#define setpre(n) fixed << setprecision((n))
#define UNIQUE(a) do {SORT(a); (a).erase(unique(ALL(a)), (a).end());} while(0)
#define MAX(a) *max_element(ALL(a))
#define MIN(a) *min_element(ALL(a))
#define bisect_left(a, x) lower_bound(ALL(a), (x)) - a.begin()
#define bisect_right(a, x) upper_bound(ALL(a), (x)) - a.begin()
#define INPUT(a) REP(i, a.size()) cin >> a[i];
#define INPUTP(a) REP(i, a.size()) cin >> a[i].first >> a[i].second;
#define ENDL cout << endl;
using namespace std;
using LL = long long;
using LD = long double;
using PII = pair<int, int>;
using VPII = vector<PII>;
using PLL = pair<LL, LL>;
using VPLL = vector<PLL>;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VC = vector<char>;
using VS = vector<string>;
using VB = vector<bool>;
const int INF = 1e9;
const LL MOD = 1e9 + 7;

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

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  cout << max(0, a - 2*b) << endl;

  return 0;
}

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

using namespace std;

int main(){
    int n;
    cin >> n;
    vector<long long> a(n);
    for(auto& ai: a) cin >> ai;
    long long out = 1, prev_out;
    bool is_over = false;
    for(auto ai : a){
        if(ai == 0){
            out =0;
            is_over = false;
            break;
        }else if(!is_over){
            prev_out = out;
            out *= ai;
            if(log10(ai) + log10(prev_out) > 18 + log10(3) || out > (long long)1e18) is_over = true;
        }
    }

    cout << (is_over ? -1 : out) << endl;

    return 0; 
}

Measured memory_bytes: 4116
#include <bits/stdc++.h>
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define sz(v) (int)(v).size()
using namespace std;
using P = pair<int, int>;
typedef long long ll;
int main()
{
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	int a, b, c, k;
	cin >> a >> b >> c >> k;
	int ans = 0;

	if (a >= k)
	{
		cout << k << '\n';
	}
	else if (a + b >= k)
	{
		cout << a << '\n';
	}
	else
	{
		cout << a - (k-(a+b)) << '\n';
	}
	return 0;
}


Measured memory_bytes: 3652
#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <iomanip>
using namespace std;
int main(){
    double a,b,c,d,kore;
    cin>>a>>b>>c>>d;
    kore=(c-a)*(c-a)+(d-b)*(d-b);
    kore=sqrt(kore);
    cout<<setprecision(20)<<kore<<endl;
}



Measured memory_bytes: 3284
#include<bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin>>N;
    vector<pair<double,double>> vp(N);
    for(int i=0;i<N;i++){
        cin>>vp[i].first>>vp[i].second;
    }
    double ans=0;
    for(int i=0;i<N;i++){
        double gx=vp[i].first,gy=vp[i].second;
        for(int k=0;k<4;k++){
        double nx=-gy,ny=gx;
        gx=nx;
        gy=ny;
        double sx=0,sy=0;
        double px=0,qx=0;
        double py=0,qy=0;
        for(int j=0;j<N;j++){
            double dot = gx*vp[j].first+gy*vp[j].second;
            double cross=gx*vp[j].second-gy*vp[i].second;
            if(dot<0){
                continue;
            }
            if(dot>0){
                sx+=vp[j].first;
                sy+=vp[j].second;
            }else{
                if(cross>0){
                    px+=vp[j].first;
                    py+=vp[j].second;
                }else{
                    qx+=vp[j].first;
                    qy+=vp[j].second;
                }
            }
        }
         for(int t=0;t<4;t++){
            double bx=sx,by=sy;
            if(t&1) bx+=px,by+=py;
            if(t&2) bx+=qx,by+=qy;
            ans=max(ans,bx*bx+by*by);
          }
        }
    }
    ans=sqrt(ans);
    cout.precision(40);
    cout<<ans<<endl;
    
    
}

Measured memory_bytes: 256