akhauriyash/Code-Regression huggingface dataset:
#include <stdio.h>
#include <stdbool.h>

#define MAX_PACKET 100000

int num_packet;
int num_track;
int weight[MAX_PACKET];

bool canAlloc(long capacity);

int main(void)
{
    int i;

    scanf("%d %d", &num_packet, &num_track);

    int max_weight = 0;
    long sum_weight = 0;
    for (i = 0; i < num_packet; i++) {
        scanf("%d", &weight[i]);
        if (weight[i] > max_weight) {
            max_weight = weight[i];
        }
        sum_weight += weight[i];
    }

    long low = max_weight;
    long upp = sum_weight;
    while (low < upp) {
        long mid = (low + upp) / 2;
        if (canAlloc(mid)) {
            upp = mid;
        } else {
            low = mid + 1;
        }
    }

    printf("%ld\n", low);

    return 0;
}

bool canAlloc(long capacity)
{
    long i = 0;

    long alloced_in_one = 0;
    int track_id = 0;
    for (i = 0; i < num_packet; i++) {
        if (alloced_in_one + weight[i] <= capacity) {
            alloced_in_one += weight[i];
        } else {
            alloced_in_one = 0;
            i--;
            if (++track_id == num_track) {
                return false;
            }
        }
    }
    return true;
}

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

void input(int& rnLimit, vector<llong>& rvnCostA, vector<llong>& rvnCostB)
{
  int nCostASiz, nCostBSiz;
  cin >> nCostASiz >> nCostBSiz >> rnLimit;
  rvnCostA.resize(nCostASiz + 1);
  rvnCostB.resize(nCostBSiz + 1);

  for (int i = 1; i < rvnCostA.size(); i++)
  {
    int nOneCost;
    cin >> nOneCost;
    rvnCostA[i] = rvnCostA[i - 1] + nOneCost;
  }

  for (int i = 1; i < rvnCostB.size(); i++)
  {
    int nOneCost;
    cin >> nOneCost;
    rvnCostB[i] = rvnCostB[i - 1] + nOneCost;
  }
}

int calcMaxSelect(int nLimit, const vector<llong>& cnrvnCostA, 
                              const vector<llong>& cnrvnCostB)
{
  int nCntA = cnrvnCostA.size() - 1;
  
  while ( cnrvnCostA[nCntA] > nLimit )
    --nCntA;

  int nMaxSelect = nCntA;
  int nBgnB = 0;
  int nCntB;

  while ( nCntA >= 0    &&
          nBgnB < cnrvnCostB.size() )
  {
    while ( nBgnB < cnrvnCostB.size()  &&
            cnrvnCostA[nCntA] + cnrvnCostB[nBgnB] <= nLimit )
    {
      nCntB = nBgnB;
      ++nBgnB;
    }

    nMaxSelect = max(nMaxSelect, nCntA + nCntB);

    nBgnB = nCntB;
    --nCntA;
  }
  return nMaxSelect;
}
 
int main()
{
  int nLimit;
  vector<llong> vnCostA, vnCostB;

  input(nLimit, vnCostA, vnCostB);
  cout << calcMaxSelect(nLimit, vnCostA, vnCostB) << endl;

  return 0;
}

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

#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define repn(i, n) for(int (i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for(int (i) = (n-1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define lint long long
#define ulint unsigned long long
#define fi first
#define se second
#define setpre(x) cout << fixed << setprecision(x)

inline void logger(){ cout << endl; }
template<typename A, typename... B>
void logger(const A& a, const B&... b){
    cout << a << " , ";
    logger(b...);
}

typedef pair<lint, lint> P;
const lint MOD = 1000000007;
const lint MOD9 = 998244353;
const lint INF = MOD * MOD;
const int MAX = 100005;

/* ...o(^-^)o... */

int main(){
    int a, b; cin >> a >> b;
    if(a == b){
        string ans = "";
        rep(i, a){
            ans += to_string(a);
        }
        cout << ans << endl; return 0;
    }
    if(a < b) swap(a,b); string ans = "";
    rep(i, a){
        ans += to_string(b);
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define LINF (ll)INF*INF
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,a,n) for(int i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

#define int ll //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef vector<pii> vp;

int gcd(int a, int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int lcm(int a, int b){
    return a/gcd(a,b)*b;
}

int dp[105][3][3];

signed main(void) {
    int n,k;
    cin >> n >> k;
    vi v(n,-1);
    rep(i,k){
        int a,b;
        cin >> a >> b;
        v[a-1] = b-1;
    }
    rep(i,3)rep(j,3){
        if(v[0] != -1 && v[0] != i)continue;
        if(v[1] != -1 && v[1] != j)continue;
        dp[2][i][j] = 1;
    }
    loop(i,2,n)rep(j,3)rep(k,3)if(dp[i][j][k]){
        //cout << i << " " << j << " " << k << " " << dp[i][j][k] << " " << v[i] << endl;;
        rep(l,3){
            if(j == k && k == l)continue;
            if(v[i] != -1 && v[i] != l)continue;
            (dp[i+1][k][l] += dp[i][j][k]) %= 10000;
        }
    }
    int ans = 0;
    rep(i,3)rep(j,3)(ans += dp[n][i][j]) %= 10000;
    cout << ans << endl;
}



Measured memory_bytes: 3092
#include <bits/stdc++.h>
struct UnionFind {
    int sz;
    std::vector<int> par;
    UnionFind(int sz) {
        this->sz = sz;
        par.clear();
        par.resize(sz, -1);
    }
    int root(int x) {
        return par[x] < 0 ? x : par[x] = root(par[x]);
    }
    void unite(int a, int b) {
        int roota = root(a);
        int rootb = root(b);
        if(roota == rootb) return;
        if(par[rootb] < par[roota]) std::swap(roota, rootb);
        par[roota] += par[rootb];
        par[rootb] = roota;
    }
    bool same(int a, int b) {
        return (root(a) == root(b));
    }
    int size(int a) {
        return -par[root(a)];
    }
};
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1000000000010ll;
template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}
struct Weight {
  int n;
  vector<int> prev;
  vector<ll> w;
  Weight(int n): n(n) {
    prev.clear();
    prev.resize(n, -1);
    w.clear();
    w.resize(n, 0);
  }
  int root(int x) {
    if(prev[x] < 0) {
      assert(x >= 0);
      return x;
    } else {
      int tmpr = root(prev[x]);
      int tmpw = weight(prev[x]);
      w[x] += tmpw;
      prev[x] = tmpr;
      return tmpr;
    }
  }
  int size(int x) {
    return prev[x] < 0 ? -prev[x] : size(prev[x]);
  }
  ll weight(int x) {
    root(x);
    return w[x];
  }
  int root(int x, int y) {
    if(x == y) return y;
    else return prev[x] < 0 ? x : root(prev[x], y);
  }
  void update(int a, int b, ll wa) {
    int ra = root(a);
    int rb = root(b);
    int sa = size(a);
    int sb = size(b);
    if(ra == rb) return;
    if(sa < sb) {
      wa -= weight(a);
      wa += weight(b);
      prev[rb] += prev[ra];
      prev[ra] = rb;
      w[ra] = wa;
    } else {
      wa = - wa;
      wa -= weight(b);
      wa += weight(a);
      prev[ra] += prev[rb];
      prev[rb] = ra;
      w[rb] = wa;
    }
  }
  ll query(int a, int b) {
    int ra = root(a);
    int rb = root(b);
    if(ra != rb) return LINF;
    return weight(b) - weight(a);
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  while(1) {
    int n, m; cin >> n >> m;
    if(n == 0) break;
    Weight wgt(n);
    for(int i=0;i<m;++i) {
      char c; cin >> c;
      if(c == '!') {
        int a, b, w; cin >> a >> b >> w;
        a--; b--;
        wgt.update(a, b, w);
      } else {
        int a, b; cin >> a >> b;
        a--; b--;
        ll tmp = wgt.query(a, b);
        if(tmp == LINF) cout << "UNKNOWN" << endl;
        else cout << -tmp << endl;
      }
    }
  }
}



Measured memory_bytes: 4176
N = int(input())

words = []

shiritori = True

first = input()
end = first[len(first)-1]
words.append(first)


for i in range(1,N):
    w = input()
    beg = w[0]
    if beg != end:
        shiritori = False
    if w in words:
        shiritori = False
    end = w[len(w)-1]
    words.append(w)

if shiritori:
    print("Yes")
else:
    print("No")

Measured memory_bytes: 3064
#include<bits/stdc++.h>
using namespace std;
int n,m,q,table[505][505],q1,q2,i,j,s,e;
int main(){
    scanf(" %d %d %d",&n,&m,&q);
    while(m--){
        scanf("%d %d",&s,&e);
        table[e][s]++;
    }
    for(i=1;i<=n;i++){
        for(j=n;j>=1;j--){
            table[i][j] += table[i][j+1];
        }
    }
    for(i=1;i<=n;i++){
        for(j=1;j<=n;j++){
            table[j][i] += table[j-1][i];
        }
    }
    while(q--){
        scanf("%d %d",&q1,&q2);
        printf("%d\n",table[q2][q1]);
    }
}


Measured memory_bytes: 1920
fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()
    val q = sc.nextInt()

    val r = IntArray(n) { k - q }
    val a = sc.asSequence().take(q).map(String::toInt).forEach {
        r[it - 1] += 1
    }
    r.forEach { println(if (it > 0) "Yes" else "No") }
}


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

int main() {
    int N;cin >> N;
    vector<int> V(N);
    rep(i,N){
        cin >> V.at(i);
    }
    int cnt=0;
    int m = N+1;
    rep(i,N){
        int now=V.at(i);
        if(m>now) cnt++;
        m=min(m,now);
        if(now==1) break;
    }

    cout << cnt << endl;
}

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

int main(int argc, char const *argv[])
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    string str;
    cin >> str;
    if(str == "ABC")
        cout << "ARC\n";
    else
        cout << "ABC\n";
}

Measured memory_bytes: 3620
#include <vector>
#include <algorithm>
#include <map>
#include <atcoder/dsu>
#include <set>
#include <iostream>

using namespace std;
using namespace atcoder;

typedef long long ll;
int n, m, x, y;

int main(int argc, const char * argv[]) {
    cin>>n>>m;
    dsu graph(n);
    for(int i = 0; i < m; ++i){
        cin>>x>>y;
        x--; y--;
        graph.merge(x, y);
    }
    auto res = graph.groups();
    cout<<res.size() - 1<<endl;
    return 0;
}

Measured memory_bytes: 8880
package main 

import (
	"sort"
	"fmt"
)

func main() {
	var n, a, sum int
	var arr []int

	fmt.Scanln(&n)

	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		arr = append(arr, a)
		sum += arr[i]
	}

	sort.Ints(arr)
	fmt.Println(arr[0], arr[n - 1], sum)
}


Measured memory_bytes: 2132
#include <iostream>
#include <string>
#include <vector>


int main(void){
  std::vector<long> L;
  long n, x;

  std::cin >> n >> x;
  for(int i=0; i<n; i++){
    long tmp;
    std::cin >> tmp;
    L.push_back(tmp);
  }

  int count = 1;
  int sum = 0;
  while(sum<=x && count<=n+1){
    sum += L[(count++)-1];
  }
  std::cout << (count-1) << std::endl;

  return 0;
}

Measured memory_bytes: 256
W, H, N = map(int, input().split())
xs = [0, W]
ys = [0, H]
for _ in range(N):
    x, y, a = map(int, input().split())
    if a == 1 and x > xs[0]:
        xs[0] = x
    elif a == 2 and x < xs[1]:
        xs[1] = x
    elif a == 3 and y > ys[0]:
        ys[0] = y
    elif a == 4 and y < ys[1]:
        ys[1] = y
    else:
        pass
x_len = xs[1] - xs[0] if xs[1] > xs[0] else 0
y_len = ys[1] - ys[0] if ys[1] > ys[0] else 0
print(x_len * y_len)


Measured memory_bytes: 62732
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <bitset>
#include <vector>
#include <queue>

using namespace std;

typedef long long ll;
#define FOR(i,a,b)   for(ll i = (a); i < (b); i++ )
#define REP(i, n)    FOR(i,0,n)
typedef pair< ll, ll >   cp2;
typedef pair< ll, cp2 >   cp3;
#define fi first
#define se second
#define sec  se.fi
#define thr  se.se
const ll mod = 1000000007;
//              123456789


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

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


int N;
int cnt = 0;
string S;

int main(){
    
    cin>>N;
    cin>>S;
    
    REP( i, N ){
        if( S[i] == 'B' ) cnt--;
        else{             cnt++;}
    }
    
    if( cnt > 0 ) puts("Yes");
    else{
        puts("No");
    }
    
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define endl '\n'

void solvetask(){
    string s; cin >> s;
    if (s == "RRR") cout << 3;
    else if (s == "RRS" || s == "SRR") cout << 2;
    else if (s[0] == 'R' || s[1] == 'R' || s[2] == 'R') cout << 1;
    else cout <<0;
    cout << endl;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int t=1; //cin >> t;
    while(t--) solvetask();
}

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

// TYPEDEF
// ----------------------------------------
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> Pair;
typedef vector<ll> vll;
typedef vector<vector<ll>> Graph;
typedef vector<string> vs;
typedef vector<pair<ll, ll>> Pll;
typedef queue<ll> qll;

// REPEAT
// ----------------------------------------
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define REPA(i,a) for(ll i=0;i<(ll)(a.size());i++);
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
#define COUT(a) cout << (a) << endl;
#define ENDL(a) cout << endl;
#define COUTA(i,a) for(ll i=0;i<(ll)(a.size());i++) {cout << (a)[i] << " ";} cout << endl;

// UTIL
// ----------------------------------------
#define pb push_back
#define paired make_pair
#define ALL(a) (a).begin(),(a).end()
#define SORT(a) sort((a).begin(),(a).end())
#define RSORT(a) sort((a).rbegin(), (a).rend())

// DEBUG
// ----------------------------------------
#ifdef _DEBUG
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
#else
#define debug(x)
#endif

template <typename T>
void debugV(const vector<T> v) {
#ifdef _DEBUG
  rep(i, v.size()) {
    cout << i << ":" << v[i] << " ";
  }
  cout << endl;
#else
  (void)v;
#endif
}

// BIT FLAG
// ----------------------------------------
const unsigned int BIT_FLAG_0 = (1 << 0); // 0000 0000 0000 0001
const unsigned int BIT_FLAG_1 = (1 << 1); // 0000 0000 0000 0010
const unsigned int BIT_FLAG_2 = (1 << 2); // 0000 0000 0000 0100
const unsigned int BIT_FLAG_3 = (1 << 3); // 0000 0000 0000 1000
const unsigned int BIT_FLAG_4 = (1 << 4); // 0000 0000 0001 0000
const unsigned int BIT_FLAG_5 = (1 << 5); // 0000 0000 0010 0000
const unsigned int BIT_FLAG_6 = (1 << 6); // 0000 0000 0100 0000
const unsigned int BIT_FLAG_7 = (1 << 7); // 0000 0000 1000 0000
const unsigned int BIT_FLAG_8 = (1 << 8); // 0000 0001 0000 0000
const unsigned int BIT_FLAG_9 = (1 << 9); // 0000 0010 0000 0000
const unsigned int BIT_FLAG_10 = (1 << 10); // 0000 0100 0000 0000
const unsigned int BIT_FLAG_11 = (1 << 11); // 0000 1000 0000 0000

// CONST
// ----------------------------------------
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr double PI=3.14159265358979323846; // or M_PI
constexpr int MOD = 1000000007;


void Main() {
  char a;
  cin >> a;

  if ('a' <= a and a <= 'z') {
    COUT("a");
  }
	else {
    COUT("A"); 
  }

}

int main()
{
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
}

/*

3 2
*/


Measured memory_bytes: 3648
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s, t = list(map(str, readline().rstrip().decode('utf-8').split()))
    a, b = list(map(int, readline().split()))
    if s == str(readline().rstrip().decode('utf-8')):
        print(a - 1, b)
    else:
        print(a, b - 1)


if __name__ == '__main__':
    solve()


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

using namespace std;

#define int long long
#define mem(v , val) memset(v , val , sizeof val)
#define endl '\n'



void solve()
{
    int n;
    cin >> n;
    int ans = 0;
    int x;

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

    for(int i = 0 ; i < n ; i++)
        cout << (a[i] ^ ans) << " ";
    cout << endl;
    return;
}


int32_t main()
{
    int t = 1;
    while(t--)
    {
        solve();
    }
    return 0;
}


Measured memory_bytes: 5136
N = int(input())
s, t = [], []
for i in range(N):
    _s, _t = input().split()
    s.append(_s)
    t.append(int(_t))
X = input()

ans = 0
flg = False
for i in range(N):
    if flg:
        ans += t[i]
    if s[i] == X:
        flg = True
print(ans)


Measured memory_bytes: 3060
#include <iostream>
#include <vector>
using namespace std;
#define INF 10000000001
vector<long long> s,t;

pair<int, int> binary_search(long long x, char c){
    if(c == 's'){
        int first = 0;
        int last = s.size();
        while(last - first > 1){
            int middle = (last+first)/2;
            if(s[middle] <= x) first = middle;
            else last = middle;
        }
        if(s[first] == 0) first = last = 1;
        if(s[last] == INF) last = first = s.size() - 2;
        return make_pair(first,last);
    }
    else if(c == 't'){
        int first = 0;
        int last = t.size();
        while(last - first > 1){
            int middle = (last+first)/2;
            if(t[middle] <= x) first = middle;
            else last = middle;
        }
        if(t[first] == 0) first = last = 1;
        if(t[last] == INF) last = first = t.size() - 2;
        return make_pair(first,last);
    }
}
long long calc(long long x, pair<int,int> a, pair<int,int> b){
    long long s1 = s[a.first], s2 = s[a.second], t1 = t[b.first], t2 = t[b.second];
    long long tmp = 0, ans = 100000000000;
    pair<int,int> p = binary_search(s1, 't');
    tmp = abs(x-s1) + min(abs(s1-t[p.first]), abs(s1-t[p.second]));
    ans = min(ans, tmp);
    p = binary_search(s2,'t');
    tmp = abs(x-s2) + min(abs(s2-t[p.first]), abs(s2-t[p.second]));
    ans = min(ans, tmp);
    p = binary_search(t1,'s');
    tmp = abs(x-t1) + min(abs(t1-s[p.first]), abs(t1-s[p.second]));
    ans = min(ans, tmp);
    p = binary_search(t2,'s');
    tmp = abs(x-t2) + min(abs(t2-s[p.first]), abs(t2-s[p.second]));
    ans = min(ans, tmp);
    return ans;
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a,b,q;
    cin >> a >> b >> q;
    s.push_back(0), t.push_back(0);
    for(int i = 0;i < a; i++){
        long long x; cin >> x;
        s.push_back(x);
    }
    s.push_back(INF);
    for(int i = 0; i < b; ++i){
        long long x; cin >> x;
        t.push_back(x);
    }
    t.push_back(INF);
    for(int i = 0;i < q; ++i){
        long long x; cin >> x;
        pair<int, int> ps = binary_search(x, 's');
        pair<int, int> pt = binary_search(x, 't');
        cout << calc(x,ps,pt) << endl;
    }
    return 0;
}

Measured memory_bytes: 5576
#include<iostream>
#include <sstream>
#include<algorithm>
#include<string>
#include<cmath>
#include<map>
#include<queue>
#include<set>
#include<vector>
#include<cstdio>

using namespace std;
/*
int find(int x, vector<int> &p) {
if (p[x] == x)return x;
return p[x] = find(p[x], p);
}

void uni(int x, int y, vector<int> &p) {
x = find(x, p);
y = find(y, p);
p[x] = y;
}

int same(int x, int y, vector<int> p) {
if (find(x, p) == find(y, p))return 1;
return 0;
}
*/

//long long a[1002];

std::vector<std::string> split(const std::string &str, char sep)
{
	std::vector<std::string> v;
	std::stringstream ss(str);
	std::string buffer;
	while (std::getline(ss, buffer, sep)) {
		v.push_back(buffer);
	}
	return v;
}

int main()
{
	long long N, cnt = 0, tmp, ans = 0;
	vector<long long> a;
	string S, T;
	bool flag = true;

	cin >> S;
	cin >> T;

	for (int i = 0; i < S.size(); i++) {
		for (int j = 0; j < S.size(); j++) {
			if (j+i < S.size()) {
				if (S[j + i] != T[j]) flag = false;
			}
			else {
				if (S[j + i - S.size()] != T[j]) flag = false;
			}
		}
		if (flag) ans = 1;
		flag = true;
	}
	if (ans == 1)	cout << "Yes";
	else cout << "No";

	char qq;
	cin >> qq;
	return 0;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define int long long
#ifndef FAST_IO
  #define IOS ios_base::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
#endif
#define ff first
#define ss second
#define endl "\n"
#define all(c) c.begin(),c.end()
template<typename T>void print(T t){for(auto &it:t)cout<<it<<" "; cout<<endl;}
void solve(){
  string s,t;
  cin>>s>>t;
  s+=s;//has all possiblities of rotation
  cout<<(s.find(t)==string::npos?"No":"Yes")<<endl;	
}
int32_t main(){
   IOS;
   solve();
   //debug();
  #ifdef LOCAL_DEFINE
   cerr<<"time elapsed "<<(double)clock()/CLOCKS_PER_SEC<<endl;
  #endif	
}


Measured memory_bytes: 256
//8:26
#include<iostream>
#include<stack>
#include<string>

using namespace std;

int main(){
  for(string s;getline(cin,s),s!=".";){
    int i;
    stack<char> stk;
    for(i=0;i<s.size();i++){
      switch(s[i]){
      case')':
	if(stk.empty()||stk.top()!='('){
	  goto fail;
	}
	stk.pop();
	break;
      case']':
	if(stk.empty()||stk.top()!='['){
	  goto fail;
	}
	stk.pop();
	break;
      case '(':
      case'[':
	stk.push(s[i]);
      }
    }
    if(!(i<s.size())&&stk.empty()){
      cout<<"yes"<<endl;
    }else{
    fail:
      cout<<"no"<<endl;
    }
  }
  return 0;
}
	

Measured memory_bytes: 904
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <map>
#include <deque>
#include <string.h>
using namespace std;

#define REP(i,n) for(int i = 0; i < n; i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pi> vpi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

double EPS = 1e-9;
int INFi = 1000000005;
long long INFll = 1000000000000000005ll;
double PI = acos(-1);
int dirx[8] = {-1,0,0,1,-1,-1,1,1};
int diry[8] = {0,1,-1,0,-1,1,-1,1};
ll MOD = 1000000007;

int N, M;
const int MAX_N = 100000, MAX_M = 100000;
int A[MAX_M], B[MAX_M];

bool used[MAX_N];
vi G[MAX_N];

vi dfs(int v) {
  used[v] = true;
  REP(i, G[v].size()) {
    if(!used[G[v][i]]) {
      vi res = dfs(G[v][i]);
      res.push_back(v);
      return res;
    }
  }
  vi res{v};
  return res;
}

int main(){
  cin >> N >> M;
  REP(i, M){
    cin >> A[i] >> B[i];
    G[A[i] - 1].push_back(B[i] - 1);
    G[B[i] - 1].push_back(A[i] - 1);
  } 

  REP(i, N) used[i] = false;

  vi ans = dfs(0);
  reverse(ALL(ans));
  vi ans2 = dfs(0);
  ans2.pop_back();
  ans.insert(ans.begin(), ALL(ans2));

  int l = ans.size();
  cout << l << endl;
  REP(i, l) {
    cout << ans[l - 1 - i] + 1;
    if(i != l - 1) cout << " ";
    else cout << endl;
  }

  return 0;
}



Measured memory_bytes: 14840
# 初期入力
N =int(input())
D = (int(x) for x in input().split())

#
from itertools import combinations
# ["a", "b", "c"] から 2 つ選ぶ組み合わせをすべて列挙する
kaifukuryou =[]
for t in combinations(D, 2):
    kaifukuryou.append(t[0]*t[1])

print(sum(kaifukuryou))

Measured memory_bytes: 3060
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
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; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     @hamayanhamayan0
　　　　／　　　＼　 　  |　|
　　　 /　　 /￣￣￣￣/　　|
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
　 　　　＼/＿＿＿＿/　（u　⊃
---------------------------------------------------------------------------------------------------*/














int X, N;
set<int> p;
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> X >> N;
	rep(i, 0, N) {
		int x; cin >> x;
		p.insert(x);
	}

	int ans = inf, diff = inf;
	rep(y, 0, 102) if (!p.count(y)) {
		int d = abs(y - X);
		if (d < diff) ans = y, diff = d;
	}
	cout << ans << endl;
}







Measured memory_bytes: 3660
import collections

n = int(input())
v = [int(i) for i in input().split()]
con_odd = []
con_even = []
for i in range(0,n,2):
    con_odd.append(v[i]) 
    con_even.append(v[i+1])

b = collections.Counter(con_odd)
c = sorted(b.items(), key=lambda x:x[1],reverse = True)
b_2 = collections.Counter(con_even)
c_2 = sorted(b_2.items(), key=lambda x:x[1],reverse = True)
if len(c) == 1 and len(c_2) == 1:
    if c[0][0] == c_2[0][0]:
        ans = n//2
    else:
        ans = 0
elif len(c) == 1 or len(c_2) == 1:
    if c[0][0] == c_2[0][0]:
        if len(c) == 1:
            ans_1 = len(con_odd) - c[0][1]
            ans_2 = len(con_even) - c_2[1][1]
            ans = ans_1 + ans_2
        else:
            ans_1 = len(con_odd) - c[1][1]
            ans_2 = len(con_even) - c_2[0][1]
            ans = ans_1 + ans_2
    else:
        ans_1 = len(con_odd) - c[0][1]
        ans_2 = len(con_even) - c_2[0][1]
        ans = ans_1 + ans_2
            
elif c[0][0] == c_2[0][0]:
    if c[0][1] + c_2[1][1] > c[1][1] + c_2[0][1]:
        ans_1 = len(con_odd) - c[0][1]
        ans_2 = len(con_even) - c_2[1][1]
        ans = ans_1 + ans_2
    else:
        ans_1 = len(con_odd) - c[1][1]
        ans_2 = len(con_even) - c_2[0][1]
        ans = ans_1 + ans_2
else:
    ans_1 = len(con_odd) - c[0][1]
    ans_2 = len(con_even) - c_2[0][1]
    ans = ans_1 + ans_2
print(ans)

Measured memory_bytes: 28152
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

const int cm = 1 << 17;
char cn[cm], * ci = cn + cm, ct;
inline char getcha() {
	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline int getint() {
	int A = 0;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';
	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';
	return A;
}

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


	int N = getint(), C = getint(), K = getint();
	int T[100000];
	rep(i, N) T[i] = getint();
	sort(T, T + N);

	int kotae = 1;
	int deru = T[0];
	int kazu = 1;
	rep1(i, N - 1) {
		if (C <= kazu || deru + K < T[i]) {
			kotae++;
			deru = T[i];
			kazu = 1;
		}
		else kazu++;
	}
	co(kotae);

	Would you please return 0;
}

Measured memory_bytes: 768
from collections import deque
x,y,a,b,c = map(int,input().split())
p1 = list(map(int,input().split()))
q1 = list(map(int,input().split()))
r1 = list(map(int,input().split()))
ans = []
p1.sort(reverse=1)
q1.sort(reverse=1)
r1.sort(reverse=1)


p=deque(p1[0:x])
q=deque(q1[0:y])
r=deque(r1[0:x+y])

lp = p.pop()
lq = q.pop()

rr = r.popleft()

while 1:
#     print(lp,lq,rr)
    if (x > 0 and lp <= lq) or y == 0:
        if lp >= rr:
            ans.append(lp)
            
        else:
            ans.append(rr)
            r.append(0)
            rr = r.popleft()
        if x > 1:
                lp = p.pop()
        x -= 1
    else:
        if lq >= rr:
            ans.append(lq)
            
        else:
            ans.append(rr)
            r.append(0)
            rr = r.popleft()
        if y > 1:
                lq = q.pop()
        y -= 1
    if x == 0 and y == 0:
        print(sum(ans))
        exit()



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

#ifdef DEBUG
    #include "debug.h"
    #define dump(...)                                                              \
        DUMPOUT << "  " << string(#__VA_ARGS__) << ": "                            \
                << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]"        \
                << endl                                                            \
                << "    ",                                                         \
            dump_func(__VA_ARGS__)
#else
    #define dump(...)
#endif


// http://beet-aizu.hatenablog.com/entry/2018/04/08/145516
template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}

template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){
  for(auto &e:t) fill_v(e,v);
}

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

#define int long long
 
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

#define YES puts("YES")
#define Yes puts("Yes")
#define NO  puts("NO")
#define No  puts("No")
#define ALL(v) (v).begin(), (v).end()
int gcd(int a, int 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 (a>b) { a=b; return 1; } return 0; }

//*
#define mod 1000000007 /*/
#define mod 998244353 //*/

typedef pair<int, int> P;
#define INF (1LL<<60)



void solve(){
    int H, W, K;
    cin >> H >> W >> K;
    auto c = make_v<char>(H,W);
    rep(i,H)rep(j,W) cin >> c[i][j];
    
    int ans = 0;
    
    rep(i,1<<H){
        rep(j,1<<W){
            int r = 0;
            rep(h,H){
                rep(w,W){
                    if( (i& (1LL<<h)) && (j&(1LL<<w)) && c[h][w]=='#'){
                        r++;
                    }
                }
            }
            if(r==K) ans++;
        }
    }
    cout << ans << endl;
}


signed main(){
    cout << fixed << setprecision(18);
    cerr << fixed << setprecision(18);
    solve();
}


Measured memory_bytes: 3600
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, A, B;
  cin >> N >> A >> B;
  if (N * A < B) {cout << N * A << endl;}
  else if (N * A == B) {cout << B << endl;}
  else if (N * A > B) {cout << B << endl;}
}

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

int main(){
  int a,b,c;
  int sum=0;
  cin>>a>>b>>c;
  if(a>=b&&a>=c){
    sum+=a*10;
    a=0;
  }else if(b>=a&&b>=c){
    sum+=b*10;
    b=0;
  }else{
    sum+=c*10;
    c=0;
  }
  sum+=a+b+c;
  cout<<sum<<'\n';
  return 0;
}
  


Measured memory_bytes: 256
N,M=[int(c) for c in input().split()]
Lmax=0
Rmin=int(1e5)
for i in range(M):
	L,R=[int(c) for c in input().split()]
	if(L>Lmax):
		Lmax=L
	if(R<Rmin):
		Rmin=R

print(max(Rmin-Lmax+1,0))
#LmaxとRminの間に入っているのがいくつなのか








Measured memory_bytes: 45928
N = int(input())
T, A = list(map(int, input().strip().split(' ')))
array = list(map(int, input().strip().split(' ')))
c=(T-array[0]*0.006)-A
C = abs(c)
ans=[]
for i in array:
  x = (T-i*0.006)-A
  num = abs(x)
  if num<=C:
    C=num
    ans.append(i)
n = ans[-1]
Ans=array.index(n)+1
print(Ans)


Measured memory_bytes: 3064
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back

void Yes(){
	cout<<"Yes"<<endl;
	exit(0);
}

void No(){
	cout<<"No"<<endl;
	exit(0);
}

int main(){
  ll N;
  cin>>N;
  ll A[100010];
  ll B[100010];
  
  rep(i,N+1){
    cin>>A[i];
  }
  rep(i,N){
    cin>>B[i];
  }
  
  ll count=0;
  
  rep(i,N){
    if((A[i]+A[i+1])>=B[i]&&B[i]>A[i]){
      count+=B[i];
      A[i+1]=A[i+1]+A[i]-B[i];
    }
    else if(B[i]>(A[i]+A[i+1])){
      count+=A[i]+A[i+1];
      A[i+1]=0;
    }
    else if(B[i]<=A[i]){
      count+=B[i];
    }
  }
  cout<<count<<endl;
}
      


Measured memory_bytes: 1792
N,K = list(map(int, input().split()))

n = [0] * N
for i in range(K):
    d = input()
    A = list(map(int, input().split()))
    for j in A:
        n[j-1] += 1

ans = 0
for i in n:
    if i == 0:
        ans += 1

print(ans)

Measured memory_bytes: 9188
NN, MM = ARGF.gets.chomp.split.collect {|el| el.to_i}

AA = ARGF.gets.chomp.split.collect {|el| el.to_i}

sum = AA.inject{|ss, ai| ss + ai}

ans = NN - sum
if ans < 0
  ans = -1
end

puts ans


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

string s;
int n,k;

char Rotate(char ch,int k){
    int z=ch-'A';
    z=(z+k)%26;
    z=z+65;
    return z;
}

int main(){
    cin>>k>>s;n=s.length();
    string res="";
    for(int i=0;i<n;i++)
        res=res+Rotate(s[i],k);
    cout<<res;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int vis[20]= {};
int main()
{
    int n,k;
    cin>>n>>k;
    int x;
    for(int i=1; i<=k; i++)
    {
        cin>>x;
        vis[x]=1;
    }
    for(int i=n; i<=99999; i++)
    {
        int y=i;
        int flag=1;
        while(y)
        {
            int uu=y%10;
            if(vis[uu]==1)
            {
                flag=0;
                break;
            }
            y/=10;
        }
        if(flag==1)
        {
            cout<<i<<endl;
            return 0;
        }
    }
}


Measured memory_bytes: 256
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int a = sc.nextInt();
		String s = sc.next();
		String result = a >= 3200 ? s : "red";
		
		
		System.out.println(result);
		
	}
	
	private static int kaijo(int x) {
		int result = 1;
		for(int i = 1; i <= x; ++i) result *= 2;
		return result;
	}

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}


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

int main() {
  int K, N;
  
  cin >> N >> K;
  
  vector<int> vec(N);
  
  for(int i = 0; i < N; i++){
    cin >> vec.at(i);
  }
  for(int j = 0; j < N - K; j++){
    if(vec.at(j) < vec.at(j+K)) cout << "Yes";
    else cout << "No";
    if(j!=N-K-1) cout << endl;
  }
  
}

Measured memory_bytes: 3996
#include <bits/stdc++.h>
using namespace std;
const int M=1e4+10;
typedef long long ll;
const ll mod=1e9+7;
ll gcd(ll a,ll b){return b==0?a:gcd(b,a%b);}
ll lcm(ll a,ll b){return b/gcd(a,b)*a;}
int a[M],mn,mx;
map<int,int> mp;
ll quick_mod(ll a,ll b){
	ll ans=1;
	a%=mod;
	while(b){
		if(b&1)ans=(ans%mod * a%mod)%mod;
		a=(a%mod * a%mod)%mod;
		b>>=1;
	}
	return ans%mod;
}
ll get_inv(ll x){
	return quick_mod(x,mod-2);
}

void sol(int x){
	for(int i=2;i*i<=x;i++){
		if(x%i==0){
			int c=0;
			mn=min(mn,i);mx=max(mx,i);
			while(x%i==0){c++;x/=i;}
			mp[i]=max(mp[i],c);
		}
	}
	if(x>1){mp[x]=max(1,mp[x]);mn=min(mn,x);mx=max(mx,x);}
	return;
}
int main(int argc, char const *argv[])
{
	mp.clear();mn=1e6+10;mx=-1;
	int n;cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++)sol(a[i]);
	// cout<<mx<<" "<<mn<<endl;
	ll sum=1;
	for(int i=mn;i<=mx;i++){
		if(mp[i]>0){
			for(int j=1;j<=mp[i];j++)sum=(sum%mod * i%mod)%mod;
		}
	}
	// cout<<sum<<endl;
	ll ans=0;
	for(int i=1;i<=n;i++){
		ll tmp=(sum%mod * get_inv(a[i])%mod)%mod;
		ans=(ans+tmp)%mod;
	}
	cout<<ans<<endl;
	return 0;
}


Measured memory_bytes: 47104
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define Int int32_t
#define all(c) c.begin(), c.end()
#define FAST ios_base::sync_with_stdio(false) , cin.tie(NULL);
#define pii pair<int,int>
#define pb push_back
#define F first
#define S second
#define endl "\n"
#define bitcnt(n) __builtin_popcountll(n)
#define setpre(n) cout << fixed << setprecision(n)
#define tr(c) for(const auto& x : c )cout << x << " "; cout << "\n";
#define ol(c, s, e) for(int pos=s; pos<e; pos++)cout << c[pos] << " ";cout <<"\n";
#define PI acos(-1LL)

const int M = 1000000007;
const int N = 2e6 + 5;
const long long INF = 1e9 + 12;

vector<int> dp, v;
int n,k;
int memo(int i=n){
    if(i <= 1) return 0;
    if(dp[i]!=INF)
        return dp[i];
    int ans = INF;
    for(int j=1; j<=k; j++){
        if(i > j)
            ans = min(ans, memo(i-j) + abs(v[i] - v[i-j]));
    }
    return dp[i] = ans;
}

void solve() {
    cin >> n;
    cin >> k;
    v.resize(n+1);
    dp.assign(n+1,INF);
    for(int i=1; i<=n; i++){
        cin >> v[i];
    }
    cout << memo();
//    dp[1] = 0;
//    for(int i=2; i<=n; i++){
//        for(int j=1;j<=k;j++){
//            if(i-j < 1) continue;
//            dp[i] = min(dp[i], dp[i-j] + abs(v[i] - v[i-j]));
//        }
//    }
//    cout << dp[n] << endl;
}

signed main(){
    FAST
    int tc = 1;
//    TODO: check for tc
//    cin >> tc;
    for (int t = 1; t <= tc; t++) {
        solve();
    }
}


Measured memory_bytes: 9504
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <iterator>

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

using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;

inline int ctoi(char c) {
    return (int)(c -'0');
}

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

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

    rep(i, 26) {
        rep(j, 15) {
            if (i*4 + j*7 == n) {
                cout << "Yes" << endl;
                return 0;
            }
        }
    }
    cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,c) for(int i=0;i<c;++i)
int main(){
 char c;
 cin >> c;
 if(c=='A'){
     cout << 'T' << endl;
 }else if(c=='T'){
     cout << 'A' << endl;
 }else if(c=='G'){
     cout << 'C' << endl;
  }else{
    cout << 'G' << endl;
  }
 return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
int main()
{
	long long int n, k;
	scanf("%lld %lld", &n, &k);
	long long int i, j;
	long long int l[11], r[11];
	for (i = 0; i < k; i++)
		scanf("%lld %lld", &l[i], &r[i]);
	long long int p = 998244353;
	long long int cnt[200005], d[200005];
	for (i = 0; i <= n; i++)
		cnt[i] = d[i] = 0;
	cnt[0] = 1;
	for (i = 0; i < n; i++)
	{
		if (i > 0)
		{
			d[i] = (d[i] + d[i - 1]) % p;
			cnt[i] = d[i];
		}
		for (j = 0; j < k; j++)
		{
			if (l[j] + i <= n)
				d[l[j] + i] = (d[l[j] + i] + cnt[i]) % p;
			if (r[j] + 1 + i <= n)
				d[r[j] + 1 + i] = (d[r[j] + 1 + i] - cnt[i] + p) % p;
		}
	}
	printf("%lld\n", cnt[n - 1]);
	return 0;
}

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


typedef long long i64;
const int inf = (int)1.05e9;


int main()
{
	int n;
	vector<pair<int,pair<int,int>>> xys;

	scanf("%d", &n);
	xys.resize(n + 1);
	for(int i = 0; i < n; ++i) {
		int t, x, y;
		scanf("%d%d%d", &t, &x, &y);
		xys[i + 1] = {t, {x, y}};
	}

	bool ok = true;

	for(int i = 0; i < n; ++i) {

		auto& prev = xys[i + 0];
		auto& next = xys[i + 1];

		int dt = next.first - prev.first;
		int dx = next.second.first - prev.second.first;
		int dy = next.second.second - prev.second.second;

		if(dx + dy > dt)
			ok = false;
		if((dt - (dx + dy)) % 2 != 0)
			ok = false;
	}

	printf("%s\n", ok ? "Yes" : "No");

	return 0;
}

/* waffle */


Measured memory_bytes: 1408
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
const int MX = 1000005;
int n, a[1005], pr[MX], s;
vector<int> ch[MX];
queue<int> qu[2];
int main(){
	scanf("%d", &n);
	rep(i,n) rep(j,n-1){
		scanf("%d", a+j); a[j]--;
		if(j){
			int p = max(i,a[j-1])*n + min(i,a[j-1]), c = max(i,a[j])*n + min(i,a[j]);
			ch[p].push_back(c);
			pr[c]++;
		}
	}
	rep(i,n*n) if(!pr[i]) qu[0].push(i);
	for(s = 0; 1; s++){
		if(qu[s&1].empty()) break;
		while(!qu[s&1].empty()){
			int t = qu[s&1].front(); qu[s&1].pop();
			for(int it: ch[t]) if((--pr[it]) == 0) qu[s&1^1].push(it);
		}
	}
	rep(i,n*n) if(pr[i]) return 0*puts("-1");
	printf("%d\n", s);
}

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

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

using namespace std;
typedef long long ll;

struct choice {
  int a;
  int b;
  int c;
  ll v;

  bool operator < (const choice& rhs) const {
    if(a != rhs.a) return a < rhs.a;
    else if(b != rhs.b) return b < rhs.b;
    else if(c != rhs.c) return c < rhs.c;
    else return false;
  }

  bool operator == (const choice& rhs) const {
    return a == rhs.a && b == rhs.b && c == rhs.c;
  }
};

struct vComparator {
  bool operator()(choice& left, choice& right) {
    return left.v < right.v;
  }
};

int X, Y, Z, K;
priority_queue<choice, vector<choice>, vComparator> choices;
set<choice> found;
ll as[1010], bs[1010], cs[1010];

void solve() {
  choices.push(choice {0, 0, 0, as[0]+bs[0]+cs[0]});
  int count = 0;
  while(!choices.empty() && count < K) {
    choice c = choices.top(); choices.pop();
    printf("%lld\n", c.v);
    count++;
    choice succ;
    if(c.a+1 < X) {
      succ = choice {c.a+1, c.b+0, c.c+0, as[c.a+1]+bs[c.b+0]+cs[c.c+0]};
      if(found.find(succ) == found.end()) {
        choices.push(succ);
        found.insert(succ);
      }
    }
    if(c.b+1 < Y) {
      succ = choice {c.a+0, c.b+1, c.c+0, as[c.a+0]+bs[c.b+1]+cs[c.c+0]};
      if(found.find(succ) == found.end()) {
        choices.push(succ);
        found.insert(succ);
      }
    }
    if(c.c+1 < Z) {
      succ = choice {c.a+0, c.b+0, c.c+1, as[c.a+0]+bs[c.b+0]+cs[c.c+1]};
      if(found.find(succ) == found.end()) {
        choices.push(succ);
        found.insert(succ);
      }
    }
  }
}

int main() {
  scanf("%d %d %d %d", &X, &Y, &Z, &K);
  rep(i, X) scanf("%lld", &as[i]);
  rep(i, Y) scanf("%lld", &bs[i]);
  rep(i, Z) scanf("%lld", &cs[i]);
  sort(as, as+X, greater<ll>());
  sort(bs, bs+Y, greater<ll>());
  sort(cs, cs+Z, greater<ll>());
  solve();
  return 0;
}


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

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

int main(){
    int x;
    cin >> x;
    for(int i = x;;i++){
        if(isPrime(i)){
            cout << i << endl;
            return 0;
        }
    }
}

Measured memory_bytes: 3636
package main

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

type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func main() {
	sc := NewScanner()
	AB, BC, _ := sc.nextInt(), sc.nextInt(), sc.nextInt()
	fmt.Println(AB * BC / 2)
}


Measured memory_bytes: 640