akhauriyash/Code-Regression huggingface dataset:
// みなさん私はカーティキー・シャルマです。LNMIITで勉強しています。私は2年目で、コロナパンデミックが発
// 生しています。世界は終わりそうだ。だから私はそれを最大限に生きたいと思っています。それはつまり、コー
// ドを最大限に意味しているのです。私の好きなアニメは「キメツノヤイバ」で、私の一番の男の子はゼニツで、
// 私の一番の女の子はネズコです。私の好きな呼吸スタイルは息吹です。私の最高の悪魔の血の芸術は、
// ククシボによって使用される月の息です。ムーザンは亡くなり、今ではタンジローがポップの新しい魔王です。
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#include <string>
using namespace std;
typedef double  dbl;
typedef long long int lld;
#define PI 3.14159265358979323
#define foi(i,n) for(i = 0; i < n; i+=1)
#define fod(i,n) for(i=n-1; i >=0; i-=1)
#define MAX std::numeric_limits<lld>::max()
#define MIN std::numeric_limits<lld>::min()
#define FastIO  ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
lld gcd_ (lld a, lld b)
{
	lld min = a < b ? a : b;
	lld max = a > b ? a : b;
	while (min != 0){
		lld rem = max%min;
		max = min;
		min = rem;
	}
	return max;
}
int main ()
{
      FastIO
      lld a, b, c, d;
      cin >> a  >> b >> c >> d;
      // first c
      lld x = b/c;
      lld y;
      if (a%c==0){
      	y = a/c;
      }
      else{
      	y = a/c;
      	y += 1;
      }
      lld z = (x-y+1);
      // second d;
      x = b/d;
      if (a%d == 0){
      	y = a/d;
      }
      else{
      	y = a/d;
      	y+= 1;
      }
      lld w = (x-y+1);
      // third c*d;
      lld e = (c*d)/gcd_(c,d);
      x = b/e;
      if (a%e == 0){
      	y = a/e;
      }
      else{
      	y = a/e;
      	y+= 1;
      }
      lld p = (x-y+1);
      cout << ((b-a+1)-z-w+p);
      return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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; }
const ll INF = 1LL << 60;

int main() {
    int n; cin >> n;
    vector<int> L(n);
    for (int i = 0; i < n; i++) {
        cin >> L[i];
    }
    sort(L.begin(), L.end());

    int sum = 0;
    for (int i = 0; i < n - 1; i++) {
        sum += L[i];
    }

    if (sum > L[n - 1]) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+100;
int n,m,ans;

int main(){
    scanf("%d",&n);
    for (int i = 0; i < n; ++i)
        scanf("%d",&m),ans^=m;
    if (ans) puts("No"); else puts("Yes");

    return 0;
}

Measured memory_bytes: 256
#include<cstring>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#define ll long long
using namespace std;
int main()
{
	char a,b,c;
	int f=0,s=0;
	for(int i=1;i<=3;i++)
	{
		cin>>a;
		if(a=='5')f++;
		if(a=='7')s++;
	}
	if(f==2&&s==1)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}


Measured memory_bytes: 256
def main():
    A, B = map(int, input().split())

    if A % 3 == 0:
        print("Possible")
    elif B % 3 == 0:
        print("Possible")
    elif (A + B) % 3 == 0:
        print("Possible")
    else:
        print("Impossible")
main()

Measured memory_bytes: 2940
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n) for(int i=0;i<(int)n;i++)
#define PI acos(-1)
#define fast_io ios_base::sync_with_stdio(false) ; cin.tie(0); cout.tie(0);
ll mod=1e9+7;

int main(){
    fast_io

    int n;
    cin>>n;
    int x=800*n;
    int y=200*(n/15);
    cout<<x-y<<endl;
    return 0;

}


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

int N, P[100005];

void connect(int tail, int head) {
  P[tail] = head;
}

int find(int node) {
  int cur_node = node, p = P[node];
  while (cur_node != p) {
    P[cur_node] = P[p];
    cur_node = p;
    p = P[p];
  }
  return cur_node;
}

int main() {
  int M, K, a, b, root_a;
  cin >> N >> M >> K;
  int f[N], c_root[N];
  for (int i = 0; i < N; i++) {
    P[i] = i; f[i] = 0; c_root[i] = -1; 
  }
  for (int j = 0; j < M; j++) {
    cin >> a >> b; a--; b--;
    f[a]++; f[b]++;
    if ((root_a = find(a)) != find(b)) connect(root_a, b);
  }
  int root[N], fs[N];
  for (int i = 0; i < N; i++) {
    root[i] = find(i);
    c_root[root[i]]++;
  }
  for (int i = 0; i < N; i++) fs[i] = c_root[root[i]] - f[i];
  for (int j = 0; j < K; j++) {
    cin >> a >> b; a--; b--;
    if (root[a] == root[b]) {
      fs[a]--; fs[b]--;
    }
  }
  for (int i = 0; i < N; i++) {
    if (i) cout << " ";
    cout << fs[i];
  }
  cout << endl;
}

Measured memory_bytes: 2816
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define rep(i, n) for(int i=0;i<n;++i)
#define rrep(i, n) for(int i=n;i>=0;--i)
const int inf=1e9+7;
const ll mod=1e9+7;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  int X;
  cin>>X;
  if(X>=30) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}



Measured memory_bytes: 3564
#define fi first
#define se second
#define mp make_pair
#define pb push_back

#define LOCAL 1

#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define dbg(...) cout<<#__VA_ARGS__ ": ["; for(auto e: __VA_ARGS__){cout<<e<<", ";} cout<<"]\n"
#define dbg1(...) cout<<#__VA_ARGS__ " "<< __VA_ARGS__ 
#else
#define dbg(...) 1;
#define dbg1(...) 1;
#endif

typedef long long ll;
typedef unsigned long long ull;
constexpr int R=5e2+69, INF=2e9+6969;

int qq;
int dp[R][4];
set <string> ss;

void gen(string A, int l, int p)
{
	if(l==0){
		ss.insert(A); 
		return;
	}
	for(int i=p+1;i<A.size();++i)
	{
		string cur=A;
		for(int j=1;j<=9;++j)
		{
			cur[i]=(char)(j+'0');
			gen(cur,l-1,i);
		}
	}
}

int main()
{
	string s;
	int k,n,ans=0;
	cin >> s;
	scanf("%d", &k);
	n = (int)s.size();
	
	for(int i=0;i<=n;++i) dp[i][0]=1;
	for(int j=1;j<=3;++j)
	{
		for(int i=1;i<n;++i)
		{
			dp[i][j]=dp[i-1][j] + dp[i-1][j-1]*9;
		}
	}
	//  printf("%d\n", n);
	string wyn="";
	for(int i=0;i<n;++i) wyn = wyn+"0";
	for(int i=1;i<=9;++i)
	{
		wyn[0]=(char)(i+'0');
		gen(wyn,k-1,0);
	}
	//  gen("1000",2,0);
	for(auto e: ss) {
		if(e>s) break;
		ans++;
	}
	ans+= dp[n-1][k];
	printf("%d\n", ans);
	return 0;
}


Measured memory_bytes: 666800
#include<bits/stdc++.h>
#define N 12
using namespace std;

int main(){
  int n,l,v,k=1,x,y;
  int d[N][N];
  int dy[2]={-1,1};
  int dx[2]={1,-1};
  while(1){
    cin>>n;
    if(!n)break;
    l=x=y=0;
    d[y][x]=1;
    v=2;
    while(!(y==n-1&&x==n-1)){
      int ny=y+dy[l],nx=x+dx[l];
      if(ny<0||nx<0||n<=ny||n<=nx){
	if(!l){
	  if(x+y<n-1)ny=y,nx=x+1;
	  else ny=y+1,nx=x;
	}else{
	  if(x+y<n-1)ny=y+1,nx=x;
	  else ny=y,nx=x+1;
	}
	l=!l;
      }
      d[ny][nx]=v++;
      y=ny,x=nx;
    }
    cout<<"Case "<<k<<":"<<endl;
    for(int i=0;i<n;i++){
      for(int j=0;j<n;j++){
	printf("%3d",d[i][j]);
      }
      cout<<endl;
    }
    k++;
  }
  return 0;
}

Measured memory_bytes: 1204
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define int long long
constexpr long long INF = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



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

    int N;
    cin>>N;
    int a[N];
    int ans=0;
    rep(i,N){
        cin>>a[i];
    }
    for(int i=1;i<N;i++){
        if(a[i]==a[i-1]){
            ans++;
            i++;
        }
    }
    cout << ans << endl;




}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int n,m;
int a[110];

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

int main(void)
{
	int sum=0;
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		sum+=a[i];
	}
	sort(a,a+n,cmp);
	if(a[m-1]<sum*1.0/(4*m))
		printf("No");
	else
		printf("Yes");
	return 0;
}

Measured memory_bytes: 256
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <list>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iomanip>
#include <iterator> 
#include <limits>

#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(a) (a).begin(),(a).end()
#define RALL(A) (a).rbegin(),(a).rend()
#define PB push_back
#define MP make_pair

#define dump(x) cerr << #x << " = " << (x) << endl;

using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
//typedef long long LL;
typedef double LL;

LL fun(LL n, LL a) {
    if (n == 2) {
        return a;
    }
    return a + fun(n - 2, (n + 2) * a / n);
}

int main(int argc, char const* argv[])
{
    LL N, d1, x;
    cin >> N >> d1 >> x;
    cout << setprecision(20) << (d1 + (2 * N - 1) * x / 2) * fun(2 * N, 1) << endl;
    return 0;
}


Measured memory_bytes: 6528
#include<iostream>
#define for(x) for (int i=0; i < x; i++)


using namespace std;


int  main() {
    int n;
    cin>>n;
    int* a=new int [n];

    for(n)
      cin>>a[i];
    int c_min=a[0];
    int maxv=-1000000000-1;

    for(n){
      if(i+1==n)
        break;
      if(maxv<a[i+1]-c_min){
        maxv=a[i+1]-c_min;
      }
      if(a[i+1]<c_min){
        c_min=a[i+1];
      }
    }

    cout<<maxv<<endl;



}

Measured memory_bytes: 3864
plst = [1 for i in range(1000001)]
plst[0] = plst[1] = 0
for i in range(2,1000001):
  if plst[i] == 1:
    for j in range(i * 2,1000001,i):
      plst[j] = 0
while True:
  try:
    print(sum(plst[:int(input()) + 1]))
  except EOFError:
    break



Measured memory_bytes: 22100
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for(ll i=0; i<(ll)n; i++)
#define REPR(i, n) for(ll i=(ll)n-1; i>=0; i--)
#define FOR(i, m, n) for(ll i=(ll)m; i<(ll)n; i++)
#define FORR(i, m, n) for(ll i=(ll)m-1; i>=(ll)n; i--)
#define ALL(x) (x).begin(), (x).end()
#define ASC(v) sort(ALL(v));
#define DESC(v) sort(ALL(v), greater<int>());
#define UNIQ(a) sort(ALL(a));(a).resize(unique(ALL(a)) - a.begin());
#define PRINTD(x, d) cout << fixed << setprecision(d) << x << "\n";
#define DEBUG(x) cout<<#x<<": "<<x<<"\n"
const double PI = acos(-1);
ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; }
bool isprime(int x){ int i; if(x<2)return 0; else if(x==2) return 1; if(x%2==0) return 0; for(i=3; i*i<=x; i+=2) if(x%i==0) return 0; return 1; }
int digsum(int n) { int r=0; while(n>0) { r+=n%10; n/=10; } return r; }
vector<string> split(string s, char p){vector<string>v;stringstream m(s);string b;while(getline(m,b,p))v.push_back(b);return v;}
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a = b; return 1; } return 0; }
struct nya{ nya(){ cin.tie(0); ios::sync_with_stdio(false); } }nyan;

int main(){
    ll N, K; cin >> N >> K;
    vector<ll> A(N);
    REP(n, N) cin >> A[n];

    REP(i, N-K) {
        if (A[i] < A[i+K]) cout << "Yes\n";
        else cout << "No\n";
    }
}


Measured memory_bytes: 4784
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const double EPS = 1e-9;
const double INF = 2147483647;
#define rep(i, n) REP(i, 0, n)
#define rep2(i, n) REP(i, 1, n+1)
#define REP(i, x, n) for(int i = x; i < (int)(n); i++)
#define rrep(i, n) RREP(i, 0, n)
#define RREP(i, x, n) for(int i = (int)(n) - 1 - (int)(x); i >= 0; i--)

template<class T>
void printv(vector<T> v) {
    for(auto it = v.begin(); it != v.end(); it++){
        cout << *it << ",";
    }
    cout << endl;
}

int main() {
    int K;string S;
    cin>>K>>S;
    cout << S.substr(0,K);
    if(S.size() > K) cout << "...";
    
    return 0;
}

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


#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define repr(x,fr,to) for(int (x)=(fr);(x)>=(to);(x)--)
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()

using namespace std;
typedef long long ll; typedef vector<int> VI; typedef pair<int,int> pii;
const int MD = (int)1e9 + 7; typedef vector<ll> VL;
void dbg(){ cerr << "\n"; }  template <class T, class ...T2>
void dbg(const T& fst, const T2&...rst){ cerr << fst << ": "; dbg(rst...); }
template <class T, class T2> void amax(T& a,T2 b){ if(a < b) a = b;}


int main()
{
	//cin.tie(0); ios_base::sync_with_stdio(false);
	int n,r, ans =0;
	
	cin >>n >>r;
	if(n < 10) ans = 100 *(10-n) + r;
	else ans =r;
	cout << ans <<"\n";
	return 0;
}

Measured memory_bytes: 256
#include <iostream>                                                                                                       
                                                                                                                          
using namespace std;                                                                                                      
                                                                                                                          
int main() {                                                                                                              
  const int m = 100000;                                                                                                   
  int t;                                                                                                                  
  int n;                                                                                                                  
                                                                                                                          
  t = m;                                                                                                                  
  while (cin >> n) {                                                                                                      
    for (int i = 0; i < n; i++) {                                                                                         
      t = t + t * 0.05;                                                                                                   
      if (t % 1000 > 0) {                                                                                                 
        t = t + (1000 - t % 1000); // 切り上げ                                                                            
      }                                                                                                                   
    }                                                                                                                     
    cout << t << endl;                                                                                                    
  }                                                                                                                       
} 

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

int n;
const int MAXN=2e5+5;
struct V{
	std::string s;
	int num;
	bool operator < (const V & v)const{
		if(num==v.num) return s<v.s;
		return num<v.num;
	}
}v[MAXN];
int cnt=0;
std::map<std::string,int> s;
char ss[15];
int main()
{
	// freopen("test.in","r",stdin);
	scanf("%d",&n);
	while(n--)
	{
		scanf("%s",ss);
		s[std::string(ss)]++;
	}
	for(std::pair<std::string,int> i:s)
	{
		v[cnt++]={i.first,i.second};
	}
	std::sort(v,v+cnt);
	int nv=v[cnt-1].num;
	for(int i=0;i<cnt;i++)
	{
		if(v[i].num==nv) puts(v[i].s.c_str());
	}
	return 0;
}

Measured memory_bytes: 27008
#include<bits/stdc++.h>
using namespace std;
#define ld float
#define lli long long int
#define vi vector<int>
#define vlli vector<lli>
#define vvi vector<vi >
#define str string
#define vs vector<str>
#define vb vector<bool>
#define slli set<lli>
#define mii map<int, int>
#define mlli map<int, lli>
#define msi map<str, int>
#define mp make_pair
#define pii pair<int, int>
#define pll pair<lli, lli>
#define vpii vector<pii >
#define vpll vector<pll >
#define pb push_back
#define loop(i, s, l, j) for(int i = s; i < l; i += j)
#define rloop(i, s, l, j) for(int i = s; i >= l; i -= j)
#define rep(i, n) loop(i,0,n,1)
#define rrep(i, n) rloop(i,n-1,0,1) 
#define fastio() ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define ft first
#define sd second
#define all(a) a.begin(),a.end()
#define rev(a) reverse(all(a))
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define mod 1000000007
#define inf 2000000000
#define limit 1000005
#define minval -100000000000000000
#define maxval 1000000000000000
int dx4[4] = {0, -1, 0, 1};
int dy4[4] = {1, 0, -1, 0};
int dx8[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
int dy8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int Power(int base,int exp){int ans=1;  while(exp > 0){if(exp&1)ans=(1LL*ans*base)%mod; exp=exp>>1; base=(1LL*base*base)%mod;}  return ans;}

void solve(int test_case)
{
    int n;
    cin >> n;

    vlli cd(n+1, 1);
    loop(p,2,n+1,1)
    {
        if(cd[p] > 1)
            continue;

        cd[p] = 2;
        loop(j,p*2,n+1,p)
        {
            int val = 0;
            int x = j;
            while(x%p == 0)
                x = x/p, val++;
            cd[j] = cd[j] * (1 + val);
        }
    }
    lli ans = 0;
    loop(i,1,n,1)
        ans += cd[i];
    cout << ans << '\n';
}
int main()
{
   /*
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
   */
    fastio();
    int q = 1;
    //cin >> q;
    rep(i,q)
        solve(i+1);
}


Measured memory_bytes: 11116
N = int(input())
A = list(map(int, input().split()))

# 正負が混在するか判定
plus = False
minus = False
for a in A:
    if a > 0:
        plus = True
    elif a < 0:
        minus = True

ans = []

# 正負が混在する場合、符号を揃える
if plus == True and minus == True:
    max_a = max(A)
    min_a = min(A)
    max_idx = A.index(max_a)
    min_idx = A.index(min_a)
    # 正に揃える
    if abs(max_a) >= abs(min_a):
        for i in range(N):
            A[i] += max_a
            ans.append([max_idx + 1, i + 1])
    # 負に揃える
    else:
        for i in range(N):
            A[i] += min_a
            ans.append([min_idx + 1, i + 1])

# 正に揃っている場合
if min(A) >= 0:
    # 前から累積和
    for i in range(1, N):
        A[i] += A[i - 1]
        ans.append([i, i + 1])
# 負に揃っている場合
else:
    # 後ろから累積和
    for i in range(N - 2, -1, -1):
        A[i] += A[i + 1]
        ans.append([i + 2, i + 1])

print(len(ans))
for a in ans:
    print(*a)


Measured memory_bytes: 62668
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long int ll;

int main(void){
	int x;
	cin>>x;
  	
  	int d, t;
  	d=1800; t=1999;
  	int i=0;
  	for(i=0;i<9;i++){
    	if(d<=x && x<=t){
        	break;
        }else{
        	d-=200;
            t-=200;
        }
    }
  
  	cout<<i+1<<endl;
}

Measured memory_bytes: 3616
N = int(input())
A = [int(a) for a in input().split()]

S = [0]*(N+1)
for i in range(N):
    S[i+1] += S[i] + A[i]
    
ans = 10**12
for i in range(N-1):
    ans = min(ans, abs(S[i+1]-(S[N]-S[i+1])))
    
print(ans)

Measured memory_bytes: 24824
#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define int ll
#define INF (ll)(1e18)
using namespace std;
using ll=long long;
using pii=pair<int,int>;

int32_t main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int n; cin>>n;
	vector<int> v(n);
	int sum=0;
	for(auto &i:v) {cin>>i; sum+=i;}
	int now=0,mn=INF;
	For(i,0,n-2)
	{
		now+=v[i];
		mn=min(mn,abs(sum-now*2));
	}
	cout<<mn<<"\n";
	return 0;
}











Measured memory_bytes: 1792
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pl;
#define all(a) (a).begin(),(a).end()
#define overload4(_1, _2, _3, _4, name, ...) name
#define rep1(n) for(ll i = 0;i < (n);i++)
#define rep2(i,n) for(ll i = 0;i < (n);i++)
#define rep3(i,a,b) for(ll i = (a);i < (b);i++)
#define rep4(i,a,b,c) for(ll i = (a);i < (b);i += (c))
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep1(n) for(ll i = (n)-1;i >= 0;i--)
#define rrep2(i,n) for(ll i = (n)-1;i >= 0;i--)
#define rrep3(i,a,b) for(ll i = (a)-1;i >= (b);i--)
#define rrep4(i,a,b,c) for(ll i = (a)-1;i >= (b);i -= (c))
#define rrep(...) overload4(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)
#define SHOW(x) cout << #x << ": " << x << endl;
template<class T> ll sumArr(const T& a){ return accumulate(all(a), 0LL);}
template<class T> auto minArr(const T& a){ return *min_element(all(a));}
template<class T> auto maxArr(const T& a){ return *max_element(all(a));}
template<class T> void DEBUG_PRINT(T tmp){cout<<tmp<<endl;}
template<class T1,class... T2> void DEBUG_PRINT(T1 tmp,T2... tmp2){cout<<tmp<<" ";DEBUG_PRINT(tmp2...);}
ll gcd(ll a, ll b){ while(b){ ll c = b; b = a % b; a = c; } return a; }
const ll INF=1e18,MOD = 1e9+7;
const int iINF = 1e9;


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

    ll x;
    cin>>x;
    ll ans = 0,n = 100;

    while(n < x){
        ans++;
        n *= 1.01;
    }
    cout<<ans<<endl;

    
    return 0;
}


Measured memory_bytes: 3652
//atcoder 130
#include <bits/stdc++.h>
using namespace std;
int main () {
	int a,b,cnt=0;
	int arr[105],arr2[105];
	scanf("%d %d", &a, &b);
	for(int i=1; i<=a; i++){
		scanf("%d",&arr[i]);
	}
	arr2[0]=0;
	for(int i=1; i<=a; i++){
		arr2[i]=arr[i]+arr2[i-1];
	}
	for(int i=0; i<=a; i++){
		if(arr2[i]<=b){
			cnt++;
		}
	}
	printf("%d\n",cnt);
	return 0;
}

Measured memory_bytes: 256
import numpy as np
from collections import Counter
N,C = map(int,input().split())
link =[[] for _ in range(C+1)]
for i in range(N):
    x,y,c=[int(i) for i in input().split()]
    link[c].append((x,y))
siyou = np.array([0] * (C) * 100000).reshape(C,100000)
for i in range(1,C+1):
  for x,y in link[i]:
    siyou[i-1][x-1:y] = 1
print(np.max((np.sum(siyou, axis=0))))

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

int main () {
  string str; cin >> str;
  
  int ans = 0;
  int count = 0;
  for(int i = 0; i < 3; i++) {
    if(str.at(i) == 'R') {
      count++;
      if(ans < count) {
        ans = count;
      }
    } else {
      count = 0;
    }
  }
  
  cout << ans << endl;
  
  return 0;
}

Measured memory_bytes: 3624
#include <bits/stdc++.h>
using std::cerr;using std::cin;using std::cout;using std::abs;using std::min;using std::max;using std::swap;using std::map;using std::unordered_map;using std::unordered_set;using std::bitset;using std::pair;using std::set;using std::string;using std::vector;using std::sort;using ll=long long;using uint=unsigned int;using pii=pair<int,int>;using pll=pair<ll,ll>;using ull = unsigned long long;using ld=long double;template<typename T>void _(const char*s,T h){cerr<<s<<" = "<<h<<"\n";}template<typename T,typename...Ts>void _(const char*s,T h,Ts...t){int b=0;while(((b+=*s=='(')-=*s==')')!=0||*s!=',')cerr<<*s++;cerr<<" = "<<h<<",";_(s+1,t...);}// break continue pop_back 998244353
#define int ll
#define pii pll
#define f first
#define s second
#define pb emplace_back
#define forn(i,n) for(int i=0;i<(n);++i)
#define sqr(x) ((x)*(x))
struct init{init(){cin.tie(0);std::iostream::sync_with_stdio(0);cout<<std::fixed<<std::setprecision(10);cerr<<std::fixed<<std::setprecision(5);}~init(){
#ifdef LOCAL
#define dbg(...) _(#__VA_ARGS__,__VA_ARGS__)
cerr<<"Time elapsed: "<<(double)clock()/CLOCKS_PER_SEC<<"s.\n";
#else
#define dbg(...) 
#endif
}}init;template<typename T,typename U>void upx(T&x,U y){if(x<y)x=y;}template<typename T,typename U>void upn(T&x,U y){if(x>y)x=y;}
const int N=1e5+5;
int32_t main(){
    int a,b;
    cin>>a>>b;
    int x=1;
    int ans=0;
    while(x<b){
        x--;
        x+=a;
        ans++;
    }
    cout<<ans<<'\n';

    return 0;
}


Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <sstream>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <deque>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef unsigned long long int ll;


int main()
{
	int n;
	cin>>n;
	int numOfa = 'a';
	int charArray[26];
	rep(i,26){
		charArray[i] = 50;
	}
	rep(i,n){
		string str;
		cin>>str;
		int charArrayLocal[26] = {0};
		for(int j = 0; j < str.length(); j++){
			charArrayLocal[(int)(str[j] - numOfa)]++;
		}
		/*rep(j,26){
			cout<<(char)(j+'a')<<" "<<charArrayLocal[j]<<endl;
		}*/
		for(int j = 0; j < 26; j++){
			charArray[j] = min(charArray[j],charArrayLocal[j]);
		}
	}
	rep(i,26){
		//cout<<(char)(i+ numOfa)<<" "<<charArray[i]<<endl;
		rep(j,charArray[i]){
			cout<<(char)(i + numOfa);
		}
	}
	cout<<endl;
	return 0;
}



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

int n, m, e[10] = {0, 2, 5, 5, 4, 5, 6, 3, 7, 6}, le[10005], a[15];
bool v[10005];
string d[10005];
bool f(int p, int q) {
	int i, t1, t2;
	for (i = 0; i < d[p].size(); i++) {
		t1 = d[p][i] - '0';
		t2 = d[q][i] - '0';
		if (t1 > t2) return 1;
		if (t1 < t2) return 0;
	}
	return 1;
}
int main()
{
	int i, j, z;
	cin >> n >> m;
	for (i = 0; i < m; i++) scanf ("%d", &a[i]);
	sort(a, a + m);
	v[0] = 1;
	for (i = 1; i <= n; i++) {
		for (j = 0; j < m; j++) {
			z = i - e[a[j]];
			if (z < 0 || !v[z]) continue;
			if (le[i] < le[z] + 1 || le[i] == le[z] + 1 && f(z, i)) {
				v[i] = 1;
				d[i] = d[z];
				le[i] = le[z] + 1;
				d[i].push_back((char)(a[j] + '0'));
			}
		}
	}
	cout << d[n];
    return 0;
}


Measured memory_bytes: 46848
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <algorithm> 
#include <stdio.h>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <list>
#include <utility>
#include <set>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <bitset>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <random>

using namespace std;

static const double EPS = 1e-9;
template<class T> bool INRANGE(T x, T a, T b) { return a <= x && x <= b; }
template<class T> void amin(T &a, T v) { if (a > v) a = v; }
template<class T> void amax(T &a, T v) { if (a < v) a = v; }
int ROUND(double x) { return (int)(x + 0.5); }
bool ISINT(double x) { return fabs(ROUND(x) - x) <= EPS; }
bool ISEQUAL(double x, double y) { return fabs(x - y) <= EPS * max(1.0, max(fabs(x), fabs(y))); }
double SQSUM(double x, double y) { return x * x + y * y; }
#define PI  (acos(-1))
#define ARRAY_NUM(a) (sizeof(a)/sizeof(a[0])) 
#define NG (-1)
#define BIG ((int)1e9+10)
#define BIGLL ((ll)4e18)
#define SZ(a) ((int)(a).size())
#define SQ(a) ((a)*(a))
typedef unsigned long long ull;
typedef long long ll;

int main()
{
	int N, K;
	cin >> N >> K;

	if ((N+1)/2>=K)
	{
		printf("YES\n");
	}
	else
	{
		printf("NO\n");
	}

	return 0;
}


Measured memory_bytes: 256
# 2019/05/26
# AtCoder Beginner Contest 128 - B

from operator import itemgetter

# Input
n = int(input())
splist = list()

for i in range(n):
    s, p = input().split()
    sp = list()
    sp.append(s)
    sp.append(int(p))
    sp.append(i+1)
    splist.append(sp)
    
splist.sort(key=itemgetter(1), reverse=True)
splist.sort(key=itemgetter(0))

# Output
for i in range(n):
    print(splist[i][2])


Measured memory_bytes: 3060
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define m_p make_pair
#define sz(x) (int)x.size()
#define out(x) cerr<<#x<<" = "<<x<<" "
#define outln(x) cerr<<#x<<" = "<<x<<endl
#define outarr(x,l,r) cerr<<#x"["<<l<<"-"<<r<<"] = "; for (int _i=l;_i<=r;++_i) cerr<<x[_i]<<" ";cerr<<endl;
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define gc() getchar()
//char buf[1<<23],*p1=buf,*p2=buf;
//#define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
template <class T> void read(T &x)
{
    x=0; char c=gc(); int flag=0;
    while (c<'0'||c>'9') flag|=(c=='-'),c=gc();
    while (c>='0'&&c<='9') x=(x<<3)+(x<<1)+(c^48),c=gc();
    if (flag) x=-x;
}
template <class T> T _max(T a,T b){return a>b ? a : b;}
template <class T> T _min(T a,T b){return a<b ? a : b;}
template <class T> bool checkmax(T &a,T b){return b>a ? a=b,1 : 0;}
template <class T> bool checkmin(T &a,T b){return b<a ? a=b,1 : 0;}
const int N=205,inf=0x3f3f3f3f;
char mp[N][N];
int n,col[N];
vector <int> G[N];
int a[N][N];
void add_edge(int x,int y){a[x][y]=1; G[x].push_back(y);}
void init()
{
	read(n);
	memset(a,0x3f,sizeof a);
	for (int i=1;i<=n;++i)
	{
		scanf("%s",mp[i]+1);
		for (int j=1;j<=n;++j)
		{
			if (mp[i][j]=='1')
			{
				add_edge(i,j);
				add_edge(j,i);
			}
		}
	}
	for (int i=1;i<=n;++i) a[i][i]=0;
}

bool bipartite(int x,int c)
{
	col[x]=c;
	for (int i=0;i<sz(G[x]);++i)
	{
		int to=G[x][i];
		if (!col[to])
		{
			if (!bipartite(to,3-c)) return 0;
		}
		else if (col[to]==col[x])
		{
			return 0;
		}
	}
	return 1;
}

void solve()
{
	for (int i=1;i<=n;++i)
	{
		if (!col[i])
		{
			if (!bipartite(i,1))
			{
				printf("-1\n");
				return;
			}
		}
	}
	int ans=2;
	for (int k=1;k<=n;++k)
	{
		for (int i=1;i<=n;++i)
		{
			for (int j=1;j<=n;++j)
			{
				checkmin(a[i][j],a[i][k]+a[k][j]);
			}
		}
	}
	for (int i=1;i<=n;++i)
	{
		for (int j=1;j<=n;++j)
		{
			if (a[i][j]<inf) checkmax(ans,a[i][j]+1);
		}
	}
	printf("%d\n",ans);
}

#undef int
int main()
{
    init();
	solve();
	return 0;
}


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

#define rep(i, n) for(long long i=0;i<(long long)(n);i++)
#define rep2(i, s, n) for(long long i=(s);i<(long long)(n);i++)
#define repi(i, n) for(int i=0;i<(int)(n);i++)
#define rep2i(i, s, n) for(int i=(s);i<(int)(n);i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define chmax(s, t) s=max(s,t);
#define chmin(s, t) s=min(s,t); 

#define deg2rad(deg) (((deg)/360)*2*M_PI)
#define rad2deg(rad) (((rad)/2/M_PI)*360)

using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;

const ll INF = (1LL<<60);
const int INFi = (1<<29);

/*素数判定*/
bool is_prime(ll n){
    if(n==1) return false;
    for(ll i=2;i*i<=n;i++){
        if(n%i==0) return false;
    }
    return true;
}

/*約数列挙*/
vll enum_divisors(ll n){
    vll l;
    for(ll i=1;i*i<=n;i++){
        if(n%i==0){
            l.push_back(i);
            if(n/i != i) l.push_back(n/i);
        }
    }
   sort(all(l));
   return l;
}

/*素因数分解*/
vector<P> prime_factorize(ll n){
    vector<P> l;
    for(ll i=2;i*i<=n;i++){
        if(n%i!=0) continue;
        ll e = 0;
        while(n%i==0){
            e++;
            n /= i;
        }
        l.push_back({i, e});
    }
    if(n!=1) l.push_back({n, 1});
    return l;
}

/*最小公倍数*/
ll lcm(ll a, ll b){
    return a*b/__gcd(a,b);
}

/*最大公約数*/
ll gcd(ll a, ll b){
    return __gcd(a,b);
}

/*組み合わせ(Combination)*/
const ll CMAX = 1010000;
const ll CMOD = 1e9+7;
ll fac[CMAX], finv[CMAX], inv[CMAX];
// テーブルを作る前処理
void combinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (ll i = 2; i < CMAX; i++) {
		fac[i] = fac[i - 1] * i % CMOD;
		inv[i] = CMOD - inv[CMOD%i] * (CMOD / i) % CMOD;
		finv[i] = finv[i - 1] * inv[i] % CMOD;
	}
}
// 二項係数計算
ll comb(ll n, ll k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % CMOD) % CMOD;
}

/*階乗*/
ll factorial(ll n){
    const ll FMOD = 1e9+7;
    ll ret = n;
    for(ll i=n-1;i>0;i--){
        ret*=i;
        ret%=FMOD;
    }
    return (ret?ret:1);
}


int main(){

    ll n, d; cin >> n >> d;
    ll ans = 0;
    rep(i, n){
        ll x, y;
        cin >> x >> y;
        if(sqrt(x*x+y*y)<=(ld)d) ans++;
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 3724
n, l = map(int, input().split())

ringo = []
aji = []
for i in range(n):
  ringo.append(i+1)
  aji.append(l + i)

if min(aji) > 0:
  aji.remove(min(aji))
  print(sum(aji))
elif max(aji) < 0:
  aji.remove(max(aji))
  print(sum(aji))
else:
  print(sum(aji))
  

Measured memory_bytes: 3060
A, B, C = map(int, input().split())
ans = 0
while True:
    if A%2+B%2+C%2 > 0:
        print(ans)
        exit()
    if A == B == C:
        print(-1)
        exit()
    a = (B+C)//2
    b = (A+C)//2
    C = (A+B)//2
    A = a
    B = b
    ans += 1

Measured memory_bytes: 3064
#include<bits/stdc++.h>
#define endl '\n'
#define INF (1 << 21)
const int MOD = 1000000007;
using namespace std;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string str;
  int n;
  int l, s;
  int ans;

  cin >> str;
  while(str != "0000"){
    if(str == "6174"){
      cout << 0 << endl;
    }else if(str[0] == str[1] && str[1] == str[2] && str[2] == str[3]){
      cout << "NA" << endl;
    }else{
      ans = 0;

      while(1){
	l = s = 0;
	ans ++;

	int r = 1;
	sort(str.begin(), str.end());
	for(int i = 3;i >= 0;i--){
	  s += (str[i] - '0') * r;
	  r *= 10;
	}
	
	r = 1;
	reverse(str.begin(), str.end());
	for(int i = 3;i >= 0;i--){
	  l += (str[i] - '0') * r;
	  r *= 10;
	}
	
	if((n = l - s) == 6174){
	  break;
	}else{
	  for(int i = 3;i >= 0;i--){
	    str[i] = (n % 10) + '0';
	    n /= 10;
	  }
	}
      }
      cout << ans << endl;
    }      
    cin >> str;
  }
  return 0;
}




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

int main() {
	int n;
	string s;
	cin>>n;
	cin>>s;
	
	int count=0;
	for(int i=0;i<=n-3;i++){
		if(s[i]=='A'&&s[i+1]=='B'&&s[i+2]=='C'){//s[i]のような書き方はchar型で取得されること,charは''
			count++;
		}
	}
	
	cout<<count<<endl;
}


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

const LL MOD = pow(10,9) + 7;

LL reppow(LL n, LL p){
    if(p == 0){
        return 1;
    }else if(p % 2 == 0){
        LL t = reppow(n, p / 2);
        return (t * t) % MOD;
    }else{
        return n * reppow(n, p - 1) % MOD;
    }
}

LL mpow(LL x, LL n){
    LL ans = 1;
    while(n != 0){
        if(n%2==1) ans = ans*x % MOD;
        x = x*x % MOD;
        n = n/2;
    }
    return ans;
}

LL mfact(LL n, LL k){
  LL ans=1;
  for(LL i=n; i>=n-k+1; i--){
    ans = (ans*i) %MOD;
  }
  return ans%MOD;
}

LL minv(LL k){
  LL ans=1;
  for(LL i=k; i>1; i--){
    ans = (ans*mpow(i,MOD-2))%MOD;
  }
  return ans%MOD;
}

LL mcomb(LL n,LL k){
  return (mfact(n,k)*minv(k))%MOD;
}

int main(){
    LL n;
    cin >> n;
    LL a,b;
    cin >> a >> b;

    LL ans = reppow(2,n) - 1;
    ans -= mcomb(n,a);
    ans -= mcomb(n,b);

    cout << (ans + MOD + MOD) % MOD << endl;


    return 0;
}


Measured memory_bytes: 256
dirs = [(-1,-1),(-1,0),(-1,1), (0,-1),(0,1), (1,-1),(1,0),(1,1)]

while True:
	w, h = map(int, input().split())
	if (w,h) == (0,0):
		break
	tile = [input().split() for i in range(h)]
	count = 0
	for i in range(h):
		for j in range(w):
			if tile[i][j] == '1':
				count += 1
				q = [(i,j)]
				while q:
					(x,y) = q.pop()
					for d in dirs:
						xx = x+d[0]
						yy = y+d[1]
						if (0 <= xx and xx < h) and (0 <= yy and yy < w):
							if tile[xx][yy] == '1':
								tile[xx][yy] = '0'
								q.append((xx,yy))
	print(count)
	

Measured memory_bytes: 7624
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace AtCoder
{
	public class ABC
	{
		private const int mod = 1000000007;  // 10^9+7

		static void Main(string[] args)
		{
			//System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start();
			Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });


			//string s = Console.ReadLine();
			int n = int.Parse(Console.ReadLine());
			//long x = long.Parse(Console.ReadLine());
			//int[] vs = Console.ReadLine().Split().Select(int.Parse).ToArray();
			//long[] vs = Console.ReadLine().Split().Select(long.Parse).ToArray();
			Dictionary<string, int> count = new Dictionary<string, int>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				string s = Console.ReadLine();
				if (count.ContainsKey(s)) {
					count[s]++;
				} else {
					count.Add(s, 1);
				}
				max = Math.Max(max, count[s]);
			}
			//System.Diagnostics.Debug.WriteLine(max);
			string[] keys = count.Where(p => p.Value == max).Select(p => p.Key).ToArray();
			Array.Sort(keys, StringComparer.Ordinal);
			foreach (var s in keys) {
				//System.Diagnostics.Debug.WriteLine($"{s} {count[s]}");
				Console.WriteLine(s);
			}


			Console.Out.Flush();
			//System.Diagnostics.Debug.WriteLine(stopwatch.Elapsed);
		}
	}
}


Measured memory_bytes: 42332
#include "bits/stdc++.h"

#define REP(i, n, N) for(ll i=(n); i<(N); i++)
#define RREP(i, n, N) for(ll i=(N-1); i>=(n); i--)
#define LREP(lst,itr) for(auto itr = lst.begin(); itr != lst.end(); ++itr)
#define CK(n, a, b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define MCP(a, b) memcpy(b,a,sizeof(b))
#define P(s) cout<<(s)<<endl
#define P2(a, b) cout<<(a)<<" "<<(b)<<endl
#define P3(a, b, c) cout<<(a)<<" "<<(b)<<" "<<(c)<<endl
#define V2(T) vector<vector<T>>
typedef long long ll;
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;

struct student{
    int id;
    int num;
};

bool cmp(const student &A, const student &B){
    return A.num < B.num;
}

int main(){
    int N;
    cin >> N;
    vector<student> st(N);
    REP(i,0,N){
        student one;
        one.id=i+1;
        cin >> one.num;
        st[i]=one;
    }
    
    sort(st.begin(),st.end(),cmp);

    cout << st[0].id;
    REP(i,1,N){
        cout << " " << st[i].id;
    }
    cout << endl;
}


Measured memory_bytes: 1664
/*
    ALWAYS REMMEMBER:
        NEVER GIVE UP !
        DON'T MESS WITH ME !!!
        "" THE EXPERT IN ANYTHING WAS ONCE A BEGINNER ""
*/

#include<bits/stdc++.h>
using namespace std;
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define ull unsigned long long int
#define ld long double
#define f(i,a,b) for(ll i=a; i<=b; i++)
#define fi(i,a,b) for(ll i=a; i>=b; i--)
#define fa(x,b) for(auto x:b)
#define TC ll test_case; cin>>test_case; for(ll number=1 ; number <= test_case ; number ++ )
#define vll vector<ll>
#define pb push_back
#define pll pair<ll,ll>
#define mp make_pair
#define ff first
#define ss second
#define sz(a) (ll)(a).size()
#define sp(x) cout << fixed << setprecision(x);
#define ReadFile freopen("input.txt","r",stdin)
#define WriteFile freopen("output.txt","w",stdout)
#define endl "\n"

const ld pi = acos(-1);
const ll M=1e9+7,N=1e7+5,INF=1e18;

void solve()
{
    ll a,b,c;
    cin >> a >> b >> c;
    if((a==b && a!=c) || (b==c && a!=c) || (a==c && a!=b))
        cout << "Yes" << endl;
    else 
        cout << "No" << endl;
}

int32_t main()
{
    FIO
    solve();
    return 0;
}

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

#ifdef LOCAL
#include <debug.hpp>
#else
#define debug(...) void()
#endif

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int x, y;
  cin >> x >> y;
  int inf = 2 * (int)1e9;
  cout << min({(y - x >= 0 ? y - x : inf), (1 + y + x >= 0 ? 1 + y + x : inf),
               (1 - y - x >= 0 ? 1 - y - x : inf),
               (2 + x - y >= 0 ? 2 + x - y : inf)})
       << '\n';
  return 0;
}

Measured memory_bytes: 3576
#include <vector>

template<typename T>
struct edge {
    std::size_t to; T cost;
    edge (std::size_t to, T cost = 1) : to(to), cost(cost) { }
    bool operator< (const edge &r) const { return (cost < r.cost); }
};

template<typename T>
using graph = std::vector<std::vector<edge<T>>>;

#include <stack>
#include <cstddef>
#include <functional>
#include <algorithm>

template<class T>
std::vector<std::vector<std::size_t>> strongly_connected_component (const graph<T> &g) {
	using std::size_t;
	size_t index = 0;
	std::vector<std::vector<size_t>> scc;
	std::vector<size_t> low(g.size()), order(g.size());
	std::stack<size_t> stack;
	std::vector<bool> instack(g.size(), false);
	std::function<void(size_t)> dfs = [&] (size_t v) {
		low[v] = order[v] = ++index;
		stack.push(v); instack[v] = true;
		for (const auto &e : g[v]) {
			if (order[e.to] == 0) {
				dfs(e.to);
				if (low[v] > low[e.to]) low[v] = low[e.to];
			} else if (instack[e.to] and low[v] > order[e.to]) {
				low[v] = order[e.to];
			}
		}
		if (low[v] == order[v]) {
			scc.push_back(std::vector<size_t>());
			while (true) {
				const size_t u = stack.top();
				stack.pop(); instack[u] = false;
				scc.back().push_back(u);
				if (v == u) break;
			}
		}
	};
	for (size_t v = 0; v < g.size(); v++) {
		if (order[v] == 0) dfs(v);
	}
	std::reverse(scc.begin(), scc.end());
	return scc;
}

#include <iostream>

using usize = std::size_t;

int main() {
	usize n, m;
	std::cin >> n >> m;
	graph<int> g(n);
	for (usize i = 0; i < m; i++) {
		usize a, b;
		std::cin >> a >> b;
		g[a].emplace_back(b);
	}
	
	auto scc = strongly_connected_component(g);
	std::cout << scc.size() << '\n';
	for (auto &v : scc) {
		std::cout << v.size();
		for (auto &e : v) std::cout << ' ' << e;
		std::cout << '\n';
	}
	
	return 0;
}

Measured memory_bytes: 63568
import java.util.*;
public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        long X = sc.nextLong();
        long Y = sc.nextLong();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Ringo> pq = new PriorityQueue<>(Comparator.comparingLong(o->-o.value));
        for(int i=0;i<A;i++){
            pq.add(new Ringo(0, sc.nextLong()));
        }
        for(int i=0;i<B;i++){
            pq.add(new Ringo(1, sc.nextLong()));
        }
        for(int i=0;i<C;i++){
            pq.add(new Ringo(2, sc.nextLong()));
        }
        long cnter = X+Y;
        long sum=0;
        while(cnter > 0){
            Ringo nxt = pq.poll();
            if(nxt.rg == 0 && X>0){
                X--;
                cnter--;
                sum += nxt.value;
            }else if(nxt.rg == 1 && Y>0){
                Y--;
                cnter--;
                sum += nxt.value;
            }else if(nxt.rg == 2){
                sum += nxt.value;
                cnter--;
            }
        }
        System.out.println(sum);

    }

    private static class Ringo{
        int rg;
        long value;
        Ringo(int rg, long value){
            this.rg = rg;
            this.value = value;
        }
    }
}


Measured memory_bytes: 103840
from collections import defaultdict

n=int(input())
mod=10**9+7
d=defaultdict(int)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])

    for i in range(len(arr)):
        d[arr[i][0]]+=arr[i][1]
    return

ans=1
for i in range(1,n+1):
    factorization(i)

for i,m in d.items():
    if i!=1:
        ans*=(m+1)
        ans%=mod
print(ans)

Measured memory_bytes: 3444
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=qb
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
def dq():
	return queue.deque()
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n

a,b,c,k = readInts()
if k<=a:
	print(k)
elif k<=a+b:
	print(a)
else:
	print((k-(a+b))*-1+a)

Measured memory_bytes: 9760
#include <iostream>
using namespace std;
 
int main()
{
  int l,r,d;
  int c=0;
  cin >> l;
  cin >> r;
  cin >> d;

  for(int i = l;i <= r;i++){
      if((i % d) == 0){
          c++;
      }
      else{

      }
  }
    cout << c;

} 

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

const int MOD=1000000007;
const int INF=0x3f3f3f3f;
const ll INFL=0x3f3f3f3f3f3f3f3f;

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


Measured memory_bytes: 256
#[allow(unused_imports)]
use std::cmp;
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;
#[allow(unused_imports)]
use proconio::derive_readable;
use proconio::fastout;
#[allow(unused_imports)]
use num::Integer;
#[allow(unused_imports)]
use itertools::Itertools;

const M: usize = 2019;

#[fastout]
fn main() {
  input! {
    s: Chars,
  }
  let mut sum = vec![0; s.len() + 1];
  let mut pow = 1;
  for (i, &c) in s.iter().rev().enumerate() {
    sum[i+1] = (sum[i] + pow * (c as usize - '0' as usize)) % M;
    pow = (pow * 10) % M;
  }
  let mut popl = vec![0i64; M];
  for &x in &sum {
    popl[x] += 1;
  }
  let mut ans = 0;
  for &p in &popl {
    ans += p * (p - 1) / 2;
  }

  println!("{}", ans);
}


Measured memory_bytes: 4608
import math
A, B = map(int, input().split())
if A == B:
    print(A)
    exit()

ans = 0
max_digit = math.floor(math.log2(B)) + 1
plus_count = B - A + 1
# print(max_digit)

for digit in range(max_digit):
    start_pos = A % (2**(digit + 1))
    pos_len = 2**(digit + 1)
    digit_sum = 0
    if start_pos + plus_count > pos_len:
        end_pos = (plus_count - (pos_len - start_pos)) % pos_len
        if end_pos == 0:
            digit_sum = pos_len - max(2**digit, start_pos) + (
                plus_count - (pos_len - start_pos)) // pos_len * (2**digit)
        else:
            digit_sum = pos_len - max(2**digit, start_pos) + (
                plus_count -
                (pos_len - start_pos)) // pos_len * (2**digit) + max(
                    end_pos - 2**digit, 0)
    else:
        end_pos = start_pos + plus_count - 1
        digit_sum = 2**digit - max(start_pos - 2**digit,
                                   0) - (pos_len - max(2**digit, end_pos + 1))
    if digit_sum % 2 == 1:
        ans += 2 ** digit
print(ans)

Measured memory_bytes: 3188
#
# File    : A.rb
# Author  : Kazune Takahashi
# Created : 3/9/2019, 8:47:41 PM
# Powered by Visual Studio Code
#

h, w = gets.chomp.split(" ").map{|i| i.to_i}
x, y = gets.chomp.split(" ").map{|i| i.to_i}
puts (h - x) * (w - y)


Measured memory_bytes: 1788