akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#include <numeric>
using namespace std;

#define ll long long
#define Fi first
#define Se second
#define Pb push_back
#define vi vector<int>
#define vp vector<pair<int,int>>
#define vvi vector<vector<int>>
#define vvp vector<vector<pair<int,int>>>

const int INF = 1e9;
const int MOD = 1e9+7;

#define all(v) v.begin(),v.end()
#define output_s(a) printf("%s\n",(a).c_str())

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define Rep(i,n,m) for(int i=(int)(n);i<(int)(m);i++)
#define RepS(i,n,m) for(int i=(int)(n);i<=(int)(m);i++)
#define RRepS(i,n,m) for(int i=(int)(n);i>=(int)(m);i--)
#define RepA(x) for(auto &item:(x))

void CINT(){}
template <class Head,class... Tail>
void CINT(Head&& head,Tail&&... tail){
    cin>>head;
    CINT(move(tail)...);
}    
#define CIN(...) int __VA_ARGS__;CINT(__VA_ARGS__)
#define LCIN(...) ll __VA_ARGS__;CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__;CINT(__VA_ARGS__)

template<typename TypeInt> //最大公約数
TypeInt GCD(TypeInt a,TypeInt b){
    if(a%b==0) return b;
    else return GCD(b,a%b);
}
template<typename TypeInt> //最小公倍数
TypeInt LCM(TypeInt a,TypeInt b){
    return a*b/GCD(a,b);
}

//library----------------------------------------------


int main(){
    CIN(w,a,b);
    int cls = abs(a-b);
    int ans=0;
    if(cls<=w){
        printf("%d\n",ans);
    }else{
        ans=abs(w-cls);
        printf("%d\n",ans);
    }

    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(){

  int N,flag,sum=0,temp,i,j;
  int A[100];

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

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

    for(j=N-1;j>i;j--){
      if(A[j-1]>A[j]){
      temp=A[j-1];
      A[j-1]=A[j];
      A[j]=temp;
      sum++;
      }
    }
  }
  for(i=0;i<N-1;i++){
    printf("%d ",A[i]);
  }
  printf("%d\n%d\n",A[N-1],sum);
}



Measured memory_bytes: 2128
#include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef pair<P,P> L;
const double EPS=1e-6;

double cross(P a, P b){ return imag(conj(a)*b); }
P crossPoint(L l, L m){
  double A = cross(l.second - l.first, m.second - m.first);
  double B = cross(l.second - l.first, l.second - m.first);
  if(fabs(A) < EPS && fabs(B) < EPS) return m.first;
  else if(fabs(A) >= EPS) return m.first + B / A * (m.second - m.first);
}

int main(){
  int n;
  cin>>n;
  vector<P> G(n);
  for(int i=0;i<n;i++){
    double x,y;
    cin>>x>>y;
    G[i]=P(x,y);
  }
  if(n%2){cout<<"NA"<<endl;return 0;}  
  double len=abs(G[0]-G[1]);
  for(int i=0;i<n/2;i++){
    double a=abs(G[i]-G[(i+1)]);
    double b=abs(G[i+n/2]-G[(i+n/2+1)%n]);
    if(abs(a-b)>EPS){cout<<"NA"<<endl;return 0;}
  }
  P ans=crossPoint(L(G[0],G[n/2]),L(G[1],G[n/2+1]));
  printf("%lf %lf\n",real(ans),imag(ans));
  return 0;
}

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

typedef long long ll;
const int mod = 1e9 + 7;
string S;
ll N, K;
vector<ll> v;

int main() {
    cin >> N >> K;
    v.resize(N);
    rep(i, N) cin >> v[i];

    ll ans = 0;
    for (int l = 0; l <= K; l++) {
        for (int r = 0; l + r <= K; r++) {
            if (l + r > N) continue;

            // 引ける数
            ll d = K - l - r;
            ll now = 0;
            vector<ll> S;

            rep(i, l) {
                now += v[i];
                S.push_back(v[i]);
            }

            for (ll i = N - r; i < N; i++) {
                now += v[i];
                S.push_back(v[i]);
            }

            sort(S.begin(), S.end());

            // 引く
            for (ll i = 0; i < d; i++) {
                if (i >= S.size()) break;
                if (S[i] > 0) break;
                now -= S[i];
            }
            ans = max(ans, now);
        }
    }

    cout << ans << endl;
}

Measured memory_bytes: 256
n = gets.to_i
d = gets.split.map(&:to_i).sort
t = Array.new(48,false)
ans = true

11.downto(0) { |i|
  48.times { |j| t[j] = false}
  t[23] = t[47] = true
  ans = true
  
  n.times { |j|
    if !t[23-d[j]-i..23-d[j]+i].any?
      t[23-d[j]] = t[47-d[j]] = true
    elsif !t[23+d[j]-i..23+d[j]+i].any?
      t[23+d[j]] = t[(47+d[j])%48] = true
    else
      ans = false
      break
    end
  }

  if ans
    puts i+1
    exit
  end
}
puts 0

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

int main(){
    int n,k; cin >> n >> k;
    int cnt = 0;
    while(n){
        n /= k;
        cnt++;
    }
    cout << cnt << endl;
}

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

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED       ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	setprecn(x) cout<<fixed<<setprecision(x);
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(ll i=0;i<n;i++)
#define 	repe(i,a,b) for(ll i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/
//	d.erase(unique(all(d)), d.end());




int main()
{
	SPEED;
	ll n,k,m,i,j,c=0,cs=0,t;
	t=1;

	// cin>>t;
	string s;
	while(t--)
	{
		// cs++;
		cin>>n>>k>>s;
		// n=s.length();
		// ll a[n][2]={0}
		vector<pll > v;
		rep(i,n)
		{
			if(s[i]=='1')
			{
				j=i;
				while(s[i]=='1')
					i++;
				v.pb({1,i-j});
			}
			else
			{
				j=i;
				while(s[i]=='0')
					i++;
				v.pb({0,i-j});
			}
			i--;
		}
		i=0,j=0;
		n=v.size();
		while(i<n && c<k)
		{
			if(v[i].ff==0) c++;
			cs+=v[i].ss;
			i++;
		}
		if(v[i].ff==1) cs+=v[i].ss,i++;
		m=cs;
		while(i<n && j<n)
		{
			// debug3(i,v[i].ff,v[i].ss);
			cs-=v[j].ss;
			j++;
			if(j<n && v[j].ff==0) cs-=v[j].ss,j++;
			if(i<n) cs+=v[i].ss;
			i++;
			if(i<n && v[i].ff==1) cs+=v[i].ss,i++;
			m=max(m,cs);
		}
		cout<<m;
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}

Measured memory_bytes: 2548
#include <iostream>

int main(int argc, char const *argv[]) {
    int W,a,b;
    std::cin >> W>>a>>b;
    if (b+W<a) {
        std::cout << a-b-W << '\n';
    }else if(a+W<b){
        std::cout << b-a-W << '\n';
    }else{
        std::cout << 0 << '\n';
    }
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/adaptor/indexed.hpp>

using namespace std;
using namespace boost::adaptors;
using namespace std::string_literals;
using ll = int64_t;
using vecint = vector<int>;
using vecll = vector<ll>;
using boost::irange;

void make(vector<vector<bool>>& t, int h, int w, int r, int c, bool rev = false) {
  if (h == 1 && w == 1) {
    t[r][c] = !rev;
  } else if (h < w) {
    make(t, h, w/2, r, c, !rev);
    make(t, h, w/2, r, c+w/2+1, !rev);
    make(t, h, 1, r, c+w/2, rev);
  } else if (w < h) {
    make(t, h/2, w, r, c, !rev);
    make(t, h/2, w, r+h/2+1, c, !rev);
    make(t, 1, w, r+h/2, c, rev);
  } else {
    make(t, h/2, w/2, r,       c, !rev);
    make(t, h/2, w/2, r,       c+w/2+1, !rev);
    make(t, h/2, w/2, r+h/2+1, c, !rev);
    make(t, h/2, w/2, r+h/2+1, c+w/2+1, !rev);
    make(t, h/2, 1, r,       c+w/2, rev);
    make(t, h/2, 1, r+h/2+1, c+w/2, rev);
    make(t, 1, w/2, r+h/2,   c, rev);
    make(t, 1, w/2, r+h/2,   c+w/2+1, rev);
    make(t, 1, 1, r+h/2, c+w/2, !rev);
  }
}

int main()
{
  int n,m;
  cin>>n>>m;
  int h=(1<<n)-1;
  int w=(1<<m)-1;
  vector<vector<bool>> t(h, vector<bool>(w, true));
  make(t, h, w, 0, 0);
  for(auto&& l:t) {
    for(auto&& e:l) {
      cout<<e;
    }
    cout<<endl;
  }
  return 0;
}


Measured memory_bytes: 1408
#include <iostream>

using namespace std;

int n, res;
long a[205];

int check()
{
	for (int i = 0; i < n; ++i)
		if (a[i] % 2)
			return false;

	return true;
}

int main()
{
	cin >> n;

	for (int i = 0; i < n; ++i)
		cin >> a[i];

	while (true)
	{
		if (!check())
			break;

		++res;
		for (int i = 0; i < n; ++i)
			a[i] /= 2;
	}

	cout << res << endl;

	return 0;
}

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

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

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

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

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

int main(void)
{
    int a, b;
    cin >> a >> b;
    cout << a * b << endl;
    return 0;
}
/** atcoder **/


Measured memory_bytes: 3640
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {

	public static void main(String[] args) {
		read().stream().map(data -> data.getRequiredNumber()).forEach(System.out::println);
	}

	static List<DataSet> read() {
		Scanner scanner = new Scanner(System.in);
		List<DataSet> dataList = new ArrayList<>();
		while (true) {
			int length = scanner.nextInt();
			if (length == 0) {
				break;
			} else {
				DataSet dataSet = new DataSet();
				for (int i = 0; i < length; i++) {
					dataSet.add(parse(scanner.next()), parse(scanner.next()));
				}
				dataList.add(dataSet);
			}
		}
		scanner.close();
		return dataList;
	}

	static int parse(String str) {
		return Integer.parseInt(str.replaceAll(":", ""));
	}

	static class DataSet {
		private Map<Integer, Integer> timeline = new HashMap<>();

		void add(int departure, int arrival) {
			timeline.merge(departure, 1, (a, b) -> a + b);
			timeline.merge(arrival, -1, (a, b) -> a + b);
		}

		int getRequiredNumber() {
			List<Integer> timestamps = timeline.keySet().stream().sorted().collect(Collectors.toList());
			int i = 0, max = 0;
			for (int timestamp : timestamps) {
				i = i + timeline.get(timestamp);
				max = Math.max(max, i);
			}
			return max;
		}
	}
}

Measured memory_bytes: 102372
import java.util.*;import java.io.*;import java.math.*;

public class Main
{

    public static void process()throws IOException
    {
        int n=ni(),m=ni(),arr[]=new int[n+1];
        long sum=0l;
        for(int i=1;i<=n;i++) sum+=(arr[i]=ni())*1l;

        double min_votes=sum/(4.0d*m);
            
        int cnt=0;
        for(int i : arr)
            if(i>=min_votes)
                cnt++;

        if(cnt>=m)
            pn("Yes");
        else
            pn("No");
    }


    static AnotherReader sc;
    static PrintWriter out;
    public static void main(String[]args)throws IOException
    {
        out = new PrintWriter(System.out);
        sc=new AnotherReader();
        boolean oj = true;

        //oj = System.getProperty("ONLINE_JUDGE") != null;
        if(!oj) sc=new AnotherReader(100);

        long s = System.currentTimeMillis();
        int t=1;
        while(t-->0)
            process();
        out.flush();
        if(!oj)
            System.out.println(System.currentTimeMillis()-s+"ms");
        System.out.close();  
    }

    static void pn(Object o){out.println(o);}
    static void p(Object o){out.print(o);}
    static void pni(Object o){out.println(o);System.out.flush();}
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static double nd()throws IOException{return sc.nextDouble();}
    static String nln()throws IOException{return sc.nextLine();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}
    static boolean multipleTC=false;



/////////////////////////////////////////////////////////////////////////////////////////////////////////

    static class AnotherReader{BufferedReader br; StringTokenizer st;
    AnotherReader()throws FileNotFoundException{
    br=new BufferedReader(new InputStreamReader(System.in));}
    AnotherReader(int a)throws FileNotFoundException{
    br = new BufferedReader(new FileReader("input.txt"));}
    String next()throws IOException{
    while (st == null || !st.hasMoreElements()) {try{
    st = new StringTokenizer(br.readLine());}
    catch (IOException  e){ e.printStackTrace(); }}
    return st.nextToken(); } int nextInt() throws IOException{
    return Integer.parseInt(next());}
    long nextLong() throws IOException
    {return Long.parseLong(next());}
    double nextDouble()throws IOException { return Double.parseDouble(next()); }
    String nextLine() throws IOException{ String str = ""; try{
    str = br.readLine();} catch (IOException e){
    e.printStackTrace();} return str;}}
    
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
    
    
    

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

int main() {
    int A,B,M;
    cin >> A >> B >> M;
    vector<int> a(A),b(B),c(M),x(M),y(M);
    for(int i=0;i<A;i++){
        cin >> a.at(i);
    }
    for(int i=0;i<B;i++){
        cin >> b.at(i);
    }
    for(int i=0;i<M;i++){
        cin >> x.at(i) >> y.at(i) >> c.at(i); 
    }

    int cost_min = 10000000;
    int cost_p;
    //割引最安値
    for(int i=0;i<M;i++){
        cost_p = a.at(x.at(i)-1) + b.at(y.at(i)-1) - c.at(i);
        if(cost_p < cost_min) cost_min = cost_p;
    }

    sort(a.begin(),a.end());
    sort(b.begin(),b.end());

    if(a.at(0)+b.at(0) < cost_min) cost_min = a.at(0)+b.at(0);

    cout << cost_min << endl;
    return 0;
}


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

typedef struct Node{
  int value;
  Node *parent, *left, *right;
} Node;

Node *NIL, *root;

void insert(int k){
  Node *y = NIL, *x = root, *z;

  z = (Node *)malloc(sizeof(Node));
  z->value = k;
  z->left = z->right = NIL;

  while(x != NIL){
    y = x;
    if(z->value < x->value) x = x->left;
    else x = x->right;
  }
  z->parent = y;

  if(y == NIL) root = z;
  else if(z->value < y->value) y->left = z;
  else y->right = z;
}

Node* find(Node *x, int k){
  if(x == NIL || x->value == k) return x;

  if(k < x->value) return find(x->left, k);
  else return find(x->right, k);
}

void preParse(Node *node){
  if(node == NIL) return ;

  cout << " " << node->value;
  if(node->left != NIL) preParse(node->left);
  if(node->right != NIL) preParse(node->right);
}

void inParse(Node *node){
  if(node == NIL) return ;

  if(node->left != NIL) inParse(node->left);
  cout << " " << node->value;
  if(node->right != NIL) inParse(node->right);
}

int main(){

  int n, key;
  string command;

  cin >> n;
  for(int i = 0;i < n;i++){
    cin >> command;
    if(command == "insert"){
      cin >> key;
      insert(key);
    }else if(command == "print"){
      inParse(root);
      cout << endl;
      preParse(root);
      cout << endl;
    }else if(command == "find"){
      cin >> key;
      if(find(root, key)) cout << "yes" << endl;
      else cout << "no" << endl;
    }
  }

  return 0;
}



Measured memory_bytes: 21816
package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
)

func min(a, b int) int {
	if a < b {
		return a
	} else {
		return b
	}
}

func main() {
	defer stdout.Flush()
	N := readInt()
	MAX_N := 100000

	x := make([]int, 100010)
	a := []int{
		6,
		9,
		36,
		81,
		216,
		729,
		1296,
		6561,
		7776,
		46656,
		59049,
	}

	for i := 0; i <= MAX_N; i++ {
		x[i] = MAX_N
	}
	x[0] = 0
	x[1] = 1
	for _, b := range a {
		x[b] = 1
	}

	for i := 2; i <= N; i++ {
		x[i] = min(x[i], x[i-1]+1)
		for _, b := range a {
			if i <= b {
				break
			}
			x[i] = min(x[i], x[i-b]+1)
		}
	}
	println(x[N])
}

var (
	readString func() string
	stdout     *bufio.Writer
)

func init() {
	readString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func readInt() int {
	i, err := strconv.Atoi(readString())
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = readInt()
	}
	return b
}

func readLengthAndSlice() []int {
	n := readInt()
	return readIntSlice(n)
}

func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(stdout, f, args...)
}

func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(stdout, args...)
}


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

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define REP(i, n) for(int i = 0; i < (n); ++i)
#define REPr(i, n) for(int i = (n)-1; i >= 0; --i)
#define FORq(i, m, n) for(int i = (m); i <= (n); ++i)
#define FORqr(i, m, n) for(int i = (n); i >= (m); --i)
#define MP make_pair
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x, 0, sizeof(x))
#define FILL(x, y) memset(x, y, sizeof(x))
#define MM(x) memset(x, -1, sizeof(x))
#define ALL(x) (x).begin(), (x).end()
#define DB(x) cerr << #x << " = " << x << endl
#define DB2(x, y)                                                              \
    cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n";
#define DEBUG                                                                  \
    int x12345;                                                                \
    cin >> x12345;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
const long long MOD = 1e9 + 7;
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;
}

///////////////////////////////////////////////
/// 🍈( '-' 🍈 |AC|
int main() {
	int A,B,C,D;
	cin >> A >> B >> C >> D;
	REP(i,100000){
		if (i % 2 == 0){
			C -= B;
			if (C <= 0){
				cout << "Yes\n";
				return 0;
			}
		}else{
			A -= D;
			if (A <= 0){
				cout << "No\n";
				return 0;
			}
		}
	}
}

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

using namespace std;
using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,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 ALL(x) (x).begin(),(x).end()
#define FILLl(n,first_dimension_size,value) fill((ll*)n,(ll*)(n+first_dimension_size),value)
#define FILL(n,first_dimension_size,value) fill((int*)n,(int*)(n+first_dimension_size),value)
#define INF (1 << 29)
#define MOD 1000000007
//int dx[4] = {1,0,0,-1};
//int dy[4] = {0,1,-1,0};


int main(){

  int a,b,x;
  cin >> a >> b >> x;
  if(a > x || x > a+b)cout << "NO" << endl;
  else cout << "YES" << endl;

  return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#define rep(i,x,n) for(int i=x;i<n;i++)
#define per(i,x,n) for(int i=n-1;i>=x;i--)
using namespace std;
#define ll long long
//head
int n,L;
int l,r,mid;
struct Bottle
{
    int up,down,val;
    bool operator < (const Bottle a)const
    {
        return val>a.val;
    }
}a[100005];
ll b[100005],c[100005],sum[100005];
bool check(int x)
{
    x--;
    rep(k,1,n+1)
     {
         if(c[k]<=x)continue;
        ll p=L-a[k].up,go=0;
        if(k<=x&&sum[x+1]-a[k].val>=p)return 1;
        if(k>x&&sum[x]>=p)return 1;
    }
    return 0;
}
int main()
{
     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
     int mx=0;
     cin>>n>>L;
     rep(i,1,n+1)cin>>a[i].up>>a[i].down,a[i].val=a[i].up-a[i].down,mx=max(a[i].val,mx);
     if(mx>=L){cout<<1<<endl;return 0;}
     rep(i,1,n+1)cin>>b[i];
     sort(a+1,a+n+1);
     rep(i,1,n+1)sum[i]=sum[i-1]+a[i].val;
     ll cnt=1,dis=0;
     rep(i,2,n+1)
     {
         dis+=(a[i].val-b[cnt]);
         if(dis<=0)break;cnt++;
     }
     c[1]=cnt;
     int k=2;
     for(;k<=n;k++)
     {
         if(cnt<k-1||cnt==n)break;
         dis+=(a[k-1].val-a[k].val);
         while(dis>0&&cnt<n)cnt++,dis+=(a[cnt+1].val-b[cnt]);c[k]=cnt;
     }
     for(;k<=n;k++)c[k]=cnt;
     int day=n;rep(i, 1, n+1)if(a[i].val<=0){day=i;break;}//for(int i=1;a[i].val>0&&i<=n;i++,day++);
     l=1,r=day;
     if(l>r){cout<<-1<<endl;return 0;}
     while(l<r)
     {
         mid=(l+r)/2;
         if(check(mid))r=mid;
         else l=mid+1;
     }
     if(check(l))cout<<l<<endl;
     else cout<<-1<<endl;
     return 0;
}



Measured memory_bytes: 6680
#include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
	int a,b;
	while(1){
		cin >> a;
		if(a ==- 1){
			return 0;
		}
		if(a<=10){
			b=1150;
		}
		else if(a<=20){
			b=125*a-100;
		}
		else if(a<=30){
			b=140*a-400;
		}
		else{
			b=160*a-1000;
		}
		b=4280-b;
		cout << b << "\n";
	}

	
	return 0;
}

Measured memory_bytes: 1160
#include<stdio.h>
int main()
{
	int a,b,c,d,t,j;
	while(~scanf("%d%d%d%d",&a,&b,&c,&d))
	{
	t=a>c?a:c;
	j=b>d?d:b;
	if(j>=t) printf("%d\n",j-t);
	else printf("0\n");
	}
}

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

using namespace std;

#define rep(i,m,n) for(int i=m;i<n;i++)

const long mod=1000000007;

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

  long res=0;
  
  vector<long> a(n);
  
 rep(i,0,n) cin >> a[i];
  
  vector<long> s(n,0),t(n,0);
    
  rep(i,0,n){
    rep(j,0,n){
    if(a[i]>a[j]) {s[i]++;
           if(i<j) t[i]++;
                   
                  }
    }
 }
  
   rep(i,0,n){
     
    res+=((k*t[i])%mod);
    res+=((((k*(k-1)/2)%mod)*s[i])%mod);
     res%=mod;
     
   }
   cout << res << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>
#include <deque>
#include <iomanip>
#include <cstdio>
#include <stack>

using namespace std;
typedef  long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define  MP make_pair
#define  PB push_back
#define inf  1000000007
#define rep(i,n) for(int i=0;i<(int)(n);++i)

int main(){
    ll a,b,c;
    cin >> a >> b >> c;
    ll ans = 0;
    ans += min(c,a+b+1);
    ans += b;
    cout << ans << endl;
    return 0;
}

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

typedef struct Amd {
	int h, p, q;
	bool operator<(const Amd &a) {
		return h < a.h;
	}
}Amd;

int n, m, a;
int t[101];
Amd amd[1000];

int main(){
	while (cin >> n >> m >> a && n != 0) {
		for (int i = 1; i <= n; i++) {
			t[i] = i;
		}
		for (int i = 0; i < m; i++) {
			cin >> amd[i].h >> amd[i].p >> amd[i].q;
		}
		sort(amd, amd + m);
		for (int i = 0; i < m; i++) {
			int r = t[amd[i].p];
			t[amd[i].p] = t[amd[i].q];
			t[amd[i].q] = r;
		}
		cout << t[a] << endl;
	}

	return 0;
}

Measured memory_bytes: 3056
#include<iostream>
#include<vector>
#include<algorithm>

#define REP(n) for(int i = 0;i < n;i++)
typedef long long int ll;
using namespace std;

int main(){

    ll H,W;
    cin >> H >> W;
    ll ans1 = 10000000000000000;
    ll ans2 = 10000000000000000;
    ll ans3 = 10000000000000000;
    ll ans4 = 10000000000000000;

    //横縦
    for(ll i = 1;i < H;i++){
        ll Sa,Sb,Sc;
        Sa = i*W;
        Sb = (H-i)*(W/2);
        //ll tmp = W/2;
        Sc = (H-i)*(W-(W/2));
        //cout << Sa << " " << Sb << " " << Sc << endl;

        ll maxi = max(Sa,max(Sb,Sc));
        ll mini = min(Sa,min(Sb,Sc));
        ans1 = min(ans1,maxi-mini);
    }

    //cout << "##############################" << endl;

    //横横
    for(ll i = 1;i < H;i++){
        ll Sa,Sb,Sc;
        Sa = i*W;
        Sb = ((H-i)/2)*W;
        //ll tmp = (H-i)/2;
        Sc = ((H-i)-(H-i)/2)*W;
        //cout << Sa << " " << Sb << " " << Sc << endl;

        ll maxi = max(Sa,max(Sb,Sc));
        ll mini = min(Sa,min(Sb,Sc));
        ans2 = min(ans2,maxi-mini);
    }
    //cout << "##############################" << endl;

    //縦横
    for(ll i = 1;i < W;i++){
        ll Sa,Sb,Sc;
        Sa = i*H;
        Sb = (H/2)*(W-i);
        //ll tmp = H/2;
        Sc = (H-(H/2))*(W-i);
        //cout << Sa << " " << Sb << " " << Sc << endl;

        ll maxi = max(Sa,max(Sb,Sc));
        ll mini = min(Sa,min(Sb,Sc));
        ans3 = min(ans3,maxi-mini);
    }
    //cout << "##############################" << endl;

     //縦縦
     for(ll i = 1;i < W;i++){
        ll Sa,Sb,Sc;
        Sa = i*H;
        Sb = ((W-i)/2)*H;
        Sc = (W-i-((W-i)/2))*H;
        //cout << Sa << " " << Sb << " " << Sc << endl;

        ll maxi = max(Sa,max(Sb,Sc));
        ll mini = min(Sa,min(Sb,Sc));
        ans4 = min(ans4,maxi-mini);
    }

    //cout << "##############################" << endl;
        
    //cout << ans1 << ans2 << ans3 << ans4 << endl;

    ll ans = min(min(ans1,ans2),min(ans3,ans4));

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

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include <iomanip>
#include <iostream>
using namespace std;

int main()
{

    string S;
    int ans=753;

    cin>>S;

    for(int i=0;i<S.length()-2;i++){

        int x = stoi(S.substr(i,3));

        ans = min(ans,abs(753-x));
    }

    cout << ans <<endl;

    return 0;
}


Measured memory_bytes: 256
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.next());
        HashSet<Integer> hashSet = new HashSet<>();
        for(int i = 0; i < number; i++) {
            hashSet.add(Integer.parseInt(sc.next()));
        }
        System.out.println(hashSet.size());
    }
}


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

int main(){
  int r, d, x;
  cin >> r >> d >> x;
  rep(i,10){
    x = r*x -d;
    cout << x << endl;
  }
}

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

int main() {
    int n, tmp, a[100], count;
    cin >> n;
    for (int i=0; i<n; i++) {
        cin >> a[i];
    }
    count = 0;
    for (int i=0; i<n; i++) {
        for(int j=n-1; j>=i+1; j--) {

            if (a[j] < a[j-1]) {
                tmp = a[j];
                a[j] = a[j-1];
                a[j-1] = tmp;
                count++;
            }
        }
    }
    for (int i=0; i<n; i++) {
        cout << a[i];
        if (i==n-1) {
            cout << endl;
        } else {
            cout << ' ';
        }
    }
    
    cout << count << endl;
    return 0;
}


Measured memory_bytes: 3084
#include "iostream"
using namespace std;

int main() {
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  int a[110], b[110];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (x < a[i]) x = a[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    if (b[i] < y) y = b[i];
  }
  cout << (x < y ? "No War" : "War") << 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>;

int main() {
    int r;
    cin >> r;

    cout << 2*M_PI*r <<endl;

    return 0;
}


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

int main() {
  int a, b, x;
  std::cin >> a >> b >> x;
  if (a <= x && x <= a + b) {
    std::cout << "YES" << std::endl;
  } else {
    std::cout << "NO" << std::endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
#include <queue>
using namespace std;
typedef long long int ll;
typedef long double ld;
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 long long INF = 1LL << 60;
typedef pair<ll,ll> pairs;
vector<pairs> p;
bool pairCompare(const pair<double,ll>& firstElof, const pair<double,ll>& secondElof){
    return firstElof.first < secondElof.first;
}
bool pairCompareSecond(const pair<double,ll>& firstElof, const pair<double,ll>& secondElof){
    return firstElof.second < secondElof.second;
}
#define MAX_N 100100
#define MOD 1000000007
bool x[MAX_N];
ll num[MAX_N];
ll fibl[MAX_N]={0};
// 四方向への移動ベクトル
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

ll fib(ll a){
    if (fibl[a]!=0)return fibl[a];
    if (a==0){
        return 0;
    }else if (a==1){
        return 1;
    }
    return fibl[a]=fib(a-1)+fib(a-2);
}
 
ll eratosthenes(ll n) {
    int p = 0;
    for (ll i=0; i<=n; ++i) x[i] = true;
    x[0] = x[1] = false;
    for(int i=2; i<=n; ++i) {
        if(x[i]) {
            p++;
            for(int j=2*i; j<=n; j+=i) x[j] = false;
        }
        
        num[i] = p;
    }
    return p;
}
 
ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}
 
ll keta(ll N){
    int tmp{};
    while( N > 0 ){
        tmp += ( N % 10 );
        N /= 10;
    }
    N = tmp;
    return N;
}

void  base_num(ll data,ll base){
    if(data==0) return;
    ll next=abs(data)%abs(base);
    if(data<0) next=(abs(base)-next)%abs(base);
    base_num((data-next)/base,base);
    cout << next;
}


int main(){
    ll n,ans=0;
    cin >> n;
    ll a[n],l[n],r[n];
    for (ll i=0;i<n;i++)cin >> a[i];
    l[0]=a[0];
    r[n-1]=a[n-1];
    for (ll i=1;i<n;i++){
        l[i]=gcd(l[i-1],a[i]);
        r[n-1-i]=gcd(r[n-i],a[n-1-i]);
    }
    ans=r[1];
    for (ll i=1;i<n-1;i++){
        ans=max(ans,gcd(l[i-1],r[i+1]));
    }
    ans=max(ans,l[n-2]);
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 2560
/*
*          Name : chaitanya
*
*     Institute : ANITS,Visakhapatnam
*
*/
#include<cstdio>
#include<iostream>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<complex>
#include<cstring>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<bitset>
#include<numeric>
#include<limits>
#include<climits>
#include<cfloat>
#include<functional>
#include<iterator>
#include <random>
#define infy  1000000000
#define all(x) begin(x),end(x)
#define ll long long int
#define ff first
#define ss second
#define pb push_back
const ll m = 1000000007;
#pragma GCC optimization ("O3")
const int N = 1000010;
using namespace std;
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while(!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(
vector<string> __attribute__ ((unused)) args,
__attribute__ ((unused)) int idx, 
__attribute__ ((unused)) int LINE_NUM) { cerr << endl; } 
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss; ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
#ifndef ONLINE_JUDGE
#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__)
#else
#define debug(...) 42
#endif

ll f[2000010];

ll lcm(ll a,ll b)
{
  return (a*b)/__gcd(a,b);
}
ll binpow(ll a, ll b) {
     ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
 
ll find_ncr(ll n, ll r)
{
    ll m1=max(r,n-r);
    ll i,j,s,d=1,k;
    s=1;
 
    for(i=m1+1;i<=n;i++)
    {
        s=((s%m)*(i%m))%m;
    }
 
    m1=min(r,n-r);
 
    for(i=1;i<=m1;i++)
    {
        k=binpow(i,m-2);
        d=((d%m)*(k%m))%m;
    }
 
    k=(s%m*(d%m))%m;
 
    return k;
}

int main()
{
  // int x = -1, y = 10000;
  // double z = 0.2;
  // string s2 = "beginner1010";
  // long long b = 1LL << 60;
    
  // // debug(x, y, z, s, b);
    
  // double aux = 1010.0;
  // string code = "code";
    
  // debug(code + "forces",-aux / 10 * 2.3);
  // freopen("input.txt","r",stdin);
  // freopen("output.txt","w",stdout);
  //ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  ll n,a,b;
  cin >> a >> b;
  for (int i = 1; i <= 1000; ++i)
  {
    int c,d;
    c = i*0.08;
    d = i*0.1;
    if( c == a && d == b)
    {
      cout << i;
      return 0;
    }
  }
  cout << -1;
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>/
// #include <ext/pb_ds/tree_policy.hpp>

#define pb push_back
#define mp make_pair

#define mod 1000000007LL
#define IN freopen("input.txt","r",stdin)
#define OUT freopen("output.txt","w",stdout)
#define FOR(i,a,b) for(i=a ; i<=b ; i++)
#define DBG printf("Hi\n")
#define INF 2000000000000000000LL
#define i64 long long int
#define eps (1e-8)
#define xx first
#define yy second
#define ln 17
#define off 2
#define SZ(z) ((int)z.size())
#define sq(x) ((x)*(x))

#define FastIO ios_base::sync_with_stdio(false); cin.tie(NULL)

#define EPS 1e-7

// using namespace __gnu_pbds;
using namespace std ;

// typedef tree< i64, null_type, less<i64>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define maxn 2005

int a[maxn] ;

int main()
{
    int n , k ;
    scanf("%d %d",&n,&k) ;

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

    int ans = 0 ;

    for(int i=1 ; i<=n ; i++)
    {
        for(int j=1; j<i ; j++)
        {
            if( a[j] > a[i] ) ans = ( ans + (1LL*k*(k+1))/2 )%mod ;
        }
        for(int j=i+1; j<=n ; j++)
        {
            if( a[j] > a[i] ) ans = ( ans + (1LL*k*(k-1))/2 )%mod ;
        }
    }

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

    return 0 ;
}


Measured memory_bytes: 256
#include <iostream>
#include <bits/stdc++.h>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;
//もっと簡単に
int main(){
    int n; cin>>n;
    vector<int> p(n);
    for(int i=0;i<n;i++) cin>>p[i];
    int maxp=0;
    int maxin=0;
    int ans=0;
    for(int i=0;i<n;i++){
        if(p[i]>maxp){
            maxp=p[i];
            maxin=i;
        }
        ans+=p[i];
    }
    cout<<ans-maxp/2<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
typedef long long ll;
ll n, dp[90];

ll func(ll x) {
    if (dp[x] > 0) return dp[x];
    if (x == n) return 2;
    if (x == n - 1) return 1;
    return dp[x] = func(x + 1) + func(x + 2);
}

int main(void){
    // Your code here!
    cin >> n;
    cout << func(0) << endl;
}


Measured memory_bytes: 256
#include<iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
#include <numeric>

using namespace std;


int main()
{
    long long n,m,k;
    cin >>n>>m>>k;

    vector<long long> a(n+1, 0);
    vector<long long> asum(n+1, 0);
    vector<long long> b(m+1, 0);
    vector<long long> bsum(m+1, 0);

    long long countb = 0;
    long long countt = 0;
    long long max = 0;

    for (long long i = 1; i < n+1; i++) {
        cin >> a[i];
        asum[i] = asum[i - 1] + a[i];
    }
    for (long long i = 1; i < m+1; i++) {
        cin >> b[i];
        bsum[i] = bsum[i - 1] + b[i];
    }

    long long j = m;

    for (long long i = 0; i < n + 1; i++) {
        if (asum[i] > k) {
            break;
        }

        for (j; j >= 0; j--) {
            if (bsum[j] <= k- asum[i] ) {
                if (max < i + j) {
                    max = i + j;
                }
                break;
            }
        }
        
    }

    cout << max;

    return 0;
}



Measured memory_bytes: 9596
MOD = 10**9 + 7  # 出力の制限

r1, c1, r2, c2 = list(map(int, input().split()))


# https://qiita.cmb/derodero24/items/91b6468e66923a87f39f
def cmb(n, r):
  if (r < 0 or r > n):
    return 0
  r = min(r, n - r)
  return g1[n] * g2[r] * g2[n - r] % MOD


N = 2 * 10**6 + 3
g1 = [1, 1]  # 元テーブル
g2 = [1, 1]  # 逆元テーブル
inverse = [0, 1]  # 逆元テーブル計算用テーブル

for i in range(2, N + 1):
  g1.append((g1[-1] * i) % MOD)
  inverse.append((-inverse[MOD % i] * (MOD // i)) % MOD)
  g2.append((g2[-1] * inverse[-1]) % MOD)

# Sum[Sum[Binomial[i + j, i], {i, r1, r2}], {j, c1, c2}]
# Binomial[c1 + r1, r1] - Binomial[1 + c2 + r1, r1] -  Binomial[1 + c1 + r2, 1 + r2] + Binomial[2 + c2 + r2, 1 + r2]

print((cmb(c1 + r1, r1) - cmb(1 + c2 + r1, r1) -
       cmb(1 + c1 + r2, 1 + r2) + cmb(2 + c2 + r2, 1 + r2)) % MOD)


Measured memory_bytes: 132908
#include <stdio.h>
#include <math.h>

double sqrt3(double a) {
	if(fabs(a) < 0.0000001)
		return 0.0;
	
	double x = pow(a, 1./3);
	return (2*x+a/x/x)/3; // modifier
}

int main(void) {
	int i, n;
	int A[101];
	int B[101];
	double d;
	double dmax;
	
	scanf("%d\n", &n);
	for(i=0;i<n;i++) {
		scanf("%d", &A[i]);
	}
	scanf("\n");
	
	for(i=0;i<n;i++) {
		scanf("%d", &B[i]);
	}
	scanf("\n");
	
	// p = 1
	d = 0.0;
	dmax = 0.0;
	for(i=0;i<n;i++) {
		double t = abs(A[i]-B[i]);
		if(dmax < t) {
			dmax = t;	
		} 
		d += t;
	}
	printf("%.6lf\n", d);

	// p = 2
	d = 0.0;
	for(i=0;i<n;i++) {
		d += pow(abs(A[i]-B[i]),2);
	}
	printf("%.6lf\n", sqrt(d));

	// p = 3
	d = 0.0;
	for(i=0;i<n;i++) {
		d += pow(abs(A[i]-B[i]),3);
	}
	printf("%.6lf\n", sqrt3(d));
	
	// p = n
	printf("%.6lf\n", dmax);
	
	return 0;
}

Measured memory_bytes: 708
A = []
for _ in range(3):
    A.append(list(map(int, input().split())))

n = int(input())
B = set(int(input()) for _ in range(n))
ans = False

for i in range(3):
    if all(A[i][j] in B for j in range(3)):
        ans = True

for i in range(3):
    if all(A[j][i] in B for j in range(3)):
        ans = True

if all(A[i][i] in B for i in range(3)):
    ans = True


if all(A[i][2-i] in B for i in range(3)):
    ans = True

print("Yes" if ans else "No")

Measured memory_bytes: 62096
#include<iostream>
#include<math.h>
using namespace std;
long long n,a,b,c;
int main()
{
	cin>>n;
	bool no=true;
	for(int i=1;i<=sqrt(n);i++)	
		if(n%i==0 && i<=9 && n/i<=9)
		{
			cout<<"Yes"<<endl;
			no=false;
			break;
		}
	if(no==true)
		cout<<"No"<<endl;	
} 

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

#define REP(i, x) REPI(i, 0, x)
#define REPI(i, a, b) for (int i = int(a); i < int(b); ++i)
#define ALL(x) (x).begin(), (x).end()

typedef long long ll;
using namespace std;

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

  string S, T;
  cin >> S >> T;
  int l = S.length();
  REP(i, l) {
    if (S.at(i) != T.at(i)) {
      cout << "No" << endl;
      return 0;
    }
  }

  cout << "Yes" << endl;
  return 0;
}


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

using namespace std;

typedef long long ll;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
	int n, m;
	cin >> n >> m;
	map<int, int> mp;
	for(int i=0; i<m; i++){
		int a, b;
		cin >> a >> b;
		mp[a]++;
		mp[b]++;
	}
	for(int i=1; i<=n; i++) cout << mp[i] << endl;
  return 0;
}


Measured memory_bytes: 256
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int[] numP = new int[N+1];
		int[] numQ = new int[N+1];
		int ans1 = 0,ans2 = 0;
		int[] ff = new int[]{0,1,2,6,24,120,720,5040};
		for( int i=N; i>=1; i-- ){
			numP[i] = sc.nextInt();
		}
		for( int i=N; i>=1; i-- ){
			numQ[i] = sc.nextInt();
		}
		for( int i=N; i>=1; i-- ){
			int count1 = 0,count2 = 0;
			for( int j=N; j>=i; j-- ){
				if( numP[i] > numP[j] ){
					count1++;
				}
				if( numQ[i] > numQ[j] ){
					count2++;
				}
			}
			ans1 += (numP[i]-1-count1)*ff[i-1];
			ans2 += (numQ[i]-1-count2)*ff[i-1];
		}
		System.out.println(Math.abs(ans1-ans2));
	}
}


Measured memory_bytes: 21844
/*
    Author:zeke

    pass System Test!
    GET AC!!
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
using ld = long double;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define rep3(var, min, max) for (ll(var) = (min); (var) < (max); ++(var))
#define repi3(var, min, max) for (ll(var) = (max)-1; (var) + 1 > (min); --(var))
#define Mp(a, b) make_pair((a), (b))
#define F first
#define S second
#define Icin(s) \
    ll(s);      \
    cin >> (s);
#define Scin(s) \
    ll(s);      \
    cin >> (s);
template <class T>
bool chmax(T& a, const T& b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
    if (b < a) {
        a = b;
        return 1;
    }
    return 0;
}
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef vector<V> VV;
typedef vector<P> VP;
ll mod = 1e9 + 7;
ll MOD = 1e9 + 7;
ll INF = 1e18;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    ll n,m;
    cin>>n>>m;
    rep(i,m){
        ll x;
        cin>>x;
        n-=x;
    }
    if(n<0){
        cout<<-1<<endl;
        return 0;
    }
    cout<<n<<endl;
}


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

// 総数を1000000007（素数）で割った余り
const long long mod = 1e9 + 7;

using ll = long long;
using pii  = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pii>
#define vpll vector<pll>

#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; i++)
#define rep1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; i++)
#define repr(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rep1r(i, n) for (int i = ((int)(n)); i >= 1; i--)

#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define RSORT(x) sort(rall(x));
#define pb push_back
#define mp make_pair

#define INF (1e9)
#define PI (acos(-1))
#define EPS (1e-7)

ull gcd(ull a, ull b) { return b ? gcd(b, a % b) : a; }
ull lcm(ull a, ull b) { return a / gcd(a, b) * b; }

int main(){
    int k, n;
    cin >> k >> n;
    vi a(n);
    rep(i, n) cin >> a[i];
    a.push_back(a[0]+k);
    int len = 0;
    rep(i, n) len = max(len, a[i+1]-a[i]);
    cout << k - len << endl;
    return 0;
}


Measured memory_bytes: 1792
'''
.append(要素) リストに要素を追加
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前
sort()
sorted(reverse=true)
配列の初期化
配列名=[a]*n+[b]*m
Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
from functools import reduce
from operator import mul
from collections import Counter
import itertools
import fractions
import sys

n = int(stdin.readline().rstrip())
A = [int(s) for s in stdin.readline().rstrip().split()]
num = 0
for i in range(1, n):
    if A[i-1] > A[i]:
        num += A[i-1]-A[i]
        A[i] += A[i-1]-A[i]
print(num)


Measured memory_bytes: 97404
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <limits>
using namespace std;

double inf = numeric_limits<double>::infinity();

int cnt[168];

int main() {
    int num = 168;
    int primes[] = {
        2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
        31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
        73, 79, 83, 89, 97,
        
        101, 103, 107, 109, 113, 127, 131, 137, 139, 149,
        151, 157, 163, 167, 173, 179, 181, 191, 193, 197,
        199,
        
        211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
        269, 271, 277, 281, 283, 293,
        
        307, 311, 313, 317, 331, 337, 347, 349, 353, 359,
        367, 373, 379, 383, 389, 397,
        
        401, 409, 419, 421, 431, 433, 439, 443, 449, 457,
        461, 463, 467, 479, 487, 491, 499,
        
        503, 509, 521, 523, 541, 547, 557, 563, 569, 571,
        577, 587, 593, 599,
        
        601, 607, 613, 617, 619, 631, 641, 643, 647, 653,
        659, 661, 673, 677, 683, 691,
        
        701, 709, 719, 727, 733, 739, 743, 751, 757, 761,
        769, 773, 787, 797,
        
        809, 811, 821, 823, 827, 829, 839, 853, 857, 859,
        863, 877, 881, 883, 887,
        
        907, 911, 919, 929, 937, 941, 947, 953, 967, 971,
        977, 983, 991, 997
    };
    
    int i;
    cin >> i;
    
    for (int j = 0; j < 168; j++) {
        cnt[j] += i / primes[j]
        + i / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j] / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j]
        + i / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j] / primes[j];
    }
    
    long MOD = 1e9 + 7;
    long ans = 1;
    
    for (int i = 0; i < 168; i++) {
        ans *= 1 + cnt[i];
        ans %= MOD;
    }
    cout << ans << endl;
    
}

Measured memory_bytes: 256