akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>   
using namespace std;
using namespace __gnu_pbds;
typedef long long ll; 
#define int long long
typedef unsigned long long lu;
typedef vector<ll> v;
typedef vector<vector<ll> > vv;
typedef vector<string>  vs;
typedef vector<pair<ll,ll>> vpr;
typedef vector<bool>vb;
typedef vector<double>vd;
typedef long double ld;
#define f(i,n) for(ll i = 0; i < n; i++)
#define ff(i,n) for(ll i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define endl "\n"
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define amax(x,y) if(y>x) x=y;
#define amin(x,y) if(y<x)x=y;
#define bg(x) x.begin()
#define sz(x) (ll)x.size()
#define in(x,n) for(ll i=0;i<n;i++)cin>>x[i]
#define out(x,n) for(ll i=0;i<n;i++)cout<<x[i]<<" " 
#define mxt(a) *(max_element(a.begin(),a.end()))
#define mnt(a) *(min_element(a.begin(),a.end())
#define tc ll t;cin>>t;while(t--)
typedef pair<ll,ll> pi;
#define yes cout<<"YES\n";
#define no cout<<"NO\n";
#define yesno(f) if(f) yes else no
const v dx = {1, -1, 0, 0};
const v dy = {0, 0, 1, -1};
const ld PI = 2 * acos(0.0);
ll cel(ll x1,ll y1){if((x1%y1)==0)return x1/y1;else return x1/y1+1;}
ll power(ll a,ll b,ll m)
{
    if(b==0)
        return 1;
    ll d=power(a,b/2,m);
    d=(d*d)%m;
    if(b&1)
        d=(d*a)%m;
    return d;
}
const ll mod=1e9+7;
int MOD(int a)
{
    if(a<0)
        a+=mod;
    if(a>=mod)
        a%=mod;
    return a;
}
// set_name.find_by_order(k) It returns to an iterator to the kth element (counting from zero) in the set in O(logn) time
// set_name.order_of_key(k) It returns to the number of items that are strictly smaller than our item k in O(logn) time.
/*string operations :
str.substr (x,y) : returns a substring str[x],str[x+1],...str[x+y-1]
str.substr (x) : returns a substring str[x],... end of string
str.find(qtr) : returns the first occurenece of qtr in str */
int32_t main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    int n;cin>>n;
    int d;cin>>d;
    int  ans=0;
    for(int i=0;i<n;i++)
    {
    	int x,y;cin>>x>>y;
    	int dist=x*x+y*y;
    	if(dist <= d*d)
    		ans++;
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 3644
#include<algorithm>
#include<bitset>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<map>
#include<iostream>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>
using namespace std;
#define ll long long
#define f(i,a,b) for(int i=a;i<=b;i++)
inline ll read(){
   int s=0,w=1;
   char ch=getchar();
   while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
   while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
   return s*w;
}
#define d read()
string s[2]={"ABC","ARC"};
int main(){
	string ss;
	cin>>ss;
	if(ss==s[0])cout<<s[1];
	else cout<<s[0];
	return 0;
}


Measured memory_bytes: 3600
<?php
fscanf(STDIN, '%s', $s);

$ans = strlen($s);

if ($ans <= 1) {
    echo 0;
    exit;
}

for ($i = 0;$i < 2; $i++) {
    $cnt = 0;
    for ($j = 0;$j < strlen($s);$j++) {
        // 0, 2, 4, 6, ...が$iではない時は変える必要がある
        if ($j % 2 === 0 && $s[$j] !== (string)$i) {
            $cnt++;
        }
        // 1, 3, 5, 7, ...が$iの時は変える必要がある
        if ($j % 2 === 1 && $s[$j] === (string)$i) {
            $cnt++;
        }
    }
    $ans = min($ans, $cnt);
}
echo $ans . PHP_EOL;


Measured memory_bytes: 4604
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <iomanip>
#include <limits>//setprecision
//#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
//#include <unordered_set> //unordered_set
#include <stack> // stack
#include <deque> // deque
#include <math.h>//pow,,,
#include <cmath>//abs,,,
#include <bitset> // bitset
#define endl "\n";
using namespace std;

const long long INF = 4000000000000000001;
const int inf = 1001001001;
const int MOD = 1000000007;
typedef pair<long long,long long> P;

//Solve N^M. This, mod_pow use Iterative Square Method.
long long mod_pow(long long N, long long M) {
    if (M == 0) return 1;
    long long res = mod_pow((N * N) % MOD, M / 2);
    //When end-of-a-lin bit is 1, times simple N.
    if (M & 1) res = (res * N) % MOD;
    return res %= MOD;
}
long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
    return a / gcd(a, b) * b ;
}



int main() {
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
 
    int H,W;cin >> H >> W;
    int A,B;cin >> A >> B;
    for(int i = 0;i<B;i++){
        for(int j = 0;j<W;j++){
            if(A > j){
                cout << 0;
            }
            else{
                cout << 1;
            }
        }
        cout << endl;
    }
    for(int i = B;i<H;i++){
        for(int j = 0;j<W;j++){
            if(j < A){
                cout << 1;
            }
            else{
                cout << 0;
            }
        }
        cout << endl;
    }
}

Measured memory_bytes: 3564
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cmath>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
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 ll INF = 1e18;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, l;
  cin >> n >> m >> l;
  vector<vector<ll>> graph(n, vector<ll>(n, INF));
  rep(i, m) {
    int a, b, c;
    cin >> a >> b >> c;
    --a, --b;
    graph[a][b] = c;
    graph[b][a] = c;
  }
  rep(i, n) graph[i][i] = 0;
  rep(i, n) rep(j, n) rep(k, n)
    chmin(graph[j][k], graph[j][i]+graph[i][k]);
  rep(i, n) rep(j, n) {
    if (i == j)
      graph[i][j] = 0;
    else if (graph[i][j] <= l)
      graph[i][j] = 1;
    else
      graph[i][j] = INF;
  }
  rep(i, n) rep(j, n) rep(k, n)
    chmin(graph[j][k], graph[j][i]+graph[i][k]);
  int q;
  cin >> q;
  rep(i, q) {
    int s, t;
    cin >> s >> t;
    --s, --t;
    if (graph[s][t] == INF)
      cout << -1 << endl;
    else
      cout << graph[s][t]-1 << endl;
  }
  return 0;
}


Measured memory_bytes: 1280
while(True):
    try:
        n = int(input())
        a, b = map(int, input().split())
        list = map(int, input().split())
        a_count, b_count, c_count = [0 for _ in range(3)]
        for num in list:
            if num <= a:
                a_count += 1
            elif num > b:
                c_count += 1
            else:
                b_count += 1
        print(min(a_count, b_count, c_count))
    except EOFError:
        exit()


Measured memory_bytes: 3060
#include <iostream>
#include <algorithm>
using namespace std;
int root(int a,int P[]);

int root(int a,int P[])
{
    if(P[a] == a)
        return a;
    else    return (P[a] = root(P[a],P));
}
int is_same_set(int a,int b,int P[])
{
    return root(a,P) == root(b,P);
}

int main()
{
    int n,q,i,com,x,y,flag;
    cin >> n >> q;
    int P[n];
    for(i=0;i<n;i++)
        P[i] = i;
    for(i=0;i<q;i++)
    {
        cin >> com >> x >> y;
        if(com == 0)
            P[root(x,P)] = root(y,P);
        else    if(com == 1)
                {
                    flag = is_same_set(x,y,P);
                    cout << flag << endl;
                }
    }
    return 0;
}


Measured memory_bytes: 3188
// Author : heyuhhh
// Created Time : 2020/08/22 20:42:04
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
void run() {
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> row(n);
    vector<int> col(m);
    vector<int> x(k), y(k);
    for (int i = 0; i < k; i++) {
        cin >> x[i] >> y[i];
        --x[i], --y[i];
        ++row[x[i]], ++col[y[i]];
    }
    int ans = 0;
    int cntr = 0, cntc = 0;
    ll tot = 0;
    int maxr = *max_element(all(row)), maxc = *max_element(all(col));
    for (int i = 0; i < n; i++) {
        if (maxr == row[i]) ++cntr;
    }
    for (int j = 0; j < m; j++) {
        if (maxc == col[j]) ++cntc;
    }
    for (int i = 0; i < k; i++) {
        ans = max(ans, row[x[i]] + col[y[i]] - 1);
        if (row[x[i]] == maxr && col[y[i]] == maxc) {
            ++tot;
        }
    }
    if (tot != 1ll * cntr * cntc) {
        ans = maxr + maxc;
    }
    cout << ans << '\n';
}
int main() {
#ifdef Local
    freopen("input.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    run();
    return 0;
}

Measured memory_bytes: 7932
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

x, a = li()

if x < a:
    print(0)
else:
    print(10)

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


using namespace std;

#define ll long long

char t[100];
int main(){
   string a,b;
   cin >> a >> b;
   int n=a.size();
   int m=b.size();
   int pos;
   for(int i=0,pos=0;i<n;i++,pos+=2) t[pos]=a[i];
   for(int j=0,pos=1;j<m;j++,pos+=2) t[pos]=b[j];
   string ans;
   for(int k=0;k<n+m;k++) {
	   ans+=t[k];
   }
   cout << ans;
   return 0;
}




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

using namespace std;

using ll = long long;

constexpr ll MOD = 1000000007;

#ifndef ONLINE_JUDGE
template <class T, class U>ostream &operator<<(ostream &o, const map<T, U>&obj) {o << "{"; for (auto &x : obj) o << " (" << x.first << " : " << x.second << ")" << ","; o << " }"; return o;}
template <class T>ostream &operator<<(ostream &o, const set<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const multiset<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const vector<T>&obj) {o << "["; for (int i = 0; i < (int)obj.size(); ++i)o << (i > 0 ? ", " : "") << obj[i]; o << "]"; return o;}
template <class T, class U>ostream &operator<<(ostream &o, const pair<T, U>&obj) {o << "(" << obj.first << ", " << obj.second << ")"; return o;}
template <template <class tmp>  class T, class U> ostream &operator<<(ostream &o, const T<U> &obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr)o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
void print_sim_py(void) {cout << endl;}
template <class Head> void print_sim_py(Head&& head) {cout << head;print_sim_py();}
template <class Head, class... Tail> void print_sim_py(Head&& head, Tail&&... tail) {cout << head << " ";print_sim_py(forward<Tail>(tail)...);}

#define print(...) print_sim_py(__VA_ARGS__);
#else
#define print(...);
#endif

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

    ll ans;
    
    for(ll i=0; i<5; i++){
        ll a;
        cin >> a;
        if(a!=i+1){
            ans = i+1;
        }
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 3596
#include<stdio.h>
int min(int a,int b)
{
    if(a>b)
        return b;
    return a;
}
int main()
{
    int a,b,c,d;
    while(scanf("%d %d %d %d",&a,&b,&c,&d)!=EOF)
    {
        int e=min(a,b);
        int f=min(c,d);
        printf("%d\n",e+f);
    }
    return 0;
}


Measured memory_bytes: 128
#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>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;



int main() {
    int n, m;
    cin >> n >> m;
    vector<vector<int>> jobs(m);
    rep(i,n) {
        int a, b;
        cin >> a >> b;
        if (a > m) continue;
        jobs[m-a].push_back(b);
    }
    priority_queue<int> q;
    ll ans = 0;
    for (int i = m-1; i >= 0; i--) {
        for (int b : jobs[i]) {
            q.push(b);
        }
        if (!q.empty()) {
            ans += q.top();
            q.pop();
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 8316
#include<iostream>

using namespace std;

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

	int m1 = n/1000000000;
	int m2 = n/100000000 % 10;
	int m3 = n/10000000 % 10;
	int m4 = n/1000000 % 10;
	int m5 = n/100000 % 10;
	int m6 = n/10000 % 10;
	int m7 = n/1000 % 10;
	int m8 = n/100 % 10;
	int m9 = n/10 % 10;
	int m0 = n % 10;

	int mm = m1+m2+m3+m4+m5+m6+m7+m8+m9+m0;

	if(n % mm == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}


Measured memory_bytes: 256
#include <sstream>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<ctime>
#include<cmath>
#include<map>
#include<unordered_map>
#include<stack>
#include<random>
#include<queue>
#include<list>
#include<math.h>
#include<bitset>
#include<fstream>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mul(x,y) ((ll)(x)*(y))%mod
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define forn(i, n) for (int i = 0; i < int(n); i++)
#include<fstream>
const ll INF=9223372036854775807;
const ll mod=998244353;
int  MOD(int  a, int  b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
ll  max3(ll  a,ll  b, ll  c)
{
    return max(c,max(a,b));
}
ll min3(ll  a,ll  b,ll  c)
{
    return min(a,min(b,c));
}
ll  power(ll  x,ll  y,ll mod1)
{
    ll res = 1;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x)%mod1;
        y = y>>1;
        x = (x*x)%mod1;
    }
    return res;
}
ll logg(ll  a)
{
    ll  x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
ll  gcd(ll  a,ll   b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}
ll abso(ll x)
{
    if(x<0)
    {
        return -x;
    }
    return x;
}
ll ceiling (ll  a,ll  b)
{
    if(a%b==0)
    {
        return a/b;
    }
    else
    {
        return a/b+1;
    }
}
ll modinv(ll x,ll p)
{
    return power(x,p-2,p);
}
int main()
{
    int n;
    cin>>n;
    vi a(n);
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    auto b=a;
    sort(all(b));
    if(b==a)
    {
        cout<<"YES"<<endl;
    }
    else
    {
        bool cc=false;
        for(int i=0;i<n;i++)
        {
            for(int j=0;j<n;j++)
            {
                auto c=a;
                int x=a[i];
                int y=a[j];
                c[i]=y;
                c[j]=x;
                if(c==b)
                {
                    cc=true;
                }
            }
        }
        if(cc)
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
    }
}


Measured memory_bytes: 256
#include<stdio.h>
    int main(){
    	int n;
    	scanf("%d", &n);
    	int flag=0;
    	
    	for(int i=1; i<=9; i++){
    		for(int j=1; j<=9; j++){
    			if(i*j==n){
    				i=10,j=10;
    				flag=1;
    			}
    		}
    	}
    	
    	if (flag==1) printf("Yes");
    	else printf("No");
    }

Measured memory_bytes: 1720
//DUEL
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define x first
#define y second
#define pii pair<int,int>
#define pb push_back
#define eb emplace_back
#pragma GCC optimize("unroll-loops")
#define shandom_ruffle(a, b) shuffle(a, b, rng)
#define vi vector<int>
#define vl vector<ll>
#define popcnt __builtin_popcount
#define popcntll __builtin_popcountll

using namespace std;
using namespace __gnu_pbds;

using ll=long long;
using ull=unsigned long long;
using ld=long double;
int MOD=1000000007;
int MOD2=998244353;
vector<int> bases;
const ll LLINF=1ll<<60;
const char en='\n';

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void yes() {cout<<"YES"<<en; exit(0);}
void no() {cout<<"NO"<<en; exit(0);}
inline int rund() {int x576363482791fuweh=rng();return abs(x576363482791fuweh)%RAND_MAX;}
template<class T>
void prVec(vector<T> w,bool fl=false)
{
	cout<<w.size()<<en;
	for (int i=0;i<int(w.size())-1;++i) cout<<w[i]<<' ';
	if (w.size()) cout<<w[w.size()-1]<<en;
	if (fl) cout<<flush;
}

void M998()
{
	swap(MOD,MOD2);
}

ll raand()
{
	ll a=rund();
	a*=RAND_MAX;
	a+=rund();
    return a;
}

#define rand raand

ll raaand()
{
	return raand()*(MOD-7)+raand();
}

string to_upper(string a)
{
	for (int i=0;i<(int)a.size();++i) if (a[i]>='a' && a[i]<='z') a[i]-='a'-'A';
	return a;
}

string to_lower(string a)
{
	for (int i=0;i<(int)a.size();++i) if (a[i]>='A' && a[i]<='Z') a[i]+='a'-'A';
	return a;
}

ll sti(string a,int base=10)
{
	ll k=0;
	for (int i=0;i<(int)a.size();++i)
	{
		k*=base;
		k+=a[i]-'0';
	}
	return k;
}

template<class T>
void eras(vector<T>& a,T b)
{
	a.erase(find(a.begin(),a.end(),b));
}

string its(ll k,int base=10)
{
	if (k==0) return "0";
	string a;
	while (k)
	{
		a.push_back((k%base)+'0');
		k/=base;
	}
	reverse(a.begin(),a.end());
	return a;
}

ll min(ll a,int b)
{
	if (a<b) return a;
	return b;
}

ll min(int a,ll b)
{
	if (a<b) return a;
	return b;
}

ll max(ll a,int b)
{
	if (a>b) return a;
	return b;
}

ll max(int a,ll b)
{
	if (a>b) return a;
	return b;
}

ll gcd(ll a,ll b)
{
	if (b==0) return a;
	return gcd(b,a%b);
}

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

template<class T,class K>
pair<T,K> mp(T a,K b)
{
	return make_pair(a,b);
}

inline int mult(ll a,ll b)
{
	return (a*b)%MOD;
}

inline int pot(int n,int k)
{
	if (k==0) return 1;
	ll a=pot(n,k/2);
	a=mult(a,a);
	if (k%2) return mult(a,n);
	else return a;
}

int divide(int a,int b)
{
	return mult(a,pot(b,MOD-2));
}

inline int sub(int a,int b)
{
	if (a-b>=0) return a-b;
	return a-b+MOD;
}

inline int add(int a,int b)
{
	if (a+b>=MOD) return a+b-MOD;
	return a+b;
}

bool prime(ll a)
{
	if (a==1) return 0;
	for (int i=2;i<=round(sqrt(a));++i)
	{
		if (a%i==0) return 0;
	}
	return 1;
}

const int N=300010;
string a,b,c;
int d,e;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	for (int i=0;i<10;++i) bases.push_back(rand()%(MOD-13893829*2)+13893829);
	cin>>a>>b>>d>>e>>c;
	if (c==a) --d;
	else --e;
	cout<<d<<' '<<e;
}





Measured memory_bytes: 256
N = int(input())
list_ = []

## 配列を取得
for n in range(2):
  list_.append(list(map(int, input().split())))


## 全探索
ans = 0
for n in range(N):
  _ = sum(list_[0][:n+1])
  _ += sum(list_[1][n:])
  ans = max(ans,_)

print(ans)

Measured memory_bytes: 3060
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])

    return arr
n = int(input())

L = []
L = factorization(n)
c = 0
#print(L)
if L[0][0] != 1:
    for i in range(len(L)):
        a = 1
        while L[i][1]>=a:
            L[i][1] = L[i][1]-a
            a += 1
            c += 1

print(c)



Measured memory_bytes: 9368
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  int ans=0;
  if(a>1)
  {ans=ans+(a*(a-1))/2;}
  if(b>1)
  {ans=ans+(b*(b-1))/2;}
  cout<<ans;
}

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

int main(){
  int a ,b ,c ,d ,e ,f;
  cin >> a >> b >> c >> d >> e >> f;
  double co = 0.0;
  int wa, su;
  rep(ia, f/(100*a)+1) {
    rep(ib, f/(100*b)+1){
      int w = 100*a*ia + 100*b*ib;
      if(w){
        rep(ic, f/c){
          if(w+c*ic <= f && c*ic <= w/100*e){
            int id = min((w/100*e-c*ic)/d , (f-w-c*ic)/d);
            int s = c*ic + d*id;
            double m = (double)s/(double)(s+w);
            if(m >= co){
              co = m;
              wa = w + s;
              su = s;
            }
          }
        }
      }
    }
  }
  cout << wa << " " << su << endl;
  return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
#define maxn 200010
#define mod 2019
#define LL long long
char s[maxn];
int cnt[mod];
LL ans;
int main()
{
    int n,i,x,y;
    scanf("%s",s+1);
    n=strlen(s+1),y=1,x=0;
    for(i=n; i>=1; i--)
    {
        x=(x+(s[i]-'0')*y)%mod;
        y=y*10%mod;
        cnt[x]++;
    }
    for(i=1; i<2019; i++)
        if(cnt[i]>1)
            ans+=(LL)(cnt[i]-1+1)*(cnt[i]-1)/2;
    ans+=(LL)cnt[0]*(cnt[0]+1)/2;//特殊余数处理
    printf("%lld\n",ans);
    return 0;
}

Measured memory_bytes: 1896
/* https://betrue12.hateblo.jp/entry/2019/03/17/011847 */
#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for (ll (i) = 0 ; (i) < (ll)(n) ; ++(i))
#define REPN(i, m, n) for (ll (i) = m ; (i) < (ll)(n) ; ++(i))
#define REP_REV(i, n) for (ll (i) = (ll)(n) - 1 ; (i) >= 0 ; --(i))
#define REPN_REV(i, m, n) for (ll (i) = (ll)(n) - 1 ; (i) >= m ; --(i))

#define INF             2e9
#define INF_LL          1LL<<60
#define ll              long long
#define Ceil(x, n)      (((((x))+((n)-1))/n))
#define CeilN(x, n)     (((((x))+((n)-1))/n)*n)
#define FloorN(x, n)    ((x)-(x)%(n))
#define ALL(x)          (x).begin(),(x).end()
typedef pair<ll, ll>    P;

struct modint{
    using i64=int_fast64_t;
    i64 a;
    static constexpr i64 MOD=1000000007;
    modint(){a=0;}
    modint(i64 a_){
        a=a_%MOD;
        if(a<0) a+=MOD;
    }
    modint inv()const{
        i64 n=1,m=MOD-2,A=a;
        while(m){
            if(m&1)(n*=A)%=MOD;
            (A*=A)%=MOD;
            m>>=1;
        }
        modint y(n);
        return y;
    }
    bool operator==(const modint& x){
        return a==x.a;
    }
    bool operator!=(const modint& x){
        return a!=x.a;
    }
    modint& operator=(const modint& x){
        a=x.a;
        return *this;
    }
    modint operator+(const modint& x){
        modint y;
        y.a=a+x.a;
        if(y.a>MOD) y.a-=MOD;
        return y;
    }
    modint operator-(const modint& x){
        modint y;
        y.a=a-x.a;
        if(y.a<0) y.a+=MOD;
        return y;
    }
    modint operator*(const modint& x){
        modint y;
        y.a=(a*x.a)%MOD;
        return y;
    }
    modint operator/(const modint& x){
        modint y;
        y.a=(a*x.inv().a)%MOD;
        return y;
    }
    modint& operator+=(const modint& x){
        a+=x.a;
        if(a>=MOD) a-=MOD;
        return *this;
    }
    modint& operator-=(const modint& x){
        a-=x.a;
        if(a<0) a+=MOD;
        return *this;
    }
    modint& operator*=(const modint& x){
        (a*=x.a)%=MOD;
        return *this;
    }
    modint& operator/=(const modint& x){
        (a*=x.inv().a)%=MOD;
        return *this;
    }
};
istream& operator>>(istream &in,modint& x){
    int_fast64_t a_;
    in>>a_;
    modint y(a_);
    x=y;
    return in;
}
ostream& operator<<(ostream &out,const modint& x){
    out<<x.a;
    return out;
}
modint pwr(int_fast64_t a,int_fast64_t b){
    modint _;
    int_fast64_t n=1,A=a;
    while(b){
        if(b&1) (n*=A)%=modint::MOD;
        (A*=A)%=modint::MOD;
        b>>=1;
    }
    _.a=n;
    return _;
}

int main() {
    ll n;
    cin >> n;
    vector<int> c(n);
    REP(i, n) cin >> c[i];

    vector<modint> dp(n+1, 0);
    dp[0] = 1;  /* なにも石がない */
    vector<int> left_stone(200005, -1);

    REP(i, n) {
        dp[i+1] += dp[i];
        int miru = c[i];
        if(left_stone[miru] >= 0 && left_stone[miru] < i-1) {
            dp[i+1] += dp[left_stone[miru] + 1];
        }
        left_stone[miru] = i;
    }

    cout << dp[n] << endl;


    
    
    return 0;
}

Measured memory_bytes: 3328
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		
		out.println(Math.min(Math.min(P+Q, Q+R), R+P));
		
		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

}


Measured memory_bytes: 21716
#include <bits/stdc++.h>
#define rep(i,n) for (long long i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
const ll MOD = 1000000007;
const ll INF = 10000000000000;
#define all(v) v.begin(), v.end()

int main(){
  ll N,ans=0;
  cin >> N;
  vector<ll> A(N);
  rep(i,N){
    cin >> A.at(i);
  }
  rep(i,N){
    ans+=A.at(i)/2;
    if(i!=N-1&&A.at(i+1)>0&&A.at(i)%2==1){
      A.at(i+1)--;
      ans++;
    }
  }
  cout << ans << endl;
    
}

Measured memory_bytes: 4048
#include <cassert>
#include <cmath>
#include <iostream>
#include <queue>
#include <string>
#include <sstream>
#include <vector>
 
using namespace std;
 
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N;
  cin >> N;

  int H[N];
  for (auto i = 0; i < N; i++) {
    cin >> H[i];
  }

  auto goodi = 0;
  auto maxCnt = 0;
  auto i = 0;
  while (i < N) {
    auto cnt = 0;
    for (auto oi = i + 1; oi < N; oi++) {
      auto h = H[i + cnt];
      auto oh = H[oi];
      if (h < oh) {
        break;
      }
      cnt++;
    }

    if (cnt > maxCnt) {
      goodi = i;
      maxCnt = cnt;
    }
    i += cnt + 1;
  }

  cout << maxCnt << endl;

  return 0;
}


Measured memory_bytes: 640
//#include <cstdio>
#include <iostream>

#include <cstring>

#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
//#include <queue>
//#include <stack>
#include <cassert>

using namespace std;

#define SZ(a) int((a).size())
#define REP(i,n) for(int i=0,_n=(n);i<_n;++i)
#define FOR(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)

#define DEBUG(x) cerr << #x << ": " << x << endl

typedef long long llong;
typedef vector<int> VI;
typedef vector<VI> VVI;

typedef vector<llong> VL;
typedef vector<VL> VVL;

const int MOD = 1e9 + 7;

int main(int argc, char* argv[]) {
   ios_base::sync_with_stdio(false); 
   cin.tie(nullptr);

   int N, M;
   cin >> N >> M;

   VI S(N+1);
   FOR(i, 1, N)
      cin >> S[i];
   VI T(M+1);
   FOR(j, 1, M)
      cin >> T[j];

   // DP[i][j] = number of common subsequences of S[1..i] and T[1..j] where
   //            subsquence must include S[i] and T[j]
   VVI DP(N+1, VI(M+1, 0));
   DP[0][0] = 1;

   VVL DP_sum(N+1, VL(M+1, 0));
   DP_sum[0][0] = 1;
   FOR(j, 1, M)
      DP_sum[0][j] = 1;
   FOR(i, 1, N)
      DP_sum[i][0] = 1;

   FOR(i, 1, N) {
      FOR(j, 1, M) {
         if (S[i] == T[j]) {
            DP[i][j] = DP_sum[i-1][j-1] % MOD;
         }
         else {
            DP[i][j] = 0;
         }
         DP_sum[i][j] = (DP_sum[i][j-1] + DP_sum[i-1][j] - DP_sum[i-1][j-1] +
                         DP[i][j]) % MOD;
         if (DP_sum[i][j] < 0)
            DP_sum[i][j] += MOD;
      }
   }

   /*
   FOR(i, 0, N) {
      FOR(j, 0, M) {
         cerr << DP[i][j] << ' ';
      }
      cerr << endl;
   }

   cerr << endl;
   FOR(i, 0, N) {
      FOR(j, 0, M) {
         cerr << DP_sum[i][j] << ' ';
      }
      cerr << endl;
   }
   */

   cout << DP_sum[N][M] << '\n';

   return 0;
}


Measured memory_bytes: 47360
#include <iostream>
#include <cstdio>

//#define PI 3.141592653589

using namespace std;



int main()
{
	int n, a, min=1000000, max=-1000000;
	long sum=0;
	
	cin >> n;
	for (int i=0; i<n; i++)
	{
		cin >> a;
		if (a < min) min = a;
		if (a > max) max = a;
		sum += a;
	}
	cout << min << " " << max << " " << sum << endl;
	
	return 0;
}

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

int main(){
	int N, sum = 0, max = 0;
	cin >> N;
	int L[N];
	for(int i = 0; i < N; i++){
		cin >> L[i];
	}
	for(int i = 0; i < N; i++){
		sum += L[i];
		if(max <= L[i]) max = L[i];
	}
	if(max < sum - max){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
	return 0;
}


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

#define inf 0x3f3f3f3f

using namespace std;

int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
char ma[105][105];
int h, w, vis[105][105];

void dfs(int x, int y, char c)
{
    int i, xx, yy;

    for(i = 0; i < 4; i++)
    {
        xx = x + dx[i];
        yy = y + dy[i];
        
        if(xx >= 0 && xx < h && yy >= 0 && yy < w && !vis[xx][yy] && ma[xx][yy] == c)
        {
            vis[xx][yy] = 1;
            dfs(xx, yy, c);
        }
    }
}

int main()
{
    int i, j, ans;

    while(scanf("%d%d", &h, &w) && (h || w))
    {
        getchar();

        for(i = 0; i < h; i++) scanf("%s", ma[i]);
        memset(vis, 0, sizeof vis);
        ans = 0;

        for(i = 0; i < h; i++)
        {
            for(j = 0; j < w; j++)
            {
                if(!vis[i][j])
                {
                    ans++;
                    dfs(i, j, ma[i][j]);
                }
            }
        }
        printf("%d\n", ans);
    }

    return 0;
}

Measured memory_bytes: 1720
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
#include <stack>
#include <set>
#include <deque>

using namespace std;
typedef long long ll;
ll mod = 1e9+7;
#define rep(i,n) for(int i = 0; i < (n); ++i)

int main(){
    ll x, t;
    cin >> x >> t;
    cout << max(0LL, x-t) << endl;
}


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

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

  int sum = 0;
  for (int i = 0; i < n; i++) {
      cin >> x;
      sum += min(x*2,(k-x)*2);
  }

  cout << sum << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define repf(i,n) for(int i=0;i<=n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
#define eachdo(e,array) for(const auto& e : array)
#define all(v) (v).begin(), (v).end()
#define lower_index(v, a) (int)distance(v.begin(), lower_bound((v).begin(), (v).end(), a))
#define upper_index(v, a) (int)distance(v.begin(), upper_bound((v).begin(), (v).end(), a))
template<class T> bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
typedef long long ll;
const int inf = 1<<28;
const ll INF = 1LL<<57;
const ll COMBMAX = 500005;
const ll MOD = 1e9+7;

struct mint {
ll x; // typedef long long ll;
    mint(ll x=0):x((x%MOD+MOD)%MOD){}
    mint& operator+=(const mint a) {
        if ((x += a.x) >= MOD) x -= MOD;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += MOD-a.x) >= MOD) x -= MOD;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= MOD;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res+=a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res-=a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res*=a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t>>1);
		a *= a;
		if (t&1) a *= *this;
		return a;
	}

	// for prime MOD
	mint inv() const {
		return pow(MOD-2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res/=a;
	}
};

struct combination {
    vector<mint> fact, ifact;
    combination(int n):fact(n+1),ifact(n+1) {
        assert(n < MOD);
    	fact[0] = 1;
    	for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    	ifact[n] = fact[n].inv();
		for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
	}
	mint operator()(int n, int k) {
		if (k < 0 || k > n) return 0;
        if (COMBMAX < n){
            mint ret = 1;
            rep1(i,k){
                ret *= (n-i+1);
                ret /= i;
            }
            return ret;
        }
		return fact[n]*ifact[k]*ifact[n-k];
	}
} com(COMBMAX);

int main(){
    ll N,K; cin >> N >> K;
    mint ans = 0;
    repf(i,min(K,N-1)){
        mint temp = com(N-1,i);
        temp *= com(N,i);
        ans += temp;
    }
    cout << ans.x << endl;
    return 0;

}

Measured memory_bytes: 8064
n,m=map(int,input().split())
l_min=0
r_min=n+1
for i in range(m):
    l_b,r_b=map(int,input().split())
    if l_min<l_b:
        l_min=l_b
    if r_min>r_b:
        r_min=r_b
    #print(l_min,r_min)
k=r_min-l_min+1
print(k if k>0 else 0)

Measured memory_bytes: 3060
import string

count = {x: 0 for x in string.ascii_lowercase}
lines = ''

while 1:
    try:
        lines += input().lower()
    except EOFError:
        break

for c in lines:
    if 'a' <= c <= 'z':
        count[c] += 1

for key in string.ascii_lowercase:
    print("{0} : {1}".format(key, count[key]))

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





long solve(long long N, vector<long long> a){
    long long count = 0;
    for (int i = 0; i < N; i++) {
        while (a[i] % 2 == 0) {
            a[i] /= 2;
            count++;
        }
    }
    return count;
}

int main(){
    long long N;
    scanf("%lld",&N);
    vector<long long> a(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&a[i]);
    }
    cout << solve(N, a) << endl;
    return 0;
}


Measured memory_bytes: 384
function main()
	N=parse(Int,readline())
	X=Pair{String,Int}[]
	for _=1:N
		s,t=split(readline())
		push!(X,String(s)=>parse(Int,t))
	end
	reverse!(X)
	x=chomp(readline())
	sum=0
	for (s,t)=X
		if s==x
			break
		end
		sum+=t
	end
	println(sum)
end
main()


Measured memory_bytes: 109644
N = gets.chomp.to_i
P = gets.chomp.split(" ").map(&:to_i)

cnt = 0
0.upto(N-1) do |i|
  cnt += 1 if P[i] != i + 1
end

if cnt.zero? || cnt == 2
  puts "YES"
else
  puts "NO"
end


Measured memory_bytes: 1788
#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <string>
#include <bitset>
#include <utility>
#include <numeric>
#include <queue>
#include <stack>

using ll = long long;
using namespace std;

constexpr int MOD = 1e9 + 7;
constexpr ll MOD_LL = ll(1e9) + 7;

int main(void) {
	ll a, b, c;
	cin >> a >> b >> c;
	
	vector<ll> L = {a, b, c};
	sort(L.begin(), L.end());
	
	if( L[2] % 2 == 0 ) cout << 0 << endl;
	else cout << L[0] * L[1] << endl;

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ll long long
using namespace std;
int main()
{
    int n,m;
    cin >> n >> m;
    vector<int> list(m);
    rep(i,n){
        int k;
        cin >> k;
        rep(j,k){
            int a;
            cin >> a;
            a--;
            list[a]++;
        }
    }
    int cnt = 0;
    rep(i,m){
        if(list[i]==n)
            cnt++;
    }
    cout << cnt << endl;
}

Measured memory_bytes: 256
N,X=map(int,input().split())
L_list=(input().split())
Bound_list=[0]
for i in range(1,N+1):
  count=int(L_list[i-1])+int(Bound_list[i-1])
  Bound_list.append(count)
Answer_list=list(filter(lambda n:n<=X,Bound_list))
print(len(Answer_list))

Measured memory_bytes: 3060
def dfs(rel,node,level)
    n = 0
    c = rel[n]
    while c.size > 0
        n = c.shift
        print "." * level[n]
        puts node[n]
        next if !rel[n]
        c = rel[n] + c
    end
end
n = gets.to_i
node = Array.new
level = Array.new(n,-1)
child = Array.new(n).map{Array.new}
n.times do |i|
    k = gets.to_i
    m = gets.chomp
    node[i+1] = m
    level[i+1] = level[k] + 1
    child[k].push(i+1)
end
dfs(child,node,level)

Measured memory_bytes: 7216
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb emplace_back
#define x first
#define y second
#define sz(a) ((int)(a).size())
#define rep(i,a,b) for(auto i=(a); i<(b); i++)
#define dec(i,n,a) for(auto i=(n); i>=(a); i--)
#define clr(a,v) memset(a, v, sizeof(a))
#define all(a) (a).begin(),(a).end()
#define EPS 5e-9
#define fcin ios_base::sync_with_stdio(false)
#define db(x) cerr << #x << " == " << x << endl
#define _ << " " <<
#define MAXN 202020
#define LOGN 18
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef vector<int> vi;

int n, pd[2][111], vet[2][111];

int solve(int i, int j){
	if(i > 1 || j > n-1) return -1e9;
	if(i==1 && j==n-1) return vet[i][j];
	int & ret = pd[i][j];
	if(ret != -1) return ret;
	ret = max(solve(i,j+1),solve(i+1,j)) + vet[i][j];
	return ret;
}

int main(){
	clr(pd,-1);
	scanf("%d", &n);
	rep(i,0,2) rep(j,0,n) scanf("%d", &vet[i][j]);
	printf("%d\n", solve(0,0));
}


Measured memory_bytes: 256
#include<iostream>
#include<complex>
using namespace std;
#define dff 1e-10
int main(){
  int n;
  cin >>n;
  while(n--){
    double x;
    complex<double> a[4];
    for(int i=0; i<4; i++) cin >>a[i].real()>>a[i].imag();
    for(int i=0; i<2; i++) a[i*2]-=a[i*2+1];
    x = a[0].real()*a[2].imag()-a[0].imag()*a[2].real();
    if(-dff<x && x<dff) cout <<"YES"<<endl;
    else cout <<"NO"<<endl;
  }
  return 0;
}

Measured memory_bytes: 1224
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define F first
#define S second
#define N 1000002
#define mod 1000000007
#define pb push_back
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
const int mxN = 1e5 +5;
int n,m;
vector<int> g[mxN];
int id[mxN];
int vis[mxN];
int in[mxN];
void dfs(int u,int pt){
	vis[u] = 1;
	for(auto it : g[u]){
		if(!vis[it])
			dfs(it,u);
		id[u] = max(id[u],1 + id[it]);	
		
	}
}
void solve(){
	cin>>n>>m;
	for(int i =0;i<n;i++)
		id[i] = vis[i] = 0;
	for(int i =0;i<m;i++){
		int x,y;
		cin>>x>>y;
		x--;
		y--;
		in[y]++;
		g[x].pb(y);
	}
	
	for(int i = 0;i<n;i++){
		if(!vis[i] && in[i]==0){	
			dfs(i,-1);
		}
	}
	int ans = 0;
	for(int i  = 0;i <n; i++){
		// cout<<id[i]<<' ';
		ans = max(ans,id[i]);
	}
	cout<<ans<<"\n";
}
int main() {	
	// IOS
	ll T;
	// cin>>T;
	
	T = 1;
	// ll i = 1;
	while(T--){
		// cout<<"Case #"<<i<<": ";
		
		solve();
		// i++;
	}
	return 0;
	
}

Measured memory_bytes: 18096
#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(),v.end()
#define INF INT_MAX;
typedef long long ll;
using namespace std;

int main(){
  string s; cin >> s;
  int ans =0,cont=0;
  rep(i,s.size()){
    char c = s.at(i);
    if(c=='A'||c=='C'||c=='G'||c=='T'){
      cont++;
    }else{
      cont=0;
    }
    ans=max(ans,cont);
  }
  cout << ans << endl;
}


Measured memory_bytes: 256
#include <vector>
#include <limits>
#include <algorithm>
using namespace std;

template <typename T>
struct edge{
    int from;
    int to;
    T weight;
};

template <typename T>
vector<T> bellman_ford(int V, const vector<edge<T>> &E, int source) {
    const T INF = numeric_limits<T>::max();
    vector<T> dist(V, INF);
    dist[source] = 0;

    // relax
    for(int i = 1; i < V; ++i) {
        for(edge<T> e : E) {
            if(dist[e.from] == INF) continue;
            dist[e.to] = min(dist[e.to], dist[e.from] + e.weight);
        }
    }

    // negative-weight cycle check
    for(edge<T> e : E) {
        if(dist[e.from] == INF) continue;
        if(dist[e.to] > dist[e.from] + e.weight) return vector<T>();
    }

    return dist;
}

#include <iostream>
int main() {
    int V, E, r;
    cin >> V >> E >> r;
    vector<edge<int>> edgelist(E);
    for(int i=0; i<E; ++i) {
        int s, t, d;
        cin >> s >> t >> d;
        edgelist[i] = {s, t, d};
    }

    auto dist = bellman_ford<int>(V, edgelist, r);
    if(dist.size() == 0) {
        cout << "NEGATIVE CYCLE" << endl;
    } else {
        for(int i=0; i<V; ++i) {
            int d = dist[i];
            if(d == numeric_limits<int>::max()) cout << "INF" << endl;
            else cout << d << endl;
        }
    }
}


Measured memory_bytes: 3108
#include <iostream>
#include <stdio.h>
using namespace std;


void solve(long long R){

    
    cout << 2.0*3.1415*float(R) << 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(){
    long long R;
    scanf("%lld",&R);
    solve(R);
    return 0;
}


Measured memory_bytes: 3836
#include <bits/stdc++.h>
#define ll long long
#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define sorta(V) sort(V.begin(), V.end())
#define pback push_back
#define mpair make_pair
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end() 

using namespace std;

int main(){

    int n;
    ll k;
    cin >> n >> k;

    vector<pair<int,int>> v;

    rep(i,n){
        int a,b;
        cin >> a >> b;

        v.pback(mpair(a,b));
    }

    sort(ALL(v));

    int ans;

    rep(i,n){
        ans = v[i].first;
        k = k - v[i].second;

        if(k <= 0) break;
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 1400
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <limits.h>
#include <math.h>
#include <functional>

#define repeat(i,n) for (long long i = 0; (i) < (n); ++ (i))
#define debug(x) cerr << #x << ": " << x << '\n'
#define debugArray(x,n) for(long long i = 0; (i) < (n); ++ (i)) cerr << #x << "[" << i << "]: " << x[i] << '\n'

using namespace std;

typedef long long ll;
typedef pair<int,int> Pii;
typedef vector<int> vint;
typedef vector<ll> vll;
const ll INF = LLONG_MAX;
const ll MOD = 998244353;

int main() {
  int H,W;cin >> H >> W;
  string S[H];
  repeat(i,H){
    cin >> S[i];
  }
  vector<string> ans(H,"!!!");
  vector<bool> used(H,false);
  int idx=0;
  repeat(i,H){
    if(used[i])continue;
    used[i] = true;
    bool pairexist=false;
    repeat(j,H){
      if(used[j])continue;
      pair<char,char> p[W];
      repeat(k,W){
        p[k].first = S[i][k];
        p[k].second = S[j][k];
      }
      sort(p,p+W);
      string a;
      repeat(k,W){
        a += p[k].second;
      }
      repeat(k,W){
        swap(p[k].first,p[k].second);
      }
      sort(p,p+W);
      bool isok=true;
      repeat(k,W){
        isok &= a[k]==p[k].second;
      }
      if(isok){
        ans[idx] = S[i];
        ans[H-1-idx] = S[j];
        idx++;
        used[j] = true;
        j=H;
        pairexist = true;
      }
    }
    if(!pairexist){
      if(H&1){
        ans[H/2] = S[i];
      }
    }
  }
  if(idx < H/2){
    cout << "NO" << endl;
    return 0;
  }
  vector<string> anst(W,string(H,'!'));
  repeat(i,H){
    repeat(j,W){
      anst[j][i]=ans[i][j];
    }
  }
  used.assign(W,false);
  idx = 0;
  bool yes=true;
  bool single=false;
  repeat(i,W){
    if(used[i]) continue;
    used[i] = true;
    bool pairexist=false;
    repeat(j,W){
      if(used[j]) continue;
      string b = anst[j];
      reverse(b.begin(),b.end());
      if(anst[i] == b){
        pairexist = true;
        used[j] = true;
        j=W;
      }
    }
    if(!pairexist && W&1 && !single){
      string b = anst[i];
      reverse(b.begin(),b.end());
      if(anst[i] == b){
        single = true;
        yes &= true;
      }
    }else{
      yes &= pairexist;
    }
  }
  cout << (yes? "YES":"NO") << endl;
  return 0;
}


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

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

using ll=long long;
using ull=unsigned long long;
using ld=long double;
using pii = std::pair<int, int>;
#define x first
#define y second

template<typename T>
static inline T gcd(T a, T b) {
    a = std::abs(a);
    b = std::abs(b);
    while (b > 0) {
        a %= b;
        std::swap(a, b);
    }
    return a;
}

template<typename T>
static inline T lcm(T a, T b) {
    return a / gcd(a, b) * b;
}

template<typename T>
static inline T sqr(T a) {
    return a * a;
}

template<typename T>
static inline bool remin(T &a, const T &val) {
    if (a > val) {
        a = val;
        return true;
    }
    return false;
}

template<typename T>
static inline bool remax(T &a, const T &val) {
    if (a < val) {
        a = val;
        return true;
    }
    return false;
}

static inline ll nxt() {
    int64_t x;
    scanf("%" PRId64, &x);
    return x;
}

static inline void skipEndLine() {
    char c = getchar();
    while (c != '\n') {
        c = getchar();
    }
}

static inline std::string nxtLine() {
    std::string ret;
    char c = '\n';
    while (true) {
        c = getchar();
        if (c == '\n' || c == '\r' || c == -1) {
            break;
        }
        ret.push_back(c);
    }
    return ret;
}

static inline std::string nxtString() {
    std::string ret;
    char c = '\n';
    while (true) {
        c = getchar();
        if (!isspace(c)) {
            break;
        }
    }
    if (c == -1) {
        return ret;
    }
    ret.push_back(c);
    while (true) {
        c = getchar();
        if (isspace(c) || c == -1) {
            break;
        }
        ret.push_back(c);
    }
    return ret;
}

static std::chrono::system_clock::time_point clock_t0;

static inline void init_time() {
    clock_t0 = std::chrono::system_clock::now();
}

static inline double get_time() {
    auto t = std::chrono::system_clock::now();
    return std::chrono::duration<double>((t - clock_t0)).count();
}

static inline void print_time(const std::string &name) {
    std::cerr << name << " " << get_time() << "s." << std::endl;
}

template <class T>
static inline T pw(T a, ll n) {
    T ret = T(1);
    while (n > 0) {
        if (n & 1) ret = ret * a;
        a = a * a;
        n >>= 1;
    }
    return ret;
}

static inline ll pw(ll a, ll n, ll m) {
//    if (a == 0) return 0;
    a %= m;
    ll ret = 1;
    while (n > 0) {
        if (n & 1) ret = ret * a % m;
        a = a * a % m;
        n >>= 1;
    }
    return ret;
}

static const ld PI = acosl(-1.0);
static std::mt19937_64 generator{123123};

using namespace std;

void prepare() {

}

void solve(int test) {
    int r = nxt();
    cout << setprecision(10) << fixed << 2 * PI * r << endl;
}

int main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    init_time();

    prepare();
    int t = 1;
    // t = nxt();
//    cin >> t;
    for (int i = 0; i < t; ++i) {
        solve(i + 1);
    }

    print_time("Time:");
    return 0;
}


Measured memory_bytes: 3904
#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define int long long
#ifndef FAST_IO
  #define IOS ios_base::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
#endif
#define ff first
#define ss second
#define endl "\n"
#define all(c) c.begin(),c.end()
template<typename T>void print(T t){for(auto &it:t)cout<<it<<" "; cout<<endl;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int MAXN=1e5+11;
int pref[MAXN];
void solve(){
	int n,q;
	string s;
	cin>>n>>q>>s;
	pref[0]=0;
    for(int i=1;i<n;i++){
	    if(s[i-1]=='A' and s[i]=='C')
	      pref[i]=pref[i-1]+1;
	    else pref[i]=pref[i-1];
	 }	
	for(int i=0;i<q;i++){
	  int l,r;
	  cin>>l>>r;
	  l--,r--;
	  int ans=pref[r]-pref[l];	
	  cout<<ans<<endl;
	}
}
int32_t main(){
   IOS;
   solve();
   //debug();
  #ifdef LOCAL_DEFINE
   cerr<<"time elapsed "<<(double)clock()/CLOCKS_PER_SEC<<endl;
  #endif	
}

Measured memory_bytes: 1872