akhauriyash/Code-Regression huggingface dataset:
//#include "stdafx.h"
#include "iostream"
#include "fstream"
#include "algorithm"
#include "iomanip"
#include "stack"
#include "queue"
#include "string"
#include "vector"
#include "map"
#include "set"
#include "list"
#include "deque"
#include "complex"
#include "bitset"
#include "cmath"
#include "unordered_set"
#include "unordered_map"
#include "iterator"
#include <ctime>
#include <cassert>
#include "numeric"
#include <cstdio>
#include "random"
#include "chrono"
#include "cstring"

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target_ans("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;

//#define f(i,n) for(int i=0; i<n;i++)
//#define rf(i, n) for(int i=n-1;i>=0;i--)
//#define forn(i, j, n) for(int i=j; i<n; i++)
//#define ff(i, j, n) f(i, n)f(j, n)
#define pb push_back
#define maxi(a,b) a = max(a, b);
#define mini(a,b) a = min(a, b);
#define endl '\n'

#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define sqr(x) ((x) * (x))
#define SZ(a) ((int)(a.size()))
#define watch(x) cout << (#x) << " = " << x << endl;
//typedef long long ll;
typedef long double ld;

#define int long long
//#define int unsigned int
#define double ld
typedef map<int, int> mii;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<pii> vpii;
typedef vector<char> vc;
typedef vector<vi> vvi;

template<class T>
void show(const vector<T> &a)
{
	for (T x : a)
		cout << x << " ";
	cout << endl;
}

vi xx = { 1, 0, -1, 0 };
vi yy = { 0, 1, 0, -1 };
string dir = "LRUD";

const int N = 5e5 + 50, oo = 3e18 + 500;
const int mod = 998244353;
//const int mod = 1e9 + 7;
//const int mod = 1e9 + 9;
const double eps = 1e-12, PI = 2 * acos(0.0);
int n, m, k;
long long cnt = 0;
int lg = 18;
vi g[N];
vi rg[N];
vi visit(N, 0);

int pr[N], sz[N];

void make_set(int v)
{
	pr[v] = v;
	sz[v] = 1;
}

int find_set(int v)
{
	if (v == pr[v])
		return v;

	return pr[v] = find_set(pr[v]);
}

void union_sets(int u, int v, int w, int &ans)
{
	u = find_set(u);
	v = find_set(v);

	if (u == v)
		return;

	ans += w;
	cnt--;

	if (sz[u] < sz[v])
		swap(u, v);

	pr[v] = u;
	sz[u] += sz[v];
}

string str(int n)
{
	string s = to_string(n);

	while (SZ(s) < 5)
	{
		s = '0' + s;
	}

	return s;
}

signed main()
{
	ios::sync_with_stdio(0);
	cout.tie(0); cin.tie(0);
	/*freopen("abbreviation.in", "r", stdin);
	freopen("abbreviation.out", "w", stdout);*/
	//ПРОВЕРЯЙ ДЕФАЙНЫ ТУПОЙ!!!

	cin >> n >> m;
	cout << n*m;

}



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

int fcnt(long long x){
  int p=0;
  while(x % 5 == 0 ){
    x /= 5;
    p++;
  }
  return p;
}

int main() {
  long long n;
  long long cnt = 0;
  cin >> n;
  
  if(n % 2 == 0){  
    while(n % 5 != 0) n--;

    while( n > 5){
      long long d = n / 5;
      n  = d;
      if( n % 2 == 0) cnt += n / 2;
      else cnt += (n - 1) / 2;
    }
  }
  cout << cnt << endl;  
}
  
  


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

#define int long long
#define itn int
#define For(i, a, b) for (int i = (a); i <= static_cast<int>(b); i++)
#define Forr(i, a, b) for (int i = (a); i >= static_cast<int>(b); i--)
#define rep(i, n) For(i, 0, n - 1)
#define repall(i, arr) for (auto& i : (arr))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define dump(x) cerr << #x << " = " << (x) << '\n'
#define dump2(x, y) \
    cerr << #x << " = " << (x) << " " << #y << " = " << (y) << '\n'
#define SZ(x) ((int)(x).size())
#define bit(n) (1LL << (n))
constexpr int MOD = 1e9 + 7;

template <typename T>
using pq = priority_queue<T>;
template <typename T>
using pqr = priority_queue<T, vector<T>, greater<T>>;
const int INF = LLONG_MAX / 2;
using P = pair<int, int>;
using vec = vector<int>;
template <typename T>
using mat = vector<vector<T>>;

// clang-format off
template <typename T1, typename T2>
ostream& operator<<(ostream& stream, const pair<T1, T2>& p) { return stream << p.first << "," << p.second; }
template <typename T>
void print(const vector<T> vec) { rep (i, vec.size() - 1) cout << vec[i] << ' '; cout << vec[vec.size() - 1] << '\n'; }
template <typename Arg>
void print(const Arg arg) { cout << arg << '\n'; }
template <typename Head, typename... Args>
void print(const Head head, const Args... args) { cout << head << " "; print(args...); }
template <typename T, typename U>
void init(vector<T>& v, vector<U>& w) { rep (i, v.size()) cin >> v[i] >> w[i]; }
template <typename T>
void init(vector<T>& v) { rep (i, v.size()) cin >> v[i]; }
template <typename T>
T sum_(vector<T> vec, T init = 0) { return std::accumulate(all(vec), T(init)); }
template<typename T>
bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } return false; }
template<typename T>
bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } return false; }
template <typename T>
int index(const T& vec, const typename T::iterator it) { return distance(vec.begin(), it); }
template <typename T = int>
mat<T> mmat(int n, int m=0) { return mat<T>(n, vector<T>(m)); }
template <typename T = int>
vector<T> ivec(int n) { vector<T> v(n); init(v); return v; }
// clang-format on

void yn(bool tf) { print(tf ? "Yes" : "No"); }
void YN(bool tf) { print(tf ? "YES" : "NO"); }

int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
// -------------------------------------------------------------------
// sort 1 2 3 4
// pqr 1 2 3 must impl >

signed main() {
    cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);
    int h, w, n;
    cin >> h >> w >> n;
    if (h < w) swap(h, w);
    print((n + h - 1) / h);

    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 FOR(i, a, b) for(int i = a; i < (int)b; ++i)

typedef long long ll;

const int Inf = 1e9;
const double EPS = 1e-9;

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

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

int bitCount(long bits) {
    bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
    bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
    bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
    bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
    return (bits & 0x0000ffff) + (bits >>16 & 0x0000ffff);
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, k;  cin >> n >> k;
    vector<int> v(200001);
    int cnt = 0;
    int ans = 0;
    rep(i, n) {
      int a;  cin >> a;
      v[a]++;
    }
    sort(v.begin(), v.end());
    rep(i, 200001) {
      if (v[i] > 0) {
        cnt++;
      }
    }
    if (cnt <= k) {
      ans = 0;
    } else {
      int lim = cnt - k;
      rep(i, 200001) {
        if (v[i] > 0) {
          ans += v[i];
          lim--;
        }
        if (lim == 0) {
          break;
        }
      }
    }
    cout << ans << '\n';

    return 0;
}


Measured memory_bytes: 1024
#![allow(unused_imports, unused_macros, dead_code)]

macro_rules! min {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(z) = it.next() {
            Some(it.fold(z, |x, y| min!(x, y)))
        } else {
            None
        }
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = min!($($ys),*);
        if $x < t { $x } else { t }
    }}
}
macro_rules! max {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(z) = it.next() {
            Some(it.fold(z, |x, y| max!(x, y)))
        } else {
            None
        }
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = max!($($ys),*);
        if $x > t { $x } else { t }
    }}
}


macro_rules! ewriteln {
    ($($args:expr),*) => { let _ = writeln!(&mut std::io::stderr(), $($args),*); };
}
macro_rules! trace {
    ($x:expr) => { ewriteln!(">>> {} = {:?}", stringify!($x), $x) };
    ($($xs:expr),*) => { trace!(($($xs),*)) }
}
macro_rules! put {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(x) = it.next() { print!("{}", x); }
        for x in it { print!(" {}", x); }
        println!("");
    }};
    ($x:expr) => { println!("{}", $x) };
    ($x:expr, $($xs:expr),*) => { print!("{} ", $x); put!($($xs),*) }
}

const M: i64 = 1_000_000_007;

fn main() {
    let mut sc = Scanner::new();
    let a: usize = sc.cin();
    let b: usize = sc.cin();
    let mut x = 1;
    let mut y = 0;
    while x < b {
        x += a - 1;
        y += 1;
    }
    put!(y);
}

use std::io::{self, Write};
use std::str::FromStr;
use std::collections::VecDeque;

struct Scanner { stdin: io::Stdin, buffer: VecDeque<String>, }
impl Scanner {
    fn new() -> Self { Scanner { stdin: io::stdin(), buffer: VecDeque::new() } }
    fn cin<T: FromStr>(&mut self) -> T {
        while self.buffer.len() == 0 {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
        self.buffer.pop_front().unwrap().parse::<T>().ok().unwrap()
    }
}


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

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,n,m) for(int i=(int)(n); i<=(int)(m); i++)
#define RFOR(i,n,m) for(int i=(int)(n); i>=(int)(m); i--)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
#define setp(n) fixed << setprecision(n)

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 (a>b) { a=b; return 1; } return 0; }

#define ld long double
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define pi pair<int,int>

#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define ins insert

using namespace std;

//-------------------------------------------------
//--Binary Indexed Tree (Sum only)
//-------------------------------------------------
template<typename T>
class BIT
{
private:
    const int n;
    ::std::vector<T> data;
public:
    BIT(int n):n(n),data(n+1){
        for(int i=1; i<=n; i++) data[i] = 0;
    }
    BIT(const ::std::vector<T> &v):n(v.size()),data(v.size()+1){
        for(int i=1; i<=n; i++) data[i] = v[i-1];
        for(int i=1; i<n; i++)
            data[i+(i&-i)] += data[i];
    }
    void add(int k, T x){k++;
        for(int i=k; i<=n; i+=i&-i) data[i] += x;
    }
    T query(int k){
        T ret=0;
        for(int i=k; i>0; i-=i&-i) ret += data[i];
        return ret;
    }
    T query(int a, int b){return query(b)-query(a);}
    void update(int k, T x){
        T upd = x-query(k, k+1);
        add(k, upd);
    }
    T operator[](int k){return query(k, k+1);}
};

//-------------------------------------------------

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n; cin>>n;
    vll a(n);
    rep(i,n) cin>>a[i];
    ll k = (n*(n+1)/2+1)/2;
    ll l=1,r=1e9+1;
    while(r-l>1){
        ll c = (l+r)/2;
        vll v(n+1);
        rep(i,n) v[i+1]=(a[i]>=c)?1:-1;
        rep(i,n) v[i+1]+=v[i];
        BIT<ll> bit(2*n+1);
        ll sum=0;
        rep(i,n+1){
            sum += bit.query(v[i]+n+1);
            bit.add(v[i]+n,1);
        }
        if (sum>=k){
            l = c;
        }else{
            r = c;
        }
    }
    cout<<l<<endl;
    return 0;
}


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

int main(){
  int N, l, r;
  cin >> N;
  int sum = 0;
  for(int i = 0; i < N; i++){
    cin >> l >> r;
    if(l == r){
      sum += 1;
    }else{
      sum += (r - (l - 1));
    }
  }
  cout << sum << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define vtpl(x,y,z) vector<tuple<x,y,z>>
#define at(x,i) get<i>(x);
#define rev(x) reverse(x);
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
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;
}
int main(){
  ll n,m;cin >> n >>m;
  vl v(n);
  double count=0;
  rep(i,n){
    cin >> v[i];
    count+=v[i];
  }
  double p=m*4;
  count/=p;
  ll cnt=0;
  rep(i,n){
    if(v[i]>=count)cnt++;
  }
  if(cnt>=m)cout << "Yes" <<endl;
  else cout << "No" <<endl;
}


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

ll k, ans, a, b;

int main(){
    cin >> k >> a >> b;
    if (a + 1 >= b || a > k - 1) ans = k + 1; 
    else ans = b, k -= a + 1, ans += (b - a) * (k / 2) + k % 2;
    cout << ans << endl;
}


Measured memory_bytes: 256
#include <stdio.h>
#define min(a,b) ((a)<(b)?(a):(b))
int main(){
  int a,b,k,i=0,j,d[1000];
  scanf("%d%d%d",&a,&b,&k);
  for(j=1;j<=min(a,b);j++){
    if(a%j==0&&b%j==0){
      d[i]=j;
      i++;
    }
  }
  printf("%d",d[i-k]);
}

Measured memory_bytes: 128
S = input()
seq = [1]
pos = []
for i,(a,b) in enumerate(zip(S,S[1:])):
    if a+b == 'RL':
        pos.append(i)
    if a==b:
        seq[-1] += 1
    else:
        seq.append(1)

ans = [0] * len(S)
for r,l,p in zip(seq[::2],seq[1::2],pos):
    ans[p] = ans[p+1] = (r+l)//2
    if (r+l)%2:
        if r > l:
            ans[p] += 1
        else:
            ans[p+1] += 1
        if max(r,l)%2==0:
            ans[p],ans[p+1] = ans[p+1],ans[p]
print(*ans)

Measured memory_bytes: 9020
#include<bits/stdc++.h>
using namespace std;
#define SQ(a) (a)*(a)
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define ll long long int 
typedef vector<ll> vi;
typedef pair<ll, ll> pi;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);	cout.tie(NULL);
	ll a, b;
	cin >> a >> b;
	if ((a * b) % 2 == 0)
		cout << "No\n";
	else 
		cout << "Yes\n";
	return 0;
}

Measured memory_bytes: 256
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#define int long long
using namespace std;

signed main() {
	int sx, sy, tx, ty;
	cin >> sx >> sy >> tx >> ty;
	int ansx, ansy;
	ansx = tx - sx; ansy = ty - sy;

	for (int i = 0; i < ansy; i++) cout << "U";
	for (int i = 0; i < ansx; i++) cout << "R";//(tx ty)
	for (int i = 0; i < ansy; i++) cout << "D";
	for (int i = 0; i < ansx; i++) cout << "L";//(sx sy)
	cout << "L";
	for (int i = 0; i < ansy + 1; i++) cout << "U";
	for (int i = 0; i < ansx + 1; i++) cout << "R";
	cout << "D";
	cout << "R";
	for (int i = 0; i < ansy + 1; i++) cout << "D";
	for (int i = 0; i < ansx + 1; i++) cout << "L";
	cout << "U";
	cout << endl;
}


Measured memory_bytes: 256
#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>;

double TIME_LIMIT = 1.95;

struct RandomNumberGenerator {
  mt19937 mt;
  RandomNumberGenerator() : mt(chrono::steady_clock::now().time_since_epoch().count()) {}
  int operator()(int a, int b) { // [a, b)
    uniform_int_distribution< int > dist(a, b - 1);
    return dist(mt);
  }
  int operator()(int b) { // [0, b)
    return (*this)(0, b);
  }
};

//状態
struct STATE {
  int Type;
  int D;
  map<int, int> c;
  map<P, int> s;
};

struct QUERY {
  int day;
  int type;
  QUERY(int d, int t): day(d), type(t) {}
};

RandomNumberGenerator rnd;

struct SCHEDULE {
  vector<int> t;
  STATE& state;
  int schedule_score;
  SCHEDULE(STATE& st): state(st) {
    // 初期化
    rep(i, state.D) {
      int type = rnd(state.Type) + 1;
      held(type);
    }
    init_score();
  }
  int current_day() {
    return t.size();
  }
  int type(int day) {
    return t[day-1];
  }
  void held(int type) {
    t.push_back(type);
  }
  void init_score() {
    map<int, int> last_day;
    int score = 0;
    int m_day = t.size();
    for(int day=1;day<=m_day;day++) {
      int type = t[day-1];
      int ps = state.s[P(day, type)];
      int ng = 0;
      last_day[type] = day;
      for(int t=1;t<=state.Type;t++) {
        ng += state.c[t] * (day - last_day[t]);
      }
      score = score + ps - ng;
    }
    schedule_score = score;
  }
  void modify(QUERY& query, int score) {
    t[query.day - 1] = query.type;
    schedule_score = score;
  }
  int score_if_modify(QUERY & query) {
    // TODO: 高速化
    map<int, int> last_day;
    int score = 0;
    int m_day = t.size();
    for(int day=1;day<=m_day;day++) {
      int type = t[day-1];

      if(day == query.day) {
        type = query.type;
      }

      int ps = state.s[P(day, type)];
      int ng = 0;
      last_day[type] = day;
      for(int t=1;t<=state.Type;t++) {
        ng += state.c[t] * (day - last_day[t]);
      }
      score = score + ps - ng;
    }
    return score;
  }
};

// 状態の初期化
STATE init () {
  STATE state;
  int Type = 26;
  int D;
  cin >> D;
  state.Type = 26;
  state.D = D;
  rep(i, Type) {
    int c_i;
    cin >> c_i;
    state.c[i + 1] = c_i;
  }
  rep(d, D) {
    rep(t, Type) {
      int s_dt;
      cin >> s_dt;
      state.s[P(d+1, t+1)] = s_dt;
    }
  }
  return state;
}

QUERY generate_query(STATE& state) {
  int day = rnd(state.D) + 1;
  int type = rnd(state.Type) + 1;
  return QUERY(day, type);
}

int main() {
  STATE state = init();
  SCHEDULE schedule(state);

  while (true) {
    if ((double)clock() / CLOCKS_PER_SEC > TIME_LIMIT) break;

    int pre_score = schedule.schedule_score;
    QUERY query = generate_query(state);
    int new_score = schedule.score_if_modify(query);
    if (new_score > pre_score) {
      schedule.modify(query, new_score);
    }
  }

  rep(i, state.D) {
    cout << schedule.t[i] << endl;
  }

  // cout << (double)clock() / CLOCKS_PER_SEC << endl;
  return 0;
}


Measured memory_bytes: 4268
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <climits>
#include <memory>
#include <sstream>
#include <iomanip>

using namespace std;


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

	double t, x;

	cin >> t >> x;

	cout << t / x << 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))
typedef pair<int, int> P;
typedef long long ll;

int main() {
    int x, X;
    cin >> x; X = x;
    rep(t, X+1) {
        if (x-t > 0) { x -= t; }
        else if (x-t <= 0) {
            cout << t << endl;
            break;
        }
    }
}


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

using ll=long long;
bool query(ll x){
    cout<<"? "<<x<<endl;
    char res;
    cin>>res;
    return res=='Y';
}

void answer(int n){
    cout<<"! "<<n<<endl;
    return;
}
int main(){
    ll ten=1;
    for(int k=0;k<=10;k++){
        if(!query(ten)){
            ll lb=ten/10;
            ll ub=ten;
            while(ub-lb>1){
                ll mid=(ub+lb)/2;
                if(!query(mid*10)){
                    lb=mid;
                }
                else{
                    ub=mid;
                }
            }
            answer(ub);
            return 0;
        }
        ten*=10;
        if(k==10){
            //ten keitou
            ten=1;
            for(int i=0;i<10;i++){
                if(query(2*ten)){
                    answer(ten);
                    return 0;
                }
                ten*=10;
            }
        }
    }
    return 0;
}

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

int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  int mnum=0;
  long long sum=0;
  for (int i=0; i<N; i++) {
    cin >> a.at(i);
    if (a.at(i)<0) {
      mnum++;
    }
  }
  if (mnum%2==0) {
    for (int i=0; i<N; i++) {
      sum += abs(a.at(i));
    }
  }
  else {
    for (int i=0; i<N; i++) {
      a.at(i) = abs(a.at(i));
    }
    sort(a.begin(), a.end());
    for (int i=0; i<N; i++) {
      sum += a.at(i);
    }
    sum-=2*a.at(0);
  }
    
  cout << sum << endl;
}


Measured memory_bytes: 640
s = input()

a = 0
b = 0
for i in range(len(s)):
  if i%2== 0:
    if s[i] != '1':
      a+=1
    if s[i] !='0':
      b+=1
  else:
    if s[i] != '0':
      a+=1
    if s[i] != '1':
      b+=1
    
print(min(a,b))

Measured memory_bytes: 3316
package main

import (
  "fmt"
)

func main() {
  var n int 
  fmt.Scan(&n)
  res := "APPROVED"
  for i := 0; i < n; i++ {
    var a int 
    fmt.Scan(&a)
    if a & 1 == 1 {continue}
    if a % 3 != 0 && a % 5 != 0 {
      res = "DENIED"
    }
  }
  fmt.Println(res)
}

Measured memory_bytes: 512
#include "bits/stdc++.h"
#define DEBUG(x) cout<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cout<<#v<<":";for(int i=0;i<v.size();i++) cout<<" "<<v[i]; cout<<endl
using namespace std;
#define vi vector<int>
#define vl vector<ll>
#define vii vector< vector<int> >
#define vll vector< vector<ll> >
#define vs vector<string>
#define pii pair<int,int>
#define pis pair<int,string>
#define psi pair<string,int>
#define pll pair<ll,ll>
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define MOD 1000000007
#define mod 1000000009
#define pi 3.14159265358979323846
#define Sp(p) cout<<setprecision(15)<< fixed<<p<<endl;
#define pb push_back
template<class T> void print(const T& x){cout << x << endl;}
int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };
int dx2[8] = { 1,1,0,-1,-1,-1,0,1 }, dy2[8] = { 0,1,1,1,0,-1,-1,-1 };
typedef long long ll;
const int inf = 1000000001;
const ll INF = 1e18 * 4;

int main(){
    int a, b, t;
    cin >> a >> b >> t;
    int cnt = 0;
    int _a = a;
    while(a < t + 0.5){
        cnt += b;
        a += _a;
    }
    cout << cnt << endl;
    return 0;
}




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

#define ll long long
#define all(x) (x).begin(),(x).end()
#define dlog(x) cout<<#x<<'='<<x<<'\n'

using namespace::std;

int mas[200000];
int cnt;
int main(){
      ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
      int n; cin>>n;
      int MN=INT_MAX;
      for(int i=0; i<n; i++){
            cin>>mas[i];
            MN=min(MN,mas[i]);
            if(mas[i]<=MN)cnt++;
      }

      cout<<cnt;
      return 0;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}

template<typename T,T MOD = 1000000007>
struct Mint{
  T v;
  Mint():v(0){}
  Mint(signed v):v(v){}
  Mint(long long t){v=t%MOD;if(v<0) v+=MOD;}

  Mint pow(long long k){
    Mint res(1),tmp(v);
    while(k){
      if(k&1) res*=tmp;
      tmp*=tmp;
      k>>=1;
    }
    return res;
  }
  
  Mint inv(){return pow(MOD-2);}
  
  Mint& operator+=(Mint a){v+=a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator-=(Mint a){v+=MOD-a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator*=(Mint a){v=1LL*v*a.v%MOD;return *this;}
  Mint& operator/=(Mint a){return (*this)*=a.inv();}
  
  Mint operator+(Mint a) const{return Mint(v)+=a;};
  Mint operator-(Mint a) const{return Mint(v)-=a;};
  Mint operator*(Mint a) const{return Mint(v)*=a;};
  Mint operator/(Mint a) const{return Mint(v)/=a;};

  Mint operator-(){return v?MOD-v:v;}

  bool operator==(const Mint a)const{return v==a.v;}
  bool operator!=(const Mint a)const{return v!=a.v;}
  bool operator <(const Mint a)const{return v <a.v;}
  
};

//INSERT ABOVE HERE
const int MAX = 303;
using M = Mint<int>;
M dp[MAX][MAX*2];
int used[MAX*2];
int side[MAX*2];
int sml[MAX*2];
signed main(){
  int n;
  cin>>n;
  vector<int> a(n*2);
  for(int i=0;i<n*2;i++) cin>>a[i];
  
  memset(used,0,sizeof(used));
  for(int i=0;i<n*2;i++)
    if(~a[i]) used[a[i]]=1;

  int cnt=0;  
  memset(side,0,sizeof(side));
  memset(sml,0,sizeof(sml));
  for(int i=0;i<n;i++){
    if(a[i*2]<0&&a[i*2+1]<0){
      cnt++;
      continue;
    }
    if(a[i*2]>0&&a[i*2+1]>0){
      sml[a[i*2]]=a[i*2]<a[i*2+1];
      sml[a[i*2+1]]=a[i*2]>a[i*2+1];
      continue;
    }
    if(a[i*2]>0) side[a[i*2]]=1;
    if(a[i*2+1]>0) side[a[i*2+1]]=1;
  }
  
  for(int j=0;j<MAX;j++)
    for(int k=0;k<MAX*2;k++)
      dp[j][k]=0;

  dp[0][0]=1;
  
  int num=0,laz=0;
  for(int i=n*2;i>=1;i--){
    if(used[i]&&!side[i]) continue;
    
    if(used[i]){
      assert(side[i]);
      for(int j=n;j>=0;j--){
        for(int k=n*2;k>=0;k--){
          if(j*2+k+1<=laz) dp[j][k+1]+=dp[j][k];
        }
      }
      num++;
      continue;
    }
    
    if(!used[i]){      
      for(int j=n;j>=0;j--){
        for(int k=n;k>=0;k--){         
          if(j*2+k+1<=laz&&j+1<=cnt) dp[j+1][k]+=dp[j][k]*M(cnt-j);
          if(k+1<=num) dp[j][k+1]+=dp[j][k]*M(num-k);          
        }
      }
      laz++;
      continue;
    }
  }
  
  M ans=dp[cnt][num];
  cout<<ans.v<<endl;
  return 0;
}


Measured memory_bytes: 1152
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>

using namespace std;

typedef struct Point {
    int x, y, d;
} P;

static const int dx[4] = {0, 0, 1, -1};
static const int dy[4] = {1, -1, 0, 0};
char c[1001][1001];
queue<P> Q1;

P init(int x, int y, int d) {
  
    P p2;
    p2.x = x;
    p2.y = y;
    p2.d = d;

    return p2;
}



int main() {

    int H, W;
    scanf("%d %d" ,&H, &W);
    for (int i = 0; i < H; i++) {
        scanf("%s", c[i]);
        for (int j = 0; j < W; j++) {
            if (c[i][j] == '#') {
                P p1 = init(i, j, 0);
                Q1.push(p1);
            }
        }
    }

    int ans = 0;

    while (!Q1.empty()) {
        P p = Q1.front(); Q1.pop();
        for (int i = 0; i < 4; i++) {
            int px = p.x + dx[i];
            int py = p.y + dy[i];
            if (px < 0 or px >= H or py < 0 or py >= W)
                continue;
            if (c[px][py] == '#')
                continue;
            c[px][py] = '#';
            Q1.push(init(px, py, p.d+1));
            ans = max(ans, p.d+1);
        }
    }

    printf("%d\n", ans);

}


Measured memory_bytes: 13328
#include<bits/stdc++.h>
using namespace std;
const int N=105;
typedef long long ll;
int k;
ll ans;
char s[N];
int main()
{
    scanf("%s",s+1);
    scanf("%d",&k);
    int n=strlen(s+1);
    int t=1;
    ll ans=0;
    for(int i=2;i<=n;i++)
        if(s[i]==s[i-1]) t++;
    else
    {
        ans+=t/2;t=1;
    }
    ans+=t/2;
    ans*=k;
    if(t==n)
    {
        printf("%lld\n",(ll)n*k/2);return 0;
    }
    if((t&1)&&s[1]==s[n])
    {
        t=1;
        for(int i=2;i<=n;i++)
            if(s[i]==s[i-1]) t++;
        else break;
        if(t&1) ans+=k-1;
    }
    printf("%lld\n",ans);
}


Measured memory_bytes: 256
/**
 ____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|

**/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int n;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    ll ans = 0;
    for(int i = 1; i <= n; i++)
        for(int j = i; j <= n; j += i)
            ans += j;
    cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 3684
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#define ll long long
#define fi first
#define se second
#define pb push_back
#define me memset
const int N = 1e6 + 10;
const int M = 1e9 + 7;
using namespace std;
typedef pair<int,int> PII;
typedef pair<long,long> PLL;

int k,n;
int a[N];
int s1,s2;
int ans=N;
int main() {
    ios::sync_with_stdio(false);
        cin>>k>>n;
         for(int i=1;i<=n;++i)  cin>>a[i];

         for(int i=1;i<n;++i){
             if(i==1){
             s1=a[n]-a[1];
             s2=k-(a[2]-a[1]);
             s1=min(s1,s2);
             ans=min(s1,ans);
             }
             else{
                 s1=k-(a[i]-a[i-1]);
                 s2=k-(a[i+1]-a[i]);
                 s1=min(s1,s2);
                 ans=min(s1,ans);
             }
         }
         printf("%d\n",ans);


    return 0;
}

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

using namespace std;

typedef long long ll;

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

	double l;
	cin >> l;

	double x = l / 3.0;

	cout << fixed << setprecision(10);
	cout << x * x * x << endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<string.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
long long int mod=1e9+7;
bool debug=false;
typedef long long ll;
int main(){
	int n;
	cin>>n;
	int cnt=0;
	int x;
	rep(i,n){
		cin>>x;
		if(x!=(i+1))cnt++;
	}
	if(cnt==0||cnt==2){
		cout<<"YES\n";
	}else{
		cout<<"NO"<<endl;
	}
	return 0;
}


Measured memory_bytes: 256
n = int(input())
if n <=599:
    x= 8
elif n <=799:
    x = 7
elif n <=999:
    x = 6
elif n <=1199:
    x = 5
elif n <=1399:
    x = 4
elif n <=1599:
    x = 3
elif n <=1799:
    x = 2
elif n <=1999:
    x = 1
print(x)

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

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
#define REP(i, n) FOR(i, n, 0)
#define OF64 std::setprecision(10)

const ll MOD = 1000000007;
const ll INF = (ll)1e15;

ll A[100005];

int main()
{
    ll N;
    cin >> N;
    REP(i, N)
    {
        cin >> A[i];
    }

    ll x = 2;
    ll sum = A[0] - 1;
    FOR(i, N, 1)
    {
        ll s = (A[i] - 1) / x;
        sum += s;
        if (A[i] == x)
            x++;
    }
    cout << sum << endl;
    return 0;
}

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

const int N = 500 + 10;
int n, m;
char a[N][N], b[N][N], c[N][N];

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	
	cin >> n >> m;
	for (int i = 0; i < n; i++)
		for (int j = 0; j < m; j++){
			cin >> c[i][j];
			a[i][j] = '.';
			b[i][j] = '.';
			if((i != n - 1 && j % 2 == 0) || i == 0)
				a[i][j] = '#';
			if((i != 0 && j % 2 == 1) || i == n - 1)
				b[i][j] = '#';
			if(c[i][j] == '#')
				a[i][j] = b[i][j] = '#';	
		}
		
	for (int i = 0; i < n; i++){
		for (int j = 0; j < m; j++)
			cout << a[i][j];
		cout << endl;
	}
	for (int i = 0; i < n; i++){
		for (int j = 0; j < m; j++)
			cout << b[i][j];
		cout << endl;
	}
}



Measured memory_bytes: 1536
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <numeric>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
#include <list>
#include <set>
#include <stack>
#include <cctype>
#include <cmath>
#include <bitset>

using namespace std;
/* typedef */
typedef long long ll;
/* constant */
const int INF = 1 << 30;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
vector<vector<int> > card(3, vector<int>(3, 0));
vector<vector<int> > bingo(3, vector<int>(3, 0));
/* function */
/* main */
int main(){
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            cin >> card[i][j];
        }
    }
    int M, num;
    cin >> M;
    for (int m = 0; m < M; m++) {
        cin >> num;
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                if (card[i][j] == num)
                    bingo[i][j] = 1;
            }
        }
    }
    bool can = false;
    int a, b;
    for (int i = 0; i < 3; i++) {
        a = 0, b = 0;
        for (int j = 0; j < 3; j++) {
            a += bingo[i][j];
            b += bingo[j][i];
        }
        if (a == 3 || b == 3) can = true;
    }
    a = 0, b = 0;
    for (int i = 0; i < 3; i++) {
        a += bingo[i][i];
        b += bingo[i][2-i];
    }
    if (a == 3 || b == 3) can = true;

    if (can) cout << "Yes" << '\n';
    else cout << "No" << '\n';
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
#include <bits/stdc++.h>
#define ll long long int
ll arr[3005];
ll dp[3005][3005];
ll func(ll i,ll j)
{
    if(i>j)
    return 0;
    
    if(dp[i][j]!=-1)
    return dp[i][j];
    
    ll m1 = arr[i]+min(func(i+2,j),func(i+1,j-1));
    ll m2 = arr[j]+min(func(i,j-2),func(i+1,j-1));
   
    dp[i][j] = max(m1,m2);
    
    return dp[i][j];
}
int main() {
    ll n,i;
    cin>>n;
    ll sum = 0;
    memset(dp,-1,sizeof(dp));
    for(i=1;i<=n;i++)
    {
        
        cin>>arr[i];
    
        sum = sum + arr[i];
    }
    ll ans = func(1,n);
    ll y = sum-ans;
    cout<<ans-y<<endl;
    //cout<<ans<<endl;
	return 0;
}


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

#define LL long long

#define lson l,mid,id<<1
#define rson mid+1,r,id<<1|1
#define ls id<<1
#define rs id<<1|1
#define MID(l,r) (((l)+(r))>>1)

const int MOD = (int) 1e9 + 7;
const double eps = (double) 1e-8;
const int maxn = (int) 5e5 + 20;

int n;
int a[maxn];
int sum[maxn];

vector<int> v[(1 << 20) + 5];

int calc(int x)
{
    int dp[2] = {0};
    dp[0] = 1;

    int s = 1;
    int l = 0, r = 0;
    while(1)
    {
        r = l + 1;
        while(r < v[x].size() && sum[v[x][r]] - sum[v[x][l]] == 0)
        {
            r++;
        }

        int t = r - l;
        dp[1] = (dp[1] + (LL) dp[0] * t) % MOD;

        if(r < v[x].size())
        {
            t = sum[v[x][r]] - sum[v[x][l]];
            dp[0] = (dp[0] + (LL) dp[1] * t) % MOD;
        }
        else
        {
            if(v[x].back() == n) s = 0;
            else s = 1;
            break;
        }

        l = r;
    }

    return dp[s];
}

void work()
{
    scanf("%d", &n);
    for(int i = 1; i <= n; i++) scanf("%d", &a[i]);

    int pre = 0;
    for(int i = 1; i <= n; i++)
    {
        pre ^= a[i];
        v[pre].push_back(i);
        if(pre == 0) sum[i] = 1;
    }

    for(int i = 1; i <= n; i++) sum[i] += sum[i - 1];

    if(pre)
    {
        cout <<calc(pre) <<endl;
    }
    else
    {
        int ans = 0;
        for(int i = 1; i < (1 << 20); i++) if(v[i].size())
            ans = (ans + calc(i)) % MOD;

        int sum = 1;
        int sz = v[0].size();
        for(int i = 1; i < sz; i++)
        {
            sum = (sum << 1) % MOD;
        }
        ans = (ans + sum) % MOD;

        cout <<ans <<endl;
    }


}

int main()
{
#ifdef yukihana0416
freopen("in.txt", "r" ,stdin);
//freopen("out.txt", "w", stdout);
#endif // yukihana0416

    int tc = 1;
//    scanf("%d", &tc);
    for(int ca = 1; ca <= tc; ca++)
    {
//        printf("Case #%d: ", ca);
        work();
    }
    return 0;
}


Measured memory_bytes: 38388
#include<stdio.h>
#include<math.h>
#define N 10000
int main()
{
  int n,cnt,i,j,sosuu=0,snum;
  double num;

  while(1)
    {
      scanf("%d",&n);
      if(n >= 1 && n <= N) break;
    }

  for(i=0;i<n;i++)
    {
      while(1)
	{
	  scanf("%lf",&num);
	  if(num >=2 && num <= 100000000) break;
	}

      snum = sqrt(num);
      cnt=0;
      for(j=1;j<=snum;j++)
	if((int)num%j == 0) cnt++;
      
      if(cnt == 1) sosuu++;
    }

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



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

#define mod 1000000007
int dp[1005][1005];
string s[1005];

int main()
{
    int h,w;
    cin>>h>>w;

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

    dp[0][0]=1;
    for(int i=0;i<h;i++)
    {
        for(int j=0;j<w;j++)
        {
            if(s[i][j]=='#')
            {
                dp[i][j]=0;
                continue;
            }
            if(i>0)
                dp[i][j]+=dp[i-1][j];
            dp[i][j]%=mod;
            if(j>0)
                dp[i][j]+=dp[i][j-1];
            dp[i][j]%=mod;
        }

    }
    cout<<dp[h-1][w-1];
    return 0;
}


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

int main() {
  int N, K; cin >> N >> K;
  double A[N];
  int P[N]; for (int i=0; i<N; i++) {
    cin >> P[i];
    A[i] = ((double)pow(P[i], 2.0) / 2 + (double)P[i] / 2) / P[i];
//    cout << A[i] << endl;
  }
  long double range = 0.0;
  for (int i=0; i<K; i++) {
    range += A[i];
  }
  long double ans = range;
  for (int i=0; i<N-K; i++) {
    range = range-A[i]+A[i+K];
    ans = max(ans, range);
//    printf("i: %d, i+K: %d, ans: %f, A[i]: %f, A[i+K]: %f\n", i, i+K, ans, A[i], A[i+K]);
  }

  cout << setprecision(10);
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 2560
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication57
{
    class Program
    {
        static void Main()
        {
            while (true)
            {
                string a = Console.ReadLine();
                if (a == "-1 -1 -1") break;
                int[] b = a.Split().Select(int.Parse).ToArray();
                int c = 7200 - b[0] * 3600 - b[1] * 60 - b[2];
                int d = c * 3;
                Console.WriteLine("{0,0:00}:{1,0:00}:{2,0:00}",c/3600,(c%3600)/60,(c%3600)%60);
                Console.WriteLine("{0,0:00}:{1,0:00}:{2,0:00}", d / 3600, (d % 3600) / 60, (d % 3600) % 60);
            }
        }
    }
}

Measured memory_bytes: 9688
#include <iostream>
using namespace std;
int main(){
	int a, b, c, d;
	cin >> a >> b >> c >> d;
	while (a > 0 && c > 0) {
		c -= b;
		if (c > 0)
			a -= d;
	}
	if (a > 0)
		cout << "Yes";
	else
		cout << "No";
}

Measured memory_bytes: 3596
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
#include <algorithm>
using namespace std;
typedef long long lint;
#define cout cerr
#define ni (next_num<int>())
template<class T>inline T next_num(){
	T i=0;char c;
	while(!isdigit(c=getchar())&&c!='-');
	bool flag=c=='-';
	flag?c=getchar():0;
	while(i=i*10-'0'+c,isdigit(c=getchar()));
	return flag?-i:i;
}
template<class T1,class T2>inline void apmax(T1 &a,const T2 &b){if(a<b)a=b;}
template<class T1,class T2>inline void apmin(T1 &a,const T2 &b){if(b<a)a=b;}
const int N=210,O=998244353;
template<class T>inline T sqr(T x){return x*x;}
struct Pt{
	int x,y;
}pt[N],pt2[N],base;
inline bool ycmp(const Pt &a,const Pt &b){
	return a.y!=b.y?a.y<b.y:a.x<b.x;
}
inline int cross(const Pt &a,const Pt &b){
	return (a.x-base.x)*(b.y-base.y)-(a.y-base.y)*(b.x-base.x);
}
inline bool polarcmp(const Pt &a,const Pt &b){
	int crs=cross(a,b);
	return crs?crs>0:sqr(a.x-base.x)<sqr(b.x-base.x);
}
int pw2[N];
inline void gmath(int n){
	pw2[0]=1;
	for(int i=1;i<=n;i++){
		pw2[i]=(lint)pw2[i-1]*2%O;
	}
}
int main(){
	int n=ni;
	gmath(n);
	for(int i=1;i<=n;i++){
		pt[i]=(Pt){ni,ni};
	}
	sort(pt+1,pt+n+1,ycmp);
	lint sum=1;
	for(int i=1;i<=n;i++){
		base=pt[i];
		memcpy(pt2+i+1,pt+i+1,(n-i)*sizeof(Pt));
		sort(pt2+i+1,pt2+n+1,polarcmp);
		for(int j=i+1,k=j;j<=n;j=k){
			for(;k<=n&&cross(pt2[j],pt2[k])==0;k++);
			sum+=pw2[k-j]-1;
		}
		sum++;//single
	}
	printf("%lld\n",((pw2[n]-sum%O)%O+O)%O);
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <tuple>
using namespace std;
typedef long long ll;

int main(){

    int n, m; cin >> n >> m;

    int a[m], b[m];
    for(int i=0; i<m; i++){
        cin >> a[i] >> b[i];
    }
    vector<int> ab, ba;
    for(int i=0; i<m; i++){
        if(a[i] == 1){
            ab.push_back(b[i]);
        }
        if(b[i] == n){
            ba.push_back(a[i]);
        }
    }

    sort(ab.begin(), ab.end());
    sort(ba.begin(), ba.end());

    // for(auto x : ab){
    //     cout << x << endl;
    // }
    // cout << endl;
    // for(auto x : ba){
    //     cout << x << endl;
    // }
    // cout << endl;

    int i = 0, j = 0;

    bool flag = false;
    while(i < ab.size() && j < ba.size()){
        // cout << i << " " << j << endl;
        if(ab[i] == ba[j]){
            flag = true;
            break;
        }

        if(ab[i] > ba[j]){
            j++;
        }
        else{
            i++;
        }
    }

    cout << (flag ? "POSSIBLE" : "IMPOSSIBLE");

    return 0;
}

Measured memory_bytes: 2812
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
M = list(map(int,input().split()))

ans = [False for i in range(2001)]
ans[0] = True

for i in range(N):
    for j in range(2000, -1, -1):
        if ans[j]:
            if j+A[i] <= 2000:
                ans[j+A[i]] = True
for i in range(Q):
    if ans[M[i]]:
        print('yes')
    else:
        print('no')



Measured memory_bytes: 5644
#include <iostream>

int main()
{
	int N, i, j;
	int a[100];

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


	int tmp;
	for (i = 0; i < N; i++) {
		for (j = i+1 ; j < N; j++) {
			if (a[j] == a[i]) {
				a[j] = 0;
			}
		}
	}

	int cnt;
	cnt = 0;
	for (i = 0; i < N; i++) {
		if (a[i] != 0 ) {
			cnt++;
		}
	}

	printf("%d", cnt);
}


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

int main(){
  ll n,ans=0; cin>>n;
  
  rep(i,n){
    ll t; cin>>t;
    while(t%2==0){
    t/=2; ans++;
    }
     }
  
  cout<<ans<<endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <climits>
#include <bitset>
#include <utility>
#include <cstring>
#include <numeric>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pair<int,int>> vpii;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
#define rep(i,n) for(int i=0;i<n;i++)
#define repll(i,n) for(long long int i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define P 1000000007
#define STI(s) atoi(s.c_str())//string to int
#define mp(p,q) make_pair(p,q)
#define Sort(a) sort(a.begin(),a.end())
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;}
const int INF = INT_MAX;
const long long LLINF = 1LL<<60;
template <typename T_char>
char ToUpper (char cX) { return toupper(cX); }
//g++ -std=c++1z temp.cpp
//./a.exe
ll digit(ll a){
    ll count = 0;
    for (ll i = 0; i < a; i++)
    {   if (a == 0)
        {
            break;
        }else
        {
            a = a/10;
            count++;
        }
    }
    return count;
}
//桁数のカウント
//pow(x,n) == x^n
//sum = accumulate(v.begin(),v.end(),0);
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a,   b) * b;}



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

int n,m,sum = 0;
cin >> n >> m;

for(int i = 1;i < n;i++){
    sum += i;
}
for(int i = 1;i < m;i++){
    sum += i;
}

cout << sum << endl;

//////////////////////////////////////////////////////
return 0;}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define pb push_back 
const int mod=1e9+7;
 /*int solve(int b[],int k,int n){
          if(k<0)
          return 1;
          
          if(k==0)
          return dp[k]=0;
         if(dp[k]!=-1)
          return dp[k];  
          
        int sum=1;
        for(int i=0; i<n; i++){
		 int t=solve(b,k-b[i],n);
		   sum=sum && t;
		}
		if(sum)
		return  dp[k]=0;
		return dp[k]=1;
        
}*/
int main(){
      ios_base::sync_with_stdio(0) ; cin.tie(0) ; cout.tie(0);
       int n,k;
         cin>>n>>k;
        // memset(dp,-1,sizeof(dp));
        int b[n];
        for(int i=0; i<n; i++)
          cin>>b[i]; 
           
            vector<int>dp(k+1);
            for(int i=0; i<=k; i++){
			     for(int j=0; j<n; j++){
				   if(i>=b[j] && !(dp[i-b[j]]))
				    dp[i]=1;
				 }
			}
           if(dp[k])
             cout<<"First\n";
          else
             cout<<"Second\n";
             
    }


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

int main() {
  int H,W;
  cin >> H >> W;
  for (int i; i < W + 2; i++){
  	cout << "#";
  }
  	cout << endl;
  for(int j; j < H; j++){
  	string A;
    cin >> A;
    cout << "#" << A << "#" << endl;
  }
  for (int k; k < W + 2; k++){
  	cout << "#";
  }
  	cout << endl;
}

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

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


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
using namespace std;

typedef long long ll;

#define INF 10e17 // 4倍しても(4回足しても)long longを溢れない
#define rep(i,n) for(int i=0; i<n; i++)
#define rep_r(i,n,m) for(int i=m; i<n; i++)
#define END cout << endl
#define MOD 1000000007
#define pb push_back
#define sorti(x) sort(x.begin(), x.end())
#define sortd(x) sort(x.begin(), x.end(), std::greater<int>())
#define debug(x) std::cerr << (x) << std::endl;
#define roll(x) for (auto itr : x) { debug(itr); }

template <class T> inline void chmax(T &ans, T t) { if (t > ans) ans = t;}
template <class T> inline void chmin(T &ans, T t) { if (t < ans) ans = t;}

// 最大公約数を求める(ユークリッドの互除法).
long long gcd (long long x, long long y) {
  if (y > x) swap(x,y);
  if (y == 0) return x;
  return gcd(x%y,y);
}

int main() {
  ll n, t;
  cin >> n >> t;

  vector<ll> T(n);
  rep(i,n) cin >> T[i];

  T.push_back(INF);
  ll ans = 0;
  for (int i = 0; i < n; ++i) {
    if (T[i] + t >= T[i + 1]) {
      ans += T[i+1] - T[i];
    } else {
      ans += t;
    }
  }

  cout << ans << endl;
}


Measured memory_bytes: 4736
#include <bits/stdc++.h>
using namespace std;
int n, k;
int main()
{
    cin >> n >> k;
    if (n % 2 == 1)
        n++;
    if (n / 2 >= k)
        cout << "YES" << endl;
    else
    {
        cout << "NO" << endl;
    }
    return 0;
}

Measured memory_bytes: 256