akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <limits>
#include <numeric>
#include <type_traits>
#include <algorithm>

typedef long long li;
using namespace std;

int main(){
    // a < b < c 
    // 全て異なるならば6倍
    // 二つことなるなら3倍
    // 全部同じならそのまま 
    // 足す

    int K;
    cin >> K;

    li sum = 0; 
    for(int a=1;a<=K;a++){
        for(int b=1;b<=a;b++){
            for(int c=1;c<=b;c++){
                int gcd_ = std::gcd(std::gcd(a,b), c);
                if(a != b && b != c && c != a){
                    sum += 6 * gcd_;
                }else if(a == b && b == c && c == a){
                    sum += gcd_;
                }else{
                    sum += 3 * gcd_;
                }
            }
        }
    }
    cout << sum << endl;

    return 0;
}


Measured memory_bytes: 3676
#include <bits/stdc++.h>
#define ll long long
#define pq priority_queue
using namespace std;
const ll INF=(ll)1e9;
const ll MOD=(ll)1e9+7;
const ll MAX=510000;
vector<int> dx={1,0,-1,0},dy={0,1,0,-1};
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; }

int main(){
  ll N,ans=0;
  string S;
  cin>>N>>S;
  vector<ll> R,G,B;
  set<ll> r,g,b;
  for(ll i=0;i<N;i++){
      if(S[i]=='R'){
          R.push_back(i);
          r.insert(i);
      }else if(S[i]=='B'){
          B.push_back(i);
          b.insert(i);
      }else if(S[i]=='G'){
          G.push_back(i);
          g.insert(i);
      }
  }
    ans=R.size()*B.size()*G.size();
  for(ll i=0;i<R.size();i++){
      for(ll j=0;j<B.size();j++){
              ll d,m;
              d=abs(R[i]-B[j]);
              if(R[i]>B[j]) m=R[i]-d/2;
              else m=R[i]+d/2;
              if(g.count(R[i]-d)) ans--;
              if(g.count(R[i]+d)) ans--;
              if(g.count(B[j]+d)) ans--;
              if(g.count(B[j]-d)) ans--;
              if((R[i]+B[j])%2==0&&g.count(m)) ans--;
            
      }
  }
  cout<<ans<<endl;
}

Measured memory_bytes: 3840
//                          VIVEK UPADHYAY
//                          MANIT, BHOPAL(M.P)
/**********************************************************************************************/
/**********************************************************************************************/
//                        $$ JAB-TAK TODEGA NHI,
//                           TAB -TAK CHODEGA NHI :D
#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<cstdlib>
#include<unistd.h>
#include<string>
#include<cstring>
#include<stack>
#include<queue>
#include<utility>
#include<cmath>
#include<set>
#include<unordered_map>
#include<cstdio>
#include<map>
#include<numeric>
using namespace std;
#define F first
#define S second
#define mk(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define LINE cout<<"\n" ;
#define ok cout<<"ok\n" ;
#define dbg(x) cout<<#x<<" = "<<(x)<<"\n";
#define fill(A, VAL) memset(A, VAL, sizeof(A))
#define sz(a) ((int) a.size())
typedef long long ll;
const int MAXN = 1e5 + 10 ;
const int MAX = 1e7 + 1 ;
int main () {
    
    int N ;
    cin >> N ;
    string a,b,c;
    cin >> a >> b >> c ;
    int dp[N][26] ;
    for(int i = 0 ; i < 26 ;i++) {
        char c_ = char(i + 'a') ;
        dp[0][i] = (a[0]==c_ ? 0 : 1) + (b[0] == c_ ? 0 : 1) + (c[0] == c_ ? 0 : 1) ;
    }

    for(int i = 1 ; i < N ;i++) {
        int mx = MAX ;
        for(int j =0 ; j < 26 ;j++)
            mx = min(dp[i-1][j] , mx) ;
        for(int j =0 ; j < 26 ;j++){
            char ch = char(j + 'a') ;
            dp[i][j] = (a[i] == ch ? 0 : 1) + (b[i] == ch ? 0 : 1) + (c[i] == ch ? 0 : 1) + mx ;
        }
    }
    int mx = MAX ;
    for(int i=0;i<26;i++)
        mx = min(mx , dp[N-1][i]) ;
    cout<<mx<<endl;
    return 0 ;
}


Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include <queue>
#include <vector>

int main() {
    int n;
    
    std::priority_queue<double, std::vector<double>, std::greater<double> > q;

    std::cin >> n;
    for (int i = 0; i < n; i++) {
        int v;
        std::cin >> v;
        q.push((double) v);
    }

    while (q.size() > 1) {
        double a, b;
        a = q.top();
        q.pop();
        b = q.top();
        q.pop();

        q.push((a + b) / 2);
    }

    double r = q.top();
    std::cout << std::setprecision(5) << r << std::endl;
}

Measured memory_bytes: 3772
#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<queue>
#include<cstring>

#define ll long long
#define ull unsigned long long
#define ld long double
#define fo2(i,start,end,diff) for(int i=start;i<end;i=i+diff)
#define fo(i,start,end) for(int i=start;start<end?i<end:i>end;start<end?i+=1:i-=1)
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define F first
#define S second
#define vll vector<ll>
#define vc vector<char>
#define pll pair<ll,ll>
#define vop vector<pll>
#define vov vector<vector<ll>>
using namespace std;
const ld pi=3.14159265358979323;

const long long mod1=1e9+7;
const long long mod2=1e18;
const ll mod3=9e18;
const ll N=1e7;

long long power(ll  x, ll n){if(n==0)return 1;ll temp=power(x,n/2);if(n%2==0)return temp*temp;else return x*temp*temp;}

ll gcd(ll a,ll b){if(a<b) return gcd(b,a);if(b==0) return a;return gcd(b,a%b);}
ll lcm(ll a,ll b){return (a*b)/(gcd(a,b));}
void swap(int* a, int* b){int t = *a;*a = *b;*b = t;}
bool f(ll x,ll y){return x>y;}
bool cmp(ll x ,ll y){
    return abs(x)<abs(y);
}
ll MAX(ll a,ll b){return a>b?a:b;}
ll MIN(ll x,ll  y){return x>y?y:x;}

ll ow(ll a, ll b, ll mod)//a^b%mod
{
    ll ans=1;
    while(b)
    {
        if(b&1)
            ans=(ans*a)%mod;
        b/=2;
        a=(a*a)%mod;
    }
    return ans;
}
ll sum(vll v){
    ll sm=0;
    fo(i,0,v.size())sm=sm+v[i];
    return sm;
}
int main(){
    ll x,n;
    cin>>x>>n;
    vll v(n);
    fo(i,0,n)cin>>v[i];
    fo(i,0,x+1){
        ll a=x+i;
        ll b=x-i;
        if(find(v.begin(),v.end(),b)==v.end()){
            cout<<b<<endl;
            return 0;
        }
        else if(find(v.begin(),v.end(),a)==v.end()){
            cout<<a<<endl;
            return 0;
        }
    }
    return 0;
}

Measured memory_bytes: 3644
n = gets.chomp.to_i
stone = gets.chomp.split("")
ans = 0

left = 0
right = n-1
while left < right do
    left += 1 while stone[left] == "R"
    right -= 1 while stone[right] == "W"
    if left < right then
        stone[left], stone[right] = "R", "W"
        ans += 1
    end
end

puts ans

Measured memory_bytes: 33128
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <math.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<ll, ll> P;
typedef vector<int> vi;
typedef vector<vi> vvi;

#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REPR(i, n) for (ll i = (n) - 1; i >= 0; --i)
#define FOR(i, n, m) for (ll i = (n); i < (m); ++i)
#define FORR(i, n, m) for (ll i = (m) - 1; i >= (n); --i) 
#define FORE(x, xs) for (auto &x: (xs))
#define ALL(v) v.begin(), v.end()
#define ZERO(a) memset(a,0,sizeof(a))

const int INF = 1000000009;
const int MOD = 1000000007;
const double EPS = 1e-14;
const double PI = acos(-1);

const int MAX = 33;

int N, M;
int cnt[MAX];

int main() {

    cin >> N >> M;
    REP (i, N) {
        int k, a;
        cin >> k;
        REP (j, k) {
            cin >> a;
            a--;
            cnt[a]++;
        }
    }
    int ans = 0;
    REP (i, M) {
        if (cnt[i] == N) ans++;
    }

    cout << ans << endl; 
}


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

#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int INF = 1e9;

int main() {
char c;
  cin >> c;
  char ans;
  if (c == 'A') ans = 'T';
  if (c == 'T') ans = 'A';
  if (c == 'G') ans = 'C';
  if (c == 'C') ans = 'G';
  
  cout << ans << endl;
  return 0;
}


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

int main() {
    string s;
    cin >> s;
    string ans = "No";
    for (int i = 0; i < s.size()-1; i++) {
        if (s.at(i) == 'C') {
            for (int j = i+1; j < s.size(); j++) {
                if (s.at(j) == 'F') {
                    ans = "Yes";
                }
            }
        }
    }
    cout << ans << endl;
}


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

int Case = 1;

void solve(const int N){
    if(Case != 1)cout << endl;
    int data[5][5][5];
    for(int i = 0;i < 5;i++){
        for(int j = 0;j < 5;j++){
            for(int k =0;k < 5;k++){
                char c;
                cin >> c;
                data[i][j][k] = c - '0';
            }
        }
    }
    int M1,M2;
    cin >> M1;
    map<int,bool> tanjo;
    for(int i = 0;i < M1;i++){
        int tmp;
        cin >> tmp;
        tanjo[tmp] = true;
    }
    cin >> M2;
    map<int,bool> simetsu;
    for(int i = 0;i < M2;i++){
        int tmp;
        cin >> tmp;
        simetsu[tmp] = true;
    }
    vector<int> dx,dy,dz;
    for(int i = -1;i <= 1;i++){
        for(int j = -1;j <= 1;j++){
            for(int k = -1;k <= 1;k++){
                if(i || j || k){
                    dx.push_back(i);
                    dy.push_back(j);
                    dz.push_back(k);
                }
            }
        }
    }
    assert(dx.size() == 26);
    for(int rep = 0;rep < N;rep++){
        int new_data[5][5][5];
        for(int i = 0;i < 5;i++){
            for(int j = 0;j < 5;j++){
                for(int k = 0;k < 5;k++){
                    int cnt = 0;
                    for(int l = 0;l < 26;l++){
                        int x = i + dx[l];
                        int y = j + dy[l];
                        int z = k + dz[l];
                        if(0 <= x && x < 5 && 0 <= y && y < 5 && 0 <= z && z < 5){
                            cnt += data[x][y][z];
                        }
                    }
                    if(data[i][j][k]){
                        new_data[i][j][k] = simetsu[cnt];
                    }else{
                        new_data[i][j][k] = tanjo[cnt];
                    }
                }
            }
        }
        for(int i = 0;i < 5;i++){
            for(int j = 0;j < 5;j++){
                for(int k = 0;k < 5;k++){
                    data[i][j][k] = new_data[i][j][k];
                }
            }
        }
    }
    cout << "Case " << Case << ":" << endl; 
    for(int i = 0;i < 5;i++){
        for(int j = 0;j < 5;j++){
            for(int k = 0;k < 5;k++){
                cout << data[i][j][k];
            }
            cout << endl;
        }
        if(i != 4)cout << endl;
    }
    Case++;
}

int main(){
    int N;
    while(true){
        cin >> N;
        if(N == 0)return 0;
        solve(N);
    }
}


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

#define REP(i, n) for (int i = 0; i < (n); ++i)

int main(void) {
    string s;
    bool findFlg = false, usedFlg[26] = {false};

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> s;
    REP(i, s.length()) {
        if (usedFlg[s[i] - 'a']) {
            findFlg = true;
            break;
        } else {
            usedFlg[s[i] - 'a'] = true;
        }
    }

    cout << (findFlg? "no" : "yes") << "\n";
    return 0;
}

Measured memory_bytes: 256
using System;



class sample4{
    static void Main(string[] args){

            int a = int.Parse(Console.ReadLine());
            int h = a/3600;
            int m = a/60 - h*60;
            int s = a - (h*3600 + m * 60);
            
            if( h > 60 || h < 0){
                Console.WriteLine("時が60未満の数字ではありません");
                Environment.Exit(0);
            }else if(m > 60 || m < 0){ 
                 Console.WriteLine("分が60未満の数字ではありません");
                 Environment.Exit(0);
            }else if(s > 60 || s < 0){ 
                 Console.WriteLine("秒が60未満の数字ではありません");
                 Environment.Exit(0);
            }
            Console.WriteLine("{0}:{1}:{2}",h,m,s);
        }
    }


Measured memory_bytes: 17904
#include <bits/stdc++.h>
#define ALL(a) (a).begin(),(a).end()
#define N_MAX 1000
#define ll long long int
using namespace std;

int main() {
	ll H; cin >> H;
	ll x = floor(log(H)/log(2));
	ll ans = 0;
	for (int i = 0; i <= x; i++) {
		ans += pow(2, i);
	}

	cout << ans << endl;
}


Measured memory_bytes: 512
#![allow(unused_mut, non_snake_case,unused_imports)]
use std::iter;
use std::cmp::{max, min, Ordering};
use std::mem::{swap};
use std::collections::{HashMap,BTreeMap,HashSet,BTreeSet,BinaryHeap,VecDeque};
use std::iter::FromIterator;

//　高速 EOF要
//macro_rules! input {(source = $s:expr, $($r:tt)*) => {let mut iter = $s.split_whitespace();input_inner!{iter, $($r)*}};($($r:tt)*) => {let mut s = {use std::io::Read;let mut s = String::new();std::io::stdin().read_to_string(&mut s).unwrap();s};let mut iter = s.split_whitespace();input_inner!{iter, $($r)*}};}
//macro_rules! input_inner {($iter:expr) => {};($iter:expr, ) => {};($iter:expr, $var:ident : $t:tt $($r:tt)*) => {let $var = read_value!($iter, $t);input_inner!{$iter $($r)*}};}
//macro_rules! read_value {($iter:expr, ( $($t:tt),* )) => {( $(read_value!($iter, $t)),* )};($iter:expr, [ $t:tt ; $len:expr ]) => {(0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()};($iter:expr, chars) => {read_value!($iter, String).chars().collect::<Vec<char>>()};($iter:expr, usize1) => {read_value!($iter, usize) - 1};($iter:expr, $t:ty) => {$iter.next().unwrap().parse::<$t>().expect("Parse error")};}
// 低速 EOF不要
macro_rules! input {(source = $s:expr, $($r:tt)*) => {let mut iter = $s.split_whitespace();let mut next = || { iter.next().unwrap() };input_inner!{next, $($r)*}};($($r:tt)*) => {let stdin = std::io::stdin();let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));let mut next = move || -> String{bytes.by_ref().map(|r|r.unwrap() as char).skip_while(|c|c.is_whitespace()).take_while(|c|!c.is_whitespace()).collect()};input_inner!{next, $($r)*}};}
macro_rules! input_inner {($next:expr) => {};($next:expr, ) => {};($next:expr, $var:ident : $t:tt $($r:tt)*) => {let $var = read_value!($next, $t);input_inner!{$next $($r)*}};}
macro_rules! read_value {($next:expr, ( $($t:tt),* )) => {( $(read_value!($next, $t)),* )};($next:expr, [ $t:tt ; $len:expr ]) => {(0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()};($next:expr, chars) => {read_value!($next, String).chars().collect::<Vec<char>>()};($next:expr, usize1) => {read_value!($next, usize) - 1};($next:expr, $t:ty) => {$next().parse::<$t>().expect("Parse error")};}

// 非常時
fn read_line() -> String{ let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); s.trim().to_string() }

/*
 <url:https://beta.atcoder.jp/contests/abc115/tasks/abc115_a>
 問題文============================================================
 =================================================================
 解説=============================================================
 ================================================================
 */
fn main(){
    input!(D:i32);
    print!("Christmas");
    let mut C:i32 = 25-D;
    while C!=0{
        print!(" Eve");
        C-=1;
    }
    println!();
}

Measured memory_bytes: 4352
import sys
from random import choice,randint
inp=sys.stdin.readline
out=sys.stdout.write
flsh=sys.stdout.flush
 
sys.setrecursionlimit(10**9)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def MI(): return map(int, inp().strip().split())
def LI(): return list(map(int, inp().strip().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]
def LI_(): return [int(x)-1 for x in inp().strip().split()]
def LF(): return [float(x) for x in inp().strip().split()]
def LS(): return inp().strip().split()
def I(): return int(inp().strip())
def F(): return float(inp().strip())
def S(): return inp().strip()
def pf(s): return out(s+'\n')
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    from collections import Counter
    n=I()
    l = []
    for i in range(n):
        s = S()
        l.append(s)
    z = Counter(l)
    print(len(z))

if __name__ == "__main__":
    main()

Measured memory_bytes: 39188
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <iterator>
#include <cassert>
#include <numeric>
#pragma warning(disable:4996) 
 
typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define LINF  9223300000000000000
#define LINF2 1223300000000000000
#define INF 2140000000
const long long MOD = 1000000007;
//const long long MOD = 998244353;

using namespace std;


void solve()
{
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    printf("%d", c - MIN(a - b,c));

    return;
}

int main(int argc, char* argv[])
{
#if 1
    solve();
#else
    int T;
    scanf("%d%d", &T, &B);
    int t;
    for(t=0; t<T; t++) {
        //printf("Case #%d: ", t+1);
        solve();
    }
#endif
    return 0;
}



Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Og")
#pragma GCC push_options
#pragma GCC pop_options
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    long long int n;
    cin >> n;
    long long int a[n + 1];
    bool d[n + 1];
    for (long long int i = 1; i <= n; i++)
    {
        cin >> a[i];
        d[i] = true;
    }
    long long int i = 1;
    long long int dem = n;
    long long int z = 1;
    while (n > i)
    {
        if (a[i] <= a[i + z] && d[i] != false && i+z <= n)
        {
            dem--;
            d[i + z] = false;
            z++;
            continue;
        }
        i++;
        z = 1;
    }
    cout << dem;
}

Measured memory_bytes: 2048
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) throws ClassNotFoundException, IOException {
		FastScanner sc = new FastScanner();
		int N = sc.nextInt();
		int X = sc.nextInt();
		int count = 1;
		int d = 0;
		ArrayList<Integer> L = new ArrayList<Integer>();
		for(int i=0; i < N; i++) {
			L.add(sc.nextInt());
		}

		for(int l: L) {
			d = d + l;
			if(d > X) {
				break;
			}else {
				count++;
			}
		}

		System.out.println(count);
	}
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}

Measured memory_bytes: 21332
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;

#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(long long i=(a);i<(b);++i)
#define per(i,a,b) for(long long i=b-1LL;i>=(a);--i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;

#define MOD 1000000007

int main() {
	ll n,m;
	cin>>n>>m;
	set<pair<ll,ll> > se;
	rep(i,0,m){
		ll a,b;
		cin>>a>>b;
		se.insert(mp(min(a,b),max(a,b)));
	}
	ll flag = 0;
	rep(i,2,n){
		if(se.count(mp(1,i))==1&&se.count(mp(i,n))==1){
			flag = 1;
		}
	}
	if(flag == 1){
		cout << "POSSIBLE" << endl;
	}
	else{
		cout << "IMPOSSIBLE" << endl;
	}
	return 0;
}





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

void solve(){
    double x;
    cin >> x;
    if(x == 0)
        cout << 1 << "\n";
    else if(x == 1)
        cout  << 0 << "\n";
        
}

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



Measured memory_bytes: 3796
n,m,x,y=map(int,input().split())
lstx=list(map(int,input().split()))
lsty=list(map(int,input().split()))

flag=False
for z in range(x+1,y):
    if max(lstx)<z and min(lsty)>=z:
        flag=True

if flag:
    print("No War")
else:
    print("War")


Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define loop(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  loop(i,0,n)
#define all(c) c.begin(),c.end()
#define rall(c) c.rbegin(),c.rend()
#define vi vector<int>
#define vl vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>

int main(){
    int a,b;
    cin>>a>>b;
    int p,q;
    if(a>=b){
      string ans="";
      rep(i,a){
        ans+=to_string(b);
      }
      cout<<ans<<endl;
    }
    else{
      string ans="";
      rep(i,b){
        ans+=to_string(a);
      }
      cout<<ans<<endl;
    }
    
}

Measured memory_bytes: 256
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
de = e - d
ce = e - c
cd = d - c
be = e - b
bd = d - b
bc = c - b
ae = e - a
ad = d - a
ac = c - a
ab = b - a
distance = [ab, ac, ad, ae, bc, bd, be, cd, ce, de]
output = []
ok = 'Yay!'
bad = ':('
for i in distance:
    if i > k:
        output.append(bad)
    elif i <= k:
        output.append(ok)
if bad in output:
    print(bad)
elif ok in output:
    print(ok)

Measured memory_bytes: 3064
import math
N,K = (int(x) for x in input().split())
p = 0
for i in range(1,N+1):
  if i < K:
    times = math.ceil(math.log2(K/i))
    p = p + (1/N)*(1/2)**times
  else:
    p = p + (1/N)
print(p)
  

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

int main(void){
  int N;
  cin>>N;
  vector<long long> A(N);
  for(int i=0;i<N;i++){
    cin>>A[i];
  }
  set<long long> dict;
  for(int i=0;i<N;i++){
    dict.insert(A[i]);
  }
  if(dict.size()==N) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  return 0;
}


Measured memory_bytes: 11136
#include <iostream>
#include<string>
#include<algorithm>

using namespace std;
int main(void){
    int N;
    cin>>N;
    int M;
    M=3*N;
    long long a[M];
    
    
    for(int i=0;i<M;i++){
        cin>>a[i];
        
       
        
    }
    sort(a,a+M);
    reverse(a,a+M);
    long long T;
    T=0;
    for(int i=1;i<N*2;i=i+2){
        
        T=T+a[i];
        
        
    }
    
     
    cout<<T<<endl;
    
    return 0;
    
}

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

int main(void) {
 
    int a, b, c;

    cin >> a >> b >> c;

    if (a == 5 && b == 7 && c == 5){
        cout << "YES" << endl;
    } else if (a == 7 && b == 5 && c == 5){
        cout << "YES" << endl;
    } else if (a == 5 && b == 5 && c == 7){
         cout << "YES" << endl;
    } else {
         cout << "NO" << endl;     
         }

    return 0;
}

Measured memory_bytes: 3544
A, B, C = list(map(int,input().split()))
K = int(input())

ans = 0
if A < B < C:
    a = "Yes"
else:    
    while True:
        if B <= A:
            B *= 2
            ans += 1
        if ans == K:
            break
        if A < B < C:
            a = "Yes"
            break
        if B >= C:
            C *= 2
            ans += 1
        if ans == K:
            break
        if A < B < C:
            a = "Yes"
            break
if A < B < C:
    a = "Yes"
else:
    a = "No"
print(a)

Measured memory_bytes: 9200
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <string>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define Sort(a) sort(a.begin(), a.end())
const int INF = 1<<30;
const ll MOD = 1000000007;

int main(void) {

    int n, k, m = 102; cin >> n >> k;
    vector<bool> snk(n, false);
    vector<vi> v(k, vi(m));
    vi d(k);
    rep(i, k) {
        cin >> d[i];
        rep(j, d[i]) cin >> v[i][j];
    }

    rep(i, k) {
        rep(j, d[i]) {
            snk[v[i][j] - 1] = true;
        }
    }
    int cnt = 0;
    rep(i, n) {
        if (!snk[i]) cnt++;
    }
    cout << cnt << endl;


    return 0;
}

Measured memory_bytes: 3676
#include <bits/stdc++.h>
#define rep(i, a, n) for (int i = (int)(a); i <= (int)(n); ++i)
#define rrep(i, a, n) for (int i = (int)(a); i >= (int)(n); --i)
#define debug(x) cerr << #x << " = " << x << "\n"
#define debugv(x) \
  rep(f, 0, (x.size() - 1)) cerr << x[f] << (f == (x.size() - 1) ? "\n" : " ")
#define all(x) x.begin(), x.end()
#define int long long
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
const int MX = 1e5 + 5, INF = 5 << 28, MOD = 1e9 + 7;

int N, M, K;
vi A, B;
string S, T;

void input() {
  cin>>N;
  int x, y, z;
  ;
}
void solve() {
  cout<<N*(N+1)/2<<endl;
  ;
  ;
}
signed main() {
  input();
  solve();
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

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

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

int main() {
    int k, n;
    cin >> k >> n;
    vector<int> v(n);
    for (auto &&i : v) scanf("%d", &i);
    int ans = v.back()-v.front();
    for (int i = 0; i+1 < n; ++i) {
        ans = min(ans, k-(v[i+1]-v[i]));
    }
    cout << ans << "\n";
    return 0;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h> 
using namespace std;
typedef long long ll;
template<typename T1,typename T2> bool chmin(T1 &a,T2 b){if(a<=b)return 0; a=b; return 1;}
template<typename T1,typename T2> bool chmax(T1 &a,T2 b){if(a>=b)return 0; a=b; return 1;}
int dx[4]={0,1,-1,0};
int dy[4]={1,0,0,-1};


signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(20);

    int n;
    cin>>n;
    int now = 8;
    for(int i=400;i<100000;i+=200){
        if(i<=n && n<i+200){
            cout << now << endl;
            return 0;
        }
        now--;
    }
}

Measured memory_bytes: 3636
#include <bits/stdc++.h>
#include <string>
#include <algorithm>
using namespace std; //std::の省略のため
using ll = long long;

ll MOD = 1000000007;

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

    ll ans;

    if (n % x == 0)
    {
        ans = t * (n / x);
    }
    else
    {
        ans = t * (n / x + 1);
    }

    cout << ans << endl;
}


Measured memory_bytes: 3628
#include <bits/stdc++.h>
#define rep(i,n) for (ll i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<vector<ll> > Graph;
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 ll INF = 1e18;

int n,m;
vector<ll>h;
Graph G;


int main(){
    cin >> n >> m;
    h.resize(n);
    G.resize(n);
    rep(i,n){
        cin >> h[i];
    }
    rep(i,m){
        int a,b;
        cin >> a >> b;
        a--;b--;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    int ans = 0;
    rep(i,n){
        bool flag=true;
        for(int x:G[i]){
            if(h[i]<=h[x])flag=false;
        }
        if(flag)ans++;
    }
    cout << ans << endl;
    
    return 0;
}


Measured memory_bytes: 9792
let () = Scanf.scanf "%d\n" @@ fun n ->
  let es = Array.make n [] in
  for i = 0 to n - 2 do
    Scanf.scanf "%d %d %d\n" @@ fun u v w ->
      es.(u - 1) <- (v - 1, w) :: es.(u - 1);
      es.(v - 1) <- (u - 1, w) :: es.(v - 1)
  done;
  let colours = Array.make n None in
  let rec visit c v =
    match colours.(v) with
    | Some _ -> ()
    | None ->
        colours.(v) <- Some c;
        List.iter (fun (u, w) -> visit (c lxor (w land 1)) u) es.(v) in
  visit 0 0;
  Array.iter (function
    | None -> ()
    | Some c -> Printf.printf "%d\n" c) colours

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

int main()
{
	int a, b, k;
	cin >> a >> b >> k;
	for (int i = a; i < min(b + 1, a + k); i++)
		cout << i << "\n";
	for (int i = max(a + k, b - k + 1); i <= b; i++)
		cout << i << "\n";
}

Measured memory_bytes: 256
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    N,K=map(int,input().split())
    ans=0
    for b in range(K+1,N+1):
        ans+=N//b*(b-K)+max(N%b-max(K-1,0),0)
    print(ans)

if __name__ == '__main__':
    main()


Measured memory_bytes: 39024
#include <bits/stdc++.h>
using namespace std;
using lint     = long long;
const lint inf = 1LL << 60;
const lint mod = 1000000007;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    lint n, m, v, p;
    cin >> n >> m >> v >> p;
    vector<lint> a(n);
    map<lint, lint> cnt;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        cnt[a[i]]++;
    }
    sort(a.begin(), a.end(), greater<>());
    lint ok    = 0;
    lint ng    = n - 1;
    auto check = [&](lint mid) {
        auto cntm = cnt;
        cntm[a[mid]]--;
        lint score = a[mid] + m;
        if (score < a[p - 1])
            return false;
        lint adds = (v - 1) * m;
        adds -= (p - 1) * m;
        lint ps = p - 1;
        for (auto it = cntm.rbegin(); it != cntm.rend(); it = next(it)) {
            int use = min(ps, it->second);
            it->second -= use;
            ps -= use;
            if (p == 0)
                break;
        }
        for (auto &c : cntm) {
            if (score > c.first)
                adds -= min(m, score - c.first) * c.second;
        }
        return adds <= 0;
    };
    if (check(ng)) {
        cout << n << "\n";
        return 0;
    }
    while (abs(ok - ng) != 1) {
        lint mid               = (ok + ng) / 2;
        (check(mid) ? ok : ng) = mid;
    }
    cout << ok + 1 << "\n";
    return 0;
}

Measured memory_bytes: 13568
# import numpy as np
# import scipy as sp
# print(a,b,c,sep="") # 半角スペースなしで出力(abc)
# n=int(input())  #数値入力 「N」だけの入力のとき
# a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
# c=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
# s=[list(map(str,list(input()))) for i in range(h)]  # 文字列の二次元配列入力
# s = [list(map(int, input().split())) for i in range(n)] # 数値の二次元配列入力
# a = b[:], a = [x[:] for x in b] # deepcopy
# chr(ord('a') + 1) # chrのインクリメント
# s.sort(key=lambda x: x[1], reverse=False) # 2番目の要素で昇順にソート（Trueなら降順）
#

s = input()
if 'a' in s and'b' in s and'c' in s:
    print('Yes')
else:
    print('No')


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

using namespace std;
#define ll long long int

int main(){
    ll n;
    cin >> n;
    ll height[n];
    ll dp[n];
    for(int i =0 ; i  < n ; i ++)
    {
        cin >> height[i];
        dp[i] = INT_MAX;
    }
    
    dp[0] =0 ;
    for(int i = 0; i < n - 1 ; i ++)
    {
        dp[i + 1] = min(dp[i + 1] , dp[i] + abs(height[i + 1] - height[i]));
        dp[i + 2] = min(dp[i + 2] , dp[i] + abs(height[i + 2] - height[i]));
    }
    cout << dp[n - 1] << endl;
}

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

#define CEIL(a,b) ((a) / (b) + ((a) % (b) == 0 ? 0 : 1))

using namespace std;
using ll = long long;
using pii = pair<int, int>;

constexpr int MOD = 1'000'000'007;
constexpr int INF = 1'000'000'001;
constexpr ll LLINF = 4'000'000'000'000'000'001;
// constexpr int INF = 2147483647; // 2 * 1e9
// constexpr ll LLINF = 9223372036854775807; // 9 * 1e18

const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1, 0};
const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1, 0};

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);
    int n, d;
    cin >> n >> d;
    // vector<int> a(n);
    // for(int i = 0; i < n; ++i){
    //     cin >> a[i];
    // }
    cout << CEIL(n, 2*d+1) << "\n";
    return 0;
}

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

int main(){
	int A, B, C, X;
	cin >> A >> B >> C >> X;
	int ans = 0;
	for (int i = 0; i <= min(X/500, A); i++) {
		for (int j = 0; j <= min((X-500*i)/100, B); j++) {
			for (int k = 0; k <= min((X-500*i-100*j)/50, C); k++) {
				int p = 500*i + 100*j + 50*k;
				if (p == X) ans++;	
			}
		}
	}
	cout << ans << endl;
	return 0;
}


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

using namespace std;
using ll =long long;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef pair<int,int> PII;
#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cerr << #x << " = " << (x) << endl;
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; }
using P = pair<int,int>;
//Write From this Line

int main()
{
	int n;
	cin >> n;
	vector<P> x(n), y(n);
	rep(i,n) cin >> y[i].first >> y[i].second;
	rep(i,n) cin >> x[i].first >> x[i].second;
	int ans = 0;
	SORT(x);

	vector<int> usex(n,0);
	vector<int> usey(n,0);
	rep(i,n){
		int index = -1;
		int wai = -1;
		rep(j,n){
			if(usex[i] == 1 || usey[j] == 1) continue;// x が青yが赤
			if(x[i].first >= y[j].first){
				if(wai <= y[j].second && y[j].second <= x[i].second){
					wai = y[j].second;
					index = j;
				}
			}
		}
		if(index != -1){
			ans ++;
			usex[i] = 1;
			usey[index] = 1;
		}
	}
	cout << ans << endl;
}


Measured memory_bytes: 256
using System;

class ABC_130_C
{
    static void Main(string[] args)
    {
        string[] input = Console.ReadLine().Split(' ');
        int W = int.Parse(input[0]);
        int H = int.Parse(input[1]);
        int x = int.Parse(input[2]);
        int y = int.Parse(input[3]);

        double HALF = (H / 2d) * W;

        if (x * 2 == W && y * 2 == H)
        {
            Console.WriteLine(HALF + " " + 1);
        }
        else
        { 
            Console.WriteLine(HALF + " " + 0);
        }
    }
}

Measured memory_bytes: 13140
#include <bits/stdc++.h>
#define int long long int
#define ii pair<int,int>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
using namespace std;
#define output(x) for (auto a:x) cout<<a<<" ";cout<<endl;
#define output2(x) for (auto a:x) cout<<a.fi<<" "<<a.se<<endl;
#define PI 3.14159265

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

#define MOD 1000000007
int power(int x,int y,int mod = MOD) 
{ 
  int ret = 1;
  x = x % mod;
  while (y){
    if(y&1) ret = (ret*x)%mod;
    y = y>>1;
    x = (x*x)%mod;
    } 
    return ret%mod; 
}

void solve()
{ 
  int N = 1e6 + 5;
  int n;
  cin>>n;
  vector<int> inp(n);
  vector<int> occ(N);
  vector<int> good(N,1);
  
  int ans = 0;
  for (auto &x:inp) cin>>x,occ[x]++;
  for (int i=1;i<=N;i++){
    if (occ[i] > 0 && good[i]){
      for (int j = i*2;j<=N;j+=i){
        good[j] = 0;
      }
    }
  }
  for (int i=1;i<N;i++){
    if (good[i] && occ[i]==1){
      debug() << imie(i);
      ans++;
    }
  }
  cout<<ans<<endl;
}


/*
  
*/
signed main(){
  // int t;
  // cin>>t;
  // while (t--)
  solve();
}
// Check MOD values plox :(


Measured memory_bytes: 20420
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <cstdint>
#include <tuple>
#include <numeric>
#define M_PI       3.14159265358979323846


using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define MT make_tuple
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FILL(a, x) memset(a, x, sizeof(a))

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

const int N = 105;

struct edge {
	int to;
	LL cap;
	int rev;
	edge(int _to, LL _cap, int _rev) : to(_to), cap(_cap), rev(_rev) {};
};

int par[N], pare[N];
LL possibleflow[N];
using node = vector<edge>;
using graph = vector<node>;

LL aug(graph &g, int s, int t, LL f) {
	memset(par, -1, sizeof(par));
	par[s] = s;
	possibleflow[s] = 1e18;
	deque<int> q;
	q.push_back(s);
	while (!q.empty()) {
		auto i = q.front();
		q.pop_front();
		for (auto &e : g[i]) {
			if (e.cap > 0 && par[e.to] == -1) {
				par[e.to] = i;
				pare[e.to] = e.rev;
				possibleflow[e.to] = min(possibleflow[i], e.cap);
				if (e.to == t) {
					auto df = possibleflow[t];
					while (par[t] != t) {
						g[t][pare[t]].cap += df;
						g[par[t]][g[t][pare[t]].rev].cap -= df;
						t = par[t];
					}
					return df;
				}
				q.push_back(e.to);
			}
		}
	}
	return 0;
}

LL maximum_flow(graph &g, int s, int t) {
	LL df;
	LL flow = 0;
	do {
		df = aug(g, s, t, 1e18);
		flow += df;
	} while (df != 0);
	return flow;
}

void addedge(graph &g, int from, int to, LL cap) {
	g[from].PB(edge(to, cap, g[to].size()));
	g[to].PB(edge(from, 0, g[from].size() - 1));
}

int main() {
	int n;
	scanf("%d", &n);
	LL sp = 0;
	graph g(n + 2);
	FOR(i, 1, n+1) {
		int a;
		scanf("%d", &a);
		if (a < 0)addedge(g, 0, i, -a);
		else {
			addedge(g, i, n + 1, a);
			sp += a;
		}
		for (int j = 2*i; j <= n; j += i) {
			addedge(g, i, j, 1e18);
		}
	}
	printf("%lld\n", sp - maximum_flow(g, 0, n + 1));
	return 0;
}

Measured memory_bytes: 256
a, b, c, x, y = map(int, input().split())
ans = 0
if 2*c <= a+b:
    ans += 2*c*min(x, y)
    if x >= y:
        ans += min(2*c, a)*(x-y)
    else:
        ans += min(2*c, b)*(y-x)
else:
    ans = a*x+b*y
print(ans)


Measured memory_bytes: 3060
a,b=map(int,input().split())
#a min
if a*100%8==0:
  amin=int(a*100/8)
elif a*100%8>0:
  amin=int(a*100/8)+1
#a max
if (a+1)*100%8==0:
  amax=int((a+1)*100/8-1)
elif (a+1)*100%8>0:
  amax=int((a+1)*100/8)
#b min
if b*100%10==0:
  bmin=int(b*100/10)
elif b*100%10>0:
  bmin=int(b*100/10+1)
#b max
if (b+1)*100%10==0:
  bmax=int((b+1)*100/10-1)
elif (b+1)*100%10>0:
  bmax=int((b+1)*100/8)
z=0
ans=[]
for i in range(amin,amax+1):
  for j in range(bmin,bmax+1):
    if i==j:
      ans.append(i)
    else:
      z+=1
if z==(amax+1-amin)*(bmax+1-bmin):
  print(-1)
else:
  print(ans[0])

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

int main() {
  	long long int N, M;
  	cin >> N >> M;
  	long long int H[N];
  	for (int i = 0; i < N; i++) cin >> H[i];
  	long long int A[M], B[M];
  	for (int i = 0; i < M; i++) cin >> A[i] >> B[i];
  
  	bool flag[N];
  	for (int i = 0; i < N; i++) flag[i] = true;
  
  	for (int i = 0; i < M; i++){
      	if (H[A[i] - 1] >= H[B[i] - 1]) flag[B[i] - 1] = false;
      	if (H[B[i] - 1] >= H[A[i] - 1]) flag[A[i] - 1] = false;
    }
  
  	int res = 0;
  	for (int i = 0; i < N; i++){
      	if (flag[i] == true) res++;
    }
  
  	cout << res << endl;
}


Measured memory_bytes: 6068
#include <algorithm>     //sort,二分探索,など
#include <bitset>        //固定長bit集合
#include <cmath>         //pow,logなど
#include <complex>       //複素数
#include <deque>         //両端アクセスのキュー
#include <functional>    //sortのgreater
#include <iomanip>       //setprecision(浮動小数点の出力の誤差)
#include <iostream>      //入出力
#include <iterator>      //集合演算(積集合,和集合,差集合など)
#include <map>           //map(辞書)
#include <numeric>       //iota(整数列の生成),gcdとlcm(c++17)
#include <queue>         //キュー
#include <set>           //集合
#include <stack>         //スタック
#include <string>        //文字列
#include <unordered_map> //イテレータあるけど順序保持しないmap
#include <unordered_set> //イテレータあるけど順序保持しないset
#include <utility>       //pair
#include <vector>        //可変長配列

using namespace std;
typedef long long ll;

//マクロ
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(x) (x).begin(), (x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size())      //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000 //10^12
#define MOD 10000007      //10^9+7
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define MAXR 100000 //10^5:最大のrange(素数列挙などで使用)

void rec(int d, ll val, vector<ll> &all)
{
  all.push_back(val);

  if (d == 10)
  {
    return;
  }

  // next
  FOR(i, -1, 1)
  {
    ll n_val = val * 10;
    ll add = val % 10 + i;
    if (add >= 0 && add <= 9)
    {
      rec(d + 1, n_val + add, all);
    }
  }
}

signed main()
{
  ll K;
  cin >> K;

  vector<ll> all;
  FOR(i, 1, 9)
  {
    rec(1, i, all);
  }

  sort(ALL(all));

  cout << all[K - 1] << endl;
}


Measured memory_bytes: 2420
#include <iostream>
#include <string>
#include <cmath>

using namespace std;

int main(){
	int W,H,x,y,r;
	cin >> W >> H >> x >> y >> r;
	if(x < r || x > W - r || y < r || y > H - r) cout << "No" << endl;
	else cout << "Yes" << endl;
	return 0;
}

Measured memory_bytes: 1156
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <queue>
#include <stack>
#include <string.h>
#include <list>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)



int main(){
    int n,timelimit, minv = 10000;
    cin >> n >> timelimit;
    rep(i,n){
        int c,t;
        cin >> c >> t;
        if(t <= timelimit){
            if(c < minv) minv = c;
        }
    }
    if (minv == 10000) cout << "TLE" << endl;
    else cout << minv << endl;

    return 0;
}


Measured memory_bytes: 256
import math

A,B=map(int,input().split())

C=sorted([A,B])
n=100
h=n
w=n


List=[None]*n
for i in range(n):
    List[i]=[0]*n
 
Col=n//4-1

for i in range(C[1]):
    hh=i//(Col)
    ww=i-hh*(Col)

    if ww%2==0:
         List[(hh+1)*4-1][ww*4]=1
         List[(hh+1)*4-1][ww*4+1]=1
         List[(hh+1)*4-1][ww*4+2]=1
         List[(hh+1)*4-1][ww*4+3]=1


    if ww%2==1:
        List[(hh+1)*4][ww*4]=1
        List[(hh+1)*4][ww*4+1]=1
        List[(hh+1)*4][ww*4+2]=1
        List[(hh+1)*4][ww*4+3]=1

            


for i in range(C[0]-1):
    hh=i//(Col)
    ww=i-hh*(Col)
    if hh==0:
        if ww%2==0:
            List[(hh+1)*4-2][ww*4+2]=1
            List[(hh+1)*4-3][ww*4+2]=1
            List[(hh+1)*4-4][ww*4+2]=1
        if ww%2==1:
            List[(hh+1)*4-1][ww*4+2]=1
            List[(hh+1)*4-2][ww*4+2]=1
            List[(hh+1)*4-3][ww*4+2]=1
            List[(hh+1)*4-4][ww*4+2]=1
    
    else:
        if ww%2==0:
            List[(hh+1)*4-2][ww*4+2]=1
            List[(hh+1)*4-3][ww*4+2]=1
            List[(hh+1)*4-4][ww*4+1]=1

        if ww%2==1:
            List[(hh+1)*4-1][ww*4+2]=1
            List[(hh+1)*4-2][ww*4+2]=1
            List[(hh+1)*4-3][ww*4+1]=1

print(h,w)

if A<=B:
    for i in range(n):
        for j in range(n):
            if List[i][j]==0:
                print(".",end="")
            else:
                print("#",end="")

        if i!=n:
            print("")

else:
    for i in range(n):
        for j in range(n):
            if List[i][j]==0:
                print("#",end="")
            else:
                print(".",end="")

        if i!=n:
            print("")


        


Measured memory_bytes: 4716
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <set>
#include <map>
#include <cassert>
#include <cstring>
#include <cstdio>
#include <cstdlib>
using namespace std;

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

	int k, x;
	scanf("%d%d", &k, &x);
	int a = max(-1000000, x - k + 1);
	int b = min(1000000, x + k - 1);
	for (int i = a; i <= b; i++) printf("%d ", i);
	printf("\n");
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
String s=scan.next();

String[] t=s.split("");
for(int i=0;i<t.length;i++){
    t[i]="x";
}
String u=String.join("",t);
System.out.println(u);
}
}

Measured memory_bytes: 21584