akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>

using namespace std;

#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x)                                                                        \
	sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<(c i) \
	{
sim > struct rge
{
	c b, e;
};
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c *x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug
{
#ifdef LOCAL
	~debug()
	{
		cerr << endl;
	}
	eni(!=) cerr << boolalpha << i;
	ris;
} eni(==) ris << range(begin(i), end(i));
}
sim, class b dor(pair<b, c> d)
{
	ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d)
{
	*this << "[";
	for (auto it = d.b; it != d.e; ++it)
		*this << ", " + 2 * (it == d.b) << *it;
	ris << "]";
}
#else
	sim dor(const c &)
	{
		ris;
	}
#endif
}
;
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define forn(i, n) for (ll i = 0; i < int(n); i++)
#define rfor(n, i) for (ll i = (n - 1); i >= 0; --i)
#define all(V) V.begin(), V.end()
#define rall(V) V.rbegin(), V.rend()
#define len(V) (int)V.size()
#define ll long long
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define endl '\n'
#define M_PI 3.14159265358979323846
#define EPS 1e-7

void solve()
{
	ll a, b, k; cin >> a >> b >> k;
	set<ll> s;
	for (int i = a; i < a + k; ++i) 
	{
		if (i >= a && i <= b) s.insert(i);
	}
	for (int i = b - k + 1; i <= b; ++i)
		if (i >= a && i <= b)
			s.insert(i);
	for (auto x: s) cout << x << endl;
}

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

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

struct Team{
  int id, u, a, p;
  bool operator<(const Team& rhs) const{
    return a > rhs.a || (a == rhs.a && 
			 (p < rhs.p || 
			  (p == rhs.p && id < rhs.id))
			 );
  }
};

int main(){
  int N;
  while(cin >> N, N){
    vector<Team> ts(N);
    for(int i=0;i<N;++i)
      cin >> ts[i].id >> ts[i].u >> ts[i].a >> ts[i].p;
    sort(ts.begin(),ts.end());
    int cnt = 0, U[1001];
    fill(U,U+1001,0);
    for(int i=0;i<N;++i){
      if(cnt < 10 && U[ts[i].u] < 3){
	++cnt, ++U[ts[i].u];
	cout << ts[i].id << endl;
      }
      else if(cnt < 20 && U[ts[i].u] < 2){
	++cnt, ++U[ts[i].u];
	cout << ts[i].id << endl;
      }
      else if(cnt < 26 && U[ts[i].u] < 1){
	++cnt, ++U[ts[i].u];
	cout << ts[i].id << endl;
      }
    }
  }

  return 0;
}

Measured memory_bytes: 1216
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define reps(i,a,b) for(int i=a;i<b;++i)
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
using namespace std;
using ll = long long;
using P = pair<int, int>;
template<typename T> inline bool chmax(T &a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T> inline bool chmin(T &a,T b){if(b<a){a=b;return 1;}return 0;}
template<typename T> vector<T> make_vec(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>
auto make_vec(size_t a,Ts... ts){return vector<decltype(make_vec<T>(ts...))>(a,make_vec<T>(ts...));}
template<typename T,typename U,typename... V>
typename enable_if<is_same<T,U>::value>::type fill_v(U &u,const V... v){u=U(v...);}
template<typename T,typename U,typename... V>
typename enable_if<!is_same<T,U>::value>::type fill_v(U &u,const V... v){for(auto &e:u)fill_v<T>(e,v...);}

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

    int q;
    cin >> q;
    map<string, int> mp;
    while (q--) {
        int com, x; string key;
        cin >> com >> key;
        if (com == 0) {
            cin >> x;
            mp[key] = x;
        } else if (com == 1) {
            cout << mp[key] << endl;
        } else {
            mp.erase(key);
        }
    }
}



Measured memory_bytes: 25904
import Control.Monad
import qualified Data.ByteString.Char8 as C
import Data.Function
import Data.List
import Data.Ord

main = C.interact $ put . sol . get

get = fmap (unfoldr (C.readInt . C.dropWhile (==' '))) . C.lines

put = C.pack . show

sol ([_,w]:wvs) = maximum . fmap last
  . filter ((<=w) . head) . fmap (foldr1 (zipWith (+)))
  . sequenceA . fmap (scanl (zipWith (+)) [0,0])
  . groupBy ((==) `on` head) $ sortBy (flip compare) wvs

Measured memory_bytes: 4476
#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(){
  int a,b;
  cin >> a >> b;
  ll sum = a;
  if(a > b)
    sum--;
  cout << sum << endl;
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <map>

using lint = long long;

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

    std::vector<int> sum(n + 1, 0);
    for (int i = 1; i <= n; ++i) {
        std::cin >> sum[i];
        (sum[i] += sum[i - 1] - 1) %= k;
    }

    std::map<int, lint> cnt;
    lint ans = 0;

    for (int r = 0; r <= n; ++r) {
        if (r >= k) --cnt[sum[r - k]];

        int x = sum[r];
        if (!cnt.count(x)) cnt[x] = 0;
        ans += cnt[x];
        ++cnt[x];
    }

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


Measured memory_bytes: 13568
import java.io.IOException;
import java.util.Scanner;

public class Main {
	public static int[] takos=new int[101];
	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		sc.nextLine();
		String S=sc.nextLine();
		int ans=1;
		char start=S.charAt(0);
		for(int i=1;i<S.length();i++) {
			if(start!=S.charAt(i)) {
				start=S.charAt(i);
				ans++;
			}
		}
		System.out.println(ans);
	}

}


Measured memory_bytes: 26184
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define N 200010
int n,a[N],b[N],c[N],d[N];
int main(){
    cin>>n;
    rep(i,n)cin>>a[i];
    rep(i,n)cin>>b[i];
    rep(i,n+1)c[i]=d[i]=0;
    rep(i,n)c[a[i]]++,d[b[i]]++;
    rep(i,n+1){
	if(c[i]+d[i]>n){
	    cout<<"No\n";
	    return 0;
	}
    }
    for(int i=1;i<=n;i++){
	c[i]+=c[i-1];
	d[i]+=d[i-1];
    }
    int x=0;
    for(int i=1;i<=n;i++)x=max(x,c[i]-d[i-1]);
    cout<<"Yes\n";
    rep(i,n){
	if(i)cout<<" ";
	cout<<b[(i+n-x)%n];
    }
    cout<<"\n";
}


Measured memory_bytes: 6716
#include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
int N,M;
vector<int>v;
typedef pair<int,int>P;
map<P,LL>m;
LL MOD=1e9+7;

LL cont=0;

LL kai[100011];
LL rkai[100011];

void calc(){
	kai[0]=1;
	kai[1]=1;
	REP(i,100005){
		kai[i+2]=kai[i+1]*(i+2);
		kai[i+2]%=MOD;
	}
	LL temp=100001;
	LL now=kai[temp];
	LL a=MOD-2;
	rkai[temp]=1;
	while(a!=0){
		if(a%2==1){
			rkai[temp]*=now;
			rkai[temp]%=MOD;
		}
		now*=now;
		now%=MOD;
		a/=2;
	}
	for(int i=temp-1;i>=0;i--){
		rkai[i]=rkai[i+1]*(i+1);
		rkai[i]%=MOD;
	}
}

LL dfs(int x,int cnt){
	if(m.count(P(x,cnt))>0){
		return m[P(x,cnt)];
	}
	if(x==1){
		LL now=kai[N]*rkai[cnt];
		now%=MOD;
		now*=rkai[N-cnt];
		now%=MOD;
		return now;
	}
	if(cnt==1)return 1;
	LL ans=0;
	REP(i,v.size()){
		if(x<v[i])break;
		if(x%v[i]==0){
			ans+=dfs(x/v[i],cnt-1);
			ans%=MOD;
		}
	}
	cont++;
	m[P(x,cnt)]=ans;
	//cout<<x<<" "<<cnt<<" "<<ans<<endl;
	return ans;
}

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

	for(int i=1;i<1e5;i++){
		if(M%i==0){
			if(i!=1){
				v.push_back(i);
			}
			if((M/i)!=1){
				v.push_back(M/i);
			}
		}
	}
	sort(v.begin(),v.end());
	//cout<<v[0]<<endl;
	v.erase(unique(v.begin(),v.end()),v.end());
	cout<<dfs(M,N)<<endl;
}

Measured memory_bytes: 2176
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <cstring>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int, int> pint;
template <class T> inline void chmax(T &a, const T b) { a = max(a, b); }
template <class T> inline void chmin(T &a, const T b) { a = min(a, b); }
template <class T> void pp(T v, int n) { REP(i,n) cout<<v[i]<< ' '; cout << endl; }

void inline TorF(bool tf, const string &trueMessage, const string &falseMessage) { 
  cout << (tf ? trueMessage : falseMessage) << endl;
}
void inline YESNO(bool tf) { TorF(tf, "YES", "NO"); }
void inline YesNo(bool tf) { TorF(tf, "Yes", "No"); }

void f(ll N) {
  ll m = 1LL;
  vector<int> ans;
  while(true) {
    N -= m;
    ll r = N % 26LL;
    ans.push_back(r);
    N /= 26LL;
    if(N == 0) break;
  }
  reverse(ans.begin(), ans.end());
  //  pp(ans, ans.size()); 
  REP(i,ans.size()) {
        cout << (char)(ans[i]   + 'a') ;
  }
  cout << endl;
  return ;
}

int main() {
#ifdef DEBUG
  for(int i = 1; i <= 702; i++) {
    cout << i << " ";
    f(i);
  }
#endif
  ll N; cin>>N;
  f(N);
  return 0;
}


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

using ll = long long;
using ull = unsigned long long;

const double PI = acos(-1);
const int inf = 2e9;
const ll INF = 2e18;
const ll MOD = 1e9+7;

#define sz(s) (s).size()
#define pb push_back
#define fi first
#define se second
#define REP(i,n) for (int i = 0; i<n; i++)
#define ALL(a) begin(a), end(a)

int main (void) {
    int N;
    cin>>N;
    vector<vector<int>> A(2,vector<int>(N));
    REP(i,2) REP(j,N) cin>>A[i][j];
    int ans = 0;
    REP(i,N) {
        int candi = 0;
        for (int j=0;j<i+1;j++) {
            candi += A[0][j];
        }
        for (int j=i;j<N;j++) {
            candi += A[1][j];
        }
        ans = max(ans,candi);
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define INF (1<<30)
#define MOD 1000000007
#define l_ength size
using ll = long long;
using namespace std;

int main(){
	int h, w, k;
	cin >> h >> w >> k;
	ll dp[h+1][w];
	memset( dp, 0, sizeof(dp) );
	dp[0][0] = 1;
	vector<int> amida;
	for( int i = 0; i < (1<<(w-1)); ++i ){
		bool flag = false;
		for( int j = 0; j < (w-2); ++j ){
			int adj = (1<<j) + (1<<(j+1));
			if( ( i & adj ) == adj ){
				flag = true;
				break;
			}
		}
		if( !flag ){
			amida.push_back(i);
		}
	}
	for( int i = 1; i <= h; ++i ){
		for( int a : amida ){
			for( int j = 0; j < w; ++j ){
				if( j > 0 && ( a & (1<<(j-1)) ) ){
					dp[i][j] += dp[i-1][j-1];
					dp[i][j] %= MOD;
				} else if ( j < w-1 && ( a & (1<<j) ) ){
					dp[i][j] += dp[i-1][j+1];
					dp[i][j] %= MOD;
				} else {
					dp[i][j] += dp[i-1][j];
					dp[i][j] %= MOD;
				}
			}
		}
	}
	cout << dp[h][k-1] << endl;
	return 0;
}

Measured memory_bytes: 256
def main():
    N = int(input())
    words = []
    success = True
    for _ in range(N):
        word = input()
        if word in words:
            success = False
        if not words == []:
            if not words[-1][-1] == word[0]:
                success = False
        words.append(word)
    if success:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Measured memory_bytes: 3064
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int m1 = sc.nextInt();
        int d1 = sc.nextInt();
        int m2 = sc.nextInt();
        int d2 = sc.nextInt();

        String ans = "0";
        if(m1 != m2) {
            ans = "1";
        }
        
        System.out.println(ans);
    }
}

Measured memory_bytes: 21972
#include <iostream>
using namespace std;
int main()
{
  int A, B, C, X;
  cin >> A >> B >> C >> X;
  int ans = 0;
  for (int a = 0; a <= A; a++) {
    for (int b = 0; b <= B; b++) {
      int c = (X - a*500 - b*100) / 50;
      if (0 <= c && c <= C) ans++;
    }
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 3632
#include <stdio.h>

int main(void)
{
	int A,B,C,K,total=0;
	scanf("%d",&A);
	scanf("%d",&B);
	scanf("%d",&C);
	scanf("%d",&K);
	if(A>K){
		total=K;
		K=0;
	}else{
		total+=A;
		K-=A;
	}
	K-=B;
	if(K>0)total-=K;
	printf("%d",total);
	return 0;
}

Measured memory_bytes: 1724
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep2(i, m, n) for(int i=int(m); i<int(n); i++)
#define rep(i, n) rep2(i, 0, n)
#define ALL(a) a.begin(), a.end()
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using Pld = pair<ld, ld>;
const int INF = int(1e9)+10;
const ll INFll = ll(1e18)+10;
const ld EPS = 1e-10;
const int MOD = int(1e9)+7;

using Graph = vector<vector<int>>;

V label;
Graph G;

void dfs(int v, int l, int p=-1) {
  for (auto nv : G[v]) {
    if (nv == p) continue;
		int nl = 1 - l;
		label[nv] = nl;
    dfs(nv, nl, v);
  }
}

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

  G = Graph(N);
  for (int i = 0; i < N-1; i++) {
    int a, b;
    cin >> a >> b;
		a--; b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }

	label = V(N, -1);
	label[0] = 0;
  dfs(0, label[0]);

	V n(4);
	n[1] = (N+2)/3;
	n[2] = (N+1)/3;
	n[3] = N/3;

	V cnt(2);
	rep(i, N) cnt[label[i]]++;

	if (cnt[0] > N/3 && cnt[1] > N/3) {
		V used(4);
		rep(i, N) {
			int x = label[i] + 1;
			if (used[x] >= n[x]) x = 3;
			cout << (3*used[x] + x) << " ";
			used[x]++;
		}
	}
	else {
		int y = (cnt[0] <= N/3) ? 0 : 1;
		V used(4);
		rep(i, N) {
			int x;
			int l = label[i];
			if (l == y) x = 3;
			else {
				x = 1;
				if (used[x] >= n[x]) x++;
				if (used[x] >= n[x]) x++;
			}
			cout << (3*used[x] + x) << " ";
			used[x]++;
		}
	}
	cout << endl;
	return 0;
}


Measured memory_bytes: 17280
#include<stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	char ans[102];
	int i, j;
	for (i = 0; i < 2 * n; i++)
		ans[i] = '?';
	int r, b, c;
	int min, mid, max;
	char minc;
	char res[16];
	printf("?");
	for (i = 0; i < n; i++)
		printf(" %d", i + 1);
	printf("\n");
	fflush(stdout);
	scanf("%s", res);
	minc = res[0];
	min = 0;
	max = n;
	while (max - min > 1)
	{
		mid = (max + min) / 2;
		printf("?");
		for (i = 0; i < n; i++)
			printf(" %d", i + mid + 1);
		printf("\n");
		fflush(stdout);
		scanf("%s", res);
		if (res[0] == minc)
			min = mid;
		else
			max = mid;
	}
	ans[min] = minc;
	if (minc == 'R')
		ans[max + n - 1] = 'B';
	else
		ans[max + n - 1] = 'R';
	for (j = max; j < min + n; j++)
	{
		printf("?");
		for (i = min; i < max + n; i++)
			if (i != j)
				printf(" %d", i + 1);
		printf("\n");
		fflush(stdout);
		scanf("%s", res);
		if (res[0] == 'B')
			ans[j] = 'R';
		else
			ans[j] = 'B';
	}
	for (;;)
	{
		c = -1;
		for (i = 0; i < 2 * n; i++)
			if (ans[i] == '?')
				c = i;
		if (c < 0)
			break;
		printf("?");
		for (i = max; i < min + n ; i++)
			printf(" %d", i + 1);
		printf(" %d\n", c + 1);
		fflush(stdout);
		scanf("%s", res);
		if (res[0] == 'B')
			ans[c] = 'B';
		else
			ans[c] = 'R';
	}
	printf("! ");
	for (i = 0; i < 2 * n; i++)
		printf("%c", ans[i]);
	return 0;
}

Measured memory_bytes: 628
#include<stdio.h>
int main()
{
    int n,i,j,flag=0;
    scanf("%d",&n);
    for(i=1;i<=9;i++)
    {
        for(j=1;j<=9;j++)
        {
            if(i*j==n)
                flag=1;
        }

    }
    if(flag==1)
    printf("Yes\n");
    else
        printf("No\n");

}

Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int d,t,s;
    cin>>d>>t>>s;
    if(d<=t*s)
    cout<<"Yes"<<endl;
    else
    cout<<"No"<<endl;
    return 0;
}


Measured memory_bytes: 3636
#include <iostream>
#include <string>

using namespace std;

int main(void){
  string str;
  unsigned int pos;
  int n;
  cin >> n;
  cin.ignore();
  for(int i=0;i<n;i++){
	getline(cin,str);
	while(1){
	  pos = str.find("Hoshino",0);
	  if(pos == string::npos) break;
	  str.replace(pos,7,"Hoshina");
	}
	cout << str << endl;
  }
}

Measured memory_bytes: 0
use itertools::Itertools;
use num::Integer;
use proconio::input;

fn main() {
    input!(n: usize, m: u64, a: [u64; n]);

    if !a.iter().map(|a| a.trailing_zeros()).all_equal() {
        return println!("0");
    }
    let b = a.iter().map(|a| a / 2);
    let lcm = b.fold(1, |a, b| a.lcm(&b).min(m + 1));
    let ans = (m / lcm + 1) / 2;

    println!("{}", ans);
}


Measured memory_bytes: 3856
#include <iostream>

using namespace std;

//static const long long MOD = 1000000007;

int main() {
    string S;
    long long L, i, j;
    long long answer[100000];

    // input
    cin >> S;
    L = (long long) (S.length());

    // process
    for (i = 0; i < L; i++) {
        answer[i] = 0;
    }

    for (i = 0; i < L - 1; i++) {
        if (S[i] == 'R') {
            for (j = 1; S[i] == S[i + 1] && i < L - 1; j++) {
                i++;
            }
            if ((j % 2) == 0) {
                answer[i] += j / 2;
                answer[i + 1] += j / 2;
            } else {
                answer[i] += j / 2 + 1;
                answer[i + 1] += j / 2;
            }
        }
    }

    for (i = L - 1; i > 0; i--) {
        if (S[i] == 'L') {
            for (j = 1; S[i] == S[i - 1] && i > 0; j++) {
                i--;
            }
            if ((j % 2) == 0) {
                answer[i] += j / 2;
                answer[i - 1] += j / 2;
            } else {
                answer[i] += j / 2 + 1;
                answer[i - 1] += j / 2;
            }
        }
    }


    // output
    for (i = 0; i < L; i++) {
        cout << answer[i];
        if (i < L - 1) {
            cout << " ";
        }
    }

    return 0;
}

Measured memory_bytes: 1408
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
#define INF 1000000000000
#define MOD 1000000007
#define MAXR 100000

int main(void){
    ll n,y;cin>>n>>y;
    bool ok = false;
    REP(i,n+1){
        REP(j,n-i+1){
            if(10000*i + 5000*j + 1000*(n-i-j)==y){
                cout<<to_string(i)+" "+to_string(j)+" "+to_string(n-i-j)<<endl;
                ok = true;
                break;
            }
        }
        if(ok){
            break;
        }
    }
    if(!ok){
        cout<<"-1 -1 -1"<<endl;
    }
}

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

int main() {
	int a[3];
	for(int i=0; i<3; i++) cin >> a[i];
	sort(a, a+3);
	cout << a[0] << " " << a[1] << " " << a[2] << endl;
	return 0;
}

Measured memory_bytes: 1180
import java.util.Scanner;

class Main {

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

		int a = sc.nextInt();
		int b = 0;

		for(int i=0;i<a;i++){
			b =  b+i+1;
		}
		System.out.println(b);
	}
}

Measured memory_bytes: 21844
#include <iostream>
using namespace std;
int main() {
  string S, T;
  int A, B;
  string U;
  cin >> S >> T;
  cin >> A >> B;
  cin >> U;
  if(U == S) {
    cout << A - 1 << " " << B << endl;
  } else {
    cout << A << " " << B - 1 << endl;
  }
  return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#include <time.h>
#include <functional>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<ll, ll, ll, ll> tlglglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
typedef vector<ll> vll;
typedef vector< vector<ll> > matrix;
typedef unsigned int uint;
typedef unsigned long long ull;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
#define REP(i, x, y) for(ll i = (ll)x; i < (ll)y; i++)
#define DREP(i, x, y, d) for(ll i = (ll)x; i < (ll)y; i += (ll)d)
#define PER(i, x, y) for(ll i = (ll)x; i > (ll)y; i--)
#define DPER(i, x, y, d) for(ll i = (ll)x; i > (ll)y; i -= (ll)d)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-12;
void yesno(bool ok, string yes = "Yes", string no = "No") {
    if (ok) {
        cout << yes << endl;
    } else {
        cout << no << endl;
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll N;
    cin >> N;
    ll A[N];
    ll p = 0;
    REP(i, 0, N) {
        cin >> A[i];
        p ^= A[i];
    }
    REP(i, 0, N) {
        cout << (p ^ A[i]) << " ";
    }
    cout << endl;
}


Measured memory_bytes: 5144
#include<iostream>
#include<cmath>
using namespace std;
int n,k,a[100005],dp[100005];
long long sum=0;
int main() 
{
   cin>>n>>k;
   for(int i=1;i<=n;i++)
    cin>>a[i];
   dp[0]=dp[1]=0;
   dp[2]=abs(a[2]-a[1]);
   for(int i=3;i<=n;i++)
   {
   	int mcost=0x3f3f3f3f,l=1;
   	while(l)
   	{
   		if(l==k+1||i-l<=0)
   		break;
   		mcost=min(mcost,dp[i-l]+abs(a[i-l]-a[i]));
   		l++;
	   }
   	dp[i]=mcost;
	} 
   
   cout<<dp[n];
	return 0;
}

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

int main(){
    int A, B, C, temp;
    cin >> A >> B >> C;
    temp = A;
    A = B;
    B = temp;
    temp = A;
    A = C;
    C = temp;
    cout << A << " "<< B << " "<<C << endl;
}

Measured memory_bytes: 256
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		long starth;
		if(N%4==0) {
			starth = 3*N/4;
		} else {
			starth = 3*N/4+1;
		}
		for(long h=starth; h<=3500; h++) {
			for(long w=1; w<=3*N/4; w++) {
				if(4*h*w-N*w-N*h==0) break;
				long n = N*h*w/(4*h*w-N*w-N*h);
					if(n>0 && 4*h*n*w==N*(h*n+n*w+h*w)) {
						System.out.println(h + " " + n + " " + w);
						return;
					}
			}
		}
	}
}


Measured memory_bytes: 23764
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> pll;
const ll mod=1e9+7;
//const ll mod=998244353;
const ll inf=1LL<<61;

int main() {
  ll x;
  cin >> x;
  ll v=x/100;
  x%=100;
  if(x<=v*5) cout << 1 << endl;
  else cout << 0 << endl;
}

Measured memory_bytes: 3632
#include <bits/stdc++.h>
#include<math.h>
#include<algorithm> 
#define rep(i,n) for (int i = 0; i < (n) ; ++i)
using namespace std;
using ll = long long ;
using P = pair<int, int> ;
#define PI 3.14159265358979323846264338327950
#define INF 1e18

int main() {
    int n, x, y ;
    cin >> n >> x >> y ;
    x-- ;
    y-- ;
    vector<vector<int>> g (n) ;
    rep(i, n-1){
        g[i].push_back(i + 1) ;
        g[i + 1].push_back(i) ;
    }
    g[x].push_back(y) ;
    g[y].push_back(x) ; 
    vector<vector<ll>> len (n, vector<ll> (n, INF)) ;
    rep(i, n){
        queue <P> que ;
        que.push(P(i, 0)) ;
        vector<bool> used (n, false) ;
        while(1){
            if(que.empty()){
                break ; 
            }
            P k = que.front() ;
            que.pop() ;
            ll num = k.first ;
            ll cost = k.second ; 
            used[num] = true ;
            len[i][num] = min(len[i][num], cost) ;
            len[num][i] = min(len[num][i], cost) ;
            int t = g[num].size() ;
            rep(j, t){
                if(!used[g[num][j]]){
                    que.push(P(g[num][j], cost + 1)) ;
                }
            }
        }
    }
    vector<int> ans (n) ;
    rep(i, n){
        rep(j, n){
            ans[len[i][j]]++ ;
        }
    }
    rep(i, n){
        ans[i] /= 2 ;
    }
    for(int i = 1; i < n ; i++){
        cout << ans[i] << endl ;
    }
    return 0 ;
}  

Measured memory_bytes: 34588
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int N;
  cin>>N;
  int P[N];
      for (int i=0; i<N; i++) cin>>P[i];
  int a=2*100001;
  int counter=0;
    for (int i=0; i<N; i++){
      if(a>P[i]){
        a=P[i];
        counter++;}
    }
  printf("%d\n", counter);
}
  
  

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

int H[101];
int ans = 0;
int main() {
	int N;
  cin >> N;
  for ( int i = 0; i < N; i++ )
  {
    cin >> H[i+1];
  }
  int max = H[1];
  for ( int i = 1; i <= N; i++ )
  {
    //cout << max << ":" << H[i] << endl;
    if ( max <= H[i] )
    {
      ans++;
      max = H[i];
    }
  }
  cout << ans;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FAST       			ios_base :: sync_with_stdio(false); cin.tie(NULL);

int main() {
  FAST;
  long long N;
  cin >> N;
  vector<long long> A(N + 1, 0);
  map<long long, long long> X;
  for (long long i = 1; i <= N; i++) {
    cin >> A.at(i);
  }
  long long ans = 0;
  for (long long i = 1; i <= N; i++) {
    if (-A.at(i) + i >= 1) {
      long long B = -A.at(i) + i;
      ans += X[B];
    }
    long long C = A.at(i) + i;
    X[C]++;
  }
  cout << ans << endl;
}

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

int main(){
	int A, B;

	cin >> A >> B;

	if (A > 8 || B > 8){
		cout << ":(" << endl;
	}
	else{
		cout << "Yay!" << endl;
	}


	return 0;
}

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

int main()
{
double d,t,s;
cin>>d>>t>>s;
if(d/s<=t)cout <<"Yes";
else cout <<"No";
}


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

int main() {
  int n, m;
  cin >> n >> m;
  int dist = 0;
  vector<int> x(m);
  priority_queue<int> que;
  rep(i, m) cin >> x[i];
  if(n >= m){
    cout << 0 << endl;
    return 0;
  }
  sort(x.begin(), x.end());
  rep(i, m - 1){
    que.push(x[i + 1] - x[i]);
    dist += x[i + 1] - x[i];
  }
  rep(i,n-1){
    int p = que.top(); que.pop();
    dist -= p;
  }
  cout << dist << endl;
}

Measured memory_bytes: 1276
const debug = (...args) => {
  process.env.NODE_ENV === "test" ? console.log(...args) : ""
}

const solve = (input) => {
  const s = input.split("")
  const target = ["A", "T", "C", "G"]
  let current = 0
  let max = 0
  s.map((a) => {
    if (target.indexOf(a) == -1) {
      current = 0
    } else {
      current++
      max = Math.max(max, current)
    }
  })
  return max
}

if (process.env.NODE_ENV === "test") {
  module.exports = (input) => solve(input.trim())
} else {
  const input = require("fs").readFileSync("/dev/stdin", "utf8")
  console.log(solve(input.trim()))
}


Measured memory_bytes: 7372
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<cmath>
using namespace std;
#define REP(i, limit) for(int i=0; i< limit; ++i)
#define FOR(i, j, limit) for(int i=j; i< limit; ++i)
#define DUMP(a) REP(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else cout<<endl;}
#define LL long long
int INF = 2147483647;
LL LINF = 9223372036854775807;
LL MOD = 1000000007;
typedef pair<int, int>P;
typedef pair<LL, LL>PL;
typedef vector<int> vi;
typedef vector<LL> vl;

LL keta(LL x){
  LL r=0;
  while(x){
    ++r;
    x /=10;
  }
  return r;
}

int main(){
  LL N;
  cin>>N;
  LL B;
  LL ans = 10;
  FOR(i, 1, sqrt(N)+1){
    if(N%i) continue;
    B = N/i;
    ans = min(ans, keta(B));
  }
  cout<<ans<<endl;

  return 0;
}


Measured memory_bytes: 256
N,K,*X = map(int,open(0).read().split())
S = bin(K)[2:]
L = len(S)
ls = [(a,b) for a,b in zip(*[iter(X)]*2)]
s = '0'
ans = 0
for i,c in enumerate(S):
  if c=='0':
    s += c
    continue
  j = L-i
  m = (1<<(j-1))-1
  n = int(s,2)<<j
  x = m|n
  v = 0
  for a,b in ls:
    if x==x|a:
      v += b
  ans = max(v,ans)
  s += c
v = 0
for a,b in ls:
  if K==K|a:
    v += b
ans = max(ans,v)
print(ans)


Measured memory_bytes: 100336
#include <stdio.h>

int main(){
    
    int a,b;
    
    while(true){
    	scanf("%d %d", &a, &b);
		if(a==0 && b==0){
        	break;
		}
        else if(a > b){
            printf("%d %d", b,a);
        }else{
        	printf("%d %d", a,b);
		}
		printf("\n");
    }
    
    
    
    return 0;
}


Measured memory_bytes: 2680
#include <bits/stdc++.h>
using namespace std;
//#define cerr if (false) cerr
#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define dbv(v) cerr << #v << "="; for (auto _x : v) cerr << _x << ", "; cerr << endl
#define dba(a, n) cerr << #a << "="; for (int _i = 0; _i < (n); ++_i) cerr << a[_i] << ", "; cerr << endl
template <typename A, typename B>
ostream& operator<<(ostream& os, const pair<A, B>& x) {
	return os << "(" << x.first << "," << x.second << ")";
}
typedef long long ll;
typedef long double ld;
ll E[15][15];
int main() {
	vector<int> v(10);
	v[0] = 1;
	bitset<1000> has;
	has[1] = true;
	for (int i = 1; i < 10; ++i) {
		for (int j = v[i - 1] + 1;; ++j) {
			if (has[j]) continue;
			for (int k = 0; k < i; ++k)
				if (has[v[k] + j]) goto end;
			v[i] = j;
			break;
			end:;
		}
		has[v[i]] = true;
		for (int k = 0; k < i; ++k) has[v[k] + v[i]] = true;
	}
	ll mx = 0;
	for (int n = 2; n <= 10; ++n) {
		for (int i = 0; i + 1 < n; ++i)
			E[i][n - 1] = E[n - 1][i] = v[i] * (mx + 1);
		vector<int> perm(n);
		iota(perm.begin(), perm.end(), 0);
		do {
			ll tot = 0;
			for (int i = 0; i + 1 < n; ++i) {
				tot += E[perm[i]][perm[i + 1]];
			}
			mx = max(mx, tot);
		} while (next_permutation(perm.begin(), perm.end()));
	}
	int N;
	scanf("%d", &N);
	for (int i = 0; i < N; ++i)
		for (int j = 0; j < N; ++j)
			printf("%lld%c", E[i][j], j == N - 1 ? '\n' : ' ');
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
int main () {
  int a,b;
  cin >> a >> b;
  int c = a*b;
  if (c % 2 == 0) {
    cout << "Even" << endl;
  }
  if (c % 2 == 1) {
    cout << "Odd" << endl;
  }
}

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

using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> Vi;
typedef tuple<int, int, int> T;
#define FOR(i,s,x) for(int i=s;i<(int)(x);i++)
#define REP(i,x) FOR(i,0,x)
#define ALL(c) c.begin(), c.end()
#define MP make_pair
#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define fst first
#define snd second

string tree[1024];

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

  int N;
  while (cin >> N, N) {
    REP(i, N) cin >> tree[i];

    int last_dot = 0;
    FOR(i, 1, N) {
      last_dot = min(last_dot, (int)tree[i].size()-1);
      if (tree[i][last_dot] == '.') {
	if (tree[i][last_dot+1] == '.') last_dot++;
	tree[i][last_dot] = '+';
	
      } else {
	while (tree[i][last_dot] != '.') last_dot--;
	tree[i][last_dot] = '+';
	for (int j = i-1; j >= 0 && tree[j][last_dot] == '.'; j--) tree[j][last_dot] = '|';
      }
    }
    REP(i, N) {
      for (int j = 0; j < (int)tree[i].size(); j++) {
	if (tree[i][j] == '.') tree[i][j] = ' ';
      }
    }
    REP(i, N) cout << tree[i] << endl;
  }
  return 0;
}

Measured memory_bytes: 1800
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4") // wonderful

#include <bits/stdc++.h>
using namespace std;


#define ll long long


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


    ll n, capacity; 
    cin >> n >> capacity;

    vector<ll> values(n), weights(n);
    for (int i=0; i<n; i++)
        cin >> weights[i] >> values[i];

    vector<vector<ll>> dp(n, vector<ll>(capacity+1));
    for (int i = 0; i < n; i++) 
        dp[i][0]=0;

    for (int c = 0; c <= capacity; c++) {
      if (weights[0] <= c) {
        dp[0][c] = values[0];
      }
    }

    for (int i = 1; i < n; i++) {
        for (int w = 1; w <= capacity; w++)
        {
            if (weights[i] > w){
                dp[i][w] = dp[i-1][w];
            }
            else {
                dp[i][w] = max(dp[i-1][w], (values[i] + dp[i-1][w-weights[i]]));
            }
    }
}
    cout << dp[n-1][capacity];

    return 0;
}


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

#define int long long
#define fi first
#define se second
#define otp(n) cout << n;
#define ct(n) cout << n << endl;
#define cts(n) cout << n << " ";
#define cte cout << endl;
#define ctv(v) rep(i,(v).size()) ct(v[i])
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define repo(i,o,n) for(int i=o;i<n;i++)
#define repm(i,n) for(int i=n-1;i>=0;i--)
#define repv(i,v) for(int i=0;i<(v).size();i++)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define sperase(v,n) (v).erase(remove(all(v), n), (v).end());
#define vdelete(v) (v).erase(unique(all(v)), (v).end());
#define pb(n) push_back(n);

int n,a[100000],ans,f;

main() {
    cin >> n;
    rep(i,n) cin >> a[i];
    rep1(i,n-1) {
        if (!f) {
            if (a[i-1] == a[i]) continue;
            if (a[i-1] < a[i]) f++;
            else f--;
        }
        else if (f==1 && a[i-1] > a[i]) ans++,f=0;
        else if (f==-1 && a[i-1] < a[i]) ans++,f=0;
    }
    ct(++ans)
}


Measured memory_bytes: 1024
N = int(input())
A = list(map(int, input().split()))
count = 0
max_height = A[0]

for i in range(N):
    if A[i] > max_height:
        max_height = A[i]
    elif A[i] == max_height:
        continue
    else:
        count += max_height - A[i]

print(count)


Measured memory_bytes: 105192
import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func readString() -> String {
    return readLine()!
}

func readLines(times: Int) -> [String] {
    var array = [String]()
    for _ in 0..<times {
        array.append(readLine()!)
    }
    return array
}

func readSeparatedStrings() -> [String] {
    return readLine()!.split(separator: " ").map({String($0)})
}

func readSeparatedInts() -> [Int] {
    return readLine()!.split(separator: " ").map({Int($0)!})
}
func readSeparatedDouble() -> [Double] {
    return readLine()!.split(separator: " ").map({Double($0)!})
}

let a = readInt()

print(a + (a * a) + (a * a * a))

Measured memory_bytes: 13152
#include <bits/stdc++.h>
using namespace std;
int dp[1001][1001];
int main(){
	string s1,s2;	cin>>s1>>s2;
	for(int i=0;i<1001;i++){
		for(int j=0;j<1001;j++)	dp[i][j]=INT_MAX;
	}
	dp[0][0]=0;
	for(int i=1;i<=(int)s1.size();i++)	dp[i][0]=i;
	for(int i=1;i<=(int)s2.size();i++)	dp[0][i]=i;
	for(int i=1;i<=(int)s1.size();i++){
		for(int j=1;j<=(int)s2.size();j++){
			dp[i][j]=min(dp[i-1][j],dp[i][j-1])+1;//挿入(=削除)
			int cost=(s1[i-1]==s2[j-1])?0:1;
			dp[i][j]=min(dp[i][j],dp[i-1][j-1]+cost);//置き換え
		}
	}
	cout<<dp[s1.size()][s2.size()]<<endl;
	return 0;
}

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

int main() {
  int n;
  string s;
  cin >> n >> s;
  
  int x = 0, ans = 0;
  
  for (int i = 0; i < n; i++) {
    if (s.at(i) == 'I') {
      x++;
    }
    else {
      x--;
    }
    ans = max(ans, x);
  }
  cout << ans << endl;
}


Measured memory_bytes: 256
import java.nio.ByteBuffer;
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] f = new int[n][10];
		int[][] p = new int[n][11];
		for(int i=0; i<n; i++){
			for(int j=0; j<10; j++){
				f[i][j] = sc.nextInt();
			}
		}
		for(int i=0; i<n; i++){
			for(int j=0; j<11; j++){
				p[i][j] = sc.nextInt();
			}
		}
		sc.close();

		int ans = -1000000007;
		for(int i=1; i<1024; i++){
			int score = 0;
			int num = 0;
			//byte[] b = ByteBuffer.allocate(10).putInt(i).array();
			int[] b = new int[10];
			int mi = i;
			for(int j=9; j>=0; j--){
				b[j] = mi / (int)Math.pow(2, j);
				mi -= b[j] * (int)Math.pow(2, j);
			}
			for(int j=0; j<n; j++){
				num = 0;
				for(int k=0; k<10; k++){
					if(f[j][k] == 1 && b[k] == 1){
						num++;
					}
				}
				score += p[j][num];
			}
			if(score > ans){
				ans = score;
			}
		}
		System.out.println(ans);
	}
}


Measured memory_bytes: 26200
a,b=map(int,input().split())
A=str(a)
B=str(b)
num_1=int(A*b)
num_2=int(B*a)
if num_1>num_2:
  print(num_1)
elif num_1<num_2:
  print(num_2)
elif num_1==num_2:
  print(num_1)

Measured memory_bytes: 3060
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cassert>
#include <stack>
#include <limits>
#include <array>
#include <unordered_map>
#include <unordered_set>
#include <memory>
//#include <tuple>

constexpr long long mod = static_cast<long long>(1e9 + 7);


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

    std::vector<int> a(N);
    std::vector<int> b(N);
    std::vector<int> c(N);

    for(auto& val: a)
        std::cin >> val;
    for(auto& val: b)
        std::cin >> val;
    for(auto& val: c)
        std::cin >> val;

    std::sort(begin(a), end(a));
    std::sort(begin(b), end(b));
    std::sort(begin(c), end(c));

    long long ans = 0;

    for(auto val: b) {
        auto itrA = std::lower_bound(begin(a), end(a), val);
        auto itrC = std::upper_bound(begin(c), end(c), val);
        ans += (end(c) - itrC) * (itrA - begin(a));
    }

    std::cout << ans << std::endl;

    return 0;
}


Measured memory_bytes: 1408
n = int(raw_input())
ais = map(int, raw_input().split())
ais.sort()

def f(ais):
	return [sum(ais)/len(ais),sum(ais)/len(ais)+1,sum(ais)/len(ais)-1]
	if len(ais) % 2:
		return [ais[len(ais)/2]]
	
	v = ais[len(ais)/2 -1] + ais[len(ais)/2]
	return [v/2,v/2-1,v/2+1]
def g(ais,m):
	s= 0
	for ai in ais: s+=abs(ai - m) **2
	return s
print min([g(ais,m) for m in f(ais)])

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

using namespace std;

int main() {
  string S;
  cin >> S;
  unordered_map<char, int> counts;
  for (char c : S) counts[c]++;
  for (char c : S) {
    if (counts[c] != 2) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}


Measured memory_bytes: 256
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = list(input().split())

b=0
keta = 2
for i in range(len(n[1])):
    if n[1][i] == '.':
        continue
    b += int(n[1][i]) * 10 ** keta
    keta -= 1

print(int(n[0])*b//100)


Measured memory_bytes: 8964
import math

N, D = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(N)]

ans = 0
for i in range(0, N - 1):
    for j in range(i + 1, N):
        dist = 0
        f = 0
        for d in range(D):
            dist += (X[i][d] - X[j][d])**2
        root = int(math.sqrt(dist))
        for r in range(root-2, root+3):
            if r**2 == dist:
                f = 1
        if f == 1:
            ans += 1

print(ans)

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

int main(){
char x[1000];
int a=0;
scanf("%s",&x);
for(int i=0;i<1000;i++){
if(x[i]=='\0')break;
if(x[i]=='a'||x[i]=='b'||x[i]=='c'||x[i]=='A'||x[i]=='B'||x[i]=='C'){x[i]+=23;}else x[i]-=3;
a++;
}
for(int i=0;i<a;i++){cout<<x[i];}
cout<<endl;}

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

int main() {
	int X, A, B;
	cin >> X >> A >> B;
	X -= A;
	X %= B;
	cout << X << endl;
	return 0;
}


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

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

    int frag[M];
    for(int i = 0; i < M; i++){
        frag[i] = 0;
    }

    int n = 0;
    int m = 0;

    for(int i = 0; i < N; i++){
        cin >> n;
        for(int j = 0; j < n; j++){
            cin >> m;
            frag[m - 1] += 1;
        }
    }

    int ans = 0;
    for(int i = 0; i < M; i++){
        if(frag[i] == N){
            ans++;
        }
    }

    cout << ans << endl;
}

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

vector<ll> prime(ll n){
    vector<ll> rt;
    for(ll i=2;i*i<n;i++){
        ll tmp=0;
        while(n%i==0){
            tmp++;
            n/=i;
        }
        if(n%i!=0&&tmp!=0) rt.push_back(tmp);
    }
    if(n!=1) rt.push_back(1);
    return rt;
}

int main(){
    ll a,b;
    cin>>a>>b;
    if(a>b) swap(a,b);
    ll g=gcd(a,b);
    vector<ll> com=prime(g);
    // ll ans=1;
    // for(ll x:com){
    //     //cout<<x<<endl;
    //     ans*=(x+1);
    // }
    cout<<com.size()+1<<endl;
}

Measured memory_bytes: 3596
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
double a[105];

int main()
{
	int n;
	cin >> n;
	double sum;
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
		sum += 1 / a[i];
	}
	sum = 1 / sum;

	cout << fixed;
	cout << setprecision(6) << sum << endl;
	return 0;
}

Measured memory_bytes: 256
import numpy as np

N = int(input())
x = np.array(list(map(int, input().split())))
x = np.sort(x)

ans = 0
for i in range(1,N):
	if x[i] == x[i-1]:
		ans = 1

if ans == 1:
	print("NO")
else:
	print("YES")

Measured memory_bytes: 34188
#include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#include <functional>
#include <cstring>
#include <regex>
#include <random>
#include <cassert>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, s, n) for (int i = (s); i < (int)(n); i++)
#define revrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define revrepr(i, s, n) for (int i = (n) - 1; i >= s; i--)
#define debug(x) cerr << #x << ": " << x << "\n"

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

const long long MOD = 1e9+7;

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; }

template<class T>
istream& operator >>(istream &is, vector<T> &v) {
    for (int i = 0; i < (int)v.size(); i++) cin >> v.at(i);
    return is;
}

template<class T, class U>
ostream& operator <<(ostream &os, pair<T, U> p) {
    cout << '(' << p.first << ", " << p.second << ')';
    return os;
}

template<class T>
void print(const vector<T> &v, const string &delimiter) { rep(i, v.size()) cout << (0 < i ? delimiter : "") << v.at(i); cout << endl; }

template<class T>
void print(const vector<vector<T>> &vv, const string &delimiter) { for (const auto &v: vv) print(v, delimiter); }

int main() {
    int n, k;
    cin >> n >> k;
    vector<ll> a(n);
    cin >> a;
    
    vector<ll> sum(n + 1), sum_posi(n + 1);
    rep(i, n) {
        sum[i + 1] = sum[i] + a[i];
        sum_posi[i + 1] = sum_posi[i] + max(0ll, a[i]);
    }
    
    ll ans = 0;
    rep(i, n - k + 1) {
        int l = i, r = i + k;
        ll x = sum_posi[n];
        x -= sum_posi[r] - sum_posi[l];
        x += max(0ll, sum[r] - sum[l]);
        chmax(ans, x);
    }
    cout << ans << endl;
}

Measured memory_bytes: 2560
import sys
input = sys.stdin.readline


n, m = map(int, input().split())
a = list(map(int, input().split()))
suma, cnt = sum(a), 0

for i in range(n):
    if a[i] >= suma / 4 / m:
        cnt += 1

if cnt >= m:
    print('Yes')
else:
    print('No')


Measured memory_bytes: 3060
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#define PI 3.14159265359
typedef long long ll;
const int MOD = 1e9+7;
const ll LLINF = 7e18;
using namespace std;


int main(){
	string s, t;
	cin >> s >> t;
	int ans = MOD;
	for (int i = 0; i < s.length() - t.length() + 1; i++){
		int temp = 0;
		for (int j = 0; j < t.length(); j++){
			if (s[i+j] != t[j]){
				temp++;
			}
		}
		ans = min(ans, temp);
	}
	cout << ans << endl;
	return 0;
}



Measured memory_bytes: 3600
#include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;

const int mod = 100000;
const int size = 100001;
int length[size];

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

    length[0] = 0;
    for ( int i = 1; i < n; i++ ) {
        int si;
        cin >> si;
        length[i] = length[i-1] + si;
    }

    int k = 0;
    int answer = 0;
    for ( int i = 0; i < m; i++ ) {
        int ai;
        cin >> ai;
        int prev = k;
        int next = k + ai;
        answer = ( answer + abs( length[next] - length[prev] ) ) % mod;
        k = next;
    }

    cout << answer << endl;

    return 0;
}

Measured memory_bytes: 1228
#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int INF=1<<30;

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

int main(){
	ll n,m;
	cin >> n>>m;
	vector<ll> a(n);

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

	ll x = a[0]/2LL;
	ll c = 0LL;
	while(x % 2LL == 0LL){
		x /= 2LL;
		c++;
	}
	bool flag = false;
	for(int i = 1; i < a.size(); i++) {
		ll x = a[i]/2LL;
		ll counter = 0LL;
		while(x % 2LL == 0LL){
			x /= 2LL;
			counter++;
		}
		if (c != counter){
			flag = true;
			break;
		}
	}
	ll l = a[0]/2LL;
	if (!(flag)){
		
		for(int i = 1; i < a.size(); i++) {
			l = lcm(l,a[i] / 2LL);
			if (l > m){
				flag = true;
				break;
			}
		}
	}

	if (!(flag)){
		ll i = 0LL;
		while(l * (2LL * i + 1LL) <= m){
			i++;
		}
		cout << i << endl;
	}
	else{
		cout << 0 << endl;
	}
	return 0;
}

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

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define REP(i, n)  FOR(i, 0, n)
#define ASC(c) sort((c).begin(), (c).end())
#define DESC(c) sort((c).begin(), (c).end(), greater<int>())

#define DUMP(x)  cerr << #x << " = " << (x) << endl;
#define DEBUG(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

typedef long long ll;
typedef unsigned long long ull;
struct edge { int u, v; ll w; };
 
ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

int main() {
  int n, m; cin >> n >> m;
  if (n > m) {
    cout << 0 << endl;
    return 0;
  }
  vector<int> x(m);
  REP(i, m) cin >> x[i];
  DESC(x);
  vector<int> d(m - 1);
  REP(i, m - 1) d[i] = x[i] - x[i + 1];
  DESC(d);
  int ans = x[0] - x[m - 1];
  REP(i, min(n - 1, m - 1)) ans -= d[i];
  cout << ans << endl;
}


Measured memory_bytes: 1024
a, b = map(int, input().split())
distances = [list(map(int, input().split())) for _ in range(a)]
n = 202
m = 0
g = [[] for _ in range(n)]
for i in range(100):
    g[i].append((i + 1, 'X'))
    m += 1
for i in range(100):
    g[i + 101].append((i + 102, 'Y'))
    m += 1
for p in range(0, 101):
    for q in range(0, 101):
        r = -10000000
        for i in range(a):
            for j in range(b):
                r = max(r, distances[i][j] - p * (i + 1) - q * (j + 1))
        if r >= 0:
            g[p].append((n - q - 1, r))
            m += 1
for i in range(a):
    for j in range(b):
        d = [float('inf')] * n
        d[0] = 0
        s = [0]
        while s:
            p = s.pop()
            for to, dist in g[p]:
                if dist == 'X':
                    dist = i + 1
                elif dist == 'Y':
                    dist = j + 1
                s.append(to)
                d[to] = min(d[to], d[p] + dist)
        if d[-1] != distances[i][j]:
            print('Impossible')
            exit(0)
print('Possible')
print(n, m)
for i in range(n):
    for node, dist in g[i]:
        print(i + 1, node + 1, dist)
print(1, n)


Measured memory_bytes: 52700