akhauriyash/Code-Regression huggingface dataset:
#pragma target("avx")
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef unordered_map<ll, ll> U_MAP;
typedef priority_queue<ll> pq;
typedef priority_queue<ll, vector<ll>, greater<ll>> rpq;
constexpr ll INF = 1e9, MOD = 1e9 + 7, ohara = 1e6 + 10;
constexpr ll LINF = 1e18;

#define rep(i, n) for (ll(i) = 0; (i) < (int)(n); (i)++)
#define rrep(i, a, b) for (ll i = (a); i < (b); i++)
#define rrrep(i, a, b) for (ll i = (a); i >= (b); i--)
#define all(v) (v).begin(), (v).end()
#define Size(n) (n).size()
#define Cout(x) cout << (x) << endl
#define doublecout(a) cout << fixed << setprecision(15) << a << endl;
#define fi first
#define se second
#define m_p make_pair
#define p_b push_back
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)

//------ Believe yourself as a genius!!!!!! ------

int dy[] = {1, 0, -1, 0};
int dx[] = {0, 1, 0, -1};
// int dy[]={-1,0,1,-1,1,-1,0,1};int dx[]={-1,-1,-1,0,0,1,1,1};
string alph("abcdefghijklmnopqrstuvwxyz"), s;
ll n, cnt, ans, a, b, c, d, tmp, m, h, w, x, y, sum, k, q;

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

  cin >> s;
  if (s == "ABC")
    Cout("ARC");
  else
    Cout("ABC");
  return 0;
}

Measured memory_bytes: 3656
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <cmath>
#include <climits>

#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue

using namespace std;
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

int main(int argc, char const* argv[])
{
  int h, w;
  cin >> h >> w;
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      string s;
      cin >> s;
      if(s == "snuke"){
        cout << char('A' + j);
        cout << i + 1;
        cout << endl;
      }
    }
  }
	return 0;
}


Measured memory_bytes: 256
/*
    Created by Ezio112
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
ll inf(1e18);
#define mod ll(1e9+7)
//#define mod ll(998244353)
#define ff first
#define ss second
ll power(ll a,ll b)
{
	if(!b)
		return 1;
	ll dp=power(a,b/2)%mod;
	
	if(b&1) return (((dp*dp)%mod)*a)%mod;
	
	return (dp*dp)%mod;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll test=1;
    //cin>>test;
		
    while(test--)
    {
		ll a,b;
		cin>>a>>b;
		cout<<a*b;
	}
	return 0;
}


Measured memory_bytes: 3604
#include<bits/stdc++.h>
using namespace std;
int m,d;
int tot=0;
int main()
{
	cin>>m>>d;
	for(int i=10;i<=d;i++)
	{
		if((i%10)*(i/10)<=m&&(i%10)*(i/10)!=0&&i%10>=2&&i/10>=2)
		{
			tot++;
		}
	}
	cout<<tot;
	return 0;
}

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

using namespace std;

int main(){
	char a[55], b[55], c[111];
	int n, m, i, j;
	int stra, strb, Max;
	while(~scanf("%s", a)){
		getchar();
		scanf("%s", b);
		getchar();
		stra = strlen(a), strb = strlen(b);
		if(stra > strb)  b[strb] = 'A';
		if(stra < strb)  b[stra] = 'A';
		Max = max(stra, strb);
		for(i = 0, j = 0; i < Max; i++){
			c[j++] = a[i];
			c[j++] = b[i];
		}
		for(i = 0; i < j; i++)
			if(c[i] != 'A' ) cout << c[i];
		printf("\n");
	}
	return 0;
}

Measured memory_bytes: 256
n = gets.chomp.to_i
inputs = []
n.times do |i|
    s, _p = gets.chomp.split(" ")
    inputs << [s, _p.to_i, i+1]
end

inputs.sort!{|a, b| b[1] <=> a[1]}
inputs.sort!{|a, b| a[0] <=> b[0]}

inputs.each do |a, b, i|
    puts i
end

Measured memory_bytes: 1788
N = int(input())
H = list(map(int, input().split()))
 
hmax = H[-1]
 
for h in reversed(H):
  if h <= hmax:
    hmax = h
    continue
  if h-1 <= hmax:
    hmax = h-1
    continue
  print('No')
  quit()

print('Yes')

Measured memory_bytes: 14396
#include<stdio.h>
int main(void){
int n,i,x;
scanf("%d",&n);
for(i=1;i<=n;i++){
x=i;
if(x%3==0){
printf(" %d",i);
continue;
}
do{
if(x%10==3){
printf(" %d",i);
break;
}
if((x/=10)==0)
break;
}while(x!=0);
}
printf("\n");
return 0;
}

Measured memory_bytes: 600
package main

import "fmt"

func main() {
	var n, ans int
	fmt.Scan(&n)
	a := make([]int, n)
	b := make([]int, n)
	c := make([]int, n-1)
	for i := range a {
		fmt.Scan(&a[i])
	}
	for i := range b {
		fmt.Scan(&b[i])
	}
	for i := range c {
		fmt.Scan(&c[i])
	}
	old := 100
	for i := 0; i < n; i++ {
		ans += b[a[i]-1]
		if a[i]-1 == old+1 {
			ans += c[old]
		}
		old = a[i] - 1
	}
	fmt.Println(ans)
}


Measured memory_bytes: 512
#include <iostream>
#include <iomanip>
typedef long long ll;
using namespace std;
const ll INF = 1e9;
const ll MOD = 1e9 + 7;
#define repi(i, n, init) for (ll i = init; i < (n); i++)

ll modpower(ll x, ll n,ll mod)
{
    ll res = 1;
    while (n)
    {
        if (n % 2)
        {
            res = res * x % mod;
        }
        x = x * x % mod;
        n >>= 1;
    }
    return res;
}

ll com(ll n, ll x)
{
    ll res = 1;
    ll frac = 1;
    repi(i, x, 0)
    {
        res *= (n - i);
        res %= MOD;
    }
    repi(i, x + 1, 1)
    {
        frac *= modpower(i, MOD - 2,MOD);
        frac %= MOD;
    }
    return res * frac % MOD;
}

int main()
{
    ll n, a, b;
    cin >> n >> a >> b;
    ll all = modpower(2, n,MOD);
    all--;
    ll ans = all - com(n, a) - com(n, b);
    ans %= MOD;
    if(ans < 0)ans += MOD;
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
//#define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>

using i8 = ::std::int_least8_t;
using i32 = ::std::int_least32_t;
using i64 = ::std::int_least64_t;
using u8 = ::std::uint_least8_t;
using u32 = ::std::uint_least32_t;
using u64 = ::std::uint_least64_t;
using isize = ::std::ptrdiff_t;
using usize = ::std::size_t;

template <class T = usize> class rep {
	const T f, l;

public:
	class itr {
		friend rep;
		T i;
		constexpr itr(T x) noexcept : i(x) {}

	public:
		void operator++() noexcept { ++i; }
		constexpr T operator*() const noexcept { return i; }
		constexpr bool operator!=(const itr x) const noexcept { return i != x.i; }
	};
	constexpr rep(const T first, const T last) noexcept : f(first), l(last) {}
	constexpr itr begin() const noexcept { return itr(f); }
	constexpr itr end() const noexcept { return itr(l); }
};
template <class T = usize> class revrep {
	const T f, l;

public:
	class itr {
		friend revrep;
		T i;
		constexpr itr(T x) noexcept : i(x) {}

	public:
		void operator++() noexcept { --i; }
		constexpr T operator*() const noexcept { return i; }
		constexpr bool operator!=(const itr x) const noexcept { return i != x.i; }
	};
	constexpr revrep(const T first, const T last) noexcept : f(first), l(last) {}
	constexpr itr begin() const noexcept { return itr(l - 1); }
	constexpr itr end() const noexcept { return itr(f - 1); }
};
template <class T> bool amax(T &a, const T &b) {
	return a <= b ? (a = b, 1) : 0;
}
template <class T> bool amin(T &a, const T &b) {
	return b <= a ? (a = b, 1) : 0;
}
template <class T> bool asmax(T &a, const T &b) {
	return b <= a ? 0 : (a = b, 1);
}
template <class T> bool asmin(T &a, const T &b) {
	return a <= b ? 0 : (a = b, 1);
}
template <class T> using vec_alias = ::std::vector<T>;
template <class T> auto md_vec(usize n, const T &value) {
	return ::std::vector<T>(n, value);
}
template <class... Args> auto md_vec(usize n, Args... args) {
	return ::std::vector<decltype(md_vec(args...))>(n, md_vec(args...));
}
template <class T> const T &as_const(const T &v) noexcept { return v; }
template <class T> constexpr T difference(const T &a, const T &b) {
	return a <= b ? b - a : a - b;
}

#include <algorithm>
#include <iostream>
#include <utility>
#include <string>
#include <cstdio>

int main() {
	::std::vector<u32> s(3), t({ 2019,4,30 });
	scanf("%u/%u/%u", &s[0], &s[1], &s[2]);
	::std::cout << (s <= t ? "Heisei" : "TBD") << ::std::endl;
	return 0;
}


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

int main() {
    int A, B, C;
    cin >> A >> B >> C;
    for (long long i=3*A;i<10000000; i+=A){
        if (i%B==C){
            cout << "YES" << endl;
            return 0;
        }
    }
    cout << "NO" << endl;
}

Measured memory_bytes: 256
/*   ꧁༒☬महाकाल☬༒꧂ ꧁༒ঔमहाकालঔ༒꧂
                   
                   ঔৣ۝महाकालᴳᵒᵈ۝ঔৣ            
 
 */ 
#include<bits/stdc++.h>
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//template <typename T, typename cmp=less<T>> using oset =tree<T, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long 
#define mod 1000000007
#define inf 100000000000000000
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define _it iterator
#define all(_x) _x.begin(),_x.end()
#define f first
#define s second
#define pb push_back
void mahakal(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	freopen("error.txt","w",stderr);
	#endif
}
const ll N = 1e6+1;
void solve(){
	ll n ;
	cin>> n ;
	vector<ll> arr(n);
	for(ll i=0;i<n ;i++)cin>>arr[i];
	sort(arr.begin() , arr.end());
	ll ans =1 , boundary=1e18;
	for(ll i=0;i<n ;i++){
		if(arr[i]==0 || ans ==0){
			cout<<0<<endl;
			return ;
		}
		if(arr[i]>boundary/ans || ans<0){
			cout<<-1<<endl;
			return ;
		}
		ans=ans*arr[i];
	}
	cout<<ans<<endl;
}
int main(){
	//mahakal(),fast;
	ll t=1 ;
	// cin>> t;
	while(t--)solve();

	return 0;
}

Measured memory_bytes: 3980
#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

bool is_lunlun(long long n)
{
  int d = n % 10;
  n /= 10;
  while (n > 0) {
    int d2 = n % 10;
    n /= 10;
    if (abs(d - d2) > 1) return false;
    d = d2;
  }
  return true;
}

void next(vector<int>& digits)
{
  const auto size = digits.size();
  if (size == 1) {
    if (digits[0] == 9) {
      digits[0] = 0;
      digits.push_back(1);
    } else {
      ++digits[0];
    }
  } else {
    bool all9 = digits[0] == 9;
    for (size_t i = 1; i < size; ++i) {
      auto& di = digits[i - 1];
      auto& di_ = digits[i];
      if (di_ != 9) all9 = false;
      if (di == di_ - 1 or (di == di_ and di != 9)) {
        ++di;
        return;
      } else if (di == di_ + 1) {
        if (i == size - 1 or abs(di - digits[i + 1]) <= 1) {
          swap(di, di_);
          for (size_t j = i - 1; j != 0; ) {
            --j;
            digits[j] = max(0, digits[j + 1] - 1);
          }
          return;
        }
      }
    }
    if (all9) {
      for (size_t i = 0; i < size; ++i) digits[i] = 0;
      digits.push_back(1);
    } else {
      swap(digits[size - 1], digits[size - 2]);
      for (size_t i = size - 2; i != 0; ) {
        --i;
        digits[i] = max(0, digits[i + 1] - 1);
      }
    }
  }
}

void print(const vector<int>& digits)
{
  for (size_t i = digits.size(); i != 0; ) {
    --i;
    cout << digits[i];
  }
  cout << endl;
}

int main()
{
  int K;
  cin >> K;
  vector<int> digits(1, 0);
  for (int i = 0; i < K; ++i) {
    next(digits);
  }
  print(digits);
  return 0;
}


Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main()
{
	int n,i,s;
	cin>>n;
	i=n/100;
	if(i<n/10%10) i++;
	else if(i==n/10%10&&i<n%10) i++;
	s=i*100+i*10+i;
	cout<<s;
 } 

Measured memory_bytes: 256
import std.stdio;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.functional;
import std.bigint;
import std.numeric;
import std.array;
import std.math;
import std.range;
import std.container;

void main() {
    int INF = 1<<30;
    int[] vx = [-1, 0, 1, 0];
    int[] vy = [0, 1, 0, -1];
    while(true) {
        int[] input = readln.split.to!(int[]);
        if (input == [0, 0]) break;
        int w = input[0];
        int h = input[1];

        bool[][][] passable = new bool[][][](w, h, 4);
        foreach(int i; 0..2*h-1) {
            input = readln.split.to!(int[]);
            if (i%2 == 0) {
                for(int j=0; j<input.length; j++) {
                    if (input[j] == 0) {
                        passable[j][i/2][2] = true;
                        passable[j+1][i/2][0] = true;
                    }
                }
            } else {
                for(int j=0; j<input.length; j++) {
                    if (input[j] == 0) {
                        passable[j][i/2][1] = true;
                        passable[j][i/2+1][3] = true;
                    }
                }
            }
        }

        int[][] ary = new int[][](w, h);
        foreach(int i; 0..w) ary[i][] = INF;
        ary[0][0] = 1;
        auto list = DList!(Point)(Point(0, 0));
        while (!list.empty) {
            Point p = list.front;
            list.removeFront;
            for (int i=0; i<vx.length; i++) {
                if (passable[p.x][p.y][i] && ary[p.x+vx[i]][p.y+vy[i]] == INF) {
                    ary[p.x+vx[i]][p.y+vy[i]] = ary[p.x][p.y]+1;
                    list.insert(Point(p.x+vx[i], p.y+vy[i]));
                }
            }
        }
        writeln(ary[w-1][h-1] == INF ? 0:ary[w-1][h-1]);
    }
}
struct Point {
    int x, y;
    this(int x, int y) {
        this.x = x;
        this.y = y;
    }
}

Measured memory_bytes: 3168
#include <iostream>
#include <stdio.h>

int main () {
  std::string S;
  std::cin >> S;
  int answer = 0;
  for (int i = 0; i < 4; i++) {
    if (S[i] == '+') {
      answer++;  
    }
    else {
      answer--;  
    }
  }  

  std::cout << answer << std::endl;
}

Measured memory_bytes: 256
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;

typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)

#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define shandom_ruffle random_shuffle

const int MOD = 1000000007;
const ll INF = 1e18;
const int MX = 100001; //check the limits, dummy


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

    ll a,x;
    cin >> x >> a;
    if(x < a) cout << 0<<endl;
    else cout << 10 << endl; 

    return 0;
}

// read the question correctly (ll vs int)
// template by super1 derived from bqi343


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

int main(){
  int n,k,cheap,sum=0;
  cin >> n >> k;
  vector<int> p(n);
  rep(i,n)
    cin>>p.at(i);
  for(int i=0;i<k;i++){
    cheap=0;
    for(int j=0;j<n;j++){
      if(p.at(j)<p.at(cheap)){
        cheap=j;
      }
    }
    sum+=p.at(cheap);
    p.at(cheap)=1001;
  }
  cout << sum;
}

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

int main()
{
	int a, b, k;cin >> a >> b >> k;
	//int blk = 0;
	rep(i,a)
		rep(j,b)
		{
			int blk = j*i+(a-i)*(b-j);
			if(blk==k)
			{
				cout<<"Yes"<<endl;
				return 0;
			}
		}

		if(k==0){
			cout<<"Yes"<<endl;
			return 0;
		}
	cout<<"No"<<endl;
	return 0;
}

Measured memory_bytes: 256
import std.stdio; // ??\????????????????????????
import std.string; // chomp????????????????????????(?????????????????????)
import std.conv; // to????????????????????????
import std.array; // split?????????????????????
import std.algorithm; // map?????????????????????

void main() {
    uint i = 1;

    while (true) {
        int x = readln.chomp.to!int;

        if (x == 0) {
            break;
        }

        writeln("Case ", i, ": ", x);
        i++;
    }
}

Measured memory_bytes: 2380
import java.util.Scanner;
public class Main {
	static int[][] gyo2=new int[100000][12];
	static int count=0;
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long A=sc.nextLong();
		long B=sc.nextLong();
		long C=sc.nextLong();
		long K=sc.nextLong();
		long ans=0;
		if(K>A) {
			ans+=A;
			K-=A;
		}else {
			ans+=K;
			K=0;
		}
		if(K>0) {
			K-=B;
		}
		if(K>0) {
			if(K>C) {
				ans-=C;
			}else {
				ans-=K;
			}
		}
		System.out.println(ans);

}

}


Measured memory_bytes: 42528
#include<stdio.h>
#include<math.h>
int main(void)
{
    int p,d,i,j,c=0,k,l;
    float q;
    int s=0;
    scanf("%d%d",&p,&d);
    int x[p][d];
    for(i=0;i<p;i++){
     for(j=0;j<d;j++) scanf("%d",&x[i][j]);}
     for(k=0;k<(p-1);k++){
      for(i=k+1;i<p;i++){
     for(j=0;j<d;j++)
        {
         s= s+((x[k][j]-x[i][j])*(x[k][j]-x[i][j])) ;
        }

        q=sqrt(s);

        l=q;



        if((q-l)==0) c++;
        s=0;
     }}
     printf("%d",c);
     return 0;
}


Measured memory_bytes: 128
// clang-format off
	#define BADSEED random_device{}()
	#include <bits/stdc++.h>
	using namespace std;
	using ll = long long;
	using uint = unsigned int;
	ostream &operator<<(ostream &os, int8_t c) { return os << short(c); }
	istream &operator>>(istream &is, int8_t &c) { short x; is >> x; c = x; return is; }
	#define TM_(...) template <class __VA_ARGS__>
	namespace narut {
	TM_(T) using TupSz = tuple_size<decay_t<T>>;
	TM_(T) constexpr auto spc(T const &t, int) -> decltype((cout << t), 'a') { return ' '; }
	constexpr auto spc(string const &s, int) { return '\n'; }
	TM_(T) constexpr auto spc(T const &t, char) { return '\n'; }
	struct IO {
		TM_(T) static auto out_(ostream &os, T const &t, int) -> decltype(void(os << t)) { os << t; }
		TM_(T, class OS) static auto out_(OS &os, T const &t, int) -> decltype(void(begin(t))) {
			auto it = begin(t), e = end(t);
			if (it != e) out_(os, *it++, 0);
			for (; it != e; out_(os, *it++, 0)) os << spc(*it, 0);
		}
		TM_(T, size_t... Is) static void out_tup(ostream &os, T const &t, index_sequence<Is...>) { (void)initializer_list<int>{0, ((Is == 0) ? 0 : ((os << ' '), 0), (os << get<Is>(t)), 0)...}; }
		TM_(T) static decltype(void(TupSz<T>{})) out_(ostream &os, T const &t, char) { out_tup(os, t, make_index_sequence<TupSz<T>::value>{}); }
		TM_(Sep, class F, class... Ts) static ostream &print(ostream &os, Sep sep, F const &f, Ts const &... ts) { return void(initializer_list<int>{(out_(os, f, 0), 0), (out_(os << sep, ts, 0), 0)...}), os; }
		TM_(T) static auto in_(istream &is, T &t, int) -> decltype(void(is >> t)) { is >> t; }
		TM_(T, class IS) static auto in_(IS &is, T &t, int) -> decltype(void(begin(t))) { for (auto &x : t) in_(is, x, 0); }
		TM_(T, size_t... Is) static void in_tup(istream &is, T &t, index_sequence<Is...>) { (void)initializer_list<int>{0, (in_(is, get<Is>(t), 0), 0)...}; }
		TM_(T) static decltype(void(TupSz<T>{})) in_(istream &is, T &t, char) { in_tup(is, t, make_index_sequence<TupSz<T>::value>{}); }
	};
	} // namespace narut
	#define Cout(...) narut::IO::print(cout, ' ', __VA_ARGS__) << '\n'
	#ifdef NARUT_LOCAL
	#define Debug(...) narut::IO::print(cerr << "\033[0;31m", ", ", __VA_ARGS__) << "\033[0m\n"
	#else
	#define Debug(...) 0
	#endif
	[[maybe_unused]] struct Cin { 
		template <class T> Cin const &operator>>(T &t) const { return narut::IO::in_(cin, t, 0), *this; }
		template <class T> operator T() const { T t; return *this >> t, t;  }	
	} Cin;
	TM_(T) auto operator%(T &t, size_t n) -> decltype(t.resize(n), t)& { return t.resize(n), t; }
	#define FOR(i, j, n) for (int i = int(j); i < int(n); ++i)
	#define ROF(i, j, n) for (int i = int(n) - 1; i >= int(j); --i)

// clang-format on





auto Main() {
	string t;
	cin>>t;
	replace(begin(t), end(t),'?','D');
	cout << t;
	
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout << fixed << setprecision(10);
#ifdef NARUT_LOCAL
	assert(freopen("io/test.in", "r", stdin));
	cin.exceptions(cin.badbit | cin.failbit);
	cerr << fixed << setprecision(10);
#endif

	Main();
}


Measured memory_bytes: 3744
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <tuple>
#include <queue>
using namespace std;
using ll=long long;
//using R=double;

const int INF = 10000000;
typedef pair<int, int> p;

ll gcd(ll a, ll b){
    if(b == 0){
        return a;
    }
    return gcd(b, a%b);
}

int main(){

    int input[3];
    for(int i = 0; i < 3; i++){
        cin >> input[i];
    }

    sort(input,input+3);

    cout << input[2]*10 + input[1] + input[0] << endl;

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <numeric>
#include <cmath>
#include <limits>
#include <stdio.h>
#include <iomanip>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
using namespace std;
using ll = long long;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
int Max(int(a), int(b), int(c)) {
	return max(max(a, b), c);
}
int Min(int(a), int(b), int(c)) {
	return min(min(a, b), c);
}





int main() {
	ll N, K, Q;
	cin >> N >> K >> Q;
	vector<ll> point(N);
	rep(i, Q) {
		ll A;
		cin >> A;
		point.at(A - 1)++;
	}
	rep(i, N) {
		if (Q - point.at(i) < K) {
			cout << "Yes" << endl;

		}
		else {
			cout << "No" << endl;
		}
	}
}

Measured memory_bytes: 1536
#include <iostream>
#include <string>
#include <cmath>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#define _USE_MATH_DEFINES
#include <math.h>
#include <functional>
using namespace std;

#define rep(i,x) for(ll i=0;i<x;i++)
#define repn(i,x) for(ll i=1;i<=x;i++)

typedef long long ll;
const ll INF = 1e17;
const ll MOD = 1000000007;
const ll MAX = 1000001;

ll max(ll a, ll b) {
	if (a > b) { return a; }
	return b;
}

ll min(ll a, ll b) {
	if (a > b) { return b; }
	return a;
}

ll gcd(ll a, ll b) {
	if (b == 0) { return a; }
	if (a < b) { return gcd(b, a); }
	return gcd(b, a%b);
}

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

struct edge {
	ll ind;
	ll to;
	ll d;
};


///////////////////////////

ll dv(ll h, ll w) {
	if (h % 2 == 0 || w % 2 == 0) { return 0; }
	else { return min(h, w); }
}

int main() {

	ll H, W;
	cin >> H >> W;

	vector<vector<char>> a(H + 2, vector<char>(W + 2,'#'));

	repn(i, H)repn(j, W) cin >> a[i][j];

	rep(i, H + 2) {
		rep(j, W + 2) {
			cout << a[i][j];
		}
		cout << endl;
	}

	
	system("PAUSE");
}


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

string s, ans;
int main()
{
    cin>>s;
    ans="";
    for(int i=0;i<s.length();i++){
        if(s[i]=='0'){
            ans=ans+"0";
        }
        else if(s[i]=='1'){
            ans=ans+"1";
        }
        else if(s[i]=='B' && ans.length()>0){
            ans.erase(ans.end()-1);
        }
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#define NOMINMAX
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <numeric>
#include <math.h>
#include <algorithm>
#include <functional>
#include <cstring>
#include <array>
#include <vector>
#include <list>
#include <stack>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <queue>
#include <complex>
#include <bitset>
#define full(c) c.begin(), c.end()
#define vector2d(name,type,h,w,init) vector<vector<type>> name(h,vector<type>(w,init)) 
const int PRIME = 1000000007;
const int INF = (int) 1e9;
const int INT_INF = 2147483647;
const long long int LL_INF = 9223372036854775807;
const double PI = acos(-1);
const double EPS = 0.00001;
typedef unsigned long long int ull;
typedef long long int ll;
using namespace std;

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);
	int a, b, c;
	cin >> a >> b >> c;
	cout << a * b / 2 << endl;
	return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		//猫の数
		int A = scanner.nextInt();
		//猫と犬の数
		int B = scanner.nextInt();
		//A+B匹の中に、猫がちょうどX匹いる
		int X = scanner.nextInt();

		int total = A + B;
		//猫と犬の総数が猫の総数以上 かつ 分かっている猫の数が猫の総数以下
		if (total >= X  && A <= X) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}

Measured memory_bytes: 23764
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define FORR(i, a, b) for (int i = b - 1; i >= a; --i)
#define SORT(v) sort(v.begin(), v.end())
#define SORTR(v) sort(v.rbegin(), v.rend())
#define REV(v) reverse(v.begin(), v.end())
#define ITER(itr, v) for (auto itr = v.begin(); itr != v.end(); ++itr)
#define LB(v, x) (lower_bound(v.begin(), v.end(), x) - v.begin())
#define UB(v, x) (upper_bound(v.begin(), v.end(), x) - v.begin())
#define SZ(v) (int)v.size()
using namespace std;
using ll = long long;
using P = pair<int, int>;

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

    int N, K;
    cin >> N >> K;
    vector<int> memo(N);
    REP(i, K) {
        int d;
        cin >> d;
        REP(j, d) {
            int a;
            cin >> a;
            memo[--a]++;
        }
    }
    int res = 0;
    REP(i, N) if (memo[i] == 0)++ res;
    cout << res << endl;

    return 0;
}

Measured memory_bytes: 3660
#include <iostream>
using namespace std;
int main(void){
    long long X,i;
    cin>>X;
    for(i=1;i*100<X+1;i++){
        if(X-i*100<i*5+1){
            cout<<1<<endl;
            return 0;
        }
    }
    cout<<0<<endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#define pye cout << "yes" << endl;
#define pno cout << "no" << endl;
#define pYe cout << "Yes" << endl;
#define pNo cout << "No" << endl;
#define pYE cout << "YES" << endl;
#define pNO cout << "NO" << endl;
#define prin(num) cout << num << endl;
#define max(a, b) ((a)>(b) ? (a):(b))
#define min(a, b) ((a)<(b) ? (a):(b))
#define INF 100000000000
#define MOD 1000000007LL
#define MAX 200005
#define NIL -1
#define WHITE 0
#define BLACK 1
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef map<ll, ll> Map;

int main(void) {
    ll N;
    cin >> N;
    ll i, a[100000];
    ll odd_cnt=0;
    for(i=0; i<N; i++) {
        cin >> a[i];
        if(a[i]&1) odd_cnt++;
    }
    
    if((odd_cnt&1)==0) pYE
    else pNO
}


Measured memory_bytes: 1024
#include<iostream>
#include<vector>
#include<math.h>

using namespace std;

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

int n;
int p[100000];
vector<int> conti;

int main(){
    cin >> n;
    REP(i, n) cin >> p[i];

    REP(i, n){
        if(p[i] == i+1){
            if(i!=0 && p[i-1]==i){
                conti[conti.size()-1] += 1;
            } else {
                conti.push_back(1);
            }
        }
    }

    int output = 0;
    REP(i, conti.size()){
        output += ceil(double(conti[i])/2);
    }
    cout << output << endl;
}


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

int main()
{
 int k;
 vector<int> v(3);
  cin>>v[0]>>v[1]>>v[2]>>k;
  while(k--)
  {
    auto it = max_element(v.begin(),v.end());
    *it = *it*2;
  }
  cout<<v[0]+v[1]+v[2]<<"\n";
  
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define ll long long
int main(){
  string S,T;
  cin>>S>>T;
  vector<vector<int>> A(26);
  rep(i,S.size()) A[(S[i]-'a')].push_back(i);
  ll ans;
  int F=0;
  rep(i,T.size()){
    if(A[T[i]-'a'].size()==0){
      F=1;
      break;
    }
  }
  if(F==0){
    ans=A[T[0]-'a'][0]+1;
    rep(i,T.size()){
    if(i){
      ll Y=(ans+S.size()-1)%S.size();
      int X=upper_bound(all(A[T[i]-'a']),Y)-A[T[i]-'a'].begin();
      if(X<A[T[i]-'a'].size()) ans+=A[T[i]-'a'][X]-Y;
      else ans+=S.size()-Y+A[T[i]-'a'][0];
    }
  }
  }
  if(F) cout<<-1<<endl;
  else cout<<ans<<endl;
}

Measured memory_bytes: 1216
function main(input) {
    const args = input.split(' ');
    const a = parseInt(args[0], 10);
    const b = parseInt(args[1], 10);

    if ((a * b) % 2 === 0) {
        console.log('Even');
    } else {
        console.log('Odd');
    }
}

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

Measured memory_bytes: 20936
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define endl '\n'
#define all(x) (x).begin(),(x).end()
const int INF=500+5;
const int N=200000+5;
const ll oo=1e18+5;
const ll mod=998244353;

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	map<ll,ll> maps;
	ll ans=0;
	int n;
	cin>>n;
	for(ll i=1;i<=n;++i){
		ll x;
		cin>>x;
		ans+=maps[i-x];
		++maps[i+x];
	}
	cout<<ans;
	return 0;
}


Measured memory_bytes: 26360
// 2020-07-25 07:27:17
#include<bits/stdc++.h>
#ifdef LOCAL
#include "lib/debug.hpp"
#else
#define debug(...) 1
#endif
#define ALL(a) (a).begin(), (a).end()
#define rep(i, n) REP(i, 0, (n))
#define repc(i, n) REPC(i, 0, (n))
#define REP(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define REPC(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define REPCM(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
using namespace std;
using ll = long long;
using ld = long double;
using pr = pair<ll, ll>;
using vll = vector<ll>;
using vpr = vector<pr>;
using P = pair<int, int>;
template<class T> inline bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } else return false; }
template<class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } else return false; }

void answer() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n+1, 0);
  rep(i, n) {
    cin >> a[i+1];
    a[i+1]--;
  }
  map<int, vector<int> > mp;
  int cur = 0;
  repc(i, n) {
    cur = (cur + a[i]) % k;
    mp[cur].push_back(i);
  }
  ll ans = 0;
  for(auto p : mp) {
    auto& v = p.second;
    int sz = v.size();
    int l = 0, r = 1;
    while(l < sz) {
      while(r < sz && v[r] - v[l] < k) {
        r++;
      }
      ans += r - l - 1;
      l++;
    }
  }
  cout << ans << '\n';
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  answer();
  return 0;
}

Measured memory_bytes: 25840
import math
n = int(input())
A = []

A.append(int(input()))
A.append(int(input()))
A.append(int(input()))
A.append(int(input()))
A.append(int(input()))


neck = A.index(min(A))
ans = (math.ceil(n/min(A))+4)

print(ans)

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

// 総数を1000000007で割った余り
const long long mod = 1e9 + 7;

using ll  = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pii>
#define vpll vector<pll>

#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; i++)
#define rep1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; i++)
#define repr(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rep1r(i, n) for (int i = ((int)(n)); i >= 1; i--)

#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define RSORT(x) sort(rall(x));
#define pb push_back
#define mp make_pair

#define INF (1e9)
#define PI (acos(-1))
#define EPS (1e-7)

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

int func(long long a, long long b) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    // cout << fixed << setprecision(5);

    int ans    = 0;
    int outlet = 1;
    while (outlet < b) {
        --outlet;
        outlet += a;
        ++ans;
    }
    cout << ans << endl;

    return 0;
}

int main() {
    long long A;
    scanf("%lld", &A);
    long long B;
    scanf("%lld", &B);

    func(A, B);

    return 0;
}


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

using namespace std;

int main() {
	long long x, a, b;
	cin >> x >> a >> b;
	long long div = x / (a+b);
	long long balls = div * a;
	x %= a + b;
	balls += x > a ? a : x;
	cout << balls << "\n";
}


Measured memory_bytes: 256
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String in = sc.nextLine();
		while (true){
			in = erace(in);
			if (isGumoji(in)) {
				break;
			}
		}
		System.out.println(in.length());
		sc.close();
	}

	private static String erace(String in){
		int len = in.length() - 1;
		String ret = in.substring(0, len);
		return ret;
	}

	private static boolean isGumoji(String in){
		int len = in.length();
		if (len % 2 == 0) {
			int pos = len / 2;
			String a = in.substring(0, pos);
			String b = in.substring(pos,len);
//			System.out.println(a + "," + b);
			if (a.equals(b)){
				return true;
			} else {
				return false;
			}

		}
		return false;

	}

}

Measured memory_bytes: 21844
#include <bits/stdc++.h>
using namespace std;
using pp=pair<int, int>;

int main() {
  int N, X;
  cin >> N >> X;
  vector<int> m(N);
  for(int i=0; i<N; i++) {
    cin >> m[i];
    X-=m[i];
  }
  sort(m.begin(), m.end());
  cout << N+X/m[0] << endl;
}


Measured memory_bytes: 3608
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,K,X,Y;
  cin >> N >> K >> X >> Y;
  if (N<K+1){
    cout << N*X << endl;
  }
  else {
    cout << K*X+(N-K)*Y << endl;
  }
}

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

int main() {
  int a, b, c, k;
  cin >> a >> b >> c >> k;
  
  int xa = min(k, a);
  k -= xa;
  
  int xb = min(k, b);
  k -= xb;
  
  int xc = k;
  
  cout << xa - xc << endl;
}  

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

int main()
{
    int n;
    long long int ttl = 0;
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= n; j++)
        {
            for (int k = 1; k <= n; k++)
            {
                ttl += __gcd(i, __gcd(j, k));
            }
        }
    }
    cout << ttl;
}

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

using ll = long long;
using P = pair<int, int>;

const int INF = 1e9;
const int MOD = 1e9 + 7;

// 4近傍、8近傍
int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};

int main() {
  int a, b;
  cin >> a >> b;

  cout << max(0, a - 2 * b) << endl;
  return 0;
}


Measured memory_bytes: 256
N = int(input())
s = []
for i in range(N):
    s.append(int(input()))
ans = sum(s)
if ans % 10 != 0:
    print(ans)
else:
    s.sort()
    for i in s:
        if i % 10 != 0:
            ans -= i
            break
    if ans % 10 != 0:
        print(ans)
    else:
        print(0)


Measured memory_bytes: 2940
#include <iostream>
#include <vector>
#include<list>
#include <algorithm>
#include <string>
#include <math.h>
#include<map>
#include <utility>

#include<queue>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
 
#define INF (1e9)
typedef long long unsigned int ll;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
 

 
int vector_finder(std::vector<int> vec, int number) {
  size_t index = std::distance( vec.begin(), std::find(vec.begin(), vec.end(), number) );
  if (index != vec.size()) { // 発見できたとき
    return 1;
  }
  else { // 発見できなかったとき
    return 0;
  }
}


int main()
{
	ll N;
	string S;
	cin >> N >> S;

	ll ans = INF;
	ll count = 0;
	REP(i, N)
	{

		if(S[i]=='.'){
			count++;
		}
	}
	ans = count;

	

	REP(i,N){
		if(S[i]=='#'){
			count++;
		}else if(S[i]=='.'){
			count-=1;
		}
		if (ans > count)
		{
			ans = count;

		}
	}

	cout <<ans << endl;

	return 0;
}

Measured memory_bytes: 640
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
 
using namespace std;
 
#define fst first
#define scd second
#define PB push_back
#define MP make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define omajinai ios::sync_with_stdio(false);cin.tie(0)
#define rep(i,x) for(int i=0;i<(int)(x);++i)
#define rep1(i,x) for(int i=1;i<=(int)(x);++i)
#define rrep(i,x) for(int i=(int)x-1;i>=0;--i)
#define rrep1(i,x) for(int i=(int)x;i>=1;--i)
 
using ll=long long;
using ld=long double;
using vi=vector<int>;
using vvi=vector<vi>;
using pii=pair<int, int>;
using vpii=vector<pii>;
 
template<class T,class U>ostream&operator<<(ostream&os,const pair<T,U>p){os<<"("<<p.fst<<", "<<p.scd<<")";return os;}
template<class T>ostream&operator<<(ostream&os,const vector<T>v){rep(i,v.size()){if(i)os<<", ";os<<v[i];}return os;}
template<typename T>T&max(T&a,T&b){if(a>=b)return a;return b;}
template<typename T>T&min(T&a,T&b){if(a < b)return a;return b;}
template<typename T>bool chmax(T&a,T b){if(a < b){a=b;return true;}return false;}
template<typename T>bool chmin(T&a,T b){if(a > b){a=b;return true;}return false;}
constexpr int TEN(int n){return n==0?1:10*TEN(n-1);}
 
 
signed main()
{
    string S, T;cin >> S >> T;
    int n = S.size(), m = T.size();
    int ans = 1e9;
    for (int i = 0; i < n; ++i) {
        int cnt = 0;
        if (i + m - 1 >= n) break;
        for (int j = 0; j < m; ++j) {
            if (S[i + j] != T[j]) cnt++;
        }
 
        chmin(ans, cnt);
    }
 
    cout << ans << endl;
}

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

int main() {
	int N;
	cin >> N;

	int A[N];
	int prev = 0;
	int c = 0;
	int ans = 0;
	for (int i=0; i<N; i++) {
		cin >> A[i];
		if (prev == A[i]) {
			c++;
		} else {
			if (c > 1) {
				ans += c/2;
			}
			prev = A[i];
			c = 1;
		}
	}

	if (c > 1) {
		ans += c / 2;
	}

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


Measured memory_bytes: 768
#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define E "\n"

using namespace std;
const long long MOD = (long long)1e9 + 7;

int k, x;

int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> k >> x;
    if (k*500 >= x) cout << "Yes" << E;
    else cout << "No" << E;
    //system("pause");
    return 0;
}

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

using namespace std;


int main(){
	long double a,b,c;

	cin >> a >> b >> c;

	if (a==0 && b==0 && c==0) cout << "No" << endl;
	else if ( (c-a-b)/2 > sqrtl(a*b)) cout << "Yes" << endl;
	else cout << "No" << endl;
	cin >> a;
	return 0;

	
}


Measured memory_bytes: 256
//============================================================================
// Name        : AOL.cpp
// Author      : Akari Fujii
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cctype>
#include <string>
#include<algorithm>

using namespace std;



int main(){


	string str = "abcdefghijklmnopqrstuvwsyz";

	string str2;
	int flg=0;
	cin>>str2;

	for(int i=0; i<26; i++){
		flg=0;
		for(int j=0; j<str2.size(); j++){
			if(str2[j]==str[i]){
				flg=1;
			}
		}
		if(flg==0){
			cout<<str[i]<<endl;
			return 0;
		}
	}
	cout<<"None"<<endl;
	return 0;
}


Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
vector<int> dy = {1, 1, 0, -1, -1, 0};
vector<int> dx = {0, 1, 1, 0, -1, -1};
int INF = 100;
int main(){
  while (1){
    int t, n;
    cin >> t >> n;
    if (t == 0 && n == 0){
      break;
    }
    vector<vector<bool>> ok(200, vector<bool>(200, true));
    for (int i = 0; i < n; i++){
      int x, y;
      cin >> x >> y;
      x += 100;
      y += 100;
      ok[y][x] = false;
    }
    int sx, sy;
    cin >> sx >> sy;
    sx += 100;
    sy += 100;
    vector<vector<int>> d(200, vector<int>(200, INF));
    d[sy][sx] = 0;
    queue<pair<int, int>> Q;
    Q.push(make_pair(sy, sx));
    int ans = 0;
    while (!Q.empty()){
      int y = Q.front().first;
      int x = Q.front().second;
      Q.pop();
      ans++;
      if (d[y][x] < t){
        for (int i = 0; i < 6; i++){
          int y2 = y + dy[i];
          int x2 = x + dx[i];
          if (ok[y2][x2] && d[y2][x2] == INF){
            d[y2][x2] = d[y][x] + 1;
            Q.push(make_pair(y2, x2));
          }
        }
      }
    }
    cout << ans << endl;
  }
}


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

using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define pb push_back
#define pf push_front

typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;

ll gcd(ll x, ll y) {
	ll r;
	while ((r = x % y) != 0) {
		x = y;
		y = r;
	}
	return y;
}
ll lcm(ll x, ll y) {
	x /= gcd(x, y);
	y /= gcd(x, y);
	return (x*y);
}

int main()
{
	int n, i;
	cin >> n;
	for (i = 0; (i*i) <= n; i++) {}
	cout << ((i - 1)*(i - 1));
	return 0;
}

Measured memory_bytes: 256
import numpy as np


def main():
    X, Y, Z, K = list(map(int, input().split(' ')))
    A = np.array(list(map(int, input().split(' '))))
    B = np.array(list(map(int, input().split(' '))))
    C = np.array(list(map(int, input().split(' '))))
    AB = np.array(np.meshgrid(A, B)).T.reshape(-1, 2).sum(axis=1)
    AB[::-1].sort()
    AB = AB[:min([K, X * Y])]
    ABC = np.array(np.meshgrid(AB, C)).T.reshape(-1, 2).sum(axis=1)
    ABC[::-1].sort()
    for ans in ABC[:K]:
        print(ans)


if __name__ == '__main__':
    main()

Measured memory_bytes: 130692
from collections import deque;h,w,k=map(int,input().split());m=[input()for _ in[0]*h];v=[[-1]*w for _ in[0]*h];r=9**20
for i in range(h):
 if'S'in m[i]:j=m[i].index('S');q=deque([[i,j]]);v[i][j]=0
while q:
 y,x=q.popleft()
 r=min(r,y,x,h-1-y,w-1-x)
 if v[y][x]==k:continue
 for i,j in([1,0],[-1,0],[0,1],[0,-1]):
  t,u=y+i,x+j
  if t>=0and t<h and u>=0and u<w and m[t][u]=='.'and v[t][u]<0:v[t][u]=v[y][x]+1;q.append([t,u])
print(1-(-r//k))

Measured memory_bytes: 58972
#include <bits/stdc++.h>
//#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;

#define MAX_N 1000000

signed main() {
	vector<bool> is_prime(MAX_N,true);
	is_prime[1] = false;
	for (ll i = 2; i <= sqrt(MAX_N); i++) {
		if (is_prime[i]) {
			ll k =2*i;
			while (k < MAX_N) {
				is_prime[k] = false;
				k += i;
			}
		}
	}
	vector<ll> ans(MAX_N, 0);
	for (ll i = 1; i < MAX_N; i++) {
		ans[i] = ans[i - 1];
		if (is_prime[i]) ans[i]++;
	}
	ll n;
	while (cin >> n) {
		cout << ans[n] << endl;
	}
}


Measured memory_bytes: 10576
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    a,b = i_map()

    def prime_decomposition(n):
        i = 2
        table = []
        while i * i <= n: # sqrt(n)で計算が済む
            while n % i == 0:
                n //= i
                table.append(i)
            i += 1
        if n > 1:
            table.append(n)
        return table

    a = set(prime_decomposition(a))
    b = set(prime_decomposition(b))
    print(len(a&b)+1)



if __name__=="__main__":
    main()


Measured memory_bytes: 9396
#16D8102008K 1-D Greatest Common Divisor 柳生　葉月　Yagyu Hauzki
import math
a,b=map(int,input().split())
def f(x,y):
    while(1):
        tmp=x%y
        x=y
        y=tmp
        if tmp==0:
            gcd=x
            break
    return gcd
print(f(a,b))




Measured memory_bytes: 5656
import Control.Monad
import Data.List hiding (peermutations)

-- main = print =<< (pure (ans . (\[_, b] -> b))) <*> (replicateM 2 getLine)
main = print =<< ((pure getIndex) <*> getInput)

getInts :: IO [Int]
getInts = (pure ((map read) . words)) <*> getLine

getInt :: IO Int
getInt = (pure read) <*> getLine

getInput :: IO [[Int]]
getInput = replicateM 3 getInts

select :: [Int] -> [(Int, [Int])]
select [x] = [(x, [])]
select (x:xs) = (x, xs) : map (\(y, ys)-> (y, x:ys)) (select xs)

permutations :: [Int] -> [[Int]]
permutations [] = [[]]
permutations xs = [(y:zs) | (y, ys) <- select xs, zs <- Main.permutations ys]

num2List :: Int -> [[Int]]
num2List n = Main.permutations [1..n]

getIndex :: [[Int]] -> Int
getIndex [[n], a, b] = (\[c, d]-> abs $ c - d) $ (\p -> map (\m -> (\(Just j) -> j) $ elemIndex m p) [a, b]) $ num2List n


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

using namespace std;

int n, m = 0;
vector<int> a;

int get(int x)
{
    int cur = 0;

    for (int i = 0; i < n; i++)
        cur += (a[i] - x) * (a[i] - x);

    return cur;
}

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

    cin >> n;
    a.resize(n);

    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        m += a[i];
    }

    cout << min(get(m / n), get((m + n - 1) / n)) << "\n";

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
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 (b<a) {a=b; return 1;} return 0;}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    ll n, k;
    cin >> n >> k;
    cout << min(n - (n/k)*k, - n + (n/k + 1)*k) << endl;
}

Measured memory_bytes: 256
#include <iostream>

int main() {
  int N;
  std::cin >> N;
  int count = 0;
  for (int i = 0; i < N; ++i) {
    int a, b;
    std::cin >> a >> b;
    if (a == b) {
      ++count;
    } else {
      count = 0;
    }
    if (count >= 3) {
      std::cout << "Yes" << std::endl;
      return 0;
    }
  }
  std::cout << "No" << std::endl;
  return 0;
}


Measured memory_bytes: 3620