akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    int h,w,k;
    cin >> h >> w >> k;
    string s[h];
    rep(i,h)cin >> s[i];

    int ans = 1001001001;

    rep(i,(1<<(h-1))){
        // cout << i << " OK" << endl;
        int f[h] = {};
        int ii = i;
        int a[h] = {};
        int tmp = 0;
        rep(j,h){
            f[j] = ii % 2;
            ii /= 2;
            tmp += f[j];
        }
        int flag = -1;
        rep(j,w){
            int now = 0;
            if(tmp == 1001001001)break;
            rep(l,h){
                if(s[l][j] == '1'){
                    a[now]++;
                }
                if(f[l])now++;
            }
            rep(l,h){
                if(a[l] > k){
                    if(flag == j){
                        tmp = 1001001001;
                        break;
                    }
                    tmp++;
                    rep(r,h)a[r] = 0;
                    flag = j;
                    j--;
                    break;
                }
            }
        }
        ans = min(ans, tmp);
    }

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


Measured memory_bytes: 256
#include<stdio.h>
int main()
{
    int a,h,m,s;
    scanf("%d",&a);
      /*時間*/
        h=a/3600;
        m=(a-3600*h)/60;
        s=(a-3600*h)%60;
            printf("%d:%d:%d\n",h,m,s);
    return 0;        

}



Measured memory_bytes: 2692
import java.text.DecimalFormat;
import java.util.stream.LongStream;
import java.util.stream.IntStream;
import java.io.*;
import java.util.*;
import java.awt.*;

public class Main {

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        AtCoder problem = new AtCoder(sc);
        problem.solve(out);

        out.flush();
    }

}

class AtCoder {

    /* 変数宣言 */
    final int X,K;

    AtCoder(FastScanner sc) {
        X = sc.nextInt();
        K = sc.nextInt();
    }

    void solve(PrintWriter out) {
        int result=500*X;
        if (result>=K) {
            out.println("Yes");
        } else {
            out.println("No");
        }
    }

}

// https://qiita.com/p_shiki37/items/a0f6aac33bf60f5f65e4
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: 20820
#include "bits/stdc++.h"
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <map>
#include <vector>
#include <math.h>
#include <algorithm>
#include <queue>
#include <set>
#include <tuple>
using namespace std;

#define FOR(i,init,a) for(int i=init; i<a; i++)
#define rep(i,a) FOR(i,0,a)
#define rrep(i,a) for(int i=a; i>=0; i--)
#define rep1(i,a) for(int i=1; i<=a; i++)
#define cout1(a) cout << a << endl;
#define cout2(a,b) cout << a << " " << b << endl;
#define cout3(a,b,c) cout << a << " " << b << " " << c << endl;
#define cout4(a,b,c,d) cout << a << " " << b << " " << c << " " << d << endl;
#define mem(a,n) memset( a, n, sizeof(a))
#define all(a) a.begin(),a.end()

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef vector<int> V;
typedef vector<V> VV;
typedef vector<VV> VVV;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LLINF = 1e18;
static const double pi = 3.141592653589793;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    string S;
    int N;
    
    cin>>S;
    N=S.size();
    
    int ans=N, cnt_s=0;
    rep(i,N){
        if(S[i]=='S'){
            cnt_s++;
        }else if(cnt_s){
            cnt_s--;
            ans-=2;
        }
    }
    cout1(ans);
}

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

#define DUMP(x) cerr << #x << "=" << x << endl
#define DUMP2(x, y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<")"<< endl
#define BINARY(x) static_cast<bitset<16> >(x)

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

#define in_range(x, y, w, h) (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))
#define ALL(a) (a).begin(),(a).end()

typedef long long ll;
const int INF = 1e9;
typedef pair<int, int> PII;
int dx[4]={0, -1, 1, 0}, dy[4]={-1, 0, 0, 1};

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

    string ans = "";
    for (auto c : S) {
        if (c == 'B') {
            if (ans.size()) ans.pop_back();
        } else {
            ans += c;
        }
    }

    cout << ans << endl;
}



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

int a[4];

int main(){
	string s;
	cin >> s;
	int ans = 0;
	for(int i=0;i<s.size();i++){
		if(s[i] != s[s.size() - i - 1]){
			s[i] = s[s.size() - i - 1];
			ans++;
		}
	}
	printf("%d\n",ans);
	
	return 0;
}


Measured memory_bytes: 256
x, y = map(int, input().split())
 
kame = 0
turu = x
flag = 0
for i in range(x+1):
  kame = i
  turu = x - i
  if(kame*4 + turu*2 == y):
  	flag = 1

    
if flag == 1:
  print('Yes')
else:
  print('No')

Measured memory_bytes: 9172
#include <iostream>
#include <algorithm>
#define INF (1e+15)
using namespace std;

typedef long long ll;

int main(){

  int n, a[100001];
  ll ssum[100001*2] = {0};
  
  cin >> n;
  for(int i = 0; i < n; i++) cin >> a[i];
  
  ssum[0] = a[0];
  for(int i = 1; i < n*2; i++) ssum[i] = ssum[i - 1] + a[i % n];
  
  ll al = 0, ar = INF, amid;
  int c2;
  while(al < ar){
    amid = ((al + 1) + ar) / 2;          //解を二分探索
    bool judge = false;
    for(int i = 0; i < n; i++){
      int l = i, r = n + i;              //添字を二分探索
      while(l < r){
        int mid = (l + r) / 2;
        ll sub = ssum[mid] - ssum[i];
        if(sub < amid) l = mid + 1;
        else r = mid;
      }
      c2 = l++;
      r = n + i;
      while(l < r){
        int mid = (l + r) / 2;
        ll sub = ssum[mid] - ssum[c2];
        if(sub < amid) l = mid + 1;
        else r = mid;
      }

      if(ssum[i + n] - ssum[r] >= amid){
        judge = true;
        break;
      }
    }
    if(judge) al = amid;
    else ar = amid - 1;
  }
  cout << al << endl;
}

Measured memory_bytes: 3116
#include<bits/stdc++.h>
using namespace std;
int main()
{

long long a,b,c,i,j,k,ct=0;


cin>>a;
for(i=1;i<=a;i++)
{
    for(j=1;j<=a;j++)
    {

            for(k=1;k<=a;k++)
            {
              ct=ct+ __gcd(__gcd(i,j),k);
            }

    }



}

cout<<ct;
}


Measured memory_bytes: 3620
def insertionSort(A, n, g): 
  cnt = 0
  for i in range(g,n):
    v = A[i]
    j = i-g 
    while j >= 0 and A[j] > v:
      A[j+g] = A[j]
      j -= g
      cnt += 1
    A[j+g] = v 
  return cnt

N = int(raw_input())
A = []
for _ in range(N):
  A += [int(raw_input())]

h = 1 
g = []
g.append(h)
while 3*h+1 < N:
  h = 3*h+1
  g.append(h)

g.reverse()
print len(g)
print ' '.join(map(str, g)) 
cnt = 0
for G in g:
  cnt += insertionSort(A, N, G)
print cnt
print '\n'.join(map(str, A)) 


Measured memory_bytes: 125404
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define SZ(X) ((int)(X).size())
#define endl "\n";
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);
	string s;
	cin>>s;
	
	cout<<s.rfind("Z")-s.find("A")+1;
	

   return 0;
}


Measured memory_bytes: 3784
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll INF = 1e10;
int main()
{
    ll n, a, b;
    cin >> n >> a >> b;
    ll num = b-a;
    if(num % 2 == 0)
    {
        cout << num/2 << endl;
    }
    else
    {
        ll llans = min(b-1, n-a);
        ll ans = 0;
        ans += a;
        ans += (b-a)/2;
        ll tmp = 0;
        tmp += n-b+1;
        tmp += (n-(a+tmp))/2;
        ll tans = min(llans, min(ans, tmp));
        cout << tans << endl;
    }
}



Measured memory_bytes: 256
#include<cstdio>
#include<vector>
using namespace std;

const int MAX = 500;
int h, w;
struct ver {
    int x, y;
    bool judge;
};
ver v[MAX * MAX];
vector<int> ind;

int main() {
    int cnt = 0;
    scanf("%d %d", &h, &w);
    for (int i = 0; i < h; i++) {
        if (i % 2 == 0) {
            for (int j = 0; j < w; j++) {
                int a;
                scanf("%d", &a);
                cnt += v[w * i + j].judge = a % 2;
                v[w * i + j].x = i + 1;
                v[w * i + j].y = j + 1;
            }
        }
        else {
            for (int j = 0; j < w; j++) {
                int a;
                scanf("%d", &a);
                cnt += v[w * (i + 1) - j - 1].judge = a % 2;
                v[w * (i + 1) - j - 1].x = i + 1;
                v[w * (i + 1) - j - 1].y = j + 1;
            }
        }
    }
    
    for (int i = 0, c = 0; c != cnt / 2; i++) {
       if (v[i].judge) {
           c++;
           do {
               ind.push_back(i);
           } while (!v[++i].judge);
       }
    }

    printf("%d\n", static_cast<int>(ind.size()));
    for (auto &i : ind) {
        printf("%d %d %d %d\n", v[i].x, v[i].y, v[i + 1].x, v[i + 1].y);
    }
    return 0;
}


Measured memory_bytes: 5624
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <sstream>
#include <math.h>
#include <queue>
#include <map>
#include <set>
#include <ios>     // std::left, std::right
#include <iomanip> // std::setw(int), std::setfill(char)
using namespace std;


int main(){
long long A,B;
cin>>A>>B;
if((A+B)%2!=0){
  cout<<"IMPOSSIBLE"<<"\n";
}
else{
  cout<<(A+B)/2<<"\n";
}
return 0;
}


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

int main()
{
	string s;
	getline(cin, s);
	string::iterator it;
	int a[26]={0};

	for(it=s.begin();it<s.end();it++){
		a[*it-97]++;
	}

	for(int i=0;i<26;i++){
		if(a[i]%2){
			cout << "No" << endl;
			return 0;
		}
	}

	cout << "Yes" << endl;
}

Measured memory_bytes: 256
//動径の長さは√nで表される
//ラジアンを加えていく

#include <iostream>
#include <cmath>

using namespace std;

int main(void){

  int n;
  while(1){ 
    cin >> n;
    if( n == -1 )break;

    double rad = 0;
    for( int i = 1 ; i < n ; i++ ){
      rad += atan( 1 / sqrt(i) );
    }
    cout << sqrt(n)*cos(rad) << endl << sqrt(n)*sin(rad) << endl;
  }
  return 0;
}

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

int main() {
    int k;
    string s;
    cin >> k >> s;
    if (s.size() <= k) {
        cout << s << endl;
    } else {
        cout << s.substr(0, k);
        cout << "..." << endl;
    }
}

Measured memory_bytes: 3632
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<functional>
#include<string>
#include<iomanip>
#include<map>
#include<utility>
#include<string>
#include<unordered_map>
#include<queue>

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 namespace std;

#define min_3(a, b, c) min(a, min(b, c))
#define max_3(a, b, c) max(a, max(b, c))
typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1e9+7;

int main(){
   int n;
   cin >> n;
   cout << (n+1)/2 << endl;
   return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<cstring>
using namespace std;
int main(){
  int n,i,cnt=0;
  char s[99];
  cin >> s;
  n=strlen(s);
  for(i=0; i<n/2; i++){
    if(s[i]!=s[n-i-1]){
      // cout << "No" << endl;
      cnt++;
    }
  }
  for(i=0; i<(n-1)/2; i++){
    if(s[i]!=s[(n-1)/2 -i-1]){
      // cout << "No" << endl;
      cnt++;
    }
  }
  for(i=(n+3)/2 +1; i<n; i++){
    if(s[i]!=s[n-i-1]){
      // cout << "No" << endl;
      cnt++;
    }
  }
  if(cnt>0){
    cout << "No" << endl;
  }
  else{
    cout << "Yes" << endl;
  }
  return 0;
}


Measured memory_bytes: 256
import sys
input = sys.stdin.readline
s = input()
t = input()
ans = ''
slen = len(s)
tlen = len(t)

dp = [[0 for i in range(tlen+1)] for j in range(slen+1)]

for i in range(slen):
    for j in range(tlen):
        if s[i]==t[j]:
            dp[i+1][j+1]=max(dp[i][j]+1,dp[i+1][j],dp[i][j+1])
        else:
            dp[i+1][j+1]=max(dp[i+1][j],dp[i][j+1])
#ここまでで、DP配列が完成
#あとはDPの最後から遡る
i = slen
j = tlen
while (i>0 and j>0):
    if dp[i][j]==dp[i-1][j]:
        i -= 1
        continue
    elif dp[i][j]==dp[i][j-1]:
        j -= 1
        continue
    else:
        #print(i,j)
        ans = s[i-1] + ans
        i -= 1
        j -= 1
        
print(ans)

Measured memory_bytes: 120028
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Numerics;

namespace AtCoderWorkspace
{
    public class Solver
    {
        public void Solve()
        {
            var cin = new Scanner();
            var n = cin.nextInt();            
            Console.WriteLine(n==1? "Hello World":(cin.nextInt()+cin.nextInt()).ToString());
        }
    }

    class Scanner
    {
        string[] s;
        int i;

        char[] cs = new char[] { ' ' };

        public Scanner()
        {
            s = new string[0];
            i = 0;
        }

        public string next()
        {
            if (i < s.Length) return s[i++];
            string st = Console.ReadLine();
            while (st == "") st = Console.ReadLine();
            s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            if (s.Length == 0) return next();
            i = 0;
            return s[i++];
        }

        public int nextInt()
        {
            return int.Parse(next());
        }
        public int[] ArrayInt(int N, int add = 0)
        {
            int[] Array = new int[N];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextInt() + add;
            }
            return Array;
        }

        public int[] DPArrayInt(int N, int ex)
        {
            int[] Array = new int[N + ex];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextInt();
            }
            return Array;
        }

        public long nextLong()
        {
            return long.Parse(next());
        }

        public long[] ArrayLong(int N, long add = 0)
        {
            long[] Array = new long[N];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextLong() + add;
            }
            return Array;
        }

        public long[] DPArrayLong(int N, int ex)
        {
            long[] Array = new long[N + ex];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextLong();
            }
            return Array;
        }

        public double nextDouble()
        {
            return double.Parse(next());
        }


        public double[] ArrayDouble(int N, double add = 0)
        {
            double[] Array = new double[N];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextDouble() + add;
            }
            return Array;
        }
    }

    class Program
    {
        static void Main(string[] s) => new Solver().Solve();
    }
}


Measured memory_bytes: 11092
a,b,c,d,e,f=map(int,input().split())
a100=a*100
b100=b*100
ok=[]
for ai in range(31):
  for bi in range(31):
    for ci in range(101):
      for di in range(101):
        ab= ai*a100+bi*b100
        cd= ci*c+di*d
        if ab + cd >f:
          break
        else:
          if (ab/100)*e>=cd:
            ok.append([ab+cd,cd])
print(*sorted(ok, key=lambda x: (100*x[1] / x[0] if x[0] else 0))[-1])

Measured memory_bytes: 45316
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    A, B = map(int, readline().split())
    ans = (B-A)*(B-A+1)//2-B
    print(ans)



if __name__ == '__main__':
    main()


Measured memory_bytes: 9176
#include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0,i##_max=(N);i<i##_max;++i)
#define repp(i,l,r) for(int i=(l),i##_max=(r);i<i##_max;++i)
#define per(i,N) for(int i=(N)-1;i>=0;--i)
#define perr(i,l,r) for(int i=r-1,i##_min(l);i>=i##_min;--i)
#define all(arr) (arr).begin(), (arr).end()
#define SP << " " <<
#define SPF << " "
#define SPEEDUP cin.tie(0);ios::sync_with_stdio(false);
#define MAX_I INT_MAX //1e9
#define MIN_I INT_MIN //-1e9
#define MAX_UI UINT_MAX //1e9
#define MAX_LL LLONG_MAX //1e18
#define MIN_LL LLONG_MIN //-1e18
#define MAX_ULL ULLONG_MAX //1e19
  typedef long long ll;
  typedef pair<int,int> PII;
  typedef pair<char,char> PCC;
  typedef pair<ll,ll> PLL;
  typedef pair<char,int> PCI;
  typedef pair<int,char> PIC;
  typedef pair<ll,int> PLI;
  typedef pair<int,ll> PIL; 
  typedef pair<ll,char> PLC; 
  typedef pair<char,ll> PCL; 

inline void YesNo(bool b){ cout << (b?"Yes" : "No") << endl;}
inline void YESNO(bool b){ cout << (b?"YES" : "NO") << endl;}
inline void Yay(bool b){ cout << (b?"Yay!" : ":(") << endl;}

vector<int> multiple(int n,int N){
  vector<int> v;
  for(int i=2; i*n<=N; i++) v.push_back(i*n);
  return v;
}

int main(void){
  SPEEDUP
  cout << setprecision(15);
  int N;cin >> N;
  vector<int> v(N);
  vector<int> ans;
  rep(i,N)cin >> v[i];
  perr(n,1,N+1){
    vector<int> m = multiple(n,N);
    for(int &s : m) v[n-1]^=v[s-1];
    if(v[n-1] == 1)ans.push_back(n);
  }
  sort(all(ans));
  cout << ans.size() << endl;
  for(int &s : ans) cout << s << endl;
  return 0;
}


Measured memory_bytes: 3032
#include<bits/stdc++.h>
using namespace std;
int main(void){

  int n;	cin >> n;
  int ans = 0;
  for(int i = 0 ; i <= 2 ; i++){
    if(n % 10 == 1){
		ans += 9 * pow(10 , i);
      	n /= 10;
    }else{
		ans += pow(10, i);
      	n /= 10;
    }
  }
  
  cout << ans << endl;
  
  return 0;
}


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

int main(){
    int N;
    int t[110000], x[110000], y[110000];
    cin >> N;
    t[0] = x[0] = y[0] = 0;
    for(int i = 0; i < N; ++i) cin >>t[i+1] >> x[i+1] >> y[i+1];

    bool can = true;
    for(int i = 0; i < N; ++i){
        int dt = t[i+1] - t[i];
        int dist = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i]);
        if (dt < dist) can = false;
        if(dist % 2 != dt %2) can = false;
    } 
    if(can) cout << "Yes" << endl;
    else cout << "No" <<endl;
}

Measured memory_bytes: 1408
#include <iostream>
#include <climits>
#include <vector>
#include <queue>
#include <functional>

using namespace std;

struct Edge
{
	int to, cost;

	Edge( int t, int c ) : to( t ), cost( c )
	{
		return;
	}
};

int dijkstra1( const vector< vector< Edge > > G, const int s, const int t )
{
	const int V = G.size();

	vector<int> dist( V, INT_MAX );
	dist[s] = 0;

	vector<bool> used( V, false );

	while ( true )
	{
		int v = -1;

		for ( int i = 0; i < V; i++ )
		{
			if ( !used[i] && ( v == -1 || dist[i] < dist[v] ) )
			{
				v = i;
			}
		}

		if ( v == -1 )
		{
			break;
		}

		used[v] = true;

		for ( int i = 0; i < G[v].size(); i++ )
		{
			dist[ G[v][i].to ] = min( dist[ G[v][i].to ], dist[v] + G[v][i].cost );
		}
	}

	return dist[t];
}

int dijkstra2( const vector< vector< Edge > > G, const int s, const int t )
{
	const int V = G.size();

	vector<int> dist( V, INT_MAX );

	priority_queue< pair<int,int>, vector< pair<int,int> >, greater< pair<int,int> > > que;
	que.push( make_pair( 0, s ) );

	while ( !que.empty() )
	{
		int cost = que.top().first;
		int cur = que.top().second;
		que.pop();

		if ( dist[ cur ] < cost )
		{
			continue;
		}

		dist[ cur ] = cost;

		for ( int i = 0; i < G[ cur ].size(); i++ )
		{
			que.push( make_pair( cost + G[ cur ][i].cost, G[ cur ][i].to ) );
		}
	}

	return dist[t];
}

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

	vector< vector< Edge > > G( n );

	for ( int i = 0; i < m; i++ )
	{
		int a, b, c, d;
		char dummy;

		cin >> a >> dummy >> b >> dummy >> c >> dummy >> d;

		a--;
		b--;

		G[a].push_back( Edge( b, c ) );
		G[b].push_back( Edge( a, d ) );
	}

	int s, t, money, price;
	char dummy;
	cin >> s >> dummy >> t >> dummy >> money >> dummy >> price;

	s--;
	t--;

	cout << money - price - dijkstra1( G, s, t ) - dijkstra2( G, t, s ) << endl;

	return 0;
}

Measured memory_bytes: 1200
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REPS(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREPS(i,x) for(int i=((int)(x));i>0;i--)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) (container).begin(), (container).end()
#define RALL(container) (container).rbegin(), (container).rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define pb push_back
#define eb emplace_back
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define __builtin_popcount __builtin_popcountll

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
    os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
    os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const map<S, T> &t) {
    os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}
template<class S, class T> pair<S,T> operator+(const pair<S,T> &s, const pair<S,T> &t){ return pair<S,T>(s.first+t.first, s.second+t.second);}
template<class S, class T> pair<S,T> operator-(const pair<S,T> &s, const pair<S,T> &t){ return pair<S,T>(s.first-t.first, s.second-t.second);}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int T, n, m;

int main(int argc, char *argv[]){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    string s;
    while(cin >> n){
        priority_queue<double, vector<double>, greater<double>> pq;
        REP(i, n){
            double a;
            cin >> a;
            pq.emplace(a);
        }
        while(pq.size() > 1) {
            double a = pq.top(); pq.pop();
            double b = pq.top(); pq.pop();
            pq.emplace((a + b) / 2);
        }
        printf("%.10f\n", pq.top());
    }
    return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        if (S.length()<=K ){
            System.out.println(S);
        }else{
            System.out.println(S.substring(0,K)+"...");
        }


    }

}


Measured memory_bytes: 38608
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
using namespace std;

int main() {
	int A, B, K;
	scanf("%d %d %d", &A, &B, &K);

	int ans = 0, cnt = 0;
	for (int i = min(A,B); cnt < K; i--) {
		if (A%i == 0 && B%i == 0) {
			cnt++;
			ans = i;
		}
	}

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

	return 0;
}

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

using namespace std;

using ll = long long;
using ld = long double;

const double PI = 3.1415926535897932384626433832795;

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

int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
int lcm(int x, int y) { return x / gcd(x, y) * y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }

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

	int n, x;
	cin >> n >> x;
	
	vector<int> a(n);
	for (auto &v : a) {
		cin >> v;
	}

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

	int ans = 0;
	for (int i = 0; i < n - 1; i++) {
		if (x - a[i] >= 0) {
			x -= a[i];
			ans++;
		}
	}
	ans += x == a[n - 1];

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


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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

// DON'T USE THESE MACROS DURING ICPC PRACTICE
#define For(i,n) for (int i=0; i<n; i++)
#define FOR(i,a,b) for (int i=a; i<=b; i++)
#define Down(i,n) for (int i=n-1; i>=0; i--)
#define DOWN(i,a,b) for (int i=b; i>=a; i--)

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef complex<ld> pt;
typedef vector<pt> pol;
typedef vector<int> vi;

const char nl = '\n';
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const ll MOD = 1e9+7;
const ld EPS = 1e-10;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

const int N = 1e5+1;
vector<int> adj[N];
ll dp[N][2];

ll solve(int u, int c, int p) {
	if (dp[u][c] != -1) return dp[u][c];
	ll res = 1;
	for (int v : adj[u]) {
		if (v != p) {
			if (c) {
				res = res * solve(v, c^1, u) % MOD;
            } else {
				res = res * (solve(v, c^1, u) + solve(v, c, u)) % MOD;
            }
		}
	}
	return dp[u][c] = res % MOD;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cout << fixed << setprecision(10);

	memset(dp, -1, sizeof dp);

	int n;
	cin >> n;
	For(i,n-1) {
		int a, b;
		cin >> a >> b;
		adj[a].push_back(b);
		adj[b].push_back(a);
	}
	cout << (solve(1, 0, 0) + solve(1, 1, 0)) % MOD << nl;

	return 0;
}


Measured memory_bytes: 15616
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
    int n,k,i,j,a[10],flag;
    string str;
    fill(a,a+10,0);
    cin>>n>>k;
    for(i=1;i<=k;i++)
    {
        cin>>j;
        a[j]=1;
    }
    for(i=n;;i++)
    {
        flag=0;
        std::string str = std::to_string(i);
        for(j=0;str[j];j++)
        {
            if(a[str[j]-'0']==1)
            {
                flag=1;
                break;
            }
        }

        if(flag==0)
        {
            cout<<str<<endl;
            break;
        }
    }
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <array>
#include <set>
#include <cmath>
#include <string>
#include <queue>
#include <list>
#include <stack>
#include <unordered_map>
#include <algorithm>
#include <numeric>  // std::accumulate(m.begin(), m.end(), 0LL);
#include <functional>
#include <cassert>
#include <cctype>  // std::islower(), std::isupper(), std::tolower, std::toupper
#include <iomanip> // std::std::setprecision(X)
#include <limits>  //std::numeric_limits<int>::max(), min()

typedef long long ll;

int main (void) {
  int N; std::cin >> N;
  std::vector<std::string> B(N);
  for(int i=0; i<N; i++) std::cin >> B[i];

  int M; std::cin >> M;
  std::vector<std::string> R(M);
  for(int i=0; i<M; i++) std::cin >> R[i];

  std::unordered_map<std::string, int> L;
  for(auto&& s : B) {
    if ( L.count(s) == 0 ) L[s] = 1;
    else L[s]++;
  }

  for(auto&& s : R) {
    if ( L.count(s) != 0 ) L[s]--;
  }

  int ans = 0;
  for(auto&& u : L) ans = std::max(ans, u.second);
  std::cout << ans << std::endl;
  return 0;
}


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

using namespace std;

typedef long long ll;

struct Union_Find {
	vector<int> rank, par;
	int independent_tree;
	int N;

	Union_Find() = default;

	Union_Find(int n) {
		N = n;
		for (int i = 0; i < N; i++)rank.push_back(1), par.push_back(i);
		independent_tree = N;
	}

	void setsize(int n) {
		N = n;
		for (int i = 0; i < N; i++)rank.push_back(1), par.push_back(i);
		independent_tree = N;
	}

	int getroot(int X) {
		if (par[X] == X)return X;
		return par[X] = getroot(par[X]);
	}

	bool issame(int A, int B) {
		return getroot(A) == getroot(B);
	}

	void unite(int A, int B) {
		A = getroot(A), B = getroot(B);
		if (A == B)return;
		independent_tree--;
		if (rank[A] > rank[B]) {
			par[B] = A;
		}
		else if (rank[A] == rank[B]) {
			par[B] = A;
			rank[A]++;
		}
		else {
			par[A] = B;
		}
	}

};

int main() {
	
	int N, M;
	cin >> N >> M;
	Union_Find uf(N);
	for (int i = 0; i < M; i++) {
		int a, b;
		cin >> a >> b;
		a--, b--;
		if (!uf.issame(a, b))uf.unite(a, b);
	}
	cout << uf.independent_tree - 1 << endl;

	return 0;
}

Measured memory_bytes: 4296
#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(),v.end()
#define INF INT_MAX;
typedef long long ll;
using namespace std;

int main(){
  int h,w;cin >> h >>w;
  char a[h][w];
  vector<int> horizontal(h,false),vertical(w,false);
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cin >> a[i][j];
      if(a[i][j]=='#'){
        vertical[j] = true;
        horizontal[i] = true;
      }
    }
  }

  for(int i=0;i<h;i++){
    if(horizontal[i]==false) continue;
    for(int j=0;j<w;j++){
      if(vertical[j]==false) continue;
      printf("%c",a[i][j]);
    }
    puts("");
  }

}

Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;

struct Point{
	int x, y, id;
	bool operator<(const Point &o) const {
		return make_pair(x, y) < make_pair(o.x, o.y);
	}
};
bool used[100005];
int R, C, N;
int bound(int x, int y) {
	if (y == 0) return 1;
	if (x == 0) return 2;
	if (y == C) return 3;
	if (x == R) return 4;
	return 0;
}
vector<Point> v[5];
int main() {
	scanf("%d %d %d", &R, &C, &N);
	for (int i = 1; i <= N; i++) {
		int x1, y1, x2, y2; scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
		if (bound(x1, y1) && bound(x2, y2)) {
			v[bound(x1, y1)].push_back({x1, y1, i});
			v[bound(x2, y2)].push_back({x2, y2, i});
		}
	}
	sort(v[1].rbegin(), v[1].rend());
	sort(v[2].begin(), v[2].end());
	sort(v[3].begin(), v[3].end());
	sort(v[4].rbegin(), v[4].rend());
	vector<int> st;
	for (int i = 1; i <= 4; i++)
		for (auto cur : v[i]) {
			int id = cur.id;
			if (used[id]) {
				if (st.size() && st.back() == id) 
					st.pop_back();
				else return !printf("NO");
			}
			else {
				st.push_back(id);
				used[id] = 1;
			}
		}
	puts("YES");
}

Measured memory_bytes: 3820
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <string.h>

using namespace std;

#define MAX_N   (110)
#define MAX_V   (210)

int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
vector<int> G[MAX_V];
int match[MAX_V];
bool used[MAX_V];

int N;

/* uとvを結ぶ辺をグラフに追加する */
void add_edge(int u, int v) {
    G[u].push_back(v);
    G[v].push_back(u);
}

/* 増加パスをDFSで探す */
bool dfs(int v) {
    used[v] = true;
    for (int i = 0; i < G[v].size(); i++) {
        int u = G[v][i], w = match[u];
        if (w < 0 || (!used[w] && dfs(w))) {
            match[v] = u;
            match[u] = v;
            return true;
        }
     }
    return false;
}

/* 二部グラフの最大マッチングを求める */
int bipartite_matching() {
    int res = 0;
    memset(match, -1, sizeof(match));
    for (int i = 0; i < 2 * N; i++) {
        if (match[i] < 0) {
            memset(used, 0, sizeof(used));
            if (dfs(i)) {
                res++;
            }
        }
    }
    return res;
}


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    /* Nの取得 */
    cin >> N;
    
    /* a, bの取得*/
    for (int i = 0; i < N; i++) {
        cin >> a[i] >> b[i];
    }
    
    /* c, dの取得*/
    for (int i = 0; i < N; i++) {
        cin >> c[i] >> d[i];
    }
    
    /* 辺を張っていく */
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
            if ((a[i] < c[j]) && (b[i] < d[j])) {
                add_edge(i, j + N);
            }
        }
    }
    
    /* 結果の出力 */
    cout << bipartite_matching() << endl;
    
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define l long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define M1 1000000007
#define M2 998244353

#define fl(i,a,b)  for(ll i=a;i<b;i++)
#define bfl(i,a,b) for(ll i=b-1;i>=a;i--)
#define f(i,n)     for(int i=0;i<n;i++)
#define bf(i,n)    for(int i=n-1;i>=0;i--)


#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define p2(a, b) cout << a << " " << b << endl
#define p3(a, b, c) cout << a << " " << b << " " << c << endl
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d << endl

#define bn "\n"

//------------------------------------------------------------------------ 
// #define V(a) vector<a>
// #define vt() vector< tuple < int ,int ,int > > ;
// #define vector< int ,int > pv;
// vector< pair <int,int> > vect;


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

ll modI(ll a,ll m);
ll gcd(ll a,ll b);
ll powM(ll x,ll y,ll m);
ll swap(ll a,ll b);

void swap(ll& a,ll& b)
{
    ll tp=a;
    a=b;
    b=tp;
}

ll gcd(ll x,ll y)
{
    if(x==0) return y;
    return gcd(y%x,x);
}

ll powM(ll x,ll y,ll m)
{
    ll ans=1,r=1;
    x%=m;
    while(r>0&&r<=y)
    {
        if(r&y)
        {
            ans*=x;
            ans%=m;
        }
        r<<=1;
        x*=x;
        x%=m;
    }
    return ans;
}
 
ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}

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

// variable = Expression1 ? Expression2 : Expression3
// max = (n1 > n2) ? n1 : n2; 
// (n>m) ? cout<<"True"<<endl:cout<<"false"<<endl ;

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

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

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

// vector< tuple < int ,int ,int > > tv;
// vector< int ,int > pv;



//vector< int > v[N]
const int N=1e5+7;
bool vis[N];
int ans[N];

vector<int> edge[N];
void BFS(int s)
{
   vis[s]=1;
    queue<int> q;
    q.push(s);
    while (!q.empty())
    {
        int v = q.front();
        q.pop();
        for (auto z : edge[v]) 
        {
            if(vis[z]) continue;
            ans[z] = v; vis[z] = 1;
            
            q.push(z);
        
        }
    }
}

int main() {
	
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(0);
	int tt=1;
   // cin>>tt;
	while(tt--)
	{	  
	    int n,m;
	    cin>>n>>m;
	   // vector < int > d(n);
	   // f(i,n)d[i]=0;
	    f(i,m)
	    {
	        int a,b; 
	        cin>>a>>b;
	       
	        edge[a].pb(b);edge[b].pb(a);
	    }
	    BFS(1);
	for(int i=2;i<=n;i++) 
	if(ans[i]==0){ cout<<"No"; return 0; }
	cout<<"Yes"<<bn;
	for(int i=2;i<=n;i++) cout<<ans[i]<<bn;
	
	    
	}
	
	return 0;
}


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

int prime(int x){
  if(x==2) return 1;
  else if(x< 2 || x%2==0) return 0;
  for(int i=3;i<=sqrt(x);i++) if(x%i==0) return 0;
  return 1;
}

int main(){
  int n,m,cnt=0;

  cin>>n;
  for(int i=0;i<n;i++){
    cin>>m;
    if(prime(m)==1) cnt++;
  }
  cout<<cnt<<endl;
  return 0;
}

Measured memory_bytes: 1160
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int win = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'o') win++;
        }

        if(15 - s.length() + win >= 8) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }

    } 
}

Measured memory_bytes: 23764
#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <queue>
#include <cmath>

using namespace std;
using ll = long long;
using ull = unsigned long long;

void ABC139B()
{
	int A, B;
	cin >> A >> B;

	int x = (B - 1) / (A-1);
	if ((x-1) * (A-1) + A < B)
		++x;
	cout << x << endl;
}


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

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

int main(){
  int N,M;
  cin >> N >> M;
  vector<int> s(M),c(M);
  for(int i=0;i<M;i++){
    cin >> s.at(i) >> c.at(i);
  }

  bool a;

  vector<char> num(N+1,' ');
  num.at(0)='0'+1;
  for(int i=0;i<M;i++){
    if(num.at(s.at(i))==' '){
      num.at(s.at(i))='0'+c.at(i);
      a=true;
    }
    else if(num.at(s.at(i))=='0'+c.at(i)){
      a=true;
    }
    else{
      a=false;
      break;
    }
  }

  for(int i=1;i<N+1;i++){
    if(num.at(1)==' '){
      if(N==1){
        num.at(1)='0';
        a=true;
      }
      else{
        num.at(1)='0'+1;
        if(M==0) a=true;
      }
    }
    if(num.at(i)==' ' && i>=2){
      num.at(i)='0';
    }
  }

  if(num.at(1)=='0' && N>=2) a=false;

  if(a){
    for(int i=1;i<N+1;i++){
      cout << num.at(i);
      if(i==N){
        cout << endl;
      }
    }
  }
  else{
    cout << -1 << endl;
  }
}

Measured memory_bytes: 256
#include <stdio.h>

int main()
{
    int A,B,T;
    int total;
    int n;

    scanf("%d %d %d\n",&A,&B,&T);

    total=0;
    n=T/A;
    total=B*n;

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

    return 0;
}

Measured memory_bytes: 128
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		String x = "";
		try {
			x = in.readLine();
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		String[] ab = x.split(" ");
		
		int a = Integer.parseInt(ab[0]);
		int b = Integer.parseInt(ab[1]);
		int c = Integer.parseInt(ab[2]);

		if ((a < b) && (b < c)) System.out.println("Yes");
		else System.out.println("No");
	}
}

Measured memory_bytes: 24300
#include <bits/stdc++.h>
#define rep(i, end) for (long long int i=0; i<end; i++)
#define repp(i, begin, end) for (long long int i=begin; i<end; i+)
#define srt(x) sort((x).begin(), (x).end());
#define rsrt(x) sort((x).rbegin(), (x).rend());
#define deb(x) cout<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<<endl;
#define vdeb(x) {cout<<#x<<" = { "; rep(i, x.size()) cout<<x[i]<<' '; cout <<'}'<<" (L"<<__LINE__<<")"<<endl;}
using namespace std;
using ll = long long int;
using vi = vector<int>;
using vivi = vector<vi>;
using vll = vector<long long int>;
using vllvll = vector<vll>;
using vs = vector<string>;
ll sm(vll x) {ll sum=0; rep(i, x.size()) sum+=x[i]; return sum;}
//=======================================================================================================

int main()
{
    ll k, x;
    cin >> k >> x;
    ll begin = x - k + 1;
    ll end = x + k - 1;
    for(ll i=begin; i<=end; ++i)
        cout << i << " ";
    cout << endl;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(void)

{
  int a , b , c ,d;
  scanf("%d %d",&a,&b);
  
  c = a % 2;
  d = b % 2;
  if (c == 0) 
  {
  	printf("Even");
  } else if (d == 0) 
  	{
  printf("Even");
  	} else {
  	printf("Odd");
  	}

  return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
#define x_ real()
#define y_ imag()
#define cross(a, b) (conj(a)*(b)).imag()
#define dot(a, b) (conj(a)*(b)).real()
#define PI acos(-1)
#define F first
#define S second
#define fastIO ios_base::sync_with_stdio(false), cin.tie(NULL)
#define fileIO freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ld> point;
typedef tuple<int, int, int> line;
typedef vector<point> polygon;
typedef pair<double, double> pd;
pair<int, int> dirs[] = { {1, 2}, {-1, 2}, {2, 1}, {2, -1}, {-2, 1}, {-2, -1}, {1, -2}, {-1, -2} };
const ll mod = 1e9 + 7;
const ll N = 2e5 + 7;
ll fact[N];
ll inv[N];


ll add(ll a, ll b) {
	return ((a%mod) + (b%mod))%mod;
}


ll mult(ll a, ll b) {
	return ((a%mod) * (b%mod))%mod;
}


ll sub(ll a, ll b) {
	return ((a%mod) - (b%mod) + mod)%mod;
}

ll fp(ll b, ll e) {
	if (!e)
		return 1;
	ll ans = fp(b, e/2);
	ans = mult(ans, ans);
	if (e&1)
		ans = mult(ans, b);
	return ans;
}


void pre() {
	fact[0] = inv[0] = 1;
	for (int i = 1; i <= N; i++) {
		fact[i] = mult(i, fact[i-1]);
		inv[i] = fp(fact[i], mod-2);
	}
}

ll ncr(ll n, ll r) {
	ll ans = 1;
	for (ll i = n; i >= n-r+1; i--) {
		ans = mult(ans, i);
	}
	return mult(ans, inv[r]);
}


int main() {
	fastIO;
	pre();
	ll n, a, b;
	cin >> n >> a >> b;
	ll ans = sub(fp(2, n), add(add(ncr(n, a), ncr(n, b)), 1));
	cout << ans;

}



Measured memory_bytes: 3456
N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
num = 1000000007

step = [-1]*(N+1)
step[0] = 1
for i in a:
    step[i] = 0

if step[1] == -1:
    step[1] = 1
for i in range(2, N+1):
    if step[i] == 0:
        continue
    else:
        step[i] = step[i-2]+step[i-1]
print(step[-1]%num)

Measured memory_bytes: 460020
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,k;
	cin>>n>>k;
	int count=0;
	for(int i=0;i<n;i++)
	{
		int x;
		cin>>x;
		if(x>=k)
			count++;
	}
	cout<<count;
	return 0;
}

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

#define INF 2147483647

vector<int> value;
int N;

void update(int i, int x) {
  i += N-1;
  value[i] = x;
  while (i>0) {
    i = (i-1)/2;
    value[i] = min(value[i * 2 + 1],value[i * 2 + 2]);
  }
}

int query(int a, int b, int k, int l, int r) {
  if (r <= a || b <= l) return INF;
  if (a <= l && r <= b) return value[k];
  else {
    int c1 = query(a,b, 2*k+1,l,(l + r)/2);
    int c2 = query(a,b, 2*k+2,(l + r)/2,r);
    return min(c1, c2);
  }
}

int main(void) {
  int n, q;
  cin >> n >> q;
  N = 1;
  while (N < n) N *= 2;
  value = vector<int>(2 * N - 1, INF);

  for (int j=0; j<q; j++) {
    int c;
    cin >> c;
    if (c==0) {
      // update(i, x)
      int i, x;
      cin >> i >> x;
      update(i, x);
    } else {
      // find(s, t)
      int s, t;
      cin >> s >> t;
      cout << query(s,t+1, 0, 0, N) << endl;
    }
  }
  return 0;
}


Measured memory_bytes: 3828
use proconio::{input, fastout};
use proconio::marker::{Chars};
use proconio::marker::Usize1;
use std::cmp::*;

macro_rules! debug {
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

#[fastout]
fn main() {
    input!{
        r: usize,
        g: usize,
        b: usize,
    }
    if (100*r+10*g+b)%4==0 {
        println!("YES");
    } else {
        println!("NO");
    }
}


Measured memory_bytes: 2120
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

#include "bits/stdc++.h"

#define REP(i,x,y) for(int i=(x);i<(y);i++)
#define RREP(i,x,y) for(int i=(y)-1;i>=(x);i--)
#define all(x) (x).begin(),(x).end()
//#define int long long

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();}

#define dump(x)  cerr << #x << " = " << (x) << endl
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl

typedef long long ll;

const ll MOD = 1e9 + 7;

class FPlayingTagOnTree {
    vector<vector<int>> edges_;
    int u_, v_;

    bool getRouteFromVToU(const int previous, const int current, vector<int>& route) {
        route.emplace_back(current);
        if (current == u_) return true;
        for (const auto& next : edges_[current]) {
            if (next == previous) continue;
            bool correct = getRouteFromVToU(current, next, route);
            if (correct) {
                return true;
            }
            route.pop_back();
        }
        return false;
    }

    int getDepth(const int previous, const int current, const int depth) {
        int maxDepth = depth;
        for (const auto& next : edges_[current]) {
            if (next == previous) continue;
            int candidate = getDepth(current, next, depth+1);
            maxDepth = max(maxDepth, candidate);
        }
        return maxDepth;
    }

public:
	void solve(std::istream& in, std::ostream& out) {
	    int N;
	    in >> N >> u_ >> v_;
	    vector<int> A(N), B(N);
	    REP(i,1,N) in >> A[i] >> B[i];
        edges_ = vector<vector<int>>(N+1);
	    REP(i,1,N) {
            edges_[A[i]].emplace_back(B[i]);
            edges_[B[i]].emplace_back(A[i]);
	    }
	    vector<int> route;
	    getRouteFromVToU(-1, v_, route);
//	    REP(i,0,route.size()) debug(route[i]);
	    int depth = getDepth(route[(route.size()+1) / 2 - 1], route[(route.size()+1) / 2], (route.size()+1) / 2);
//	    debug(depth);
	    out << depth - 1 << "\n";
	}
};


signed main() {
	FPlayingTagOnTree solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 8960
#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <cmath>
#include <vector>
#include <numeric>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>

using ll = long long int;
using ul = unsigned long long int;
const ll LL_MAX (1LL<<60);
const ll MOD (1000000007);

#define rep(i,s,e) for(ll i=(s); i<(e); i++) 

using namespace std;

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

    ll n;
    cin >> n;
    ll p = n / 15;

    cout << n * 800 - p * 200 << endl;

    return 0;
}


Measured memory_bytes: 256