akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef pair<int,int>P;
typedef long long ll;

struct st{
	ll a,b,c;
};

bool operator<(st a,st b){
	return a.c>b.c;
}
vector<st>E[60];
ll dp[60][6000];
ll c[60],d[60];

int main(){
	int n,m,s;cin>>n>>m>>s;s=min(s,5500);
	rep(i,m){
		int a,b,c,d;scanf("%d%d%d%d",&a,&b,&c,&d);a--;b--;
		E[a].push_back({b,c,d});
		E[b].push_back({a,c,d});
	}
	rep(i,n)scanf("%lld%lld",&c[i],&d[i]);
	memset(dp,0x3f,sizeof(dp));
	priority_queue<st>que;
	dp[0][s]=0;
	que.push({0,s,0});
	while(!que.empty()){
		st p=que.top();que.pop();
		if(dp[p.a][p.b]!=p.c)continue;
		if(p.b+c[p.a]<5500){
			if(dp[p.a][p.b+c[p.a]]>p.c+d[p.a]){
				dp[p.a][p.b+c[p.a]]=p.c+d[p.a];
				que.push({p.a,p.b+c[p.a],p.c+d[p.a]});
			}
		}
		for(auto u:E[p.a]){
			if(p.b-u.b>=0){
				if(dp[u.a][p.b-u.b]>p.c+u.c){
					dp[u.a][p.b-u.b]=p.c+u.c;
					que.push({u.a,p.b-u.b,p.c+u.c});
				}
			}
		}
	}
	for(int i=1;i<n;i++){
		cout<<*min_element(dp[i],dp[i]+5500)<<endl;
	}
}

Measured memory_bytes: 12332
#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;

int main(){
	int n,m;
	cin>>n>>m;
	char a[n][m];
	int b[n][m];
	for(int i=0;i<n;i++)
		for(int j=0;j<m;j++)
			cin>>a[i][j];
	int flag = 1;
	for(int i=0;i<n;i++){
		if(a[i][0] == '#')
			flag = 0;
		b[i][0] = flag;
	}
	flag = 1;
	for(int j=0;j<m;j++){
		if(a[0][j] == '#')
			flag = 0;
		b[0][j] = flag;
	}
	for(int i=1;i<n;i++)
		for(int j=1;j<m;j++)
			if(a[i][j] == '#')
				b[i][j] = 0;
			else
				b[i][j] = ((b[i][j-1]%mod)+(b[i-1][j]%mod))%mod;
	cout<<b[n-1][m-1];
}

Measured memory_bytes: 5120
import math

M = 2019

S = input().strip()

data = []
l = len(S)
d = 1
for i in range(l):
	data.append((d * int(S[l - i - 1]) % M))
	d = (d * 10 % M)

table = [0] * M
table[0] = 1

count = 0
n = 0
for rem in data:
	n = (n + rem) % M
	count += table[n]
	table[n] += 1

print(count)


Measured memory_bytes: 16792
dp=[0]*50
dp[0]=1
dp[1]=1
N = int(input())

def makefib(n):
    if n == 0 or n == 1:
        return 1
    elif dp[n] == 0:
        dp[n] = makefib(n-1) + makefib(n-2)
        return dp[n]
    else:
        return dp[n]
print(makefib(N))


Measured memory_bytes: 5600
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  string s;
  cin>>n>>s;
  int l=(int)s.size();
  if(l>n)
  {
    for(int i=0;i<n;i++)
      cout<<s[i];
    cout<<"...";
  }
  else
    cout<<s;
  return 0;
}


Measured memory_bytes: 3608
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i ,n) for(int i = 0; i < (int)(n); i++)
#define pb push_back
typedef vector<int>vint;
typedef vector<ll>vll;
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}
int main()
{
    string s;
    cin >> s;
    
    set<char> atcg;
    atcg.insert('A');
    atcg.insert('T');
    atcg.insert('C');
    atcg.insert('G');

    int ans = 0;
    int idx = 0;
    REP(i,s.size()){
        if( 0 != atcg.count(s[i])){
            idx++;
        }else{
            ans = max(ans,idx);
            idx = 0;
        }
    }
    ans = max(ans,idx);
    cout << ans << endl;
}

Measured memory_bytes: 3624
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7 
#mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

N, M, Q = MAP()
LR = [LIST() for _ in range(M)]
pq = [LIST() for _ in range(Q)]

x = [[0]*(N+1) for _ in range(N+1)]

for L, R in LR:
	x[L][R] += 1

for l in range(N+1):
	x[l] = list(accumulate(x[l]))

for l in range(1, N+1):
	for r in range(N+1):
		x[l][r] += x[l-1][r]
		
for p, q in pq:
	print(x[q][q] - x[q][p-1] - x[p-1][q] + x[p-1][p-1])




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

#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)
#define REP(i, n) for(int i = 0;i < n;++i)
#define REPR(i, n) for(int i = n;i >= 0;--i)
#define FOR(i, a, b) for(int i = a;i < b;++i)
#define ALL(x) (x).begin(),(x).end()
#define INF 999999999
using namespace std;
#define lint long long

int main()
{
  int n; cin >> n;
  bool flag = false;
  char s[n]; REP(i,n)
  {
  	cin >> s[i];
  }
  if(n%2 == 1){
    
  }else{
  	REP(i,n/2){
    	if(s[i] == s[i+n/2]) flag = true;
      	else {
          flag = false;
          break;
        }
  	}
  }
  if(flag) cout << "Yes";
  else cout << "No";
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n)for(int i=0;i<(n);i++)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
using ll = long long;
using P = pair<int, int>;

int main(){
    string s;
    cin >> s;
    bool isOK = true;
    if(s[0] != 'A') isOK = false;
    int cnt = 0;
    for(int i = 2; i < s.size()-1; i++){
        if(s[i] == 'C')cnt++;
    }
    if(cnt != 1) isOK = false;
    cnt = 0;
    for(int i = 0; i < s.size(); i++){
        if(s[i] >= 'a' && s[i] <= 'z') cnt++;
    }
    if(cnt + 2 != s.size()) isOK = false;
    if(isOK) cout << "AC" << endl;
    else cout << "WA" << endl;
}

Measured memory_bytes: 3584
#include <iostream>
#include <string>//
#include <vector>//
#include <map>
#include <cstdlib>
#include <numeric>
#include <algorithm>//ソート等に使用
#include <iomanip>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <thread>///////////////////
#include <queue>//幅優先等のキュー
#include <stack>
#include <bitset>

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

#define MOD 1000000007
//#define MOD 998244353
//#define MAX 

using namespace std;

using ll = long long int;
using ld = long double;
using std::swap;

vector<int> v;
vector<long long int> vll;
//vector<vector<int>> vec(50, vector<int>(4, 0));
vector<vector<int>> vv;
vector<char> vc;
vector<string> vs;




int main() {
	int N;
	cin >> N;
	v.resize(10001);
	rep(x, 1, pow(10001, 0.5) ) {
		rep(y, 1, pow(10001, 0.5) ) {
			rep(z, 1, pow(10001, 0.5) ) {
				int ans = x*x + y * y + z * z + x * y + y * z + z * x ;
				if (ans <= 10000) ++v[ans];
			}
		}
	}
	rep(i, 1, N)cout << v[i] << '\n';
	return 0;
}

Measured memory_bytes: 3652
#include<algorithm>
#include<iostream>
#include<cstring>
#include<string>
#include<vector>
#include<cstdio>
#include<cmath>
#include<set>
#include<map>
using namespace std;
typedef long long ll;
const int MAXN=1e5+5;
int read()
{
    int s=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){s=s*10+ch-'0';ch=getchar();}
    return s*f;
}
struct node
{
    int x,y;
}arr[10];
double dis(node a,node b)
{
    return sqrt((a.x-b.x)*1.0*(a.x-b.x)+(a.y-b.y)*1.0*(a.y-b.y));
}
int brr[10];
double crr[10][10];
int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>arr[i].x>>arr[i].y;
        brr[i]=i;
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=n;j++)
        {
            crr[i][j]=dis(arr[i],arr[j]);
        }
    }
    double ans=0;
    int num=0;
    do{
        num++;
        for(int i=2;i<=n;i++)
        {
            ans+=crr[brr[i-1]][brr[i]];
        }
    }while(next_permutation(brr+1,brr+n+1));
    printf("%f\n",ans/num);
    return 0;
}


Measured memory_bytes: 256
#include <iostream>

using namespace std;

int main() {
  long long int a, b;
  int k;
  cin >> a >> b >> k;
  
  for (int i = 0; i < k; i++) {
    if (i % 2 == 0) {
      if (a % 2 == 1) {
        a--;
      }
      a/=2;
      b+=a;
    } else {
      if (b % 2 == 1) {
        b--;
      }
      b/=2;
      a+=b;
    }
  }
  
  cout << a << ' ' << b << endl;
  
  return 0;
}

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

int main(){
    int n;
    cin >>n;
    string str;
    cin >> str;
    int l = str.length();
    if(l<=n)
    	cout << str << endl;
    else
    {
    	for(int i=0;i<n;i++)
    		cout << str[i];
    	cout << "...";
    }
}

Measured memory_bytes: 3624
#include<bits/stdc++.h>
using namespace std;
double h[1000];
int main() {
    double n,t,a;
    cin>>n;
    cin>>t>>a;
    cin>>h[0];
    double m;
    double s[1000];
    s[0]=abs(a-(t-h[0]*0.006));
    m=s[0];
    for(int i=1;i<n;i++){
        cin>>h[i];
        s[i]=abs(a-(t-h[i]*0.006));
        m=min(m,s[i]);
    }
    for(int k=0;k<n;k++){
        if(m==s[k]){
            cout<<k+1<<endl;
        }
    }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define f first
#define s second
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define mt make_tuple
#define MOD 1000000007
#define fo(i,a,b) for(i=a;i<b;i++)
#define foe(i,a,b) for(i=a;i<=b;i++)
#define all(x) x.begin(), x.end()
#define vi vector<int>
#define vl vector <long long int>
#define pii pair <int,int>
#define pll pair <long long int, long long int>
#define vpii vector< pair<int,int> >
#define vpll vector < pair <long long int,long long int> >
#define boost ios::sync_with_stdio(false); cin.tie(0)
using namespace std;
const int inf = 1e9 + 5;
const ll inf64 = 1e18 + 5;
int main()
{
	boost;
	int n, a;
	cin >> n >> a;
	cout << (n % a ? n / a + 1 : n / a);
}


Measured memory_bytes: 256
main = do
  li <- getLine
  let [h,w] = map read $ words li
  let ans = compute h w
  print ans

{-
hかwが1しかなかったら動けない。そうでないときは、
1行目と2行目の行ける場所を合わせると1行ぜんぶ分になる。列が奇数でも同じ。
だから少なくともいずれかが偶数のときは、h*w/2でよい。
両方奇数のときは、最後は半分より大きい方になる。(+1して/2すれば偶数でも同じだが)
-}

compute :: Int -> Int -> Int
compute 1 _ = 1
compute _ 1 = 1
compute h w
  | even h = h `div` 2 * w
  | even w = w `div` 2 * h
  | True   = h `div` 2 * w + (succ w) `div` 2


Measured memory_bytes: 508
#include<stdio.h>

int main(){

int a[3];
int i,j;
int x;

scanf("%d",&a[0]);
scanf("%d",&a[1]);
scanf("%d",&a[2]);

for(i=0;i<3;i++){
for(j=2;j>i;j--){
if(a[j]<a[j-1]){
x=a[j];
a[j]=a[j-1];
a[j-1]=x;
	}
	}
	}

printf("%d %d %d\n",a[0],a[1],a[2]);

return 0;
	}

Measured memory_bytes: 596
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define pf push_front

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define mp make_pair
#define fi first
#define se second
typedef pair<int, int> pint;
#define All(s) s.begin(), s.end()
#define rAll(s) s.rbegin(), s.rend()
#define REP(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
double pi = 3.141592653589793;
ll mod = 1000000007;
ll INF = 1000000001;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;

int main()
{
    string s;
    cin >> s;
    rep(i, s.size())
    {
        s[i] = 'x';
    }
    cout << s << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
string s;
int u[26];
int main(){
	cin >> s;
	for(char c: s) u[c-'a']++;
	rep(i,26) if(!u[i]) return 0*printf("%c\n", i+'a');
	puts("None");
}

Measured memory_bytes: 512
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <tuple>
#include <cmath>
#include <iomanip>
#include <map>
#include <stdio.h>
#include <cstring> //memset(dp,0,sizeof(dp))
#include <functional> //operator[]
#define ll long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define fi first
#define se second
#define pb push_back
#define ALL(a) (a).begin(),(a).end()
using namespace std;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;

signed main(){
    int n; cin >> n;
    int ans[n];
    rep(i,n) ans[i]=0;
    rep(i,n-1){
        int a; cin >> a;
        a--;
        ans[a]++;
    }
    rep(i,n) cout << ans[i] << endl;
}



Measured memory_bytes: 4352
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
 


public class Main {
	private static Scanner sc = new Scanner(System.in);
	//result = Math.pow(num1, num3)
	//StringBuffer str = new StringBuffer(hoge1);
	//String hoge2 = str.reverse().toString();
	//map.containsKey(A)

	//Map<String, Integer> map = new HashMap<String, Integer>(n);
	/*for ( キーのデータ型 key : マップの名前.keySet() ) {
		データのデータ型 data = マップの名前.get( key );
		
		// keyやdataを使った処理;
	}*/
	//int i = Integer.parseInt(s);
	//Queue<String> qq=new ArrayDeque<>(); //add,poll,peek
	//Deque<String> qq=new ArrayDeque<>();//push,pop,peek
	//ArrayList<String> cc = new ArrayList<>(n);
	//Collections.sort(list);
	//Array.sort(list);   cc.contains(tmp)
	//Arrays.asList(c).contains("a")
	//list.set(1,"walk");//1 1 2 3 5
	//static long mod =1000000007;
	//static 	ArrayList<Integer> cc = new ArrayList<>(100);
	//for(int i=0;i<N;i++) {}
	
	
	
	
	
	public static void main(String[] args) {
		int N=sc.nextInt();
		StringBuffer str = new StringBuffer();
		int v[]=new int[N];
		for(int i=0;i<N;i++) {
			v[i]=sc.nextInt();
		}
		
		int t=N;
		while(t>0) {
			System.out.print(v[t-1]+" ");
			t-=2;
		}
		if(N%2==0)t=1;
		else t=2;
		while(t<N) {
			System.out.print(v[t-1]+" ");
			t+=2;
		}
		
		
		
		
	}
	
	
	
	
	
	

	


	
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p() {System.out.println();};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static String nextPermutation(String s) {
		ArrayList<Character> list=new ArrayList<>();
		for(int i=0;i<s.length();i++) {
			list.add(s.charAt(i));
		}
		int pivotPos=-1;
		char pivot=0;
		for(int i=list.size()-2;i>=0;i--) {
			if(list.get(i)<list.get(i+1)) {
				pivotPos=i;
				pivot=list.get(i);
				break;
			}
		}
		if(pivotPos==-1&&pivot==0) {
			return "Final";
		}
		int L=pivotPos+1,R=list.size()-1;
		
		
		
		int minPos=-1;
		char min =Character.MAX_VALUE;
		
		for(int i=R;i>=L;i--) {
			if(pivot<list.get(i)) {
				if(list.get(i)<min) {
					min=list.get(i);
					minPos=i;
				}
			}
		}
		
		Collections.swap(list, pivotPos, minPos);
		Collections.sort(list.subList(L, R+1));
		
		
		StringBuilder sb=new StringBuilder();
		for(int i=0;i<list.size();i++) {
			sb.append(list.get(i));
		}
		return sb.toString();
	}
}
	


Measured memory_bytes: 91944
#include <cstdio>
int main(){
	int L,min=233,ans=0; scanf("%d",&L);
	for (int i=0;i<20;i++) if ((1<<i)&L) min=i,ans++;
	ans+=min*2; if (min==19) ans--;
	printf("20 %d\n",ans);
	for (int i=1;i<=min;i++) printf("%d %d %d\n%d %d %d\n",i,i+1,0,i,i+1,1<<i-1);
	int x=min==19?524288:0;
	for (int i=0;i<19;i++) if (1<<i&L) printf("%d %d %d\n",i+1,20,x),x+=1<<i;
}

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


int main()
{
    int n,k;
    std::cin >> n >> k;
    int ans = 0;
    switch (n+k) {
        case 5: ans = 1; break;
        case 4: ans = 2; break;
        case 3: ans = 3; break;
    }

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


Measured memory_bytes: 256
#include<iostream>
#include<string>

using namespace std;

int n, x, arr[100000], di[100000], tmp;

int gcd(int a, int b) {
    int temp;
    while (a != 0) {
        temp = a;
        a = b%a;
        b = temp;
    }
    return b;
}

int main() {
    cin >> n >> x;
    for(int i = 0; i < n; i++) cin >> arr[i];
    for(int i = 0; i < n; i++) di[i] = abs(arr[i]-x);
    tmp = di[0];
    for(int i = 1; i < n; i++) {
        tmp = gcd(tmp, di[i]);
    }
    cout << tmp;
    return 0;
}

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

int main(void){
  SPEEDUP
  cout << setprecision(15);
  int N;cin >> N;
  int ans = 0;
  rep(i,N){
    int l,r;cin >> l >> r;
    ans += r+1 - l;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
<?php
fscanf(STDIN, '%d %d', $x, $y);
$ans = ($x == 1 && $y == 1) ?
        calc($x) + calc($y) + 400000 : calc($x) + calc($y);
echo $ans, PHP_EOL;

function calc($rank) {
    $prize = 0;
    if($rank == 3) {
        $prize = '100000';
    } elseif($rank == 2) {
        $prize = '200000';
    } elseif($rank == 1) {
        $prize = '300000';
    }
    return $prize;
}

Measured memory_bytes: 4856
(h, w) = map(int, input().split())
s = [input() for _ in range(h)]


def is_valid(s, i, j):
    if 0 > i or i >= len(s):
        return False
    if 0 > j or j >= len(s[0]):
        return False
    return True


def check(s, i, j):
    if not is_valid(s, i, j):
        return True
    if '.' == s[i][j]:
        return True

    if is_valid(s, i - 1, j + 0):
        if '#' == s[i - 1][j + 0]:
            return True
    if is_valid(s, i + 0, j - 1):
        if '#' == s[i + 0][j - 1]:
            return True
    if is_valid(s, i + 1, j + 0):
        if '#' == s[i + 1][j + 0]:
            return True
    if is_valid(s, i + 0, j + 1):
        if '#' == s[i + 0][j + 1]:
            return True
    return False


for i in range(h):
    for j in range(w):
        if not check(s, i, j):
            print("No")
            exit(0)
print("Yes")


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

int main() {
  string s;
  cin >> s;
  int n = s.size();
  bool found = false;
  bool ok = false;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'C') found = true;
    if (s[i] == 'F' && found) ok = true;
  }
  if (ok) puts("Yes");
  else puts("No");
  return 0;
}


Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(final String[] args) {
        final FastScanner scanner = new FastScanner(System.in);
        final long a = scanner.nextLong();
        final long b = scanner.nextLong();
        final long n = scanner.nextLong();

        if (b > n) {
            System.out.println(a * n / b);
        } else {
            final long div = n / b * b - 1;
            System.out.println(a * div / b - a * (div / b));
        }
    }

    private static class FastScanner {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        FastScanner(final InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        String next() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (final IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        String nextLine() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    return reader.readLine();
                } catch (final IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken("\n");
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}


Measured memory_bytes: 32632
import java.io.*;
import java.lang.reflect.Array;
import java.math.*;
import java.text.DecimalFormat;
import java.util.*;




public class Main {
    private static final int mod = 1000000007;


    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt(),l = io.getNextInt(),r = io.getNextInt();
        int len = Math.abs(r - l) - 1;
        if (len%2 == 1) io.println("Alice");
        else io.println("Borys");
        io.close();
    }
}



class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public boolean hasMore() throws IOException{
        if(st != null && st.hasMoreTokens()) return true;
        if(br != null && br.ready()) return true;
        return false;
    }
    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine().trim();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
    public void outputArr(Object [] A) throws IOException{
        int L = A.length;
        for (int i = 0;i < L;i++) {
            if(i > 0) writer.print(" ");
            writer.print(A[i]);
        }
        writer.print("\n");
    }
}


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

using namespace std;

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

typedef long long ll;
typedef unsigned long long ull;

const string YES = "Yes", NO = "No";

int main() {
    string result;
    int N;
    cin >> N;
    int t[N + 1], x[N + 1], y[N + 1];
    t[0] = 0, x[0] = 0, y[0] = 0;
    REP(i, 1, N + 1) { cin >> t[i] >> x[i] >> y[i]; }
    int time = 0, xdis = 0, ydis = 0, mandis = 0;
    rep(i, N) {
        time = t[i + 1] - t[i];
        xdis = x[i + 1] - x[i];
        ydis = y[i + 1] - y[i];
        mandis = abs(xdis) + abs(ydis);
        if (time < mandis) {
            result = NO;
            break;
        } else {
            if (time % 2 == 0) {
                if (mandis % 2 == 0) {
                    result = YES;
                } else {
                    result = NO;
                    break;
                }
            } else {
                if (mandis % 2 == 1) {
                    result = YES;
                } else {
                    result = NO;
                    break;
                }
            }
        }
    }
    cout << result << endl;
    return 0;
}

Measured memory_bytes: 1408
#include <bits/stdc++.h>
struct fastio{fastio(){std::ios::sync_with_stdio(false);std::cin.tie(nullptr);}}_fast_io_;
template<class T> bool chmin (T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; }
template<class T> bool chmax (T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }

int main() {
	long long k;
	std::cin >> k;
	if (k % 2 == 0 or k % 5 == 0) {
		std::cout << -1 << '\n';
		return 0;
	}
	
	int x = (7 % k);
	int ans = 1;
	while (x) {
		x = (x * 10 + 7) % k;
		ans++;
	}
	
	std::cout << ans << '\n';
	
	return 0;
}

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

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

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

    long cnt = 0;

    REP(i, n) {
        cin >> a;
        if (a%2 == 1)   cnt++;
    }

    if (cnt%2 == 0)     cout << "YES" << endl;
    else                cout << "NO" << endl;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProblemR
{
    class Program
    {
        static void Main(string[] args)
        {
            var read = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var N = read[0];
            var M = read[1];

            var xs = new int[M];
            var ys = new int[M];

            for (int i = 0; i < M; i++)
            {
                read = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
                xs[i] = read[0];
                ys[i] = read[1];
            }
            var sortedInd = ys.Select((y, i) => new { ind = i, point = y }).OrderBy(x => x.point).Select(x => x.ind);
            xs = sortedInd.Select(i => xs[i]).ToArray();
            ys = sortedInd.Select(i => ys[i]).ToArray();

            var current = 1;
            var res = 0;
            for (int i = 0; i < xs.Length; i++)
            {
                if(xs[i] >= current)
                {
                    current = ys[i];
                    res++;
                }
            }
            Console.WriteLine(res);
        }
    }
}


Measured memory_bytes: 53636
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <fstream>

using namespace std;
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REPR(i,n) for(int i=(n)-1;i>=0;i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase( unique(ALL(v)) , v.end());

typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<bool> vb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 29);
const ll LINF = 1e18;
const double PI = acos(-1);

template<typename T>vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T, typename... Ts>auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); }
template<typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value != 0>::type
fill_v(U& u, const V... v) { u = U(v...); }
template<typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value == 0>::type
fill_v(U& u, const V... v) { for (auto& e : u) fill_v<T>(e, v...); }
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; }

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	cin >> N;
	vi A(N);
	REP(i, N)cin >> A[i];
	double sum = 0;
	REP(i, N) {
		sum += 1.0/A[i];
	}
	double ans = 1.0 / sum;
	printf("%.7f\n", ans);
	return 0;
}


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

int main() {
  int A, B, C, D;
  cin >> A >> B >> C >> D;
  while (true) {
    C -= B;
    if (C < 1) {
      cout << "Yes" << endl;
      break;
    }
    A -= D;
    if (A < 1) {
      cout << "No" << endl;
      break;
    }
  }
}

Measured memory_bytes: 3636
package main

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

type Num struct {
	X int
	Y int
	H int
}

func main() {
	s := IOInitialize()
	s.Buffer([]byte{}, math.MaxInt64)
	N := Int(s)
	nums := scanNums(s, N)
	resX := 0
	resY := 0
	resH := 0
	hasRes := false
	minH := 10000000000
	for _, num := range nums {
		if num.H < minH {
			minH = num.H
		}
	}
	for cy := 0; cy < 101; cy++ {
		for cx := 0; cx < 101; cx++ {
			for h := minH + 1; h < minH+203; h++ {
				for i, num := range nums {
					tH := h - abs(num.X-cx) - abs(num.Y-cy)
					if tH == num.H || ((tH < 0) && num.H == 0) {
						if tH >= 0 {
							resH = abs(num.X-cx) + abs(num.Y-cy) + num.H
						}
						if i == len(nums)-1 {
							hasRes = true
							resX = cx
							resY = cy
						}
					} else {
						break
					}
				}
				if hasRes {
					break
				}
			}
		}

		if hasRes {
			break
		}
	}
	fmt.Println(resX, resY, resH)
	//cx := 0
	//cy := 0
	/*
		for _, num := range nums {
			sumX += num.X
			sumY += num.Y
		}
		l := len(nums)
		cX := sumX / l
		cY := sumY / l
		num := nums[0]
		x0 := num.X
		y0 := num.Y
		h0 := num.H
		cH := abs(x0-cX) + abs(y0-cY) + h0
		fmt.Println(cX)
		fmt.Println(cY)
		fmt.Println(cH)
	*/
}

func abs(a int) int {
	return int(math.Abs(float64(a)))
}

func IOInitialize() *bufio.Scanner {
	s := bufio.NewScanner(os.Stdin)
	s.Split(bufio.ScanWords)
	return s
}

func Int(s *bufio.Scanner) int {
	if !s.Scan() {
		panic("scan error")
	}

	value, err := strconv.Atoi(s.Text())
	if err != nil {
		panic("text to int error")
	}
	return value
}

func String(s *bufio.Scanner) string {
	if !s.Scan() {
		panic("scan error")
	}

	return s.Text()
}

func scanNums(s *bufio.Scanner, len int) (nums []Num) {
	for i := 0; i < len; i++ {
		x := Int(s)
		y := Int(s)
		h := Int(s)
		nums = append(nums, Num{X: x, Y: y, H: h})
	}
	return
}

func scanstrings(s *bufio.Scanner, len int) (strs []string) {
	for i := 0; i < len; i++ {
		str := String(s)
		strs = append(strs, str)
	}
	return
}

/*
5
2 3 5
2 1 5
1 2 5
3 2 5
50 50 0
*/


Measured memory_bytes: 640
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int h = sc.nextInt();
        int w = sc.nextInt();
        if (h == 1 || w == 1) {
            System.out.println(1);
            return;
        }
        long ans = 0;
        if (h % 2 == 0 || w % 2 == 0) {
            ans = (long) h * w / 2;
        } else {
            ans = (long) h * w / 2 + 1;
        }

        System.out.println(ans);
    }

}


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

#define si(a) scanf("%d",&a)
#define sl(a) scanf("%lld",&a)
#define sd(a) scanf("%lf",&a)
#define sc(a) scahf("%c",&a);
#define ss(a) scanf("%s",a)
#define pi(a) printf("%d\n",a)
#define pl(a) printf("%lld\n",a)
#define pc(a) putchar(a)
#define ms(a) memset(a,0,sizeof(a))
#define repi(i, a, b) for(register int i=a;i<=b;++i)
#define repd(i, a, b) for(register int i=a;i>=b;--i)
#define reps(s) for(register int i=head[s];i;i=Next[i])
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define pii pair<int,int>
#define pll pair<long,long>
#define pil pair<int,long>
#define pli pair<long,int>
#define mii unordered_map<int,int>
#define msi unordered_map<string,int>
#define lowbit(x) ((x)&(-(x)))
#define ce(i, r) i==r?'\n':' '
#define pb push_back
#define fi first
#define se second
#define INF 0x3f3f3f3f
#define pr(x) cout<<#x<<": "<<x<<endl
using namespace std;

inline int qr() {
    int f = 0, fu = 1;
    char c = getchar();
    while (c < '0' || c > '9') {
        if (c == '-')fu = -1;
        c = getchar();
    }
    while (c >= '0' && c <= '9') {
        f = (f << 3) + (f << 1) + c - 48;
        c = getchar();
    }
    return f * fu;
}
const int MOD=1e9+7;
int main(){
    int n=qr(),k=qr();
    ll ans=0;
    repi(i,k,n+1)ans=(ans+(1ll*(n-i+1)*i)%MOD+1)%MOD;
    pl(ans);
    return 0;
}

Measured memory_bytes: 3696
#include <stdio.h>
#define MAX 8
#define ON 1
#define OFF -1
#define TRUE 2
#define FALSE 3
//recursive
int x[MAX];//yoko,
int y[MAX];//tate
int r[2*MAX-1],l[2*MAX-1],c[MAX][MAX];
void set(){
  int i,j;
  for(i=0;i<MAX;i++){
    y[i]=x[i]=ON;
    for(j=0;j<MAX;j++)c[i][j]=FALSE;
  }
  for(i=0;i<MAX*2-1;i++)
    l[i]=r[i]=ON;
}
void output(){
  int i,j;
  for(i=0;i<MAX;i++)
    for(j=0;j<MAX;j++) if(c[i][j]==TRUE && x[i]!=j) return;
  for(i=0;i<MAX;i++){
    for(j=0;j<MAX;j++)
      (x[i]==j) ? printf("Q") : printf(".");
    printf("\n");
  }
}
void calc(int i){
  int j;
  if(i==MAX) output();
  for(j=0;j<MAX;j++){
    if(y[j]==OFF || l[i+j]==OFF || r[i-j+MAX-1]==OFF) continue;
    x[i]=j;
    y[j]=l[i+j]=r[i-j+MAX-1]=OFF;
    calc(i+1);
    x[i]=y[j]=l[i+j]=r[i-j+MAX-1]=ON;
  }
}
int main(){
  int i,num,s,t;
  set();
  scanf("%d", &num);
  for(i=0;i<num;i++){
    scanf("%d%d",&s,&t);
    c[s][t]=TRUE;
  }
  calc(0);
  return 0;
}


Measured memory_bytes: 2108
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
#include <set>
using namespace std;
typedef long long ll;
 
int main() {
	ios::sync_with_stdio(false);
	int n, v[102] = {}, z = 0;
    ll W, w[102] = {};
    vector<int> a, b, c, d;
    cin >> n >> W >> w[0] >> v[0];
    a.push_back(v[0]);
    for (int i = 1; i < n; i++) {
        cin >> w[i] >> v[i];
        if (w[i] == w[0]) a.push_back(v[i]);
        else if (w[i] == w[0] + 1) b.push_back(v[i]);
        else if (w[i] == w[0] + 2) c.push_back(v[i]);
        else d.push_back(v[i]);
    }
    sort(a.begin(), a.end()); reverse(a.begin(), a.end());
    sort(b.begin(), b.end()); reverse(b.begin(), b.end());
    sort(c.begin(), c.end()); reverse(c.begin(), c.end());
    sort(d.begin(), d.end()); reverse(d.begin(), d.end());
    for (int i = 0; i <= a.size(); i++) {
        for (int j = 0; j <= b.size(); j++) {
            for (int k = 0; k <= c.size(); k++) {
                for (int l = 0; l <= d.size(); l++) {
                    if (w[0] * i + (w[0] + 1) * j + (w[0] + 2) * k + (w[0] + 3) * l <= W) {
                        int x = 0;
                        for (int m = 0; m < i; m++) x += a[m];
                        for (int m = 0; m < j; m++) x += b[m];
                        for (int m = 0; m < k; m++) x += c[m];
                        for (int m = 0; m < l; m++) x += d[m];
                        z = max(z, x);
                    }
                }
            }
        }
    }
	cout << z;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>

float y(float a, float b, float c, float d, float x) {
	return a * x*x*x / 3 + b * x*x / 2 + c * x + d;
}
int main() {
	float a, b, c, d, D;
	int p, m, n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%f %f %f %f", &a, &b, &c, &d);
		if (a < 0) a *= -1, b *= -1, c *= -1, d *= -1;
		a *= 3;
		b *= 2;
		D = b * b - 4 * a*c;
		if (D > 0) {
			float k1 = (-b - sqrt(D)) / (2 * a), k2 = (-b + sqrt(D)) / (2 * a);
			if (y(a, b, c, d, k2) > 0 || y(a, b, c, d, k1) < 0) {
				if (d > 0)p = 0, m = 1;
				else if (d < 0)p = 1, m = 0;
				else p = 0, m = 0;
			}
			else {
				if (k2 < 0) {
					if (d > 0)p = 0, m = 3;
					else if (d < 0)p = 1, m = 2;
					else p = 0, m = 2;
				}
				else if (k1 > 0) {
					if (d > 0)p = 2, m = 1;
					else if (d < 0)p = 3, m = 0;
					else p = 2, m = 0;
				}
				else if (k1 == 0) {
					if (d > 0)p = 2, m = 1;
					else if (d < 0)p = 1, m = 0;
					else p = 1, m = 0;
				}
				else if (k2 == 0) {
					if (d > 0)p = 0, m = 1;
					else if (d < 0)p = 1, m = 2;
					else p = 0, m = 1;
				}
				else {
					if (d > 0)p = 2, m = 1;
					else if (d < 0)p = 1, m = 2;
					else p = 1, m = 1;
				}
			}
		}
		else if (D < 0) {
				if (d > 0)p = 0, m = 1;
				else if (d < 0)p = 1, m = 0;
				else p = 0, m = 0;
			}else {
				if (d > 0) {
					if (y(a, b, c, d, -b / (2 * a)) == 0)p = 0, m = 3;
					else p = 0, m = 1;
				}
			else if (d < 0) {
				if (y(a, b, c, d, -b / (2 * a)) == 0)p = 3, m = 0;
				else p = 1, m = 0;
			}
			else p = 0, m = 0;
		}
		printf("%d %d\n", p, m);
	}
	
}



Measured memory_bytes: 2024
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;

int main() {
  ll n, m;
  cin >> n >> m;
  priority_queue<int> Q;
  ll ai;
  for (int i = 0; i < n; i++) {
    cin >> ai;
    Q.push(ai);
  }

  ll top;
  for (int i = 0; i < m; i++) {
    top = Q.top();
    // cout << Q.top() << endl;
    Q.pop();
    Q.push(top / 2);
  }

  ll sum = 0;
  for (int i = 0; i < n; i++) {
    sum += Q.top();
    Q.pop();
  }
  cout << sum << endl;

  return 0;
}

Measured memory_bytes: 892
#include <iostream>
#include <algorithm>

int main()
{
	int A = 0, B = 0, ans = 0;
	std::cin >> A >> B;

	int M, D, P;
	M = A + B;
	D = A - B;
	P = A * B;

	ans = std::max(std::max(M, D), P);
	std::cout << ans << std::endl;

	return 0;
}

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


typedef long long ll;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define _GLIBCXX_DEBAC
/*map<Keyの型, Valueの型> 変数名;
queue<型> 変数名;
priority_queue<型> 変数名;
priority_queue<型, vector<型>, greater<型>> 変数名;*/
//copy(v1.begin(), v1.end(), back_inserter(v2));
using namespace std;

int gcd(int a, int b) {
	int c;
	if (a < b) {
		c = a; a = b; b = c;
	}
	while (b != 0) {
		c = a % b; a = b; b = c;
	}
	return a;
}

int sort_greater(int m,int n) {
	vector<int> a(m);
	for (int i = 0; i < m; i++) {
		cin >> a[i];
	}
	sort(a.begin(), a.end(),greater<int>());
	for (int i = 0; i < n; i++) {
		cout << a[i];
	}
		return 0;
}

int bubblesort(int a[], int n) {
	int sw = 0;
	bool flag = 1;
	for (int i = 0; flag; i++) {
		flag = 0;
		for (int j = n - 1; j >= i + 1; j--) {
			if (a[j] < a[j - 1]) {
				swap(a[j], a[j - 1]);
				flag = 1;
				sw += 1;
			}
		}
	}
	return sw;
}

int a_z()
{
	for (int i = 0; i <= ('Z' - 'A'); i++) {
		cout << (char)('A' + i);
	}
	return 0;
}

int selecttionsort(int a[], int n) {
	int t,sw = 0, minj;
	for (int i = 0; i < n - 1; i++) {
		minj = i;
		for (int j = 0; j < n - 1; j++) {
			if (a[j] < a[minj]) {
				minj = j;
			}
		}
		t = a[i]; a[i] = a[minj]; a[minj] = t;
		if (i != minj) sw += 1;

	}
	return sw;
}

bool is_prime(int x) {
	if (x <= 1) return false;
	for (int i = 2; i * i <= x; i++) {
		if (x % i == 0) return false;
	}
	return true;
}

map<string, int> memo;

using P=pair<int, int>;

struct Clock {
	int hour, minute, second;
	void set(int h, int m, int s) {
		hour = h; minute = m; second = s;
	}
	string to_str() {
		string h, m, s;
		h = to_string(hour);
		m= to_string(minute);
		s= to_string(second);
		if (h.size() < 2) h = "0" + h;
		if (m.size() < 2) m = "0" + m;
		if (s.size() < 2) s = "0" + s;
		return h + ":" + m + ":" + s;
	}
	void shift(int diff_second) {
		int h, m;
		h = diff_second / 3600;
		m = diff_second / 60;
		diff_second %= 60;
		second += diff_second;
		
	}
};


/*void dfs(int v, int p = -1) {
	for (int u : to[v]) {
		if (u == p) continue;
		ans[u] += ans[v];
		dfs(u, v);
	}
}*/
int main() {
	//sort(a.begin(),a.end());
	ll l, r;
	cin >> l >> r;
	r = min(r, l + 4038);
	int ans = 2018;
	for (ll i = l; i <= r; i++) {
		for (ll j = i + 1; j <= r; j++) {
			int x = i * j % 2019;
			ans = min(ans, x);
		}
	}
	cout << ans<<endl;
	return 0; 
}









Measured memory_bytes: 256
/*
_________________________
|   LIVE FREE OR DIE     |
|       327 2153         |
|          New           |
|_______HAMPSHIRE________|

*/
#include <bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define MAX 20
#define int long long
#define MOD 998244353

int32_t main()
{
	IOS
	int n,m;cin>>n>>m;
	vector<int> a(n+1);
	vector<vector<int> > g(n+1);
	for(int i=1;i<=n;i++)cin>>a[i];
	for(int i=0;i<m;i++)
	{
		int x,y;cin>>x>>y;
		g[x].push_back(y);
		g[y].push_back(x);
	}
	int ans=0;
	for(int i=1;i<=n;i++)
	{
		int flag=0;
		for(int j=0;j<g[i].size();j++)
		{
			if(a[i]<=a[g[i][j]])
				flag=1;
		}
		if(flag==0)
			ans++;
	}
	cout<<ans;
	return 0;
}

Measured memory_bytes: 9780
#include <stdio.h>
long long p=1000000007;
long long rui(long long a,long long b){
    if(b==0)return 1;
    if(b==1)return a;
    if(b==2)return a*a%p;
    if(b%2)return rui(rui(a,(b-1)/2),2)*a%p;
    else return rui(rui(a,b/2),2);
}
int main(void){
   int n;
   scanf("%d",&n);
   long long a[n];
   for(int i=0;i<n;i++){
       scanf("%lld",&a[i]);
   }
   long long kai[n+5];
   kai[0]=1;
   for(int i=1;i<n+5;i++){
       kai[i]=kai[i-1]*i%p;
   }
   long long inv[n+5];
   for(int i=1;i<n+5;i++){
       inv[i]=rui(i,p-2);
   }
   long long e[n];
   for(int i=0;i<n;i++)e[i]=0;
   for(int i=1;i<=n;i++){
       e[0]+=kai[n]*inv[i]%p;
       e[0]%=p;
   }
   for(int i=1;i<n;i++){
       e[i]=e[i-1];
       e[i]+=kai[n]*inv[i+1]%p;
       e[i]%=p;
       e[i]-=kai[n]*inv[n-i+1]%p;
       e[i]+=p;
       e[i]%=p;
   }
   long long ans=0;
   for(int i=0;i<n;i++){
       ans+=a[i]*e[i]%p;
       ans%=p;
   }
   printf("%lld\n",ans);
}

Measured memory_bytes: 3328
K,N = map(int,input().split())
dis = list(map(int,input().split()))
dif = []
for i in range(N-1):
  dif.append(int(dis[i+1]-dis[i]))
  
dif.append(int(K-dis[N-1]+dis[0]))
print(K-max(dif))



Measured memory_bytes: 32304
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;

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

  ll x, n;
  cin >> x >> n;
  vector<ll> p(n);
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }

  ll ans = x;
  for (int absn = 0; absn < 1000; absn++) {
    ll a = x + absn;
    ll b = x - absn;
    bool af = false;
    bool bf = false;
    for (int i = 0; i < n; i++) {
      if (p[i] == a) {
        af = true;
      }
      if (p[i] == b) {
        bf = true;
      }
    }
    if (!af && !bf) {
      ans = b;
      break;
    } else if (!bf) {
      ans = b;
      break;
    } else if (!af) {
      ans = a;
      break;
    }
  }

  cout << ans << ln;

  return 0;
}

Measured memory_bytes: 3580
#include <iostream>
#include <cstdio>
#include <set>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <string>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <fstream>
#include <iomanip>
//#include <unordered_map>
using namespace std;
#define dbg(x) cerr << #x " = " << x << endl;
typedef pair<int, int> P;
typedef long long ll;

int main()
{
    //freopen("in.txt", "r", stdin);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    cout << n * (n+1) / 2 << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define rev(x) reverse(x);
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

int main(){
  ll n;cin >> n;
  vvl g(n,vl(n));rep(i,n)rep(j,n)cin >> g[i][j];
  vl sum(1<<n);
  rep(bit,1<<n){
    ll ret=0;
    rep(i,n)rep(j,n)if((bit&(1<<i))&&(bit&(1<<j)))ret+=g[i][j];
    sum[bit]=ret/2;
  }
  //rep(i,1<<n)cout << sum[i] <<" ";cout << endl;
  rep(bit,1<<n){
    vl z;rep(i,n)if(bit&(1<<i))z.pb(i);
    rep(cit,1<<z.size()){
      ll d=0,e=0;
      rep(j,z.size()){
        if(cit&(1<<j))d+=1<<z[j];
        else e+=1<<z[j];
      }
      if(d>e)break;
      //cout << bit <<" " << d << " " << e <<endl;
      chmax(sum[bit],sum[d]+sum[e]);
    }
  }
  //rep(i,1<<n)cout << sum[i] <<" ";cout << endl;
  cout << sum[(1<<n)-1] <<endl;
}

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

int main()
{
    int n, k;
    scanf("%d %d", &n, &k);
    int ans = 0;
    // printf("%d\n", n);
    while (n > 0)
    {
        ans++;
        n /= k;
    }
    printf("%d\n", ans);
}

Measured memory_bytes: 256
package main

import (
	"fmt"
	"strconv"
	"strings"
)

func dummy() {
	var str int
	str, _ = strconv.Atoi("5")
	fmt.Printf(strconv.Itoa(str))
}

func main() {
	var str string
	fmt.Scan(&str)
	date := strings.Split(str, "/")
	var y, m, d int
	y, _ = strconv.Atoi(date[0])
	m, _ = strconv.Atoi(date[1])
	d, _ = strconv.Atoi(date[2])
	if y > 2019 {
		fmt.Println("TBD")
	} else if y == 2019 && m == 4 && d == 30 {
		fmt.Println("Heisei")
	} else if y == 2019 && m <= 4 {
		fmt.Println("Heisei")
	} else if y == 2019 {
		fmt.Println("TBD")
	} else {
		fmt.Println("Heisei")
	}
}


Measured memory_bytes: 640
#include<bits/stdc++.h>
#define pi              acos(-1)
#define ll              long long
#define ld              long double
#define gcd             __gcd
#define bitscount       __builtin_popcount
#define ff              first
#define ss              second
#define MAXX            1e18
#define FastRead        ios_base::sync_with_stdio(false);cin.tie(NULL)
//__builtin_popcount()  -->  counts how many 1 s are in a binary represented integer
//accumulate() --> finds sum of an array of integers
using namespace std;
int main()
{
    ll n, p;
    cin>>n>>p;
    cout<<n-p+1;
}


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[] nums=new int[n];
        for(int i=0;i<n;i++){
            nums[i]=sc.nextInt();
        }
        Arrays.sort(nums);
        int ans=n;
        for(int i=1;i<n;i++){
            if(nums[i-1]==nums[i])ans--;
        }
        System.out.println(ans);
    }

}

Measured memory_bytes: 23764
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>

using namespace std;

char s[10000];

int main()
{
	gets(s);
	int l = strlen(s);
	for(int i = 0; i < l; i++)
	{
		if('a' <= s[i] && s[i] <= 'z')
		{
			s[i] = (int)s[i] - 'a' + 'A';
		}
	}
	printf("%s\n",s);
	return 0;
}

Measured memory_bytes: 1088