akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
typedef long long int l1;
#define input l1 t;cin>>t;while(t--)
#define pb push_back
int main(){
  l1 x,y,z;
  cin>>x>>y>>z;
  l1 k,r;
  k=y;
  y=x;
  x=k;
  r=x;
  x=z;
  z=r;
  cout<<x<<" "<<y<<" "<<z;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <tuple>
#include <cstdio>
#include <bitset>
#include <sstream>
#include <iterator>
#include <numeric>
#include <map>
#include <cstring>
#include <set>
#include <functional>
#include <iomanip>


using namespace std;

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


double facctorialMethod(ll k){
    double sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}

void solve(long long N, std::vector<long long> x, std::vector<long long> y){
    ll a[N];
    double d=0;
    rep(i,N)a[i]=i;
    do
    {
        rep(i,N-1){
            d+=hypot(x[a[i]]-x[a[i+1]],y[a[i]]-y[a[i+1]]);
        }
    } while (next_permutation(a,a+N));

    cout<<(d/facctorialMethod(N)) << endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    cout << fixed << setprecision(10);
    long long N;
    scanf("%lld",&N);
    std::vector<long long> x(N);
    std::vector<long long> y(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&x[i]);
        scanf("%lld",&y[i]);
    }
    solve(N, std::move(x), std::move(y));
    return 0;
}


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

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            var N = ReadInt();
            var H = ReadArrayInt();
            var ans = 0;
            var cnt = 0;
            for (int i = N - 2; i >= 0; i--)
            {
                if (H[i] >= H[i + 1])
                {
                    cnt++;
                    if (cnt > ans) ans = cnt;
                }
                else
                {
                    cnt = 0;
                }
            }

            Console.WriteLine(ans);
            Console.ReadLine();
        }

        static string Read() { return Console.ReadLine(); }
        static int ReadInt() { return int.Parse(Read()); }
        static long ReadLong() { return long.Parse(Read()); }
        static int[] ReadArrayInt() { return Read().Split(' ').Select(s => int.Parse(s)).ToArray(); }
        static long[] ReadArrayLong() { return Read().Split(' ').Select(s => long.Parse(s)).ToArray(); }
    }
}

Measured memory_bytes: 26204
#include <bits/stdc++.h>
using namespace std;
constexpr int P = 1000000007;
void increase(int &a, int b) {(a += b) >= P ? a -= P : 0;}
void decrease(int &a, int b) {(a -= b) < 0 ? a += P : 0;}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    vector<int> match(2 * n, -1), g(2 * n + 1), s(2 * n + 1, 1);
    s[0] = 0;
    g[0] = 1;
    for (int i = 2; i <= 2 * n; i += 2)
        g[i] = 1LL * g[i - 2] * (i - 1) % P;
    int k;
    cin >> k;
    for (int i = 0; i < k; ++i) {
        int x, y;
        cin >> x >> y;
        --x;
        --y;
        match[x] = y;
        match[y] = x;
        s[x + 1] = s[y + 1] = 0;
    }
    for (int i = 1; i <= 2 * n; ++i)
        s[i] += s[i - 1];
    int ans = 0;
    vector<vector<int>> dp(2 * n, vector<int>(2 * n));
    for (int i = 0; i < 2 * n; ++i) {
        for (int j = i, mx = -1; j < 2 * n; ++j) {
            if (match[j] != -1) {
                if (match[j] < i)
                    break;
                mx = max(mx, match[j]);
            }
            if (j < mx)
                continue;
            int y = 2 * (n - k) - s[j + 1] + s[i];
            if (y % 2 == 1)
                continue;
            dp[i][j] = g[s[j + 1] - s[i]];
            for (int k = i; k < j; ++k)
                decrease(dp[i][j], 1LL * dp[i][k] * g[s[j + 1] - s[k + 1]] % P);
            increase(ans, 1LL * dp[i][j] * g[y] % P);
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 1664
#include<stdio.h>

void print(int x[][3][10]);

void print(int x[][3][10]){
  int i, j, k;
  char str20[]="####################";
  for(i=0;i<4;i++) {
    for(j=0;j<3;j++) {
      for(k=0;k<10;k++) {
        printf(" %d",x[i][j][k]);
      }
      printf("\n");
    }
    if(i<3) {
      printf("%s\n",str20);
    }
  }
  return;
}

int main(void){
  int b, f, r, v, i, n;
  int a[4][3][10]={0};
  scanf("%d",&n);
  for(i=0;i<n;i++) {
    scanf("%d %d %d %d",&b,&f,&r,&v);
    a[b-1][f-1][r-1] += v;
  }
  print(a);
  return 0;
}


Measured memory_bytes: 2100
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
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;
}

const long long INF = 1e18;
//const ll mod = 1000000007;
ll N, K;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N >> K;
    vector<ll> P(N);
    for(int i = 0; i < N; i++) {
        cin >> P[i];
        P[i]--;
    }
    vector<ll> C(N);
    for(int i = 0; i < N; i++) cin >> C[i];
    ll ans = -INF;
    for(auto tmp : C) chmax(ans, tmp);
    if(ans < 0) {
        cout << ans << endl;
        return 0;
    }
    for(int s = 0; s < N; s++) {
        vector<ll> a;
        ll sum = 0;
        ll now = s;
        while(true) {
            sum += C[now];
            a.push_back(C[now]);
            now = P[now];
            if(now == s) break;
        }
        ll ret = 0;
        if(sum > 0) {
            ret = ((K - 1) / a.size()) * sum;
        }
        ll nowK = K % a.size();
        if(nowK == 0) nowK = a.size();
        if(sum <= 0) {
            nowK = min(K, (ll)a.size());
        }
        ll rest = 0;
        ll nowrest = 0;
        for(int i = 0; i < nowK; i++) {
            nowrest += a[i];
            chmax(rest, nowrest);
        }
        ret += rest;
        /*
        cerr << s << " " << nowK << " " << a.size() << " " << ret << endl;
        for(auto tmp : a) cerr << tmp << " ";
        cerr << endl;
        */
        chmax(ans, ret);
    }
    cout << ans << endl;
    return 0;
}


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

#define rep(i, n) for(int i = 0; i<(n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef long long ll;


int main() {
    ll N, M;
    cin >> N >> M;

    if (N == 1 && M == 1) {
        cout << 1 << endl;
        return 0;
    }

    if (N == 1 || M == 1) {
        cout << max(0LL, max(N, M) - 2LL) << endl;
        return 0;
    }

    if (N == 2 || M == 2) {
        cout << 0 << endl;
        return 0;
    }

    cout << (N - 2) * (M - 2) << endl;
}

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

#define FILE
#define fr first
#define se second

using namespace std;

const long long N = 1e2 + 7;
const long long inf = 1e9 + 7;
const long long mod = 1e9 + 7;

int n;
int m;
int d[N][N];
char a[N][N];
int main()
{
    #ifdef FILEs
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    ios_base::sync_with_stdio(false);

    cin >> n >> m;
    for(int i = 1; i <= n; i ++){
        for(int j = 1; j <= m; j ++){
            cin >> a[i][j];
        }
    }
    memset(d, 0x3f, sizeof d);
    d[1][1] = (a[1][1] == '#');
    for(int i = 1; i <= n; i ++){
        for(int j = 1; j <= m; j ++){
            d[i][j] = min(d[i][j], d[i][j - 1] + (a[i][j - 1] == '.' && a[i][j] == '#'));
            d[i][j] = min(d[i][j], d[i - 1][j] + (a[i - 1][j] == '.' && a[i][j] == '#'));
        }
    }
    cout << d[n][m] << "\n";
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int K, A, B, bai;
  int i = 0;
  cin >> K >> A >> B;
  //cout << K << A << B << endl;
  
  while (true) {
    bai = K*i;
    if (bai > B) {
      cout << "NG" << endl;
      break;
    }
    if (A<=bai && bai<=B) {
      cout << "OK" << endl;
      break;
    }
    i++;  
  }  
}

Measured memory_bytes: 3632
#include<bits/stdc++.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 int ll;
typedef pair<int, int> P;
const ll MOD = 1e9+7, INF = 1e9;

int main() 
{
  int n, m; cin >> n >> m;
  map<int, int> ma;
  vector<int> f(n, 0);
  int ans = 0;
  rep(i, m){
    int a; string s;
    cin >> a >> s;
    if(s == "WA"){
      ma[a]++;
    }
    else{
      if(f[a-1] == 0){
        ans += ma[a];
      }
      f[a-1] = 1;
    }
  }
  int ac_sum = accumulate(All(f), 0);
  cout << ac_sum << " " << ans << endl;
  system("pause");
}

Measured memory_bytes: 5504
#include <stdio.h>
void main()
{
int a,b,c,d;
  scanf("%d%d%d%d",&a,&b,&c,&d);
  while(1)
  {
  c=c-b;
  if(c<=0)
    break;
  a=a-d;
  if(a<=0)
    break;
  }
  if(c<=0)
    printf("Yes");
  else
    printf("No");
}

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

void Main()
{
  ll N;
  cin >> N;
  vector<ll> A(N-1);
  vector<ll> B(N);
  rep(i,N) {B[i] = 0;}
  rep(i,N-1) {
    cin >> A[i];
  }
  for(int i = 0; i < N-1; i++) {
    B[A[i]-1] += 1;
  }
  rep(i,N) {
    cout << B[i] << endl;
  }
}

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

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

#define MOD (long long)(998244353)
#define INF (1LL<<60)
#define rep(i,n) for(ll i = 0; i < (n); i++)
#define rep1(i,n) for(ll i = 1; i <= (n); i++)

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;
}


// 最大公約数
ll gcd(ll a, ll b)
{
  if(b == 0) return a;
  return gcd(b, a % b);
}

// mod m におけるa の逆元
ll modinv(ll a, ll m) {
  ll b = m, u = 1, v = 0;
  while (b) {
    ll t = a / b;
    a -= t * b; swap(a, b);
    u -= t * v; swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}

// 素因数分解
vector<pair<ll, ll>> prim;
void pf(ll n)
{
  ll s = sqrt(n);
  ll r = 0;
  for(ll i = 2; i <= s; i++) {
    if((n % i) == 0) {
      r = 0;
      do {
	r++;
	n = n / i;
      } while((n % i) == 0);
      prim.push_back({i, r});
    }
  }
  if(n > s) {
    prim.push_back({n, 1});
  }
}

void solve()
{
  ll N; cin >> N;
  // ll x, y, z; cin >> x >> y >> z;
  // ll a, b, c; cin >> a >> b >> c;
  // string s; cin >> s;
  vector<ll> a(N); rep(i, N) cin >> a[i];
  vector<ll> c(100100, 0);
  rep(i,N) {
    c[a[i]]++;
  }
  if(a[0]!=0 || c[0]!=1) {
    cout << 0 << endl;
    return;
  }
    
  ll ans = 1;
  rep(i,N-1) {
    rep(j, c[i+1]) {
      ans*= c[i];
      ans%=MOD;
    }
  }
  // bool ok = false;

  cout << ans << endl;
  // cout << (ok?"Yes":"No") << endl;
}


int main(void)
{
  // ll t; cin >> t; rep(i, t)
  solve();
}









Measured memory_bytes: 4904
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    S = input()
    p = ["Sunny", "Cloudy", "Rainy"]

    print(p[(p.index(S) + 1) % 3])


if __name__ == '__main__':
    main()


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

int main()
{ ll a,b,c;
cin>>a>>b>>c;
ll m;
if (b+c<=a)
    m=0;
else if (b+c>a)
    m=c-(a-b);
cout<<m;
    return 0;
}


Measured memory_bytes: 256
/*

Coded and Decoded by : Yash Kapoor

*/
#include <bits/stdc++.h>
using namespace std;

#define ll          long long
#define ld          long double
#define pb          push_back
#define pf          push_front
#define mp          make_pair
#define pll         pair<ll,ll>
#define vl          vector<ll>
#define sl          set<ll> 
#define vll         vector<pll>
#define ml          map<ll,ll>
#define mll         map<pll,ll>
#define all(a)      a.begin(),a.end()
#define x           first
#define y           second
#define sz(x)       (ll)x.size()
#define dl          '\n'
//#define why         (ll)1000000007
#define why         (ll)998244353
#define lp(i,a,b)   for(ll i=a;i<b;++i)
#define lpr(i,a,b)  for(ll i=a;i>=b;i--)
#define lpd(i,x)    for(auto i:x)
#define ios         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
ll inf = 1e18;
ld pi = 3.141592653589;
ll mod = why;
ll fast_power(ll base,ll power,ll mod)
{
    ll result=1;
    while(power)
    {
        if(power%2)
        result=(result*base)%mod;
        base=(base*base)%mod;
        power/=2;
    }
    return result;
}

ll inverse(ll base,ll mod)
{
    return fast_power(base,mod-2,mod);
}

ll solve(){ 
    ll k,sum=0; cin>>k;
    lp(i,1,k+1){
        lp(j,1,k+1){
            lp(l,1,k+1){
                sum+=__gcd(i,__gcd(j,l));
            }
        }
    }
    cout<<sum;
  return 0;
}  

int main(){
    ios
    ll t=1; 
    //cin>>t;
    while(t--){
        solve();
    }
}


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

int main(){
	long long a,b,c,d;
  	long long maxa;
    long long temp_max1 = 0;
    long long temp_max2 = 0;
  	int seki = 0;	
 	int bpm=0 ;
  	int dpm=0 ;
  	std::cin >> a >> b >> c >> d;
  	temp_max1 = max(a*c, b*c);
  	temp_max2 = max(temp_max1, a*d);
    maxa = max(temp_max2, b*d);
	cout << maxa ;
}

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

using namespace std;

int main(){
  int N;
  cin >> N;
  
  vector<int> A(N);
  for(int i = 0; i < N; i++) cin >> A[i];
  
  long long cnt = 0;
  int now = -1;
  for(int i = 0; i < N; i++){
    if(A[i] == now + 1){
      now++;
    }else if(A[i] <= now){
      cnt += now;
      now = A[i];
    }else{
      cnt = -1;
      break;
    }
  }
  if(A[N - 1] == now) cnt += now;
  
  cout << cnt << endl;
  
  return 0;
}

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

using namespace std;

int main() {
	int a[3];
	cin >> a[0] >> a[1] >> a[2];
	sort(a, a+3);
	int A, B, C;
	A=a[0];
	B=a[1];
	C=a[2];
	int N=0;
	while (A<B-1) {
		A+=2;
		N+=1;
	}
	if (A==B-1) {
		B-=1;
		N+=1;
	}
	while (C>B) {
		C-=1;
		N+=1;
	}
	cout << N << endl;
	return 0;
}


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

int main() {
    int n, q, time=0;
    typedef std::pair<std::string, int> process;
    std::queue<process> p;
    std::cin >> n >> q;
    for (int i = 0; i < n; i++) {
        process pi;
        std::cin >> pi.first >> pi.second;
        p.push(pi);
    }

    while (not p.empty()) {
        if (p.front().second > q) {
            p.push({p.front().first, p.front().second-q});
            time+=q;
        } else {
            time+=p.front().second;
            std::cout << p.front().first << " " << time << std::endl;
        }
        p.pop();
    }
    


    return 0;
}


Measured memory_bytes: 6172
N,K = map(int,input().split())
A = [int(a) for a in input().split()]
Ap, Am, A0 = [],[],[]
for a in A:
    if a>0: Ap.append(a)
    elif a<0 : Am.append(a)
    else: A0.append(a)
mod = 10**9+7

ans = 1
if N==K:
    for a in A:
        ans = (ans*a)%mod
    print(ans)
    exit()

if len(Ap)==0 and K%2==1:
    if len(A0)==0:
        A.sort()
        A.reverse()
        for i in range(K):
            ans = (ans*A[i])%mod
        print(ans)
        exit()
    else:
        print(0)
        exit()

Ap.sort()
Ap.reverse()
Am.sort()
if K%2==1:
    ans = Ap[0]
    Ap = Ap[1:]
    K -= 1

if K > len(Ap)+len(Am):
    print(0)
    exit()
if K == len(Ap)+len(Am) and len(Am)%2==1:
    print(0)
    exit()

Apair = [Ap[i]*Ap[i+1] for i in range(0,len(Ap)-1,2)]
for i in range(0,len(Am)-1,2):
    Apair.append(Am[i]*Am[i+1])
Apair.sort()
Apair.reverse()
for i in range(K//2):
    ans = (ans*Apair[i])%mod
print(ans)

Measured memory_bytes: 31984
#include<stdio.h>

int main(void)
{
  long long a,b;
  char c;
  scanf("%lld %c %lld",&a,&c,&b);
  if(c=='+'){
    printf("%lld\n",a+b);
  }else{
    printf("%lld\n",a-b);
  }
  return 0;
}


Measured memory_bytes: 128
// Believe in yourself...
#include<bits/stdc++.h>
#define MP make_pair
#define PB push_back
#define PF push_front
#define POB pop_back
#define POF pop_front
#define F first
#define S second
#define sz(c) (c).size()
#define REP(i,n)  for(ll i=0;i<n;i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=b;i++)
#define FORD(i,a,b) for(ll i=a;i>=b;i--)

#define bit(num,i) ((num>>i)&1)

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;

const ll inf=4e18;
const ll maxn=2e5+10;
const ll mod=1e9+7;

#pragma GCC Optimize("Ofast")

ll ans;

int main(){
	ll a,b,c;cin>>a>>b>>c;
	ll f=(a%2)+(b%2)+(c%2);
	if(f==2){
		ans++;
		if(a%2==0)
			a--;
		else if(b%2==0)
			b--;
		else if(c%2==0)
			c--;
	}
	if(f==1){
		ans++;
		if(a%2)
			a--;
		else if(b%2)
			b--;
		else if(c%2)
			c--;
	}
	if(a>b)
		swap(a,b);
	if(b>c)
		swap(b,c);
	if(a>b)
		swap(a,b);
	ans+=(b-a)/2;
	ans+=c-b;
	cout<<ans;
}

Measured memory_bytes: 256
s = [input() for i in range(1)] 
li = list(map(int, s[0].split()))
for i in range(0,1000):
    if i % 2 == 0:
        li[2] = li[2] - li[1]
        if li[2] <= 0:
            print("Yes")
            break
    else:
        li[0] = li[0] - li[3]
        if li[0] <= 0:
            print("No")
            break



Measured memory_bytes: 9192
d, n = map(int, input().split())
d10 = 1
if d == 0 and n !=100:
    print(n)
elif d == 0 and n == 100:
    print(101)
else:
    for i in range(d):
        d10 *=100
    if n ==100:
        print(101*d10)
    else:
        print(n*d10)
    
    

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

int main() {
  int n;
  cin >> n;
  vector<int64_t> vec(100);
  vec.at(0) = 2;
  vec.at(1) = 1;
  for(int i = 2; i < 100; i++){
    vec.at(i) = vec.at(i-2) + vec.at(i-1);
  }
  cout << vec.at(n) << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long LL;
typedef pair<LL,LL> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a,T b){return b?gcd(b,a%b):a;}
const LL mod=1000000007;
const LL LINF=1LL<<62;
const int INF=1<<30;
int dx[]={1,0,-1,0,1,-1,1,-1};
int dy[]={0,1,0,-1,1,-1,-1,1};


int main(){
    int n,m;cin >> n >> m;
    vector<int> s(m),c(m);
    for (int i = 0; i < m; i++) {
        cin >> s[i] >> c[i];
    }
    for (int i = 0; i < 1000; i++) {
        int t = i;
        int ca = 0;
        while(t){
            t /= 10;
            ca++;
        }
        if(ca==0) ca++;
        if(ca!=n) continue;
        bool f = true;
        for (int j = 0; j < m; j++) {
            int p = i,cc = 0;
            for (int k = 0; k < n-s[j]; k++) {
                p /= 10;
            }
            if(p % 10 != c[j]) f = false;
        }
        if(f){
            cout << i << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}


Measured memory_bytes: 256
# 入力 : 数字4つ、別々に
A = int(input())
B = int(input())
C = int(input())
X = int(input())

# 全探索
ans = 0
for a in range(A+1) :
    for b in range(B+1) :
        for c in range(C+1) :
            total = 500 * a + 100 * b + 50 * c
            if total == X :
                ans += 1

print(ans)


Measured memory_bytes: 3060
#include<bits/stdc++.h>
using namespace std;
#define FOR(i,l,r) for(long long i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)
#define int long long

signed main(){
    int N;
    cin >>N;
    vector<tuple<string,int,int>>vec(N);
    REP(i,N){
        string S;
        int P;
        cin>>S>>P;
        vec[i]=make_tuple(S,-P,i+1);
    }
    sort(vec.begin(),vec.end());
    REP(i,N){
        int t=get<2>(vec[i]);
        cout<<t<<endl;
    }
}

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

int my_abs(int a){
    if(a < 0){
        a *= -1;
    }
    return a;
}

int main() {

    long long int n,z,w;

    cin >> n >> z >> w;

    long long int a[n];

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

    int ans = my_abs(a[n - 1] - w);
    if(n > 2) {
        ans = max(ans, my_abs(a[n - 2] - a[n - 1]));
    }
    cout << ans << endl;

    return 0;
}

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

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    if((a < c && c < b) || (b < c && c < a)){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }

    return 0;
}



Measured memory_bytes: 256
#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 putchar putchar_unlocked
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

const int cm = 1 << 17;
char ci[cm];
char *cn = ci + cm;
inline char getcha() {
	if (cn - ci == cm) { fread(ci, 1, cm, stdin); cn = ci; }
	return *cn++;
}

inline int getint() {
	char C = getcha();
	int A = C - '0';
	while ((C = getcha()) >= '0') A = A * 10 + C - '0';
	return A;
}

inline void putint(int X) {
	if (X == 0) putchar('0');
	int keta = 0;
	char C[10];
	while (X) {
		*(C + keta) = '0' + X % 10;
		X /= 10;
		keta++;
	}
	for (int i = keta - 1; i >= 0; i--) putchar(*(C + i));
	putchar('\n');
}

int oya;
int D[100001];
int P[100001];
pair<int, int> E[100001];
int EN[100002];
int sagasu(int A) {
	if (*(D + A)) return *(D + A);
	if (A == oya) return 1;
	for (int i = (*(EN + A)); i < (*(EN + A + 1)); i++) {
		int j = (*(E + i)).second;
		int kari = sagasu(j) + 1;
		if (*(D + A) < kari) {
			*(D + A) = kari;
			*(P + A) = j;
		}
	}
	return *(D + A);
}

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


	int N, M;
	N = getint();
	M = getint();
	bool kodomo[100001] = {};
	rep(i, N + M - 1) {
		int a, b;
		a = getint();
		b = getint();
		E[i] = mp(b, a);
		kodomo[b] = true;
	}

	rep1(i, N) {
		if (!kodomo[i]) {
			oya = i;
			break;
		}
	}

	sort(E, E + N + M - 1);
	int k = 0;
	int mae = 0;
	EN[1] = 0;
	rep1(i, N) {
		while (k < N + M - 1 && E[k].first == i) k++;
		EN[i + 1] = k;
		mae = k;
	}

	rep1(i, N) {
		if (!(*(D + i))) sagasu(i);
		putint(*(P + i));
	}

	Would you please return 0;
}

Measured memory_bytes: 7936
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	static Node nil = new Node();

	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
			int n = Integer.parseInt(br.readLine());
			Main main = new Main();
			main.init();
			for (int i = 0; i < n; i++) {
				String str[] = br.readLine().split(" ");
				switch (str[0]) {
				case "insert":
					main.insert(Integer.parseInt(str[1]));
					break;
				case "delete":
					main.deleteKey(Integer.parseInt(str[1]));
					break;
				case "deleteFirst":
					main.deleteFirst();
					break;
				case "deleteLast":
					main.deleteLast();
					break;
				}
			}
		}
		// リストのすべての要素を表示
		Node cur = nil.next;
		StringBuilder sb = new StringBuilder();
		for (int i = 0;; i++) {
			if (cur == nil)
				break;
			if (i == 0) {
				sb.append(cur.key);
			} else {
				sb.append(" " + cur.key);
			}
			cur = cur.next;
		}
		System.out.println(sb);

	}

	// リストの初期化
	void init() {
		nil.next = nil;
		nil.prev = nil;

	}

	// 要素の挿入
	void insert(int key) {
		Node x = new Node(key);
		x.next = nil.next;
		nil.next.prev = x;
		x.prev = nil;
		nil.next = x;

	}

	// 要素の探索
	Node listSearch(int key) {
		Node cur = nil.next;
		/* while (cur.next != nil && cur.key != key) { */
		/* cur.nextだとテストケース4で99999999が表示されなかった */
		while (cur != nil && cur.key != key) { // keyが一致するまで
			cur = cur.next;
		}
		return cur;
	}

	// 特定のノードを削除
	void deleteNode(Node t) {
		if (t != nil) { // 削除するノードが番兵でないこと
			t.prev.next = t.next;
			t.next.prev = t.prev;
			t = null;
		}
	}

	// 先頭の要素を削除
	void deleteFirst() {
		deleteNode(nil.next);
	}

	// 末尾の要素を削除
	void deleteLast() {
		deleteNode(nil.prev);
	}

	// 特定のキーを持つ要素を削除
	void deleteKey(int key) {
		// 検索したノードを削除
		deleteNode(listSearch(key));
	}

}

class Node {
	int key;
	Node prev;
	Node next;

	public Node() {
	}

	public Node(int key) {
		this.key = key;
	}

}


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

typedef long long s64;
const int N=2e5+5;
map<s64,int>cnt;

int main()
{

	int n;
	cin>>n;
	s64 s=0,ans=0;++cnt[s];
	while(n--)
	{
		int x;
		scanf("%d",&x);
		ans+=cnt[s+=x]++;
	}
	cout<<ans;
}


Measured memory_bytes: 12800
def main():
    import sys
    input=sys.stdin.readline
    N=int(input())
    d=list(map(int,input().split()))
    d.sort()

    mid_left=N//2-1
    mid_right=N//2
    print(d[mid_right]-d[mid_left])

if __name__=="__main__":
    main()

Measured memory_bytes: 14172
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define For(i,start,end) for(i64 i = start; i < end; i++)
#define newline std::cout<<'\n';
#define newlinedx(num) for(int i=0;i<num;i++)std::cout<<'\n';
using namespace std;
typedef long long ll;
typedef unsigned long ul;

using i8  = int8_t;
using u8  = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
using f32 = float;
using f64 = double;
using ui = uint64_t;

//----------------library in this time--------------------------------
template <class T>
T gcd(const T a,const T b) {
    return (b == 0) ? a : gcd (b, a % b);
}
template <class T>
T lcm(const T a, const T b) {
    return a * b / gcd(a,b);
}
template <class T>
inline T ave(const T a, const T b) {
    return (a + b) / 2.0f;
}

long long squareTwo(const long long a,const long long b) {
    return (b == 1) ? a : squareTwo(a * 2, b - 1);
}

template <class T>
inline T Max(const T a,const T b) {
    return (a >= b) ? a : b;
}

template <class T>
inline T Min(const T a,const T b) {
    return (a <= b) ? a : b;
}

template <class T>
inline void show(T a) {
    cout << a << endl;
}

typedef struct{
    ll x;
    ll y;
}idx;


//------------------------main function-------------------------------
void Main(){
    ll n; cin >> n;
    ll a = n % 100;
    ll b = n / 100;
    if(a <= b * 5){
        cout << 1 << endl;
    }else{
        cout << 0 << endl;
    }
}
//--------------------------------------------------------------------
int main(){
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(10);
     
    Main();
    return 0;
}



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

/*
 *  N個の駒を距離が大きいところを潰すようにおくと
 *  M-(N-1)個の残りの距離を移動すればよい
 *
 * */
int main() {
    int N, M;
    cin >> N >> M;
    int X[M];
    rep(i, M) cin >> X[i];
    sort(X, X+M);

    // 各距離を計算
    int d[M-1];
    rep(i, M-1) d[i] = abs(X[i+1] - X[i]);

    // 駒の方が多いとき
    if(N >= M){
        cout << 0 << endl;
        return 0;
    }

    // 距離のうち駒の数だけ最長距離をつぶすので
    // 距離の短い順からM-1-(N-1)までだけ足したらOK
    sort(d, d+ M-1);
    int totalD = 0;
    rep(i, M-1-(N-1)){
        totalD += d[i];
    }
    cout << totalD<< endl;
    return 0;
}


Measured memory_bytes: 1024
def get_unique_list(seq):
  seen = []
  return [x for x in seq if x not in seen and not seen.append(x)]

import itertools
h,w,k = map(int, input().split())
m = []
s=0
for i in range(h):
  t = input()
  m.append(t)
  s+=t.count("#")
list_w = [i for i in range(w)]
list_h = [i for i in range(h)]
combi_w=[]
combi_h=[]
for i in range(w):
  for pair in itertools.combinations(list_w, i):
    combi_w.append(pair)
for i in range(h):
  for pair in itertools.combinations(list_h, i):
    combi_h.append(pair)
ans=0
for i in combi_w:
  temp_w=[]
  for row in i:
    for c in range(h):
      if m[c][row] == "#":
        temp_w.append([c,row])
  for j in combi_h:
    temp_h=[]
    for col in j:
      for r in range(w):
        if m[col][r] == "#":
          temp_h.append([col,r])
    temp2 = get_unique_list(temp_w + temp_h)
    if len(temp2) == s-k:
      ans += 1
    
print(ans)

Measured memory_bytes: 9284
h, w = map(int, input().split())
M = [list(input()) for _ in range(h)]
count = [[int(1e18) for _ in range(w)] for _ in range(h)]
count[0][0] = 1 if M[0][0] == '#' else 0

# 同じ色かどうかを見る
for i in range(h):
    for j in range(w):
        if i + 1 < h:
            v = 1 if M[i][j] != M[i + 1][j] else 0
            count[i + 1][j] = min(count[i + 1][j], count[i][j] + v)
        if j + 1 < w:
            v = 1 if M[i][j] != M[i][j + 1] else 0
            count[i][j + 1] = min(count[i][j + 1], count[i][j] + v)

print((count[h - 1][w - 1] + 1) // 2)

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

const int N = 1e5 + 7;
vector<pair<int, int>> graph[N];
int n, ans[N], ANS = 0;

void dfs(int v, int p, int col) {
  ANS = max(ANS, (int) graph[v].size());
  int act = 0;
  for (auto i : graph[v]) {
    if (i.first == p) {
      continue;
    }
    if (act == col) {
      act++;
    }
    dfs(i.first, v, ans[i.second] = act++);
  }
}

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

  cin >> n;
  for (int i = 1; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    a--; b--;
    graph[a].emplace_back(b, i);
    graph[b].emplace_back(a, i);
  }
  dfs(0, 0, 1e9);
  cout << ANS << "\n";
  for (int i = 1; i < n; ++i) {
    cout << ans[i] + 1 << "\n";
  }

  return 0;
}



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

int main() {
  int a, b, c,d;
  cin >> a >> b >>c >>d;
  if(a+b>c+d){
    cout << "Left" << endl;}
  else if(a+b==c+d){
    cout << "Balanced" << endl;}
  else{
    cout << "Right" << endl;}
  
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N = 1e5+10 , OO = 0x3f3f3f3f ;
//const int mod = 1000000007;
 
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
double startTime;
double getCurrentTime() {
	return ((double)clock() - startTime) / CLOCKS_PER_SEC;
}
#define clr(arr,val) memset(arr , val , sizeof (arr))
#define loop(i,n) for(int i = 0;i < int(n);i++)
#define rloop(i,n) for(int i = int(n)-1;i >= 0;i--)
#define xloop(i,a,b) for(int i = int(a);i <= int(b);i++)
#define range(vec) for(auto &x : vec) cin >> x;
#define ALL(v) ((v).begin()) , ((v).end())
#define SZ(v)  ((int)((v).size()))
int dx[]={1,0,-1,0};int dy[]={0,1,0,-1}; //4 Direction
//int dx[]={1,1,0,-1,-1,-1,0,1};int dy[]={0,1,1,1,0,-1,-1,-1};//8 direction
//int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};//Knight Direction
//int dx[6]={2,1,-1,-2,-1,1};int dy[6]={0,1,1,0,-1,-1}; //Hexagonal Direction

int amakn[N];
int n , mkany;


int main()
{
    startTime = (double)clock();
    #ifndef ONLINE_JUDGE
        //freopen("in.in", "r", stdin);
        //freopen("out.in", "w", stdout);
    #endif
	//ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    
    scanf("%d %d", &n , &mkany);
    for(int i = 0; i < n; i++) {
        scanf("%d", amakn + i);
        amakn[i] = abs(amakn[i] - mkany);
    }
    int gcd = amakn[0];
    for(int i = 0; i < n; i++) gcd = __gcd(gcd, amakn[i]);
    printf("%d\n", gcd);
    
    
    return 0;
}

Measured memory_bytes: 640
#include <iostream>
#include <cmath>
#include <climits>
#include <algorithm>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <string.h>
#include <iomanip>
#include <ctype.h>

#define ll          long long int
#define ull         unsigned long long int
#define pb          push_back
#define pii         pair<int,int>
#define F           first
#define S           second
#define vi          vector<int>
#define vli          vector<ll>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define M_PI        3.14159265358979323846
#define mp          make_pair
#define sz(x)       (int)x.size()
//#define hell        1000000007
#define matrix      vector<vector<ll>>
#define forn(i,a,b)  for(int i=a;i<b;i++)
#define eps 0.000000001
#define all(a)      (a).begin(),(a).end()
const long long INF = (long long) 1e7+1;
const long long mod = (long long) 998244353;
const long long hell = (long long) 1000000007;

using namespace std;
#include <stdio.h>

ll power(ll x,ll y)
{
  ll res=1;
  while(y>0){
    if(y%2) res=(x%hell*res%hell)%hell;
    x=(x%hell*x%hell)%hell;
    y=y/2;
  }
  return res;
}

ll modinv(ll x){
  return power(x,hell-2);
}

void solve();


void fastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}

int main(){
   fastIO();
    solve();
}
//void sieve();
ll pw(ll k,ll x);
ll gcd(ll x,ll y);

/*
  For freq or prime factors

for(auto pri:prime){
  while(k%pri==0){
    pcnt[pri]++;
    k/=pri;
  }
}*/


void solve(){
  int test;
  //cin>>test;
  test=1;
  while(test--){
        string s;
        cin>>s;
        int n=s.length();
        
        string t;
        forn(i,0,n)
        t.pb('x');
        cout<<t;
  }         
}    

    




///Before submit=>
///    *check for integer overflow,array bounds
///    *check for n=1

ll gcd(ll a,ll b)
{
    while( b != 0)
	{
		ll  t = b;
		b= a %t;
		a = t;
	}
	return a;
}


ll pw(ll k,ll x){
  if(x==0)
  return 1;
  if(x&1)
  return ((pw(k,x-1))*k);
  else
  return ((pw(k,x/2))*(pw(k,x/2)));
}





Measured memory_bytes: 256
#include <iostream>
#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long int;
template<typename T>
ostream& operator+(ostream& out, const vector<T> &vec){
    for(const auto &x : vec){
        out<<x<<" ";
    }
    out<<"\n";
    return out;
}
template<typename T>
ostream& operator*(ostream& out, const vector<T> &vec){
    for(const auto &x : vec){
        out+x;
    }
    return out;
}
template<typename T>
istream& operator>>(istream& in, vector<T> &vec){
    for(auto &x : vec){
        in>>x;
    }
    return in;
}
const int p = 1e9 + 7;
void solve(){
    int n,Q;
    cin>>n>>Q;
    vector<int> seq(n);
    cin>>seq;
    vector<pair<int,int>> op(Q);
    for(auto &[u,v] : op){
        cin>>u>>v;
        --u;--v;
    }
    vector<vector<int>> dp(n, vector<int>(n));
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            dp[i][j] = (seq[i]<seq[j]);
        }
    }
    const ll inv2 = (p+1)/2;
    for(const auto &[u,v] : op){
        vector<int> dp1(n), dp2(n); 
        for(int i=0;i<n;i++){
            if(i==u || i==v) continue;
            dp1[i] = (dp[i][u] + dp[i][v])*inv2%p;
            dp2[i] = (dp[u][i] + dp[v][i])*inv2%p;
        }
        for(int i=0;i<n;i++){
            if(i==u || i==v) continue;
            dp[i][u] = dp[i][v] = dp1[i];
            dp[u][i] = dp[v][i] = dp2[i];
        }
        dp[u][v] = dp[v][u] = (dp[u][v] + dp[v][u])*inv2%p;
    }
    ll ans = 0;
    for(int i=0;i<n;i++){
        for(int j=0;j<i;j++){
            ans+=dp[i][j];
            if(ans>=p) ans-=p;
        }
    }
    auto modpower = [&](int x){
        int ans = 1;
        while(x--){
            ans<<=1;
            if(ans>=p) ans-=p;
        }
        return ans;
    };
    cout<<ans*modpower(Q)%p<<'\n';
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
}

Measured memory_bytes: 38556
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < (n); i++)
#define REPR(i, n) for(int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)

ll mod = 1e09;

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

  string sa, sb, sc;
  cin >> sa >> sb >> sc;
  ll ca = sa.size(), cb = sb.size(), cc = sc.size();
  char t = 'a';
  while(1){
    if(t == 'a'){
      if(ca == 0){
        cout << 'A';
        return 0;
      }
      t = sa[sa.size() - ca];
      ca--;
    }
    else if(t == 'b'){
      if(cb == 0){
        cout << 'B';
        return 0;
      }
      t = sb[sb.size() - cb];
      cb--;
    }
    else{
      if(cc == 0){
        cout << 'C';
        return 0;
      }
      t = sc[sc.size() - cc];
      cc--;
    }
  }
  return 0;
}


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

using namespace std;

int main() {

int H,n;
cin>>H>>n;
vector<long long >a(n+10);
vector<long long >b(n+10);
vector<long long >dp(H+10,INT_MAX);

	for(int i = 0; i < n; ++i){
		cin >> a[i] >> b[i];
	}
	dp[0] = 0;
	for(int hlth = 0; hlth <= H; ++hlth){
		for(int i = 0; i < n; ++i){
			dp[hlth] = min(dp[max(0LL, hlth - a[i])] + b[i], dp[hlth] );
		}
	}
	cout << dp[H] << '\n';

return 0;
}

Measured memory_bytes: 384
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
using static System.Int32;

class Program
{
    struct Question
    {
        public int Point;
        public int Count;
        public int CompBonus;

        public int GetAll() => Point * Count + CompBonus;
    }

    static bool Increment(bool[] flags)
    {
        for (int i = 0; i < flags.Length; ++i)
        {
            if (flags[i]) flags[i] = false;
            else
            {
                flags[i] = true;
                return (0 < i) || flags.Contains(false);
            }
        }
        return false;
    }

    static int GetCount(Question[] questions, bool[] comps, int g)
    {
        int result = 0;
        int d = questions.Length;
        for(int i = 0; i < d; ++i)
        {
            if (comps[i])
            {
                result += questions[i].Count;
                g -= questions[i].GetAll();
            }
        }
        if (0 < g)
        {
            for(int i = d - 1; 0 <= i; --i)
            {
                if (comps[i]) continue;
                int max = questions[i].Point * (questions[i].Count - 1);
                if (g <= max)
                {
                    int count = (g + questions[i].Point - 1) / questions[i].Point;
                    g -= count * questions[i].Point;
                    result += count;
                    break;
                }
                else
                {
                    result += (questions[i].Count - 1);
                    g -= max;
                }
            }
        }
        return g <= 0 ? result : int.MaxValue;
    }

    static void Main(string[] args)
    {
        var sp = ReadLine().Split();
        int d = Parse(sp[0]);
        int g = Parse(sp[1]);
        var questions = new Question[d];
        var comps = new bool[d];
        int result = 0;
        for (int i = 0; i < d; ++i)
        {
            sp = ReadLine().Split();
            questions[i].Point = (i + 1) * 100;
            questions[i].Count = Parse(sp[0]);
            questions[i].CompBonus = Parse(sp[1]);
            result += questions[i].Count;
        }
        do
        {
            int count = GetCount(questions, comps, g);
            result = Math.Min(result, count);
        } while (Increment(comps));

        WriteLine(result);
    }

//    static string ReadLine()
//    {
//        return _inputs[_inIndex++];
//    }

//    static string[] _inputs = @"10 9549900
//100 1000000
//100 1000000
//100 1000000
//100 1000000
//100 1000000
//100 1000000
//100 1000000
//100 1000000
//100 1000000
//100 1000000".Split(new string[] { Environment.NewLine }, StringSplitOptions.None);

//    static int _inIndex = 0;
}


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

int main(void) {
  long long int x;
  scanf("%lld", &x);
  long long int cash = 100;
  long long int count = 0;
  while (cash < x) {
    cash += cash * 0.01;
    count++;
  }
  printf("%lld\n", count);

  return 0;
}


Measured memory_bytes: 1732
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";

		char[][] pattern = new char[8][8];
		for (int i = 0; i < 8; i++) {
			line = br.readLine();
			for (int j = 0; j < 8; j++) {
				pattern[i][j] = line.charAt(j);
			}
		}
		for (int i = 1; i <= 3; i++) {
			pattern = rotate(pattern);
			System.out.println(i * 90);
			for (int j = 0; j < 8; j++) {
				System.out.println(new String(pattern[j]));
			}
		}
	}

	static char[][] rotate(char[][] pattern) {
		char[][] rotate = new char[8][8];
		for (int i = 0; i < 8; i++) {
			for (int j = 0; j < 8; j++) {
				rotate[j][7 - i] = pattern[i][j];
			}
		}
		return rotate;
	}
}

Measured memory_bytes: 16860
#include<bits/stdc++.h>
using namespace std;
//#include<boost/multiprecision/cpp_int.hpp>
//using boost::multiprecision::cpp_int;

#define int long long
#define cint cpp_int
#define endl "\n"
#define REP(i,a,n) for(int i=a;i<n;++i)
#define REPR(i,a,n) for(int i=a;i>n;--i)
#define RUP(a,b) (((a)+(b)-1)/(b))
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define MOD 1000000007
#define INF LLONG_MAX/2
#define PI acos(-1.0)

typedef long long ll;
typedef pair<int,int> Pii;
typedef tuple<int,int,int> Tiii;
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef vector<Pii> VPii;
typedef vector<string> Vs;
typedef priority_queue<int> PQi;

template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
void vout(Vi &v){for(int i=0;i<(v).size();i++) cout<<v[i]<<" ";cout<<endl;}
void vout(Vs &v){for(int i=0;i<(v).size();i++) cout<<v[i]<<" ";cout<<endl;}
void vvout(VVi &v){for(int i=0;i<(v).size();i++) vout(v[i]);}
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
int mypow(int x, int n, int m){if(n==0)return 1;if(n%2==0)return mypow(x*x%m,n/2,m);else return x*mypow(x,n-1,m)%m;}
int digit(int k,int i){string s = to_string(k);return s[s.size()-i]-'0';}
void uniq(Vi &v){sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end());} //vectorの同じ要素消す
int ctoi(char c){if(c>='0'&&c<='9'){return c-'0';}return 0;}
int leng(int n){string s=to_string(n); return s.size();} //intの桁数
int digitsum(int n){int ret=0; while(n>0){ret+=n%10;n/=10;}return ret;} //桁和
int lesscount(int x,Vi &a){return lower_bound(a.begin(),a.end(),x)-a.begin();} //vector aにおけるx未満の数の個数
int orlesscount(int x,Vi &a){return upper_bound(a.begin(),a.end(),x)-a.begin();} //vector aにおけるx以下の数の個数
int morecount(int x,Vi &a){return a.size()-orlesscount(x,a);} //vector aにおけるxより大きい数の個数
int ormorecount(int x,Vi &a){return a.size()-lesscount(x,a);} //vector aにおけるx以上の数の個数
int count(int x,Vi &a) {return upper_bound(ALL(a),x)-lower_bound(ALL(a),x);} //vector aにおけるxの個数
Vi accum(Vi &v){Vi ret((v).size()+1);REP(i,0,(v).size()) ret[i+1]=ret[i]+v[i];return ret;}
bool comp(Pii a,Pii b){
    if(a.second != b.second) return a.second<b.second;
    else return a.first<b.first;
}

const string YES = "Yes";
const string NO = "No";
template<class T> void YesNo(T a) {cout<<(a?YES:NO)<<endl;}

void solve(long long a, long long b, long long c){
    if(c-a-b>0 && 4*a*b<(c-a-b)*(c-a-b)) cout<<YES<<endl;
    else cout<<NO<<endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
signed main(){cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);
    long long a;
    scanf("%lld",&a);
    long long b;
    scanf("%lld",&b);
    long long c;
    scanf("%lld",&c);
    solve(a, b, c);
    return 0;
}


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

const double PI = 3.14159265;
int n;

void koch(double p1[2], double p2[2], int i) {
	if (i == n) return;
	double s[2], t[2], u[2];
	s[0] = (2 * p1[0] + p2[0]) / 3;
	s[1] = (2 * p1[1] + p2[1]) / 3;
	t[0] = (p1[0] + 2 * p2[0]) / 3;
	t[1] = (p1[1] + 2 * p2[1]) / 3;
	u[0] = (t[0] - s[0]) * cos(PI / 3) - (t[1] - s[1]) * sin(PI / 3) + s[0];
	u[1] = (t[0] - s[0]) * sin(PI / 3) + (t[1] - s[1]) * cos(PI / 3) + s[1];

	koch(p1, s, i + 1);
	cout << s[0] << " " << s[1] << endl;
	koch(s, u, i + 1);
	cout << u[0] << " " << u[1] << endl;
	koch(u, t, i + 1);
	cout << t[0] << " " << t[1] << endl;
	koch(t, p2, i + 1);
}

int main() {
	cin >> n;
	double p1[2] = { 0, 0 }, p2[2] = { 100, 0 };
	cout << p1[0] << " " << p1[1] << endl;
	koch(p1, p2, 0);
	cout << p2[0] << " " << p2[1] << endl;
	cin >> n;
	return 0;
}

Measured memory_bytes: 3276
import std.stdio,std.string,std.conv,std.algorithm;
void main(){
	auto readline = to!int(readln().chomp());
	for( ; 0 < readline ; readline-- ){
		auto arr = readln().chomp().split();
		check( to!int(arr[0]),to!int(arr[1]),to!int(arr[2]));
	}
}
void check(int x,int y,int z){
	if( x*x+y*y==z*z || x*x+z*z==y*y || y*y+z*z==x*x ){
		writeln("YES");
	}else{
		writeln("NO");
	}
}

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

int main() {
    int N, sum, digit;
    cin >> N;
    digit = log10(N);
    sum = 0;
    for (int i = 0; i <= digit; i++) {
        sum += N % (int (pow(10, i + 1))) / (int (pow(10, i)));
    }
    if (N % sum == 0) {
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
}


Measured memory_bytes: 4044
N = int(input())
s = [input() for _ in range(N)]

s_sorted = sorted([sorted(si) for si in s])

ans = 0
for i, si in enumerate(s_sorted):
    if i == 0:
        cnt = 1
        si_prev = si
    else:
        if si != si_prev:
            ans += (cnt * (cnt - 1) // 2)
            cnt = 1
        else:
            cnt += 1
        # print("#", i, si, cnt)
        si_prev = si
else:
    ans += (cnt * (cnt - 1) // 2)
    
print(ans)

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

using namespace std;

int main() {

	string a, b;
	cin >> a >> b;

	if(a == "H" && b == "H") cout << "H" << endl;
	if(a == "D" && b == "D") cout << "H" << endl;
	if(a == "H" && b == "D") cout << "D" << endl;
	if(a == "D" && b == "H") cout << "D" << endl;

	return 0;
}

Measured memory_bytes: 256
def main():
    n,k = map(int,input().split())
    mod = 10**9+7
    a = 1
    b = n-k+1
    for i in range(k):
        ans = a*b % mod
        print(ans)
        a = a * (k-1-i)//(i+1)
        b = b * (n-k-i)//(i+2)

if __name__ == "__main__":
    main()


Measured memory_bytes: 9140
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <queue>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <bitset>
#include <set>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);++i)
#define all(i,n) (i),(i+n)

int dx4[4]={1,0,-1,0};
int dy4[4]={0,-1,0,1};
int dx8[8]={1,0,-1,1,-1,1,0,-1};
int dy8[8]={1,1,1,0,0,-1,-1,-1};

typedef pair<int, int> P;
typedef pair<string, int> SP;
typedef long long ll;

const int INF = 1e9;
const ll LLINF = 1e18;
const int MAX_V = 1e6+1;
const ll mod = 1000000007;

// --------------------------------------
int n;
priority_queue<P, vector<P>, greater<P> > q;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin >> n;
  REP(i, n) {
    ll a, b;
    cin >> a >> b;
    q.push(P(b, a));
  }

  ll t = 0;
  REP(i, n) {
    P p = q.top(); q.pop();
    t += p.second;
    if(t > p.first) {
      cout << "No" << endl;
      return 0;
    }
  }

  cout << "Yes" << endl;
}


Measured memory_bytes: 2420