akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

int main() {
    vector<int> t(5);
    for (int i = 0; i < 5; i++) cin >> t[i];

    sort(t.begin(), t.end(), [](auto const & a, auto const & b) { return a % 10 < b % 10; });

    int res = 0;
    bool flag = false;
    for (int i = 0; i < 5; i++) {
        if (t[i] % 10 == 0) {
            res += t[i];
        } else if (!flag) {
            res += t[i];
            flag = true;
        } else {
            res += (t[i] / 10 + 1) * 10;
        }
    }

    cout << res << endl;

    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>

int main(void)
{

    int h, w, i, j;

    while(1){

        scanf("%d %d", &h, &w);
        if(w == 0 && h == 0) {
            break;
        }
        for(i = 0; i < h; i++) {
            for(j = 0; j < w; j++) {
                if(i == 0 || i == h - 1 || j == 0 || j == w - 1)
                    printf("#");
                else
                    printf(".");
            }
                printf("\n");
        }
        printf("\n");
    }

    return 0;
}

Measured memory_bytes: 572
require 'pp'
N = gets.chomp.to_i
p = []
index = Array.new(N+1)
N.times do |i|
  x = gets.chomp.to_i
  p << x
  index[x] = i
end

max = 1

i = 1
while i <= N
  current = 1
  while i < N
    if index[i] < index[i+1]
      current += 1
      max = current if current > max
      i += 1
    else
      break
    end
  end
  i += 1
end

puts N - max


Measured memory_bytes: 5684
#include <iostream>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <limits>
#include <numeric>
#include <algorithm>
#include <functional>

using namespace std;

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

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

	if (A + B + C >= 22)
	{
		cout << "bust";
	}
	else
	{
		cout << "win";
	}

	return 0;
}


Measured memory_bytes: 3608
#include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007 
using namespace std;
void solve(){
  ll n;
  cin>>n;
  if(n>=30)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}
int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt","r", stdin);
    freopen("output.txt","w", stdout);
#endif
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    solve();
    return 0;
}

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

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using vec_b = vector<bool>;
using vec_str = vector<string>;
using graph = mat;
using edge = pair<ll,ll>;
using wgraph = vector<vector<edge>>;

#define INF (1LL << 60)
#define MOD 1000000007

#define REP(i,m,n) for(ll (i)=(m),i##_len=(n);(i)<(i##_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define _PR(x) cout << (x) << endl
#define _PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define pb push_back


int main()
{
    string S;
    cin >> S;
    if(S == "SUN") _PR(7);
    else if(S == "MON") _PR(6);
    else if(S == "TUE") _PR(5);
    else if(S == "WED") _PR(4);
    else if(S == "THU") _PR(3);
    else if(S == "FRI") _PR(2);
    else if(S == "SAT") _PR(1);
    

    return 0;
}

/*



*/

Measured memory_bytes: 256
#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 FORR(i, m, n) for (int i = (m); i >= (n); --i)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const ll mod2 = 998244353;
const int INF = 1000000005;
const long double EPS = 1e-10;

vector<int> idx[26];

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

  int n = s.size();
  rep(i, n) {
    int sln = s[i] - 'a';
    idx[sln].push_back(i + 1);
  }

  ll ans = 0, res = 0;
  int m = t.size();
  rep(i, m) {
    int sln = t[i] - 'a';
    if (idx[sln].empty()) {
      cout << -1 << endl;
      return 0;
    }
    auto itr = upper_bound(idx[sln].begin(), idx[sln].end(), res);
    if (itr == idx[sln].end()) {
      ans += n;
      itr = upper_bound(idx[sln].begin(), idx[sln].end(), 0);
    }
    res = *itr;
  }

  cout << ans + res << endl;
  


  
  return 0;
}

Measured memory_bytes: 1216
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
void yes() {
  cout << "NO" << endl;
  exit(0);
}
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  //b
  int h, w, n;
  cin >> h >> w >> n;
  int sx, sy;
  cin >> sy >> sx;
  string s, t;
  cin >> s >> t;
  int cur = sx;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'L') cur--;
    if (cur <= 0) yes();
    if (t[i] == 'R') cur = min(cur + 1, w);
  }
  cerr << "hidari" << endl;
  cur = sx;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'R') cur++;
    if (cur > w) yes();
    if (t[i] == 'L') cur = max(cur - 1, 1);
  }
  cerr << "migi" << endl;
  cur = sy;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'U') cur--;
    if (cur <= 0) yes();
    if (t[i] == 'D') cur = min(cur + 1, h);
  }
  cerr << "ue" << endl;
  cur = sy;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'D') cur++;
    if (cur > h) yes();
    if (t[i] == 'U') cur = max(cur - 1, 1);
  }
  cerr << "shita" << endl;
  cout << "YES" << endl;
  return 0;
}

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

class Game {
    int team1, team2, point1, point2;
    public:
        void set(int a, int b, int c, int d);
        void eval(int* score);
};

void Game::set(int a, int b, int c, int d) {
    team1 = a; team2 = b;
    point1 = c; point2 = d;
}

void Game::eval(int* score) {
    if (point1 < point2) score[team2 - 1] += 3;
    else if (point1 == point2) {
        score[team1 - 1]++;
        score[team2 - 1]++;
    } else score[team1 - 1] += 3;
}

int main() {
    int n; cin >> n;
    int score[n]; for (int j = 0; j < n; j++) score[j] = 0;

    const int time = n * (n - 1) / 2;
    Game games[time];
    for (int i = 0; i < time; i++) {
        int a, b, c, d; cin >> a >> b >> c >> d;
        games[i].set(a, b, c, d);
        games[i].eval(score);
    }

    int rank[n];
    for (int j = 0; j < n; j++) {
        int win = 0, even = 0;
        for (int jj = 0; jj < n; jj++)
            if (jj != j) {
                if (score[j] > score[jj]) win++;
                else if (score[j] == score[jj]) even++;
            }
        rank[j] = n - (win + even);
    }

    for (int j = 0; j < n; j++) cout << rank[j] << endl;
}


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

int main(){
  int x;
  
  cin >> x;
  
  for(int a = -118; a < 120; a++){
    for(int b = -119; b < 119; b++){
      if(a*a*a*a*a - b*b*b*b*b == x){
        cout << a << " " << b << endl;
        return 0;
      }
    }
  }
  
  return 0;
}

Measured memory_bytes: 3636
n = int(input())
task = []
amount = 0
for i in range(n):
    a, b = [int(i) for i in input().split()]
    amount += a
    task.append([a, b])
task_1 = sorted(task, key=lambda x:(x[1], -x[0]))
limit = task_1[n-1][1]
frag = 0
now = 0
cnt = 0
if(amount > limit):
    frag = 1
else:
    for i in range(n):
        now += task_1[i][0]
        cnt += 1
        if(task_1[i][1] < now):
            frag = 1
        if(frag == 1):
            break
if(frag == 1):
    print("No")
else:
    print("Yes")

Measured memory_bytes: 58576
#include<bits/stdc++.h>
using namespace std;
const int N = 1e2+5;
int A[N], n, rt, c = -1, t;
int main(){
    scanf("%d", &n);
    for(int i=0;i<n;i++) scanf("%d", &A[i]);
    t = 1; c = A[0];
    for(int i=1;i<n;i++){
        if(A[i]!=c){
            rt+=(t>>1);
            c = A[i];
            t = 1;
        }
        else t++;
    }
    rt+=(t>>1);
    printf("%d", rt);
}

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

int main()
{
  int i, sum=0;
  string s;
  cin>>s;
  for(i=0; i<s.size(); i++)
  {
    if(s[i]=='0') sum += 0;
    else if(s[i]=='1') sum += 1;
    else if(s[i]=='2') sum += 2;
    else if(s[i]=='3') sum += 3;
    else if(s[i]=='4') sum += 4;
    else if(s[i]=='5') sum += 5;
    else if(s[i]=='6') sum += 6;
    else if(s[i]=='7') sum += 7;
    else if(s[i]=='8') sum += 8;
    else if(s[i]=='9') sum += 9;
  }
  if(sum%9==0) cout<<"Yes";
  else cout<<"No";
  return 0;
}

Measured memory_bytes: 3704
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
    int cards[4][13];
    int n = 0;
    cin >> n;
    char mark;
    int num;
    int m = 0;
    for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
            cards[i][j] = 0;
        }
    }
    
    for(int i = 0; i < n; i++){
        cin >> mark >> num;
        switch(mark){
        case 'S': m = 0;
            break;
        case 'H': m = 1;
            break;
        case 'C': m = 2;
            break;
        case 'D': m = 3;
            break;
        };
        cards[m][num - 1] = 1;
    }
    
    for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
            if(cards[i][j] == 0){
                switch(i){
                case 0:
                    cout << "S " << j + 1 << endl;
                    break;
                case 1:
                    cout << "H " << j + 1 << endl;
                    break;
                case 2:
                    cout << "C " << j + 1 << endl;
                    break;
                case 3:
                    cout << "D " <<  j  + 1<< endl;
                    break;
                };
            }
        }
    }
                    
    return 0;
}


Measured memory_bytes: 3048
#include <bits/stdc++.h>
using namespace std;
#define popCnt(x) (__builtin_popcountll(x))
typedef long long Long;

int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifdef Local
  freopen("test.in", "r", stdin);
#else
#define endl '\n'
#endif

  Long a, b, c;
  cin >> a >> b >> c;

  Long res = b;
  res += min(c, a + b + 1);

  cout << res << endl;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
#define INF 1000000005
#define mod 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i = 0; i < (n); ++i) /*0からn-1までのrep*/
#define rrep(i,n) for(int i = 1; i <= (n); ++i) /*1からnまでのrep*/
#define drep(i,n) for(int i = (n)-1; i >= 0; --i) /*n-1から0までのrep*/
#define srep(i,s,t) for (int i = s; i < t; ++i) /*sからt-1までのrep*/
#define each(a,b) for(auto& (a): (b)) /*よくわからん*/
#define all(v) (v).begin(),(v).end() /*全選択*/
#define sz(v) (int)(v).size() /*大きさ*/
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end()) /*重複削除*/
#define cmx(x,y) x=max(x,y) /*最大値*/
#define cmn(x,y) x=min(x,y) /*最小値*/
#define rev(v) reverse((v).begin(),(v).end()); /*逆順*/
#define so(v) sort((v).begin(), (v).end()); /*ソート*/
#define yn {puts("Yes");}else{puts("No");} /*はい・いいえ*/
#define fi first
#define se second
#define pb push_back

using namespace std;

using ll = long long;
using P = pair<int,int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vd = vector<double>;
using vp = vector<P>;
using vs = vector<string>; 

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

Measured memory_bytes: 3620
using DataStructures
const double = Float64
const int = Int64

parseint(x) = parse(int, x)
readint() = map(parseint, split(readline()))

const MOD = 998244353
function main()
  A,B,C,D = readint()

  s0 = Array{int,2}(undef,C,D)
  s1 = Array{int,2}(undef,C,D)

  s0[A,B] = 1
  s1[A,B] = 0

  
  for i in A+1:C
    s0[i,B] = (s0[i-1,B]+s1[i-1,B])* B%MOD
    s1[i,B] = 0
  end

  for i in B+1:D
    s0[A,i] = 0
    s1[A,i] = (s0[A,i-1] + s1[A,i-1])*A%MOD
  end


  for j in B+1:D,i in A+1:C
    s0[i,j] = (s0[i-1,j]+s1[i-1,j])*j%MOD
    s1[i,j] = (s0[i,j-1]+s1[i,j-1]*i)%MOD
    
  end

  println((s0[C,D]+s1[C,D])%MOD)
  
end

main()

Measured memory_bytes: 328768
#ifdef __APPLE__
#include <iostream>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <set>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <iomanip>
#include <cmath>
#include <ctgmath>
#include <math.h>
#include <cassert>
#include <chrono>
#else
#include <bits/stdc++.h>
#endif

using namespace std;
#define io ios_base::sync_with_stdio(false), cin.tie(NULL)
#define GFOR(i,a,n) for (i=a;i<n;i++)
#define FOR(i,a,n) for (int i=a;i<n;i++)
#define RFOR(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define tc(t) for (int tc=1; tc<=t; tc++)
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<long long int> vll;
typedef vector<pair<int, int> > vpi;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
mt19937 mrand(random_device{}()); 
const ll mod=1000000007;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll modInverse (ll a) {ll p = mod - 2; return powmod(a, p);}
// head

void solve() {
    int x;
    cin >> x;

    cout << 8 - (x - 400)/200 << "\n"; 
}

int main() {
    #ifdef LOCAL
    auto t1 = std::chrono::high_resolution_clock::now();
    #endif

    io;
    solve();

    #ifdef LOCAL
    auto t2 = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::milliseconds>( t2 - t1 ).count();

    std::cout << "Time Taken: " << duration << "\n";
    #endif

}
// check for edge cases in limits
// printing double may print 1.223232e9 like values, beware of that
// carefully observe simulation of test cases


Measured memory_bytes: 3660
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(int i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(int i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define uniq(x) (x).erase(unique((x).begin(), (x).end()), (x).end())

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n, m;
    cin >> n >> m;
    int a, dp;
    map<int, int> mcnt;
    ll ans = 0;
    
    rep(i, n) {
        cin >> a;
        
        if (i == 0) {
            dp = a % m;
        }
        else {
            dp = (dp + a) % m;
        }
        
        mcnt[dp]++;
    }
    
    for (auto x : mcnt) {
        if (x.first == 0) {
            ans = ans + x.second;
        }
        
        ans += (ll)x.second * (x.second - 1) / 2;
    }
    
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3200
s = input()
t = input()

s = sorted(list(s))
t = sorted(list(t), reverse=True)

#print(s, t)
kaburi=min(len(s), len(t))
for i in range(kaburi):
    if s[i]<t[i]:
        print('Yes')
        break
    elif s[i]>t[i]:
        print('No')
        break
else:
    if len(s)<len(t):
        print('Yes')
    else:
        print('No')


Measured memory_bytes: 38256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
#define pb push_back
#define fr(i,n) for(int i=0;i<n;i++)
#define Fr(i,n) for(int i=0;i++<n;)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
#define iFr(i,n) for(int i=n;i>0;i--)

ll n,a[410],dp[410][410]={},s[410][410]={};

int main(){
  cin>>n;
  fr(i,n) cin>>a[i];
  fr(i,n){
    fr(j,n-i){
      ll k=i+j;
      if(i==0){s[j][k]=a[j];continue;}
      s[j][k]=s[j][k-1]+a[k];
    }
  }
  fr(i,n){
    fr(j,n-i){
      ll k=i+j;
      if(i==0){dp[j][k]=0;continue;}
      ll ka=1e18;
      fr(l,i) ka=min(ka,dp[j][j+l]+dp[j+l+1][k]);
      dp[j][k]=ka+s[j][k];
    }
  }
  cout<<dp[0][n-1]<<endl;
}

Measured memory_bytes: 2816
var input = '';
var readable = process.stdin;
readable.resume();
readable.setEncoding( 'utf-8' );
readable.on( 'data', function( chunk ) {
  input += chunk;
  var data = input.split( " " );
  var x1 = parseFloat( data[0] );
  var y1 = parseFloat( data[1] );
  var x2 = parseFloat( data[2] );
  var y2 = parseFloat( data[3] );
   
  var d = Math.sqrt( Math.pow( x1-x2, 2 )+Math.pow( y1-y2, 2 ) ).toFixed(5);
  console.log( d );  
});

Measured memory_bytes: 15668
#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define COUT(x) cout<<(x)<<"\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define REP(i, n) for(int i=0;i<n;i++)
#define YES(x) cout<<(x?"YES":"NO")<<"\n"
#define Yes(x) cout<<(x?"Yes":"No")<<"\n"
#define dump(x) cout<<#x<<" = "<<(x)<<"\n"
#define endl "\n"
using G = vector<vector<int>>;
using M = map<int,int>;
using P = pair<int,int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int,vector<int>,greater<int>>;
using V = vector<int>;
using ll = long long;
using edge = struct { int to; int cost; };
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; }
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

int main() {
  IOS;
  int n; cin >> n;
  vector<int> a(n);
  REP(i,n) cin >> a[i];

  sort(ALL(a), greater<int>());

  ll ans = 0;
  for(int i = 1; i < n/2; i++) {
    ans += a[i];
  }
  ans*=2;

  if (n % 2) {
    ans+= a[n/2];
  }

  ans+=a[0];

  COUT(ans);
  return 0;
}


Measured memory_bytes: 3956
#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
		cin>>a[i];
		
	for(int i=0;i<n;i++)
	{
		if(a[i]%2==0 && a[i]%3!=0 && a[i]%5!=0)
		{
			cout<<"DENIED";
			return 0;
		}
	}
	cout<<"APPROVED";
	return 0;
}


Measured memory_bytes: 256
#ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>
#define FASTIO ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define rep(i, l, r) for (ll i = (l); i < (r); ++i)
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define pii pair<ll, ll>
#define pll pair<ll, ll>
#define pli pair<ll, ll> 
#define pdd pair<ld, ld> 
#define pb push_back
#define reset(x,v) memset(x,v,sizeof(x))
#define mod 1000000007
using namespace std;

int main(){
	FASTIO
	int n;
	cin >> n;
	ll a[n], b[n];
	rep(i, 0, n){
		cin >> a[i] >> b[i];
	}
	sort(a, a + n);
	sort(b, b + n);
	if(n % 2){
		cout << b[n/2] - a[n/2] + 1;
	} else {
		cout << (b[(n-1)/2] + b[n/2] - a[(n-1)/2] - a[n/2]) + 1;
	}
    return 0;
}

Measured memory_bytes: 6760
#include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <map>
#include <queue>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using namespace std;

template<class T>
constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;

int main() {
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < k; ++i) {
        int a, b;
        scanf("%d %d", &a, &b);
        a = min(a, n-a+1);
        b = min(b, n-b+1);
        int x = ((n+1)/2-max((n+1)/2-a, (n+1)/2-b)-1)%3+1;
        cout << x << "\n";
    }
    return 0;
}



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

vector<vector<int>> edge;
vector<int> grundy;

void dfs(int now, int par) {
    for (int child : edge[now]) {
        if (child != par) {
            dfs(child, now);
            grundy[now] ^= grundy[child]+1;
        }
    }
    return;
}

int main(){
    int N;
    cin >> N;
    edge.resize(N+1);
    grundy = vector<int>(N+1, 0);
    for (int i = 0; i < N-1; i++) {
        int a, b;
        cin >> a >> b;
        edge[a].push_back(b);
        edge[b].push_back(a);
    }
    dfs(1, 0);
    if (grundy[1] == 0) cout << "Bob\n";
    else cout << "Alice\n";
    return 0;
}

Measured memory_bytes: 12288
def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i <= x ** (1 / 2):
        if x % i == 0:
            return False
        i += 2
    return True

N = int(input())
cnt = 0
for _ in range(N):
    x = int(input())
    if is_prime(x):
        cnt += 1

print(cnt)



Measured memory_bytes: 5656
# -*- coding: utf-8 -*-
"""
Point Card
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0631

"""
import sys


def solve(cards, n, m):
    ans = 0
    for _ in range(1, m):
        atari, _ = cards.pop()
        ans += max(0, n - atari)
    return ans


def main(args):
    n, m = map(int, input().split())
    cards = sorted([[int(i) for i in input().split()] for _ in range(m)])
    ans = solve(cards, n, m)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])



Measured memory_bytes: 5740
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <array>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <queue>
#include <bitset>
#include <tuple>
#include <cmath>
#include <complex>
#include <algorithm>
#include <utility>
#include <regex>
#include <cstdint>
#include <numeric>
#include <functional>
#include <cassert>

using namespace std;
using ll = int64_t;
using ull = uint64_t;

constexpr ll INF = 1000000000;/* 1e+9a */

void solve(istream &cin) {
    string s;
    cin >> s;
    if(!cin) return;
    ll bsum = 0;
    ll ans = 0;
    for (auto &&cc : s) {
        if(cc == 'W'){
            ans += bsum;
        }
        else{
            bsum ++;
        }
    } // end cc
    cout << ans;
    
}

int main(int argc, char *argv[]) {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << setprecision(16) << scientific;
#ifdef DEBUG
    cerr << "DEBUG MODE" << endl;
    string test_cases = "test.txt";
    auto fs = fstream(test_cases, fstream::in);
    while(fs) {
        solve(fs);
    }
#else
    solve(cin);
#endif
    return 0;
}


Measured memory_bytes: 720
#include <bits/stdc++.h>
using namespace std;using ll=int_fast64_t;using ld=long double;using pll=pair<ll,ll>;using pld=pair<ld,ld>;
const ll INF=1LL<<60;void solve();int main(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(10);solve();}
#define foreach(i,a) for(auto &i:a)
#define SELECTOR(_1,_2,_3,_4,SELECT,...) SELECT
#define rep(...) SELECTOR(__VA_ARGS__,_rep2,_rep1,_rep0)(__VA_ARGS__)
#define _rep0(i,n) for(ll i=0;i<n;++i)
#define _rep1(i,k,n) for(ll i=k;i<n;++i)
#define _rep2(i,k,n,d) for(ll i=k;d!=0&&d>0?i<n:i>n;i+=d)
template<class T> vector<T> make_v(size_t a,T b){return vector<T>(a,b);}
template<class... Ts> auto make_v(size_t a,Ts... ts){return vector<decltype(make_v(ts...))>(a,make_v(ts...));}
template<class T> inline bool chmax(T &a,const T &b){if(a<b){a=b; return 1;} return 0;}
template<class T> inline bool chmin(T &a,const T &b){if(a>b){a=b; return 1;} return 0;}

void solve(){
  ll n; cin>>n;
  vector<ll> A(3),B(3);
  rep(i,3) cin>>A[i];
  rep(i,3) cin>>B[i];

  // A -> B
  vector<ll> dp(n+1);
  rep(i,n+1){
    ll res=i;
    if(i>=A[0]) chmax(res,dp[i-A[0]]+B[0]);
    if(i>=A[1]) chmax(res,dp[i-A[1]]+B[1]);
    if(i>=A[2]) chmax(res,dp[i-A[2]]+B[2]);
    dp[i]=res;
  }

  // B -> A
  n=*max_element(dp.begin(),dp.end());
  dp.assign(n+1,0);
  rep(i,n+1){
    ll res=i;
    if(i>=B[0]) chmax(res,dp[i-B[0]]+A[0]);
    if(i>=B[1]) chmax(res,dp[i-B[1]]+A[1]);
    if(i>=B[2]) chmax(res,dp[i-B[2]]+A[2]);
    dp[i]=res;
  }

  cout<<*max_element(dp.begin(),dp.end())<<"\n";
}

Measured memory_bytes: 195712
import sys
from itertools import accumulate

# functions used
r = lambda: sys.stdin.readline().strip() #single: int(r()), line: map(int, r().split())
R = lambda: list(map(int, r().split())) # line: R(), lines: [R() for _ in range(n)]
Rmap = lambda: map(int, r().split())
# set inputs
N, C = R()
STC = [R() for _ in range(N)]
#  0.5sec as one unit
tbl = [[0]*(2*(10**5)+5) for _ in range(C)]

for s, t, c in STC:
    c -= 1
    tbl[c][2*s-1] += 1
    tbl[c][2*t] -= 1


tbl2 = [list(accumulate(a)) for a in tbl]
for i in range(200002):
     for j in range(C):
         if tbl2[j][i]>1:
          	tbl2[j][i]=1

ans = max([sum(x) for x in zip(*tbl2)])
print(ans)


# tmp = [sum(x) for x in zip(*tbl2)]

# res = 0
# for i in range(200002):
#     cc = 0
#     for j in range(C):
#         if tbl2[j][i]:
#             cc += 1
#     res = max(res, cc)
# print(res)


Measured memory_bytes: 122992
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i,u) for (register int i=head[u]; i; i=nxt[i])
#define rep(i,a,b) for (register int i=(a); i<=(b); i++)
#define per(i,a,b) for (register int i=(a); i>=(b); i--)
using namespace std;
typedef long long ll;
typedef unsigned int ui;
typedef pair<int,int> Pii;
typedef vector<int> Vi;
template<class T> inline void read(T &x){
	x=0; char c=getchar(); int f=1;
	while (!isdigit(c)) {if (c=='-') f=-1; c=getchar();}
	while (isdigit(c)) {x=x*10+c-'0'; c=getchar();} x*=f;
}
template<class T> inline void umin(T &x, T y){x=x<y?x:y;}
template<class T> inline void umax(T &x, T y){x=x>y?x:y;}
inline ui R() {
	static ui seed=416;
	return seed^=seed>>5,seed^=seed<<17,seed^=seed>>13;
}
const int N = 4020,mo=1e9+7;
int n,m,k,f[N][N],res;
void add(int&x,int y){x=x+y<mo?x+y:x+y-mo;}
int main() {
	read(n);read(m);read(k);
	f[0][0]=1;
	rep(i,0,n)rep(j,0,m)if(f[i][j]){
		rep(c,0,k-1)add(f[i+c][j+k-1-c],f[i][j]);
		int c=(n-i)%(k-1);if(!c)c+=k-1;if(i+c<=n&&j+k-c<=m){
		//	printf("%d %d %d:%d\n",i,j,c,f[i][j]);
			add(res,f[i][j]);
		}
	}
	cout<<res;return 0;
}


Measured memory_bytes: 61312
#!/usr/bin/env pypy3

from sys import stdin, stdout
 
def input():
    return stdin.readline().strip()

sum = []
dif = []

N = int(input())
for _ in range(N):
    x, y = input().split()
    x = int(x)
    y = int(y)

    sum += [x+y]
    dif += [x-y]

ans1 = max(sum) - min(sum)
ans2 = max(dif) - min(dif)

print(max(ans1, ans2))

Measured memory_bytes: 91172
#include <stdio.h>

void bubbleSort(int numbers[], int array_size);

int main(){
    int moji[3] = {0};
    int i;
    int flag = 0;

    for(i = 0; i < 3; i++){
        scanf("%d", &moji[i]);
    }

    bubbleSort(moji, 3);

    if(moji[0] != 7) flag = 1;

    for(i = 1; i < 3; i++){
        if(moji[i] != 5) flag = 1;
    }

    if(flag == 0) printf("YES\n");
    else printf("NO\n");

    return 0;

}

void bubbleSort(int numbers[], int array_size){
  
    int i, j, temp;

  for (i = 0; i < (array_size - 1); i++) {
    for (j = (array_size - 1); j > i; j--) {
      if (numbers[j-1] < numbers[j]) {
        temp = numbers[j-1];
        numbers[j-1] = numbers[j];
        numbers[j] = temp;
      }
    }
  }
}

Measured memory_bytes: 128
#include<iostream>

int main(){
	int a,b,c,i,n;
	
	while(std::cin>>a>>b){
		c=a+b;
		n=0;
		i=1;
		while(i<=c){
		n++;
		i=i*10;
		}
	std::cout<<n<<std::endl;
		}

    return 0;
}

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

int main() {
	int n;
	cin >> n;
	vector<int>a(n);
	for (size_t i = 0; i < n; i++)cin >> a.at(i);
	sort(a.begin(), a.end());
	int median = ceil(a.at(a.size() - 1) * 0.5);
	int aj = 0;
	int gap = 1000000000;
	for (size_t i = 0; i < n; i++) {
		if (abs(a.at(i) - median) < gap) {
			aj = a.at(i);
			gap = abs(a.at(i) - median);
		}
		else break;
	}
	int ai = a.at(a.size() - 1);
	cout << ai << " " << aj << endl;
}

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

int main()
{
	int N, M; cin >> N >> M;
	vector<int> A(M), B(M);
	for (int i = 0; i < M; i++) {
		cin >> A[i] >> B[i];
		A[i]--;
		B[i]--;
	}

	vector<long long> ans(M+1);
	vector<int> Tree(N, -1);
	vector<int> Treesize(N, 1);
	long long fuben = (long long)N * (N - 1) / 2;

	ans[M] = fuben;

	for (int i = M - 1; i > 0; i--) {
		int Ap = A[i], Bp = B[i];
		while (Tree[Ap] != -1) Ap = Tree[Ap];
		while (Tree[Bp] != -1) Bp = Tree[Bp];

		if (Ap != Bp) {
			fuben -= (long long)Treesize[Ap] * Treesize[Bp];
			if (Treesize[Ap] < Treesize[Bp]) swap(Ap, Bp);
			Tree[Bp] = Ap;
			Treesize[Ap] += Treesize[Bp];
		}

		ans[i] = fuben;
	}

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


Measured memory_bytes: 3712
#include <iostream>
#include <algorithm>
#include <vector> //動的配列
#include <string>
#include <list> //双方向リスト
#include <map> //連想配列
#include <set> //集合
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <bitset>
#include <numeric>
#include <tuple>




typedef long long ll;


using namespace std;

typedef pair<int, int> P;
#define FOR(i,a,b) for(int i=(int)(a) ; i < (int) (b) ; ++i )
#define rep(i,n) FOR(i,0,n)
#define sz(x) int(x.size())


template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

//小さい順から取り出すヒープ
//priority_queue<ll, vector<ll>, greater<ll> > pque1;
int inf=1001001001;
int dist[310][310];




int main(){
    int n,m,l,q;
    cin>>n>>m>>l;
    for (int i=0;i<n;i++){
        for (int j=0;j<n;j++){
            if (i!=j) dist[i][j]=inf;
        }
    }
    
    rep(i,m){
        int a,b,c;
        cin>>a>>b>>c;a--;b--;
        dist[a][b]=c;
        dist[b][a]=c;
    }
    cin>>q;
    
    //ワーシャルフロイド
    rep(k,n) rep(i,n) rep(j,n) dist[i][j]=min(dist[i][j],dist[i][k]+dist[k][j]);
    
    //rep(i,n)rep(j,n) cout<<dist[i][j]<<",";
    
    int dist2[310][310];
    rep(i,n) rep(j,n){
        if (i==j) dist2[i][j]=0;
        else if (i!=j && dist[i][j]<=l) dist2[i][j]=1;
        else dist2[i][j]=inf;
    }
    
    //rep(i,n)rep(j,n) cout<<dist2[i][j]<<",";
    rep(k,n) rep(i,n) rep(j,n) dist2[i][j]=min(dist2[i][j],dist2[i][k]+dist2[k][j]);
    rep(eq,q) {
        int s,t;
        cin>>s>>t;s--;t--;
        if (dist2[s][t]==inf) {
            cout<<-1<<endl;
        } else{
            cout<<dist2[s][t]-1<<endl;
        }
    }
        
    return 0;
}


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

namespace AOJ
{
	class Program
	{
		public static void Main(string[] args)
		{
			var s = "";
			while(!(s = Console.ReadLine()).StartsWith("0"))
			{
				var md = s.Split(' ').Select(i => int.Parse(i)).ToArray();
				var date = new DateTime(2004, md[0], md[1]);
				Console.WriteLine(date.DayOfWeek);
			}
		}
	}
}

Measured memory_bytes: 6588
#include<iostream>
#include<algorithm>
#include<iterator>
#include<vector>
#include<string>
#include<map>

using namespace std;


#define mod(cans) cans%10**9+7
#define cin_pl(x,y) for(int i=0;i<x;i++){cin>>y[i];}
#define pl_twin(x,y,z) for(int i=0;i<x;i++){cin>>y[i]>>z[i];}
#define debug(x) cout << "Debug" << x << "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define st(s) size_t size = s.length()
#define prians(Answer) cout<<Answer<<"\n"
#define com_div(x,Co) for(int i=1;i<x+1;i++){if(x%i==0){Co++;}}
#define TF(X) X==1?cout<<"Yes\n":cout<<"No\n"
#define elcon else{continue;}

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<vector<int>> matrix;
typedef pair<int,int> pr;
typedef vector<pr> vpt;
typedef greater<int> gi;

int main()
{
    int n,l;cin>>n>>l;
    vi apple;int x;
    rep(i,n)
    {
        apple.push_back(l+i);
        
    }
    int answer=0;
    if(apple[0]<0&&apple[n-1]>=0)
    x=0;
    else if(apple[n-1]<0)
    apple[n-1]=0;
    else
    {
        apple[0]=0;
    }
    

    rep(i,n)
    {
        answer+=apple[i];
    }
    prians(answer);




}

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

namespace D_ABC161
{
    class MainClass
    {

        static int[] s;
        static List<long> u = new List<long>();

        public static void Main(string[] args)
        {
            s = Array.ConvertAll(ReadLine().Split().ToArray(), int.Parse);
            var q = new Queue<long>();
            var ansq = new Queue<long>();
            for (int i = 1; i <= 9; i++)
            {
                q.Enqueue(i);
            }
            if(s[0]<=9){
                WriteLine(s[0]);
                return;
            }


            while (q.Count + ansq.Count < s[0])
            {
                var x = q.Dequeue();

                ansq.Enqueue(x);
                int mod = (int)(x % 10);
                if (mod == 0)
                {
                    for (int i = mod; i <= mod + 1; i++)
                    {
                        q.Enqueue(x * 10 + i);
                        if (q.Count + ansq.Count >= s[0])
                        {
                            break;
                        }
                    }
                }
                else if (mod == 9)
                {
                    for (int i = mod - 1; i <= mod; i++)
                    {
                        q.Enqueue(x * 10 + i);
                        if (q.Count + ansq.Count >= s[0])
                        {
                            break;
                        }
                    }

                }
                else
                {
                    for (int i = mod - 1; i <= mod + 1; i++)
                    {
                        q.Enqueue(x * 10 + i);
                        if (q.Count + ansq.Count >= s[0])
                        {
                            break;
                        }
                    }
                }
            }
            WriteLine(q.Last());
        }
        /*public static void Dfs(long x)
        {
            // WriteLine(x);
            // WriteLine(x);
            if (x > 3234566667)
            {
                return;
            }
            else
            {
                u.Add(x);
                long keta = x % 10;
                if (keta == 9)
                {
                    for (int i = 8; i <= 9; i++)
                    {
                        Dfs(x * 10 + i);
                    }
                }
                else if (keta == 0)
                {
                    for (int i = 0; i <= 1; i++)
                    {
                        Dfs(x * 10 + i);
                    }
                }
                else
                {
                    for (long i = keta - 1; i <= keta + 1; i++)
                    {
                        // WriteLine("this {0} ", keta);
                        Dfs(x * 10 + i);
                    }
                }
            }
            
        }*/
    }
}


Measured memory_bytes: 13792
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
	double w, h, x, y;
	cin >> w >> h >> x >> y;

	if(w / 2.0 == x && h / 2.0 == y) cout << w * h / 2.0 << " " << "1" << endl;
	else cout << w * h / 2.0 << " " << "0" << endl;
}

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

static const int N = 100;

int main(){
  int length, i, j, mini, tmp, count=0, flag=0;
  int A[N];
  
  scanf("%d", &length);
  
  if(length < 1 || length > 100){
    exit(1);
  }

  for ( i = 0; i < length; i++ ){
    scanf("%d", &A[i]);
  }

  for(i = 0; i <= length-1; i++){

    mini = i;
    flag = 0;

    for(j = i; j <= length-1; j++){
      if(A[j] < A[mini]){
	mini = j;
	flag = 1;
      }
    }
    if(flag == 1){
      count++;
      tmp = A[i];
      A[i] = A[mini];
      A[mini] = tmp;
    }
  }

  for(i = 0; i < length; i++){
    printf("%d",A[i]);
    if(i == length-1){
      printf("\n");
      break;
    }
    printf(" ");
  }
  printf("%d\n",count);

  return 0;
}

Measured memory_bytes: 604
#include "bits/stdc++.h"
using namespace std;

int main(){
  int n;
  while(cin>>n){
    vector<int> a(10);
    a[0]=512;
    a[1]=256;
    a[2]=128;
    a[3]=64;
    a[4]=32;
    a[5]=16;
    a[6]=8;
    a[7]=4;
    a[8]=2;
    a[9]=1;
    vector<int> ans;
    for(int i=0;i<10;i++){
      if(n>=a[i]){
        n-=a[i];
        ans.push_back(a[i]);
      }
    }
    for(int i=ans.size()-1;i>=0;i--){
      if(i!=ans.size()-1)cout<<" ";
      cout<<ans[i];
    }
    cout<<endl;
  }
}



Measured memory_bytes: 3136
/*
  AOJ 2039
  Title:Space Coconut Crab II
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#define mydiff(x,y) (((x)>(y))?(x-y):(y-x))
char prime64K[65536];

int prime256[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,
67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,
157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,
241,251};
int memo[30000];

make_furui()
{
  int i,j,pr;
        memset(prime64K,-1,65536);
        prime64K[0]=prime64K[1]=0;
	
        for(i=0;i<sizeof(prime256);i++)
	  {
	    pr=prime256[i];
	    if(pr==0)
	      break;
	    for(j=2;pr*j<65536;j++)
		prime64K[pr*j]=0;

	  }
	
}


main()
{
  int i,j,k,T,ret;
  make_furui();

  while(scanf("%d",&T)  && T)
    {
      for(i=ret=0;i<=T/3;i++)
	if(prime64K[i])
	  {
	    for(j=i;j<=T-i;j++)
	      if(prime64K[j])
		{
		  k=T-i-j;
		  if(prime64K[k] && mydiff(i,j)<k && i+j > k && j<=k)
		    {
		      ret++;
		    }
		}
	  }
  printf("%d\n",ret);
    }
  return(0);
}

Measured memory_bytes: 672
import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [x, y, z] <- getIntList
    putStr $ show z
    putStr " "
    putStr $ show x
    putStr " "
    putStrLn $ show y

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

using namespace std;

using int64 = long long;
const int mod = 1e9 + 7;
//const int mod = 998244353;

const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;

struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
  }
} iosetup;


template< typename T1, typename T2 >
ostream &operator<<(ostream &os, const pair< T1, T2 > &p) {
  os << p.first << " " << p.second;
  return os;
}

template< typename T1, typename T2 >
istream &operator>>(istream &is, pair< T1, T2 > &p) {
  is >> p.first >> p.second;
  return is;
}

template< typename T >
ostream &operator<<(ostream &os, const vector< T > &v) {
  for(int i = 0; i < (int) v.size(); i++) {
    os << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return os;
}

template< typename T >
istream &operator>>(istream &is, vector< T > &v) {
  for(T &in : v) is >> in;
  return is;
}

template< typename T1, typename T2 >
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template< typename T1, typename T2 >
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

template< typename T = int64 >
vector< T > make_v(size_t a) {
  return vector< T >(a);
}

template< typename T, typename... Ts >
auto make_v(size_t a, Ts... ts) {
  return vector< decltype(make_v< T >(ts...)) >(a, make_v< T >(ts...));
}

template< typename T, typename V >
typename enable_if< is_class< T >::value == 0 >::type fill_v(T &t, const V &v) {
  t = v;
}

template< typename T, typename V >
typename enable_if< is_class< T >::value != 0 >::type fill_v(T &t, const V &v) {
  for(auto &e : t) fill_v(e, v);
}

template< typename F >
struct FixPoint : F {
  FixPoint(F &&f) : F(forward< F >(f)) {}

  template< typename... Args >
  decltype(auto) operator()(Args &&... args) const {
    return F::operator()(*this, forward< Args >(args)...);
  }
};

template< typename F >
inline decltype(auto) MFP(F &&f) {
  return FixPoint< F >{forward< F >(f)};
}

int main() {
  int N, X, Y;
  cin >> N >> X >> Y;
  cout << (N + X - 1) / X * Y << "\n";
}



Measured memory_bytes: 3632
#include<stdio.h>
int k(int n);
int main (void){
	
	int a,b;
	
	while(scanf("%d %d",&a,&b)!=EOF){
	  
		printf("%d\n",k(a+b));
	}
		return 0;
}
	int k(int n){
		int count=0;
		while(n>0){
			n/=10;
			count++;
		}
		return count;
	}
	

Measured memory_bytes: 600
TextT=list(input())
TextS=list(input())
switch=0
if len(TextT)+1 !=len(TextS):
  switch=1
  print("No")

if switch==0 :
  for i in range(len(TextT)):
    if TextT[i]!=TextS[i]:
    
      print("No")    
      switch=1
      break  
if switch==0:
  print("Yes")



Measured memory_bytes: 9112
#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
#include <cstring>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <utility>
#include <iomanip>
#include <climits>
using namespace std;
typedef long long int ll;
#define MOD 1000000007
#define MAX 1000000000000000000
#define ln "\n"
#define pb push_back
#define pll pair<ll,ll>
#define f first
#define s second
#define TEST ll t;cin>>t; while(t--)
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int main() 
{
	fast_io;
	ll n,x,y,x1,y1;
	cin>>n;
	x=ceil((1.0*n)/1.08);
	y=ceil((1.0*n)/1.08);
	x1=x*1.08;
	y1=y*1.08;
	if(x1==n)
	cout<<x;
	else
	if(y1==n)
	cout<<y;
	else
	cout<<":(";
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<vector>
using namespace std;
int main() {

	int N;
	cin >> N;
	vector<int> cnt(N + 1);

	for (int i = 1; i < N + 1; i++) {
		for (int j = i; j < N + 1; j += i) {
			cnt[j]++;
		}
	}

	long long ans = 0;
	for (int i = 1; i < N + 1; i++) {
		ans += (long long)i * cnt[i];
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 42292
def main():
    n, k = map(int, input().split())
    ans = []
    for i in range(2, n+1):
        ans.append([1, i])
    x = (n-2)*(n-1)//2
    if x < k:
        print("-1")
    else:
        cnt = x - k
        for i in range(2, n):
            if cnt <= 0:
                break
            for j in range(i+1, n+1):
                ans.append([i, j])
                cnt -= 1
                if cnt <= 0:
                    break
        print(len(ans))
        for v, u in ans:
            print(v, u)

if __name__ == "__main__":
    main()

Measured memory_bytes: 4120
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,s=0,ws=0,i;
    cin>>n;
    if(n<10) s=n;
    else if(n<100) s=9;
    else if(n<1000) s=n-100+10;
    else if(n<10000) s=909;
    else if(n<100000) s=n-10000+910;
    else s=90909;
    cout<<s;
    return 0;
}

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

int main()
{
  ll x; cin >> x;
  ll d = 100;
  ll ans = 0;
  while (d < x) {
    d = (ll)(d * 1.01);
    ans++;
  }
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 3636
#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++)
ll power(ll n, ll t)
{
    ll r = 1;
    repi(i, t, 0) r *= n;
    return r;
}
int main()
{
    ll h;
    cin >> h;
    ll cnt = 0;
    while (h)
    {
        h /= 2;
        cnt++;
    }
    cnt--;
    ll ans = 0;
    repi(i,cnt+1,0){
        ans += power(2,i);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <stdio.h>

using namespace std;
int main(void){
    // Here your code !
  double x1,x2,y1,y2;
 
 cin>>x1>>y1>>x2>>y2;
 printf("%lf\n",sqrt(pow(x1-x2,2)+pow(y1-y2,2)));

return 0;
}

Measured memory_bytes: 1232
// dile a la jardinera que traigo flores

#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define sz(x) int(x.size())
#define all(v) (v).begin(),(v).end()
#define trace(x) cout << #x << " = " << x << endl
#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
#define FER(i,a,b) for(int i = int(a); i < int(b); ++i)
#define IFR(i,a,b) for(int i = int(a); i >= int(b); i--)
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;



int main(){
	vector<ii>vec;
	int n;cin>>n;
	int T;cin>>T;
	FER(i,0,n){
		int c,t;cin>>c>>t;
		vec.pb({t,c});
	}
	sort(all(vec));
	int mn=10000000;
	for(ii par:vec){
		if(par.ff>T)break;
		mn=min(par.ss,mn);
	}
	if(mn!=10000000)cout<<mn<<endl;
	else cout<<"TLE"<<endl;
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <math.h>
#include<algorithm>
using namespace std;

int main(){
  string S;
  int w;
  cin >> S;
  cin >> w;
  string ans;
  int i=0;
  if(S.size()%w==0){
  for(int i=0;i<S.size()/w;i++){
   ans=ans+S[w*i]; 
  }
  }
  else{
   for(int i=0;i<S.size()/w+1;i++){
    ans=ans+S[w*i]; 
   }
  }
  cout << ans << endl;
  return 0;}

Measured memory_bytes: 256
//{{{
#include<algorithm>
#include<cmath>
#include<deque>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<random>
#include<set>
#include<sstream>
#include<sys/time.h>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using ll = long long;
enum : int { M = (int)1e9 + 7 };
enum : ll { MLL = (ll)1e18L + 9 };
using namespace std;
#ifdef LOCAL
#include"rprint2.hpp"
#else
#define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
FUNC(printde) FUNC(printdbe) FUNC(printdwe) FUNC(printdu);
#endif
template <template <class T, class = std::allocator<T>> class V, class E>
istream& operator >> (istream& in, V<E>& v){ for(auto& e : v){ in >> e; } return in; }
//}}}

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    int k; cin >> k;
    // ll num = 1;
    vector<int> num(11);
    num[10] = 1;
    int used = 10;
    while(--k){
        for(int i = 10; i >= 0; i--){
            if(((i - 1 == used - 1 && num[i - 1] == 0) || num[i - 1] >= num[i]) && num[i] < 9){
                num[i]++;
                used = min(used, i);
                for(int j = i + 1; j <= 10; j++){
                    num[j] = max(0, num[j - 1] - 1);
                }
                break;
            }
        }
        // printde(num);
        // for(int i = 0; i < 10; i++){
        //     if(num[i] && abs(num[i] - num[i + 1]) > 1){
        //         printde("error", num);
        //         return 0;
        //     }
        // }
    }
    bool first = true;
    for(auto& n : num){
        if(n || !first){
            first = false;
            cout << n;
        }
    }
    cout << '\n';
}


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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define int                     long long int
#define ld                      long double
#define pb                      push_back
#define MOD                     1000000007
#define inf                     3e18
#define vi                      vector<int>
#define vld                     vector<ld>
#define pii                     pair<int,int>
#define mii                     map<int,int>
#define fi                      first
#define se                      second
#define fastIO                  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << " "<< name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
    const char* comma = strchr(names + 1, ',');
    cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

typedef tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> pbds; 
		//order_of_key (k) : Number of items strictly smaller than k .
		//find_by_order(k) : K-th element in a set (counting from zero) (returns an iterator)           


void inp_out()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	freopen("debug.txt", "w", stderr);
	#endif
}

int32_t main()
{
	fastIO
	inp_out();
	int d, s, t; 
	cin >> d >> s >> t; 
	if(s * t >= d)
		cout << "Yes"; 
	else cout << "No"; 
	return 0;
}

Measured memory_bytes: 3648
#include <iostream>
#define MAX_K 100000
using namespace std;
typedef long long ll;

ll K;
ll A[MAX_K];

int main(){
    cin >> K;
    for(int i = 0; i < K; ++i){
        cin >> A[K-i-1];
    }

    ll p = 2, q = 2;
    bool ok = true;
    for(int i = 0; i < K; ++i){
        if(q / A[i] == p / A[i] && (p % A[i]) && (q % A[i])){
            ok = false;
            break;
        }else{
            p = (p % A[i] == 0 ? p : (p / A[i] + 1) * A[i]);
            q = (q / A[i] + 1) * A[i] - 1;
        }
    }

    if(ok) cout << p << " " << q << endl;
    else cout << -1 << endl;

    return 0;
}


Measured memory_bytes: 1024