akhauriyash/Code-Regression huggingface dataset:
//Jai Bhole Ki
#include <bits/stdc++.h>
using namespace std;
#define fast static int fastline = []() { std::ios::sync_with_stdio(false); cin.tie(NULL); return 0; }();
#define ll long long
#define LL unsigned ll
#define pb push_back
#define pi pair<ll,ll>
#define debug(x) cout<<x<<"\n";
#define debug cout<<"debugged\n";
#define minval -2e9
#define maxval 2e9
long double PI =3.14159265358979323846;
 
const ll M=1e9+7;
const ll inf=1e18;
const ll ms=2e5+5;
fast;
ll ans;
ll n,m,q;
void solve()
{
    cin>>n;
    ll prev=0,nn=n;
    ll i=1;
    while(n)
    {
        if(n/10==0)
        {
            ans+=nn-pow(10,i-1)+1;
            break;
        }
        else
        {
            ans+=9*pow(10,i-1);
        }
        n/=10;n/=10;
        i+=2;
        //cout<<ans<<" ";
    }
    cout<<ans<<endl;
}   

int main()
{
 // freopen("input.txt","r",stdin);
//  freopen("output.txt","w",stdout);
   // int t;cin>>t;while(t--)
    {
        solve();
    }
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FORLE(start, end, leap) for (int i(start); i <= end; i += leap)
#define FORL(start, end, leap) for (int i(start); i < end; i += leap)
#define FORGE(start, end, leap) for (int i(start); i >= end; i -= leap)
#define FORG(start, end, leap) for (int i(start); i > end; i -= leap)
#define lowbit(x) (x & (-x))
namespace BST { // Basic formulas
#define ll long long
inline ll QuickPower(ll x, ll y, ll mod) //快速幂
{
    ll res = 1;
    while (y) {
        if (y & 1)
            res = res * x % mod;
        y >>= 1;
        x = (x * x) % mod;
    }
    return res;
}
#undef ll
template <typename T> inline void read(T& t) {
    t = 0;
    char c = getchar();
    int f = 1;
    while (c < '0' || c > '9') {
        if (c == '-')
            f = -f;
        c = getchar();
    }
    while (c >= '0' && c <= '9') {
        t = (t << 3) + (t << 1) + c - '0';
        c = getchar();
    }
    t *= f;
}
template <typename T, typename... Args> inline void read(T& t, Args&... args) {
    read(t);
    read(args...);
}
template <typename T> inline void put(T x) {
    if (x < 0) {
        x = -x;
        putchar('-');
    }
    if (x > 9)
        put(x / 10);
    putchar(x % 10 + '0');
}
template <typename T, typename... Args> inline void put(T& t, Args&... args) {
    put(t);
    putchar(' ');
    put(args...);
}
};              // namespace BST
using namespace BST;
int main(void) {
    long long N;
    string str;
    read(N);
    while (N >= 1) {
        if (N % 26 == 0) {
            str.push_back('z'), N /= 26, N -= 1;
            continue;
        }
        str.push_back(N % 26 + 'a' - 1);
        N /= 26;
    }
    reverse(str.begin(), str.end());
    cout << str;
    return 0;
}

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

typedef long long ll;
ll mod = 1000000007;

ll power(ll x, ll y)
{
    ll res = 1;
    x = x%mod;
    while (y)
    {
        if (y&1) res = ((res%mod)*(x%mod))%mod;

        y>>=1;
        x = ((x%mod)*(x%mod))%mod;
    }
    return res;
}

int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);

    ll n;
    cin >> n;
    set<string> s;

    string str;
    for(int i=0; i<n; i++){
        cin >> str;
        s.insert(str);
    }    

    cout << s.size() << "\n";

    return 0;
}


Measured memory_bytes: 19140
import numpy as np

H,W = map(int,input().split())
S = []
for i in range(H):
    s = list(map(lambda x:x=='#', input()))
    S.append(s)

S = np.array(S)

for i in range(H):
    for j in range(W):
        if S[i,j]:
            print('#',end='')
        else:
            print(np.sum(S[max(0,i-1):i+2, max(0,j-1):j+2]),end='')
    print()


Measured memory_bytes: 12892
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
typedef long long ll;
const int INF = 1000000000;
const long INF64 = 1000000000000000ll;
const ll MOD = 1000000007ll;


int main(){
	int n;
	std::cin >> n;
	char ox[n];
	std::vector<string> s(4);
	rep(i,n)std::cin >> ox[i];
	s[0]="SS";s[1]="SW";s[2]="WS";s[3]="WW";
	rep(i,4){
		string ans;
	//	std::cout << ans.size() << std::endl;
		ans.pb(s[i].at(0));
		ans.pb(s[i].at(1));
	//	std::cout << ans << std::endl;
		for (int j = 2; j <= n; j++) {
			/* code */
			if(ox[j-1]=='o'){
				if(ans[j-1]=='S')ans.pb(ans[j-2]);
				else{
					if(ans[j-2]=='W')ans.pb('S');
					else ans.pb('W');
				} 
			}else{
				if(ans[j-1]=='W')ans.pb(ans[j-2]);
				else{
					if(ans[j-2]=='W')ans.pb('S');
					else ans.pb('W');
				}
			}
			
			
		}
		if(ox[0]=='o'){
			
				if(ans[n]=='S')ans.pb(ans[n-1]);
				else{
					if(ans[n-1]=='W')ans.pb('S');
					else ans.pb('W');
				} 
			}else{
				if(ans[n]=='W')ans.pb(ans[n-1]);
				else{
					if(ans[n-1]=='W')ans.pb('S');
					else ans.pb('W');
				}
			
		}
		if(ans[n]==ans[0]&&ans[n+1]==ans[1]){
				rep(k,n)std::cout << ans[k] ;
				std::cout  << std::endl;
				exit(0);
		}
	}
	std::cout << -1 << std::endl;
}


Measured memory_bytes: 724
# ?????§??¬?´???°????±???????
def cal_gcd x, y
  # swap
  x, y = y, x if x < y

  while (y > 0)
    r = x % y
    x = y
    y = r
  end

  x

end

x, y = STDIN.gets.chomp.split(' ').map {|n| n.to_i}

puts cal_gcd x, y

Measured memory_bytes: 8596
import numpy as np
n = int(input())
li = np.array(list(map(int, input().split())))

if np.count_nonzero(li) == 0:
    print("Yes")
elif len(li)%3 != 0:
    print("No")
else:
    li = sorted(li)
    li0 = li[:n//3]
    li1 = li[n//3:n//3*2]
    li2 = li[n//3*2:]
    if (li0 == li0[0]).all() and (li1 == li1[0]).all() and (li2 == li2[0]).all() and ((li0[0]^li1[0]) == li2[0] or (li0[0]^li1[0]) == li2[0] or (li0[0]^li1[0]) == li2[0]):
        print("Yes")
    else:
        print("No")


Measured memory_bytes: 23884
#coding: UTF-8

N, K = map(int, input().split())
mod = 998244353
s = []
for k in range(K):
  s.append(list(map(int,input().split())))
#print(s)
cnt = [0]*N
cnt[0] = 1
sum = [0]*N
sum[0] = 1
for i in range(1,N):
  for j in range(K):
    #j個目の区間について
    if i > s[j][1]: #後ろのほう
      cnt[i] += sum[i-s[j][0]] - sum[i-s[j][1]-1]
    elif i >= s[j][0]:
      cnt[i] += sum[i-s[j][0]]
    cnt[i] = cnt[i] % mod
    sum[i] = (sum[i-1] + cnt[i])% mod
print(cnt[-1] % mod)


Measured memory_bytes: 24572
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>   
using namespace std;
using namespace __gnu_pbds;
typedef long long ll; 
#define int long long
typedef unsigned long long lu;
typedef vector<ll> v;
typedef vector<vector<ll> > vv;
typedef vector<string>  vs;
typedef vector<pair<ll,ll>> vpr;
typedef long double ld;
#define f(i,n) for(ll i = 0; i < n; i++)
#define ff(i,n) for(ll i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define endl "\n"
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define amax(x,y) if(y>x) x=y;
#define amin(x,y) if(y<x)x=y;
#define bg(x) x.begin()
#define sz(x) (ll)x.size()
#define in(x,n) for(ll i=0;i<n;i++)cin>>x[i]
#define out(x,n) for(ll i=0;i<n;i++)cout<<x[i]<<" " 
#define mxt(a) *(max_element(a.begin(),a.end()))
#define mnt(a) *(min_element(a.begin(),a.end())
#define tc ll t;cin>>t;while(t--)
typedef pair<ll,ll> pi;
#define yes cout<<"YES\n";
#define no cout<<"NO\n";
#define yesno(f) if(f) yes else no
const v dx = {1, -1, 0, 0};
const v dy = {0, 0, 1, -1};
const ll mod=1e9+7;
const ld PI = 2 * acos(0.0);
ll m(ll a){ return (a+mod)%mod;}
ll cel(ll x1,ll y1){if((x1%y1)==0)return x1/y1;else return x1/y1+1;}
ll power(ll a,ll b,ll m)
{
	if(b==0)
		return 1;
	ll d=power(a,b/2,m);
	d=(d*d)%m;
	if(b&1)
		d=(d*a)%m;
	return d;
}
// set_name.find_by_order(k) It returns to an iterator to the kth element (counting from zero) in the set in O(logn) time
// set_name.order_of_key(k) It returns to the number of items that are strictly smaller than our item k in O(logn) time.
/*string operations :
str.substr (x,y) : returns a substring str[x],str[x+1],...str[x+y-1]
str.substr (x) : returns a substring str[x],... end of string
str.find(qtr) : returns the first occurenece of qtr in str */
int solve(){}
int32_t main()
{
	ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
	int n,k;cin>>n>>k;
	cout<<min(n%k,k-n%k)<<endl;
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main(void) {
int n;
int a;
int i;
long long int sum;
int min, max;

scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &a);
if (i == 0) {
min = a;
max = a;
sum = a;
}
else {
if (min > a) min = a;
if (max < a) max = a;
sum += a;
}
}

printf("%d %d %lld\n", min, max, sum);

return 0;
}


Measured memory_bytes: 2108
/*************************************************************************
    > File Name: D.cpp
    > Author: Roundgod
    > Mail: wcysai@foxmail.com 
    > Created Time: 2018-06-23 20:08:16
 ************************************************************************/

#pragma GCC optimize(3)
#include<bits/stdc++.h>
#define MAXN 100005
#define INF 1000000000000000LL
#define MOD 1000000007
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
ll n,k,a[MAXN],d[MAXN];
ll digit_sum(ll x)
{
    if(x==0) return 0;
    return x%10+digit_sum(x/10);
}
set<ll> s;
int main()
{
    scanf("%lld",&k);
    for(ll i=0;i<=200;i++) d[i]=digit_sum(i);
    for(ll i=1;i<=8;i++) s.insert(i);
    ll mult=1;
    for(ll i=1;i<=15;i++)
    {
        mult*=10;
        for(ll j=0;j<=200;j++)
        {
            if(j%10==9) continue;
            if(d[j]+i*9>j)
            {
                if(j>=INF/mult) continue;
                if(j*mult+mult-1<=INF) s.insert(j*mult+mult-1);
            }
        }
    }
    ll cnt=0;
    for(auto it=s.begin();it!=s.end();it++)
    {
        cnt++;
        if(cnt<=k) printf("%lld\n",*it);
        else break;
    }
    return 0;
}



Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <iomanip>
using namespace std;
long long n,a,b,c,d,i,j;
int main()
{
	cin>>n>>a>>b>>c>>d;
	d-=c;
	n-=1;
	for (i=0;i<=n;i++)
	{
		j=n-i;
		if (b-a-i*c+j*c>=-d*j&&b-a-i*c+j*c<=d*i)
		{
			cout<<"YES";
			return 0;
		}
	} 
	cout<<"NO";
	return 0;
}

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final int d = fs.nextInt();
        final int t = fs.nextInt();
        final int s = fs.nextInt();
        System.out.println(d <= t * s ? "Yes" : "No");
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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


Measured memory_bytes: 32816
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
    int n;
    cin>>n;
    int m;
    cin>>m;
    vector<int> ok(n+1,1);
    rep(i,m){
        int x;
        cin>>x;
        ok[x]=false;
    }
    vector<ll> dp(n+1,0);
    dp[0]=1;
    dp[1]=1;
    for(int i=2;i<=n;++i){
        if(ok[i-2])dp[i]+=dp[i-2];
        if(ok[i-1])dp[i]+=dp[i-1];
        dp[i]%=mod;
    }
    cout<<dp[n]<<endl;
    return 0;
}

Measured memory_bytes: 1408
import java.util.Scanner;
public class Main
{
	public static void main(String[] args)
    {
		Scanner sc = new Scanner(System.in);
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int c = sc.nextInt();
      	int add = 0; 
      	if(a % c == 0)
        {
         	 add++;
        }
      	System.out.println( (b / c) - (a / c) + add);
    }
}

Measured memory_bytes: 35616
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <unordered_set>
 
using namespace std;
 
typedef long long ll;
typedef pair<int, int> P;
static const int INF = 1000010000;
static const int NIL = -1;
static const int MOD = 1000000007;
 
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define REP(i, n) for(int i = 0; i < (n); ++i)
#define SORT(v) sort(v.begin(), v.end());
#define pb push_back
#define mp make_pair
#define np next_permutation
#define pq priority_queue
 
int gcd(int a, int b) { int c; while (b != 0) { c = a%b; a = b; b = c; }return a; }
int lcm(int a, int b) { int c = gcd(a, b); a /= c; return a*b; }
int nCr(int a, int b) { int i, r = 1; for (i = 1; i <= b; i++) { r *= (a + 1 - i); r /= i; }return r; }
int pow(int a, int b) { int i, r = 1; for (i = 1; i <= b; i++) { r *= a; }return r; }
long long llpow(long long a, long long b) { long long i, r = 1; for (i = 1; i <= b; i++) { r *= a; }return r; }
long long llgcd(long long a, long long b) { long long c; while (b != 0) { c = a%b; a = b; b = c; }return a; }
long long lllcm(long long a, long long b) { long long c = llgcd(a, b); a /= c; return a*b; }
long long llnCr(long long a, long long b) { long long i, r = 1; for (i = 1; i <= b; i++) { r *= (a + 1 - i); r /= i; }return r; }
 
//int dx4[4] = {0,1,0,-1}, dy4[4] = {-1,0,1,0};
//int dx5[5] = {-1,0,0,0,1}, dy5[5] = {0,-1,0,1,0};
//int dx8[8] = {-1,0,1,1,1,0,-1,-1}, dy8[8] = {1,1,1,0,-1,-1,-1,0};
//int dx9[9] = {-1,0,1,1,1,0,-1,-1,0}, dy9[9] = {1,1,1,0,-1,-1,-1,0,0};

struct edge{
    int to, cost;
};

int V;
vector<edge> G[10];
int d[10];

void dijkstra(int s){
    priority_queue<P, vector<P>, greater<P>> que;
    fill(d, d + V + 1, INF);
    d[s] = 0;
    que.push(P(0, s));

    while(!que.empty()){
        P p = que.top(); que.pop();
        int v = p.second;
        if(d[v] < p.first) continue;
        REP(i, G[v].size()){
            edge e = G[v][i];
            if(d[e.to] > d[v] + e.cost){
                d[e.to] = d[v] + e.cost;
                que.push(P(d[e.to], e.to));
            }
        }
    }
}

int main(){
    int h, w;
    cin >> h >> w;
    REP(i, 10){
        REP(j, 10){
            edge e;
            cin >> e.cost;
            if(i == j) continue;
            e.to = j;
            G[i].push_back(e);
        }
    }
    V = 10;
    int costi[10];
    costi[1] = 0;
    REP(i, 10){
        if(i == 1) continue;
        dijkstra(i);
        costi[i] = d[1];
    }
    int ans = 0;
    REP(i, h){
        REP(j, w){
            int tmp;
            cin >> tmp;
            if(tmp == -1) continue;
            ans += costi[tmp];
        }
    }
    cout << ans << endl;
}

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

int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  if (abs(a-c) <= d || abs(a-b) <= d && abs(b-c) <= d){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <set>
#include <map>
#include <queue>
using namespace std;
int main(void){
  int a,b,n;
  while(cin>>a>>b,a||b){
    cin>>n;
    vector<vector<int> > keiro(b);
    for(int i=0;i<b;++i){
    	keiro[i].reserve(a);
    	for(int j=0;j<a;++j)keiro[i][j]=0;
    }
    set<pair<int,int> > stop;
    for(int i=0,x,y;i<n;++i){
      cin>>x>>y;
      stop.insert(make_pair(x,y));
    }
    priority_queue<pair<int,int> > q;
    q.push(make_pair(1,1));
    while(!q.empty()){
      pair<int,int> tmp=q.top();q.pop();
      if(stop.find(tmp)!=stop.end()) continue;
      int x=tmp.first,y=tmp.second;
      if(x>a||y>b) continue;
      ++keiro[y-1][x-1];
      q.push(make_pair(x+1,y));
      q.push(make_pair(x,y+1));
    }
    cout<<keiro[b-1][a-1]<<endl;
  }
  return 0;
}

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

int main()
{
int A,B;scanf("%d %d",&A,&B);
string S;cin>>S;bool ans=true;
if(S.size()!=A+B+1)ans=false;
for(int i=0;i<A;i++)
{
  if(S[i]-'0'>9||S[i]-'0'<0)ans=false;
}
if(S[A]!='-')ans=false;
for(int i=0;i<B;i++)
{
  if(S[i+A+1]-'0'>9||S[i+A+1]-'0'<0)ans=false;
}
if(ans)printf("Yes\n");
else printf("No\n");
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <algorithm> 
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i,n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#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 pu push
#define COUT(x) cout<<(x)<<"\n"
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES\n" : "NO\n"  )
#define Yes(n) cout << ((n) ? "Yes\n" : "No\n"  )
#define mp make_pair
#define sz(x) (ll)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
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; 
}
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
int main(){
  ll n;
  cin>>n;
  COUT(n+n*n+n*n*n);
}

Measured memory_bytes: 3620
S=input()

sorted(S)

if 'a' not in S:
    print('a')
elif 'b' not in S:
    print('b')
elif 'c' not in S:
    print('c')
elif 'd' not in S:
    print('d')
elif 'e' not in S:
    print('e')
elif 'f' not in S:
    print('f')
elif 'g' not in S:
    print('g')
elif 'h' not in S:
    print('h')
elif 'i' not in S:
    print('i')
elif 'j' not in S:
    print('j')
elif 'k' not in S:
    print('k')
elif 'l' not in S:
    print('l')
elif 'm' not in S:
    print('m')
elif 'n' not in S:
    print('n')
elif 'o' not in S:
    print('o')
elif 'p' not in S:
    print('p')
elif 'q' not in S:
    print('q')
elif 'r' not in S:
    print('r')
elif 's' not in S:
    print('s')
elif 't' not in S:
    print('t')
elif 'u' not in S:
    print('u')
elif 'v' not in S:
    print('v')
elif 'w' not in S:
    print('w')
elif 'x' not in S:
    print('x')
elif 'y' not in S:
    print('y')
elif 'z' not in S:
    print('z')
else:
    print('None')

Measured memory_bytes: 4408
#include<iostream>
#include<stdio.h>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	double v[1005],ans;
	int n;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> v[i];
	}
	sort(v, v + n);
	ans = v[0];
	for (int i = 1; i < n; i++){
		ans = (ans + v[i]) / 2;
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define all(v) v.begin(), v.end()
#define sz size()
#define mp make_pair
#define pb push_back
#define rep(p, a, b) for (ll p = a; p < b; p++)
#define rap(p, a, b) for (ll p = a; p <= b; p++)
#define per(p, a, b) for (ll p = a; p >= b; p--)
#define F first
#define S second
using namespace std;

typedef vector<ll> vll;
typedef vector<ld> vld;
typedef pair<ll, ll> pll;

int main()
{
    ll t, i, j, k, ans, n;

    //cin>>t;
    t = 1;
    while (t--)
    {
        int a,b,c;
        cin>>a>>b>>c;
        set<ll> s;
        s.insert(a);s.insert(b);s.insert(c);

        if(s.sz==2)cout<<"Yes";
        else cout<<"No";
    }

    return 0;
}

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

const int N = 6e2 + 5;

int n, m, x, y, A[N] ,B[N];

int dp[N][N];

const int mod = 1e9 + 7;

namespace  {
  int add(int x) {return (x >= mod) ? x - mod : x;}
  int sub(int x) {return (x < 0) ? x + mod : x;}
  void Add(int &x, int y) {x = add(x + y);}
  void Sub(int &x, int y) {x = sub(x - y);}
  int Pow(int x, int y) {
    int res = 1;
    for(; y; y >>= 1, x = 1LL * x * x % mod) {
      if(y & 1) {
	res = 1LL * res * x % mod;
      }
    }
    return res;
  }
}

int g[N], S[N], invg[N];
bool vis[N];

bool pd(int x, int l, int r) {
  return (x >= l) && (x <= r);
}

int main() {
  cin >> n;
  cin >> m;
  g[0] = g[2] = 1;
  invg[0] = invg[2] = 1;
  for(int i = 2; i <= n * 2; i += 2) {
    g[i] = 1LL * g[i - 2] * (i - 1) % mod;
    invg[i] = Pow(g[i], mod - 2);
    assert(1LL * g[i] * invg[i] % mod == 1);
  }

  for(int i = 1; i <= n * 2; ++ i) S[i] = 1;
  
  for(int i = 1; i <= m; ++ i) {
    cin >> A[i] >> B[i];
    S[A[i]] = S[B[i]] = 0;
    vis[A[i]] = vis[B[i]] = 1;
  }
  for(int i = 1; i <= n * 2; ++ i) S[i] += S[i - 1];
  int ans = 0;
  int All = S[n * 2];
  //cerr << All << endl;
  for(int c = 1; c <= n * 2 - 1; ++ c) {
    for(int L = 1; L <= n * 2 - c; ++ L) {
      int R = L + c;
      // [L, R]
      bool ok = 1;
      for(int i = 1; i <= m; ++ i) {
	int l = A[i], r = B[i];
	if(l > r) swap(l, r);
	ok &= (pd(l, L, R) == pd(r, L, R));
      }
      if(!ok) continue;
      dp[L][R] = 1LL * g[S[R] - S[L - 1]] *
	g[All - (S[R] - S[L - 1])] % mod;
      //cerr << L <<" " << R << " " << dp[L][R] << endl;
      //cerr << dp[1][2] << endl;
      for(int i = L + 1; i <= R - 1; ++ i) {
	//[i + 1, R]
	Sub(dp[L][R],
	    1LL * dp[L][i] *
	    g[S[R] - S[i]] % mod * g[All - (S[R] - S[L - 1])] % mod);
      }
      //cerr << L <<" " << R <<" " << dp[L][R] << endl;
      Add(ans, dp[L][R]);
      dp[L][R] = 1LL * dp[L][R] * invg[All - (S[R] - S[L - 1])] % mod;
    }
  }
  cout << ans << endl;
}


Measured memory_bytes: 1664
#include <bits/stdc++.h>
using namespace std;
int main() {
    int N; cin>>N;
    vector<int> V(N);
    vector<int> C(N);
    for(int i=0;i<N;i++){
        cin>>V[i];
    }
    for(int i=0;i<N;i++){
        cin>>C[i];
    }
    int sa=0;
    for(int i=0;i<N;i++){
        if(V[i]>C[i]){
            sa=sa+(V[i]-C[i]);
        }
    }
    cout<<sa;
    return 0;
}

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

#define PI 3.14159265359
#define INF 1000000009
#define LINF 10000000000000000009
#define IMOD 1000000007 
#define irep(i,n) for(int i = 0; i < (int)(n); i++)
#define irep2(i,a,n) for(int i = (int)(a); i <= (int)(n); i++)
#define lrep(i,n) for(long long  i = 0; i < (long long)(n); i++)
#define lrep2(i,a,n) for(long long i = (long long)(a); i <= (long long)(n); i++)

#define irrep(i,n) for(int i = (int)(n-1); i > -1; i--)
#define irrep2(i,a,n) for(int i = (int)(n); i >= (int)(a); i--)

typedef long long ll;
typedef std::vector<char> v_char;
typedef std::vector<v_char > v2_char;
typedef std::vector<double> v_double;
typedef std::vector<v_double > v2_double;
typedef std::vector<int> v_int;
typedef std::vector<v_int > v2_int;
typedef std::vector<ll> v_ll;
typedef std::vector<v_ll > v2_ll;
typedef std::vector<std::string> v_string;
typedef std::vector<v_string > v2_string;
typedef std::vector<bool> v_bool;
typedef std::vector<v_bool > v2_bool;
typedef std::pair<ll, ll> pll;
typedef std::pair<int, int> pii;

int dx[4] = {1, 0, -1, 0};
int dy[5] = {0, 1, 0, -1};
using namespace std; 

int main(void)
{
    ll n;
    cin >> n;
    string s;
    cin >> s;
    
    char a = s[0];
    ll ans = n * (a-'0');

    if(s.size() >= 3) {

        ll b = stoi(s.substr(2));
        b *= n;
        b /= 100;
        ans += b;
    }

    cout << ans << endl;
    return 0;
}
/** atcoder **/



Measured memory_bytes: 3620
from collections import Counter
 #Counter関数はリストを引数として受け取り、リストの要素をキーとしてその出現回数を出力する

N = int(input())
S = Counter(input() for _ in range(N))
#wordをキーとしてその出現回数を値に持つdictをSとする

max_count = max(S.values())
#dict.valueとすることで辞書の要素を順番に取り出してリストを作る
for s in sorted(s for s in S if S[s] == max_count):
    print(s)
#S[s] == max_countの時だけSをsに代入
#そのsをsortしたものを順番にsに代入


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

int main()
{
    int m1,d1,m2,d2;
    cin >> m1 >> d1 >> m2 >> d2;
    cout << (m1 != m2?1:0) << endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#define INF INT_MAX
using namespace std;

int n, size;
vector <int> seg;

void update(int i, int x){
    i += size - 1;
    seg[i] = x;
    while(i > 0){
        i = (i - 1) / 2;
        seg[i] = min(seg[i * 2 + 1], seg[i * 2 + 2]);
    }
}

void init(int _n){
    size = 1;
    while(size < _n) size *= 2;
    seg = vector <int> (size * 2 + 1, INF);
}

int query(int a, int b, int v, int l, int r){
    if(r <= a || b <= l) return INF;
    else if(a <= l && r <= b) return seg[v];
    else {
        return min(query(a, b, v * 2 + 1, l, (l + r) / 2),
                   query(a, b, v * 2 + 2, (l + r) / 2, r));
    }
}

int main(){

    int q;
    cin >> n >> q;
    init(n);
    while(q--){
        int com, x, y; cin >> com >> x >> y;
        if(!com) update(x, y);
        else cout << query(x, y + 1, 0, 0, size) << endl;
    }
}

Measured memory_bytes: 3116
#include <iostream>
#include <functional>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <queue>
#include <map>
#include <iomanip>
#include <complex>
#include <random>
#include <bitset>
// #include <prettyprint.hpp>
using namespace std;
#define repi(i,n) for(int i=0;i<n;++i)
#define rep(i,n) for(ll i=0;i<n;++i)
#define repinvi(i,n) for(int i=n-1;i>=0;--i)
#define sll(n) scanf("%lld", &n);
#define sii(n) scanf("%d", &n);
#define slf(n) scanf("%lf", &n);
#define pll pair<ll,ll>
#define pii pair<int,int>
#define psi pair<si,si>
typedef long long ll;
typedef double lf;
typedef short int si;


void Main(){
    ll N, Q;
    ll a, b, c;
    sll(N);
    vector<ll> as(N, 0);
    // vector<ll> bs(N, 0);
    // vector<ll> cs(N, 0);

    map<ll, ll> counter;
    ll sum = 0;
    rep(i, N){
        sll(as[i]);
        ++ counter[as[i]];
        sum += as[i];
    }
    sll(Q);
    rep(i, Q){
        sll(b);
        sll(c);
        ll inc_num = (c- b) * counter[b];
        sum += inc_num;
        printf("%lld\n", sum);
        counter[c] += counter[b];
        counter[b] = 0;
    }
    


}

int main(){
    Main();
}

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



using namespace std;

typedef vector<int> VI;
typedef vector<string> VS;


//container util
#define SORT(c) sort((c).begin(),(c).end())

//repetition
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)



int main(void){

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

	REP(i,N) cin >> a[i][0] >> a[i][1] >> a[i][2];
	
	vector<vector<int>> dp(N+1,vector<int>(3, 0));
	
	REP(i,N){
		REP(j,3){
			REP(k,3){
				if(j == k) continue;
				dp[i+1][k] = max(dp[i+1][k], dp[i][j]+a[i][k]);
			}
		}
	}


	int ans = -1;
	REP(i,3){
		ans = max(ans, dp[N][i]);
	}

	cout << ans << endl;

	return 0;

}


Measured memory_bytes: 11136
#include<stdio.h>
int S[1000000];
#define N 1e9
void merge(int *,int ,int ,int );
void mergeSort(int *,int ,int);
int cout;
int main(){
  int n;
  scanf("%d",&n);
  int i;
  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
    mergeSort(S,0,n);
    printf("%d",S[0]);
    for(i=1;i<n;i++){
      printf(" %d",S[i]);
    }
    printf("\n");
    printf("%d\n",cout);
    return 0;
}
void merge(int A[],int l,int m,int r){
  int n1=m-l,n2=r-m,i,j;
  int L[n1],R[n2];
  for(i=0;i<=n1-1;i++){
    L[i]=A[l+i];
  }
  for(j=0;j<=n2-1;j++){
    R[j]=A[m+j];
  }
  L[n1]=N;
  R[n2]=N;
  i=0;
  j=0;
  int k;
  for(k=l;k<=r-1;k++){
    cout++;
    if(L[i]<R[j]){
      A[k]=L[i];
      i++;
    }else{
      A[k]=R[j];
      j++;
      
    }

  }
}
void mergeSort(int A[],int left,int right){
  int mid;
  if(left+1<right){
    mid=(left+right)/2;
    mergeSort(A,left,mid);
    mergeSort(A,mid,right);
    merge(A,left,mid,right);
  }
}



Measured memory_bytes: 6588
n = int(input())
lst = [[] for _ in range(10)]
lst[0] = [""]
for i in range(1, 10):
  for c in lst[i - 1]:
    for add in ("3", "5", "7"):
      lst[i].append(c + add)

def counter(l):
  ret = 0
  for s in l:
    if "3" in s and "5" in s and "7" in s and int(s) <= n:
      ret += 1
  return ret

ans = 0
for l in lst:
  ans += counter(l)
print(ans)

Measured memory_bytes: 5228
import Control.Applicative
import Control.Monad
import Data.Functor
import Data.List

f :: (Int, Int) -> Int -> (Int, Int)
f (m, r) x = (min m x, max r (x-m))

main = readLn >>= flip replicateM readLn >>= \(x:xs) -> print $ snd $ foldl f (x, -1000000007) xs


Measured memory_bytes: 133952
import java.util.*;

public class Main {

  long INF = Long.MAX_VALUE;
  long[][] dp;

  public static void main(String[] args) {
    new Main().solve();
  }

  void solve() {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    System.out.println((A + B) % 2 == 1 ? "IMPOSSIBLE" : (A + B) / 2);
  }
}


Measured memory_bytes: 21844
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

Sum = sum(a)

for i in range(len(b)):
  if a[i] >= b[i]:
    a[i] = a[i] - b[i]
    b[i] = 0
  else:
    b[i] = b[i] - a[i]
    a[i] = 0
    
    if a[i+1] >= b[i]:
      a[i+1] = a[i+1] - b[i]
      b[i] = 0
    else:
      b[i] = b[i] - a[i+1]
      a[i+1] = 0
      
ans = sum(a)
print(Sum-ans)

Measured memory_bytes: 18396
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

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

int main(){
    cin>>N;
    int A[N];
    rep(i,N)cin>>A[i];
    int maxi=abs(A[1]-A[0]);
    rep(i,N){
        for(int j=i;j<N;j++){
            maxi=max(maxi,abs(A[j]-A[i]));
        }
    }
    out(maxi);
}


Measured memory_bytes: 256
// In the name of God
#include <bits/stdc++.h>

using namespace std;
#define Size(x) ((int)(x).size())
#define pb push_back
typedef long long ll;
typedef long double ld;
typedef pair<int,int>pii;
const int INF = 1e9 + 10;
const int MN = 3e5 + 10;

vector<int>dv[MN/3] , p_add[MN] , p_err[MN];
int fen[MN];
int L[MN] , R[MN];
int ans[MN];
int n ,m;

void prep()
{
	for(int i=1;i<=m;++i)
		for(int j=i;j<=m;j+=i) dv[j].pb(i);
}

void add(int p,int val){
	for(p++;p<MN;p+=p&-p) fen[p] += val;
}

int get(int p){
	int ret = 0;
	for(;p;p-=p&-p) ret += fen[p];
	return ret;
}

int main()
{
	ios_base :: sync_with_stdio(false) ,cin.tie(0) , cout.tie(0);
	cin >> n >> m;
	prep();
	for(int i=0;i<n;++i){
		cin >> L[i] >> R[i];
		p_add[L[i]].pb(i) , p_err[R[i]].pb(i);
	}
	for(int i=1;i<=m;++i){
		for(auto x:p_add[i]) add(L[x] , 1);
		for(auto d:dv[i])
			ans[d] += get(MN-1) - get(i-d+1);
		for(auto x:p_err[i]) add(L[x] , -1);
	}
	for(int i=1;i<=m;++i) cout << ans[i] << '\n' ;
	return 0;
}


Measured memory_bytes: 33280
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
	int n, x; cin>>n>>x;
	int ans=1;
	int d=0;
	for(int i=0; i<n; i++){
		int l; cin>>l;
		d+=l;
		if(d<=x) ans++;
	}
	cout<<ans<<endl;
	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int inf = 0x3f3f3f3f;
 void solve()
 {
     ll t,i,j,k,l,m,n,o,p,q,r,a[300001],prefix[300001];
     cin>>n>>q>>m;
     if(q*m>=n)
     {
         cout<<"Yes\n";
     }
     else
     {
         cout<<"No\n";
     }

 }
int main()
{
     ios_base::sync_with_stdio(false);
     cin.tie(0);
     ll t=1;
    // cin>>t;
     while(t--)
     {
         solve();
     }
    return 0;
}


Measured memory_bytes: 3648
//117 B - Polygon 2019/02/03
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
using namespace std;
typedef long long int int64;
typedef unsigned long long uint64;

int main(){
    int n; cin >> n;
    vector<int> l(n);
    rep(i ,n) cin >> l[i];
    sort(l.begin(),l.end());
    int __check=0;
    rep(i ,n-1) __check+=l[i];
    if(l[n-1]<__check) puts("Yes");
    else puts("No");
}

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

int main(void){
    char target[][4]={"JOI","IOI"},line[10001],*mv;
    int i,sum;
   for(;scanf("%s",line)!=EOF;){
       for(i=0;mv=line,sum=0,i<2;i++){
           while((mv=strstr(mv,target[i]))){
               sum++;
               mv++;
           }
           printf("%d\n",sum);
       }
   }
   return 0;
}

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

int main()
{  
	long long N=1,ans=0;
	cin >>N;

	ans+=(N+1)*N/2;

	for(long long i=1;i<=N;i++){
		for(long long j=i+1;j<=N;j++){
			if(i!=j){
				long long I=i,J=j;
				while(I!=J){
					if(I<J)J-=I;
					else if(J<I)I-=J;
				}
				ans+=I*6;
			}
		}
	}

	for(long long i=1;i<=N;i++){
		for(long long j=i+1;j<=N;j++){
			for(long long k=j+1;k<=N;k++){
				if(i!=j&&j!=k&&k!=i){
					long long I=i,J=j,K=k;
					while(I!=J||J!=K||K!=I){
						if(I<J)J-=I;
						if(J<I)I-=J;
						if(I<K)K-=I;
						if(K<I)I-=K;
						if(J<K)K-=J;
						if(K<J)J-=K;
					}
					ans+=I*6;
				}
			}
		}
	} 

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


Measured memory_bytes: 3632
#include<stdio.h>
#define MAX 100
#define INFTY (1<<21)
#define WHITE 0
#define GRAY 1
#define BLACK 2

int n,M[MAX][MAX];

int prim(){
  int u,minv,i,v,sum=0;
  int d[MAX],p[MAX],color[MAX];
  for(i=0 ; i<n ; i++){
    d[i]=INFTY;
    p[i]=-1;
    color[i]=WHITE;
  }

  d[0]=0;

  while(1){
    minv=INFTY;
    u=-1;
    for(i=0 ; i<n ; i++){
      if(minv > d[i] && color[i] != BLACK){
	u=i;
	minv=d[i];
      }
    }
    if(u==-1)break;
    color[u]=BLACK;
    for(v=0 ; v<n ; v++){
      if(color[v] != BLACK && M[u][v] != INFTY){
	if(d[v]>M[u][v]){
	  d[v]=M[u][v];
	  p[v]=u;
	  color[v]=GRAY;
	}
      }
    }
  }
  for(i=0 ; i<n ; i++){
    if(p[i] != -1) sum+=M[i][p[i]];
  }
  return sum;
}

int main(){
  int i,j,e;
  scanf("%d",&n);
  for(i=0 ; i<n ; i++){
    for(j=0 ; j<n ; j++){
      scanf("%d",&e);
      M[i][j]=(e==-1) ? INFTY : e;
    }
  }

  printf("%d\n",prim());
  return 0;
}

    

  
    



Measured memory_bytes: 2104
#include <atcoder/all>
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
using namespace atcoder;
const int INF = 1001001001;
const long long LINF = 1001002003004005006ll;
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; }
typedef long long ll;
typedef pair<int,int> P;

using mint = modint998244353;
const mint inv9 = mint(1)/9;

struct S {
  mint v;//value
  mint e;//10^e
  //S(mint v=0, mint e=1):v(v),e(e) {}
};

S op(S a, S b){
  return S{a.v*b.e+b.v,a.e*b.e};
}

S e(){return S{0,1};}

S mapping(int f,S s){
  if(f==0)return s;
  else{
    return S{(s.e-1)*inv9*f,s.e};
  }
}

int composition(int f,int g){
  if(f==0) return g;
  return f;
}

int id() {return 0;}

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

  lazy_segtree<S,op,e,int,mapping,composition,id> t(n);
  rep(i,n) t.set(i,S{1,10});

  rep(i,q){
    int l,r,d; cin >> l >> r >> d; l--;
    t.apply(l,r,d);
    cout << t.all_prod().v.val() << endl;
  }
  return 0;
}

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

#define int long long

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

const int INF = 1001001001;

signed main(){

    int n; cin >> n;
    int k; cin >> k;
    vector<int> a(n);
    for(int i = 0, i_len = (int)n; i < i_len; ++i) cin >> a[i];
    
    vector<int> dp(n+1, INF);

    dp[0] = 0;

    for(int i = 0; i < n; ++i){
        for(int j = 1; j <= k; ++j){
            amin(dp[i+j], dp[i] + abs(a[i] - a[i+j]));
        }
    }

/*    for(int i = 1; i < n; ++i){
        for(int j = 1; j <= k; ++k){
            amin(dp[i], dp[i-j] + abs(a[i] - a[i-j])); // i-j < 0ってなるからRE
            //それを直そうとすると自然に
            int i = 0;になる
        }
    }
    
 */



    cout << dp[n-1] << endl;

    return 0;
}


Measured memory_bytes: 1792
using System;
using System.Linq;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputs = Console.ReadLine().Split()
                .Select(int.Parse).ToArray();
            var a = inputs[0];
            var b = inputs[1];
            var c = inputs[2];
            var k = inputs[3];

            if(k < a)
            {
                Console.WriteLine(k);
            }
            else if(k < a + b)
            {
                Console.WriteLine(a);
            }
            else
            {
                Console.WriteLine(a - (k - a - b));
            }
        }
    }
}


Measured memory_bytes: 28136
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <cstring>

using namespace std;

#define rep(i, n) for (long long i = 0; i < (n); ++i)
#define repA(i, a, n) for (ll i = a; i <= (n); ++i)
#define repD(i, a, n) for (ll i = a; i >= (n); --i)
#define trav(a, x) for (auto &a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (ll)(x).size()
#define fill(a) memset(a, 0, sizeof(a))
#define fst first
#define snd second
#define ll long long
#define mp make_pair
#define pb push_back
typedef long double ld;

typedef pair<ll, ll> pii;
typedef vector<ll> vi;
#define mod 1e9+7
#define MOD 1e9+7



void solve()
{
    int a,b;
    cin >> a >> b;
    cout << (6-a-b);
}


int main()
{
    cin.sync_with_stdio(0); cin.tie(0);
	cin.exceptions(cin.failbit);
    solve();
}


// g++ pro.cpp
// ./a.out

Measured memory_bytes: 256
#include <stdio.h>
int checkPrimeNumber(int n) {
	int i;
	
	if (n == 2) return 1;
	if (n == 1 || n % 2 == 0) return 0;
	for (i = 3; i * i <= n; i += 2) {
		if (n % i == 0) return 0;
	}

	return 1;

}

int main() {
	int i;
	int n;
	int A[10000];
	int ans = 0;
	
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &A[i]);
		if (checkPrimeNumber(A[i]) == 1) {
			ans++;
		}
	}

	printf("%d\n", ans);
	return 0;
}


Measured memory_bytes: 2012
while True :
    H,W= [int(x) for x in input().split()]
    if W == 0 and H == 0:
        break
    for i in range(H):
        if i == 0 or i == H-1:
            print("#"*W)
        else:
            print("#"+"."*(W-2)+"#")                                        
    print("")

Measured memory_bytes: 7628
#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
#include <complex>
using namespace std;
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define IDX(vec, element_iter) distance((vec).begin(), element_iter)
#define print(x) cout<<(x)<<'\n'
#define print_vec(v) rep(i,v.size()){if(i!=0)cout<<" ";cout<<v[i];}cout<<'\n'
#define pe(x) cout<<(x)<<" "
#define DEBUG(x) cout<<#x<<": "<<x<<'\n'
#define DEBUG_VEC(v) cout<<#v<<":";rep(i,v.size())cout<<" "<<v[i];cout<<'\n'
#define pb push_back
#define mp make_pair
#define MOD 1000000007 //10^9+7
#define fi first
#define sc second
using ll=long long;
using pi=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
using vstr=vector<string>;
int dx[4]={0,0,-1,1};
int dy[4]={-1,1,0,0};
void yes(bool c) { if (c)print("Yes"); else print("No"); };

// Counter的な
map<ll,ll,greater<ll>> counter(vll vec) {
    map<ll,ll,greater<ll>> counter;
    for(auto v:vec) {
        counter[v]++;
    }
    return counter;
}

void solve() {
    ll n; cin >> n;
    vll A(n);
    rep(i,n) cin >> A[i];
    map<ll,ll,greater<ll>> count = counter(A);
    ll ans = 0, x=0,y=0;
    for(auto c:count){
        int cnt = c.sc;
        if(cnt>=2){
            if(x==0) {
                x = c.fi;
                if(cnt>=4){
                    y = c.fi;
                    break;
                }
            }
            else{
                y = c.fi;
                break;
            }
        }
    }
    print(x*y);
}

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
	cout<<fixed<<setprecision(20);
    //int q; cin >> q;
	//while (q--)
		solve();
    return 0;
}


Measured memory_bytes: 8064
import std.math, std.stdio, std.conv, std.string, std.range, std.algorithm;

struct C{ double x, y, r; }

void main()
{
    foreach(unused;0..readln.chomp.to!int)
    {
        auto s = readln.split.map!(to!double);
        isOverlap(C(s[0], s[1], s[2]), C(s[3], s[4], s[5])).writeln;
    }
}

int isOverlap(C a, C b)
{
    double d = sqrt((a.x - b.x) ^^ 2  +  (a.y - b.y) ^^ 2);
    if(d > a.r + b.r) return 0;
    else if(d + b.r < a.r) return 2;
    else if(d + a.r < b.r) return -2;
    else return 1;
}

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

int main() {
    int N;
    cin >> N;
    string S;
    cin >> S;
    int sum = 1;
    for (int i = 0; i < N-1; i++) {
        if(S[i] != S[i+1]) {
            sum++;
        }
    }
    cout << sum << endl;
    return 0;
}

Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
#define vi vector<int>
#define vl vector<long long>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define vp vector<P>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPD(i, n) for (int i = (int)(n-1); i >= 0; i--)
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define FORD(i, a, b) for (int i = (int)(a); i >= (int)(b); i--)
#define INF 1e18
#define INFTY 1e9
const int mod = 1000000007;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

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

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

//cout << fixed << setprecision(10) << y << endl;
struct edge {int to, cost;};
vector< vector<edge> > es;

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

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


int main() {
    int n;
    cin >> n;
    int res = (1000-(n % 1000)) % 1000;
    cout << res << endl;
    return 0;
}

Measured memory_bytes: 3632
#include <stdio.h>

int main(void) {
  int now = 0;
  while( 1 ) {
    int n, i, j;
    double ans = 0;
    scanf("%d", &n);
    if(!n) break;
    ++now;
    int ax[n], ay[n];
    for(i = 0; i < n; ++i) scanf("%d%d", &ax[i], &ay[i]);
    for(i = 1; i < n; ++i) ax[i] -= ax[0], ay[i] -= ay[0];
    for(i = 2; i < n; ++i) {
      ans += ax[i] * ay[i - 1] - ay[i] * ax[i - 1];
    }
    printf("%d %.1f\n", now, ans / 2);
  }
  return 0;
}


Measured memory_bytes: 2588
#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef long double llf;
typedef pair<lint, lint> pi;
const int MAXN = 200005;
const int mod = 1e9 + 7;

int n, k;
bool vis[105][10005];
pi dp[105][10005];

int mx = 0;
pi f(int cur, int exp){
	mx = max(mx, exp);
	if(cur == 0) return pi(0, 1);
	if(vis[cur][exp]) return dp[cur][exp];
	pi ans(0, 0);
	for(int i=0; i<=k; i++){
		if(i > cur){
			auto x = f(cur - 1, exp);
			ans.first += x.first + x.second * (i + exp) % mod;
			ans.second += x.second;
		}
		else{
			auto x = f(cur - 1, exp + (exp + i) / cur);
			ans.first += x.first + x.second * ((exp + i) % cur);
			ans.second += x.second;
		}
	}
	ans.first %= mod;
	ans.second %= mod;
	vis[cur][exp] = 1;
	return dp[cur][exp] = ans;
}

int main(){
	cin >> n >> k;
	cout << f(n, 0).first<< endl;
}


Measured memory_bytes: 15232
#include<bits/stdc++.h>
using ll = long long;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define ALL(x) x.begin(),x.end()

#define INF (int)1e9 //10^9:∞
#define LLINF (long long)1e12
#define MOD (int)1e9+7 //10^9+7:合同式の法
#define PI 3.141592653589
#define PB push_back
#define F first
#define S second
#define __MAGIC__ ios::sync_with_stdio(false);cin.tie(nullptr);

#define YESNO(T) if(T){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define yesno(T) if(T){cout<<"yes"<<endl;}else{cout<<"no"<<endl;}
#define YesNo(T) if(T){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}

#define Graph vector<vector<int>>
#define PII pair<int,int>
#define VI vector<int>
#define VVI vector<vector<int>>
#define VPII vector<pair<int,int>>

#define DDD fixed<<setprecision(10)

using namespace std;
/*..................DEFINE GLOBAL VARIABLES...................*/


/*.....................DEFINE FUNCTIONS ......................*/



/*.........................kemkemG0...........................*/
signed main() {
	__MAGIC__

	ll N,M;
	cin>>N>>M;
	if(N>M)swap(N,M);//N<Mにする
	ll ans=0;
	if(N>=3 && M>=3)ans=(N-2)*(M-2);
	else{
		if(N==1 && 3<=M)ans=M-2;
		else if(N==1 && M==2)ans=0;
		else if(N==1 && M==1)ans=1;
		else if(N==2 || M==2)ans=0;

	}
	cout<<ans<<endl;



	return 0;
}


Measured memory_bytes: 3664
#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
#define el "\n" ;
vector<ll> dp(100000  + 2 , -1 ) ;
vector<long> v(100000 + 1) ;
ll f(ll n ){
    if(n <= 1){
        return 0 ;
    }
    if(dp[n] >= 0 ){
        return dp[n] ;
    }
    else
    {
        dp[n] = min(f(n-1) + abs(v[n] - v[n-1]) ,f(n-2) + abs(v[n] - v[n-2]) ) ;

    }
    return dp[n] ;
    
}
int main(){
    ios_base::sync_with_stdio(0) ;
    cin.tie(0) ;
    ll  n ; 
    cin >> n  ; 
    
    for( ll i = 1 ; i <= n ; i++){
        cin >> v[i] ;
    }
    v[0] = v[1] ;
    cout << f( n ) << el ;
    return 0 ;
}

Measured memory_bytes: 6332
S = input()
count = 1
Flag = 0
for i in S:
    if count%2 == 1:
        if i == 'L':
            Flag = 1
    else:
        if i =='R':
            Flag  = 1
    count+=1
if Flag == 1:
    print('No')
else:
    print('Yes')

Measured memory_bytes: 38384
#include <cstdio>

#include <queue>

const int N = 1e5 + 1e4;

int k;
bool vis[N];

struct node { int cur, val; };

int main() {
	scanf( "%d", &k );
	std::deque<node> q;
	q.push_front( (node){ 1, 1 } );
	while( !q.empty() ) {
		node top = q.front(); q.pop_front();
		if( vis[ top.cur ] )
			continue;
		vis[ top.cur ] = true;
		if( top.cur == 0 ) {
			printf( "%d\n", top.val );
			return  0;
		}
		q.push_front((node){ ( top.cur * 10 ) % k, top.val });
		q.push_back((node){ ( top.cur + 1 ) % k, top.val + 1 });
	}
}


Measured memory_bytes: 3692