akhauriyash/Code-Regression huggingface dataset:
module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";var n=r(1);r(2)(n.readFileSync("/dev/stdin","utf8"))},function(t,e){t.exports=require("fs")},function(t,e,r){"use strict";var n=r(3),i=r(5);t.exports=function(t){var e=new n(t);i(e)}},function(t,e,r){"use strict";var n=r(4);t.exports=class{constructor(t){var e=t.trim().split(/\s+/g);this.inp=new n(e)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(t,e,r){"use strict";t.exports=class{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=t.length,this.items=t,this.ind=0}enq(t){this.size+=1,this.items.push(t)}deq(){var t=this.items[this.ind];return this.size-=1,this.ind+=1,t}clear(){this.items=[],this.size=0,this.ind=0}}},function(t,e,r){"use strict";t.exports=function(t){for(var e=t.in(),r=9999999999,n=Math.sqrt(e),i=1;i<=n+1;i++)if(e%i==0){for(var o=i,s=e/i,u=0,c=0;o>0;)u++,o=Math.floor(o/10);for(;s>0;)c++,s=Math.floor(s/10);var f=Math.max(u,c);r=Math.min(r,f)}console.log(r)}}]);

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

const long long mod = 1000000007;
 
int main() {
  long long N; cin >> N;
  vector<long long> cnt(61);
  
  vector<long long> f(61);
  f.at(0) = 1;
  for(int i = 1; i < 61; ++i){
    f.at(i) = f.at(i-1) * 2 % mod;
  }
  
  long long ans = 0;

  for(int i = 0; i < N; ++i){
    long long A; cin >> A;
    bitset<64> x(A);
    for(int j = 0; j < 61; ++j){
      if(x.test(j)) cnt.at(j)++;
    }
  }
  
  for(int i = 0; i < 61; ++i){
    ans += cnt.at(i) * (N - cnt.at(i)) % mod * f.at(i) % mod;
    ans %= mod;
  }
  
  cout << ans << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long 
using namespace std;
#define w(x) int x; cin>>x; while(x--)
ll int n , mod=1e9+7;
ll int dp[2001];
bool compare1(pair<int,int> a , pair<int,int> b)
{
	return a.first<b.first;
}
bool compare2(pair<int,int> a , pair<int,int> b)
{
	return a.second<b.second;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	ll int a,b,c,d;
	cin>>a>>b>>c>>d;
	ll int ans1=max(a*c , a*d);
	ll int ans2=max(b*c , b*d);
	cout<<max(ans1,ans2);
}
	
	

Measured memory_bytes: 3648
#include <bits/stdc++.h>
#define F first
#define S second
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pi;
const ll inf = 1e18+5;
char c;
int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);
	cin >> c;
	ll a = c-'a';
	//~ cout << a;
	ll b = a+1;
	char cc = b+'a';
	cout << cc;
}


Measured memory_bytes: 256
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
	char x[1001],c[2];
	int len,i,sum=0;
	while(1){
		scanf("%s",x);
		if(x[0]=='0'){
			break;
		}
		len=strlen(x);
		for(i=0;i<len;i++){
			c[0]=x[i];
			sum+=atoi(c);
		}
		printf("%d\n",sum);
		sum=0;
	}
	return 0;
}

Measured memory_bytes: 544
import java.util.*;

class Main{
    public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		int iline = Integer.parseInt(line);
		long[] ians = new long[87];
		ians[0] = 2;
		ians[1] = 1;
		for(int i=2;i<87;i++){
			ians[i] = ians[i-1] + ians[i-2];
		}
		System.out.println(ians[iline]);
    }
}


Measured memory_bytes: 23764
import java.util.Scanner;

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

        Scanner scanner = new Scanner(System.in);

        String text = scanner.next();

        if(text.charAt(0) == text.charAt(1) || text.charAt(1) == text.charAt(2) || text.charAt(2) == text.charAt(3)){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    }
}

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

using namespace std;

bool include_3(int n)
{
  if (n % 10 == 3)
  {
    return true;
  }
  if (n == 0)
  {
    return false;
  }
  else
  {
    return include_3(n / 10);
  }
}

void my_call(int n)
{
  for (auto i = 1; i <= n; i++)
  {
    if (i % 3 == 0 || include_3(i))
    {
      std::cout << " " << i;
    }
  }

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

int main()
{
  int i;
  cin >> i;
  my_call(i);
  return 0;
}



Measured memory_bytes: 3084
/**
 *    author  : 𝒌𝒚𝒐𝒎𝒖𝒌𝒚𝒐𝒎𝒖𝒑𝒖𝒓𝒊𝒏
 *    created : 2020-04-03 14:01:23
**/

#include <iostream>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <complex>
#include <numeric>
#include <bitset>
#include <cassert>
#include <cctype>
#include <iomanip>
#include <random>
#include <utility>
#include <chrono>

using namespace std;

using int64 = long long;

template<class T> using binary_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template<class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) { os << '{'; size_t n = vec.size(); for (size_t i = 0; i < n; ++i) { os << vec[i]; if (i != n - 1) os << ','; } os << '}'; return os; }
template<class T, class U> std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& p) { return os << '{' << p.first << " " << p.second << '}'; }
template<class T, class U> std::ostream& operator<<(std::ostream& os, const std::map<T, U>& mp) { os << '{'; for (auto it = mp.begin(); it != mp.end(); ++it) { os << '{' << it->first << ':' << it->second << '}'; if (it != --mp.end()) os << ','; } os << '}'; return os; }
template<class T> std::ostream& operator<<(std::ostream& os, const std::set<T>& st) { os << '{'; for (auto it = st.begin(); it != st.end(); ++it) { os << *it; if (it != --st.end()) os << ','; } os << '}'; return os; }
template<class T> std::istream& operator>>(std::istream& is, std::vector<T>& vec) { size_t n = vec.size(); for (size_t i = 0; i < n; ++i) is >> vec[i]; return is; }

#define all(_) begin(_), end(_)
#define rall(_) rbegin(_), rend(_)

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", debug_out(__VA_ARGS__)
#else
#define debug(...) 1728
#endif

void debug_out() { std::cerr << '\n'; }

template <class Head, class... Tail>
void debug_out(Head&& head, Tail&&... tail) {
  std::cerr << head;
  if (sizeof...(Tail) != 0) std::cerr << ", ";
  debug_out(std::forward<Tail>(tail)...);
}

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

  int n; cin >> n;
  vector<int> a(n); cin >> a;

  sort(all(a));

  int ans1 = *max_element(all(a));

  int ans2 = ans1;

  int diff = 1e9;
  for (int i = 0; i < n; ++i) {
    if (a[i] == ans1) continue;
    if (abs(ans1 / 2 - a[i]) < diff) {
      diff = abs((ans1 + 1) / 2 - a[i]);
      ans2 = a[i];
    }
  }

  cout << ans1 << " " << ans2 << endl;

  return 0;
}

Measured memory_bytes: 640
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <list>
#include <map>
#include <string>
#include <functional>
#include <math.h>
#include <utility>
using namespace std;
int main()
{
	int sum=0;
	for(int i=0;i<5;i++){
		int tmp;cin>>tmp;
		sum+=max(40,tmp);
	}
	cout<<sum/5<<endl;
}

Measured memory_bytes: 1160
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define stoi stoll
using ll=long long;
using vi=vector<int>;
using pii=pair<int,int>;
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)
#define ITR(i,b,e) for(auto i=(b);i!=(e);++i)
#define FORE(x,c) for(auto &&x:c)
#define REPF(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define REP(i,n) REPF(i,0,n)
#define REPR(i,n) for(int i=(int)(n);i>=0;--i)
#define SZ(c) ((int)c.size())
#define CONTAIN(c,x) (c.find(x)!=end(c))
#define INSEG(l,x,r) ((l)<=(x)&&(x)<(r))
#define dump(...)
#define pb push_back
#define _ 0
const signed INF_=1001001001; const long long INF=1001001001001001001LL;
const int DX[9]={0,1,0,-1,1,1,-1,-1,0},DY[9]={-1,0,1,0,-1,1,1,-1,0};
template<class T> ostream& operator<<(ostream &os,const vector<T> &v) {
    ITR(i,begin(v),end(v))os<<*i<<(i==end(v)-1?"":" ");return os;}
template<class T> istream& operator>>(istream &is,vector<T> &v) {
    ITR(i,begin(v),end(v)) is>>*i;return is;}
template<class T,class U> istream& operator>>(istream &is, pair<T,U> &p) {
    is>>p.first>>p.second;return is;}
template<class T, class U> bool chmax(T &a,const U &b){return a<b?a=b,1:0;}
template<class T, class U> bool chmin(T &a,const U &b){return a>b?a=b,1:0;}
template <class T> void PSUM(T& c) {partial_sum(begin(c), end(c), begin(c));}
template<class T> using heap=priority_queue<T,vector<T>,greater<T>>;
struct before_main_function {
    before_main_function() {
        cin.tie(0); ios::sync_with_stdio(false);
        cout << setprecision(15) << fixed;
        #define endl "\n"
    }
} before_main_function;
//------------------8<------------------------------------8<--------------------

constexpr int MOD = 1e9 + 7;
int N;
vector<vector<int>> a;
int dp[21][1 << 21];
int rec(int i, int bit) {
    if (i == N) {
        if (bit == (1 << N) - 1) return 1;
        else return 0;
    }

    auto &DP = dp[i][bit];
    if (DP != -1) return DP;
    
    int ret = 0;
    bool ok = false;
    REP(j, N) {
        if (a[i][j] && ((bit >> j) & 1) == 0) {
            ret += rec(i + 1, bit | (1LL << j));
            ret %= MOD;
            ok = true;
        }
    }

    if (!ok) ret = 0;
    return DP = ret;
}
signed main() {
    REP(i, 21) REP(j, 1 << 21) dp[i][j] = -1;

    cin >> N;
    a = vector<vector<int>>(N, vector<int>(N));
    cin >> a;

    cout << rec(0, 0) << endl;
    return (0^_^0);
}



Measured memory_bytes: 344448
#include <bits/stdc++.h>
#define int long long
using namespace std;

int32_t main(){
	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);
	int n,k;
	cin >> n >> k;
	int a[n+1];
	map <int,int> m;
	a[0]=0;
	for(int i=1;i<=n;i++){
		cin >> a[i];
		a[i]=(a[i]-1+a[i-1])%k;
	}
	int sum=0;
	m[0]++;
	for(int i=1;i<=min(n,k-1);i++){
		sum+=m[a[i]];
		m[a[i]]++;
	}
	for(int i=k;i<=n;i++){
		m[a[i-k]]--;
		sum+=m[a[i]];
		m[a[i]]++;
	}
	cout << sum << endl;
}


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

typedef long long int ll;
typedef long double ld;         
#define f(var,start,end) for(ll var = start; var <end ; ++var)
#define rf(var,start,end) for(ll var = start; var>=end ; var--)
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define vll vector<ll>
#define pll pair<ll,ll> 
#define vpll vector<pll>
#define all(X) X.begin(),X.end()
#define nl cout<<"\n"
#define trace1(a) cerr << #a << ": " << a << endl;
#define trace2(a,b) cerr << #a << ": " << a << " " << #b << ": " << b << endl;
#define trace3(a,b,c) cerr << #a << ": " << a << " " << #b << ": " << b << " " << #c << ": " << c << endl;
#define trace4(a,b,c,d) cerr << #a << ": " << a << " " << #b << ": " << b << " " << #c << ": " << c << #d << ": " << d << endl;
#define OC freopen("input.txt" , "r", stdin); freopen("output.txt" , "w", stdout) 
#define MOD (ll)1e9+7; //change it for other mods
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

int main()
{
	ld a,b;
	cin>>a>>b;
	ll d=a*b;
	cout<<d;
	nl;	
}

Measured memory_bytes: 3732
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast")

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout<< setprecision(20);
    
    int N;cin >> N;
    
    cout<<N*N*N<<endl;
}


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

template<class T> T diameter (const vector<vector<pair<int, T>>>& g) {
    auto fartest = [&] (int s) -> pair<int, long long> {
        int rv = s; T rd = 0;
        vector<bool> seen((int)g.size(), false);
        stack<pair<int, T>> sta;
        sta.emplace(rv, rd);
        while (!sta.empty()) {
            int v; T sd;
            tie(v, sd) = sta.top(); sta.pop();
            seen[v] = true;
            if (rd < sd) { rd = sd; rv = v; }
            for (auto e : g[v]) {
                int u; T d; tie(u, d) = e;
                if (!seen[u]) sta.emplace(u, sd + d);
            }
        }
        return make_pair(rv, rd);
    };
    return fartest(fartest(0).first).second;
}


int main() {
    int n;
    cin >> n;
    vector<vector<pair<int, long long>>> g(n);
    for (int i = 0; i < n-1; i++) {
        int a, b; long long c;
        scanf("%d%d%lld", &a, &b, &c);
        g[a].emplace_back(b, c);
        g[b].emplace_back(a, c);
    }
    
    cout << diameter(g) << endl;
    return 0;
}


Measured memory_bytes: 10796
#include <bits/stdc++.h>    
//#include <ext/pb_ds/assoc_container.hpp> 
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
#pragma GCC optimize("O3")
//using namespace __gnu_pbds; 
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define pb  push_back
#define show(x) cout<<(#x)<<" : "<<x<<endl;
#define ll  long long
#define ld  long double
#define fill(a,val) memset(a,val,sizeof(a))
#define mp  make_pair
#define ff  first
#define ss  second
#define pii pair<ll,ll>
#define sq(x) ((x)*(x))
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define endl "\n"
#define int long long 
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";
const ll MOD     = 1000*1000*1000+7;
const ll INF     = 1ll*1000*1000*1000*1000*1000*1000 + 7;
const ll MOD2    = 998244353;
const ll N       = 1000*1000+5;
const ll N2      = 2000*1000*10;
const ld PI  = 3.141592653589793;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> tree_set;
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);} 
ll power(ll x,ll y,ll p ){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
ll lcm(ll a , ll b){return (a*b)/gcd(a,b);}
signed main()
{
    fastio();
    //cout<<fixed<<setprecision(20);
    //CHECK for LONG LONG and LONG DOUBLE
    /*comment for all except cc/cf    
    #ifndef ONLINE_JUDGE    
           freopen("input.txt","r",stdin);
           freopen("output.txt","w",stdout);
    #endif//*/
    int a,b;
    cin>>a>>b;
    if(a==b)
    {
      for (int i = 0; i < b; ++i)
      {
        cout<<a;
      }
    }
    else
    {
      int dum = max(a,b);
      int small = min(a,b);
      for (int i = 0; i < dum; ++i)
      {
        cout<<small;
      }
    }
    
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18

using namespace std;

int main(void){
  ll N;
  cin >> N;
  
  ll h, n, w;
  for (int i = 0; i < 3501; i++){
    for (int j = 0; j < 3501; j++){
      ll e = N*i*j;
      ll d = 4*i*j - N*i - N*j;
      if (d > 0 && e % d == 0){
        h = i;
        n = j;
        w = e / d;
        break;
      }
    }
  }


  cout << h << " " << n << " " << w << endl;
  

  return 0;
}


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

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

    int count = 1e9;
    for (int i = 0; i < n; i++) {
        cin >> a;
        int c = 0;
        for (c = 0; a%2 == 0; c++) {
            a /= 2;
        }
        count = min(count, c);
    }

    cout << count << endl;

    return 0;
}

Measured memory_bytes: 256
import java.util.*;

class Main{
  static long number,a,b,max,min,total,ave; 
  static int i = 0;
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    number = sc.nextInt();
    a = sc.nextLong();
    max = a;
    min = a;
    total = a;
    while(i< number-1) {
      b = sc.nextLong();
      if (b > max) {
        max = b;
      }
      if (b < min) {
        min = b;
      }
      total += b;
      i++;
    }
    System.out.println(min + " " + max + " " + total);
  }
}



Measured memory_bytes: 41152
N = int(input())
t = [[0,0,0]]+[[int(x) for x in input().split()] for _ in range(N)]
flag = True

for ind,i in enumerate(t[1:]):
    dist = i[0]-t[ind][0]-(sum(i[1:])-sum(t[ind][1:]))
    if(dist==0):
        pass
    elif(dist>0):
        if(dist%2==0):
            pass
        elif(i[1]!=t[ind][1] and i[2]!=t[ind][2] and dist>1):
            pass
        else:
            flag = False
            break
    else:
        flag = False
        break
if(flag):
    print('Yes')
else:
    print('No')


Measured memory_bytes: 21924
# include <bits/stdc++.h>
# define int        long long
# define all(vc)   vc.begin(),vc.end()
# define alll(vc)  vc.rbegin(),vc.rend()
# define pb        push_back
# define fi        first
# define se        second
# define speed     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
# define time      cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"
 
using namespace std;

void solve(){
    int n = 0, k = 0;
    cin >> n ;
         k = (n / 500);
         n -= k * 500;
         cout << (k * 1000) + ( ( n / 5 ) * 5);

}

int32_t main(){
    speed;
    cout<<fixed<<setprecision(0);
    int t = 1;
    //cin >> t;
    while( t-- ){
         solve();
         cout<<'\n';
    }

    time;
}



Measured memory_bytes: 256
#include <iostream>
#include <string.h>
#include <algorithm>
#include <vector>
#include <queue>

using namespace std;
typedef long long ll;
const ll INF=100000000000000LL;

int main() {
	int k,s;
	cin>>k>>s;
	int a=0;
	for(int x=0;x<=k;++x){
		for(int y=0;y<=k;++y){
			if(s-x-y>=0&&s-x-y<=k)a++;
		}
	}
	cout<<a<<endl;
	return 0;
}


Measured memory_bytes: 256
using System.Collections.Generic;
using System.Linq;
using System;

public class P
{
    public int i { get; set; }
    public int c { get; set; }
}

public class Hello
{
    public static void Main()
    {
        while (true)
        {
            string[] line = Console.ReadLine().Trim().Split(' ');
            var n = int.Parse(line[0]);
            var s = int.Parse(line[1]);
            if (n == 0 && s == 0) break;
            var d = new Dictionary<int, P>();
            for (int i = 0; i < n; i++)
            {
                var r = int.Parse(Console.ReadLine().Trim());
                if (d.ContainsKey(r)) d[r].c++;
                else d[r] = new P { i = r, c = 1 };
            }
            var ps = new P[d.Count()];
            var p = 0;
            foreach (var x in d.OrderByDescending(y =>y.Key)) ps[p++] = x.Value;
            var ans = getAns(ps, s);
            Console.WriteLine(ans);
        }
    }
    static int getAns (P[] ps, int s)
    {
        var ans = 0;
        var pc = ps.Count();
        for (int i = 0; i < pc; i++)
        {
            var w = ps[i].i;
            var w2 = ps[i].c;
            for (int j = i+ 1 ; j < pc; j++)
            {
                if (w + ps[j].i <= s) break;
                else ans += w2 * ps[j].c;
            }
            if (w + w > s && w2 >= 2) ans += w2 * (w2 - 1) / 2;
        }
        return ans;
    }
}



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

int main() {
	int N,K,p;
	cin >> N >> K;
	cout << 1+(N-K)/(K-1)+((N-K)%(K-1)!=0) << endl;
}

Measured memory_bytes: 256
package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n, sum int
	Fscan(in, &n, &sum)
	a := make([]int, n)
	for i := range a {
		Fscan(in, &a[i])
	}
	dp := make([][]int, n+1)
	for i := range dp {
		dp[i] = make([]int, sum+1)
	}
	dp[0][0] = 1
	const mod = 998244353
	for i, v := range a {
		for s, dpij := range dp[i] {
			if s < v {
				dp[i+1][s] = 2 * dpij
			} else {
				dp[i+1][s] = 2*dpij + dp[i][s-v]
			}
			dp[i+1][s]%=mod
		}
	}
	Fprint(out, dp[n][sum])
}

func main() { run(os.Stdin, os.Stdout) }


Measured memory_bytes: 76960
#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;

void swap(int a, int b) {
	int tmp = a;
	a = b;
	b = tmp;
}

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

	int a[100005];

	for (int i = 1; i <= 10000 ;i++) {
		a[i] = 0;
	}

	for (int i = 1; 6*i*i<=10000; i++) {
		a[6 * i*i] += 1;
	}

	for (int i = 1; 3 * i*i + 2 * i <= 10020; i++) {
		for (int j = 1; 3 * i*i + 2 * i*j + j * j <= 10000; j++) {
			if (i != j) {
				a[3 * i*i + 2 * i*j + j * j] += 3;
			}
		}
	}
	
	for (int i = 1; i*i+2*i <= 10005; i++) {
		for (int j = 1; j*j + 2 * j <= 10005; j++) {
			for (int k = 1; k*k + 2 * k <= 10005; k++) {
				if (i != j && j != k && k != i) {
					a[i*i+j*j+k*k+i*j+j*k+k*i] += 1;
				}
			}
		}
	}


	for (int i = 1; i <= n; i++) {
		cout << a[i] << endl;
	}

	return 0;
}

Measured memory_bytes: 3792
#include <stdio.h>

int main(void) {
	int k, i, a, sum=0;
	
	while(scanf("%d", &k)!=EOF){
	sum=0;

		if(k==0)
		break;
		
		for(i=0;i<k*(k-1)/2;i++){
			scanf("%d", &a);
			sum+=a;
		}

		printf("%d\n", sum/(k-1));
	}	
	
	return 0;
}

Measured memory_bytes: 600
#import numpy as np
#import collections
#import math

#f = open('./input_B.txt')
#
#list(map(int, f.readline().split()))
#map(int, f.readline().split())
#int(f.readline())
#f.readline()


ans = 0
#list(map(int, input().split()))
N,D = map(int, input().split())
D2 = D**2
for i in range(N):
    X,Y = map(int, input().split())
    if X**2 + Y**2 <= D2:
        ans+=1
#int(input())
#input()


print(ans)

Measured memory_bytes: 9180
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>

using namespace std;

int main()
{
    long long a,b,c,d;
    cin>>a>>b>>c>>d;
    if(a<0&&c<0){
        cout<<max(b*d,abs(a*c));
    }else if(b<0&&c>=0){
        cout<<b*c<<endl;
    }else if(a>=0&&d<0){
        cout<<a*d<<endl;
    }else{
        cout<<b*d<<endl;
    }
}

Measured memory_bytes: 3552
#include <iostream>

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

    int sumCandyNumber = 0;
    for(int i=1; i<=totalChildNumber; i++) {
        sumCandyNumber += i;
    }

    std::cout << sumCandyNumber << std::endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <ctime>
using namespace std;

#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define RFOR(i,b,a) for (int i = (b)-1; i >= (a); i--)
#define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++)
#define FILL(a,value) memset(a, value, sizeof(a))

#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair

typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;

const double PI = acos(-1.0);  
const int INF = 1000 * 1000 * 1000 + 7;
const int MOD = 1000 * 1000 * 1000 + 7;
const LL LINF = INF * (LL) INF;
const int MAX = 100010;
const int N = 10 * MAX;

int a[MAX];

int main()
{
   // freopen("in.txt", "r", stdin);
    int n;
    cin >> n;
    FOR(i, 0, n) {
        cin >> a[i];
    }
    int r = 0;
    int ans = 0;
    while(r != n) {
        int l = r;
        while(l+1 < n && a[l] >= a[l+1])++l;
        int L = r;
        while(L+1 < n && a[L] <= a[L+1])++L;
        //cout << l << ' ' << L << endl;
        r = max(l+1, L+1);
        ++ans;
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 640
#[macro_use]
mod input {

use std;
use std::io;

const SPLIT_DELIMITER: char = ' ';

#[macro_export]
#[allow(unused_macros)]
macro_rules! input {
    ( $($x:expr ),*) => {
        {
            let temp_str = input_line_str();
            let mut split_result_iter = temp_str.split_whitespace();
                $(
                let buf_split_result = split_result_iter.next();
                let buf_split_result = buf_split_result.unwrap();
                    ($x) = buf_split_result.parse().unwrap();
                )*
        }
    };
}

#[allow(dead_code)]
pub fn input_line_str() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

#[allow(dead_code)]
pub fn p<T>(t: T)
where
    T: std::fmt::Display,
{
    println!("{}", t);
}

#[allow(dead_code)]
pub fn input_vector2d<T>(line: usize) -> Vec<Vec<T>>
where
    T: std::str::FromStr,
{
    let mut v: Vec<Vec<T>> = Vec::new();

    for _ in 0..line {
        let vec_line = input_vector();
        v.push(vec_line);
    }
    v
}

#[allow(dead_code)]
pub fn input_vector<T>() -> Vec<T>
where
    T: std::str::FromStr,
{
    let mut v: Vec<T> = Vec::new();

    let s = input_line_str();
    let split_result = s.split(SPLIT_DELIMITER);
    for z in split_result {
        let buf = match z.parse() {
            Ok(r) => r,
            Err(_) => panic!("Parse Error"),
        };
        v.push(buf);
    }
    v
}

#[allow(dead_code)]
pub fn str2vec(s: &str) -> Vec<char> {
    let mut v: Vec<char> = Vec::new();
    for c in s.chars() {
        v.push(c);
    }
    v
}

}

use input::*;
use std::collections::HashSet;

fn main() {
    let n: usize;
    input!(n);
    let map = input_vector::<String>()
        .iter()
        .cloned()
        .collect::<HashSet<_>>();
    let ans = match map.len() {
        3 => "Three",
        4 => "Four",
        _ => "",
    };
    p(ans);
}

Measured memory_bytes: 4352
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		if(A == 1 && B == 13) {
			System.out.println("Alice");
		} else if(A == 13 && B == 1) {
			System.out.println("Bob");
		} else if(A > B) {
			System.out.println("Alice");
		} else if(A < B ) {
			System.out.println("Bob");
		} else {
			System.out.println("Draw");
		}
		scan.close();
	}

}


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

using namespace std;
#define int long long
const int MOD = 1000000007;

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    vector<int> ok(100110, 0);
    ok[0] = 1;
    for(int i=0;i<=100000;i++){
        if(ok[i]){
            for(int j = 100;j <=105;j++){
                ok[i + j] = 1;
            }
        }
    }
    cout << ok[N] << endl;
}

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

#define int long long
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define all(v) (v).begin(),(v).end()
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define pb push_back
#define fi first
#define se second
template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

int N,E,T;
int W[300];
int G[1000],C[1000],S[1000][10];

int F[300];

signed main(){
    cin>>N>>E>>T;
    rep(i,N)cin>>W[i];
    rep(i,E){
        cin>>G[i]>>C[i];
        G[i]--;
        rep(j,C[i]){
            cin>>S[i][j];
            S[i][j]--;
        }
    }

    fill_n(F,N,1001001001);
    rep(i,N)if(W[i])F[i]=1;

    for(int i=0;i<N;i++){
        for(int j=0;j<E;j++){
            vint v;
            rep(k,C[j])v.pb(F[S[j][k]]);
            sort(all(v));
            reverse(all(v));
            int w=0;
            rep(k,C[j]){
                if(w-k<v[k]){
                    w=k+v[k];
                }
            }
            chmin(F[G[j]],w);
        }
    }
    T--;
    if(F[T]==1001001001)cout<<-1<<endl;
    else cout<<F[T]<<endl;
    return 0;
}


Measured memory_bytes: 3240
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <functional>
#include <stack>
#include <numeric>
typedef long long ll;
using namespace std;
const int MOD = (int)1e9 + 7;
const ll INF = (ll)1e18 + 7;
#define int long long
#define vint vector<int>
#define pint pair<int,int>
#define pb(a) push_back(a)
#define all(v) v.begin(),v.end()
#define dbg(x) cerr << #x << " = " << (x) << endl
#define yn(b) cout << ((b) ? "Yes" : "No") << endl
#define YN(b) cout << ((b) ? "YES" : "NO") << endl

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


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

	int N;
	cin >> N;
	vint A(N*3);

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

	sort(all(A),greater<int>());

	int ans = 0;

	for (int i = 1; i <= N; i++) {
		ans += A[i * 2-1];
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 2560
#include<bits/stdc++.h>	
 
#define f first
#define s second
#define pb push_back
                         	
#define ll long long
 
#define int ll
 
#define ull unsigned long long
 
#define mp make_pair
                          
  
using namespace std;
                       
 
const int inf = 1e9 + 7;
 
const ll ll_inf = 1e18;
const int K = 2e6 + 50;
const int N = 3e5 + 200;
 
const int bl = 320;
 
const int ep = 1e-7;
 
const int pro = 31;
 
const double pi = 3.141592653589793238462643;
                                         
ll binpow (ll a, ll n)
{
	if(n == 0)
		return 1ll;           
    ll res = 1;
    while (n) {
        if (n & 1)                                          
        {
            res *= a;
            res %= inf;
        }      	
        a *= a;
        n >>= 1;
        a %= inf;
    }                          
    return res;
}   
          
  
 
void boost()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);                                        
}
 
void fr()
{
    freopen("road-to-work.in","r",stdin);
    freopen("road-to-work.out","w",stdout);
}

int a[N];
 
void solve() 
{
	int n,k;
	cin >> n >> k;
	int l = 1;
	for (int i = 1;i <= n;++i)
	{
		cin >> a[i];	
	}
	for (int i = k + 1;i <= n;++i)
	{
		if (a[i] > a[l])
		{
		 	cout << "Yes\n";
		}
		else
		{
			cout << "No\n";
		}
		l++;
	}
}   	                        	
 
main()
{
	//boost();
	int q = 1;
	//cin >> q;
	while(q--)
	{
		solve();
	}
}

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

int main() {
	int a, b, c, n = 0;
	cin >> a >> b >> c;
	for (int i = a; i <= b; i++) {
		if ( c % i == 0) {
			n = n + 1;
		}
	}
	cout << n << endl;
}


Measured memory_bytes: 3072
#include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

typedef unsigned long ul;
typedef long long ll;
typedef pair<ul, ul> P;
map<int, int> dp;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ul N, M;
  int C;
  cin >> N >> M >> C;
  vector<int> B(M, 0);
  vector<vector<int>> A(N, vector<int>(M, 0));
  REP(ii, M) { cin >> B[ii]; }
  int cnt = 0;
  REP(ii, N) {
    ll ans = 0;
    for (int jj = 0; jj < M; ++jj) {
      cin >> A[ii][jj];
      ans += A[ii][jj] * B[jj];
    }
    ans += C;
    if (ans > 0) ++cnt;
  }
  cout << cnt << endl;
}


Measured memory_bytes: 384
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

int main(int argc, char* argv[]){
    int a, b, c;
    cin >> a >> b >> c;
    int mx = max(a, max(b, c));
    int mn = min(a, min(b, c));

    cout << mx-mn << endl;
}



Measured memory_bytes: 256
//----------BHAVIK DIWANI(PICT_COMP)---------------
#include<bits/stdc++.h>
#include<stdlib.h>
#include<stdio.h>
#define mod 1000000007
#define ll long long
#define int long long
#define ull unsigned long long
#define test ll t; cin>>t; while(t--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define FOR(p,n) for(ll i=p;i<(ll)n;i++)
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
ll gcd(ll a,ll b){ if(b==0) return a;    return gcd(b,a%b);}
ll lcm(ll a,ll b) { return (a/gcd(a,b)*b);}
ull power(ull a, ull b) {a %= mod;  ull res = 1;  while (b > 0) { if (b & 1) res = res * a % mod;  a = a * a % mod;  b >>= 1; }  return res%mod; }
ll modmul(ll x, ll y){return (x*y)%mod;}
ll modadd(ll x, ll y){return (x+y)%mod;}
ll modsub(ll x, ll y){return (x-y+mod)%mod;}
ll fact[1000007]={0};
void facto() {fact[0]=1;fact[1]=1;for(int i=2;i<100007;i++)fact[i]=(fact[i-1]*i)%mod;}
ll ncr(ll n,ll r) {ll res=1; res=fact[n]; res=(res*(power(fact[r],mod-2)))%mod; res=(res*(power(fact[n-r],mod-2)))%mod; return res;}
ll npr(ll n,ll r) {ll res=1; res=fact[n]; res=(res*(power(fact[n-r],mod-2)))%mod; return res;}
#define max 1000005
bool prime[max];
/*ull sieve()
{
	memset(prime,true,sizeof(prime));
	for(ull p=2;p*p<max;p++)
	{
		if(prime[p]==true){
			for(ull i=2*p;i<max;i+=p)
			{
				prime[i]=false;
			}
		}
	}
	prime[0]=0;
	prime[1]=0;
}*/
using namespace std;
signed main()
{
	fastio;
	int n,k;
	cin>>n>>k;
	cout<<min(n%k,abs(n%k-k))<<endl;
}

Measured memory_bytes: 256
import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！
        
        Scanner sc = new Scanner(System.in);
        double n = sc.nextInt();
        double k = sc.nextInt();
        int answer = (int)Math.ceil((n - 1) / (k - 1));
        
        System.out.println(answer);
    }
}

Measured memory_bytes: 22868
#include <iostream>
#include <string>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <utility>
#include <functional>
#include <deque>
#include <cctype>


using ll = long long;
typedef std::pair<int, int>p;

ll min(ll a, ll b) {
	if (a >= b)return b;
	else return a;
}
ll max(ll a, ll b) {
	if (a >= b)return a;
	else return b;
}
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a%b);

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

const ll Z = 1000000007;
const ll INF = 1 << 30;
bool flag = true;
struct edge { int to, cost; };
std::vector<edge>v[100];
bool u[100];


int main() {
	int n, k, a[200010], b[200010] = { 0 };
	std::cin >> n >> k;
	for (int i = 0;i < n;i++) {
		std::cin >> a[i];
		b[a[i]]++;
	}
	std::sort(a, a + n);
	int sum = 1;
	for (int i =0 ;i < n-1;i++) {
		if (a[i] != a[i + 1]) {
			sum++;
		}
	}
	std::sort(b, b + 200000);
	int ans = 0;
	for (int i = 0;i <= 200000;i++) {
		if (sum <= k)break;
		if (b[i] != 0) {
			ans += b[i];
			sum--;
		}
	}
	std::cout << ans << std::endl;
}

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


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

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

int f(int x) {
  int res = 0;
  while (x % 2 == 0) {
    x /= 2;
    res++;
  }
  return res;
}


int main() {
  ll N, M;
  cin >> N >> M;
  vector<int> a(N);
  rep(i, N) cin >> a[i];
  rep(i, N) {
    if (a[i] % 2 == 1) {
      cout << 0 << endl;
      return 0;
    }
    a[i] /= 2;
  }

  int t = f(a[0]);
  rep (i, N) {
    if (f(a[i]) != t) {
      cout << 0 << endl;
      return 0;
    }
    a[i] >>= t;  // 2でt回割る
  }
  M >>= t;

  ll l = 1;
  rep(i, N) {
    l = lcm(l, a[i]);
    if (l > M) {
      cout << 0 << endl;
      return 0;
    }
  }
  
  M /= l;
  int ans = (M + 1) / 2;
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 640
/****Author: Barish Namazov****/
#include <bits/stdc++.h>

using namespace std;

/***TEMPLATE***/
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()

#define F first
#define S second
#define pb push_back

#define endl '\n'

const int max4 = 10004;
const int maxx = 100005;
const int max6 = 1000006;
const int lg5 = 17;

const int INF = 2 * 1000000007;
const long long INFLL = 4LL * 1000000000 * 1000000000;

/***************/

int powmod (int a, int b, int mod) {
    int res = 1; a %= mod;
    for (; b; b >>= 1) {
        if (b & 1) {
            res = 1LL * res * a % mod;
        }
        a = 1LL * a * a % mod;
    }
    return res;
}
#define ll long long
ll gcd (ll a, ll b) {
    while (b > 0) {
        ll t = a % b;
        a = b, b = t;
    }
    return a;
}

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

int is_prime (int n) {
    if (n <= 1 || n > 3 && (n % 2 == 0 || n % 3 == 0))
        return 0;
    for (int i = 5, t = 2; i * i <= n; i += t, t = 6 - t)
        if (n % i == 0)
            return 0;
    return 1;
}

/******Don't forget to use long long when needed!!******/

int arr[maxx], brr[maxx];
int main() {
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    ios_base :: sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> arr[i] >> brr[i];
    }
    long long res = 0;
    for (int i = n; i >= 1; i--) {
        int x = (brr[i] - 1LL * (res + arr[i]) % brr[i]) % brr[i];
        res += x;
    }
    cout << res << endl;
    return 0;
}


Measured memory_bytes: 1024
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;} return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;} return 0;}
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(vec) vec.begin(),vec.end()
typedef long long ll;
typedef pair<ll,ll> l_l;
typedef pair<int,int> i_i;
const ll mod=1e9+7;
const int inf=1<<30;

int main(){
  int n,m; cin >> n >> m;
  vector<int> a(n);
  rep(i,n) cin >> a[i];
  ll ans=0;
  for(int i=0;i<=min(n,m);i++){
    for(int j=0;j<=i;j++){
      priority_queue<int, vector<int>, greater<int>> q;
      for(int k=0;k<j;k++){
        q.push(a[k]);
      }
      for(int k=0;k<i-j;k++){
        q.push(a[n-1-k]);
      }
      for(int k=0;k<m-i;k++){
        if(q.size()&&q.top()<0) q.pop();
      }
      ll mx=0;
      int l=q.size();
      rep(k,l){
        mx+=q.top();
        q.pop();
      }
      if(mx>ans){
        ans=mx;
      }
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
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 long long INF = 1e18;
//const ll mod = 1000000007;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll N;
    cin >> N;
    vector<ll> a(N);
    for(int i = 0; i < N; i++) cin >> a[i];
    N = a.size();
    int ans = 0;
    for(int i = 0; i < N; i++) {
        for(int j = 0; j < i; j++) {
            for(int k = 0; k < j; k++) {
                if(a[i] == a[j]) continue;
                if(a[i] == a[k]) continue;
                if(a[k] == a[j]) continue;
                if(a[k] >= a[i] + a[j]) continue;
                if(a[i] >= a[k] + a[j]) continue;
                if(a[j] >= a[i] + a[k]) continue;
                ans++;
            }
        }
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3624
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String chr[] = in.split(" ");
			int a = Integer.parseInt(chr[0]);
			int b = Integer.parseInt(chr[1]);
			int c = Integer.parseInt(chr[2]);
			 System.out.println(!(a==b && b==c)
					 && (a==b|| a==c || b==c)?"Yes":"No");
		}
	}
}

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


int main()
{
	

    string s,t;
    cin>>s>>t;
    int val1,val2;
    cin>>val1>>val2;
    string u;
    cin>>u;
    if(s.compare(u)==0)
        val1--;
    else if(t.compare(u)==0)
        val2--;
    cout<<val1<<" "<<val2<<endl;
    return 0; 

}


Measured memory_bytes: 256
N,A,B = map(int, input().split())
na = nb = 0
S = list(input())
for c in S:
    #print(na,nb,end='')
    if c == 'a':
        na += 1
        if na + nb <= A + B:
            print('Yes')
        else:
            print('No')
        
    elif c == 'b':
        nb += 1
        if na + nb <= A + B and nb <= B:
            print('Yes')
        else:
            nb -= 1
            print('No')
       
    else:
        print('No')



Measured memory_bytes: 9924
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
//INSERT ABOVE HERE

template<typename T1,typename T2> void chmin(T1 &a,T2 b){if(a>b) a=b;};
template<typename T1,typename T2> void chmax(T1 &a,T2 b){if(a<b) a=b;};

const Int MAX = 1010;
Int dp[MAX][MAX];
signed main(){
  Int LIM;
  string s;
  cin>>LIM>>s;
  s='+'+s;
  Int n=s.size();
  
  const Int INF = 1e15;
  for(Int i=0;i<MAX;i++)
    for(Int j=0;j<MAX;j++)
      dp[i][j]=INF;
  
  dp[0][0]=0;
  
  for(Int i=0;i<n;i++){
    for(Int j=0;j<MAX;j++){
      if(dp[i][j]>=INF) continue;
      for(Int k=2;k<=12&&i+k<=n;k++){
	for(Int x=0;x<=k;x++){
	  Int d=s[i]!='+';
	  for(Int l=1;l<k;l++) d+=s[i+l]=='+';	
	  Int res=0;
	  for(Int l=1;l<k;l++){
	    res*=10;
	    if(s[i+l]=='+'){
	      if(l==1&&k>2) res++;
	      continue;
	    }
	    if(l==1&&k>2&&s[i+l]=='0'){
	      res++;
	      d++;
	      continue;
	    }
	    if(x+1<=l){
	      res+=s[i+l]-'0';
	      continue;
	    }
	    if(l==1&&k>2){
	      res++;
	      d+=s[i+l]!='1';
	    }else{
	      d+=s[i+l]!='0';
	    }
	  }
	  //cout<<i<<" "<<j<<" "<<k<<" "<<x<<":"<<dp[i][j]<<" "<<res<<endl;
	  chmin(dp[i+k][j+d],dp[i][j]+res);
	}
      }
    }
  }
  
  
  Int ans=INF;
  for(Int j=0;j<MAX;j++)
    if(dp[n][j]<=LIM) chmin(ans,j);
  if(ans>=INF) ans=-1;
  cout<<ans<<endl;
  return 0;
}



Measured memory_bytes: 11148
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  while(1){
    int n;
    cin >> n;
    if(n==0){
      break;
    }
    vector<int> a(n);
    int ma=0;
    int mi=1000;
    int sum=0;
    rep(i,n){
      cin >> a[i];
      ma=max(a[i],ma);
      mi=min(a[i],mi);
      sum+=a[i];
    }
    sum=sum-mi-ma;
    int ave=sum/(n-2);
    cout << ave << endl;
  }
  return 0;
  
}



Measured memory_bytes: 3000
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
#include <deque>
#include <stdio.h>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--)
#define iREP(i,Itr) for(auto (i)=(Itr).begin();(i)!=(Itr).end();(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define LBOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
#define UBOUND(Itr,val) upper_bound((Itr).begin(),(Itr).end(),(val))
typedef long long ll;


int main(){

    while(true){
        ll K; cin>>K;
        if(K==0)break;
        
        ll sum=0;
        REP(i,K*(K-1)/2){
            ll t; cin>>t;
            sum+=t;
        }
        
        cout<<sum/(K-1)<<endl;
    }
    
    return 0;
}

Measured memory_bytes: 3028
n = int(input())

rt = [input() for i in range(n)]

minv = int(rt[0])
maxv = int(rt[1]) - int(rt[0])

for j in range(1,n):
    maxv = max(maxv,int(rt[j]) - minv)
    minv = min(minv,int(rt[j]))

print(maxv)

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

int main() {
  char c; cin >> c;
  if(c=='A') cout << "T" << endl;
  if(c=='T') cout << "A" << endl;
  if(c=='C') cout << "G" << endl;
  if(c=='G') cout << "C" << endl;
  
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, start, end) for (long long i = start; i < end; ++i)
#define repreverse(i, start, end) for (long long i = start; i >= end; --i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define len(x) ((long long)(x).size())
#define lcm(a, b) ((a) / __gcd((a), (b)) * (b))
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vllvll = vector<vll>;
using vc = vector<char>;
using pll = pair<ll, ll>;
template<class T> void print1d(T x,ll n=-1){if(n==-1)n=x.size();rep(i,0,n){cout<<x[i]<<' ';}cout<<'\n';}
template<class T> void print2d(T x,ll r=-1,ll c=-1){if(r==-1)r=x.size();if(c==-1)c=x[0].size();rep(i,0,r)print1d(x[i],c);}
template<class T, class U> bool haskey(T mp, U key) { return mp.find(key) != mp.end(); }
template<class T, class U> bool isin(T el, U container) { return find(all(container), el) != container.end(); }
template<class T> bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
template<class T> bool even(T n) { return ! (n & 1); }
template<class T> bool odd(T n) { return n & 1; }
template<class T> ll rup(T a, T b) { return a % b ? a / b + 1 : a / b; }
template<class T> ld deg2rad(T deg) { return M_PI * deg / 180.0; }
template<class T> ld rad2deg(T rad) { return 180.0 * rad / M_PI; }
const long double pi = M_PI;
const long long big = 1LL << 50;
const long long inf = 1LL << 60;
const long long mod = 1e9 + 7;
ll intpow(ll a, ll n, ll _mod=numeric_limits<ll>::max()) { ll p=1; while (n) { if (n&1) p=p*a%_mod; a=a*a%_mod; n>>=1; } return p; } 
ll modc(ll a, char op, ll b, ll _mod=mod) { a %= _mod; b %= _mod; ll res = 1; switch(op) {
        case '+': res = (a + b) % _mod; break;
        case '-': res = (a - b) % _mod; break;
        case '*': res = a * b % _mod; break;
        case '/': res = modc(a, '*', modc(b, '^', _mod-2, _mod), _mod); break;
        case '^': res = intpow(a, b, _mod); break;
        case 'P': rep(i, a-b+1, a+1) res = modc(res, '*', i, _mod); break;
        case 'C': res = modc(modc(a, 'P', b, _mod), '/', modc(b, 'P', b, _mod)); break; } if (res < 0) res += _mod; return res; }


int main()
{
        ll N;
        cin >> N;
        rep(h, 1, 3501) {
                rep(n, 1, 3501) {
                        ll a = 4*h*n - n*N - h*N;
                        ll b = N*h*n;
                        ll g = __gcd(a, b);
                        a /= g;
                        b /= g;
                        bool f = a == 1 and b > 1;
                        if (not f) continue;
                        ll w = b;
                        cout << h << ' ' << n << ' ' << w << endl;
                        return 0;
                }
        }
}


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

#define ll long long int
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define all(A) A.begin(), A.end()
#define sz(A) (int)A.size()
typedef vector <int> vi;
typedef vector <ll> vl;
typedef pair <int, int> pii;
typedef tuple <int, int, int> tii;
const ll mod = 1e9 + 7;
//const ll mod = 998244353;
const int inf = 1e9;
//const ll inf = 1e18;
const int N = 2e5;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int x[5];
	for (int i = 0; i < 5; i++) cin >> x[i];
	for (int i = 0; i < 5; i++) {
		if (x[i] == 0) {
			cout << i + 1 << "\n";
			return 0;
		}
	}
 	return 0;
}

Measured memory_bytes: 3648