akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long
#define endl '\n'
#define pb push_back
#define debug(x) cout<<#x<<" "<<x<<endl;
const int mod = 999983;
const int MAX = 2e5+7;
const double pi = 3.141592653589793238460;
using namespace std;

bool is_pal (string s){
	return equal(s.begin(), s.begin() + s.size()/2, s.rbegin()) ? 1 : 0;
}

int power (int x , int y){
	if(y==0){
		return 1;
	}
	if(y&1){
		return x*power(x,y/2)%mod*power(x,y/2)%mod;
	}
	return power(x,y/2)%mod*power(x,y/2)%mod;
}

int modInv (int x){
	return power(x,mod-2);
}

int fact (int n){
	int f =1;
	for(int i=0; i<n; i++){
		f=(f*(i+1))%mod;		
	}
	return f;
}

int max (int x, int y){
	return x>y ? x : y;
}

int min (int x, int y){
	return x<y ? x : y;
}

int lcm (int x, int y){
	return (x*y)/__gcd(x,y);
}

bool prime[MAX]; 

void SieveOfEratosthenes(int n){
	 
    memset(prime, true, sizeof(prime)); 
    for (int p=2; p*p<=n; p++){ 
        if (prime[p] == true){ 
            for (int i=p*p; i<=n; i += p) 
                prime[i] = false; 
         } 
    }  
}

int ans;

void solve(void){
	string a, b;
	cin>>a>>b;
	if(a.size() != b.size() - 1){
		cout<<"No";
		return;
	}


	for(int i = 0; i < a.size(); i++){
		if(a.at(i) != b.at(i)){
			cout<<"No";
			return ;
		}

	}
	cout<<"Yes";
}
signed main() {

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

fio;
int t = 1;
// cin>>t;
	while(t--)
	solve();

	return 0;
}


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

int n, m;
vector<vector<int>> graph;
vector<int> ans;

void bfs(int s) {
    queue<int> que;
    que.push(s);

    while (!que.empty()) {
        int u = que.front(); que.pop();

        for (int v:graph[u]) {
            if (ans[v] == 0) {
                que.push(v);
                ans[v] = u;
            }
        }
    }
}

int main() {
    cin >> n >> m;
    graph.resize(n + 1);
    ans.resize(n + 1);
    for (int i = 0; i < m; i++) {
        int a, b;
        cin >> a >> b;
        graph[a].push_back(b);
        graph[b].push_back(a);
    }

    bfs(1);

    cout << "Yes" << endl;
    for (int i = 2; i <= n; i++) {
        cout << ans[i] << '\n';
    }
}


Measured memory_bytes: 10176
#include <iostream>
#include <cmath>
using namespace std;
typedef long long ll;
int table[] = {0,1,2,3,5,7,8,9};

int main(){
  ll n;

  while(cin >> n,n){
    ll e = 1,ans = 0;
    while(1){
      int m = n%8;
      ans += e*table[m];
      e *= 10;
      n /= 8;
      if(n == 0)break;
    }
    cout << ans << endl;
  }
}

Measured memory_bytes: 1156
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def primes(n):
    pl = [1]
    if n == 2:
        pl.append(2)
        return pl
    if n == 3:
        pl.append(3)
        return pl

    i = 2
    while i * i <= n:
        if n % i == 0:
            pl.append(i)
            while n % i == 0:
                n //= i
        i += 1
    if n > 1:
        pl.append(n)
    return pl


def main():
    a, b = map(int, input().split())
    ap = set(primes(a))
    bp = set(primes(b))
    # print(ap)
    # print(bp)
    # print(ap & bp)
    print(len(ap & bp))


if __name__ == '__main__':
    main()


Measured memory_bytes: 38512
/*
author: Apoorv Singh
*/
 
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
 
typedef vector <int> vi;
typedef pair <int, int> pii;
typedef vector <long long> vll;
typedef pair <long long, long long> pll;
#define pb push_back   
#define all(c) c.begin(), c.end()
#define For(i, a, b) for (long long i = a; i < b; ++i)
#define Forr(i, a, b) for (long long i = a; i > b; --i)
#define um unordered_map
#define F first
#define S second
#define ll long long 
#define endl "\n"
#define min(a,b) (a < b ? a : b)
#define max(a,b) (a > b ? a : b)
#define fast_io() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

#define TRACE
#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
	cout << name << " : " << arg1 << endl;  
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif

template <class X>
void printarr(X arr[], int n) {
	for (int i = 0; i < n; ++i)
		cout << arr[i] << ' ';
	cout << endl;
}
 
template <class T, class cmp = less<T>> using ordered_set = tree<T, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
 
ll modulo = 1e9 + 7;

ll fpow(ll a, ll n) {
	ll ans = 1;
	while (n) {
		if (n&1) ans = (ans*a)%modulo;
		a = (a*a)%modulo; n = n >> 1;
	}
	return ans;
}

void solve() {
	int s,w;
	cin >> s >> w;
	if (s > w) {
		cout << "safe" << endl;
	}
	else {
		cout << "unsafe" << endl;
	}
}

int main() {
	fast_io();
	int t = 1;
	// cin >> t;
	while (t--) solve();
	return 0;
}

Measured memory_bytes: 3612
x = gets.to_i

if x <= 6
  puts 1
elsif x <= 11
  puts 2
else
  i = x / 11
  j = x % 11

  if j == 0
    puts i * 2
  elsif j <= 6
    puts i * 2 + 1
  else
    puts i * 2 + 2
  end
end


Measured memory_bytes: 1788
#include <cstdio>
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <string>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#include <iomanip>
#include <list>
#include <tuple>
#include <bitset>
#include <ciso646>
#include <cassert>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> T;
typedef vector<ll> vec;

inline bool check(ll x, ll y, ll xMax, ll yMax) { return x >= 0 && y >= 0 && xMax > x && yMax > y; }
inline int toint(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string tostring(T x) { ostringstream sout; sout << x; return sout.str(); }
template<class T> inline T sqr(T x) { return x*x; }
template<class T> inline T mypow(T x, ll n) { T res = 1; while (n > 0) { if (n & 1)res = res * x;	x = x * x;	n >>= 1; }return res; }
inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

#define For(i,a,b)	for(ll (i) = (a);i < (b);(i)++)
#define rep(i,n)	For(i,0,n)
#define rFor(i,a,b)	for(ll (i) = (a-1);i >= (b);(i)--)
#define rrep(i,n)	rFor(i,n,0)
#define each(i,n)	for(auto &i : n)
#define clr(a)		memset((a), 0 ,sizeof(a))
#define mclr(a)		memset((a), -1 ,sizeof(a))
#define all(a)		(a).begin(),(a).end()
#define sz(a)		(sizeof(a))
#define tostr(a)	tostring(a)
#define dump(val) 	cerr << #val " = " << val << endl;
#define Fill(a,v)	fill((int*)a,(int*)(a+(sz(a)/sz(*(a)))),v)

const ll dx[8] = { 1, 0, -1, 0, 1, 1, -1, -1 }, dy[8] = { 0, -1, 0, 1, -1, 1, -1, 1 };

const ll mod = 1e9 + 7;
const ll INF = 1e17 + 9;

#define int ll
#define double ld

signed main() {
	int n, m;
	cin >> n >> m;

	vector<int> have(n + 1, 1);
	vector<bool> ok(n + 1, false);
	ok[1] = true;

	rep(i, m) {
		int x, y;
		cin >> x >> y;
		have[x]--;
		have[y]++;
		if (ok[x]) {
			if (have[x] == 0)ok[x] = false;
			ok[y] = true;
		}
	}
	int ans = 0;
	rep(i, n) {
		if (ok[i + 1])ans++;
	}
	cout << ans << endl;

	return 0;
}



Measured memory_bytes: 1024
import  itertools
n,m = map(int,input().split())
matrix = [[0]*n for _ in range(n)]

for i in range(m):
 a,b = map(int,input().split())
 matrix[a-1][b-1] = 1
 matrix[b-1][a-1] = 1
#print(matrix)
cnt = 0

for each in itertools.permutations(range(n)):
  if each[0] != 0:
     break
  factor = 1
  for i in range(n-1):
    factor *= matrix[each[i]][each[i+1]]
  cnt += factor
print(cnt)

Measured memory_bytes: 3064
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main()
{
    string s;
    cin >> s;
    int q;
    cin >> q;
    int p = 0;
    string fr, bc;
    while(q--){
        int t;
        cin >> t;
        if(t == 1) p = 1 - p;
        else{
            int f;
            char c;
            cin >> f >> c;
            f--;
            if(p == f) fr += c;
            else bc += c;
        }
    }
    if(p){
        reverse(bc.begin(), bc.end());
        reverse(s.begin(), s.end());
        cout << bc << s << fr << endl;
    }
    else{
        reverse(fr.begin(), fr.end());
        cout << fr << s << bc << endl;
    }
}

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

#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
#define LL long long
#define pii pair <int,int>
#define fi first
#define se second
#define pb push_back
#define mpr make_pair

using namespace std;

const LL MOD=1e9+7;

int n;

int main()
{
	cin>>n;
	rep(i,n) cout<<"ACL";
	cout<<endl;
	return 0;
}

Measured memory_bytes: 3560
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cmath>
#include<vector>
#define mk make_pair
#define fi first
#define se second
using namespace std;
const int maxn=1e5+100;
const int mod=1e9+7;
const int inf=1e9+1000;
int h[maxn],n;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
inline ll ksm(ll num,ll t) {
    ll res=1;num%=mod;
    for(;t;t>>=1,num=num*num%mod) {
        if(t&1)res=res*num%mod;
    }
    return res%mod;
}
pll solve(int l,int r,int c) {
    if(l>r)return mk(1,0);
    vi tmp;tmp.clear();int mi=inf,w=0;
    pll ans=mk(1,1);
    for(int i=l;i<=r;i++)mi=min(mi,h[i]);
    tmp.push_back(l-1);for(int i=l;i<=r;i++)if(h[i]==mi)tmp.push_back(i),w++;tmp.push_back(r+1);
    for(int i=1;i<tmp.size();i++) {
        int le=tmp[i-1]+1,re=tmp[i]-1;
        pll tmp_ans=solve(le,re,mi);
        ans.fi*=tmp_ans.fi;ans.fi%=mod;
        ans.se*=tmp_ans.fi+tmp_ans.se;ans.se%=mod;
    }
    ans.se=ans.se*ksm(2,w)%mod+(ksm(2,mi-c)-2)*ans.fi%mod;ans.se%=mod;
    ans.fi*=ksm(2,mi-c);ans.fi%=mod;
    return ans;
}
int main() {
    ios::sync_with_stdio(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>h[i];
    pll ans=solve(1,n,0);
    cout<<ans.se;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 

vector<int> init(int size){
  vector<int> par(size,-1);
  return par;
}

int root(int x, vector<int>& par){
  if(par[x] < 0){
    return x;
  }else{
    return par[x] = root(par[x],par);
  }
}

bool same(int x, int y, vector<int>& par){
  return root(x, par) == root(y, par);
}

void unite(int x, int y, vector<int>& par){
  x = root(x, par), y = root(y, par);
  if(same(x,y, par))return;
  par[x] += par[y];
  par[y] = x;
}

int size(int x, vector<int>& par){
  return -par[root(x, par)];
}

signed main(){
  string s;cin>>s;
  int ans = 0;int n = 0;
  rep(i,s.length()){
    repd(j,i,s.size()){
      char c = s[j];
      if(c == 'A' || c=='T' || c=='C' || c == 'G'){
        n++;
      }else{
        break;
      }
    }
    ans = max(ans, n);
    n = 0;
  }
  cout << ans << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
typedef long long ll;
#define REP(i,n) for(int i = 0;i < (n);i++)
#define rep(i,m,n) for(int i = (m);i < (n);i++)
#define P pair<int,int>
#define pb push_back
#define mk make_pair
using namespace std;
#define Vec(a) vector <int> a
const int INF = 1 << 20;
const int MOD = 1e9+7;





int main(){
  ll n;
  cin >> n;
  vector <ll> a;
  REP(i,n){
    ll b;
    cin >> b;
    a.pb(b);
  }
  sort(a.begin(),a.end());
  ll s = 1;
  ll ns = a[0];
  ll sum = 0;
  rep(i,1,n){
    if(a[i] == ns){
      s++;
    }
    else{
      ns = a[i];
      if(s%2 == 1)
	sum++;
      s = 1;
    }
  }
  if(s%2 == 1)
    sum++;
  cout << sum << endl;
  return 0;
}


Measured memory_bytes: 1400
#include <bits/stdc++.h>
template<class T> inline bool chmin(T&a, T b){if(a > b){a = b; return true;}else{return false;}}
template<class T> inline bool chmax(T&a, T b){if(a < b){a = b; return true;}else{return false;}}
#define ll long long
#define double long double
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
#define mod (ll)(1e9+7)
#define inf (ll)(3e18+7)
#define pi (double) acos(-1.0)
#define P pair<int,int>
#define PiP pair<ll,pair<ll,ll>>
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
using namespace std;

int main(){
    ll h, w, m;
    cin >> h >> w >> m;
    vector<ll> a(h, 0), b(w, 0);
    vector<vector<int>> bomb(w);
    rep(i, m){
        int x, y;
        cin >> x >> y;
        x--; y--;
        a[x]++;
        b[y]++;
        bomb[y].push_back(x);
    }
    int ans = 0;
    multiset<int, greater<int>> st;
    rep(i, h)st.insert(a[i]);
    rep(i, w){
        rep(j, bomb[i].size()){
            st.erase(st.find(a[bomb[i][j]]));
            st.insert(a[bomb[i][j]]-1);
        }
        int nans = b[i];
        nans += *(st.begin());
        chmax(ans, nans);
        rep(j, bomb[i].size()){
            st.erase(st.find(a[bomb[i][j]]-1));
            st.insert(a[bomb[i][j]]);
        }
    }
    cout << ans << endl;
}   


Measured memory_bytes: 38356
#include <iostream>
#include <cstdio>
#include <algorithm>
#define rep(i,a,b) for(int i = a; i <= b; i++)
using namespace std;
const int N = 300010, inf = 1000000000;
int d[N], dl = 0;
namespace seg{
	#define mid ((l + r) >> 1)
	#define lc (x << 1)
	#define rc (lc | 1)
	#define lcq lc, l, mid
	#define rcq rc, mid + 1, r
	int mx[N << 2], t[N << 2], a, b, c;
	void build(int x, int l, int r) {
		t[x] = 0;
		if (l == r) mx[x] = -d[l] * 2; else build(lcq), build(rcq), mx[x] = max(mx[lc], mx[rc]);
	}
	void push(int x, int l, int r) {
		mx[x] += t[x]; if (l < r) t[lc] += t[x], t[rc] += t[x]; t[x] = 0;
	}
	void add(int x, int l, int r) {
		if (a <= l && r <= b) t[x] += c, push(x, l, r); else 
		push(x, l, r), (a <= mid ? add(lcq) : push(lcq)), (b > mid ? add(rcq) : push(rcq)),
		mx[x] = max(mx[lc], mx[rc]);
	}
	int qry(int x, int l, int r) {
		push(x, l, r);
		if (a <= l && r <= b) return mx[x];
		else return max((a <= mid ? qry(lcq) : -inf), (b > mid ? qry(rcq) : -inf));
	}
}

int W, H, n, ans = 0;
int x[N], y[N];

typedef pair<int, int> node;
#define mp(a,b) make_pair(a,b)
node a[N], b[N]; int al = 0, bl = 0;

struct stack{
	int st[N], a[N], top;
	void clear(int h) {
		st[top = 0] = 1, a[0] = h;
		seg::a = 1, seg::b = dl, seg::c = h; seg::add(1, 1, dl);
	}
	void add(int x, int h) {
		while (top && a[top] >= h) {
			seg::a = st[top - 1], seg::b = st[top] - 1, seg::c = a[0] - a[top], seg::add(1, 1, dl);
			top--;
		}
		seg::a = st[top], seg::b = x - 1, seg::c = h - a[0], seg::add(1, 1, dl);
		top++, a[top] = h, st[top] = x;
	}
}A, B;

void work(int m) {
	d[1] = 0; al = bl = dl = 0;
	rep(i,1,n) {
		if (x[i] <= m) a[++al] = mp(y[i], (m - x[i]) * 2 + 1);
		if (x[i] >  m) b[++bl] = mp(y[i], (x[i] - m) * 2 - 1);
		d[i + 1] = y[i];
	}
	d[n + 2] = H;
	sort(d + 1, d + n + 2 + 1); dl = unique(d + 1, d + n + 2 + 1) - d - 1;
	sort(a + 1, a + al + 1); sort(b + 1, b + bl + 1);
	seg::build(1, 1, dl); A.clear(m * 2 + 1), B.clear((W - m) * 2 - 1);
	int i = 1, j = 1;
	rep(t,1,dl) {
		int y = d[t]; 
		//calc
		seg::a = 1, seg::b = t - 1;
		if (seg::a <= seg::b) { int mx = seg::qry(1, 1, dl); ans = max(ans, y * 2 + mx); }
		//add
		if (i <= al && a[i].first == y) { if (y > 0) A.add(t, a[i].second); i++; }
		if (j <= bl && b[j].first == y) { if (y > 0) B.add(t, b[j].second); j++; }

		seg::a = seg::b = 1;
	}
}

int main() {
	scanf("%d%d%d",&W,&H,&n);
	rep(i,1,n) scanf("%d%d",&x[i],&y[i]);
	work(W >> 1);
	swap(W, H); rep(i,1,n) swap(x[i], y[i]);
	work(W >> 1);
	printf("%d\n",ans);
	return 0;
}

Measured memory_bytes: 15616
#include <iostream>
using namespace std;
#define max 100000
typedef long long llong;

int n,k;
llong w[max];

int check(llong p){
    llong res=p;
    int cnt=0;
    int i=0;
    while (k>cnt) {
        if(res>w[i]){
            res-=w[i];
            i++;
        }else{
            res=p;
            cnt++;
        }
    }
    return i;
}

int solve(){
    llong left=0;
    llong right=100000*10000;
    llong mid;
    while (right-left>1) {
        mid=(left+right)/2;
        int v=check(mid);
        if(v>=n)right=mid;
        else left=mid;
    }
    return left;
}

int main(){
    cin>>n>>k;
    for (int i=0; i<n; i++)cin>>w[i];
    llong ans=solve();
    cout<<ans<<endl;
}


Measured memory_bytes: 3884
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
 
using namespace __gnu_pbds;
using namespace std;
 
typedef   long long int ll;
typedef unsigned long long int sll;
typedef  double ld;
#define A 1000000007ll
#define B 998244353ll
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define pb push_back
#define mxe(v) *max_element(v.begin(),v.end())
#define mne(v) *min_element(v.begin(),v.end())
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define ve vector
#define br break
#define PI 3.1415926535
 
int main() 
{
  FAST;
  ll l;
  cin>>l;
  long double d=l/3.0;
  cout<<fixed<<setprecision(12)<<d*d*d;
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define LL long long 
using namespace std;
const int MAXN = 1e5 + 10, MAXM = 53, INF = 1e9 + 10, mod = 1e9 + 7;
inline int read() {
    char c = getchar(); int x = 0, f = 1;
    while(c < '0' || c > '9') {if(c == '0') f = -1; c = getchar();}
    while(c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
    return x * f;
}
char s[MAXN];
int a[MAXN];
int main() {
	scanf("%s", s + 1);
	int N = strlen(s + 1);
	for(int i = 1; i <= N; i++) a[i] = s[i] - '0';
	int ans = INF;
	for(int i = 1; i <= N - 2; i++) {
		int x = a[i] * 100 + a[i + 1] * 10 + a[i + 2];
		ans = min(ans, abs(x - 753));
	}
	cout << ans;
    return 0;
}
/*
2
4 2
1
2
10 1
5
*/

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <utility>
#include <cstdlib>
#include <queue>
#include <iomanip>

using namespace std;

typedef long long ll;

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

    if(a > 0 && b > 0) cout << "Positive" << endl;
    else if(a < 0 && b > 0) cout << "Zero" << endl;
    else{
        int tmp = a-b+1;
        if(tmp % 2 == 0){
            cout << "Positive" << endl;
        }
        else{
            cout << "Negative" << endl;
        }
    }

    return 0;
}





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

#define gcd(a,b)     __gcd(a,b)
#define lcm(a,b)     (a*(b/gcd(a,b)))

#define pb   push_back
#define endl "\n"

#define ll  long long
#define ull unsigned long long

#define W(t)            while(t--)
#define rep(i,n)      for(i = 0; i < n; i++)
#define repit(it,type)  for(auto it = type.begin(); it != type.end(); it++)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;

int main()
{
    IOS
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int x;
    cin>>x;
    cout<<1-x;

     return 0;
}

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

using namespace std;

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

#ifndef ONLINE_JUDGE
#define dbg(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl;
#else
#define dbg(x)
#endif

#define ff first
#define ss second
const int MAXN = 2048;
vi adj[MAXN];
vi vis;
int limit;

int CUT;
void dfs(int u, int d){
    if (d >= limit) return;
    for (int v : adj[u]){
        if (!vis[v] && v != CUT) {
            vis[v] = 1;
            dfs(v, d + 1);
        }
    }
}

int main(){
    std::ios_base::sync_with_stdio(false);
    int n; cin >> n;
    int k; cin >> k;
    for (int i = 0; i < n-1; i++){
        int u, v; cin >> u >> v;
        u--; v--;
        adj[u].push_back(v);
        adj[v].push_back(u);
    }
    int res = 0;
    if (k & 1){
        // two centers
        limit = k / 2;
        for (int u = 0; u < n; u++){
            for (int v : adj[u]){
                if (u < v){
                    vis.assign(n, 0);
                    vis[u] = 1;
                    CUT = v;
                    dfs(u, 0);
                    vis[v] = 1;
                    CUT = u;
                    dfs(v, 0);
                    res = max(res, accumulate(vis.begin(), vis.end(), 0));
                }
            }
        }
    } else {
        // one center
        limit = k / 2;
        CUT = -1;
        for (int u = 0; u < n; u++){
            vis.assign(n, 0);
            vis[u] = 1;
            dfs(u, 0);
            res = max(res, accumulate(vis.begin(), vis.end(), 0));
        }
    }
    cout << n - res << endl;
    return 0;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
// define
#define int long long
#define UNIQUE(v) v.erase(unique(all(v)), v.end());
#define ZIP(v) sort(all(v)),UNIQUE(v)
#define ADD(a, b) a = (a + b) % mod
#define SUB(a, b) a = (a+mod-b)%mod
#define MUL(a, b) a = (((a)%mod) * ((b)%mod)) % mod
#define rollcall cout << "I'm Sucu." << endl;
#define repi(i,m,n) for(int i = m;i < n;i++)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rep(i,n) repi(i,0,n)
#define rrep(i,n) repi(i,1,n+1)
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pf(x) push_front(x)
#define fi first
#define se second
// typedef
typedef complex<double> Point;
typedef pair<int, int> P;
typedef pair<int, P> PP;
typedef pair<P, int> Pi;
typedef vector<int> vi;
typedef deque<int> dq;
const int inf = 1e9+7;
const int INF = 1e18+7;
const int mod = 1e9+7;
// int sum = accumulate(a, a+n, 0LL);
// int mx = max_element(a, a+n);
// int mn = min_element(a, a+n);
// int cnt = count(a, a+n, k);

int X,A;

signed main()
{
    cin >> X >> A;

    if(X<A)cout << 0 << endl;
    else cout << 10 << endl;

    return 0;
}

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

int main() {
    int w, h, n; cin >> w >> h >> n;

    vector<vector<int> > s(h, vector<int>(w, 1));
    vector<int> a(n);
    vector<int> x(n);
    vector<int> y(n);
    for (int i = 0; i < n; i++) {
        cin >> x[i] >> y[i] >> a[i];
    }

    //条件の読み取り
    for (int k = 0; k < n; k++) {
        //xiより小さい領域に色を塗る
        if (a[k] == 1) {
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < x[k]; j++) {
                    s[i][j] = 0;
                }
            }
        }
        else if (a[k] == 2) {
            for (int i = 0; i < h; i++) {
                for (int j = x[k]; j < w; j++) {
                    s[i][j] = 0;
                }
            }
        }
        else if (a[k] == 3) {
            for (int i = 0; i < y[k]; i++) {
                for (int j = 0; j < w; j++) {
                    s[i][j] = 0;
                }
            }
        }   
        else {
            for (int i = y[k]; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    s[i][j] = 0;
                }
            }
        }
    }
    
    int sum = 0;
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            sum += s[i][j];
        }
    }

    cout << sum << endl;

    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
#include<iostream>
#include<vector>
#include<string>
#include<queue>
#include<deque>
#include<set>
#include<map>
#include<math.h>
#include<algorithm>
using namespace std;

#define INF 987654321
#define ll long long

string s;
int cnt[3];

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

	cin >> s;
	for (int i = 0; i < s.size(); i++)
		cnt[s[i] - 'a']++;

	if (abs(cnt[0] - cnt[1]) > 1 || abs(cnt[0] - cnt[2]) > 1 || abs(cnt[1] - cnt[2]) > 1)
		printf("NO");
	else
		printf("YES");

	return 0;
}

Measured memory_bytes: 512
package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)

	n := nextStr()
	k := nextStr()

	cnt := 0
	for i, c := range n {
		if byte(c) == k[i] {
			cnt++
		}
	}
	fmt.Println(cnt)
}

// ---- readfunc
func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}


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

int a[3][3];
bool f[3][3];

int main()
{
    for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) cin >> a[i][j];
    int n;
    cin >> n;
    for(int k = 0; k < n; k++){
        int b;
        cin >> b;
        for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) if(a[i][j] == b) f[i][j] = true;
    }
    for(int i = 0; i < 3; i++){
        bool g = true;
        for(int j = 0; j < 3; j++) g = (g & f[i][j]);
        if(g){
            cout << "Yes" << endl;
            return 0;
        }
    }
    for(int j = 0; j < 3; j++){
        bool g = true;
        for(int i = 0; i < 3; i++) g = (g & f[i][j]);
        if(g){
            cout << "Yes" << endl;
            return 0;
        }
    }
    if(f[0][0] && f[1][1] && f[2][2]){
        cout << "Yes" << endl;
        return 0;
    }
    if(f[2][0] && f[1][1] && f[0][2]){
        cout << "Yes" << endl;
        return 0;
    }
    cout << "No" << endl;
}

Measured memory_bytes: 256
using System;

class Program {
    static void Main(string[] args) {
        int n = int.Parse(Console.ReadLine());
        string s = Console.ReadLine();

        int ans = 0;
        for(int i = 0; i < n - 2; i++)
        {
            if(s.Substring(i, 3) == "ABC")
            {
                ans++;
            }
        }
        Console.WriteLine(ans);
        Console.ReadKey();
    }
}

Measured memory_bytes: 11220
#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define repeq(i,n) for(int (i)=0;(i)<=(int)(n);(i)++)
#define rep1(i,x,n) for(int (i)=(x);(i)<(int)(n);(i)++)
#define rep1eq(i,x,n) for(int (i)=(x);(i)<=(int)(n);(i)++)
#define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--)
using namespace std;
using ll = long long;
using Int = long long;

const int MOD = 1000000007;
const ll INF = numeric_limits<ll>::max();
const int inf = 1e8;
//typedef pair<int,int> P;

//少数点表示
//cout << std::fixed << std::setprecision(14) <<double値

int main(){
    cin.tie( 0 ); ios::sync_with_stdio( false );
    int n;
    cin >> n;
    int ans = pow(n,3);
    cout << ans << endl;

}

Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>


int main(){
  int n,m;
  scanf("%d",&n);
  scanf("%d",&m);
  int l[m],r[m];
  int i;
  for(i = 0;i < m;i++){
    scanf("%d",&l[i]);
    scanf("%d",&r[i]);
  }
  int max = n;
  int min = 0;

  for(i = 0;i < m;i++){
    if(max >= r[i]) max = r[i];
    if(min <= l[i]) min = l[i];
  }

  if(max >= min)printf("%d\n",max-min + 1);
  else printf("%d\n",0);



}


Measured memory_bytes: 896
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cassert>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define rep(i,n) FOR(i,0,n)
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define vint vector<int>
#define vdouble vector<double>
#define vstring vector<string>
using namespace std;

#include<map>
#include<set>
#include<queue>

typedef long long ll;
typedef unsigned long long ull;

int main() {

	int A, B;
	cin >> A >> B;

	if (A == 1) A = 14;
	if (B == 1) B = 14;

	if (A == B){
		cout << "Draw" << endl;
	}
	else if(A > B){
		cout << "Alice" << endl;
	}
	else{
		cout << "Bob" << endl;
	}

}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		while(true) {
			if(prime(x)) {
				System.out.println(x);
				break;
			}
			x++;
		}
		
	}
	public static boolean prime(int x) {
		for(int i = 2;i <= Math.sqrt(x); i++) {
			if(x % i ==0) return false;
		}
		return true;
	}
}

Measured memory_bytes: 21972
loop do
    n, m = gets.split.map(&:to_i)
    break if n == 0 && m == 0
    t = n.times.map{gets.to_i}
    h = m.times.map{gets.to_i}
    tsum = t.inject(:+)
    hsum = h.inject(:+)
    min = tsum + hsum + 1
    t1 = h1 = 0
    t.each do |tt|
        h.each do |hh|
            hc = hsum - hh + tt
            tc = tsum - tt + hh
            if tc == hc
                if tt + hh < min
                    min = [tt + hh, min].min
                    t1 = tt
                    h1 = hh
                end
            end
        end
    end
    if min == tsum + hsum + 1
        puts "-1"
    else
        puts "#{t1} #{h1}"
    end
end

Measured memory_bytes: 6120
#include <bits/stdc++.h>
#define rep(i,n) for (ll i = 0; i < n; ++i)
#define sz(x) int(x.size())
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.begin(), v.end(), x) != v.end())
#define FORV(i, v) for (auto i = v.begin(); i != v.end(); i++)
using namespace std;

typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const int INF = 1001001001;
const long long INFL = (1LL<<60);
const double eps = (1e-9);

int main() {
  int x, y;
  cin >> x >> y;

  cout << x + y / 2 << endl;

  return 0;
}


Measured memory_bytes: 256
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input()

h,w  = na()
grid = [input().strip() for i in range(h)]
#print(grid)

T = [[0]*w for i in range(h)]
Y = [[0]*w for i in range(h)]

for i in range(h):
    count=0
    for j in range(w):
        if(grid[i][j]=="#"):
            count=0
        else:
            count+=1
            #print(i,j)
            T[i][j]=count

for i in range(h):
    for j in range(w-2,-1,-1):
        if grid[i][j] == "#":
            T[i][j] = 0
        else:
            T[i][j] = max(T[i][j],T[i][j+1])

for j in range(w):
    count=0
    for i in range(h):
        if(grid[i][j]=="#"):
            count=0
        else:
            count+=1
            Y[i][j]=count

for j in range(w):
    for i in range(h-2,-1,-1):
        if grid[i][j] == "#":
            Y[i][j] = 0
        else:
            Y[i][j] = max(Y[i][j],Y[i+1][j])

ANS = -1
for i in range(h):
    for j in range(w):
        ANS = max(ANS, Y[i][j] + T[i][j] - 1)
#print(T)
#print(Y)
print(ANS)

Measured memory_bytes: 123096
from math import *
a, b, C = (int(i) for i in input().split())
C = pi * C / 180
c = sqrt(a**2 + b**2 - 2 * a * b * cos(C))

h = b * sin(C)
S = a * h / 2
L = a + b + c
print("{:.8f} {:.8f} {:.8f}".format(S, L, h))

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

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

long long MOD = 1000000000 + 7;

int main(){
  cout << setprecision(10);
  int X,N;
  cin >> X >> N;

  map<int,int> m;
  for(int i = 0; i < N; i++){
    int tmp;
    cin >> tmp;
    m[tmp] = 1;
  }

  for(int i = 0; i <= 100; i++){
    if(m.count(X-i) == 0){
      cout << X-i << endl;
      return 0;
    }
    if(m.count(X+i) == 0){
      cout << X+i << endl;
      return 0;
    }
  }
}


Measured memory_bytes: 3632
N = gets.to_i
a = gets.split.map(&:to_i)

count = 0

while true
  all_even = true
  a.each do |d|
    if d.odd?
      all_even = false
      break
    end
  end

  unless all_even
    break
  end

  a.each_with_index do |d, i|
    a[i] = d / 2
  end
  count += 1
end

p count

Measured memory_bytes: 1788
/*
Though leaves are many , the root is one.
Through all the lying days of my youth
I swayed my leaves and flowers in the sun.
Now I may wither into the truth.
	  	  	- William Butler Yeats
*/
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
//#pragma GCC target("avx,tune=native")
#include<bits/stdc++.h>
#pragma comment("-Wl,--stack=1024000000")
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
#ifndef LOCAL
#define cerr if(0)cout
#define eprintf(...) 0
#else
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#endif
inline string getstr(string &s,int l,int r){string ret="";for(int i=l;i<=r;i++)ret.push_back(s[i]);return ret;}
int modpow(int x,int y,int md=mod){int ret=1;do{if(y&1)ret=(ll)ret*x%md;x=(ll)x*x%md;}while(y>>=1);return ret;}
inline int Rand(){return rand()*32768+rand();}
int get_id(char c){
	if(c>='a'&&c<='z')return c-'a';
	if(c>='A'&&c<='Z')return c-'A'+26;
	return c-'0'+52;
}
char rev(int x){
	if(x<26)return 'a'+x;
	if(x<52)return 'A'+x-26;
	return '0'+x-52;
}
int cnt[66],func[66],n,tot_ask;
string cmp="";
int dp[199][199];
int dist(string s){
	memset(dp,inf,sizeof dp);
	dp[0][0]=0;tot_ask++; 
	for(int i=0;i<=s.size();i++){
		for(int j=0;j<=cmp.size();j++){
			if(j)dp[i][j]=min(dp[i][j],dp[i][j-1]+1);
			if(i)dp[i][j]=min(dp[i][j],dp[i-1][j]+1);
			if(i&&j)dp[i][j]=min(dp[i][j],dp[i-1][j-1]+(s[i-1]!=cmp[j-1]));
		}
	}
	return dp[s.size()][cmp.size()];
}
int ask(string s){
	#ifdef LOCAL
		return dist(s);
	#endif
	cout<<"? "<<s<<endl;
	fflush(stdout);int x;cin>>x;return x;
}
int Get(string ret,string s,int pos,char c){
	int tot=ret.size()+1+s.size()-pos;
	string ss=ret+c+getstr(s,pos,s.size()-1);
	tot=ss.size();
	#ifdef LOCAL
		return dist(ss)==n-tot;
	#endif
	return n-tot==ask(ss);
}
string merge(string s1,string s2){
	int pos=0;
	string ret="";
	if(rand()&1)swap(s1,s2);
	for(int i=0;i<s1.size();i++){
		while(pos<s2.size()&&Get(ret,s2,pos,s1[i])==0)
		ret.push_back(s2[pos]),pos++;
		ret.push_back(s1[i]);
	}
	while(pos<s2.size())ret.push_back(s2[pos++]);
	return ret;
}
int main(){
	srand(time(0));
	for(int i=0;i<128;i++)cmp.push_back(rev(rand()%62));
	for(int i=0;i<62;i++){
		string s="";s.push_back(rev(i));
		for(int i=0;i<7;i++)s=s+s;
		int got=ask(s);
		cnt[i]=128-got;
	}
	for(int i=0;i<62;i++)n+=cnt[i];
	set<pair<int,string> >s;
	for(int i=0;i<62;i++){
		if(cnt[i]){
			string ins="";
			for(int j=0;j<cnt[i];j++)ins.push_back(rev(i));
			s.insert(make_pair(cnt[i],ins));
		}
	}
	while(s.size()>1){
		string s1=s.begin()->second;s.erase(s.begin());
		string s2=s.begin()->second;s.erase(s.begin());
		string s3=merge(s1,s2);
		s.insert(make_pair(s3.size(),s3));
	}
	cout<<"! "<<s.begin()->second<<endl;
	if(tot_ask>=851-128)assert(0);
	fflush(stdout);
	return 0;
}

Measured memory_bytes: 3736
import java.util.*;
import java.io.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        FastScanner sc = new FastScanner(System.in);
        int n = sc.nextInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for(int i = 0; i < n; i++){
            String s = sc.next();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
            
        }
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    }
    
}

class FastScanner {
    private BufferedReader reader = null;
    private StringTokenizer tokenizer = null;
    public FastScanner(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
        tokenizer = null;
    }

    public String next() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken("\n");
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
         return Double.parseDouble(next());
    }
    
    public String[] nextArray(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = next();
        return a;
    }

    public int[] nextIntArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        return a;
    }

    public long[] nextLongArray(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nextLong();
        return a;
    } 
}


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

using ll = long long;

int main() {
    string S;
    cin >> S;
    int n = S.size();
    vector<int> ans(n, 0);
    int l = 0;
    S.push_back('R');
    rep(i, n) {
        if (S[i] == S[i + 1]) continue;
        if (S[i] == 'R') {
            if ((i - l) % 2) {
                ans[i] += (i - l + 1) / 2;
                ans[i + 1] += (i - l + 1) / 2;
            } else {
                ans[i] += (i - l) / 2 + 1;
                ans[i + 1] += (i - l) / 2;
            }
        } else {
            if ((i - l) % 2) {
                ans[l - 1] += (i - l + 1) / 2;
                ans[l] += (i - l + 1) / 2;
            } else {
                ans[l - 1] += (i - l) / 2;
                ans[l] += (i - l) / 2 + 1;
            }
        }
        l = i + 1;
    }
    rep(i, n) {
        cout << ans[i];
        if (i == n - 1) cout << "\n";
        else cout << " ";
    }
}

Measured memory_bytes: 1024
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

a,b,c,d = LI()

val1 = a*c
val2 = a*d
val3 = b*c
val4 = b*d

print(max(val1,val2,val3,val4))

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

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
using ll = long long;

int main(){
    int N; cin >> N;
    vector<int> P(N), Q(N); REP(i, N) cin >> P[i]; REP(i, N) cin >> Q[i];
    vector<int> v(N); REP(i, N) v[i] = i + 1;

    // 各順列が何番目かを求める
    // これは一種の技。必ず覚える。
    map<vector<int>, int> ord;
    int iter = 0;

    // 順番に順列を生成し、ある順列が何番目かを配列に格納する。
    do {
        ord[v] = iter++; // vは配列だが、ordの第一引数はvector<int>型。この投入方法が一番賢い。
    } while(next_permutation(v.begin(), v.end()));

    cout << abs(ord[P] - ord[Q]) << endl;
}

Measured memory_bytes: 5248
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
//---------------------------------------------------------------------------------------------------


typedef long long ll;
int N, K;
ll X[101], Y[101];
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N >> K;
    rep(i, 0, N) cin >> X[i] >> Y[i];

    set<int> xx, yy;
    rep(i, 0, N) xx.insert(X[i]);
    rep(i, 0, N) yy.insert(Y[i]);

    ll ans = -1;
    fore(sx, xx) fore(sy, yy) fore(tx, xx) fore(ty, yy) if (sx <= tx and sy <= ty) {
        ll sm = 1LL * (tx - sx) * (ty - sy);

        int c = 0;
        rep(i, 0, N) if (sx <= X[i] and X[i] <= tx and sy <= Y[i] and Y[i] <= ty) c++;
        if (K <= c) {
            if (ans < 0) ans = sm;
            ans = min(ans, sm);
            
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 3664
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;
using static System.Math;

namespace At
{
    class Program
    {
        static void Main(string[] args)
        {
            var x = Read();
            var list = new List<string>() { "000","111", "222", "333", "444", "555", "666", "777", "888", "999" };

            foreach (var item in list)
            {
                if (x.Contains(item))
                {
                    WriteLine("Yes");
                    return;
                }
            }
            WriteLine("No");
        }

        private static string Read() { return ReadLine(); }
        private static string[] Reads() { return (Read().Split()); }
        private static int ReadInt() { return int.Parse(Read()); }
        private static long ReadLong() { return long.Parse(Read()); }
        private static double ReadDouble() { return double.Parse(Read()); }
        private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }
        private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }
        private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }
    }
}


Measured memory_bytes: 13140
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  a,h,w,i,j,count,x,y,sw,m,n,b,c,soeji,sum,max,k:Integer;
  l:array of Integer;
  s,s123,s1,s2,s3:string;
  al:string = 'abcdefghijklmnopqrstuvwxyz';
  tf,tfl,tfr:Boolean;
  dbTest:double;
begin
  try
    { TODO -oUser -cConsole メイン : ここにコードを記述してください }
    Read(n);
    Readln(k);
    Readln(s);

    count:=0;
    max  :=0;

    if n=k then begin
      Writeln('1');
      Readln;
      exit;
    end;

    if frac((n-k)/(k-1)) <> 0.0 then
      Writeln((n-k)div(k-1)+2)
    else
      Writeln((n-k)div(k-1)+1);
    Readln;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

Measured memory_bytes: 1024
use proconio::input;

fn main() {
    input!{
        a: i32,
        b: i32,
    }
    let num = format!("{}{}", a, b).parse::<i32>().unwrap();
    let mut ok = false;
    for sqrt in 1..1000 {
        if num == sqrt * sqrt {
            ok = true;
        }
    }

    let result = if ok { "Yes" } else { "No" };
    println!("{}", result);
}


Measured memory_bytes: 2088
X = int(input())
if X>=1800:
    print(1)
elif X>=1600:
    print(2)
elif X>=1400:
    print(3)
elif X>=1200:
    print(4)
elif X>=1000:
    print(5)
elif X>=800:
    print(6)
elif X>=600:
    print(7)
elif X>=400:
    print(8)

Measured memory_bytes: 9184
#include<cstdio>
#include<string>
#include<queue>
using namespace std;

int main() {
  char com[20];
  // 標準ライブラリの priority_queue を使用
  priority_queue<int> PQ;

  while ( 1 ) {
    scanf("%s", com);
    if ( com[0] == 'i' ) {
      int key ; scanf("%d", &key);  // cin より高速な scanf を使用
      PQ.push(key);
    } else if ( com[1] == 'x' ) {
      printf("%d\n", PQ.top());
      PQ.pop();
    } else if ( com[0] == 'e' ) {
      break;
    }
  }

  return 0;
}


Measured memory_bytes: 6564
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); i++)
int main()
{   
    int n, k;
    cin >> n >> k;
    
    priority_queue<int> l;
    int a;
    rep(i, n) {
        cin >> a;
        l.push(a);
    }
    int sum = 0;
    rep(i, k){
        sum += l.top();
        l.pop();
    }
    cout << sum << endl;

    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int) n; i++)
using ll = long long;
template <class T>
using vt = std::vector<T>;
using vvi = std::vector<vt<int>>;

int main(){
  int a,b,k;
  std::cin >> a >> b >> k;

  rep(i,k) {
    if(a <= b) {
      std::cout << a << '\n';
      if(i != k-1)
        ++a;
    }
  }


  if(b-a < k)
    k = b-a;
  int num = k-1;
  rep(i,k) {
    std::cout << b - num << '\n';
    num--;
  }


  return 0;
}


Measured memory_bytes: 256
package main

import (
	"fmt"
)

func slove(input string) bool {
	var cnt int
	s := []rune(input)

	if s[0] != 'A' {
		return false
	}

	for i := 1; i < len(s); i++ {
		if 2 <= i && i <= len(s)-2 && s[i] == 'C' {
			cnt++
		} else {
			if s[i] < 'a' || 'z' < s[i] {
				return false
			}
		}
	}
	if cnt == 1 {
		return true
	}

	return false
}

func main() {
	var input string
	fmt.Scan(&input)

	if slove(input) {
		fmt.Println("AC")
	} else {
		fmt.Println("WA")
	}
}


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

const ll INF = 5e15;
const ll MOD = 1e9 + 7;

vector<vector<ll>> edges(1e5);

P dfs(ll now, ll pre){
    P ret = P(1, 1);
    for(ll nxt : edges[now]){
        if(nxt == pre) continue;
        auto tmp = dfs(nxt, now);
        (ret.first *= (tmp.first + tmp.second) % MOD) %= MOD;
        (ret.second *= tmp.first) %= MOD;
    }
    return ret;
}

int main(){
    ll N;
    cin >> N;
    for(ll i = 1; i < N; i++){
        ll x, y;
        cin >> x >> y;
        x--;
        y--;
        edges[x].push_back(y);
        edges[y].push_back(x);
    }
    auto ans = dfs(0, -1);
    cout << (ans.first + ans.second) % MOD << endl;
    return 0;
}


Measured memory_bytes: 12672
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int ans = 700;

        for (int i = 0; i < 3; i++)
            if (s.charAt(i) == 'o') ans += 100;
      
        System.out.println(ans);
    }
}

Measured memory_bytes: 23380