akhauriyash/Code-Regression huggingface dataset:
import sys
from bisect import bisect_left
inpurt = sys.stdin.readline
a, b, q = map(int, input().split())
INF = 10 ** 11
s = [-INF]
s_append = s.append
for i in range(a):
    si = int(input())
    s_append(si)
s_append(INF)
t = [-INF]
t_append = t.append
for i in range(b):
    ti = int(input())
    t_append(ti)
t_append(INF)
x = []
x_append = x.append
for i in range(q):
    xi = int(input())
    x_append(xi)

for xi in x:
    index_s = bisect_left(s, xi)
    s1 = xi - s[index_s - 1]
    s2 = s[index_s] - xi
    index_t = bisect_left(t, xi)
    t1 = xi - t[index_t - 1]
    t2 = t[index_t] -xi
    print(min(max(s1, t1), max(s2, t2), min(s1, t2) * 2 + max(s1, t2), min(s2, t1) * 2 + max(s2, t1)))


Measured memory_bytes: 16152
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,B,C,ans;
  cin>>A>>B>>C;
  
  if (A+B<C-1) ans=(A+B+1)+B;
  else ans=B+C;
  
  cout<<ans<<endl;
  
  return 0;
  
}

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

using ll = long long;

using namespace std;

int main() {
    ll n, a, b;
    cin >> n >> a >> b;
    cout << (n / (a + b)) * a + min(a, n % (a + b)) << '\n';
    return 0;
}

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

using namespace std;
using ll=long long;

int main(){
    int h,w;
    cin>>h>>w;
    vector<string> m(h);
    for (int i = 0; i < h; ++i) {
        cin>>m[i];
    }
    int ans=0;
    vector<int> vy={-1,0,1,0};
    vector<int> vx={0,1,0,-1};
    for (int sy = 0; sy < h; ++sy) {
        for (int sx = 0; sx < w; ++sx) {
            if(m[sy][sx]=='#')continue;
            for (int gy = 0; gy < h; ++gy) {
                for (int gx = 0; gx < w; ++gx) {
                    if(m[gy][gx]=='#')continue;
                    queue<pair<pair<int,int>,int>> q;
                    q.push(make_pair(make_pair(sy,sx),0));
                    vector<vector<bool>>visited(h,vector<bool>(w,false));
                    pair<int,int> g(gy,gx);
                    while(!q.empty()){
                        auto t=q.front();
                        if(t.first==g)break;
                        q.pop();
                        for (int i = 0; i < 4; ++i) {
                            int ny,nx;
                            ny=t.first.first+vy[i];
                            nx=t.first.second+vx[i];
                            if(ny<0||ny>=h||nx<0||nx>=w)continue;
                            if(m[ny][nx]=='#')continue;
                            if(visited[ny][nx])continue;
                            visited[ny][nx]=true;
                            q.push(make_pair(make_pair(ny,nx),t.second+1));
                        }
                    }
                    ans=max(ans,q.front().second);
                }
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>

bool isRightTriangle(int a, int b, int c){
	if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b){
		return true;
	}
	else{
		return false;
	}
}

int main(){
	
	int n;
	std::cin >> n; // number of dataset
	// input
	for(int i = 0; i < n; ++i){
		int a, b, c;
		std::cin >> a >> b >> c;
		
		if(isRightTriangle(a, b, c)){
			std::cout << "YES" << std::endl;
		}
		else{
			std::cout << "NO" << std::endl;
		}
	}
	return 0;
}

Measured memory_bytes: 1152
#include<iostream>
#include<vector>

using namespace std;

int main(){
    string s;
    vector<string> v;
    while(1){
        cin>>s;
        //string memo;
        if(s=="-")  break;
        int n;
        cin>>n;
        //vector<string> v;
        for(int i=0; i<n; i++){
            int t;
            cin>>t;
            //memo=s.substr(s.length()-t)+s.substr(0, t);
            s=s.substr(t)+s.substr(0,t);
            //s=s.substr(t);
        }
        //cout<<s<<endl;
        v.push_back(s);
    }
    for(int i=0; i<v.size(); i++){
        cout<<v[i]<<endl;
    }
    return 0;
}


Measured memory_bytes: 3164
#include<bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl; 
#define INF 1000000000
#define mod 1000000007
typedef long long ll;
const ll LINF = 1001002003004005006ll;
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

template<unsigned MOD>
struct RollingHash{
    //hashed: hashed[0]=0でhashed[i+1]=0~iのハッシュ値
    //hashed[k]=Σ[i=0 to k]s[i]*base^(k-i-1)
    vector<unsigned> hashed,power;
    //↓????
    inline unsigned mul(unsigned a, unsigned b) const{
        unsigned long long x=(unsigned long long) a*b;
        unsigned xh=(unsigned)(x>>32), xl=(unsigned)x,d,m;
        asm("divl %4; \n\t" : "=a" (d), "=d" (m) : "d" (xh), "a" (xl), "r" (MOD));
        return m;
    }
    RollingHash(const string &s, unsigned base=10007){
        int sz=(int)s.size();
        hashed.assign(sz+1,0);
        power.assign(sz+1,0);
        power[0]=1;
        for(int i=0;i<sz;i++){
            power[i+1]=mul(power[i],base);
            //s[i]の値をそのまま足してるから
            //sが数字になろうがアルファベットだろうがok
            hashed[i+1]=mul(hashed[i],base)+s[i];
            if(hashed[i+1]>=MOD) hashed[i+1]-=MOD;
        }
    }
    //[l,r)のハッシュ値の取得
    //abracadabra
    //hashed[7]           =a*base^6+b*base^5+r*base^4+...+d
    //hashed[3]           =a*base^2+b*base  +r
    //hashed[3]*base^(7-3)=a*base^6+b*base^5+r*base^4
    //引くと[l,r)のハッシュ値が求まる
    unsigned get(int l, int r)const{
        unsigned ret=hashed[r]+MOD-mul(hashed[l],power[r-l]);
        if(ret>=MOD)ret-=MOD;
        return ret;
    }
    // h1,h2はハッシュ値
    unsigned connect(unsigned h1, int h2, int h2len) const{
        unsigned ret=mul(h1,power[h2len])+h2;
        if(ret>=MOD) ret-=MOD;
        return ret;
    }
    //l1,r1 : このハッシュの区間[l1,r1)
    //比較したいハッシュbと，それの区間[l2,r2)
    //返り値はLongestCommonPrefixの長さ
    //単純な文字列の比較ならgetして比べる．O(1)とO(log)違うから
    //logは定数じゃない！(戒め)
    int LCP(int l1, int r1, const RollingHash<MOD> &b, int l2, int r2){
        //ニブタンをする
        int len=min(r1-l1,r2-l2);
        int low=-1,high=len+1;
        while(high-low>1){
            int mid=(low+high)/2;
            if(get(l1,l1+mid)==b.get(l2,l2+mid))    low =mid;
            else                                    high=mid;
        }
        return (low);
    }
};using RH = RollingHash<1000000007>;

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

    string s,t;cin>>s>>t;
    RH r1(s),r2(t);
    for(int i=0;i+t.size()<=s.size();i++){
        if(r1.get(i,i+t.size())==r2.get(0,t.size())) cout<<i<<endl;
    }
    return 0;
}



Measured memory_bytes: 11796
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        
        for(int i = 0;i < (s.length / 2);i++) {
            char tmp = s[i];
            s[i] = s[s.length - i - 1];
            s[s.length - i - 1] = tmp;
        }
        
        int[] result = new int[2019];
        long ans = 0;
        result[0] = 1;
        int num = 0;
        int ten = 1;
        for(int i = 0;i < s.length;i++) {
            num = (num + ten * (s[i] - '0')) % 2019;
            ans += result[num];
            result[num] += 1;
            ten = ten * 10 % 2019;
        }

        System.out.println(ans);
    }
}

Measured memory_bytes: 40820
# 解説AC
N = int(input())
A = map(int, input().split())

children = [(a, i) for i, a in enumerate(A)]

children.sort(reverse=True)

# dp[i][j]: うれしさの合計の最大値
# i: 左端の個数
# j: 右端の個数
dp = [[0] * (N + 1) for _ in range(N + 1)]

ans = 0
# 配るDP
for l in range(N):
    for r in range(N):
        if l + r == N:
            ans = max(ans, dp[l][r])
            break
        activeness, idx = children[l + r]
        dp[l + 1][r] = max(dp[l + 1][r], dp[l][r] + abs(idx - l) * activeness)
        dp[l][r + 1] = max(dp[l][r + 1], dp[l][r] + abs(idx - (N - 1 - r)) * activeness)

print(ans)

Measured memory_bytes: 100772
//#include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>

using namespace std;

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

    int N;

    cin >> N;

    for(int i = 1; i < 10; i++) {
        for(int j = 1; j < 10; j++) {
            if(N == i * j) {
                cout << "Yes";
                return 0;
            }
        }
    }

    cout << "No";
}

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

int main(){
  int n;
  cin >> n;
  std::vector<int> vec(n);
  rep(i,n) cin >> vec.at(i);
  int cnt = 0;
  rep(i,n-2) {
    std::vector<int> v = 	vector(vec.begin() + i, vec.begin()+ i + 3);
    sort(v.begin(),v.end());
    if (vec.at(i+1) == v.at(1)) cnt++;
  }
  cout << cnt << endl;
}


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

#define mp make_pair
#define pb push_back

typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ll, ll> l4;

int main()
{
  int n;
  scanf("%d", &n);
  vector<int> L(2*n);
  for (auto &e : L)
    scanf("%d", &e);
  sort(L.begin(), L.end());
  int ans = 0;
  for (int i = 0; i < 2*n; i += 2)
    ans += L[i];
  printf("%d\n", ans);
}


Measured memory_bytes: 256
N,K=map(int,input().split())
p=list(map(int,input().split()))
expection=[0]*N
for i in range(N):
    expection[i]=(p[i]+1)/2
accumulation=[0]*(N+1)
for i in range(N):
    accumulation[i+1]=accumulation[i]+expection[i]
ans=0
for i in range(N-K+1):
    ans=max(ans,accumulation[i+K]-accumulation[i])
print(ans)

Measured memory_bytes: 32528
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
	int n,k;
	string ans="";
	cin>>n;
	while(n)
	{
		k=n%26;
		if(!k)
		{
			k=26;
			n--;
		}
		ans=(char)('a'+k-1)+ans;
		n/=26;
	}
	cout<<ans;
	return 0;
}

Measured memory_bytes: 3628
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <list>
#include <bitset>
#include <numeric>
#include <utility>
#define INF 1e9
#define MOD 1000000007
#define ll long long
using namespace std;
typedef unsigned long long ull;
typedef pair<int, int> pr;


int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    int n;
    cin>>n;
    vector<int>a(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    int ans=0;
    bool b=false;
    int max=0;
    for(int i=0;i<n;i++){
        if(a[i]%2==1){b=true;}
    }
    if(b){
        cout<<"first"<<endl;
        return 0;
    }
    
    cout<<"second"<<endl;

    return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define mod(mod_x) ((((long long)mod_x+modulo))%modulo)
#define Inf 100000000



int main(){
	
	int N,M;
	cin>>N>>M;
	
	vector<vector<int>> E(N,vector<int>());
	for(int i=0;i<M;i++){
		int u,v;
		cin>>u>>v;
		u--;v--;
		E[u].push_back(v);
		E[v].push_back(u);
	}
	
	vector<int> dis(N,Inf);
	dis[0] = 0;
	queue<int> Q;
	Q.push(0);
	while(Q.size()!=0){
		int from = Q.front();
		Q.pop();
		for(int i=0;i<E[from].size();i++){
			int to = E[from][i];
			if(dis[to]!=Inf)continue;
			dis[to] = dis[from]+1;
			Q.push(to);
		}
	}
	
	cout<<"Yes"<<endl;
	for(int i=1;i<N;i++){
		for(int j=0;j<E[i].size();j++){
			int to = E[i][j];
			if(dis[to] == dis[i]-1){
				cout<<to+1<<endl;
				break;
			}
		}
	}
	
	return 0;
}



Measured memory_bytes: 10336
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
#import numpy as np
from itertools import product
def main():
    x = int(input())
    n5 = [i**5 for i in range(201)]

    c = product(n5, repeat=2)
    for ce in c:
        if ce[0] + ce[1] == x:
            r = (int(ce[0]**0.2), int(ce[1]**0.2)* -1)
            break
        elif ce[0] - ce[1] == x:
            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2))
            break
    print(*r, sep=' ')

if __name__ == '__main__':
    main()


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

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

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

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


Measured memory_bytes: 3632
from collections import deque
N = int(input())
A = [int(x) for x in input().split()]
if N%2==0:
    queue = deque()
    for i in range(0, N, 2):
        queue.append(A[i])
        queue.appendleft(A[i+1])
else:
    queue = deque([A[0]])
    for i in range(1, N, 2):
        queue.append(A[i])
        queue.appendleft(A[i+1])

print(*queue)


    
    

Measured memory_bytes: 25412
#pragma region template
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vld = vector<ld>;
using vvld = vector<vld>;
using vvvld = vector<vvld>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using vp = vector<pll>;
template <typename T>
using pqrev = priority_queue<T, vector<T>, greater<T>>;
#define rep(i, n) for (ll i = 0, i##_end = (n); i < i##_end; i++)
#define repb(i, n) for (ll i = (n)-1; i >= 0; i--)
#define repr(i, a, b) for (ll i = (a), i##_end = (b); i < i##_end; i++)
#define reprb(i, a, b) for (ll i = (b)-1, i##_end = (a); i >= i##_end; i--)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((ll)(x).size())
//*
constexpr ll MOD = 1e9 + 7;
/*/
constexpr ll MOD = 998244353;
//*/
constexpr ll INF = 1e+18;
constexpr ld EPS = 1e-12L;
constexpr ld PI = 3.14159265358979323846L;
constexpr ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }
constexpr ll LCM(ll a, ll b) { return a / GCD(a, b) * b; }
template <typename S, typename T>
constexpr bool chmax(S &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename S, typename T>
constexpr bool chmin(S &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
#ifdef OJ_LOCAL
#include "dump.hpp"
#else
#define dump(...) ((void)0)
#endif
template <typename T>
bool print_(const T &a) {
  cout << a;
  return true;
}
template <typename T>
bool print_(const vector<T> &vec) {
  for (auto &a : vec) {
    cout << a;
    if (&a != &vec.back()) {
      cout << " ";
    }
  }
  return false;
}
template <typename T>
bool print_(const vector<vector<T>> &vv) {
  for (auto &v : vv) {
    for (auto &a : v) {
      cout << a;
      if (&a != &v.back()) {
        cout << " ";
      }
    }
    if (&v != &vv.back()) {
      cout << "\n";
    }
  }
  return false;
}
void print() { cout << "\n"; }
template <typename Head, typename... Tail>
void print(Head &&head, Tail &&... tail) {
  bool f = print_(head);
  if (sizeof...(tail) != 0) {
    cout << (f ? " " : "\n");
  }
  print(forward<Tail>(tail)...);
}
#pragma endregion

void Pr(bool f){
  cout << (f ? "Yes" : "No") << "\n";
  exit(0);
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  ll a, b, c, n;
  cin >> a >> b >> c >> n;
  ll ans = 0;
  rep(i, 3001){
    rep(j, 3001){
      if((n-a*i-b*j) >= 0 && (n-a*i-b*j)%c == 0){
        ans++;
      }
    }
  }
  print(ans);
}


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

int main(){
    int n;
    int w[100010];

    int ans = INT_MAX;

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

    for(int i = 0;i < n;i++){
        int t1 = 0;
        int t2 = 0;
        for(int j = 0;j < n;j++){
            if(j <= i) t1 += w[j];
            else t2 += w[j];
        }
        ans = min(ans, abs(t1-t2));
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int gcd(int a,int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int main() {
    ll a,b;
    cin>>a>>b;
    cout<<(a*3+b)/2;
    return 0;
}


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

int main() {
    int h1, h2, m1, m2, K;
    cin >> h1 >> m1 >> h2 >> m2 >> K;
    if (h1 == h2) cout << m2 - m1 - K << endl;
    else cout << 60 * (h2 - h1 - 1) + 60 - m1 + m2 - K << endl;
    return 0;
}

Measured memory_bytes: 3612
#include <stdio.h>
 
int main () 
{
    int N,i;
    int j = 0;
    int c = 0;
    int A[205];

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

    while(1)
    {
         if(A[j]%2!=0)
            break;
        if(j<N)
        {
            A[j] = A[j]/2;
            j++;
        }else{
            j = 0;
            c++;
        }
    }
printf("%d\n",c);
return 0;
}

Measured memory_bytes: 128
import sys, math, re
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N, M, K = mi()

    for k in range(N+1):
        for l in range(M+1):
            if k*(M-l)+(N-k)*l == K:
                print('Yes')
                return

    print('No')


if __name__ == "__main__":
    main()

Measured memory_bytes: 9752
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        #[cfg(debug_assertions)]
        writeln!(&mut std::io::stderr(), concat!("[DEBUG] ", $(stringify!($a), "={:?} "),*), $($a),*);
    }
}

#[allow(unused_imports)]
use std::cmp::{min, max};

#[allow(unused_imports)]
use std::io::Write;

fn main() {
    input!{
      mut x: i64,
      mut y: i64,
    }
    let mut ans = 0;
    if y == 0 {
        if x > 0 {
            ans = x + 1;
        } else {
            ans = x.abs();
        }
    } else if y > 0 {
        if x.abs() <= y.abs() {
            if x >= 0 {
                ans = y - x;
            } else {
                ans = y - x.abs() + 1;
            }
        } else {
            if x >= 0 {
                ans = x - y + 2;
            } else {
                ans = x.abs() - y + 1;
            }
        }
    } else {
        if x.abs() <= y.abs() {
            if x >= 0 {
                ans = y.abs() - x + 1;
            } else {
                ans = y.abs() - x.abs() + 2;
            }
        } else {
            if x >= 0 {
                ans = x - y.abs() + 1;
            } else {
                ans = x.abs() - y.abs();
            }
        }
    }
    println!("{}", ans);
}


Measured memory_bytes: 4352
function Main(input) {
	input = input.split("\n");
	var s = input[0].split("").sort();
	var t = input[1].split("").sort().reverse();
	var i = 0;	
	while(1){
        if( typeof t[i] === 'undefined'){
			console.log("No");
			break;
		}
		if( typeof s[i] === 'undefined'){
			console.log("Yes");
			break;
		}
		if ( s[i] == t[i] ){
          	i++;
        	continue; 
        }
		else if ( s[i] < t[i] ){
			console.log("Yes");
			break;
		}
      	else if ( s[i] > t[i] ){
        	console.log("No");
			break;
        }
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Measured memory_bytes: 21064
/*ex3_4
    takafumi_ueki*/
#include <stdio.h>
int main(void){
    int x,i;
    int flag = 0;
    scanf("%d",&x);
    /*例えば,xを2で割った余りが０（２で割り切れる）かつ
    ２で割った商が10未満だったら一桁の整数同士の掛け算で表せるということなので、それを3,4,5,,,,と調べる。*/
    for(i = 1; i <= 9; i++){
        if((x%i == 0)&&(x/i)<10){
            printf("Yes\n");
            flag = 1;
            break;
        }
    }
    if(flag == 0){
        printf("No\n");
    }
    return 0;
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
# define mod 1000000007
# define INF (1 << 29)
# define MAX_N 1000010
/* ちゃんと考えてわかって実装 */

bool is_prime(ll n){
    for(ll i = 2; i * i <= n; i++){
        if(n % i == 0) return false;
    }
    return n != 1; // exception:n=1
}

int main(void){
    ll x;
    cin >> x;
    for(ll i=x; i<MAX_N; i++){
        if(is_prime(i)){
            cout << i;
            break;
        }
    }
    return 0;
}

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

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

int main() {
    int d, n;
    cin >> d >> n;
    int ans = (n == 100 ? 101 : n);
    for (int i = 0; i < d; ++i) {
        ans *= 100;
    }
    cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll int>
#define vs vector<string>
#define v vector<int>
#define vd vector<double>
#define mi map<int,int>
#define mc map<char,int>
//ios_base::sync_with_stdio(false);cin.tie(NULL);

using namespace std;

int32_t main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);
	double d,t,s;
	double r;
	cin>>d >>t >>s;
	r=d/s;
	//cout<<r <<"\n";
	if(d==0||t==0||s==0){cout<<"No" <<"\n";}
	else{
		if(r<=t){cout<<"Yes" <<"\n";}
		else{cout<<"No" <<"\n";}
		
		}
}


Measured memory_bytes: 3732
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in Actual solution is at the top
 *
 * @author Silviase
 */
public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    CShoppingStreet solver = new CShoppingStreet();
    solver.solve(1, in, out);
    out.close();
  }

  static class CShoppingStreet {

    public void solve(int testNumber, Scanner in, PrintWriter out) {
      int n = in.nextInt();
      boolean[][] isOpen = new boolean[n][10];
      int[][] profitTable = new int[n][11];

      for (int i = 0; i < n; i++) {
        for (int j = 0; j < 10; j++) {
          // 店iは時刻jにopenしているか
          isOpen[i][j] = (in.nextInt() == 1);
        }
      }

      for (int i = 0; i < n; i++) {
        for (int j = 0; j < 11; j++) {
          profitTable[i][j] = in.nextInt();
        }
      }

      int ans = Integer.MIN_VALUE;
      boolean[] isJoisinoOpen = new boolean[10];

      for (int i = 1; i <= 1023; i++) {
        int num = i;
        int profitJoisinoGet = 0;
        for (int j = 0; j < 10; j++) {
          isJoisinoOpen[j] = ((num % 2) == 1);
          num /= 2;
        }

        int[] countBothOpen = new int[n];

        for (int j = 0; j < n; j++) {
          for (int k = 0; k < 10; k++) {
            if (isJoisinoOpen[k] && isOpen[j][k]) {
              countBothOpen[j]++;
            }
          }
          // out.println("both open:" + countBothOpen[j]);
          profitJoisinoGet += profitTable[j][countBothOpen[j]];
        }

        ans = Math.max(ans, profitJoisinoGet);

        // out.println("i:" + i + " profit:" + profitJoisinoGet);

      }

      out.println(ans);
    }

  }
}

Measured memory_bytes: 26996
def calc(N, M, student, point) : 
  translatepoint = list()
  for i in range(N) : 
    mindistance = 10 ** 9
    minpoint = -1
    for j in range(M) : 
      distance = abs(student[i][0] - point[j][0]) + abs(student[i][1] - point[j][1])
      if distance < mindistance : 
        mindistance = distance
        minpoint = j + 1
    
    translatepoint.append(minpoint)
  return translatepoint


N, M = tuple(map(int, input().split()))
student = list()
point = list()

for i in range(N) : 
  student.append(tuple(map(int, input().split())))
  
for j in range(M) : 
  point.append(tuple(map(int, input().split())))
  
ans = calc(N, M, student, point)

for i in range(len(ans)) : 
  print(ans[i])

Measured memory_bytes: 3064
/*
    Author: Nguyen Tan Bao
    Status:
    Idea:
*/
 
#include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(),a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define FORE(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++)
//__builtin_ffs(x) return 1 + index of least significant 1-bit of x
//__builtin_clz(x) return number of leading zeros of x
//__builtin_ctz(x) return number of trailing zeros of x
 
using namespace std;
using ll = long long;
using ld = double;
typedef pair<int, int> II;
typedef pair<II, int> III;
typedef complex<ld> cd;
typedef vector<cd> vcd;
 
const ll MODBASE = 1000000007LL;
const int MAXN = 200010;
const int MAXM = 1000;
const int MAXK = 16;
const int MAXQ = 200010;

int n, m, b[MAXN];
II a[MAXN];
vector<II> A[MAXN];
bool pick[MAXN], visit[MAXN];

int dfs(int u) {
    visit[u] = true;
    int x = b[u];
    FOR(i,0,SZ(A[u])-1) {
        int v = A[u][i].FI;
        int idx = A[u][i].SE;
        if (!visit[v] && dfs(v)) {
            x ^= 1;
            pick[idx] = true;
        }
    }
    return x;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
    cin >> n >> m;
    FOR(i,1,n) cin >> a[i].FI >> a[i].SE;
    sort(a+1, a+n+1);
    FORE(i,n+1,1) b[i] = a[i].SE ^ a[i-1].SE;

    FOR(i,1,m) {
        int l, r;
        cin >> l >> r;
        int dau = 1, cuoi = n;
        while (dau <= cuoi) {
            int mid = (dau + cuoi) >> 1;
            if (a[mid].FI >= l) cuoi = mid-1;
            else dau = mid+1;
        }
        int L = dau;

        dau = 1, cuoi = n;
        while (dau <= cuoi) {
            int mid = (dau + cuoi) >> 1;
            if (a[mid].FI > r) cuoi = mid-1;
            else dau = mid+1;
        }
        int R = cuoi;
        if (L <= R && L >= 1 && L <= n+1 && R >= 1 && R <= n+1) {
            A[L].emplace_back(II(R+1, i));
            A[R+1].emplace_back(II(L, i));
        }
    }

    FOR(i,1,n)
        if (!visit[i] && dfs(i)) {
            cout << -1;
            return 0;
        }
    
    int res = 0;
    FOR(i,1,m) res += pick[i];
    cout << res << "\n";
    FOR(i,1,m) 
        if (pick[i]) cout << i << ' ';
    return 0;
}


Measured memory_bytes: 17792
#include<bits/stdc++.h>
#define rep(i,k,n) for(int i=k;i<=n;i++)
#define per(i,n,k) for(int i=n;i>=k;i--)
#define pb push_back
#define pii pair<int,int>
#define fi first
#define se second
#define mp make_pair
#define ll long long
using namespace std;
const int maxn=3005;
int f[maxn][maxn];
int n,m;
string sn,sm,ans;
int main()
{
	cin>>sn>>sm;
	n=sn.size();m=sm.size();
	sn=" "+sn;sm=" "+sm;
	rep(i,1,n) rep(j,1,m)
	{
		if(sn[i]!=sm[j]) f[i][j]=max(f[i-1][j],f[i][j-1]);
		else f[i][j]=f[i-1][j-1]+1;
	}
	int i=n,j=m;
	while(j>=1 && i>=1)
	{
		if(sn[i]==sm[j])
		{
			ans=sn[i]+ans;
			i--;j--;
			continue;
		}
		if(f[i-1][j]==f[i][j]) i--; else j--;
	}
	cout<<ans;
	return 0;
}

Measured memory_bytes: 35456
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

public class Main {
	static final Scanner s = new Scanner(System.in);

	static final long[] fal_rnd(int size, boolean parallel) {
		AtomicInteger l = new AtomicInteger(-1), r = new AtomicInteger(size);
		long[] res = new long[size];
		(parallel ? INS(size).parallel() : INS(size)).unordered().mapToLong(Long::parseLong).forEach(
				v -> res[ThreadLocalRandom.current().nextBoolean() ? l.incrementAndGet() : r.decrementAndGet()] = v);
		return res;
	}

	static final IntStream REPS(int v) {
		return IntStream.range(0, v);
	}

	static final Stream<String> INS(long size) {
		return StreamSupport
				.stream(Spliterators.spliterator(s, size, Spliterator.NONNULL & Spliterator.IMMUTABLE), false)
				.limit(size);
	}

	static HashMap<Integer, ArrayList<String>> map = new HashMap<>();

	public static void main(String __[]) {
		int in;
		while ((in=s.nextInt())!=0) {
			int r=1145141919;
			for(int z=0;z*z*z<=in;z++) {
				int in2 = in-z*z*z;
				for(int y=0;y*y<=in2;y++) {
					int x=in2-y*y;
					r=Math.min(x+y+z,r);
				}
			}
			System.out.println(r);
		}
	}
}

Measured memory_bytes: 34316
use std::io::{stdin, Read};
 
fn main() {
    let mut args = String::new();
    stdin().read_line(&mut args);
    let args: Vec<i32> = args.trim().split_whitespace().filter_map(|it|it.parse().ok()).collect();
    println!("{}", if args[0] > 8 || args[1] > 8 { ":(" } else { "Yay!" });
}


Measured memory_bytes: 4352
import java.util.Scanner;
public class Main
{
  public static void main(String[] args)
  {
    Scanner sc=new Scanner(System.in);
    int N=sc.nextInt();
    N++;
    int A[]=new int[N];
    int B[]=new int[N];
    int C[]=new int[N-1];
    for (int i=1;i<N;i++)
      A[i]=sc.nextInt();
    for (int i=1;i<N;i++)
      B[i]=sc.nextInt();
    
    for (int i=1;i<N-1;i++)
      C[i]=sc.nextInt();
    
    int sat=0;
    int prev=-1;
    for (int i=1;i<N;i++)
    {
      if ((prev+1)==A[i])
        sat+=B[A[i]]+C[A[i]-1];
      
      else
        sat+=B[A[i]];
      prev=A[i];
      
    }
    System.out.println(sat);
  }
}

Measured memory_bytes: 25300
div = 10**9 + 7
ans = 0

N = int(input())
A = list(map(int, input().split()))

#最大値
A_max = max(A)
#最大値を２進数化
A_max_bin = format(A_max, 'b')
#その桁数
max_digits = len(A_max_bin)

#print(max_digits)

input_format = '0' + str(max_digits) + 'b'

A_bin = [ format(item,input_format) for item in A]

#print(A_bin)

ans = 0

for i in range(1,max_digits+1):
    num0 = 0
    num1 = 0
    #print("桁数 : " + str(i))
    for A_i in A_bin:

        #print(str(A_i) + " : " + str(A_i[-i]))
        #i桁目が0だったら

        #print(type(A_i[-1]))

        if A_i[-i] == '0':
            num0 += 1
        else:
            num1 += 1

    ans += num0 * num1 * 2**(i-1)
    #print(ans)

    num0 = 0
    num1 = 0

#print(ans)
print(ans%div)

Measured memory_bytes: 126596
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;
typedef long long int ll;

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

void P(int x) {cout << x << endl;}
void P(long x) {cout << x << endl;}
void P(ll x) {cout << x << endl;}
void P(string x) {cout << x << endl;}

#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define drep(i, n) for(int i = n - 1; i >= 0; i--)

const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;

int main() {
  int x, y ,z;
  cin >> x >> y >> z;
  cout << z << " " << x << " " << y << endl;
  return 0;
}

Measured memory_bytes: 256
N = int(input())
array = list(map(int,input().split()))
d,f = 0,array[0]
ans = [0]
for i in range(1,N):
  n = array[i]
  d = f - n
  if d >= 0:
    ans.append(d)
  else:
    ans.append(0)
  if n > f:
    f = n
print( sum(ans) )
  

Measured memory_bytes: 32180
import core.bitop;
import std.algorithm;
import std.ascii;
import std.bigint;
import std.conv;
import std.functional;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.random;
import std.typecons;
import std.container;

alias sread = () => readln.chomp();
ulong bignum = 1_000_000_007;
alias SugarWater = Tuple!(long, "swater", long, "sugar");

T lread(T = long)()
{
    return readln.chomp.to!T();
}

T[] aryread(T = long)()
{
    return readln.split.to!(T[])();
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}

void main()
{
    auto n = lread();
    auto a = aryread();
    double a_reverse = 0;
    foreach (e; a)
    {
        a_reverse += 1.0 / e;
    }
    writeln(1 / a_reverse);
}

Measured memory_bytes: 256
using System;
using System.Linq;
using System.Collections.Generic;

class P
{
    static void Main()
    {
        Console.ReadLine();
        int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int res = 0;
        while (true)
        {
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] % 2 == 0) a[i] /= 2;
                else goto end;
            }
            res++;
        }
        end:;
        Console.WriteLine(res);
    }
}

Measured memory_bytes: 11332
#include "bits/stdc++.h"
using namespace std;

#define sz(x) (int)(x.size())
#define FOR(i,L,R) for(int i = L; (L <= R? i <= R : i >= R); (L <= R? i += 1 : i -= 1))
#define int long long

const int N = 2e5 + 2, inf = 1e18;

int n, m, k, mat[3002][3002];
int dp[5][3002][3002];

int go(int i, int j, int row) {
    if(i < 1 || i > n || j < 1 || j > m) 
        return -inf;
    if(row > 3) 
        return -inf;

    int &ans = dp[row][i][j];
    if(~ans)
        return ans;

    if(i == n && j == m) {
        return (row == 3 ? 0 : mat[i][j]);
    }

    int c1 = mat[i][j] + go(i, j + 1, row + 1);
    int c2 = -inf;
    if(row < 3)
        c2 = mat[i][j] + go(i + 1, j, 0);
    int c3 = 0 + go(i, j + 1, row);
    int c4 = 0 + go(i + 1, j, 0);

    return ans = max({c1, c2, c3, c4});
}

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

    cin >> n >> m >> k;
    FOR(i,1,k) {
        int x, y, v;
        cin >> x >> y >> v;
        mat[x][y] = v;
    }
    memset(dp, -1, sizeof(dp));
    cout << go(1,1,0);
}


Measured memory_bytes: 426644
import copy
import sys
class Dice():
    def __init__(self, t, s, e, w, n, b):
        self.a = [t, s, e, w, n, b]
        self.a_org = copy.deepcopy(self.a)

    def reset(self):
        self.a = copy.deepcopy(self.a_org)
    
    def shake(self, me):
        if me == 'S':
            self.b = [self.a[int(i)] for i in '402351']
            self.a = self.b
        elif me == 'N':
            self.b = [self.a[int(i)] for i in '152304']
            self.a = self.b
        if me == 'W':
            self.b = [self.a[int(i)] for i in '215043']
            self.a = self.b
        if me == 'E':
            self.b = [self.a[int(i)] for i in '310542']
            self.a = self.b  
    def get(self, dir):
        if dir == 't': return self.a[0]
        elif dir == 's': return self.a[1]
        elif dir == 'e': return self.a[2]
        elif dir == 'w': return self.a[3]
        else: print('input err', dir)
    def front(self, f):
        self.reset()
        if f == 0:self.shake('S')
        elif f == 4:self.shake('S');self.shake('S')
        elif f == 3:self.shake('E');self.shake('S')
        elif f == 2:self.shake('W');self.shake('S')
        elif f == 5:self.shake('N')

n1 = list(map(int, input().split()))
n2 = list(map(int, input().split()))

d1 = Dice(*n1)
d2 = Dice(*n2)

for i in range(6):
    if d1.a == d2.a:
        print('Yes')
        sys.exit()
    else:
        d2.front(i)
        if d1.a == d2.a:
            print('Yes')
            sys.exit()
    for _ in range(3):
        d2.shake('W')
        if d1.a == d2.a:
            print('Yes')
            sys.exit()
        
print('No')


Measured memory_bytes: 6356
#include<stdio.h>
 
int main(void){
  char moji;
  scanf("%c", &moji);
 
  if((moji>= 'a') && (moji<='z')){
    printf("a\n");
  }
  else if((moji>= 'A') && (moji<='Z')){
    printf("A\n");
  }
 
  return 0;
}

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

#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)

namespace IO {
    #define gc getchar()
    template <typename T>
    inline void read(T& x) {
        x = 0; bool f = 1; char ch;
        for (ch = gc; ch < '0' || '9' < ch; ch = gc) if (ch == '-') f ^= 1;
        for (; '0' <= ch && ch <= '9'; ch = gc) x = (x << 3) + (x << 1) + (ch ^ 48);
        x = f ? x : -x;
    }
    #undef gc
}

int k;

int main() {
    IO::read(k);
    rep(i, 1, k) printf("ACL");
    return 0;
}

Measured memory_bytes: 3688
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define ll long long
#define lson rt << 1
#define rson rt << 1 | 1
#define N 200010
#define M 1010

using namespace std;
const int mod = 998244353;
const int inv = 443664157;
int n, m;
struct node {
	ll sum, len, lazy;
}tree[N << 2];

int read() {
	int s = 0, f = 0; char ch = getchar();
	while (!isdigit(ch)) f |= (ch == '-'), ch = getchar();
	while (isdigit(ch)) s = s * 10 + (ch ^ 48), ch = getchar();
	return f ? -s : s;
}

ll q_pow(ll a, ll b) {
	ll ans = 1;
	while (b) {
		if (b & 1) ans = (ans * a) % mod;
		a = (a * a) % mod;
		b >>= 1; 
	}
	return ans;
}

void push_up(int rt) {
	tree[rt].sum = ((tree[lson].sum * q_pow(10, tree[rson].len)) % mod + tree[rson].sum) % mod;
}

void build(int rt, int l, int r) {
	tree[rt].lazy = 0, tree[rt].len = (r - l + 1) * 1ll;
	if (l == r) {
		tree[rt].sum = 1ll;
		return;
	}
	int mid = (l + r) >> 1;
	build(lson, l, mid), build(rson, mid + 1, r);
	push_up(rt);
}

void push_down(int rt) {
	if (!tree[rt].lazy) return;
	tree[lson].sum = ((q_pow(10, tree[lson].len) - 1ll + mod) % mod * tree[rt].lazy) % mod;
	tree[lson].sum = (tree[lson].sum * inv) % mod;
	tree[rson].sum = ((q_pow(10, tree[rson].len) - 1ll + mod) % mod * tree[rt].lazy) % mod;
	tree[rson].sum = (tree[rson].sum * inv) % mod;
	tree[lson].lazy = tree[rt].lazy;
	tree[rson].lazy = tree[rt].lazy;
	tree[rt].lazy = 0;
}

void change(int rt, ll col, int l, int r, int L, int R) {
	if (L <= l && r <= R) {
		tree[rt].sum = ((q_pow(10, tree[rt].len) - 1ll + mod) % mod * col) % mod;
		tree[rt].sum = (tree[rt].sum * inv) % mod;
		tree[rt].lazy = col;
		return;
	}
	push_down(rt);
	int mid = (l + r) >> 1;
	if (L <= mid) change(lson, col, l, mid, L, R);
	if (R > mid) change(rson, col, mid + 1, r, L, R);
	push_up(rt);
}

int main() {
	n = read(), m = read();
	build(1, 1, n);
	for (int i = 1; i <= m; i++) {
		ll l = read(), r = read(), c = read();
		change(1, c, 1, n, l, r);
		printf("%lld\n", tree[1].sum);
	}
	return 0;
}

Measured memory_bytes: 15456
#include <bits/stdc++.h>
#define REP(i,n) for (long long i=0;i<(n);i++)
#define FOR(i,a,b) for (long long i=(a);i<(b);i++)
#define dump(x)  cerr << #x << " => " << (x) << endl
#define MIN(vec) *min_element(vec.begin(), vec.end())
#define MAX(vec) *max_element(vec.begin(), vec.end())
#define UNIQ(vec) vec.erase(unique(vec.begin(), vec.end()),vec.end()) //ソートの必要あり
#define IN(n,m)  (!(m.find(n) == m.end()))
#define FINDL(vec,x) (lower_bound(vec.begin(),vec.end(),x) - vec.begin())
#define FINDU(vec,x) (upper_bound(vec.begin(),vec.end(),x) - vec.begin())
#define EQ(a,b) (abs(a - b) < 1e-10)
using namespace std;
typedef long long LL;
constexpr int dx[4] = {0,1,0,-1};
constexpr int dy[4] = {1,0,-1,0};
constexpr long double pi = M_PI;
constexpr double eps = 1e-10;
constexpr long mod = 1000000007;
// LONG_MAX,LLONG_MAX
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class Key,class Value> ostream& operator << (ostream &s, map<Key,Value> M)
{ for ( auto itr = begin(M); itr != end(M); ++itr) { s << itr->first << ":" << itr->second; } return s;}


int main(void) {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N,K;
    cin >> N >> K;
    
    vector<int> A(N);
    vector<int> dp(K+1,-1);
    REP(i,N) cin >> A[i];
    REP(i,A[0]) dp[i] = 0;

    FOR(k,A[0],K+1) {
        vector<int> grundySet;
        for(int a : A) {
            if (a > k) break;
            if (dp[k-a] != -1 ) {
                grundySet.push_back(dp[k-a]);
            }
        }
        if (grundySet.size() == 0) {
            continue;
        }
        sort((grundySet).begin(),(grundySet).end(),[](auto comp1,auto comp2) {
            return comp1 < comp2;
        });
        int num = 0;
        for(int e : grundySet) {
            if (num != e) {
                break;
            }
            else num++;
        }
        dp[k] = num;
    }

    if (dp[K] == 0) cout << "Second" << endl;
    else cout << "First" << endl;
}



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

int main() 
{
	int N;
	cin>>N;
	vector <int> v;
	for(int i=1;i<=9;i++)
	{
	    for(int j=1;j<10;j++)
	    {
	        v.push_back(i*j);
	    }
	}
	//sort(v.begin(),v.end());
    for(int i=0;i<v.size();i++)
    {
        if(v[i]==N)
        {
            cout<<"Yes";
            return 0;
        }
    }
    cout<<"No"<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using Int = long long;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define ALL(v) (v).begin(), (v).end()
#define PUTS(x) cout << (x) << endl;
#define SZ(x) ((int)(x).size())
#define PB push_back
#define MP make_pair
#define F first
#define S second
const int MOD = 1000000007;

int main() {
    std::cout << std::fixed << std::setprecision(20);
    Int r;
    cin >> r;
    PUTS(M_PI * 2 * r);
}


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

#define int long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x) cout << #x << " = " << (x) << endl;
#define fs first
#define sc second
#define pb push_back
#define eb emplace_back
#define SP << " " <<

typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
typedef vector<int> vec;
typedef vector<P> pvec;
typedef vector<vector<int>> vvec;
typedef vector<vector<P>> pvvec;
typedef priority_queue<int> PQI;
typedef priority_queue<P> PQP;
typedef priority_queue<int,vector<int>,greater<int>> PQIG;
typedef priority_queue<P,vector<P>,greater<P>> PQPG;

const vector<int> DX = {0, -1, 0, 1, 1, 1, -1, -1};
const vector<int> DY = {1, 0, -1, 0, 1, -1, 1, -1};
constexpr int MOD = (1000000007);
// const int MOD = (998244353);
// const int INF = (1 << 30); // 1073741824
const ll INF = (1LL << 60); // 1152921504606846976
const double PI = (3.141592653589794);
const double EPS = (0.0000000001); // 10^(-10)

template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return 1;} return 0;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return 1;} return 0;}
template<class T> inline T ceil(T a, T b) {return T((a + b - 1) / b);}
template<class T> inline T round(T a, T b) {return T(a / b);}
template< typename T1, typename T2 > istream &operator>>(istream &is, pair< T1, T2 > &p) { is >> p.first >> p.second; return is; }
template <class T> inline void out(T &a) { bool flag=true; for(auto&x:a){if(flag) {flag=false;} else{ cout << ' '; } cout<<x; } cout << endl; }



//----------------------------------------------------------------
int nmax=200000; // 2*(10^5)
vvec G(nmax);





void solve4ts()
{
  
  
  int d,t,s;
  cin>>d>>t>>s;
  int memo=s*t;
  if(d<=memo){
    cout<<"Yes";
  }
  else{
    cout<<"No";
  }
  
}
//-----------------------------------------------------------------

signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(15);
  int repeat = 1;
  // cin >> repeat;
  while(repeat--) solve4ts();
}

/*

g++ -std=c++1z code.cpp

./a.out

*/

Measured memory_bytes: 7816
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <climits>
#include <memory>
#include <sstream>
#include <iomanip>

using namespace std;


int main() {

	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;
	vector<vector<int>> dp(n, vector<int>(3));

	cin >> dp[0][0] >> dp[0][1] >> dp[0][2];

	for (int i = 1; i < n; i++) {
		vector<int> abc(3);
		cin >> abc[0] >> abc[1] >> abc[2];
		for (int j = 0; j < 3; j++) {
			int max = 0;
			for (int k = 0; k < 3; k++) {
				if (j != k) {
					int tmp = dp[i - 1][k] + abc[j];
					if (max < tmp)max = tmp;
				}
				dp[i][j] = max;
			}
		}
	}

	cout << max(dp[n - 1][0], max(dp[n - 1][1], dp[n - 1][2])) << endl;

	return 0;
}

Measured memory_bytes: 5760
/*
これを入れて実行
g++ code.cpp
./a.out
 */
 
#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <unordered_map>
#include <cmath>
#include <math.h>
#include <tuple>
#include <iomanip>
#include <bitset>
#include <functional>

#define all(x) (x).begin(),(x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
using namespace std;
typedef long long ll;
typedef long double ld;
 
int dy4[4] = {-1, 0, +1, 0};
int dx4[4] = {0, +1, 0, -1};
int dy8[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
int dx8[8] = {0, 1, 1, 1, 0, -1, -1, -1};
 
const long long INF = 1LL << 62;
const ll MOD = 1e9 + 7;
 
bool greaterSecond(const pair<int, int>& f, const pair<int, int>& s){
    return f.second > s.second;
}
 
ll gcd(ll a, ll b){
	if (b == 0)return a;
	return gcd(b, a % b);
}
 
ll lcm(ll a, ll b){
    return a / gcd(a, b) * b;
}

ll conbinationMemo[100][100];

void cmemoInit(){
    rep(i, 100){
        rep(j, 100){
            conbinationMemo[i][j] = -1;
        }
    }
}
 
ll nCr(ll n, ll r){
    if(conbinationMemo[n][r] != -1) return conbinationMemo[n][r];
    if(r == 0 || r == n){
        return 1;
    } else if(r == 1){
        return n;
    }
    return conbinationMemo[n][r] = (nCr(n - 1, r) + nCr(n - 1, r - 1));
}
 
ll nPr(ll n, ll r){
    r = n - r;
    ll ret = 1;
    for (ll i = n; i >= r + 1; i--) ret *= i;
    return ret;
}
//-----------------------ここから-----------
int n, m;
vector<int> h;
vector<vector<int>> g;
// void dfs(int now, vector<int> &visited){

//     bool ok = false;
//     rep(i, g[now].size()){
//         int next = g[now][i];
//         if()
//         if(visited[next] == 1) continue;
//     }
// }
int main(void){
    cin >> n >> m;
    h.resize(n);
    rep(i, n) cin >> h[i];
    g.resize(n);
    vector<int> ma(n, 0);
    rep(i, m){
        int a, b;
        cin >> a >> b;
        a--, b--;
        g[a].push_back(b);
        g[b].push_back(a);
        ma[a] = max(ma[a], h[b]);
        ma[b] = max(ma[b], h[a]);
    }
    int ans = 0;
    rep(i, n){
        if(h[i] > ma[i]) ans++;
    }

    cout << ans << endl;


}


Measured memory_bytes: 9068