akhauriyash/Code-Regression huggingface dataset:
#define _CRT_SECURE_NO_WARNINGS
#define p64 PRId64
#include <cinttypes>
#include <cstdio>
#include <tuple>
#include <vector>

using namespace std;
using ll = int64_t;

// グラフ)深さ優先探索 Depth-First Search
// input
// 3 3
// 1 2 1
// 2 3 1
// 1 3 2

// 0-indexed
// 逆辺 マイナス

// process
// go
// e = 0 ->
// e = 1 ->
// e = 1 pos check(s = 0) ->
// e = 2 ->
// e = 2 pos check(s = 1) ->
// e = 2 pos check(s = 0) ->

// back
// -> e = 2 dfs true
// -> e = 1 dfs true
// -> e = 0
// -> e = 0 pos check(s = 2)
// -> e = 0 dfs true

vector<bool> check;
vector< vector<tuple<int, int> > > es;
vector<ll> pos;

template<class T> void gc(T &x)
{
    char c;
    int s = 0;
    x = 0;

    c = getchar_unlocked();

    if (c == '-') s = 1;
    else if ('0' <= c && c <= '9')  x = c - '0';

    while (true)
    {
        c = getchar_unlocked();

        if (c < '0' || c > '9') break;
        x = x * 10 + (c - '0');
    }

    if (s) x = -x;
}

// グラフ)深さ優先探索 Depth-First Search
bool dfs(int e)
{
    // e 訪問済
    // pos 設定済
    check[e] = true;

    // e -> s
    for (auto &&next : es[e])   // auto における ユニバーサル参照
    {
        int s = get<0>(next);
        int d = get<1>(next);

        ll spos = d + pos[e];

        if (check[s])
        {
            // s 訪問済 pos 比較
            if (spos != pos[s]) return false;
            continue;
        }
        else
        {
            // s 未訪問 pos 設定
            pos[s] = spos;

            // s を e として再帰
            if (!dfs(s)) return false;
        }
    }

    return true;
}

int main()
{
    int N, M;

    gc(N);
    gc(M);

    es.resize(N);

    for (int i = 0; i < M; i++)
    {
        int l, r, d;
        gc(l);
        gc(r);
        gc(d);

        // 0-indexed
        l--;
        r--;

        es[l].push_back(make_tuple(r, d));
        // 逆辺は マイナス
        es[r].push_back(make_tuple(l, -d));
    }

    // 初期値 0
    pos.resize(N);

    // 初期値 false
    check.resize(N);

    for (int i = 0; i < N; i++)
    {
        // 頂点の集合が分裂していなければ
        // 1回の dfs でチェック済みとなる
        if (check[i]) continue;

        // 最初の頂点 距離 0
        pos[i] = 0;

        // グラフ)深さ優先探索 Depth-First Search
        if (!dfs(i))
        {
            printf("%s\n", "No");
            return 0;
        }
    }

    printf("%s\n", "Yes");
    return 0;
}


Measured memory_bytes: 12416
n = int(input())
b = list(map(int,input().split()))

a = list()
ans = 0
a.append(b[0])

for i in range(n-2):
  j = min(b[i],b[i+1])
  a.append(j)

a.append(b[-1])

for i in range(n):
  ans += a[i]

print(ans)

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

#define REP(i,m,n) for(int i=(m); i<(int)(n); i++)
#define RREP(i,m,n) for(int i=(int)(n-1); i>=m; i--)
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) RREP(i,0,n)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define fi first
#define se second
#define debug(...) {cerr<<"[L"<<__LINE__<<"] "; _debug(__VA_ARGS__);}

template<typename T>
string join(const vector<T>&v, string del=", "){ stringstream s;
    for(auto x : v) s << del << x; return s.str().substr(del.size());
}
template<typename T>
ostream& operator<<(ostream& o, const vector<T>&v){
    if(v.size()) o << "[" << join(v) << "]"; return o;
}
template<typename T>
ostream& operator<<(ostream& o, const vector<vector<T> >&vv){
    int l = vv.size();
    if(l){ o<<endl; rep(i,l) o << (i==0 ? "[ " : ",\n  " ) << vv[i] << (i==l-1 ? " ]" : ""); }
    return o;
}
template<typename T1, typename T2>
ostream& operator<<(ostream& o, const pair<T1, T2>& p){
    return o << "(" << p.first << ", " << p.second << ")";
}
inline void _debug(){cerr<<endl;}
template<class First, class... Rest>
void _debug(const First& first, const Rest&... rest){cerr<<first<<" ";_debug(rest...);}

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

const double PI = (1*acos(0.0));
const double EPS = 1e-9;
const int INF = 0x3f3f3f3f;
const ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const ll mod = 1e9 + 7;

inline void finput(string filename) {
    freopen(filename.c_str(), "r", stdin);
}

int main(){
    ios_base::sync_with_stdio(0);
    // finput("./input");
    int n; cin >> n;
    vi a(n);
    rep(i,n) cin >> a[i];

    vi gcdl(n), gcdr(n);
    gcdl[0] = a[0];
    rep(i,n-1) gcdl[i+1] = __gcd(gcdl[i], a[i+1]);
    gcdr[n-1] = a[n-1];
    rrep(i,n-1) gcdr[i] = __gcd(gcdr[i+1], a[i]);

    int ans = 1;
    rep(i,n){
        if(i == 0){
            ans = max(ans, gcdr[i+1]);
        }else if(i == n-1){
            ans = max(ans, gcdl[i-1]);
        }else{
            ans = max(ans, __gcd(gcdl[i-1], gcdr[i+1]));
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 4432
#include <iostream>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
int main() {
	int n;
	cin >> n;
	cout << (1000 - n % 1000)%1000<< endl;
	return 0;
}

Measured memory_bytes: 3592
#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9+7;
const long long LINF = 1e18;
#define dump(x)  cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define FOREACH(x,a) for(auto& (x) : (a) )
typedef long long ll;
using namespace std;
typedef pair<ll, ll> P;

int main(int argc, char const *argv[]) {
    map<string,int> mp;
    int n;cin>>n;
    rep(i,n) {
        vector<char> c(10);
        rep(j,10) cin>>c[j];
        sort(c.begin(), c.end());
        string t;
        rep(j,10) t.push_back(c[j]);
        mp[t]++;
    }
    ll ans = 0;
    for (auto &&e: mp) {
        ll m = e.second;
        ans += (m*(m-1)/2);
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 12800
N=int(input())
Ai = list(map(int,input().split()))
Bi = list(map(int,input().split()))
Ci = list(map(int,input().split()))

ans = sum(Bi)

for i in range(N-1):
  if Ai[i] + 1 == Ai[i+1]:
    ans += Ci[Ai[i]-1]

print(ans)

Measured memory_bytes: 3064
#include<cstdio>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<set>
#include<map>
#include<queue>
#include<vector>
#include<algorithm>
#include<cctype>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stack>
#include<ctime>
#define mst(a,b) memset(a,b,sizeof(a));
const int N = 1e9;
const int mod=(int)1e9+7;
const int INF=0x3f3f3f3f;
typedef long long LL;
//#define LOCAL
const double PI = acos(-1.0);
const int maxn=100+5;
using namespace std;


bool cmp(int a, int b)
{
    return a>b;
}

int gcd(int a, int b)
{
    return (b==0)?a:gcd(b,a%b);
}

#define ALL(x) x.begin(),x.end()
#define INS(x) inserter(x,x.begin())

int main()
{
#ifdef LOCAL
    freopen("test.txt", "r", stdin);
#endif // LOCAL
    string s;
    cin>>s;
    s[3]++;
    cout<<s;
    return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <climits>
#include <cmath>
#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>

using ll = long long;
using namespace std;

int main() {
    int n = 0;
    cin >> n;
    vector<int> a(n);
    for (int i=0; i<n; i++) {
        cin >> a.at(i);
    }
    int now = 0;
    int ans = 0;
    for (int i=0; i<n-1; i++) {
        if (now == 0) {
            if (a.at(i) > a.at(i+1)) {
                now = -1;
            }
            else if (a.at(i) < a.at(i+1)) {
                now = 1;
            }
        }
        else if (now == 1) {
            if (a.at(i) > a.at(i+1)) {
                ans++;
                now = 0;
            }
        }
        else {
            if (a.at(i) < a.at(i+1)) {
                ans++;
                now = 0;
            }
        }
    }
    cout << ans + 1 << endl;
    return 0;
}


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

using namespace std;

void solve();

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

void solve() {
    int w,h;
    char c;
    cin >> w >> h >> c;
    for(int i = 0; i < h; i++) {
        for(int j = 0; j < w; j++) {
            if((i == 0 || i == h-1) && (j == 0 || j == w-1)) cout << '+';
            else if(i == 0 || i == h-1) cout << '-';
            else if(j == 0 || j == w-1) cout << "|";
            else if(i == h / 2 && j == w / 2) cout << c;
            else cout << ".";
        }
        cout << endl;
    }
}

Measured memory_bytes: 3204
#include <iostream>
#include <stack>

using namespace std;
const int N = 2e5 + 10;
int nums[N];
int n;
int main()
{
    cin >> n;
    for(int i = 0; i < n; i ++)
    {
        cin >> nums[i];
    }
    stack<int> temp;
    int cnt = 0;
    for(int i = 0; i < n; i ++)
    {
        while(!temp.empty() && temp.top() > nums[i])
        {
            temp.pop();
        }
        if(temp.empty()) cnt ++;
        temp.push(nums[i]);
    }
    cout << cnt << endl;
    return 0;
}

Measured memory_bytes: 1792
#include <stdio.h>

int main(){
	long long N;
	scanf("%lld",&N);
	for(int a=1;a<=3500;a++)for(int b=1;b<=3500;b++){
		if((4*a*b-N*a-N*b)>0&&N*a*b%(4*a*b-N*a-N*b)==0){
			printf("%d %d %lld",a,b,N*a*b/(4*a*b-N*a-N*b));
			return 0;
		}
	}
}

Measured memory_bytes: 1704
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define ULL unsigned long long

void ib(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}

int n;
vector < string > V;
int To[11], Inv[30];

int cnt = 0;
int base = 1e9 + 7;
set < ULL > S;

void bt( int pos, string s , ULL h ){
	if ( pos == n ){
		if ( S.find(h) != S.end() ) return;
		S.insert(h);
		cout << s << endl;
		return;
	}
	
	for ( int i = 1; i <= pos+1; i++ ){
		if ( To[i] == 0 ){
			To[i] = pos + 1;
			bt(pos+1,s+(char)(i-1+'a'), h * base + To[i] );
			To[i] = 0;
		} else {
			bt(pos+1,s+(char)(i-1+'a'), h * base + To[i] );
		}
	}
}

int main(){
	
	ib();
	cin >> n;
	bt(0,"",0);
	return 0;
}

Measured memory_bytes: 6912
# coding: utf-8
# Your code here!
A = []
for i in range(3):
    A.append(list(map(int,input().split())))
    
N = int(input())
Flg = False
F = [[1 for i in range(3)] for j in range(3)]
#print(F)
for i in range(N):
    m = int(input())
    for j in range(3):
        for k in range(3):
            if A[j][k] == m:
                F[j][k] = 0
#行
for i in range(3):
    if list(set(F[i])) == [0]:
        Flg = True
        break
#列
for i in range(3):
    if F[0][i]==F[1][i]==F[2][i]==0:
        Flg = True
        break
#斜め
if F[0][0]==F[1][1]==F[2][2]==0 or F[0][2]==F[1][1]==F[2][0]==0:
    Flg = True

if Flg:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 38384
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long int;
#define INF             1e14
#define dd              double
#define MOD             1000000007
#define my_sizeof(type) ((char *)(&type+1)-(char*)(&type)) 
#define nl              cout<<endl
#define fill(a,val)     memset(a,val,sizeof(a))
#define mp              make_pair
#define endl            "\n"
#define pb              push_back
#define ff              first    
#define ss              second
#define SIZE            200005
#define all(v)          v.begin(),v.end()
#define s(ar,n)         sort(ar,ar+n)
#define rs(ar,n)        sort(ar, ar+n, greater<ll>()) 
#define oa(a,n)         for(ll i=0;i<n;i++)cout<<a[i]<<" ";nl
#define cn(a,n)         for(ll i=0;i<n;i++)cin>>a[i];
#define maxa(ar,N)      *max_element(ar,ar+N)
#define mina(ar,N)      *min_element(ar,ar+N)
#define fastio()        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define printclock      cerr<<"Time : "<<1000*(long double)clock()/(long double)CLOCKS_PER_SEC<<"ms\n";
typedef tree<pair<ll,ll>, null_type, less<pair<ll,ll>>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
ll power(ll x, ll y){
    ll res=1;x=x;
    while(y>0){
        if(y&1)
            res = (res*x);
        y = y>>1;
        x = (x*x);
    }
    return res;
}  
ll logtwo(ll n){
    if(n==1)
        return 0;
    return logtwo(n/2)+1;
}
signed main()
{
	fastio();   
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
	int t=1;
	//cin>>t;
	while(t--)
	{
		ll N;
		cin>>N;
		N++;
		ll ar[N];
		cn(ar,N);
		pair<ll,ll> dp[N]={};
		dp[N-1]={ar[N-1],ar[N-1]};
		for(ll i=N-2;i>=61;i--)
			dp[i]={(dp[i+1].ff+1)/2+ar[i],dp[i+1].ss+ar[i]};
		for(ll i=min(N-2,60ll);i>=0;i--)
		{
			ll pmx=power(2,i);
			ll mi=(dp[i+1].ff+1)/2+ar[i];
			ll mx=min(pmx,dp[i+1].ss+ar[i]);
			dp[i]={mi,mx};
		}
		ll cur[N]={};
		cur[0]=1;
      	if(dp[0].ff>1)
        {
          cout<<-1;
          return 0;
        }
		ll ans=1;
		for(ll i=1;i<N;i++)
		{
			ll k=min(dp[i].ss,(cur[i-1]-ar[i-1])*2);
          	if(k<dp[i].ff)
            {
              cout<<-1<<endl;
              return 0;
            }
			cur[i]=k;
			ans+=k;
		}
		cout<<ans<<endl;
	}
}

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

using namespace std;

int main()
{
    int n, m, a;
    vector <long long> V;
    cin >> n >> m;
    long long x, S=0, S1[n+3], S2[n+3];
    for (int i = 0; i < n; i++)
    {
        cin >> a;
        V.push_back(a);
    }
    if (n % 2 == 1)
    {
        V.push_back(-1100000000);
    }
    sort(V.begin(),V.end());
    n = V.size();
    S1[0] = 0;
    S2[0] = 0;
    for (int i = 1; i <= n; i++)
    {
        S1[i] = S1[i-1] + max(V[i-1], 0ll);
        S2[i] = S2[i-1];
        if (i % 2 == 0)
        {
            S2[i] += max(V[i-1], 0ll);
        }
    }
    for (int i = 0; i < m; i++)
    {
        cin >> x;
        int L=0, R=n/2+1, t, l, r;
        while (R - L > 1)
        {
            t = (L + R) / 2;
            l = n-2*t;
            r = n-t-1;
            if (l > 0 && abs(x-V[l-1]) <= abs(V[r]-x))
            {
                L = t;
            }
            else
            {
                R = t;
            }
        }
        S = S1[n] - S1[n-R];
        if (n-2*R > 0)
        {
            S += S2[n-2*R];
        }
        cout << S << "\n";
    }
    return 0;
}


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

using namespace std;
using ll = long long;

int main() {
    int n;
    cin>>n;
    int cnt=0;
    string ans="No";
    for(int i = 0;i < n;++i) {
        int a,b;
        cin>>a>>b;
        if(a==b)++cnt;
        else cnt=0;
        if(cnt>=3)ans="Yes";
    }
    cout<<ans<<endl;
    return 0;
}


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

int main(){
  long long int a,b;
  cin >> a >> b;
  int g=0;
  for(int i=1;i<=max(a,b);i++){
    if(a%i==0&&b%i==0){
      g=i;
    }
  }
  cout << a*b/g << endl;
}

Measured memory_bytes: 256
#include<iostream>
    #include<stdio.h>
    //#include <bits/stdc++.h>
    #include<vector>
    #include<float.h>
    #include<iomanip>
    #include<algorithm>
    #include<string>
    #include<cstring>
    #include<math.h>
    #include<cmath>
    #include<sstream>
    #include<set>
    #include<map>
    #include<queue>
    #include <cassert>
    #include <cmath>
    #include<cstdint>

    #define INF 1e7
    #define rep(i,n)for(int i=0;(i)<(int)(n);i++)
    #define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
    #define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
    #define vec(type,n) vector<type>(n)
    #define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))

    using namespace std;
    using ll = long long;
    using Graph = vector<vector<int>>;
    using P = pair<int,int>;

    int main(){
        int n;cin>>n;
        auto p = vec(int,n);
        auto q = vec(int,n);
        rep(i,n){
            cin>>p[i];
            q[i] = p[i];
        }
        sort(p.begin(),p.end());
        int cnt = 0;
        rep(i,n){
            if(p[i] != q[i])cnt++;
        }
        if(cnt<=2)cout<<"YES";
        else cout<<"NO";

    }
    


Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<deque>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#include<unordered_set>
#include<iomanip>
#include<cassert>
#include<regex>
#include<bitset>
#include<complex>
#include<chrono>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(),x.end()
using ll=long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;

ll gcd(ll n, ll m) {
	ll tmp;
	while (m!=0) {
		tmp = n % m;
		n = m;
		m = tmp;
	}
	return n;
}

ll lcm(ll n, ll m) {
	return abs(n * m) / gcd(n, m);//gl=xy
}
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
using namespace std;

//ここから

void solve(){
  double t,x;
  cin>>t>>x;
  cout<<t/x;
}

int main(){
	ios::sync_with_stdio(false);
  cin.tie(0);
	cout<<fixed<<setprecision(15);
  solve();
	return 0;
}


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

using namespace std;

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

int main() {
	int n;
	map<char, int> mp;
	string tb;
	for (char c = 'a'; c <= 'z'; c++) {
		mp[c] = tb.size();
		tb += c;
	}
	for (char c = 'A'; c <= 'Z'; c++) {
		mp[c] = tb.size();
		tb += c;
	}
	while (cin >> n && n) {
		vector<int> a(n);
		rep(i, n) {
			cin >> a[i];
		}
		string s;
		cin >> s;
		rep(i, s.size()) {
			int move = a[i % n];
			int now = mp[s[i]];
			cout << tb[(now - move + tb.size()) % tb.size()];
		}
		cout << endl;
	}

	return 0;
}

Measured memory_bytes: 3232
#include<stdio.h>
#include<stdlib.h>

int main()
{
        int n;
        char strings[3000];
        int alphabet[30];
        int frequency[1500];
        int i;
        int j;
        int k;
        int count=0;
        int minwordlength=51;
        int shortword;
        int alphabetcount;

        for(i=0;i<1500;i++) frequency[i]=0;
        for(i=0;i<27;i++) alphabet[i]=51;

        scanf("%d",&n);
        scanf("%c",&strings[count]);
        for(i=0;i<n;i++)
        {
                for(;;)
                {
                        scanf("%c",&strings[count]);
                        if((strings[count]>('a'-1))&(strings[count]<('z'+1))) frequency[i*27+strings[count]-'a']++;
                        count++;
                        if((strings[count-1]<'a')|(strings[count-1]>'z')) break;
                }
        }

        for(i=0;i<n;i++)
        {
                for(j=0;j<27;j++)
                {
                        if( frequency[i*27+j] < alphabet[j]) alphabet[j]=frequency[i*27+j];
                }
        }
       for(i=0;i<27;i++) 
       {
                for(k=0;k<alphabet[i];k++){
                       printf("%c",'a'+i);
                }
       }
       printf("\0");
       printf("\n");

        return 0;
}

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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int dp[] = new int[n];
        String in[] = br.readLine().split(" ");
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=Integer.parseInt(in[i]);
        }
        Arrays.fill(dp,Integer.MAX_VALUE);
        dp[0]=0;
        for(int i=0;i<n;i++){
            for(int j=i+1;j<=Math.min(i+2,n-1);j++){
                dp[j]=Math.min(Math.abs(arr[i]-arr[j])+dp[i], dp[j]);
            }
        }
        System.out.println(dp[n-1]);
    }
}


Measured memory_bytes: 34684
#include<bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define mp make_pair
using ll = long long;
const ll M = 1000000007;
const ll infi = 1000000000000000;
const ll md = 998244353;
using namespace std;
using vl = vector<ll>;
using pll =  pair<ll,ll>;

ll power(ll x,ll y){
    if(y==0)
    return 1;
    ll res=power(x,y/2);
    res=(res*res)%M;
    if(y&(ll)1)
    res=(res*x)%M;
    return res;
}
//ll temp[100001];
void solve(){
    int a,b,c;
    cin>>a>>b>>c;
    if((a==b&&c!=a)||(a==c&&b!=a)||(c==b&&a!=c))
    cout<<"Yes"<<endl;
    else
    cout<<"No"<<endl;
}
 
 
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // temp[0]=0;
    // for(int i=1;i<100001;i++)
    // {
    //     temp[i]=i/2+i%2;
    //     temp[i]=(temp[i]+temp[i-1])%M;
    // }
    // int t;
    // cin>>t;
    // while(t--)
    solve();
    return 0;
}

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

int main() {
    int a;
    string s;
    cin>>a;
    cin>>s;
    if(a>=3200) {
        cout<<s<<endl;
    }
    else {
    cout<<"red"<<endl;
    }
}


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

using namespace std;

int main(){
    int r, D, X[11];

    cin >> r >> D >> X[0];

    for(int i = 1; i <= 10; i++){
        int ans;
        ans  = (r * X[i - 1]) - D;
        X[i] = ans;
        cout << ans << endl;
    }    
}

Measured memory_bytes: 256
n, c, k = map(int, input().split())
t = [0] * n
for i in range(n):
    t[i] = int(input())

t.sort()
ans = 0
now_person = 0
first_lim = 0
for i in range(n):
    if now_person == 0:
        first_lim = t[i]
        now_person = 1
        ans += 1
    else:
        if t[i] - first_lim  <= k:
            now_person += 1
        else:
            first_lim = t[i]
            now_person = 1
            ans += 1

    #print(i, t[i], now_person, first_lim, ans)

    if now_person == c:
        now_person = 0

print(ans)

Measured memory_bytes: 7472
a = []

for i in range(3):
  a.append(list(map(int,input().split())))
n = int(input())
b = []
for i in range(n):
  b.append(int(input()))

for b1 in b:
  for a1 in a:
    if b1 in a1:
      a1[a1.index(b1)] = 0
aa = [[a[0][0],a[1][0],a[2][0]],[a[0][1],a[1][1],a[2][1]],[a[0][2],a[1][2],a[2][2]]]

if a[0].count(0) == 3 or a[1].count(0) == 3 or a[2].count(0) == 3 or aa[0].count(0) == 3 or aa[1].count(0) == 3 or aa[2].count(0) == 3 or a[0][0] == a[1][1] == a[2][2] == 0 or a[0][2] == a[1][1] == a[2][0] == 0:
  print('Yes')
else:
  print('No')

Measured memory_bytes: 9044
use std::io::{self, Read};
use std::str::FromStr;

pub struct Scanner<R: Read> {
    reader: R,
}
impl<R: Read> Scanner<R> {
    pub fn new(reader: R) -> Scanner<R> {
        Scanner { reader: reader }
    }
    pub fn read<T: FromStr>(&mut self) -> T {
        let s = self
            .reader
            .by_ref()
            .bytes()
            .map(|c| c.expect("failed to read char") as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        s.parse::<T>().ok().expect("failed to parse token")
    }
}

/// 添え字が1から始まる完全二分木。添え字がindex対応
/// node[id]の親はid//2, 左の子はid*2, 右の子はid*2+1となる
struct BinaryHeap {
    last: usize,    // 現在のHeapの末尾のindexを指す(nodes[last]が存在)
    nodes: Vec<Node>,
}

struct Node {
    key: i64,
}

impl BinaryHeap {
    fn new(size: usize) -> BinaryHeap {
        BinaryHeap {
            last: 0,
            nodes: (0..size+1).map(|_| Node { key: 0} ).collect(),
        }
    }

    fn insert(&mut self, val: i64) {
        self.last += 1;
        self.nodes[self.last].key = val;

        // 整列は本問題では未実装
    }

    // 与えられたidの親のidを返す関数
    fn id_parent(&self, id: usize) -> Option<usize> {
        if id / 2 > 0 {
            Some(id/2)
        } else {
            None
        }
    }

    // 与えられたidの左の子のidを返す関数
    fn id_left(&self, id: usize) -> Option<usize> {
        let cid = id*2;
        if cid <= self.last {
            Some(cid)
        } else {
            None
        }
    }

    // 与えられたidの右の子のidを返す関数
    fn id_right(&self, id: usize) -> Option<usize> {
        let cid = id*2+1;
        if cid <= self.last {
            Some(cid)
        } else {
            None
        }
    }

    fn print(&self) {
        for i in 1..self.last+1 {
            print!("node {}: key = {}, ", i, self.nodes[i].key);
            if let Some(pid) = self.id_parent(i) {
                print!("parent key = {}, ", self.nodes[pid].key);
            }
            if let Some(cid) = self.id_left(i) {
                print!("left key = {}, ", self.nodes[cid].key);
            }
            if let Some(cid) = self.id_right(i) {
                print!("right key = {}, ", self.nodes[cid].key);
            }
            println!("");
        }
    }
}

fn main() {
    let sin = io::stdin();
    let sin = sin.lock();
    let mut sc = Scanner::new(sin);

    let h: usize = sc.read();
    let mut heap = BinaryHeap::new(h);
    for _ in 0..h {
        let v: i64 = sc.read();
        heap.insert(v);
    }
    heap.print();
}



Measured memory_bytes: 5032
#include <stdio.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <queue>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <complex>

using ll = long long int;
using namespace std;

ll euclid_gcd(ll x, ll y);
int main(){
  ll K;
  cin >> K;

  ll ans = 0;
  for(ll i = 1; i <= K; i++){
    for(ll j = 1; j <= K; j++){
      for(ll k = 1; k <= K; k++){
        ans += euclid_gcd(i, euclid_gcd(j, k));
      }
    }
  }
  
  cerr << "Answer:" << endl;
  cout << ans << endl;

  return 0;
}

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

Measured memory_bytes: 3644
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
    M = 3;
  string S;
  cin >> S;
  N = S.size();
  char x,y;

    for(int i = 0; i < (N+1)/2; i++){
       x=S.at(i);
       y=S.at(N-1-i);
if(x==y){
continue;
}else{
  M = 6;
    break;
  }
}

    for(int i = 0; i < ((N+1)/2+1)/2; i++){
    x=S.at(i);
    y=S.at((N-1)/2-1-i);
if(S.at(i)==S.at((N-1)/2-1-i)){
continue;
}else{
  M = 6;
    break;
  }
}
  
  if(M==3){
  cout << "Yes";
  }else{
   cout << "No"; 
  } 
}

Measured memory_bytes: 256
from bisect import *
n, m, k = map(int, input().split())
A = [0]
for x in map(int, input().split()):
    if A[-1]+x > k: break
    A.append(A[-1]+x)
B = [0]
for x in map(int, input().split()):
    if B[-1]+x > k: break
    B.append(B[-1]+x)
ans = 0
for i in range(len(A)):
    j = bisect_right(B, k-A[i]) - 1
    ans = max(ans, i+j)
print(ans)


Measured memory_bytes: 39600
use std::str::FromStr;
use std::io::*;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main(){
    let n: usize = read();
    let a :Vec<i32> = (0..n).map(|_| read()).collect();
    let mut ans = 0;
    let mut height = 0;
    for x in &a{
        if height <= *x{
            height = *x;
            ans=ans+1;
        }
    }
    println!("{}",ans);
}

Measured memory_bytes: 4352
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> pll;
const ll mod=1e9+7;
//const ll mod=998244353;
const ll inf=5e18;

int main() {
  ll x,y;
  cin >> x >> y;
  ll ans=0;
  if(x<0&&y<0) {
    if(x>y) {
      ans=2+abs(y)-abs(x);
    }
    else if(x<y) {
      ans=abs(abs(y)-abs(x));
    }
  }
  else if(x<0) {
    if(y!=0) {
      ans=1+abs(abs(x)-abs(y));
    }
    else {
      ans=abs(x);
    }
  }
  else if(y<0) {
    ans=1+abs(abs(x)-abs(y));
  }
  else if(x==0) {
    ans=abs(y);
  }
  else if(y==0) {
    ans=abs(x)+1;
  }
  else {
    ans=abs(x-y);
    if(x>y) {
      ans+=2;
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
    
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
    
#define int long long
#define double long double
    
#define all(a)      (a).begin(),(a).end()
#define sz(x)       (int)x.size()
    
#define ff first
#define ss second
#define mp make_pair
         
#define pb push_back
#define endl "\n" 
         
#define f(i,l,r) for(int i=l;i<=r;i++)
#define rf(i,r,l) for(int i=r;i>=l;i--)    
 
#define bp __builtin_popcountll
#define inf 1e18
    
const int N=50+5;
const int MOD=1e9+7;

void solve()
{
	int n,k;
	cin>>n>>k;
	int a[n];
	f(i,0,n-1)
	cin>>a[i];
	for(int i=k;i<n;i++)
	{
		if(a[i]>a[i-k])
		cout<<"Yes"<<endl;
		else
		cout<<"No"<<endl;
	}
}
 
signed main()
{
	FAST
    int t=1;
    // cin>>t;
    for(int tc=1;tc<=t;tc++)
    {
    	// cout<<"Case #"<<tc<<": "<<endl;
    	solve();
    }
}


Measured memory_bytes: 5216
S = list(input())
   
ans = []
pre = 0
for s in S:
    if s == 'A' or s == 'C' or s == 'G' or s == 'T':
        pre += 1
    else:
        ans.append(pre)
        pre = 0

ans.append(pre)
print(max(ans))

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

int main(void)
{
  int n,a,b;
  cin>>n;
  if(n==1)
    cout<<"Hello World"<<endl;
  if(n==2){
    cin>>a;
    cin>>b;
    cout<<a+b<<endl;
  }
}

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

using namespace std;
typedef long long ll;
const ll INF=10000000000000000LL;
int n,a[300001];

int main() {
	cin>>n;
	priority_queue<int,vector<int>,greater<int> >que;
	priority_queue<int,vector<int> >que2;
	ll l[100001]={};
	ll r[100001]={};
	for(int i=0;i<n;++i){
		cin>>a[i];
		que.push(a[i]);
		l[0]+=a[i];
	}
	for(int i=n;i<2*n;++i)cin>>a[i];
	for(int i=2*n;i<3*n;++i){
		cin>>a[i];
		que2.push(a[i]);
		r[n]+=a[i];
	}
	for(int i=1;i<=n;++i){
		l[i]=l[i-1]+a[i+n-1];
		que.push(a[i+n-1]);
		int h=que.top();que.pop();
		l[i]-=h;
	}
	for(int i=n-1;i>=0;--i){
		r[i]=r[i+1]+a[i+n];
		que2.push(a[i+n]);
		int h=que2.top();que2.pop();
		r[i]-=h;
	}
	ll t=-INF;
	for(int i=0;i<=n;++i){
		t=max(l[i]-r[i],t);
	//	cout<<l[i]<<" "<<r[i]<<endl;
	}
	cout<<t<<endl;
	return 0;
}


Measured memory_bytes: 4088
#include<iostream>
using namespace std;
long N;
char S[200020];
int main(){

  cin >> N >> S;
  long ans=0;
  long w=0,b=0;
  long col=0;

  for (long i=0;i<N;i++){
    if (S[i]=='.'){w++;}else{b++;}
  }
  col=w;
  ans=col;
  for (long i=0;i<N;i++){
    if (S[i]=='.')col--;
    if (S[i]=='#')col++;
    if (ans>col)ans=col;
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 512
#include<iostream>
using namespace std;
int main(void){
  int i,tmp,ans,d[4]={0};
  for(i=0;i<6;i++){
    cin>>tmp;
    d[tmp-1]++;
  }
  for(ans=1,i=0;i<4;i++)if(!(d[i]==1||d[i]==2))ans=0;
  puts(ans?"YES":"NO");
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

const int INF = 1 << 29;
typedef pair<int, int> P;

int n, r;

int main(void)
{
	while(cin >> n >> r && n)
	{
		vector<int> hudas(n);
		for (int i = 0; i < n; i++)
			hudas[i] = n - i;
		for (int i = 0; i < r; i++)
		{
			int p, c;
			cin >> p >> c, p--;

			vector<int> tmp;
			for (int j = 0; j < c; j++)
			{
				tmp.push_back(hudas[p + j]);
			}
			for (int j = 0; j < n; j++)
			{
				if(j < p || j >= p + c)
					tmp.push_back(hudas[j]);
			}
			hudas = tmp;
		}

		cout << hudas[0] << endl;
	}
	return 0;
}

Measured memory_bytes: 1220
MOD = 10**9 + 7

N, M = [int(i) for i in input().strip().split()]
dirty_step_idxs = [0] * M
for i in range(M):
  dirty_step_idx = int(input())
  dirty_step_idxs[i] = dirty_step_idx

def fibonacci(n):
  # 0, 1, 1, 2, 3, 5, 8, ...
  a, b = 0, 1
  for i in range(n-1):
    a, b = b, a + b
  return a
  
if M == 0:
  res = fibonacci(N + 2)
else:
  res = 1
  now_step_idx = 0
  for i in range(M):
    n_step = dirty_step_idxs[i] - now_step_idx - 1
    if n_step == -1:
      res = 0
      break
    res *= fibonacci(n_step + 2)
    now_step_idx = dirty_step_idxs[i] + 1
  rest_steps = N - now_step_idx
  res *= fibonacci(rest_steps + 2) 
    
print(res % MOD)


Measured memory_bytes: 7028
#include <bits/stdc++.h>
#include <iostream>
#include <functional>
#include <vector>
#include <stdio.h>
#include <queue>
#include <string.h>
#include <math.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<=n;i++)
#define rep1(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=a;i>=n;i--)
#define per1(i,a,n) for (int i=a;i>n;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define endl "\n"
#define pi 3.14159265358979323846264338327950288419716939937510
#define IOS cin.sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll mod=1000000007;
const int inf=0x3f3f3f3f;
const ll INF=0x3f3f3f3f3f3f3f3f;
ll qpow(ll a,ll b){ll s=1;while(b>0){if(b%2==1){s=s*a;}a=a*a;b=b>>1;}return s;}
ll qpowmod(ll a, ll b, ll c){ll res, t;res=1;t=a%c;while(b){if(b & 1){res=res*t%c;}t=t*t%c;b>>=1;}return res;}
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;}
inline long long read(){long long k=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){k=k*10+ch-'0';ch=getchar();}return k*f;}
inline void write(long long x){if(x<0)x=-x,putchar('-');if(x>9)write(x/10);putchar(x%10+'0');}
// head
ll n;
string t;
set<string> s;
int main()
{
    //IOS;
    cin>>n;
    for(int i=1; i<=n; i++)
    {
        cin>>t;
        s.insert(t);
    }
    cout<<s.size();
    return 0;
}
/*

*/


Measured memory_bytes: 19180
#include<iostream>
#include<string>
using namespace std;
int main(){
  int n,i;
  bool f;
  string s,t;
  cin >>n>> s >> t;
  for(i=0;i<n;i++){
    f=true;
    for(int j=0;j+i<n;j++){
      if(s[i+j]!=t[j]){
        f=false;
        break;
      }
    }
    if(f){
      cout << n+i<<endl;
      return 0;
    }
  }
  cout << 2*n<<endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n); i >= 0; i--)
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define ALL(obj) begin(obj), end(obj)
using namespace std;
using llong = long long;

const int INF = 100100100;
const int MOD = 1e9 + 7;

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

    int X;
    cin >> X;

    int num = X / 100;
    int red = X % 100;
    if (num > 100) {
        num = 100;
    }

    for (int i = 0; i <= num; i++) {
        for (int j = 0; j <= num - i; j++) {
            for (int k = 0; k <= num - i - j; k++) {
                for (int l = 0; l <= num - i - j - k; l++) {
                    for (int m = 0; m <= num - i - j - k - l; m++) {
                        if (i + j * 2 + k * 3 + l * 4 + m * 5 == red) {
                            cout << 1 << endl;
                            return 0;
                        }
                    }
                }
            }
        }
    }
    cout << 0 << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
string str1,str2;
void solve()
{
    int i,len=str1.length(),dat;
    for (int i=0;i<len/2;i++) {dat=str1[i];str1[i]=str1[len-1-i];str1[len-1-i]=dat;}
    if(str1==str2) cout<<"YES";
    else cout<<"NO";
    cout<<endl;
}
int main()
{
    while(cin>>str1>>str2)
        solve();
}

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

struct rational {
  ll n, d;

  rational(): n(0), d(1) {}
  rational(ll _n): n(_n), d(1) {}
  rational(ll _n, ll _d) {
    ll g = gcd(abs(_n), abs(_d));
    n = _n / g * (_d / abs(_d));
    d = abs(_d) / g;
  }

  rational operator+(rational r) const { return rational(n * r.d + d * r.n, d * r.d); }
  rational operator-(rational r) const { return rational(n * r.d - d * r.n, d * r.d); }
  rational operator+=(const rational &r) { return *this = *this + r; }
  rational operator-=(const rational &r) { return *this = *this - r; }

  static ll gcd(ll a, ll b) { return b != 0 ? gcd(b, a % b) : a; }
};

int main(void) {
  string S;
  while(cin >> S, S != "#") {
    ll n = S.size();

    rational ans;
    if(S.substr(n - 4, 4) == "west") {
      ans = rational(90);
      n -= 4;
    } else {
      ans = rational(0);
      n -= 5;
    }
    for(ll i = 1; n > 0; i++) {
      if(S.substr(n - 4, 4) == "west") {
        ans += rational(90, pow(2, i));
        n -= 4;
      } else {
        ans -= rational(90, pow(2, i));
        n -= 5;
      }
    }

    if(ans.d == 1) cout << ans.n << endl;
    else cout << ans.n << "/" << ans.d << endl;
  }
}


Measured memory_bytes: 3144
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
#define endl '\n'
const int inf = 1000000007;
const ll INF = 1e18;
// int mod = 998244353;
int mod = 1000000007;
#define abs(x) (x >= 0 ? x : -(x))
#define lb(v, x) (int)(lower_bound(all(v), x) - v.begin())
#define ub(v, x) (int)(upper_bound(all(v), x) - v.begin())
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
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; }
template<typename T, typename U> T pow_(T a, U b) { return b ? pow_(a * a, b / 2) * (b % 2 ? a : 1) : 1; }
ll modpow(ll a, ll b, ll _mod) { return b ? modpow(a * a % _mod, b / 2, _mod) * (b % 2 ? a : 1) % _mod : 1; }
template<class T, class U> ostream& operator << (ostream& os, const pair<T, U>& p) { os << p.F << " " << p.S; return os; }
template<class T> ostream& operator << (ostream& os, const vector<T>& vec) { rep(i, sz(vec)) { if (i) os << " "; os << vec[i]; } return os; }
template<class T> ostream& operator << (ostream& os, const set<T>& s) { for (auto e : s) os << e; return os; }
template<typename T> inline istream& operator >> (istream& is, vector<T>& v) { rep(j, sz(v)) is >> v[j]; return is; }
template<class T, class T2> inline void add(T &a, T2 b) { (a += b % mod) %= mod; if (a < 0) a += mod; }
template<class T> void operator += (vector<T>& v, vector<T> v2) { rep(i, sz(v2)) v.eb(v2[i]); }


void solve();

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12); // debuged
  int T;
  T = 1;
  while (T--) solve();
}

void solve() {
  int a, b, x;
  cin >> a >> b >> x;
  auto f = [&](double x) {
    return 90 - atan(x) / 2 / M_PI * 360;
  };
  if (x * 2 > a * b * a) {
    double h = 2.0 * (a * a * b - x) / a / a;
    cout << f(a * 1.0 / h) << endl;
  } else {
    double h = 2.0 * x / a / b;
    cout << f(h / b) << endl;
  }
}


Measured memory_bytes: 4060
#include<math.h>
#include<limits.h>
#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<sstream>
#include<list>
#include<queue>
#include <algorithm>
#include<initializer_list>
using namespace std;

int main() {
	string s;
	cin >> s;
	cout<<s.substr(0, s.size() - 8);

	return 0;
}





Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define INIT  ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define mp make_pair
#define pb push_back
#define ft first
#define sc second
#define ll long long
#define pii pair<int, int>
#define count_bits __builtin_popcount
#define int ll

int t, n, m;
int mod=((ll)1e9)+7;
int dp[2][2][1000010];

int32_t main(){
INIT
cin>>n;
dp[0][0][0]=1;
for(int i=1; i<=n; i++){
    dp[0][0][i]=(dp[0][0][i-1]*8)%mod;
    dp[1][0][i]=(dp[0][0][i-1]+dp[1][0][i-1]*9)%mod;
    dp[0][1][i]=(dp[0][0][i-1]+dp[0][1][i-1]*9)%mod;
    dp[1][1][i]=( ((dp[0][1][i-1]+dp[1][0][i-1])%mod)+((dp[1][1][i-1]*10)%mod) )%mod;
}
cout<<dp[1][1][n];
return 0;
}





Measured memory_bytes: 34692
#include <bits/stdc++.h>
#define inf (int)(1e8)
using namespace std;

using P = pair<int, int>;
struct dat {
  P p;
  int cost;
  dat(P _p = P(0, 0), int c = 0) : p(_p), cost(c) {}
  bool operator<(const dat& r) const { return cost > r.cost; }
};

int h, w;
P st, go;
vector<string> s;
vector<vector<int>> dist;
int d[4] = {0, 1, 0, -1};

int solve();
bool isvalid(P now) {
  return now.first >= 0 && now.first < h && now.second >= 0 && now.second < w &&
         s[now.first][now.second] == '.';
}

int main() {
  cin >> h >> w >> st.first >> st.second >> go.first >> go.second;
  --st.first, --st.second, --go.first, --go.second;
  dist.assign(h, vector<int>(w, inf));
  s.resize(h);
  for (auto& p : s) cin >> p;
  cout << solve() << endl;
  return 0;
}

int solve() {
  priority_queue<dat> pq;
  pq.push(dat(st, 0));
  dist[st.first][st.second] = 0;
  while (pq.size()) {
    auto [p, c] = pq.top();
    int x = p.first, y = p.second;
    pq.pop();
    if (dist[x][y] != c) continue;

    for (int i = 0; i < 4; ++i) {
      int nx = x + d[i], ny = y + d[i ^ 1];
      if (!isvalid(P(nx, ny))) continue;
      if (dist[nx][ny] > c) {
        dist[nx][ny] = c;
        pq.push(dat(P(nx, ny), c));
      }
    }

    for (int i = -2; i <= 2; ++i)
      for (int j = -2; j <= 2; ++j) {
        int nx = x + i, ny = y + j;
        if (!isvalid(P(nx, ny))) continue;
        if (dist[nx][ny] > c + 1) {
          dist[nx][ny] = c + 1;
          pq.push(dat(P(nx, ny), c + 1));
        }
      }
  }
  if (dist[go.first][go.second] == inf) return -1;
  return dist[go.first][go.second];
}

Measured memory_bytes: 9508
#include <bits/stdc++.h>
#define rep(i,n) for (int i = (0); i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(x) (x).begin(),(x).end()
#define rrng(x) (x).rbegin(),(x).rend()
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x,y) cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x,y,z) cout << #x << " = " << (x) << ", " << #y << " = " << (y) <<  ", " << #z << " = " << (z) << endl
#define showv(v) rep(i,v.size()) printf("%d%c", v[i], i==v.size()-1?'\n':' ')
#define showv2(v) rep(j,v.size()) showv(v[j])
#define showt(t,n) rep(i,n) printf("%d%c", t[i], i==n-1?'\n':' ')
#define showt2(t,r,c) rep(j,r) showt(t[j],c)
#define showvp(p) rep(i,p.size()) printf("%d %d\n", p[i].first, p[i].second);
#define printv(v) rep(i,v.size()) printf("%d\n", v[i])
#define printt(t,n) rep(i,n) printf("%d\n", t[i])
#define incl(v,x) find(rng(v),x)!=v.end()
#define incls(s,c) s.find(c)!=string::npos
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n,k) ((n>>k)&1) // nのk bit目
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define uni(x) x.erase(unique(rng(x)),x.end())
#define SP << " " <<
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vs = vector<string>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
//const long double EPS = 1e-14;
const int INF = (1<<30)-1;
const ll LINF = (1LL<<62)-1;
#define dame { puts("No"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
inline int in() { int x; scanf("%d",&x); return x;}
//template<class T = int> inline T in() { T x; cin >> x; return (x);}
template<typename T>inline ll suma(const v(T)& a) { ll res(0); for (auto&& x : a) res += x; return res;}
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
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;}

char itoa(int n) {
  return n + '0';
}

int main () {
  int a, b;
  cin >> a >> b;
  string s = string(b, itoa(a));
  string t = string(a, itoa(b));
  cout << min(s,t) << endl;
  return 0;
}

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

int n;
int p[100005] = {0};

int solve();

int main() {
  cin >> n;
  for(int i = 0; i < n; ++i) {
    cin >> p[i];
    --p[i];
  }
  cout << solve() << endl;
  return 0;
}

int solve() {
  int ans = 0;
  for(int i = 0; i < n - 1; ++i)
    if(p[i] == i) {
      swap(p[i], p[i + 1]);
      ++ans;
    }
  if(p[n - 1] == n - 1) ++ans;
  return ans;
}

Measured memory_bytes: 640