akhauriyash/Code-Regression huggingface dataset:
def hantei3(w,L,R):
    if w>=2:
        return True
    for i in range(L,R+1):
        if i%3==0:
            return True
    return False

def hantei673(w,L,R):
    if w>=672:
        return True
    for i in range(L,R+1):
        if i in [673,1346]:
            return True
    return False

L,R=map(int,input().split())
w=R-L
L%=2019
R%=2019
if w>=2018 or L>R:
    print(0)
else:
    mn=3000
    for i in range(L,R):
        for j in range(i+1,R+1):
            tmp=i*j%2019
            if tmp<mn:
                mn=tmp
    print(mn)


Measured memory_bytes: 3064
#include<bits/stdc++.h>
#define ll long long
using namespace std;
inline int read(){
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
	return x*f;
}
int a[1<<18],n,N,f[1<<18][2],ans,sor[5];
bool cmp(int o,int oo){return a[o]>a[oo];}
int main(){
	n=read();N=1<<n;register int i,j,A,B;
	for(i=0;i<N;i++) a[i]=read();
	f[1][0]=0;f[1][1]=1;
	for(i=2;i<N;i++){
		f[i][0]=f[i][1]=i;
		for(j=17;j>=0;j--) if(i&(1<<j)){
			sor[1]=f[i^(1<<j)][0];sor[2]=f[i^(1<<j)][1];sor[3]=f[i][0],sor[4]=f[i][1];
			sort(sor+1,sor+5,cmp);
			f[i][0]=sor[1];f[i][1]=sor[2];
			if(f[i][0]==f[i][1]) f[i][0]=sor[3];
		}
	}
//	for(i=1;i<N;i++) printf("%d %d\n",f[i][1],f[i][0]);
	for(i=1;i<N;i++){
		ans=max(ans,a[f[i][1]]+a[f[i][0]]);
		printf("%d\n",ans);
	}
	return 0;
}

Measured memory_bytes: 6144
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ss second
#define ff first
#define N 100005
#define inf 1000000009
#define ll long long
#define pii pair<int,int>
#define sz(a) int(a.size())
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

int n,b;
ll sum = 1,x,num;
ll llinf = 1e18;

int main(){
	scanf("%d",&n);
	for(int i = 1;i <= n;i++){
		scanf("%lld",&x);
		num = llinf/sum;
		if(x <= num) sum *= x;
		else b = 1;
		if(x == 0) return puts("0"),0;
	}
	if(b == 0) printf("%lld",sum);
	else puts("-1");
}


Measured memory_bytes: 3860
N, D = (int(x) for x in input().split())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
i = cnt = 0


DS = D * D

while i < N:
    if x[i]**2 + y[i]**2 <= DS:
        cnt += 1
    i += 1

print(cnt)

Measured memory_bytes: 116564
#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <fstream>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <iomanip>
#include <stdio.h>
#include <string.h>
#include <random>
#include <functional>

using std::cin;
using std::cout;
using std::cerr;
using std::endl;

using std::map;
using std::set;
using std::bitset;
using std::vector;
using std::string;
using std::multimap;
using std::multiset;
using std::deque;
using std::queue;
using std::stack;
using std::pair;
using std::iterator;

using std::sort;
using std::stable_sort;
using std::reverse;
using std::max_element;
using std::min_element;
using std::unique;
using std::ios_base;
using std::swap;
using std::fill;

using std::setprecision;
using std::fixed;

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

ll min(ll a, ll b) {return a < b ? a : b;}
ll min(int a, ll b) {return a < b ? a : b;}
ll min(ll a, int b) {return a < b ? a : b;}
ll min(int a, int b) {return a < b ? a : b;}

ll max(ll a, ll b) {return a > b ? a : b;}
ll max(int a, ll b) {return a > b ? a : b;}
ll max(ll a, int b) {return a > b ? a : b;}
ll max(int a, int b) {return a > b ? a : b;}

namespace MySpace{

};

#define F(i, n) for (int (i) = 0; (i) != (n); (i)++)
#define fi first
#define se second
#define re return
#define all(x) (x).begin(), (x).end()

const int MOD = 998244353;
const long long B = 1e6 + 3;
const int N = 501020;

vector<int> solve(ll n, int lst)
{
    if (n == 1)
    {
        return {};
    }
    if (n % 2 == 1)
    {
        vector<int> b = solve(n - 1, lst - 1);
        vector<int> c = {lst};
        for (auto it : b) c.push_back(it);
        return c;
    }
    else
    {
        vector<int> b = solve(n / 2, lst - 1);
        vector<int> c = {lst};
        for (auto it : c) b.push_back(it);
        return b;
    }
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll n;
    cin >> n;
    n++;
    vector<int> a = solve(n, 100);
    cout << a.size() * 2 << "\n";
    for (int i = 0; i < a.size(); i++) cout << a[i] << " ";
    sort(all(a));
    for (int i = 0; i < a.size(); i++) cout << a[i] << " ";
}


Measured memory_bytes: 256
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
#sys.setrecursionlimit(int(pow(10, 2)))
#sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]





# @lru_cache(None)

n=l()[0]
A=l()
e=[]
o=[]
for i in range(n):
    if(i%2):
        o.append(A[i])
    else:
        e.append(A[i])
d={}
for i in range(n//2):
    if(o[i] not in d):
        d[o[i]]=0
    d[o[i]]+=1
mx=[]
for ks in d:
    mx.append([d[ks],ks])
mx.sort(reverse=True)
mx.append([0,0])
d={}
for i in range(n//2):
    if(e[i] not in d):
        d[e[i]]=0
    d[e[i]]+=1
mx1=[]
for ks in d:
    mx1.append([d[ks],ks])
mx1.sort(reverse=True)
mx1.append([0,0])
if(mx[0][1]!=mx1[0][1]):
    print(n-mx[0][0]-mx1[0][0])
else:
    print(min(n-mx[0][0]-mx1[1][0],n-mx[1][0]-mx1[0][0]))

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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORd(i, a, b) for (int i = (a) ; i >= (b); i--)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define sp system("pause")
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9;
const ll LINF = (ll) 1e18;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
const int N = (int) 1e5;
void TimeExecution() {
    cout << "\n\n===>> Time Execution: " << clock() / (double)1000 << " sec(s).";
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    /*
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    #endif
    */
    string s, t;
    cin >> s >> t;
    cout << t << s;
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
 
#define INF 1000010000
#define nl '\n'
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fi first
#define se second
#define pii pair<int,int>
#define pdd pair<double,double>
#define all(c) (c).begin(), (c).end()
#define SORT(c) sort(all(c))
#define sz(c) (c).size()
#define rep(i,n) for( int i = 0; i < n; ++i )
#define repi(i,n) for( int i = 1 ; i <= n; ++i )
#define repn(i,n) for( int i = n - 1 ; i >= 0 ; --i )
#define repf(j,i,n) for( int j = i ; j < n ; ++j )
#define die(s) {std::cout << s << nl;}
#define dier(s) {std::cout << s; return 0;}
#define vi vector<int>
typedef long long ll;
 
using namespace std;
 
vi g[10];
 
vi cnt(10 , 0);

int n , m , ans;

void dfs(int cur , vi used , int total){
	used[cur] = 1;
	if(total == n){
		++ans;
		return;
	}
	rep(i , sz(g[cur])){
		int v = g[cur][i];
		if(!used[v]){
			dfs(v , used , total + 1);
		}
	}
}
 
 
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.precision(0); 
	cin >> n >> m;
	rep(i , m){
		int u , v;
		cin >> u >> v;
		--u;
		--v;
		g[u].pb(v);
		g[v].pb(u);
	}
	rep(i , sz(g[0])){
		vi used(10 , 0);
		used[0] = 1;
		++cnt[0];
		dfs(g[0][i] , used , 2);
	}
	die(ans);
	return 0;
}

Measured memory_bytes: 256
// "bits/stdc++.h" {{{
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <array>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <limits>
#include <typeinfo>
#include <initializer_list>
#include <bitset>
#include <chrono>
#include <functional>
#include <tuple>
#include <typeindex>
#include <utility>
#include <string>
#include <regex>
// }}}

// Begin {{{
using namespace std;

#define all(x) x.begin(), x.end()
#define rep(i, n) for (i64 i = 0; i < (n); ++i)
#define reps(i, s, n) for (i64 i = (s); i <= (n); ++i)
#define VAR(Type, ...) Type __VA_ARGS__; IN(__VA_ARGS__)
#define Float(x) OUTN(fixed, setprecision(x));

using i64 = int_fast64_t;
using pii = pair<i64, i64>;

template <class A, class B>
inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }

template <class A, class B>
inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }

constexpr int INF = 0x3f3f3f3f;
constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int MOD = int(1e9) + 7;

// IN
void IN() {}
template <class Head, class... Tail>
void IN(Head&& head, Tail&&... tail) {
  cin >> head;
  IN(forward<Tail>(tail)...);
}

// OUTS
void OUTS() {}
template <class Head, class... Tail>
void OUTS(Head&& head, Tail&&... tail) {
  cout << head << " \n"[sizeof...(tail)==0];
  OUTS(forward<Tail>(tail)...);
}

template <class T>
void OUTS(vector<T> &vec) { for (auto &e : vec) cout << e << " \n"[&e==&vec.back()]; }

template <class T>
void OUTS(vector<vector<T>> &df) { for (auto &vec : df) OUTS(vec); }

// OUTL
void OUTL() {}
template <class Head, class... Tail>
void OUTL(Head&& head, Tail&&... tail) {
  cout << head << "\n";
  OUTL(forward<Tail>(tail)...);
}

template <class T>
void OUTL(vector<T> &vec) { for (auto &e : vec) cout << e << "\n"; }

// OUTN
void OUTN() {}
template <class Head, class... Tail>
void OUTN(Head&& head, Tail&&... tail) {
  cout << head;
  OUTN(forward<Tail>(tail)...);
}

template <class T>
void OUTN(vector<T> &vec) { for (auto &e : vec) cout << e; }
// }}} End

signed main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  VAR(string, s);
  i64 res = 0;
  for (auto e : s) {
    if (e == '2') res++;
  }
  OUTL(res);
  return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int top,S[1000];

void push(int x)
{
	S[++top] = x;
}

int pop()
{
	top--;
	return S[top+1];
}

int main(void)
{
	int a,b;
	top = 0;
	char s[100];
	
	
	while(scanf("%s",s) != EOF)
	{
		if(s[0] == '+')
		{
			a = pop();
			b = pop();
			push(a+b);
		}
		else if(s[0] == '-')
		{
			a = pop();
			b = pop();
			push(b-a);
		}
		else if(s[0] == '*')
		{
			a = pop();
			b = pop();
			push(a * b);
		}
		else
		{
			push(atoi(s));
		}
	}
	printf("%d\n",pop());
	
	return 0;
}


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

#define NDEBUG
#include <cassert>


typedef long long ll;
typedef long double Double;
typedef unsigned long long ull;
typedef pair<int,int> ii;
typedef pair<ll,ll> llll;
typedef pair<double,double> dd;

typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<ii> vii;
typedef vector<vector<ii>> vvii;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<long double> vD;

#define sz(a)  int((a).size())
#define pb  push_back
#define eb  emplace_back
#define FOR(var,from,to) for(int var=(from);var<=(to);++var)
#define rep(var,n)  for(int var=0;var<(n);++var)
#define rep1(var,n)  for(int var=1;var<=(n);++var)
#define repC2(vari,varj,n)  for(int vari=0;vari<(n)-1;++vari)for(int varj=vari+1;varj<(n);++varj)
#define ALL(c)  (c).begin(),(c).end()
#define RALL(c)  (c).rbegin(),(c).rend()
#define tr(i,c)  for(auto i=(c).begin(); i!=(c).end(); ++i)
#define found(s,e)  ((s).find(e)!=(s).end())
#define mset(arr,val)  memset(arr,val,sizeof(arr))
#define mid(x,y) ((x)+((y)-(x))/2)
#define IN(x,a,b) ((a)<=(x)&&(x)<=(b))
#define cons make_pair

#define PQ(T) priority_queue<T>
#define RPQ(T) priority_queue<T,vector<T>,greater<T>>

template<class T> inline void amin(T & a, T const & b) { a = min(a, b); }
template<class T> inline void amax(T & a, T const & b) { a = max(a, b); }

inline ll square(ll x) { return x * x; }
inline ll gcd(ll a, ll b) { while(a) swap(a, b%=a); return b; }
template <typename T>
inline T mod(T a, T b) { return ((a % b) + b) % b; }



bool solve(int N, vi& a, vi& b) {
    using P = pair<ll,ll>;
    vector<P> ba(N);
    rep(i,N) ba[i] = P(b[i], a[i]);
    sort(ALL(ba));
    vll acc(N+1); acc[0] = 0;
    rep(i,N){
        acc[i+1] = acc[i] + ba[i].second;
        if (acc[i+1] <= ba[i].first) continue;
        return false;
    }
    return true;
}

int main() {
    int N; scanf("%d%*c", &N);
    vi a(N), b(N);
    rep(i,N){
        scanf("%d %d%*c", &a[i], &b[i]);
    }
    cout << (solve(N,a,b) ? "Yes":"No") << endl;
    return 0;
}


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

using namespace std;
string niz[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};

int main() {
    string n;
    cin >> n;
    reverse(niz, niz+7);
    for (int i = 0; i < 7; i++) {
        if (niz[i] == n) cout << i + 1;
    }
    return 0;
}


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

using namespace std;

using ll = long long;
using ui = unsigned int;
const ll MOD = 1000000007;
const ll INF = 9223372036854775807;


//C

//B
int main() {
	ll N;
	scanf("%lld", &N);
	char S[101010];
	scanf("%s", S);
	ll len = strlen(S);

	for (ll i = 0; i < len; i++) {
		char c = S[i] + N;
		if (c > 'Z') {
			c -= 26;
		}

		S[i] = c;
	}

	printf("%s\n", S);
}


//A
/*
int main() {
	string arr[] = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
	
	string s;
	cin >> s;

	ll result = 0;

	for (ll i = 0; i < 7; i++) {
		if (s == arr[i]) {
			result = 7 - i;
			break;
		}
	}

	printf("%lld\n", result);
}
*/


Measured memory_bytes: 256
(let ((aa (read))
    (bb (read))
    (cc (read))
    (dd (read))
    (tmp 0))
    (setq tmp (* aa cc))
    (if (< tmp (* aa dd))
        (setq tmp (* aa dd))
    )
    (if (< tmp (* bb cc))
        (setq tmp (* bb cc))
    )
    (if (< tmp (* bb dd))
        (setq tmp (* bb dd))
    )
    (format t "~D~%" tmp)
)

Measured memory_bytes: 24288
#include <iostream>
#include <sstream>
#include <stack>
#include <iomanip>
#include <numeric>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <cassert>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <queue>
#include <cmath>

#define BEGIN(x) x.begin()
#define END(x) x.end()
#define ALL(x) BEGIN(x), END(x)
#define PAIR make_pair
#define VEC(type) vector<type >
#define endl '\n'
#define FIR first
#define SEC second
#define PB push_back
#define SZ(x) ((int)x.size())

#define FOR(i, A, B) for(auto i = (A);i != (B); i++)
#define FORD(i, A, B) for(auto i = (A);i != (B); i--)

#define READRANGE(begin, end) FOR(it, begin, end) cin >> *it
#define READVEC(V) READRANGE(BEGIN(V), END(V))

using namespace std;

typedef long long lint;
typedef pair<int, int> Pii;
typedef pair<int, lint> Pil;
typedef pair<lint, lint> Pll;
typedef pair<lint, int> Pli;

template<class U, class V>
istream& operator >>(istream& in, pair<U, V>& pr) {
    return in >> pr.first >> pr.second;
}

template<class U, class V>
ostream& operator <<(ostream& out, pair<U, V>& p) {
    return out << p.first << " " << p.second;
}

template<class T>
ostream& operator <<(ostream& out, vector<T> vec) {
    for (T& e : vec)
        out << e << " ";
    return out << endl;
}

// ---- BEGIN LIBRARY CODE ----
// ---- END LIBRARY CODE ----
void io_init()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
};

void solveSingleCase(int caseNo)
{
    int N;
    cin >> N;
    int i = 0;
    while (2<<i <= N)
        i++;
    cout << (1<<i) << endl;
};

int main(int argc, char **argv)
{
    io_init();

    // Actual program code starts here.
    int T = 1;
    // cin >> T;
    FOR(tcase, 1, T + 1) {
        solveSingleCase(tcase);
    }
    return 0;
};


Measured memory_bytes: 256
import java.util.*;
public class Main {
    public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        ArrayList<Tuple> A = new ArrayList<>();
        for(int i=1;i<=N;i++){
            int value = sc.nextInt();
            Tuple T = new Tuple();
            T.element(i,value);
            A.add(T);
        }
        Collections.sort(A, new Comparator<Tuple>() {
            @Override
            public int compare(Tuple o1, Tuple o2) {
                return o1.value>=o2.value ?-1:1;
            }
        });
        long DP [][] = new long[N+1][N+1];
        for(int i=0;i<N+1;i++)Arrays.fill(DP[i],0);
        for(int i=0;i<A.size();i++){
            int key = A.get(i).key;
            long value = (long)A.get(i).value;
            for(int j=0;j<=i;j++){
                DP[j+1][i-j] = Math.max(DP[j+1][i-j],DP[j][i-j]+value*(long)Math.abs(key-(j+1)));
                DP[j][i-j+1] = Math.max(DP[j][i-j+1],DP[j][i-j]+value*(long)Math.abs(key-(N-(i-j))));
            }
        }
        long ans = 0;
        for(int i=0;i<=N;i++) ans = Math.max(ans,DP[i][N-i]);
        System.out.println(ans);
    }
    /*内部クラス*/
    public static class Tuple {
        public int key;
        public int value;

        public void element(int key, int value) {
            this.key = key;
            this.value = value;
        }
    }
}

Measured memory_bytes: 84904
/* 	* In the name of GOD 
 	* Thanks God */
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
#define F first
#define S second

int32_t main(){
	int a, b, c, k;
	cin >> a >> b >> c >> k;
	while (b <= a) {
		b *= 2;
		k--;
	}
	while (c <= b) {
		c *= 2;
		k--;
	}
	cout << (k >= 0 ? "Yes" : "No");
}


Measured memory_bytes: 3628
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string.h>
#include <string>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <math.h>
#include <algorithm>
#include <numeric>

using namespace std;

// マクロ&定数 ============================================================
typedef unsigned int uint;
typedef long long ll;
//typedef pair<int, int> P;

typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<double> vdouble;
typedef vector<bool> vbool;
typedef vector<string> vstring;

typedef vector<pair<int, int>> vpint;
typedef vector<pair<ll, ll>> vpll;
typedef vector<pair<double, double>> vpdouble;

typedef vector<vector<int>> vvint;
typedef vector<vector<ll>> vvll;
typedef vector<vector<double>> vvdouble;
typedef vector<vector<bool>> vvbool;

const int c_YET = -1;
const int INF = 1e9 + 1;
const ll LLINF = 1e17 + 1;
const int DX[9] = { 0,0,1,-1, 1, 1, -1, -1, 0 }; // 4;４近傍
const int DY[9] = { 1,-1,0,0, 1, -1, 1, -1, 0 }; // 8:８近傍 9:(0,0)を含む
const ll MOD = 1e9 + 7; //10^9 + 7
const ll MAX = 1e9;
const double PI = 3.14159265358979323846264338327950288;
//========================================================================



int main() {

	//==================================
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(30);
	//==================================

	int A, B, C;
	cin >> A >> B >> C;


	if (A == B && B == C)
	{
		cout << "Yes";
	}
	else
	{
		cout << "No";
	}



}





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

int main(void){
    int n;
    int ball[3];    
    cin >> ball[0] >> ball[1] >> ball[2] >> n;
    int cnt=0;
    for(int i=0;i<=int(n/ball[0]);i++){
        for(int j=0; j<=n/ball[1];j++){
            // cout << i << ' ' << j << endl;
            if(0<=(n-ball[0]*i-ball[1]*j) and (n-ball[0]*i-ball[1]*j)%ball[2]==0){
                cnt+=1;
            }
        }
    }
    cout << cnt;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <functional>
#include <algorithm>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;

int calc(int y,int m,int d){
  int aniv=195*999+5*(999/3)+1;
  int birth=195*(y-1)+5*((y-1)/3)+19*(m-1)+(m/2)+d;
  if(y%3==0) birth = birth - (m/2) - 19*(m-1)+20*(m-1);
  //cout << "B " << birth << " ans ";
  return aniv - birth;
}

int main(){
  int n;
  cin >> n;
  int y,m,d;
  rep(i,n){
    cin >> y >> m >> d;
    cout << calc(y,m,d) << endl;
  }
  return 0;
}



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


using namespace std;


// Powered by caide (code generator, tester, and library code inliner)


class Solution {
public:
  void solve(std::istream& in, std::ostream& out)
  {
    string str;
    in >> str;
    int usep = 0, ans = 0;
    for(auto&& now : str) {
      if(now == 'g') {
        if(usep) {
          usep--;
          ans++;
        } else {
          usep++;
        }
      } else {
        if(usep) {
          usep--;
        } else {
          ans--;
          usep++;
        }
      }
    }
    out << ans << "\n";
  }
};

void solve(std::istream& in, std::ostream& out)
{
  out << std::setprecision(12);
  Solution solution;
  solution.solve(in, out);
}


#include <fstream>
#include <iostream>


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


  istream& in = cin;


  ostream& out = cout;

  solve(in, out);
  return 0;
}




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

int main()
{
    int a,b;
    char x;
   while(cin>>a>>x>>b) 
   {
       if(x=='?')return 0;
       if(x=='+')cout<<a+b<<endl;
       if(x=='-')cout<<a-b<<endl;
       if(x=='*')cout<<a*b<<endl;
       if(x=='/')cout<<a/b<<endl;
   }
}



Measured memory_bytes: 3088
#include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <utility>
#include<vector>
#include<iomanip>
#include<map>
#include <queue>
#include<cmath>
#include<cstdio>
#include<iomanip>
#include<set>
#include <bits/stdc++.h>
 
using namespace std;
using ll = long long int;
 
#define REP(i,n) for(ll i=0;i<(ll)(n);i++) //REP(i, 5) cout<<i;
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define MOD 1000000007 //10^9+7
//#define MOD 1
 
ll gcd(ll a, ll b) {
  ll tmp;
  if ( b > a) {
    tmp = a;
    a = b;
    b = tmp;
  }
  while (a % b !=0) {
    tmp = b;
    b = a % b;
    a = tmp;
  }
  return b;
}
 
const int MAX = 1000;
 
ll table[MAX][MAX];
 
// テーブルを作る前処理
void COMinit() {
    table[0][0] = table[0][1] = 1;
    FOR(i, 1, MAX-1){
      FOR(j, 0, i+1){
        if(j==0) table[i][j] = 1;
        else if(j == i+1) table[i][j] = 1;
        else table[i][j] = table[i-1][j-1]+table[i-1][j];
      }
    }
}
 
// 二項係数計算
ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return table[n-1][k];
}

void sosuu(ll n, vector<ll> &v){

  vector<ll> num(n, 0);

  FOR(i, 1, sqrt(n)){
    if(num[i]==0){
      FOR(j, 0, n/i){
        num[i+(j*i)] = 1;
      }
    }
  }
  REP(i, n){
    if(num[i]==0) v.push_back(i+1);
  }
}


int main(void){
 
  ll n,k;
  cin>>n>>k;
  vector<ll> v(n, 0);

  REP(i, k){
    ll x;
    cin>>x;

    REP(j, x){
      ll a;
      cin>>a;
      v[a-1]++;
    }
  }

  ll sum = 0;
  REP(i, n){
    if(v[i]==0) sum++;
  }
  cout<<sum<<endl;
  return 0;
}

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

int main(){
  
  int n, fib[50] = {1, 1};

  //recurrence relation of fibonacci number
  for(int i = 2;i < 45;i++) fib[i] = fib[i - 1] + fib[i - 2];

  //input and output
  cin >> n;
  cout << fib[n] << endl;
  
  return 0;
}




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

using namespace std;
#define PI 3.1415926535897932384626433832795
#define MOD (1000000007)
#define EPS (1e-15)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repc(i, s, n) for (int i = (s); i <= (n); i++)
#define rrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define rrepc(i, s, n) for (int i = (s); i >= (n); i--)
#define bet(x, a, b) (a) <= (x) && (x) < (b)
typedef long long ll;
typedef unsigned long long ull;

int A[100];

int main()
{
	int N, M, sum = 0, cnt = 0;

	cin >> N >> M;
	rep(i, N) cin >> A[i];

	rep(i, N) sum += A[i];
	rep(i, N) {
		if (A[i] * 4 * M >= sum) cnt++;
	}

	cout << (cnt >= M ? "Yes" : "No") << endl;

	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
using namespace std;
int main(int argc, const char * argv[]) {
    int N;
    cin >> N;
    vector<int> P;
    for (int i = 0; i < N; i++) {
        int tmp;
        cin >> tmp;
        P.push_back(tmp);
    }
    
    int ans = 0;
    int min = P[0];
    for (int p : P) {
        if (p <= min) {
            ans++;
            min = p;
        }
    }
    
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 1400
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <cstring>
#define ll long long
#define rep(x,n) for(ll (x)=0;(x)<n;(x)++)
#define rep1(x,n) for(ll (x)=1;(x)<=n;(x)++)
using namespace std;

char s[300005],book[300005];

int main()
{
    #ifdef LOCAL
        freopen("B_data","r",stdin);
    #endif
    while(cin>>s)
    {
        ll len=strlen(s),cnt=0,l=0,r=2;
        memset(book,0,sizeof(book));
        rep(i,len)
        {
            if(!i || i==(len-1) || book[i]) continue;
            while(l && book[l]) l--;
            while(r<=i || (r<len && book[r])) r++;
            if(s[l]!=s[r])
            {
                cnt++,book[i]=1;
                //cout<<s[i];
                i-=2;
            }
        }
        //cout<<endl;
        if(cnt%2) cout<<"First"<<endl;
        else cout<<"Second"<<endl;
    }
    return 0;
}


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

typedef long long ll;

#define pf(n) cout << n << endl
#define ps() cout <<" ";
#define sf(n) cin >> n
#define in(i,n) for (int i = 0; i < n; i++) 2
#define mn -
#define pls +
#define mod %
#define E =
#define EE ==
#define le <=
#define ge >=

inline void SUM(ll &x,ll y)
{
    x=x+y;
}
inline void DIFF(ll &x,ll y)
{
    x=x-y;
}
ll c E 0;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin>>n;
    ll sum E 0;
    int I E 1;
    std::vector<ll> v;
    while(sum<n)
    {
        ll test E 1;
        for (int i = 0; i <I ; ++i)
        {
            test E test * 26;
        }
        SUM(sum,test);
        v.push_back(test);
        I E I pls 1;    
    }
    
    for (int i = 0; i < v.size(); ++i)
    {
        //cout<<n;ps();pf(v[i]);
        if(v[i] ge n)break;
        DIFF(n,v[i]);
    }
    
    double X E n;
    std::vector<int> vt;
    for (int i = 0; i < v.size(); ++i)
    {
        n E ceil(X);
       
        int d E (n mod 26);
        X E(X/26);
        if(!d)d E 26;
        vt.push_back(d pls 96);
        
    }
    
    reverse(vt.begin(),vt.end());
    for (auto x:vt)
    {
        char c E x;
        cout<<c;
    }
    return 0;
}


Measured memory_bytes: 3736
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define sz(v) v.size()
#define INF 1000000009
// aよりもbが大きいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
// aよりもbが小さいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}

struct edge {
  int to;
  int id;
  bool operator<(const edge &another) const{
    return id < another.id;
  };
};

vector<pair<int, vector<edge>>> graph;
vector<ll> ins;

int main(){
  ll N, M;
  cin >> N >> M;
  graph.resize(N);
  ins.resize(N);
  rep(i, N){
    vector<edge> vt(0);
    graph.at(i) = make_pair(i, vt);
    ins.at(i) = 0;
  }
  vector<int> x(M), y(M);
  queue<ll> S;
  rep(i, M){
    cin >> x.at(i) >> y.at(i);
    x.at(i)--;
    y.at(i)--;
    graph.at(x.at(i)).second.push_back({y.at(i), i});
    ins.at(y.at(i))++;
  }
  rep(i, N){
    if(ins.at(i) == 0){
      S.push(i);
    }
  }
  vector<ll> topo(0);
  while(!S.empty()){
    ll v = S.front();
    S.pop();
    topo.push_back(v);
    for(auto e : graph.at(v).second){
      ins.at(e.to)--;
      if(ins.at(e.to) == 0){
        S.push(e.to);
      }
    }
  }
  vector<ll> cost(N, 0);
  for(auto i : topo){
    for(auto e : graph.at(i).second){
      chmax(cost.at(e.to), cost.at(i)+1);
    }
  }
  ll ans = 0;
  rep(i, N){
    chmax(ans, cost.at(i));
  }
  cout << ans << endl;
}

Measured memory_bytes: 9716
#include<bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define repk(i,k,n) for (ll i = k; i < (ll)(n); ++i)
#define MAX 500000001000000000
#define MOD 1000000007
typedef long long  ll;

using namespace std;

int ans, cnt;

char yuni(int a) {
	if (a == 1) return '+';
	else return '-';
}

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

	int N,M;
	cin >> N >> M;
	
	vector<int>cnt(N);
	cnt.assign(N, 1);
	vector<bool> flg(N);
	flg[0] = true;

	int x, y;
	rep(i, M) {
		cin >> x >> y;
		if (flg[x-1]) {
			flg[y-1] = true;
		}
		cnt[x-1]--;
		cnt[y-1]++;

		if (cnt[x - 1] == 0) {
			flg[x - 1] = false;
		}
	}
	
	rep(i, N) {
		if (flg[i] && cnt[i] != 0) {
			ans++;
		}
	}

	cout << ans << endl;

	return 0;
}

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


int main() {
    string  a;
    cin >> a;
    set<char> s;
    for(int i = 0; i < 3; i++){
        s.insert(a[i]);
    }
    if(s.size() == 3){
        cout << "Yes";
    }
    else
    {
        cout << "No";
    }
    
    
    cout << endl;
}


Measured memory_bytes: 256
fn main() {
    let (x, k, d): (i64, i64, i64) = {
        let mut buf = String::new();
        std::io::stdin().read_line(&mut buf).unwrap();
        let mut iter = buf.split_whitespace();
        (
            iter.next().unwrap().parse().unwrap(),
            iter.next().unwrap().parse().unwrap(),
            iter.next().unwrap().parse().unwrap(),
        )
    };

    let x = x.abs();
    let c = x / d;
    if c <= k  {
        if (k - c) % 2 == 0 {
            println!("{}", x - c * d);
        } else {
            println!("{}", (c + 1) * d - x);
        }
    } else {
        println!("{}", x - k * d);
    }
}

Measured memory_bytes: 2168
#include<cstdio>

int main(){
    long long k,a,b;
    scanf("%lld%lld%lld",&k,&a,&b);
    if(b-a<=2 || k<=(a-1)) printf("%lld\n",k+1);
    else{
        long long left = k-(a-1);
        long long ans = left/2*(b-a)+left%2+a;
        printf("%lld\n",ans);
    }
    return 0;
}


Measured memory_bytes: 1728
#include <iostream>
#include <chrono>
#include <vector>
#include <string>
#include <algorithm>
#include <map>

using namespace std;

int main() {
	int a, b, c;
	int aa, bb, cc;
	cin >> a >> b >> c;
	int cnt;
	int max = 1000000;
	for (cnt = 0; cnt < max; cnt++) {
		if (a % 2 == 1 || b % 2 == 1 || c % 2 == 1) break;
		aa = a / 2;
		bb = b / 2;
		cc = c / 2;
		a = bb + cc;
		b = aa + cc;
		c = aa + bb;
	}
	if (cnt == max)
		cout << "-1" << endl;
	else
		cout << cnt << endl;
}


Measured memory_bytes: 256
package main

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

// input scanner
var sc = bufio.NewScanner(os.Stdin)

const (
	initialBufSize = 10e4
	maxBufSize     = 10e6
)

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInt64() int64 {
	a, _ := strconv.ParseInt(next(), 10, 64)
	return a
}

func nextFloat64() float64 {
	a, _ := strconv.ParseFloat(next(), 64)
	return a
}

func nextInts(n int) []int {
	ret := make([]int, n)
	for i := 0; i < n; i++ {
		ret[i] = nextInt()
	}
	return ret
}
func nextFloats(n int) []float64 {
	ret := make([]float64, n)
	for i := 0; i < n; i++ {
		ret[i] = nextFloat64()
	}
	return ret
}
func nextStrings(n int) []string {
	ret := make([]string, n)
	for i := 0; i < n; i++ {
		ret[i] = next()
	}
	return ret
}

// util
func max(l []int) (int, int) {
	idx := 0
	ans := l[idx]
	for i, n := range l {
		if n > ans {
			idx = i
			ans = n
		}
	}
	return idx, ans
}

func min(l []int) (int, int) {
	idx := 0
	ans := l[idx]
	for i, n := range l {
		if n < ans {
			idx = i
			ans = n
		}
	}
	return idx, ans
}

// main
func main() {
	buf := make([]byte, initialBufSize)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords)
	s := next()
	for i := 0; i < len(s); i++ {
		fmt.Printf("x")
	}
	fmt.Printf("\n")
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using namespace std;
int a[5];
int main()
{
    int sum=0;
    for(int i=0;i<3;i++)
        cin>>a[i];
    sort(a,a+3);
    int b=a[2]-a[0],c=a[2]-a[1];
    int b1=b%2,c1=c%2;
    if(b1==c1)
    {
        if(b%2==0)
            sum=b/2+c/2;
        else
            sum=b/2+c/2+1;
    }
    else{
         sum=b/2+c/2+2;
    }
    cout<<sum<<endl;
    return 0;
}


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

int main(){
    int h,w,i,j;
    while(cin >> h >> w){
        if(h == 0 && w == 0) break;
        for(j=0;j<h;j++){
            for(i=0;i<w;i++) cout << "#";
            cout << endl;

        }
        cout << endl;
    }
    return 0;
}



Measured memory_bytes: 3088
//c++ テンプレ
#include<bits/stdc++.h>
using namespace std;

typedef long long llint;
typedef long double ld;

#define inf 1e18
#define mod 1000000007
priority_queue<llint,vector<llint>,greater<llint> > que;
priority_queue<llint> Que;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }


void solve(){
    string s,t;
    cin >> s >> t;
    sort(s.begin(),s.end());
    sort(t.begin(),t.end());
    reverse(t.begin(),t.end());
    if(s<t)cout << "Yes" << endl;
    else cout << "No" << endl;
}

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


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

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (a); i > (b); i--)
#define ALL(a) (a).begin(), (a).end()
#define MOD 1000000007

ll dp[101][10] = {{0, 1}};
int pattern[7];

void calc_pattern(int depth, bool exists) {
    if (exists) pattern[depth] += 1;
    else        pattern[depth] += 2;

    if (depth == 6) return;

    calc_pattern(depth + 1, false);
    if (!exists) calc_pattern(depth + 1, true);
}

int main() {
    calc_pattern(0, false);

    int H, W, K;
    cin >> H >> W >> K;
    REP(i, H) FOR(j, 1, W + 1) {
        int scale = 1;
        if (j - 4 >= 0) scale *= pattern[j - 4];
        if (W - j - 2 >= 0) scale *= pattern[W - j - 2];
        dp[i + 1][j] += dp[i][j - 1] * scale;
        dp[i + 1][j] %= MOD;

        scale = 1;
        if (j - 3 >= 0) scale *= pattern[j - 3];
        if (W - j - 2 >= 0) scale *= pattern[W - j - 2];
        dp[i + 1][j] += dp[i][j] * scale;
        dp[i + 1][j] %= MOD;

        scale = 1;
        if (j - 3 >= 0) scale *= pattern[j - 3];
        if (W - j - 3 >= 0) scale *= pattern[W - j - 3];
        dp[i + 1][j] += dp[i][j + 1] * scale;
        dp[i + 1][j] %= MOD;
    }
    cout << dp[H][K] << endl;
    return 0;
}

Measured memory_bytes: 256
import sys
input=sys.stdin.readline
n,m=map(int,input().split())
graph=[]
for _ in range(m):
    a,b,c=map(int,input().split())
    graph.append([a-1,b-1,-c])

def BellmanFord(n,m,graph):
    costs=[float("inf")]*n
    costs[0]=0
    for _ in range(n-1):
        for i in range(m):
            if costs[graph[i][1]]>costs[graph[i][0]]+graph[i][2]:
                costs[graph[i][1]]=costs[graph[i][0]]+graph[i][2]
    newcosts=[]
    for i in costs:
        newcosts.append(i)
    for _ in range(n):
        for i in range(m):
            if newcosts[graph[i][1]]>newcosts[graph[i][0]]+graph[i][2]:
                newcosts[graph[i][1]]=newcosts[graph[i][0]]+graph[i][2]
    if newcosts[n-1]!=costs[n-1]:
        return "inf"
    else:
        return -costs[n-1]

print(BellmanFord(n,m,graph))

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

int main() {
    int N, K;
    cin >> N >> K;
    vector<int> h(N);
    int ans = 0;
    rep(i, N) {
        cin >> h[i];
        if (h[i] >= K) ans++;
    }
    cout << ans << endl;
}


Measured memory_bytes: 640
program main
    implicit none
    integer(8) n, m, sum
    integer(8), allocatable, dimension(:) :: a, b
    integer(8) i,k

    read(*,*) n
    allocate(a(n))
    allocate(b(n))
    read(*,*) a

    b = 0

    do i = 1, n
        b(a(i)) = b(a(i)) + 1
    end do

    sum = 0

    do i = 1, n
        if(b(i) > 1) then
            sum = sum + b(i)*(b(i)-1)/2
        end if
    end do

    do k = 1, n
        if (b(a(k)) > 2) then
            write(*,*) sum - b(a(k))*(b(a(k))-1)/2 + (b(a(k))-1)*(b(a(k))-2)/2
        else if (b(a(k)) == 2) then
            write(*,*) sum - 1
        else
            write(*,*) sum
        end if
    end do


end program

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int h, w; cin >> h >> w;
  vector<vector<char>> grid(h + 2, vector<char>(w + 2));
  for (int i = 1; i < h + 1; i++) {
    for (int j = 1; j < w + 1; j++) {
      cin >> grid[i][j];
    }
  }

  vector<vector<int>> dyx = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}};
  for (int i = 1; i < h + 1; i++) {
    for (int j = 1; j < w + 1; j++) {
      if (grid[i][j] == '#') {
        bool flag = false;
        for (auto &d : dyx) {
          auto y = i + d[0];
          auto x = j + d[1];
          if (grid[y][x] == '#') {
            flag = true;
            break;
          }
        }
        if (!flag) {
          cout << "No" << '\n';
          return 0;
        }
      }
    }
  }
  cout << "Yes" << '\n';
  return 0;
}

Measured memory_bytes: 256
import sys

while True:
    N = int(sys.stdin.readline().rstrip())
    if N == 0:
        break;
    max_value = 0
    prev_row = [0] * (N+1)
    for i in range(N):
        row = sys.stdin.readline().rstrip()
        curr_row = [0] * (N+1)
        for x,d in enumerate(row,1):
            if d == '.':
                curr_row[x] = min(prev_row[x-1], prev_row[x], curr_row[x-1]) + 1
        max_value = max(max(curr_row), max_value)
        prev_row = curr_row

    print(max_value)

Measured memory_bytes: 6456
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define pi M_PI

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int main(){
    int n, l;
    cin >> n >> l;
    vector<string> s(n);
    REP(i,n) cin >> s[i];
    sort(s.begin(),s.end());
    REP(i,n) cout << s[i];
    cout << endl;
    return 0;
}

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

#define ll long long
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define debug(x) cerr<<#x<<": "<<x<<'\n'

using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

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

template<class T=int>
T in(){T x;cin>>x;return (x);}
template<class T>
void print(T& x){cout<<x<<'\n';}

const int MOD =(int)1e9+7;
const int MAX =510000;

ll fac[MAX],finv[MAX],inv[MAX];
void COMint(){
    fac[0]=fac[1]=1;
    finv[0]=finv[1]=1;
    inv[1]=1;
    for(int i=2;i<MAX;i++){
        fac[i]=fac[i-1]*i%MOD;
        inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;
        finv[i]=finv[i-1]*inv[i]%MOD;
    }
}
ll COM(int n,int k){
    if(n<k) return 0;
    if(n<0||k<0)return 0;
    return fac[n]*(finv[k]*finv[n-k]%MOD)%MOD;
}

ll gcd(ll a,ll b){
    if(b==0)return a;
    if(a>b){
        swap(a,b);
    }
    return gcd(a,b%a);
}
ll lcm(ll a,ll b){
    ll g;g=gcd(a,b);
    return a*b/g;
}
int main() {
    //COMint();
    string a=in<string>();
    string b=in<string>();
    string ans;
    if(a.size()>b.size()){
        ans="GREATER";
    }else if(a.size()<b.size()){
        ans="LESS";
    }else{
        REP(i,a.size()){
            if(a[i]-b[i]>0){
                ans="GREATER";
                break;
            }else if(a[i]-b[i]<0){
                ans="LESS";
                break;
            }
            ans="EQUAL";
        }
    }
    print(ans);
}

Measured memory_bytes: 256
#include<iostream>
#include<iomanip>
#include<cassert>
#include<stdexcept>
#include<utility>
#include<functional>
#include<numeric>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<array>
#include<stack>
#include<queue>
#include<deque>
#include<vector>
#include<complex>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<string>
#include<bitset>
#include<memory>
using namespace std;
using ll=long long;

int main(){
    int x;
    cin>>x;
    int g = __gcd(x,360);
    cout<<360/g<<endl;
    return 0;
}


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

int in(){
  int a;
  cin >> a;
  return a;
}//int型関数の受け取り

void forin(int* x,int y){
  for (int i=0;i<y;i++){
    cin >> x[i];
  }
}//(x,y) int型配列x[y]の受け取り

int intpow(int x,int y){
  double a=x,b=y;
  return pow(a,b);
}//(x,y) xをy乗

int intfabs(int x){
  double a=x;
  return fabs(a);
}//(x) xの絶対値

int fact(int x){
  if (x == 1) return 1;
  return x*fact(x-1);
}//(x) x!

main(){
    string a,b;
  cin >> a >> b;
    if (a.at(0)==b.at(2) && a.at(1)==b.at(1) && a.at(2)==b.at(0)) cout << "YES" << endl;
    else cout << "NO" << endl;
}

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

int main() {
  char ch;

  while (1) {
    scanf("%c", &ch);
    if (isalpha(ch)) {
      if (islower(ch)) printf("%c", toupper(ch));
      else printf("%c", tolower(ch));
    }
    else printf("%c", ch);
    
    if (ch == '\n') break;
  }
  
}



Measured memory_bytes: 3124
def examA():
    S = SI()
    T = SI()
    N = len(S)
    ans = "No"
    for i in range(N):
        cur = S[i:] + S[:i]
        #print(cur)
        if cur==T:
            ans = "Yes"
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

def test():
    i = I()
    li = LI()
    lsi = LSI()
    si = LS()
    print(i)
    print(li)
    print(lsi)
    print(si)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Measured memory_bytes: 4848
import sys
abcd_list = input()
a = int(abcd_list[0])
b = int(abcd_list[1])
c = int(abcd_list[2])
d = int(abcd_list[3])

Arith_list = ["+", "-", "*", "//"]

def func(a ,b, arith):
    if arith == 0:
        return a + b
    elif arith == 1:
        return a - b

ans = 0
op1 = 0
op2 = 0
op3 = 0
for i in range(2):
    for j in range(2):
        for k in range(2):
            ans = func(func(func(a, b, i), c, j), d, k)
            if ans == 7:
                op1 = i
                op2 = j
                op3 = k
                print(str(a)+Arith_list[op1]+str(b)+ Arith_list[op2]+str(c)+ Arith_list[op3]+str(d)+ "=7")
                sys.exit()


Measured memory_bytes: 3188
"""
C - ID
"""
import numpy as np

n, m = map(int, input().split())

# [index pref year rank]
p_y = []
list_n = 0
for n in range(m):
    p, y = map(int, input().split())
    p_y.append([list_n, p, y, 0])
    list_n += 1

p_y_np = np.array(p_y, dtype=np.int)
#print(p_y_np)

# 一意なリストには順位が
pref_set = list(set(list(p_y_np[:, 1])))

# 県の順位表
pref_count = {}
for part in pref_set:
    pref_count[part] = 1

#print(pref_count)

year_sort = np.argsort(p_y_np[:, 2])

for p_y_row in p_y_np[year_sort]:
    #print(p_y_row)
    pref = p_y_row[1]
    index = p_y_row[0]

    p_y_np[index, 3] = pref_count[pref]
    pref_count[pref] += 1

#print(p_y_np)

for part in p_y_np:
    print("%06d%06d" % (part[1], part[3]))

Measured memory_bytes: 59660
import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String b=sc.next();
    if(b.equals("A")){
      System.out.println("T");
    }else if(b.equals("C")){
      System.out.println("G");
    }else if(b.equals("G")){
      System.out.println("C");
    }else{
      System.out.println("A");
    }
  }
}


Measured memory_bytes: 21332
#include <bits/stdc++.h>
#define rep(n) for(lint I = 0; (I) < (lint)(n); ++(I))
#define repeat(i, n) for(lint i = 0; (i) < (lint)(n); ++(i))
#define repeat_to(i, n) for(lint i = 0; (i) <= (lint)(n); ++(i))
#define repeat_from(i, m, n) for(lint i = (m); (i) < (lint)(n); ++(i))
#define repeat_from_to(i, m, n) for(lint i = (m); (i) <= (lint)(n); ++(i))
#define el cout<<endl
#define dump(x) cout<<" "<<#x<<"="<<x
#define vdump(v) for(size_t I=0; I<v.size(); ++I){cout<<" "<<#v<<"["<<I<<"]="<<v[I];} cout<<endl
using namespace std;
using lint = long long;
using ld = long double;

// 最大公約数
lint gcd(lint a, lint b) {
    // 引数の一方が 0 なら他方の値を返す
    return b ? gcd(b, a%b) : a;
}

lint lcm(lint a, lint b) {
    lint t = a / gcd(a, b);
    return t * b;
}

int main(void) {
    int n; cin >> n;
    vector<lint> t(n); repeat(i, n) cin >> t[i];
    
    lint ans = 1;
    repeat(i, n) {
        ans = lcm(ans, t[i]);
    }
    cout << ans << endl;
}

Measured memory_bytes: 256