akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pair<int, int> > vpii;
typedef vector<pair<ll, ll> > vpll;

#define pll pair<ll,ll>
#define pii pair<int, int>
#define all(x) x.begin(), x.end()
#define F first
#define S second
#define rep(i,n) for (int i = 0; i < n; ++i) 
#define REP(i,k,n) for (int i = k; i <= n; ++i) 
#define REPR(i,k,n) for (int i = k; i >= n; --i)
#define pb push_back
#define watch(x) cout << (#x) << " is " << (x) << endl
#define sz(a) int((a).size())
#define endl '\n' // remove for interactive

const int INF = 1e9;
const ll mod = 1e9 + 7;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}



void solve()
{
    ll a, b, c, d; cin>>a>>b>>c>>d;
    bool flag0 = 0;
    if(a <= 0 && b >= 0) flag0 = 1;
    if(c <= 0 && d >= 0) flag0 = 1;
    ll mn = -2e18;
    if(flag0) mn = 0;
    mn = max({a*c, a*d, b*c, b*d});
    cout<<mn;
    
}

int main()
{
    // clock_t start, end;
    // start = clock();
    ios_base::sync_with_stdio(0); //cant use scanf, printf
    cin.tie(0);cout.tie(0); // no longer auto flush cout before each cin, remove for interactive
    int t = 1;
    // cin>>t;
    REP(i, 1, t)
    {
        solve();
        
    }
    // end = clock();
    // double time_taken = double(end - start) / double(CLOCKS_PER_SEC); 
    // watch(time_taken);
    ll x = INF; x++;
    return 0;
    
}



/*before sub
TEST: 0(1 by 1 too), 1, equal, -ve, bounds(random and ez)
ERR/WA: loop vars, out of bounds, endl, finish taking inputs, large doubles, larger INF, corr mod, t, early/late mod
RE: double dec, integer overflow(ll or 1LL mult)
*/





Measured memory_bytes: 3648
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
#define MAX 100000
void inarray(int a[], int n){
    for(int i = 0; i < n; i++) cin >> a[i];
}

int main(){
    double r; cin >> r;
    printf("%.6f\n", 2*M_PI*r);
    return 0;
}

Measured memory_bytes: 3724
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG //これつけるとA[N]でもいいらしい
//for文のマクロ
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define big 1000000007
int main(){
  string s,t;
  cin >> s >> t;
  cout <<t <<s;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string alp = "abcdefghijklmnopqrstuvwxyz";
void Yes() {cout << "Yes" << endl;}
void No() {cout << "No" << endl;}
void YES() {cout << "YES" << endl;}
void NO() {cout << "NO" << endl;}
void neg() {cout << -1 << endl;}

int main() {
  ll n, k, s;
  cin >> n >> k >> s;
  vector<ll> a(0);
  for (int i = 0; i < k; i++) a.push_back(s);
  if (s == 1000000000) for (int i = 0; i < n - k; i++) a.push_back(1);
  else for (int i = 0; i < n - k; i++) a.push_back(s + 1);
  for (int i = 0; i < n - 1; i++) cout << a.at(i) << " ";
  cout << a.at(n - 1) << endl;
}

Measured memory_bytes: 2164
#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <utility>
#include <cstdlib>
#include <queue>
#include <stack>
#include <iomanip>
#include <cstdio>
#include <map>
#include <list>

using namespace std;

typedef long long Int;
typedef pair<Int,Int> P;

#define rep(i,x) for(Int i = 0; i < (Int)(x); i++)
#define rrep(i,x) for(Int i = ((Int)(x) - 1); i >= 0; i--)
#define _upgrade ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define pb push_back


template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

//ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
//ll lcm(ll x, ll y) {return x / gcd(x, y) * y;}

Int dx[4] = {1,0,-1,0};
Int dy[4] = {0,1,0,-1};
const Int INF = 1001002003004005006ll;
const Int mod = 1e9 + 7;
const double PI = 3.14159265358979323846;


// ****************************************CODE***************************************//








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

        Int sum[200010];
        sum[0] = 0;
        Int allsum = 0;

        //累積和作る
        for(int i = 1; i <= n; i++){
                Int a;
                cin >> a;

                //ついでにすべての和も作る
                allsum += a;
                sum[i] = sum[i-1] + a;
        } 

        //答えを求める
        Int ans = INF;
        for(int i = 0; i < n-1; i++)
        {
                //ある場所までの和を求めて
                Int tmp = sum[i+1] - sum[0];
                //すべての和から引くことでその場所の和が求まる
                Int tmp2 = allsum - tmp;


                //その差の絶対値を小さかったら更新する
                Int minval = abs(tmp-tmp2);
                ans = min(minval, ans);
        }

        cout << ans << endl;
        return 0;
}




















Measured memory_bytes: 1792
#[allow(unused_imports)]
use std::cmp;

fn run() {
    let (r, w) = (std::io::stdin(), std::io::stdout());
    let mut sc = IO::new(r.lock(), w.lock());

    let n: usize = sc.read();
    let a = sc.read_vec::<usize>(n);

    let mut total = 0;
    for &a in a.iter() {
        total ^= a;
    }

    for a in a.into_iter() {
        let ans = total ^ a;
        print!("{} ", ans);
    }
    println!("");
}

fn main() {
    std::thread::Builder::new()
        .name("run".into())
        .stack_size(256 * 1024 * 1024)
        .spawn(run)
        .unwrap()
        .join()
        .unwrap();
}

pub struct IO<R, W: std::io::Write>(R, std::io::BufWriter<W>);

impl<R: std::io::Read, W: std::io::Write> IO<R, W> {
    pub fn new(r: R, w: W) -> IO<R, W> {
        IO(r, std::io::BufWriter::new(w))
    }
    pub fn write<S: std::ops::Deref<Target = str>>(&mut self, s: S) {
        use std::io::Write;
        self.1.write(s.as_bytes()).unwrap();
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn read_vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn read_pairs<T: std::str::FromStr>(&mut self, n: usize) -> Vec<(T, T)> {
        (0..n).map(|_| (self.read(), self.read())).collect()
    }
    pub fn read_pairs_1_indexed(&mut self, n: usize) -> Vec<(usize, usize)> {
        (0..n)
            .map(|_| (self.read::<usize>() - 1, self.read::<usize>() - 1))
            .collect()
    }
    pub fn read_chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    pub fn read_char_grid(&mut self, n: usize) -> Vec<Vec<char>> {
        (0..n).map(|_| self.read_chars()).collect()
    }
    pub fn read_matrix<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n)
            .map(|_| (0..m).map(|_| self.read()).collect())
            .collect()
    }
}


Measured memory_bytes: 4208
#include <iostream>
#include <math.h>
#include <ctype.h>

using namespace std;

int main() {

    int a[6];
    int pos;

    for(int i = 1; i < 6; i++) {
        cin>> a[i];
        if(a[i] == 0) {
            pos = i;
        }
    }

    cout << pos;

}



Measured memory_bytes: 3544
import sys
import os
import math
import bisect
import collections
import itertools

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, M, Q = il()
    abcd = [il() for _ in range(Q)]

    ret = 0
    for i in itertools.combinations_with_replacement(range(1, M + 1), N):
        tmp = 0
        for a, b, c, d in abcd:
            if i[b - 1] - i[a - 1] == c: tmp += d

        ret = max(ret, tmp)

    print(ret)


if __name__ == '__main__':
    main()


Measured memory_bytes: 9504
// by tmt514
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define SZ(x) ((int)(x).size())
#define FOR(it, c) for(__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
using namespace std;
typedef long long LL;

int main(void) {
  int n, k;
  cin >> n >> k;
  cout << (k<=(n+1)/2? "YES":"NO") << endl;
  return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
int a,b,c,d,p,x,y,ans;
cin >> a >> b >> c >> d >>p;
ans=min(a*p,b+(p-c)*(c<p ?d:0));
cout << ans << endl;
return 0;
}



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

int main()
{
    string today, tomorrow;

    cin >> today;

    if (today == "Sunny") {
        tomorrow = "Cloudy";
    }
    else if (today == "Cloudy") {
        tomorrow = "Rainy";
    }
    else {
        tomorrow = "Sunny";
    }
    cout << tomorrow << endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>

using namespace std;
int M[100][100]; //?????\??????
int n; //n?????¶?????°
static const int WHITE=0; //?????????????????°
static const int GRAY=1; //??°??????????????°
static const int BLACK=2; //????????????????????\
static const int INFTY=(1<<21);  //??£??¨??£??????
void dijkstra()
{
    int color[100];  //????????¶???????¢????
    int d[100]; //????????¶????????????????°?????????????????????????T??????????????????
    for(int i=0;i<n;i++)
       {
          d[i]=INFTY;  //???????§??????¶?????????????????????????????????????§?????????£??????
          color[i]=WHITE;
       }
    d[0]=0; //???????????????????????????d???0
    while(1)
    {
        int r=-1;int minv=INFTY;
        //?????°??????????°????????????\??°??????T???
        for(int i=0;i<n;i++)
        {
            if(color[i]!=BLACK&&d[i]<minv)
            {
                r=i;minv=d[i];
            }
        }
        if(r==-1) break; //?????????????????¶???-1????????´????????????????????????????????????????????????
        color[r]=BLACK; //?????????????°?????????\??????T??????????°±???????????¶??????BLACK
        //?????¶??????T????????°??????????????\?????´??°??????????????¶???
        //??´??°??¶????????¶??????????????°????????£??????????????\????????¶???????????´??°??????
        for(int i=0;i<n;i++)
        {
            if(color[i]!=BLACK&&M[r][i]!=INFTY) //?????????????????\?????????????????????
            {
                if(d[i]>M[r][i]+d[r]) //?????????????????????
                {
                    d[i]=M[r][i]+d[r];
                    color[i]=GRAY;
                }
            }
        }
    }
    for(int i=0;i<n;i++)
    {
        cout<<i<<" "<<(d[i]==INFTY?-1:d[i])<<endl;
    }
}
int main()
{
    while(cin>>n)
    {
        //????§?????????\??????
        for(int i=0;i<n;i++)
            for(int j=0;j<n;j++)
                M[i][j]=INFTY;
        int u,k,v,c;
        for(int i=0;i<n;i++)
        {
            cin>>u>>k;
            for(int j=0;j<k;j++)
            {
                cin>>v>>c;
                M[u][v]=c;
            }
        }
        dijkstra();
    }
    return 0;
}

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

int main(){
int A;
vector <char> op(3);
vector <int> vec(4);
cin>>A;
for(int i=0;i<4;i++){
vec.at(3-i)=A%10;
A/=10;
}


for(int tmp=0;tmp<(1<<3);tmp++){
int sum=vec.at(0);
 bitset<3> s(tmp);
for(int i=0;i<3;i++){
if(s.test(i)){
op.at(i)='+';
sum+=vec.at(i+1);}
else{
op.at(i)='-';
sum-=vec.at(i+1);}
}
if(sum==7){
cout<<vec.at(0)<<op.at(0)<<vec.at(1)<<op.at(1)<<vec.at(2)<<op.at(2)<<vec.at(3)<<"=7"<<endl;
break;}
}
}







Measured memory_bytes: 3608
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vll = vector<long long>;
using vp = vector<pair<int, int>>;
using vvi = vector<vector<int>>;
using vvc = vector<vector<char>>;
using vvll = vector<vector<long long>>;
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 (b<a) {a=b; return 1;} return 0;}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    ll x, a, b;
    cin >> x >> a >> b;
    if (a >= b) cout << "delicious" << endl;
    else if (b - a <= x) cout << "safe" << endl;
    else cout << "dangerous" << endl;
}

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

#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()

constexpr int mod = 1e9 + 7;
constexpr int32_t inf = 1001001001;
constexpr int64_t infll = 1001001001001001001ll;
constexpr int dx[] = {0, -1, 1, 0, -1, 1, -1, 1}, dy[] = {-1, 0, 0, 1, -1, -1, 1, 1};
const string YES = "YES", NO = "NO", Yes = "Yes", No = "No", yes = "yes", no = "no";

// clang-format off
// ostream &operator<<(ostream &os, __int128_t value) { if (ostream::sentry(os)) { __uint128_t tmp = value < 0 ? -value : value; char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[tmp % 10]; tmp /= 10; } while (tmp != 0); if (value < 0) { --d; *d = '-'; } int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
// istream &operator>>(istream &is, __int128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } if (in[0] == '-') value *= -1; return is; }
// ostream &operator<<(ostream &os, __uint128_t value) { if (ostream::sentry(os)) { char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[value % 10]; value /= 10; } while (value != 0); int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
// istream &operator>>(istream &is, __uint128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } return is; }
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { os << v[0]; for (int i = 1; i < v.size(); ++i) os << " " << v[i]; return os; }
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }
template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << p.fs << " " << p.sc; return os; }
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.fs >> p.sc; return is; }

struct IoSetup { IoSetup(){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup;

inline int64_t in() { int64_t x = 0; cin >> x; return x; }

template <typename T> void sort(vector<T> &v) { sort(all(v)); }
template <typename T> vector<T> make_v(size_t a, T b) { return vector<T>(a, b); }
template <typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v(ts...))>(a, make_v(ts...)); }
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
// clang-format on

signed main(int argc, char *argv[]) {
  int n = in();
  int a[2][100] = {};
  for (int i = 0; i < 2; ++i) {
    for (int j = 1; j <= n; ++j) {
      cin >> a[i][j];
      a[i][j] += a[i][j - 1];
    }
  }

  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    chmax(ans, a[0][i] + a[1][n] - a[1][i - 1]);
  }

  cout << ans << endl;
}


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

typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ldb;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define popb pop_back()
#define pf push_front
#define popf pop_front()
#define si size()
#define be begin()
#define en end()
#define all(v) v.be, v.en
#define le length()
#define mp make_pair
#define mt make_tuple
#define acc(v) accumulate(all(v), 0)
#define F first
#define S second
#define INF lli(1e19)

#define forz(i, n) for (lli i = 0; i < n; i++)
#define fore(i, m, n) for (lli i = m; i < n; i++)
#define rforz(i, n) for (lli i = n - 1; i >= 0; i--)
#define rfore(i, m, n) for (lli i = n - 1; i >= m; i--)
#define deci(n) fixed << setprecision(n)
#define high(n) __builtin_popcount(n)
#define highll(n) __builtin_popcountll(n)
#define parity(n) __builtin_parity(n)
#define ctz(n) __builtin_ctz(n)
#define lb lower_bound
#define ub upper_bound
#define er equal_range
#define maxe *max_element
#define mine *min_element
#define mod 1000000007
#define mod2 998244353
#define gcd __gcd
#define kira ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define newline cout<<endl;
//#define endl "\n"



inline lli power(lli x, lli y, lli p = mod)
{
    lli res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}

inline lli modadd(lli a, lli b, lli m = mod)
{
    a += b;
    if (a >= m)
        a -= m;
    return a;
}

inline lli modmul(lli a, lli b, lli m = mod)
{
    return ((a % m) * (b % m)) % m;
}

inline lli modi(lli a, lli m = mod) { return power(a, m - 2, m); }
inline lli md(lli x) {if(x>=0)return x; return -x;}
///////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
const lli mxN = 5e5;
lli n,m,k,r;
//lli u, v;
//bool vis[mxN];
//vector<lli> adj[mxN];
//void init()
//{
//    forz(i,n) vis[i]=0, adj[i].clear();
//}
struct ft{
    lli a[mxN+1];
    void upd(lli p, lli x)
    {
        for(int i = p; i<n+1; i+=i&-i)
            a[i]+=x;
    }
    lli qr(lli x)
    {
        lli z = 0;
        for(int i = x; i>0; i-=i&-i)
            z+=a[i];
        return z;
    }
} t;

int32_t main()
{
    kira;

    lli T=1;
    //cin>>T;

    while(T--)
    {
        cin>>n>>m;
        lli a;
        t.a[0]=0;
        fore(i,1,n+1) cin>>a, t.upd(i,a);
//        forz(i,n) cout<<t.a[i+1]<<' ';
//        cout<<endl;
//        cout<<endl;
        forz(i,m)
        {
            lli tp, x, y;
            cin>>tp>>x>>y;
            if(tp)
                cout<<t.qr(y)-t.qr(x)<<endl;
            else t.upd(x+1,y);

        }
    }

    return 0;

}


Measured memory_bytes: 8228
#include<iostream>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include<climits>
#include<map>
#include<string>
#include<functional>
#include<iomanip>
#include<deque>
#include<random>
#include<set>
#include<bitset>

using namespace std;
typedef long long ll;
typedef double lldo;
#define mp make_pair
#define pub push_back
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
ll gcd(ll a, ll b) { if (a % b == 0) { return b; } else  return gcd(b, a % b); }
ll lcm(ll a, ll b) { if (a == 0) { return b; }return a / gcd(a, b) * b; }
template<class T>ll LBI(vector<T>& ar, T in) { return lower_bound(ar.begin(), ar.end(), in) - ar.begin(); }
template<class T>ll UBI(vector<T>& ar, T in) { return upper_bound(ar.begin(), ar.end(), in) - ar.begin(); }

ll a, b, c;

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

Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<utility>
#include<algorithm>
#include<cstdio>
#include<iomanip>
#include<queue>
#include<stack>

#define ll int64_t
#define Rep(i, n) for (ll i = 0; i < n; i++)

using namespace std;

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

    ll N;
    cin >> N;
    vector<ll> a(N);
    Rep (i, N) {
        cin >> a[i];
    }

    vector<ll> b;
    Rep (i, N) {
        if (a[N-1-i] == 1) {
            b.push_back(N-i);
            for (ll j = 1; j * j <= N-i; j++) {
                if ((N-i) % j == 0) {
                    a[(N-i)/j-1] = 1 - a[(N-i)/j-1];
                    if (N-i != j * j) a[j-1] = 1 - a[j-1];
                }
            }
        }
        // for (auto e : a) cout << e << " ";
        // cout << "\n";
    }

    cout << b.size() << "\n";
    if (b.size() > 0) {
        Rep (i, b.size()) {
            cout << b[i] << " ";
        }
        cout << "\n";
    }
}

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

namespace easy_Atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] N = Console.ReadLine().ToCharArray();
            Console.WriteLine(N.Count(x=>x=='9')>0?"Yes":"No");
        }
            // float[] ABN = Array.ConvertAll(Console.ReadLine().Split(),float.Parse);
            // long[] NK = Array.ConvertAll(Console.ReadLine().Split(),long.Parse);
            // long N = NK[0];
            // long K = NK[1];
            // long K = long.Parse(Console.ReadLine());
            // int[] abc = Array.ConvertAll(Console.ReadLine().Split(),int.Parse);
            // string S = Console.ReadLine();
            // int x = int.Parse(Console.ReadLine());
            // int b = int.Parse(Console.ReadLine());
            // int N = int.Parse(Console.ReadLine());
            // float N = float.Parse(Console.ReadLine());
            // string c = Console.ReadLine();
            // string B = Console.ReadLine();
            // string[] s = Console.ReadLine().Split();
            // var s = (new string[] { Console.ReadLine(), Console.ReadLine(), Console.ReadLine() }).Select(float.Parse);
            // float[] a = Array.ConvertAll(Console.ReadLine().Split(),float.Parse);
            // var X = Console.ReadLine();
            // int[,] abcd = new int[NMQ[2],4];
            // int[] A = new int[NMQ[0]];
            // int[] A_num = new int[NMQ[0]];
            // long[] s=Array.ConvertAll(Console.ReadLine().Split(),long.Parse);
            // var hs=new Dictionary<long,long>();
            // for(int i=0;i<s[0];i++){
            //     long[] q=Array.ConvertAll(Console.ReadLine().Split(),long.Parse);
            //     if(hs.ContainsKey(q[0])){hs[q[0]]+=q[1];}
            //     else{hs.Add(q[0],q[1]);}
            // }
        
        // //最小公倍数
        // static long Lcm(long a, long b)
        // {
        //     return a/Gcd(a,b)*b;
        // }

        // //最大公約数
        // static long Gcd(long m, long n)
        // {
        //     if(n==0)return m;
        //     return Gcd(n,m%n);
        // }
    }
}


Measured memory_bytes: 13268
#include<stdio.h>

int main(void){

	int a[5],b[5],i,j,hit=0,blow=0;
	
	while(scanf("%d%d%d%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&b[0],&b[1],&b[2],&b[3])!=EOF){
	
	for(i=0;i<4;i++){
		if(a[i]==b[i])hit++;
		
		for(j=0;j<4;j++){
			if(a[i]==b[j] &&a[i]!=b[i])blow++;
		}
	}
	
	printf("%d %d\n",hit,blow);
		hit=0;
		blow=0;
	}
return 0;
}

Measured memory_bytes: 1028
#include <algorithm>
#include <cassert>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
#include <tuple>

using namespace std;

int solve(int R, int G, int B, int N) {
  int count = 0;
  int rmax = (N / R) + 1;
  int gmax = (N / G) + 1;
  int bmax = (N / B) + 1;

  vector<int> bvec;
  for(int b = bmax-1; b >= 0; b-- ){
    bvec.push_back(N - b * B);
  }

  for(int r = 0; r < rmax; r++){
    if( r * R > N ){ break; }
    for(int g = 0; g < gmax; g++){
      if( r * R + g * G > N ){ break; }

      if(binary_search(bvec.begin(), bvec.end(), r * R + g * G )){
        count++;
      }
    }
  }

  return count;
}

int main(int argc, char const *argv[]) {
  int R, G, B, N;

  cin >> R;
  cin >> G;
  cin >> B;
  cin >> N;

  cout << solve(R, G, B, N);

  return 0;
}


Measured memory_bytes: 764
#include <bits/stdc++.h>
using namespace std;
template <class T> T input() {T t; cin>>t; return t;}
#define FOR(i,a,b) for (ll i = a; i < b; i++)
#define REP(i,b) FOR(i,0,b)
#define RFOR(i,a,b) for (ll i = a-1; i >= b; i--)
#define RREP(i,a) RFOR(i,a,0)
#define REPALL(i,x) for (ll i = 0; i < x.size(); i++)
#define RREPALL(i,x) for (ll i = x.size()-1; i >= 0; i--)
#define REPITR(itr,x) for (auto itr = (x).begin(); itr != (x).end(); itr++)
#define ALL(x) (x).begin(), (x).end()
#define SORT(x) sort(ALL(x))
#define MIN_ELEMENT(x) min_element(ALL(x))
#define MAX_ELEMENT(x) max_element(ALL(x))
#define COUNT(x,num) count(ALL(x), num)
#define MEMSET(x,val) memset(x, val, sizeof(x))
#define CHMAX(a,b) a = max(a,b)
#define CHMIN(a,b) a = min(a,b)
#define debug(x) cerr<<__LINE__<<": "<<(#x)<<" = "<<(x)<<endl;
void YES(bool flag) {cout<<(flag ? "YES" : "NO")<<endl;}
void Yes(bool flag) {cout<<(flag ? "Yes" : "No")<<endl;}
void yes(bool flag) {cout<<(flag ? "yes" : "no")<<endl;}
#define PRINT_ARRAY_H(i,a) REPALL(i,a) {cout<<a[i]<<(i != a.size()-1 ? " " : "");} newline;
#define e1 first
#define e2 second
#define newline putchar('\n')
#define cspace ' '
#define sspace " "
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef vector<ll> VLL;
typedef vector<vector<ll>> VVLL;
const int INF = 1e7;
const ll MOD = 1e9 + 7;
const double pi = 3.141592653589793;
const VI dx = {1, 0, -1, 0};
const VI dy = {0, 1, 0, -1};

map<string, int> mp;

int main()
{
    int n, m, ans = 0;
    string s, t;
    cin>>n;
    REP(i,n) {
        mp[input<string>()]++;
    }
    cout<<"AC x "<<mp["AC"]<<endl;
    cout<<"WA x "<<mp["WA"]<<endl;
    cout<<"TLE x "<<mp["TLE"]<<endl;
    cout<<"RE x "<<mp["RE"]<<endl;

    return 0;
}


Measured memory_bytes: 3628
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<(int)(n);i++)
#define all(x)    (x).begin(),(x).end()
typedef long long ll;
const int MOD = (int)1e9 + 7;

int main(){
  int n;
  cin >> n;
  vector<int> a(n+1),b(n);
  rep(i,n+1) cin >> a[i];
  rep(i,n) cin >> b[i];
  int mons = a[0];
  int sol,buf;
  ll ans = 0;
  rep(i,n){
    sol = b[i];
    buf = min(mons,sol);
    ans += buf;
    sol -= buf;
    mons = a[i+1];
    buf = min(sol,mons);
    ans += buf;
    mons -= buf;
  }
  cout << ans << endl;
}



Measured memory_bytes: 1024
#include <iostream>
#include <cassert>
#include <climits>
#include <bitset>
#include <stack>
#include <queue>
#include <iomanip>
#include <limits>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string.h>
#include <tuple>
#include <time.h>
#include <random>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;

long long int INF = 3e18;
double Pi = 3.1415926535897932384626;

vector<ll> G[500005];
//vector<P> tree[500010];
priority_queue <ll> pql;
priority_queue <P> pqp;
//big priority queue
priority_queue <ll,vector<ll>,greater<ll> > pqls;
priority_queue <P,vector<P>,greater<P> > pqps;
//small priority queue
//top pop

int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
char dir[] = "DRUL";
//ll bit[500005];
//↓,→,↑,←


#define p(x) cout<<x<<endl;
#define el cout<<endl;
#define pe(x) cout<<(x)<<" ";
#define ps(x) cout<<fixed<<setprecision(25)<<x<<endl;
#define pu(x) cout<<(x);
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define deba(x) cout<< #x << " = " << x <<endl


ll mod = 1000000007;
ll rui(ll number1,ll number2){

    if(number2 == 0){
        return 1;
    }else{
        ll number3 = rui(number1,number2 / 2);
        number3 *= number3;
        number3 %= mod;
        if(number2%2==1){
            number3 *= number1;
            number3 %= mod;
        }
        return number3;
    }
}
ll gcd(ll number1,ll number2){

    if(number1 > number2){
        swap(number1,number2);
    }
    if(number1 == 0 || number1 == number2){
        return number2;
    }else{
        return gcd(number2 % number1,number1);
    }
}
void YES(bool condition){

    if(condition){
        p("YES");
    }else{
        p("NO");
    }
    return;
}
void Yes(bool condition){

    if(condition){
        p("Yes");
    }else{
        p("No");
    }
    return;
}
void Yay(bool condition){

    if(condition){
        p("Yay!");
    }else{
        p(":(");
    }
    return;
}

//ll fact[800005],rfact[800005];
/*
void c3_init(){
    fact[0] = rfact[0] = 1;
    for(ll i=1; i<=800000; i++){
        fact[i] = (fact[i-1]*i) % mod;
    }
	rfact[800000] = rui(fact[800000],mod - 2);
	for(ll i=800000; i>=1; i--){
	   rfact[i-1] = rfact[i] * i;
	   rfact[i-1] %= mod;
	}
	return;}
ll c3(ll n,ll r){
    return (((fact[n] * rfact[r]) % mod) * rfact[n-r]) % mod;}
*/

ll n,m,num,sum,ans,a,b,c,d,e,g,h,w,i,j,k,q;
ll x[500005],y[500005],z[500005];
ll l[500005],r[500005];
ll check[500005];
ll dp[40000000];
char s[500005],t[500005];
ll ga,sa,ba,gb,sb,bb;

bool flag,dame;





void solve1(){
	dp[0] = 0;
	for(i=1;i<=n;i++){
		dp[i] = i;
		for(j=0;j<3;j++){
			if(i >= x[j]){
				dp[i] = max(dp[i],dp[i-x[j]] + y[j]);
			}
		}
	}
	n = dp[n];
}

void solve2(){
	for(i=0;i<3;i++){
		swap(x[i],y[i]);
	}
	solve1();
}

int main(){
	cin >> n;
	for(i=0;i<3;i++){
		cin >> x[i];
	}
	for(i=0;i<3;i++){
		cin >> y[i];
	}
	solve1();
	//p(n);
	solve2();
	p(n);
	return 0;
}

Measured memory_bytes: 212736
from sys import stdin
readline = stdin.buffer.readline

def main():
    N = int(readline().rstrip())
    L = list(map(int, readline().rstrip().split()))
    if max(L) < (sum(L) - max(L)):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()


Measured memory_bytes: 61952
#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin >> s;
    if(s == "Sunny"){
        cout << "Cloudy";
    }else if(s == "Cloudy"){
        cout << "Rainy";
    }else if(s == "Rainy"){
        cout << "Sunny"; 
    }
}

Measured memory_bytes: 256
def main():
	N = list(input())
	if len(N) == 1 :
		print(0)
		return 0
	
	count = 0
	for i,h in enumerate(N) :
		if i<=len(N)-2 :
			if h == N[i+1] :
				N[i+1] = "1" if N[i+1] == "0" else "0"
				count+=1
	print(count)

if __name__ == "__main__" :
	main()

Measured memory_bytes: 3956
using System;
using System.Collections.Generic;

class Program
{
	static int n;
	static int q;
	static int total_time;

	struct Data
	{
		public string name;
		public int time;

		public Data(string name, int time)
		{
			this.name = name;
			this.time = time;
		}
	}
	static List<Data> pro = new List<Data>();

	static void Main(string[] args)
	{
		string[] input = Console.ReadLine().Split(' ');

		n = int.Parse(input[0]);
		q = int.Parse(input[1]);

		total_time = 0;


		for (int i = 0; i < n; i++)
		{
			string[] str = Console.ReadLine().Split(' ');
			string name = str[0];
			int time = int.Parse(str[1]);
			Process(name, time);
		}

		

		while (pro.Count > 0)
		{
			Process(pro[0].name, pro[0].time);

			pro.RemoveAt(0);
		}
	}

	static void Process(string name, int time)
	{
		int t = time - q;
		if (t <= 0)
		{
			total_time += time;
			Console.WriteLine(name + " " + total_time);
		}
		else
		{
			total_time += q;
			pro.Add(new Data(name, t));
		}
	}
}


Measured memory_bytes: 19172
#define NDEBUG
NDEBUG


#include <algorithm>
#include <cassert>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <memory>
#include <random>


using namespace std;

/// caide keep
bool __hack = std::ios::sync_with_stdio(false);
/// caide keep
auto __hack1 = cin.tie(nullptr);


namespace template_util {
    

    constexpr int bytecount(uint64_t x) {
        return x ? 1 + bytecount(x >> 8) : 0;
    }

    /// caide keep
    template<int N>
    struct bytetype {
        
    };

    /// caide keep
    template<>
    struct bytetype<4> {
        
    };

    /// caide keep
    template<>
    struct bytetype<3> {
        
    };

    /// caide keep
    template<>
    struct bytetype<2> {
        
    };

    /// caide keep
    template<>
    struct bytetype<1> {
        
    };

    /// caide keep
    template<>
    struct bytetype<0> {
        
    };

    /// caide keep
    template<uint64_t N>
    struct minimal_uint : bytetype<bytecount(N)> {
    };
}


template<class T>
T next(istream& in) {
    T ret;
    in >> ret;
    return ret;
}


set<int> has_red;
vector<int> cnt;

void solve(istream& in, ostream& out) {
    has_red.clear();
    has_red.insert(0);
    int n = next<int>(in);
    cnt = vector<int>(n, 1);
    int q = next<int>(in);
    while (q--) {
        int from = next<int>(in)-1;
        int to = next<int>(in)-1;
        if (has_red.count(from)) {
            has_red.insert(to);
        }
        --cnt[from];
        ++cnt[to];
        if (cnt[from] == 0) {
            has_red.erase(from);
        }
    }
    out << has_red.size() << endl;
}


int main() {
    solve(cin, cout);
    return 0;
}



Measured memory_bytes: 5376
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define y1 zzz
#define fi first
#define se second
#define PII pair<int,int>
#define PII2 pair<int,PII >
#define PII3 pair<PII,int >
#define PII4 pair<PII,PII >
#define all(x) (x).begin(),(x).end()
#define pb push_back
int n,k,a[200010];
void solve()
{
    cin>>n>>k;
    for(int i=0;i<n;i++)cin>>a[i];
    sort(a,a+n,greater<int>());
    int ans=0;
    for(int i=k;i<n;i++)ans+=a[i];
    cout<<ans;
}
int32_t main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    //freopen("XORQUERY.inp","r",stdin);
    //freopen("XORQUERY.out","w",stdout);
    //int t;cin>>t;while(t--)
    solve();
    return 0;
}


Measured memory_bytes: 1792
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input =
            new BufferedReader(new InputStreamReader(System.in));

        int n = Integer.parseInt(input.readLine());
        char[][] c = new char[n][n];
        for (int i=0; i<n; i++) {
            String s =  input.readLine();
            for (int j=0; j<n; j++) {
                c[i][j] = s.charAt(j);
            }
        }

        int count = 0;
        for (int i=0; i<n; i++) {
            if (sym(n, c, i)) count += n;
        }
        System.out.println(count);
    }


    static boolean sym(int n, char c[][], int offset) {
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                int x = (j + offset + n) % n;
                int y = (i - offset + n) % n;
                if (c[i][j] != c[x][y]) return false;
            }
        }
        return true;
    }
}


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

using ll = long long;
using vi = vector<int>;
using vi2 = vector<vector<int>>;
#define MP(a,b) make_pair((a),(b))
#define MT(...) make_tuple(__VA_ARGS__)

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REPS(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREPS(i,x) for(int i=((int)(x));i>0;i--)

#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl;
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl;
#define gcda(x,y) gcd(abs(x),abs(y))

#define DCOUT(x,n) cout << fixed << setprecision(n) << (x) << endl;

#define sz(x) (int)(x).size()
#define HOGE cout << "hoge" << endl;
using P = pair<ll,ll>;

template<typename T>inline istream& operator>>(istream&i,vector<T>&v)
{REP(j,sz(v))i>>v[j];return i;}

int main(){
    int n;
    cin >> n;
    int x = (1000-n)%1000;
    if (x>=0) cout << x << endl;
    else cout << x+1000 << endl;
}


Measured memory_bytes: 3592
a, b, c, x, y = map(int, input().split())

s = a * x + b * y
t = c * max(x, y) * 2
u = c * min(x, y) * 2 + a * (x - min(x, y)) + b * (y - min(x, y))

print(min(s, t, u))

Measured memory_bytes: 3060
T, *I = map(int, open(0).read().split())

memo = {}
def solve(N):
    if N == 0:
        return 0
    if N == 1:
        return D

    if N in memo:
        return memo[N]

    l2 = (N // 2) * 2
    r2 = -(-N // 2) * 2

    l3 = (N // 3) * 3
    r3 = -(-N // 3) * 3

    l5 = (N // 5) * 5
    r5 = -(-N // 5) * 5

    memo[N] = min(
        N * D,

        abs(l2 - N) * D + A + solve(l2 // 2),
        abs(r2 - N) * D + A + solve(r2 // 2),

        abs(l3 - N) * D + B + solve(l3 // 3),
        abs(r3 - N) * D + B + solve(r3 // 3),

        abs(l5 - N) * D + C + solve(l5 // 5),
        abs(r5 - N) * D + C + solve(r5 // 5),
    )

    return memo[N]

for N, A, B, C, D in zip(*[iter(I)] * 5):
    memo.clear()
    print(solve(N))

Measured memory_bytes: 10936
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <stdlib.h>
using namespace std;

void DFS(vector<int> &permutation, int to_num, set<int> num_set){
    if(num_set.size() == 0) permutation.push_back(to_num);

    for(auto itr = num_set.begin(); itr != num_set.end(); ++itr){
        set<int> copy = num_set;
        copy.erase(*itr);
        DFS(permutation, to_num * 10 + *itr, copy);
    }
}

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

    int P = 0;
    int Q = 0;


    for(int i = 0; i < N; i++){
        int temp;
        cin >> temp;
        P = P * 10 + temp;
    }

    for(int i = 0; i < N; i++){
        int temp;
        cin >> temp;
        Q = Q * 10 + temp;
    }

    set<int> num_set; // 並び変える数字
    for(int i = 0; i < N; i++){
        num_set.insert(i + 1);
    }

    vector<int> permutation; // ここに順列を入れる
    DFS(permutation, 0, num_set);
    sort(permutation.begin(), permutation.end());

    int P_index = 0;
    int Q_index = 0;

    for(int i = 0; i < permutation.size(); i++){
        if(permutation[i] == P) P_index = i; 
        if(permutation[i] == Q) Q_index = i; 
    }

    cout << abs(P_index - Q_index) << endl;
    
    return 0;
}

Measured memory_bytes: 640
//#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>

/*
#include<boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/rational.hpp>
namespace mp = boost::multiprecision;
using Real = mp::number<mp::cpp_dec_float<1024>>;
using Bint = mp::cpp_int;
*/

using namespace std;

#define int long long
#define REP(i,s,e) for((i)=(s);(i)<(e);(i)++)
#define RREP(i,s,e) for((i)=((s)-1);(i)>=(e);(i)--)
#define FOR(i,n) for((i)=(0);(i)<(n);(i)++)
#define RFOR(i,n) for((i)=((n)-1);(i)>=(0);(i)--)
#define MOD 1000000007


signed main(){
    int X,Y;
    cin>>X>>Y;
    if(X*500>=Y) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}


Measured memory_bytes: 3616
#include <stdio.h>

int main(void) 
{
  int n, ans = 0, c, cnt, x;
  scanf("%d", &n);
  for(c = 1; c <= n; c += 2) {
    cnt = 0;
    for(x = 1; x <= c; ++x) {
      if(c % x == 0) { ++cnt; }
    }
    if( cnt == 8) { ++ans; }
  }
  printf("%d\n", ans);
  return 0;
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
#define rep(i,n) for(int (i) = 0;(i) < (n);(i)++)
#define SORT(c) sort((c).begin(),(c).end())
#define MOD 1000000007 //S.size() 配列名.Length()
using namespace std;
typedef unsigned long long ll;

int main(void){
	string s;
	cin >> s;

	vector<int> ans(s.size());
	int r_cnt = 0, l_cnt = 0;
	int j, k, r_box, l_box;

	for(int i = 0; i < s.size(); i++){

		l_cnt = 0;
		r_cnt = 0;

		if(s[i] == 'R'){
			j = i;
			while(s[j] != 'L'){
				r_cnt++;
				j++;
			}
			ans[i + r_cnt - 1] = r_cnt;
			i += r_cnt - 1;

		}
		else {
			k = i;
			while(s[k] != 'R' && s[k] != '\0'){
				l_cnt++;
				k++;
			}
			ans[i] = l_cnt;
			i += l_cnt - 1;

		}
	}

	//rep(b, ans.size()) cout << ans[b] << endl;

	for(int q = 0; q < s.size(); q++){

		r_box = ans[q];
		l_box = ans[q + 1];

		if(ans[q] == 0) continue;
		else{
			if((ans[q] + ans[q + 1]) % 2 == 0){
				ans[q] = (r_box + l_box) / 2;
				ans[q + 1] = (r_box + l_box) / 2;
				q++;
			}
			else if(ans[q] % 2 == 0){
				ans[q] = (r_box + l_box) / 2;
				ans[q + 1] = (r_box + l_box) / 2 + 1;
				q++;
			}
			else if(ans[q] % 2 == 1){
				ans[q] = (r_box + l_box) / 2 + 1;
				ans[q + 1] = (r_box + l_box) / 2;
				q++;
			}
		}
	}

	rep(a, s.size()) cout << ans[a] << " ";

}


Measured memory_bytes: 1024
#include<stdio.h>
int main(void){
    double l,b,r;
    scanf("%lf",&r);
    b=3.141592653589*r*r*1.0;
    l=3.141592653589*2*r*1.0;
    printf("%.6lf %.6lf\n",b,l);
return 0;
}

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

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

using ll = long long;

#include<bits/stdc++.h>


void solve(long long N, long long K, std::vector<long long> A){

    for(int i = 0;i < K;i++){
        vector<ll> B(N);
        for(int i = 0;i < N;i++){
            int l = max(0LL, i - A[i]);
            int r = min(N - 1, i + A[i]);
            B[l]++;
            if(r+1 < N)B[r+1]--;
        }
        for(int i = 1;i < N;i++)B[i] += B[i - 1];
        if(A == B){
            break;
        }else{
            A = B;
        }
    }
    for(int i = 00;i < N;i++){
        cout<<A[i]<<" ";
    }
    cout<<endl;
}

int main(){
    long long N;
    scanf("%lld",&N);
    long long K;
    scanf("%lld",&K);
    std::vector<long long> A(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&A[i]);
    }
    solve(N, K, std::move(A));
    return 0;
}


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

#define  BeatMeScanf  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define  tc(x)        int x; cin >> x; while(x--)
#define  ll           long long
#define  vi           vector<int>
#define  pii          pair<int,int>
#define  mii          map<int,int>
#define  inf          1<<28
#define  mem(x,y)     memset(x, y, sizeof(x))
#define  ps(x,y)      fixed<<setprecision(y)<<x
#define  show(val)    cout<< #val << " -> " << val << endl
#define  Case         cout<< "Case "<< ++cs << ": "
#define  all(v)       (v).begin(), (v).end()
#define  rall(v)      (v).rbegin(), (v).rend()
#define  MOD          1000000007
#define  MAX          100005

int main()
{
    BeatMeScanf;
    ll a;
    double b;
    cin >> a >> b;

    ll prod = round(b*100);
    prod = a*prod/100;
    cout << prod << '\n';
   
    return 0;
}


Measured memory_bytes: 3676
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
typedef  long long ll;
using namespace std;
int main(){   
   int n,m;
   cin>>n>>m;
   (n==m)? cout<<"Yes":cout<<"No";

    
   return 0;
}

Measured memory_bytes: 256
X,N = map(int,input().split())
P = [int(i) for i in input().split()]
ans = 100000
flag = False
for i in range(-1,102):
    if i in P:
        pass
    else:
        if abs(X - ans) > abs(X-i):
            flag = True
            ans = i
print(ans)

Measured memory_bytes: 9128
/*
    Author:zeke
    
    pass System Test!
    GET AC!!
*/
#include <iostream>
#include <queue>
#include <vector>
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <map>
#include <iomanip>
#include <utility>
#include <stack>
#include <bitset>
using ll = long long;
using ld = long double;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define rep3(var, min, max) for (ll(var) = (min); (var) < (max); ++(var))
#define repi3(var, min, max) for (ll(var) = (max)-1; (var) + 1 > (min); --(var))
#define Mp(a, b) make_pair((a), (b))
#define F first
#define S second
#define Icin(s) \
    ll(s);      \
    cin >> (s);
#define Scin(s) \
    ll(s);      \
    cin >> (s);
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
typedef pair<ll, ll> P;
typedef vector<ld> V;
typedef vector<V> VV;
typedef vector<P> VP;
ll mod = 1e9 + 7;
ll MOD = 1e9 + 7;
ll INF = 1e18;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ld n,k;
    cin>>n>>k;
    V vec(n);
    V ruiseki(n+1);
    rep(i,n){
        ld x;
        cin>>x;
        vec[i]=((1.0+x)*x/2.0)/x;
    }
   // for(auto i:vec)cout<<i<<" ";
   // cout<<endl;
    rep3(i,1,n+1){
        ruiseki[i]=ruiseki[i-1]+vec[i-1];
    }
   // for(auto i:ruiseki)cout<<i<<" ";
  //  cout<<endl;
    ld MAX=0;
    for(int i=0;i+k<n+1;i++){
        chmax(MAX,ruiseki[i+k]-ruiseki[i]);
       // cout<<ruiseki[i+k]-ruiseki[i]<<endl;
    }
    cout<<setprecision(20)<<MAX<<endl;
}


Measured memory_bytes: 6568
#include <iostream>

using namespace std;

int main(){

    float n,x,t;

    cin>>n>>x>>t;

    int ans=0;
  
    
    while(n>=x)
    {
        n=n-x;
        ans+=t;
    }
    

    if(n<x && n!=0)
    {
        ans+=t;
    }
    cout<<ans<<endl;

    
    return 0;
}

Measured memory_bytes: 3720
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace contest
{
    class Program
    {
        static void Main(string[] args)
        {

            int a = int.Parse(Console.ReadLine());
            int b = int.Parse(Console.ReadLine());
            int h = int.Parse(Console.ReadLine());



            Console.WriteLine((a + b) * h / 2);
            Console.ReadLine();
            return;
        }
    }
}


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

int main()
{
  int N;scanf("%d",&N);
  int a[N];int ans=0;
  for(int i=0;i<N;i++){scanf("%d ",&a[i]);a[i]--;ans+=a[i];}
  printf("%d\n",ans);
}

Measured memory_bytes: 3844
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
int main(){
    string s;
    cin>>s;
    for(int i=0;i<4;i++){
        cout<<s.at(i);
    }
    cout<<" ";
    for(int i=4;i<12;i++){
        cout<<s.at(i);
    }
    cout<<endl;
    return 0;
}


Measured memory_bytes: 256