akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
#define INF 1145141919810893364
#define PI 3.141592653589
typedef pair<int,int> PP;
typedef long long ll;
#define int ll
#define setdouble setprecision
#define REP(i,n) for(int i=0;i<(n);++i)
#define OREP(i,n) for(int i=1;i<=(n);++i)
#define RREP(i,n) for(int i=(n)-1;i>=0;--i)
#define GOODBYE do { cout << "0" << endl; return 0; } while (false)
#define MM <<" "<<
#define Endl endl

signed main(void){
    int N;
    cin >> N;
    int Ans=INF;
    for(int i=1;i*i<=N;i++){
        if(N%i==0){
            Ans=min(Ans,i+(N/i));
        }
    }
    cout << Ans-2 << endl;
    return 0;
}



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

using namespace std;

#define INF 1000000007
#define LINF (1LL << 62)
#define PI 3.14159265358979

typedef long long i64;
typedef pair<i64,i64> P;

inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }

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, k, a[101010];
void solve(){
	cin >> n >> k;
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	
	int ans = INF, l = 0, r = k-1;
	while(r < n){
		chmin(ans, a[r]-a[l]+min(abs(a[r]),abs(a[l])));
		l++; r++;
	}
	cout << ans << endl;
}

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

Measured memory_bytes: 640
#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 n, m, q;
vector<int> a, b, c, d;
int ans;
void dfs(vector<int> A){
    if(A.size() == n){
        int score = 0;
        rep(i, q){
            if(A[b[i]] - A[a[i]] == c[i]) score += d[i];
        }
        ans = max(ans, score);
        return;
    }
    int k;
    if(A.size() == 0) k = 1;
    else k = A[A.size() - 1];
    for(int i = k; i < m + 1; i ++){
        A.push_back(i);
        dfs(A);
        A.pop_back();
    }
    return;
}

int main(){
    cin >> n >> m >> q;
    a.resize(q); b.resize(q); c.resize(q); d.resize(q);
    rep(i, q){
        int x, y;
        cin >> x >> y >> c[i] >> d[i];
        x--; y--;
        a[i] = x;
        b[i] = y;
        }
    dfs({});
    cout << ans << endl;
}

Measured memory_bytes: 3616
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include <boost/multiprecision/cpp_int.hpp>
//typedef boost::multiprecision::cpp_int ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
void Add(ll &pos,ll val){pos=mod(pos+val);}
dd EPS=1E-9;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);


int main(){
    ll n;cin>>n;
    ll t[n],a[n];
    rep(i,0,n-1)cin>>t[i]>>a[i];
    ll x=t[0];
    ll y=a[0];
    ll d;
    if(n>2){
        rep(i,1,n-1){
            d=max(x/t[i],y/a[i]);
            if(t[i]*d>=x && a[i]*d>=y){
                x=t[i]*d;
                y=a[i]*d;
            }else{
                x=t[i]*(d+1);
                y=a[i]*(d+1);
            }
        }
    }
    cout<<x+y<<endl;
    
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
int func(int n,int res){
  if (n%2==0) return func(n/2,res+=1);
  else return res;
}

int main(){
  int N;
  cin >>N;
  int c[N];
  rep(i,N) cin >>c[i];
  int ans=1<<9;
  rep(i,N) ans=min(ans,func(c[i],0));
  cout <<ans<<endl;
}


Measured memory_bytes: 256
import math
def colon():
    A, B, H, M = map(int,input().split())
    h = 30 * H
    h = h - 5.5 * M
    h = min(h, 360 - h)
    h = h * math.pi / 180
    res = A**2 + B**2 - 2*A*B*math.cos(h)
    print(res**0.5)
    
colon()

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

using namespace std;

long long int dp[2501][52];

int main(){
	int n,a;
	cin >> n >> a;
	for(int i=0;i<n;i++){
		int x;
		cin >> x;
		for(int j=2500-x;j>=0;j--){
			for(int k=51;k>0;k--){
				if(dp[j][k-1]){
					dp[j+x][k] += dp[j][k-1];
				}
			}
		}
		dp[x][1]++;
	}
	long long int ans = 0;
	for(int i=1;i<=n;i++){
		//cout << i*a << " " << dp[i*a][i] << endl;
		ans+=dp[i*a][i];
	}
	cout << ans << endl;
}

Measured memory_bytes: 768
#include "bits/stdc++.h"
using namespace std;
int main(void){
    string s; cin >> s;
    int flag = 0;
    for(char i='a';i<='z';i++){
        flag = 0;
        for(int j = 0;j<s.size();j++){
            if(s[j] == i){
                flag = 1;
                break;
            }
        }
        if(!flag) {
            cout<<i;
            return 0;
        }
    }
    cout<<"None";
    return 0;
}

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

int main() {
	while (true) {
		int H, W;
		cin >> W >> H;
		if (W == 0 && H == 0) {
			break;
		}
		for (int i = 1; i <= W; i++) {
			for (int j = 1; j <= H; j++) {
				cout << "#";
			}
			cout << endl;
		}
		cout << endl;
	}
	return 0;
}

Measured memory_bytes: 3096
#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
#define mod 1000000007
#define all(v) v.begin(),v.end()
#define rep(i,a,b) for(i=(ll)a;i<(ll)b;i++)
#define revrep(i,a,b) for(i=(ll)a;i>=(ll)b;i--)
#define ii pair<double,double>
#define pb push_back
#define f first
#define s second
#define ll long long int
#define vi vector<ll>
#define rs resize
int go(int n)
{
  if(n>=1 and n<=399)
   return 0;
  if(n>=400 and n<=799)
   return 1;
  if(n>=800 and n<=1199)
   return 2;
  if(n>=1200 and n<=1599)
   return 3;
  if(n>=1600 and n<=1999)
   return 4;
  if(n>=2000 and n<=2399)
   return 5;
  if(n>=2400 and n<=2799)
   return 6;
  if(n>=2800 and n<=3199)
   return 7;
  return 8;
}
int main()
{
     std::ios::sync_with_stdio(false);
     ll n,i,a,cn = 0;
     cin>>n;
     int cnt[9];
     rep(i,0,9) cnt[i] = 0;
     rep(i,0,n)
     {
        cin>>a;
        cnt[go(a)]++;
     }
     rep(i,0,8)
      if(cnt[i] >0)
        cn++;
     cout<<(cn ? cn : 1)<<" "<<cn + cnt[8];
     return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,x,y) for(int i=x;i<(y);++i)
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
/* start */

const double pi = acos(-1);

double dist(double a,double b,double c,double d){
   return sqrt((c-a)*(c-a) + (d-b)*(d-b));
}

signed main(){
   IOS;
   cout << setprecision(11) << fixed;
   int a,b,h,m;
   cin >> a >> b >> h >> m;
   int t = m+60*h;
   double w1 = (2*pi)/720;
   double w2 = (2*pi)/60;
   double x1 = a*cos(t*w1), y1 = a*sin(t*w1);
   double x2 = b*cos(t*w2), y2 = b*sin(t*w2);
   cout << dist(x1,y1,x2,y2) << "\n";
}

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

int main(){
  map<string, int> mp;
  int n;
  cin >> n;
  while(n--){
    string s;
    cin >> s;
    mp[s]++;
  }
  cout << "AC x " << mp["AC"] << '\n';
  cout << "WA x " << mp["WA"] << '\n';
  cout << "TLE x " << mp["TLE"] << '\n';
  cout << "RE x " << mp["RE"] << '\n';
  return 0;
}

Measured memory_bytes: 3608
#include <iostream>
#include <cmath>
#include <stdint.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <string.h>
#include <set>
using namespace std;
 
#define int long long
 
 
int gcd(int a, int b){
	
	if(b==0){
		return a;
	}
	
	return gcd(b,a%b);
	
}
 
 int lcm(int a, int b)  
 {  
    return (a*b)/gcd(a, b);  
 }  
 
 
int f(int x){
	
	
	int res = 0;
	
	while( x%2 == 0){
		
		x/=2;
		res++;
	}
	
	return res;
	
}
 
#define MOD 1000000007
 
int power(int a, int b, int m = MOD) {
    a%=m;
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a %m;
        a = a * a %m;
        b >>= 1;
    }
    return res;
}

 int arr[300001];
 
int32_t main() {
 	
 	int n;
 	
 	cin >> n;
 	
 	for(int i=0; i<n; i++){	
 	
 	 	cin >> arr[i];
 	 	
	}
 	
 	int one[64]{};
 	int zero[64]{};
 
 	for(int i=0; i<n; i++){
 		
 		int tmp = arr[i]; 
 			int k =0;
 		while(tmp){
 			
 			if(tmp &1){
 				
 				one[k]++;
 				
			}
 			else{
 				zero[k]++;
			}
 			
 			tmp/=2;
 			k++;
 			
		}
 		
 		for(int j=k; j<=63; j++){
 			
 			zero[j]++;
 			
		}
 		
 		
	}
	
 	
 	int ans = 0;
 	 for(int i=0; i<64; i++){
 	 	
 	   if(one[i] != 0 && zero[i] != 0){
		 
 		int s = (one[i]%MOD*zero[i]%MOD)%MOD;
	   	
	   	s = (s%MOD *power(2,i,MOD)% MOD )%MOD;
	   	
	   	ans = (ans%MOD + s%MOD ) % MOD;
	   }
 	 	
	}
 	
 	cout<<ans << endl;
 	  
}
 
 
 

Measured memory_bytes: 5924
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long long ll;
typedef double ld;
const long long INF = (1LL << 62);
const double inf = pow(10, 10);
double pi = 3.141592653589793;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
const int ddx[8] = {1, 0, -1, -1, -1, 0, 1, 1};
const int ddy[8] = {1, 1, 1, 0, -1, -1, -1, 0};

int main()
{
  ll N;
  cin >> N;
  if(N%2==1){
    cout << 0 << endl;
    return 0;
  }
  ll i = 1;
  ll ans = 0;
  ll x = 2;
  while (x*5 <= N)
  {
    //cout << 2 * pow(5, i) << endl;
    ll num = N / (x*5);
    //cout << num << endl;
    ans += num;
    x *= 5;
  }
  cout<<ans<<endl;
}

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

class D {
    static IEnumerable<char> Optimized() {
        while (true) {
            yield return 'g';
            yield return 'p';
        }
    }

    static int Value(char c) => c == 'p' ? 1 : 0;

    public static void Main() {
        var s = Console.ReadLine();
        var answer1 = s.Sum(Value);
        var answer2 = Optimized().Take(s.Length).Sum(Value);
        Console.WriteLine(answer2 - answer1);
    }
}


Measured memory_bytes: 11488
#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 yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
const ll INF=100000000000000001;
struct edge{int to,cost;};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};


int main() {

	int n,t;
	int a[1001],b[1001];
	int y=10001;

	cin>>n>>t;

	rep(i,n){
		cin>>a[i]>>b[i];
	}

	rep(i,n){
		if(b[i]<=t){
			if(y>a[i]){
				y=a[i];
			}
		}
	}

	if(y==10001){
		cout<<"TLE"<<endl;
	}else{
		cout<<y<<endl;
	}

	return 0;
}


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

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


Measured memory_bytes: 256
//$g++ -std=c++11 Template.cpp 

//#include <bits/stdc++.h>
#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <climits>
#include <iomanip>

#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define ROF(i, j, k) for(int i = (int)(j); i >= (int)(k); --i)
#define FORLL(i, n, m) for(long long i = n; i < (long long)(m); i++)
#define SORT(v, n) sort(v, v+n)
#define REVERSE(v) reverse((v).begin(), (v).end())

using namespace std;
using ll = long long;
const ll MOD=1000000007LL;
typedef pair<int, int> P;

ll ADD(ll x, ll y) { return (x+y) % MOD; }
ll SUB(ll x, ll y) { return (x-y+MOD) % MOD; }
ll MUL(ll x, ll y) { return x*y % MOD; }
ll POW(ll x, ll e) { ll v=1; for(; e; x=MUL(x,x), e>>=1) if (e&1) v = MUL(v,x); return v; }
ll DIV(ll x, ll y) { /*assert(y%MOD!=0);*/ return MUL(x, POW(y, MOD-2)); }

priority_queue<int> q_descending;
priority_queue<int, vector<int>, greater<int> > q_ascending;

int sum[575], l[575];

int
main(void){  
  ios_base::sync_with_stdio(false);

  int n, ml = 0;
  cin >> n;
  REP(i, n) {
    cin >> l[i];
    ml = max(ml, l[i]);
  }

  sum[0] = l[0];
  REP(i, n){
    sum[i+1] = l[i+1] + sum[i];    
  }

  //cout << sum[n-1] << " " << ml << endl;

  if(sum[n-1] - ml > ml) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <sstream>
#include <iomanip> 
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <math.h> 

using namespace std;



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

	int n, m, a, b, i, j;
	cin >> n >> m >> b >> a;
	for (i = 0; i < n; i++) {
		for (j = 0; j < m; j++) {
			if ((i < a) + (j < b) == 1) cout << "1";
			else cout << "0";
		}
		cout << "\n";
	}

	return 0;
}




Measured memory_bytes: 1280
import bisect
n = int(input())
s = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))
c = 0
for i in t:
    j = bisect.bisect_left(s, i)
    if j < n and s[j] == i:
        c += 1
print(c)


Measured memory_bytes: 16744
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define mp make_pair
#define M 1000000007
ll power( ll b, ll e)
{
    if(e==0) return 1;
    if(e&1) return b*power(b*b,e/2);
    return power(b*b,e/2);
}
ll power(ll b,ll e,ll m)
{
    if(e==0) return 1;
    if(e&1) return b*power(b*b%m,e/2,m)%m;
    return power(b*b%m,e/2,m);
}

// #define ncr_nikalo
bool sortinrev(const pair<int,int> &a,  
               const pair<int,int> &b) 
{ 
       return (a.first > b.first); 
}
ll modinv(ll a,ll m)
{
    return power(a,m-2,m);
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);
    ll int t=1;
    //cin>>t;
    #ifdef ncr_nikalo
        initialvalues();
    #endif
        
    for(ll int g=0;g<t;g++)
    {
       ll int n,k=100,ans;
       cin>>n;
       
       for(ll int i=1;;i++)
       {
        k=k*1.01;
        if(k>=n)
        {
            ans=i;
            break;
        }
       }
       cout<<ans;
       


    }
    return 0;
}

Measured memory_bytes: 3616
#include<iostream>
using namespace std;
int main(){
	long long n,i,a[100000],max,min,gou=0;
	cin>>n;
	max=-1000001;
	min=1000001;
	for(i=1;i<=n;i++){
		cin>>a[i];
		if(a[i]>max){
			max=a[i];
		}
		if(a[i]<min){
			min=a[i];
		}
		gou+=a[i];
	}
	cout<<min<<" "<<max<<" "<<gou<<endl;
	return 0;
}


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

const string w[3] = {"Sunny", "Cloudy", "Rainy"};

int main() {
    string s;
    cin >> s;

    if (s == w[0])
        cout << w[1] << endl;
    else if (s == w[1])
        cout << w[2] << endl;
    else
        cout << w[0] << endl;
    return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
class Program
{
	static void Main(string[] args)
	{
		string[] str = Console.ReadLine().Split();
		long N = long.Parse(str[0]);
		long M = long.Parse(str[1]);
		long[] A = new long[M];
		long[] B = new long[M];
		for(var i=0;i<M;i++){
			string[] str2 = Console.ReadLine().Split();
			A[i] = long.Parse(str2[0]);
			B[i] = long.Parse(str2[1]);
		}
		long[] C = new long[N];
		for(var i=0;i<N;i++){
			C[i] = N+1;
		}
		for(var i=0;i<M;i++){
			C[A[i]-1] = Math.Min(C[A[i]-1],B[i]-2);
		}
		long m = N+1;
		long ans = 0;
		for(var i=0;i<N;i++){
			m = Math.Min(m,C[i]-1);
			if(i > m){
				ans += 1;
				m = N+1;
			}
		}
		Console.WriteLine(ans);
	}
}

Measured memory_bytes: 17356
from scipy.sparse.csgraph import dijkstra
H,W = map(int,input().split())
g = [list(map(int,input().split())) for _ in range(10)]
d = dijkstra(g)
ans = 0
for _ in range(H):
    A = list(map(int,input().split()))
    for i in range(W):
        if A[i] != -1:
            ans += d[A[i]][1]
print(int(ans))

Measured memory_bytes: 17388
#include <stdio.h>
int main(void)
{
    int a,b,i,total=0;
    int c[200000];
    scanf("%d %d",&a,&b);
    for(i=0;i<b;i++)
    {
        scanf("%d",&c[i]);
    }
    for(i=0;i<b;i++)
    {
        total += c[i];
    }
    if(total >= a)
    {
        printf("Yes");
    }
    else if(total < a)
    {
        printf("No");
    }
    return 0;
}

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

// int/long:		-2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31)
// long/long long:	-9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 (-2^63 <= long < 2^63)

#define	INF (1<<30)
//1,073,741,824
//= 536,870,912 *2

#define	MOD 1000000007

#define	Rep0(i, n)	for (auto i=0; i<n; i++)
#define	Rep1(i, n)	for (auto i=1; i<=n; i++)
#define Sort(P)	sort(P.begin(), P.end())
#define Rev(P)	reverse(P.begin(), P.end())

#define BIT_MAX	500001

// Vector starting from 1
// index ==0 -> dummy, not used
vector<int> BIT(BIT_MAX+1);

void	add_BIT(int ix, const int &v) {
	while (ix<=BIT_MAX) {
		BIT.at(ix) +=v;
		ix +=ix&-ix;
	}
}

int	sum_BIT(int ix) {
	int S=0;
	while (ix>0) {
		S +=BIT.at(ix);
		ix -=ix&-ix;
	}
	return S;
}

void	F(const int r, int &rr, const vector<int> &c, vector<int> &R) {
	while (rr<r) {
		rr++;
		int C=c.at(rr);
		if(0!=R.at(C))
			add_BIT(R.at(C), -1);
		add_BIT(rr, 1);
		R.at(C)=rr;
	}
	return;
}

int	main() {
	int N, Q;
	cin >>N >>Q;
	vector<int> c(N+1, 0);
	Rep1(i, N)
		cin >>c.at(i);
	vector<vector<int>> q;
	Rep0(i, Q) {
		int l, r;
		cin >>l >>r;
		q.push_back({r, l, i});
	}
	Sort(q);
	//
	vector<int> R(N+1, 0);
	vector<int> ANS(Q, 0);
	int r0=0;
	Rep0(i, Q) {
		int r=q.at(i).at(0);
		int l=q.at(i).at(1);
		int j=q.at(i).at(2);
		F(r, r0, c, R);
		ANS.at(j)=sum_BIT(r)-sum_BIT(l-1);
	}
	Rep0(i, Q)
		cout <<ANS.at(i) <<endl;
	return 0;
}



Measured memory_bytes: 38892
N=int(input())
history=[]
for i in range(N):
  history.append(int(input()))
history=sorted(history)
nums=[]
for i in range(N):
  if i==0:
    nums.append(1)
  else:
    if history[i]==history[i-1]:
      nums[-1]+=1
    else:
      nums.append(1)
print(sum([n%2 for n in nums]))

Measured memory_bytes: 8508
#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin>>S;
  int cnt=0,res=0;
  for(int i=0;i<S.length();++i){
    char ch=S[i];
    if(ch=='A'||ch=='T'||ch=='C'||ch=='G'){
      cnt++;
      res=max(res,cnt);
    }
    else cnt=0;
  }
  cout<<res;
  return 0;
}

Measured memory_bytes: 256
S = gets.chomp

c = Hash.new(0)

S.chars.each do |s|
  c[s] += 1
end

if c.size == 2
  c.each do |_k, count|
    unless count == 2
      puts 'No'
      exit
    end
  end
  puts 'Yes'
else
  puts 'No'
end


Measured memory_bytes: 1788
#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
#define ll long long
using namespace std;
int main()
{
    ll n, ans;
    cin>>n;
    ans = (n/11)*2;
    if(n%11 != 0){
        if(n%11 > 6)ans += 2;
        else ans += 1;
    }
    cout<<ans;

    return 0;
}


Measured memory_bytes: 256
a,b = input().split()
count = 0

anum = int(a)
bnum = int(b)

# a = list(a)
# b = list(b)


for i in range(anum,bnum+1):
    stra = str(i)
    if stra == stra[::-1]:        
        count += 1
        
print(count)


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


    ll t=1;
    //cin>>t;
    while(t--)
    {
        ll n,m;
        cin>>n>>m;
        vector<vector<ll>> graph(n+1);
        vector<pair<ll,ll>> dist(n+1,{inf,-1});
        vector<short int> visited(n+1);

        for(ll i=0;i<m;++i)
        {
            ll a,b;
            cin>>a>>b;
            graph[a].push_back(b);
            graph[b].push_back(a);
        }

        priority_queue<pair<ll,ll>> q;
        q.push({0,1});
        dist[1]={0,-1};
        while(!q.empty())
        {
            ll curr=q.top().ss;
            q.pop();
            if(!visited[curr])
                visited[curr]=true;
            else continue;
            for(ll x:graph[curr])
            {
                if(dist[x].ff>dist[curr].ff+1)
                {
                    dist[x].ff=dist[curr].ff+1;
                    dist[x].ss=curr;
                    q.push({-dist[x].ff,x});
                }
            }
        }
        bool flag=true;
        for(ll i=2;i<=n;++i)
        {
            if(dist[i].ff==inf)
            {
                flag=false;
                break;
            }
        }
        if(flag==false)
        {
            cout<<"No";
            return 0;
        }
        cout<<"Yes\n";
        for(ll i=2;i<=n;++i)
        cout<<dist[i].ss<<endl;
    }
    return 0;
}


Measured memory_bytes: 15080
#include <iostream>
#include <cstdio>
#define _USE_MATH_DEFINES
#include <math.h>
#include <vector>

using namespace std;

void solve()
{
	int m, f, r;
	while (cin >> m >> f >> r)
	{
		if (m == -1 && f == -1 && r == -1)
		{
			break;
		}
		if (m == -1 || f == -1 || m + f < 30)
		{
			cout << "F" << endl;
		}
		else if (m + f >= 80)
		{
			cout << "A" << endl;
		}
		else if (m + f >= 65)
		{
			cout << "B" << endl;
		}
		else if (m + f >= 50)
		{
			cout << "C" << endl;
		}
		else if (m + f >= 30)
		{
			if (r >= 50)
			{
				cout << "C" << endl;
			}
			else
			{
				cout << "D" << endl;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}

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

int main(){
    string s,t;
    cin>>s>>t;
    for(int i=0; i<t.size(); i++) cout<<s[i]<<t[i];
    if(s.size()-t.size()==1) cout<<s[s.size()-1];
}

Measured memory_bytes: 256
///                ..:: In The Name Of God ::..
#include <bits/stdc++.h>

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define endl    '\n' 
#define INF 2e9
#define int ll
#define vi          vector<int>
#define vii         vector<pii>
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()

typedef long long ll;

using namespace std;

signed main(){

    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int N, A;
    cin >> N >> A;

    int L = A;
    int R = A + N - 1;
    int eat;

    if (R <= 0) eat = R;

    else if (L >= 0) eat = L;
    else eat = 0;

    int answer = (R + L) * (R - L + 1) / 2 - eat;

    cout << answer << endl;
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<string>
using namespace std;
int main()
{
  long long int a,b,x;
  cin>>a>>b>>x;

  long long int ans=0;
  if(a%x==0) ans=(b/x)-(a/x)+1;
  else ans=(b/x)-(a/x);
  cout<<ans<<endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
using namespace std;
//kaewasuretyuui
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef pair<int,pii> pip;
typedef vector<pip>vip	;
const double PI=acos(-1);
const double EPS=1e-8;
const int inf=1e8;
int main(){
	int n,m,s,t;
	while(cin>>n>>m>>s>>t,n+m+s+t){
		vi in(n+1);
		vector<vector<double> > dp(m+1,vector<double>(n+1));
		rep(i,s){
			int a;cin>>a;
			in[a]=1;
		}
		rep(i,t){
			int a;cin>>a;
			in[a]=2;
		}
		dp[0][0]=1;
		rep(q,m){
			rep(i,n)if(dp[q][i])loop(x,1,7){
				int a=i+x;
				if(a>n)a=2*n-a;
				bool h=false;
				if(in[a]==1)h=true;
				if(h&&q==m-1)continue;
				if(in[a]==2)a=0;
				dp[q+1+h][a]+=dp[q][i]/6.;
			}
		}
		double out=0;
		rep(i,m+1)out+=dp[i][n];
		printf("%.9f\n",out);
	}
}

Measured memory_bytes: 1324
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <climits>
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N, M;
    cin >> N >> M;
    vector<int> ans(N, 0);
    for(int i=0; i<M; i++){
        int a, b;
        cin >> a >> b;
        a--; b--;
        ans[a]++;
        ans[b]++;
    }
    for(int i=0; i<N; i++)
        cout << ans[i] << endl;
    return 0;
}


Measured memory_bytes: 256
/* 166-B.cpp
 *     Created on : May 3, 2020 
 *     Time       : 6:14:07 PM
 *     Author     : null_ptr
 */
#include<iostream>
#include<vector>

using namespace std;

int main()
{
	int n,k;
	cin>>n>>k;
	int d;

	vector<bool>chk(n);
	for(int i=0;i<k;++i)
	{
		cin>>d;
		int num;
		for(int j=0;j<d;++j)
		{
			cin>>num;
			chk[num-1]=true;
		}
	}
	int ans=n;
	for(int i=0;i<n;++i)
		ans-=chk[i];

	cout<<ans<<'\n';
}


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

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

	string s;
	cin >> s;

	s.erase(unique(begin(s), remove_if(begin(s), end(s), [](char c) { return c != 'A' && c != 'Z'; })), end(s));
	if(!s.empty() && s.front() == 'Z') s.erase(begin(s));
	if(!s.empty() && s.back() == 'A') s.erase(end(s) - 1);
	cout << (s.empty() ? "-1" : s) << endl;

	return EXIT_SUCCESS;
}

Measured memory_bytes: 1200
#include<bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define rep(i,n) for(int i=0;i<(int)(n);i++)
const int mod = 1e9+7;
const long long INF = 1LL << 60;
typedef long long ll;
int main(){
    int N, M;
    cin >> N >> M;
    vector<vector<int> > vec(M);
    for (int i = 0; i < M; i++)
    {
        int k; cin >> k;
        vec[i].resize(k);
        for (int j = 0; j < k; j++)
        {
            cin >> vec[i][j];
            vec[i][j]--;
        }
    }
    
    vector<int> p(M);
    for (int i = 0; i < M; i++)
    {
        cin >> p[i];
    }
    int ans = 0;
    for (int i = 0; i < (1 << N); i++)
    {
        bool flag = true;
        for (int j = 0; j < M; j++)
        {
            int c = 0;
            for(int id : vec[j]){
                if((i >> id) & 1){
                    ++c;
                }
            }
            c %= 2;
            if(c != p[j]){
                flag = false;
            }
        }
        if(flag){
            ans++;
        }
    }
    cout << ans << endl;
}
    

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

//AGC006 Prefix and Suffix
//http://agc006.contest.atcoder.jp/tasks/agc006_a
class Program
{
    static string InputPattern = "InputX";

    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();

        if (InputPattern == "Input1") {
            WillReturn.Add("3");
            WillReturn.Add("abc");
            WillReturn.Add("cde");
            //5
        }
        else if (InputPattern == "Input2") {
            WillReturn.Add("1");
            WillReturn.Add("a");
            WillReturn.Add("z");
            //2
        }
        else if (InputPattern == "Input3") {
            WillReturn.Add("4");
            WillReturn.Add("expr");
            WillReturn.Add("expr");
            //4
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }

    static void Main()
    {
        List<string> InputList = GetInputList();
        string s = InputList[1];
        string t = InputList[2];

        //文字列sの添字Iから文字列tを上書き
        for (int I = 0; I <= s.Length - 1; I++) {
            string wkStr = s.Remove(I);
            wkStr += t;

            if (wkStr.StartsWith(s) == false) continue;
            if (wkStr.EndsWith(t) == false) continue;
            Console.WriteLine(wkStr.Length);
            return;
        }

        //文字列sの後に文字列tを連結
        Console.WriteLine((s + t).Length);
    }
}


Measured memory_bytes: 3160
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please


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


	int N, K;
	cin >> N >> K;
	int h[100000];
	rep(i, N) {
		cin >> h[i];
	}
	sort(h, h + N);

	int saishou = 1e9;
	rep(i, N - K + 1) {
		saishou = min(saishou, h[i + K - 1] - h[i]);
	}
	co(saishou);

	Would you please return 0;
}

Measured memory_bytes: 640
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    a,b,c = map(int, input().split())
    print(len(set([a,b,c])))

if __name__ == '__main__':
    main()

Measured memory_bytes: 3316
#include<stdio.h>
int main()
{
	int a, b, n, s, i;
	while (~scanf("%d%d%d", &a, &b, &n)) {
		s = 0;
		a %= b;
		for (i = 1; i <= n; i ++) {
			a *= 10;
			s += a/b;
			a %= b;
		}
		printf("%d\n", s);
	}
	return 0;
}

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

a=n//100
b=(n-a*100)//10
c=n%10

if a==b and b==c:
    print(n)
else:   
    if n<a*100+a*10+a:
        print(a*100+a*10+a)
    else:
        a=a+1
        print(a*100+a*10+a)


Measured memory_bytes: 2940
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);

using namespace std;

namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(const pair<S,T>&p)const{return ((size_t)1e9+7)*hash<S>()(p.first)+hash<T>()(p.second);}};template<class T>struct hash<vector<T>>{size_t operator()(const vector<T> &v)const{size_t h=0;for(auto i : v)h=h*((size_t)1e9+7)+hash<T>()(i)+1;return h;}};}
template<class T>ostream& operator<<(ostream &os, const vector<T> &v){os<<"[ ";rep(i,v.size())os<<v[i]<<(i==v.size()-1?" ]":", ");return os;}template<class T>ostream& operator<<(ostream &os,const set<T> &v){os<<"{ "; for(const auto &i:v)os<<i<<", ";return os<<"}";}
template<class T,class U>ostream& operator<<(ostream &os,const map<T,U> &v){os<<"{";for(const auto &i:v)os<<" "<<i.first<<": "<<i.second<<",";return os<<"}";}template<class T,class U>ostream& operator<<(ostream &os,const pair<T,U> &p){return os<<"("<<p.first<<", "<<p.second<<")";}
void dbgprint(const string &fmt){cerr<<endl;}template<class H,class... T>void dbgprint(const string &fmt,const H &h,const T&... r){cerr<<fmt.substr(0,fmt.find(","))<<"= "<<h<<" ";dbgprint(fmt.substr(fmt.find(",")+1),r...);}
typedef long long ll;typedef vector<int> vi;typedef pair<int,int> pi;const int inf = (int)1e9;const double INF = 1e12, EPS = 1e-9;

int main(){
	cin.tie(0); cin.sync_with_stdio(0);
	
	int n; cin >> n;
	vi a(n), b(n), c(n - 1);
	rep(i, n) cin >> a[i];
	rep(i, n) cin >> b[i];
	rep(i, n - 1) cin >> c[i];
	int ans = 0;
	rep(i, n){
		ans += b[a[i] - 1];
		if(i && a[i] == a[i - 1] + 1) ans += c[a[i - 1] - 1];
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int a=stdIn.nextInt();
		int b=stdIn.nextInt();
		int c=stdIn.nextInt();
		int d=stdIn.nextInt();
		
		
		if(Math.abs(a-c)<=d||(Math.abs(b-c)<=d&&Math.abs(a-b)<=d)){
			System.out.println("Yes");
		}
		else
			System.out.println("No");
		}

	}



Measured memory_bytes: 23764
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<tuple>
#include<algorithm>
#include<cmath>
#include<limits>
#include<set>
#include<deque>
#include<queue>
#include<stack>
using namespace std;
#define int long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
typedef pair<int, int>P;
const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const int INF = 1e18;
const long double PI = (acos(-1));

vector<char>ans(3);
vector<int>v(4);

void dfs(int sum,vector<char>c) {
	if (c.size() == 3) {
		if (sum == 7)ans = c;
		return;
	}

	int n = c.size();

	vector<char>plus = c;
	plus.push_back('+');
	dfs(sum + v[n + 1], plus);

	vector<char>minus = c;
	minus.push_back('-');
	dfs(sum - v[n + 1], minus);
}


signed main() {
	string S;
	cin >> S;
	rep(i, S.size())v[i] = S[i] - '0';
	vector<char>a;
	dfs(v[0], a);
	rep(i, 3)cout << v[i] << ans[i];
	cout << v[3] << "=7" << endl;
}

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

void solve(std::string S){
    int counter = 0;
    for (int i = 0; i < S.length(); i++) {
        if (S[i] == 'o') counter++;
    }
    if (15 - S.length() + counter >= 8) cout << "YES" << endl;
    else cout << "NO" << endl;
}

int main(){
    std::string S;
    std::cin >> S;
    solve(S);
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <limits.h>

using namespace std;

int main(int argc, char const* argv[]) {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    int NN = N;
    int sum = 0;
    while (NN > 0) {
        sum += NN % 10;
        NN /= 10;
    }
    if (N % sum == 0) {
        cout << "Yes\n";
    }
    else {
        cout << "No\n";
    }
    return 0;
}


Measured memory_bytes: 888
#include <bits/stdc++.h>
#define inf (long long)1e18
using namespace std;

struct data {
  long long a, b, c;
};

long long n, m, p;
long long dist[2600] = {0};
vector<data> edge;

long long solve();
bool bell();
bool ch();

int main() {
  cin >> n >> m >> p;
  for(int i = 0; i < m; ++i) {
    int a, b, c;
    cin >> a >> b >> c;
    edge.push_back({--a, --b, p - c});
  }
  cout << solve() << endl;
  return 0;
}

long long solve() {
  for(int i = 0; i < n; ++i) dist[i] = inf;
  dist[0] = 0;
  for(int i = 0; i < n - 1; ++i) bell();
  for(int i = 0; i < n; ++i)
    if(ch()) return -1;
  return max(-dist[n - 1], 0LL);
}

bool bell() {
  bool ch = 0;
  for(int i = 0; i < m; ++i) {
    data now = edge[i];
    if(dist[now.a] != inf &&
       dist[now.b] > dist[now.a] + now.c) {
      if(now.b == n - 1) ch = 1;
      dist[now.b] = dist[now.a] + now.c;
    }
  }
  return ch;
}

bool ch() {
  bool ch = 0;
  for(int i = 0; i < m; ++i) {
    data now = edge[i];
    if(dist[now.a] != inf &&
       dist[now.b] > dist[now.a] + now.c) {
      if(now.b == n - 1) ch = 1;
      dist[now.b] = -inf;
    }
  }
  return ch;
}

Measured memory_bytes: 576
#include <stdio.h>

int main(void)
{
	int num[3];//入力用の3つの変数
	int tmp;//変換用の一時的な置き換え用変数

	scanf("%d", &num[0]);
	scanf("%d", &num[1]);
	scanf("%d", &num[2]);

	while (num[0] > num[1] || num[1] > num[2])
	{
		if (num[0] > num[1])
		{
			tmp = num[0];
			num[0] = num[1];
			num[1] = tmp;
		}

		if (num[1] > num[2])
		{
			tmp = num[1];
			num[1] = num[2];
			num[2] = tmp;
		}

	}
		printf("%d %d %d\n", num[0], num[1], num[2]);
		return 0;
	
}


Measured memory_bytes: 2764
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <set>

// などの必要なインクルードファイルすべて（3章の各標準ライブラリの説明でそれぞれ書いています）
using namespace std;



long long int A,B,N;

long long int x;

long long int y,z,r;


int main(void){           


long long int i,j;

r=0;

scanf("%lld%lld%lld", &A,&B,&N);

if((B-2)<N){

r=(A*(B-1))/B;


}else{


r=(A*(N))/B;

}

printf("%lld",r);

}

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


int main(){
    double a,b,x;  cin >> a >> b >> x;
    cout << fixed << setprecision(8);
    double y;
    double ans;
    
    if(x*2<a*a*b){
        y=(2*x)/(a*b);
        ans = atan(b/y);
    }else{
        y=2*(a*a*b-x)/(a*a);
        ans = atan(y/a);
    }

    cout << ans*180/M_PI << endl;
}




Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
int main(){
  int x, y, a, b, c;
  cin >> x >> y >> a >> b >> c;
  vector<int> Aapple(a);
  vector<int> Bapple(b);
  vector<int> Capple(c);
  priority_queue<int> possible;
  for(int i = 0; i < a; ++i) cin >> Aapple[i];
  for(int i = 0; i < b; ++i) cin >> Bapple[i];
  for(int i = 0; i < c; ++i) cin >> Capple[i];
  sort(Aapple.begin(), Aapple.end(), greater<int>());
  sort(Bapple.begin(), Bapple.end(), greater<int>());
  for(int i = 0; i < x; ++i)possible.push(Aapple[i]);
  for(int i = 0; i < y; ++i)possible.push(Bapple[i]);
  for(int i = 0; i < c; ++i)possible.push(Capple[i]);
  long long int ans = 0;
  /*
  while(!possible.empty()){
    cout << possible.top() << endl;
    possible.pop();
  }
  */
  for(int i = 0; i < x + y; ++i){
    ans += possible.top();
    possible.pop();
  }
  cout << ans << endl;
}

Measured memory_bytes: 3572
import java.util.Arrays;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int sanka = scan.nextInt();
		int point = scan.nextInt();
		int seikai = scan.nextInt();

		int[] array = new int[seikai];

		for(int i=0;i<seikai;i++) {
			array[i] = scan.nextInt();
		}

		int[] yusho = new int[sanka];
		Arrays.fill(yusho, point-seikai);

		for(int i=0;i<seikai;i++) {
			yusho[array[i]-1]++;
		}

		for(int i=0;i<sanka;i++) {
			System.out.println(yusho[i] > 0?"Yes":"No");
		}

/*		long sanka = scan.nextLong();
		long point = scan.nextLong();
		int ans = scan.nextInt();
		long[] answer = new long[ans];

		Map<Integer,Long> kanriMap = new TreeMap<Integer,Long>();

		//keyに初期ポイント，valueに番号をふる
		for(int i=0;i<sanka;i++) {
			kanriMap.put(i+1,point);
		}

		//解答した人
		for(int i=0;i<ans;i++) {

			answer[i] = scan.nextInt();
		}

		//valueが解答した人じゃない人のポイントを1減らす
		for(int i=0;i<answer.length;i++) {
			for(int key:kanriMap.keySet()) {
				if(key == answer[i]) {
					continue;
				}
				kanriMap.put(key, kanriMap.get(key)-1);
			}
		}

		//pointが0以下の人はNo,そのほかはYes
		for(int x:kanriMap.keySet()) {
			System.out.println(kanriMap.get(x) > 0?"Yes":"No");
	}*/
		scan.close();
	}
}


Measured memory_bytes: 52260
/*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;*/
#include<algorithm>
#include <bits/stdc++.h>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<ctype.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define S second
#define F first
#define f(i,n) for(ll i=0;i<n;i++)
#define f1(i,n) for(ll i=1;i<=n;i++)
#define fb(i,n) for(ll i=n-1;i>=0;i--)
#define fb1(i,n) for(ll i=n;i>0;i--)
#define endd cout<<'\n';
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define fr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define all(x) x.begin(), x.end()
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define vi vector<ll>
#define pii pair<ll,ll>
#define CASES  ll t;cin>>t;while(t--)
typedef long long ll;
typedef unsigned long long ull;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
//*X.find_by_order()
//X.order_of_key()
int main()
{
fast;
    ll n;
    cin>>n;
    cout<<(n+n*n+n*n*n);
    return 0;
}

Measured memory_bytes: 3644
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <random>
#include <cstdio>
#include <cmath>
#include <climits>
#include <map>
#include <queue>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int) n; i++)

int main() {
    int n;
    cin >> n;
    ll sum = 0;
    for (int i = 1; i <= n; i++)
    {
        if (!(i%3==0 || i%5==0)) sum += i;
    }
    cout << sum << endl;
    return 0;
}


Measured memory_bytes: 3644
#include<bits/stdc++.h>
using namespace std;
const long long INF = (1LL << 32);
const long long MOD = 1000000007;
const long double PI = 3.1415926;
#define FOR(i,r,n) for(ll i = (ll)(r); i < (ll)(n); i++)
#define RFOR(i,r,n) for(ll i=(ll)(n-1);i>=r;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define RALL(x) x.rbegin(),x.rend()
typedef long long int ll;
typedef vector<ll> vi;
typedef vector<pair<ll, ll> > vp;
typedef vector<string> vs;
typedef vector<char> vc;
typedef list<ll> lst;
typedef pair<ll, ll> P;
template <class T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <class T> T &chmax(T &a, const T &b) { return a = max(a, b); }

ll n, m, k, ans = 0, sum = 0, cnt = 0;
string s;
//char c;

#define Endl endl

/*--------------------template--------------------*/

char d[60][60];

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

ll sx, sy;
ll gx, gy;

int main() {
    cin >> n >> m;
    REP(i, n) {
        REP(j, m) {
            cin >> d[i][j];
        }
    }


    REP(i, m) {
        REP(j, n) {
            if (d[i][j] == '#') {
                bool f = false;
                REP(t, 4) {
                    ll nx = i + dx[t];
                    ll ny = j + dy[t];
                    if (0 <= nx && nx < m && 0 <= ny && ny < n) {
                        if (d[nx][ny] == '#') {
                            f = true;
                            break;
                        }
                    }
                }
                if (!f) {
                    cout << "No" << endl;
                    return 0;
                }
            }
        }
    }
    cout << "Yes" << endl;
}

Measured memory_bytes: 256
#!/usr/bin/env python3
#AGC13 A

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7


n = int(sys.stdin.readline())
a = list(map(int,sys.stdin.readline().split()))
ans = 1
x = a[0]
flg = 0
for i in range(1,n):
    if flg == 0:
        if x < a[i]:
            flg = 1
        elif x > a[i]:
            flg = -1
    if flg == 1:
        if x > a[i]:
            flg = 0
            ans += 1
    elif flg == -1:
        if x < a[i]:
            flg = 0
            ans += 1
    x = a[i]
print(ans)


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

struct Card {
  char suit;
  char value;
};
int main() {
  int N;
  cin>>N;
  Card C1[N], C2[N];
  for (int i=0; i<N; i++) {
    cin>>C1[i].suit>>C1[i].value;
    C2[i]=C1[i];
  }
  for (int i=0; i<N; i++) {
    for (int j=N-1; j>=i+1; j--) {
      if (C1[j].value<C1[j-1].value) {
        swap(C1[j],C1[j-1]);
      }
    }
  }
  for (int i=0; i<N; i++) {
    int minj=i;
    for (int j=i; j<N; j++) {
      if (C2[j].value<C2[minj].value) {
        minj=j;
      }
    }
    swap(C2[i],C2[minj]);
  }
  for (int i=0; i<N; i++) {
    cout<<(i==0?"":" ")<<C1[i].suit<<C1[i].value<<flush;
  }
  cout<<endl;
  cout<<"Stable"<<endl;
  for (int i=0; i<N; i++) {
    cout<<(i==0?"":" ")<<C2[i].suit<<C2[i].value<<flush;
  }
  cout<<endl;
  bool f=true;
  for (int i=0; i<N; i++) {
    if (C1[i].suit!=C2[i].suit) {
      f=false;
    }
  }
  cout<<(f?"Stable":"Not stable")<<endl;
  return 0;
}



Measured memory_bytes: 3056
# -*- coding: utf-8 -*-


def main():
    from bisect import bisect_left
    from bisect import bisect_right

    n = int(input())
    a = sorted(list(map(int, input().split())))
    b = sorted(list(map(int, input().split())))
    c = sorted(list(map(int, input().split())))
    ans = 0

    for bi in b:
        less = bisect_left(a, bi)
        greater = n - bisect_right(c, bi)
        ans += less * greater

    print(ans)


if __name__ == '__main__':
    main()


Measured memory_bytes: 22720
#include <iostream>

using namespace std;

int main() {
	char b; cin >> b;
	switch (b) {
	case 'A':
		cout << 'T';
		break;
	case 'T':
		cout << 'A';
		break;
	case 'G':
		cout << 'C';
		break;
	case 'C':
		cout << 'G';
		break;
	}
	cout << endl;

	return 0;
}

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

int main() {  
 vector<int> bingo(9);
 for(int i=0;i<9;i++){
   cin >> bingo.at(i);
 }
 vector<char>mark(9);
   for(int i=0;i<9;i++){
  mark.at(i)='x';
   }
 int N,a;
  cin >>N;
  for(int i=0; i<N; i++){
  cin >>a;
  	for(int i=0;i<9;i++){
  	if(bingo.at(i)==a){mark.at(i)='1';}
  	}
  }
  string ans="No";
  if(mark.at(0)=='1'&&mark.at(1)=='1'&&mark.at(2)=='1'){ans="Yes";}
  else if(mark.at(0)=='1'&&mark.at(1)=='1'&&mark.at(2)=='1'){ans="Yes";}  
  else if(mark.at(3)=='1'&&mark.at(4)=='1'&&mark.at(5)=='1'){ans="Yes";}   
  else if(mark.at(6)=='1'&&mark.at(7)=='1'&&mark.at(8)=='1'){ans="Yes";}   
  else if(mark.at(0)=='1'&&mark.at(3)=='1'&&mark.at(6)=='1'){ans="Yes";}   
  else if(mark.at(1)=='1'&&mark.at(4)=='1'&&mark.at(7)=='1'){ans="Yes";}   
  else if(mark.at(2)=='1'&&mark.at(5)=='1'&&mark.at(8)=='1'){ans="Yes";}   
  else if(mark.at(0)=='1'&&mark.at(4)=='1'&&mark.at(8)=='1'){ans="Yes";}   
  else if(mark.at(2)=='1'&&mark.at(4)=='1'&&mark.at(6)=='1'){ans="Yes";}  
  cout <<ans <<endl;  
}

Measured memory_bytes: 256