akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>
#define endl "\n"
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector < vi >
#define pii pair<int,int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001;
#define all(c) c.begin(),c.end()
#define mp(x,y) make_pair(x,y)
#define mem(a,val) memset(a,val,sizeof(a))
#define eb emplace_back
#define f first
#define s second

using namespace std;

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i : x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

/*********************************************START**************************************************************************/



int main()
{
	std::ios::sync_with_stdio(false);
	cin.tie(NULL);
	int T = 1;
	//int T;
	//cin >> T;
	// cin.ignore(); //must be there when using getline(cin, s)
	while (T--)
	{
		string s; cin >> s; 
		bool ok = true; 
		for(int i=0; i<int(s.length()); i++){
			if(i % 2 == 0 && s[i] == 'L'){
				 ok = false; 
			 }
			 if(i % 2 != 0 && s[i] == 'R'){
				 ok = false; 
			 }
		 }
		 if(ok){
			 cout << "Yes" << endl;
		 }else{
			 cout << "No" << endl; 
		 }
	}
	return 0;
}


Measured memory_bytes: 3612
fn read<T: std::str::FromStr>(
    stdin_lock: &mut std::io::StdinLock,
    buf: &mut Vec<u8>,
    delimiter: u8,
) -> T {
    buf.clear();
    let l = std::io::BufRead::read_until(stdin_lock, delimiter, buf).unwrap();
    buf.truncate(l - 1); // remove delimiter
    let s = unsafe { std::str::from_utf8_unchecked(&buf) };
    s.parse().unwrap_or_else(|_| panic!("read"))
}

fn main() {
    let stdin = std::io::stdin();
    let mut stdin_lock = stdin.lock();
    let mut buf: Vec<u8> = Vec::new();
    let s: String = read(&mut stdin_lock, &mut buf, b'\n');
    let bv = s.as_bytes();
    println!("{}", String::from_utf8(vec![bv[0] + 1]).unwrap());
}


Measured memory_bytes: 4352
#include <stdio.h>
int main(void)
{
	int n, h, m, s;
	scanf("%d", &n);
	h = n/3600;
	m = n % 3600 / 60;
	s = n % 60;
	printf("%d:%d:%d\n", h, m, s);
	return 0;
	
}


Measured memory_bytes: 2100
#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <bitset>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include<iomanip>

#define i64 int64_t
#define ff(ii,nn,mm) for(int ii=nn;ii<mm;ii++)
#define ffrvs(ii,nn,mm) for(int ii=nn;ii>=mm;ii--)
#define srt(vvv) sort(vvv.begin(),vvv.end())
#define srtrvs(vvv) reverse(vvv.begin(),vvv.end())
#define Graph vector<vector<int>>
i64 inf = 1000000007;
i64 giant = 4000000000000000037;

using namespace std;

//メモリ置き場
int n, m;
vector<i64> a;
deque<vector<i64>> c;

//inputします
void input() {
	cin >> n >> m;
	a.resize(n);
	ff(i, 0, n) {
		cin >> a[i];
	}
	ff(i, 0, m) {
		int b, d;
		cin >> b >> d;
		c.push_back({ d,b });
	}
	srt(c);
	srtrvs(c);
	srt(a);
}

//ライブラリ置き場


//main
int main() {
    input();
	ff(i, 0, n) {
      if(c.empty())break;
		if (a[i] < c[0][0]) {
			a[i] = c[0][0];
			c[0][1]--;
			if (c[0][1] == 0)c.pop_front();
		}
		else break;
	}
	i64 ans = 0;
	ff(i, 0, n) {
		ans += a[i];
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 6528
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
{
    static void Main(string[] args)
    {
        var K = int.Parse(Console.ReadLine());
        var S = Console.ReadLine();

        if(S.Length <= K)
        {
            Console.WriteLine(S);
        }
        else
        {
            var sb = new StringBuilder();
            for (int i = 0; i < K; i++)
            {
                sb.Append(S[i]);
            }
            Console.WriteLine(sb.ToString() + "...");
        }
    }
}


Measured memory_bytes: 27444
r1, c1, r2, c2 = map(int, input().split())

p = 10 ** 9 + 7
size = 1010000 * 2
f_list = [1] * size
for i in range(1, size):
    f_list[i] = (f_list[i - 1] * i) % p

def cmb(n, r):
    return f_list[n + r] * pow(f_list[n], p-2, p) * pow(f_list[r], p-2, p) % p

hole = cmb(r2 + 1, c2 + 1) - 1
rect1 = cmb(r2 + 1, c1) - 1
rect2 = cmb(r1, c2 + 1) - 1
duplicate = cmb(r1, c1) - 1
ans = (hole - rect1 - rect2 + duplicate) % p
print(ans)


Measured memory_bytes: 55788
#include <stdio.h>
#include <math.h>
int main(){
    double r,s,l;
    l=s=r=0;
    scanf("%lf",&r);
    s=pow(r,2)*M_PI;
    l=2.0*r*M_PI;
    printf("%lf ",s);
    printf("%lf\n",l);
    return 0;
}

Measured memory_bytes: 1820
//Keep Working Hard
  // I__Like__Food  
  #include<bits/stdc++.h>
  #include <ext/pb_ds/assoc_container.hpp> 
  #include <ext/pb_ds/tree_policy.hpp>
  #define rep(i,a,b) for(int i = a; i <=b; i++)
  #define rep2(i,a,b) for(int i = a; i>=b; i--)
  #pragma GCC optimize("O3")
  #pragma GCC optimize("Ofast") 
  #pragma GCC optimize("unroll-loops")
  using namespace std;
  using namespace __gnu_pbds;
  #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  #define endl "\n"
  #define int long long
  #define all(v) v.begin(),v.end()
  #define PB push_back
  #define MP make_pair
  #define double long double
  #define trace1(x)                cerr<<#x<<": "<<x<<endl
  #define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
  #define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
  #define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
  #define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
  #define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
  #define cases int testcases;cin>>testcases; while(testcases--)
  const int mod = 1e9 + 7;
  const int mod2 = 998244353;
  const int N = 20005;
  const int INF = 1e16;
  const double PI = acos(-1);

bool check(vector<int> &v1,vector<int> &v2)
{
  int ans = 0;


  for(int i = 0; i < v1.size(); i++)
  {
    ans += (v1[i] - v2[i]) * (v1[i] - v2[i]);
  }

  if(ceil(sqrt(ans)) - floor(sqrt(ans)) < 1e-3)
  {
    return true;
  }
  else
  {
    return false;
  }

}
int32_t main()
{
       

    IOS


    int n,d;
    cin >> n >> d;

    vector<vector<int>> v(n,vector<int>(d));


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

    int ans = 0;

    for(int i = 0; i < n; i++)
    {
      for(int j = i + 1; j < n; j++)
      {
        ans += check(v[i],v[j]);
      }
    }


    cout << ans;



  return 0;
} 

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.InputStreamReader;

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

	    String line = br.readLine();
	    int a = Integer.parseInt(line.split(" ")[0]);
	    int b = Integer.parseInt(line.split(" ")[1]);

	    int d = a / b;
	    int r = a % b;
	    double f = (double)a / (double)b;

	    System.out.println(d + " " + r + " " + String.format("%.5f", f));

	}
}

Measured memory_bytes: 24848
use proconio::{input, fastout};

#[fastout]
fn main() {
    input!{
      N : usize,
      M : usize,
      A : [usize; M],
    }

    let sum: usize = A.iter().fold(0, |sum, a| sum + a);
    if N >= sum {
        println!("{}", N - sum);
    } else {
        println!("{}", -1);
    }
}


Measured memory_bytes: 2284
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define repp(i, m, n) for(int i = m; i < n; i++)
const int    INF = 100000000;
const double EPS = 1e-10;
const int    MOD = 1000000007;
using namespace std;
typedef long long ll;
typedef pair<int, int> pai;
typedef pair<ll,ll> pal;
int main()
{
	int h, w;
	cin >> h >> w;
	string s;
	rep(i, h)
	{
		rep(j, w)
		{
			cin >> s;
			if(s=="snuke")
			{
				char t='A';
				t+=j;
				cout << t << 1+i << endl;
				break;
			}
		}
	}
	return 0;
}


Measured memory_bytes: 256
using System;

namespace ConsoleApp1
{
    class ABC179A
    {
        static void Main(string[] args)
        {
            var S = Console.ReadLine();

            if (S.Substring(S.Length - 1).Equals("s"))
            {
                Console.WriteLine(S + "es");
            }
            else
            {
                Console.WriteLine(S + "s");
            }
        }
    }
}


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

int del[55];

int main()
{
  int n,d;
  int pro = 0, sum = 0;
  cin>>n;
  for (int i = 0; i< n; i++)
    cin>>del[i];
  for (int i = 0;i < n;i++)
  {
    for (int j = i+1; j< n;j++)
    {
      pro = del[i] * del[j];
      sum += pro;
    }
  }
  cout<<sum<<endl;
  return 0;
}
  

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

using namespace std;

typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<LD, LD> PLDLD;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define CLR(a) memset((a), 0 ,sizeof(a))
#define ALL(a) a.begin(),a.end()

const double eps=1e-5;
const long long INF=(LL)(1e9)*(LL)(1e9);



int main()
{
    //cin.tie(0);
    //ios::sync_with_stdio(false);
    string s;
    cin>>s;
    cout<<s.substr(0,s.size()-8)<<endl;
}

Measured memory_bytes: 256
k,n=map(int,input().split())
arr=list(map(int,input().split()))

for i in range(n-1):
	arr.append(arr[i]+k)

min_=99999999999

for i in range(n):
	if arr[i+n-1]-arr[i]<min_:
		min_=arr[i+n-1]-arr[i]


print(min_)

Measured memory_bytes: 32204
#include <bits/stdc++.h>
#include <iomanip>
#include <math.h>
//#include <unistd.h>
//#include <stdio.h>
#define rep(i,x) for(ll i = 0;i<x;i++)
#define all(a) (a).begin(),(a).end()
using ll = long long;
using ld = long double;
using namespace std;
using dou = double;
const ll inf = 2147483647;
const ll INF = 1LL << 60;
const ld pi = 3.14159265358;
const ll mod = 1000000007;
typedef pair<ll,ll> P;
using graph = vector<vector<ll>>;
template<class T> inline bool chmax(T& a, T b){if(a < b){a = b; return true;}return false;}
template<class T> inline bool chmin(T& a, T b){if(a > b){a = b; return true;}return false;}
ll gcd(ll a,ll b){
    if(a < b)swap(a,b);
    if(a % b == 0)return b;
    else return gcd(b,a%b);
}
//素数判定O(sqrt(N))
bool isp(ll n){
    bool res = true;
    if(n == 1)return false;
    else{
        for(ll i = 2;i * i <= n;i++){
            if(n % i == 0){
                res = false;
                break;
            }
        }
        return res;
    }
}

ll fac[510000], finv[510000], inv[510000];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < 510000; i++){
        fac[i] = fac[i - 1] * i % mod;
        inv[i] = mod - inv[mod%i] * (mod / i) % mod;
        finv[i] = finv[i - 1] * inv[i] % mod;
    }
}

// 二項係数計算
ll nCk(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
//nのm乗をMODで割ったあまりO(logN)
ll modpow(ll n,ll m,ll MOD){
    ll res = 1;
    while(m){
        if(m & 1)res = (res * n) % MOD;
        m >>= 1;
        n *= n;
        n %= MOD;
    }
    return res;
}

//printf("%.10f\n", N);
/*  vector<ll> vec = {1,2,5,6,8,9,10};
    cout << binary_search(all(vec),5) << endl; -> true*/
/*
    vector<ll> vec = {1,2,5,6,8,9,10};
    auto n = upper_bound(all(vec),4);
    cout << *n << endl; -> 5*/

//    cout << fixed << setprecision(15);

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    const ll NMAX = 100000;
    ll N;
    cin >> N;
    vector<ll> vec(NMAX + 5,INF);
    vec[0] = 0;
    vector<ll> six = {6,36,216,1296,7776,46656},nine = {9,81,729,6561,59049};//6,5
    for(ll i = 0;i <= NMAX;i++){
        rep(j,6){
            ll hx = six[j] + i;
            if(hx <= NMAX){
                chmin(vec[hx],vec[i] + 1);
            }
        }
        rep(j,5){
            ll hx = nine[j] + i;
            if(hx <= NMAX){
                chmin(vec[hx],vec[i] + 1);
            }
        }
        chmin(vec[i + 1],vec[i] + 1);
    }
    cout << vec[N] << endl;
    //rep(i,10)cout << vec[i] << "\n";
}

Measured memory_bytes: 3996
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
using namespace std;
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)

typedef long long ll;

int main(void) {
  int n;
  scanf("%d", &n);
  printf("%d\n", n % 2 == 0 ? n : 2*n);
  
  return 0;
}


Measured memory_bytes: 256
#include<iostream>

using namespace std;

int main() {

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

	int a[100], b[100];

	for (int i = 1; i <= M; ++i) cin >> a[i] >> b[i];

	int num[100] = { 0 }; //バケット

	for (int i = 1; i <= M; ++i){
		num[a[i]]++;
		num[b[i]]++;
	}

	for (int i = 1; i <= N; ++i) cout << num[i] << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int w,n;
int num[30];
int main(){
    scanf("%d%d",&w,&n);
    for(int i=0;i<w;i++)num[i]=i;
    while(n--){
        int a,b;
        scanf("%d,%d",&a,&b);
        swap(num[--a],num[--b]);
    }
    for(int i=0;i<w;i++)printf("%d\n",num[i]+1);

    return 0;
}

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

using namespace std;

int main(void)
{
  string s; cin>>s;
  sort(s.begin(),s.end());
  
  if((s[0]==s[1])&&(s[1]==s[2])){puts("No");}
  else if((s[0]+s[2])==(s[1]+s[3])){puts("Yes");}
  else{puts("No");}
  
  return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using static MyIO;


public class A
{
	public static void Main()
	{
		int r = GetInt();
		Console.WriteLine(3 * r * r);
	}
}


public static class MyIO
{
	private static string[] args = null;
	private static int num = -1;
	private static int used = -1;

	private static string getArg()
	{
		if(used == num)
		{
			args = Console.ReadLine().Split(' ');
			num = args.Length;
			used = 0;
		}
		return args[used++];
	}

	public static int GetInt(){ return int.Parse(getArg()); }
	public static long GetLong(){ return long.Parse(getArg()); }
	public static double GetDouble(){ return double.Parse(getArg()); }
	public static string GetString(){ return getArg(); }
}

Measured memory_bytes: 13140
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#define rep(i,n) for(int i = 0; i < n;i++)
#define ll long long
#include <bits/stdc++.h>
using namespace std;
#define mo 1000000007
#define ull unsigned long long 

int main(){
  ll h,w;cin>>h>>w;
  ll ans=0;
  ll p=w;
  if(h!=1 && w!=1){
  if(w%2==1)
    p=w+1;
  for(int i=0;i<h;i=i+2){
    ans+=p/2;
  }
  for(int i=1;i<h;i=i+2){
    ans+=w/2;
  }
  cout<<ans;
  }
  else
    cout<<1;
}
  
  
  


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace ABC
{
    class ABC169A
    {
        const string FILE = @"..\..\data.txt";

        static void Main(string[] args)
        {
#if DEBUG
            Console.SetIn(new StreamReader(FILE));
#endif
            var line = Console.ReadLine();
            var sa = line.Split(' ');
            int a = int.Parse(sa[0]);
            int b = int.Parse(sa[1]);


            Console.WriteLine(a * b);

#if DEBUG
            Console.WriteLine("end");
            Console.SetIn(Console.In);
            Console.ReadKey();
#endif
        }
    }
}


Measured memory_bytes: 27548
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.AbstractMap;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		solve(sc,out);

		out.flush();
	}

	public static void solve(FastScanner sc, PrintWriter out) {
		int[] a = new int[3];
		for(int i  = 0; i < 3; i++) a[i] = sc.nextInt();
		
		Arrays.sort(a);
		
		if(a[0] == 5 && a[1] == 5 && a[2] == 7) out.println("YES"); else out.println("NO");
		
	}

	public static int gcd(int a, int b) {
		if(a < b) return gcd(b, a);
		if(b == 0) return a;
		return gcd(b, a % b);
	}

	public static long gcd(long a, long b) {
		if(a < b) return gcd(b, a);
		if(b == 0) return a;
		return gcd(b, a % b);
	}
}

class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {

    public Pair(final K key, final V value) {
        super(key, value);
    }
 }

class FastScanner {
    private BufferedReader reader = null;
    private StringTokenizer tokenizer = null;

    public FastScanner(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
        tokenizer = null;
    }

    public String next() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        return tokenizer.nextToken("\n");
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
         return Double.parseDouble(next());
     }

    public int[] nextIntArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        return a;
    }

    public long[] nextLongArray(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nextLong();
        return a;
    }
}

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

using ll =  long long;
using pint =  pair<int,int>;
using vint = vector<int>;
using vvint = vector<vint>;
using vpint = vector<pint>;

#define repi(i,start,end) for(int (i)=(start),TemPNuM=(int)(end);(i)<TemPNuM;++(i))
#define rep(i,end) repi((i),0,(end))
#define rfor(x,v) for(auto& (x) : (v))
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fsort(v,lambda) sort(all((v)),(lambda))
#define vin(v) rep(i,(v).size())cin >> (v)[i];
#define vpin(v) rep(i,(v).size())cin>>v[i].first>>v[i].second
//#define int long long
template<class T, class U>bool chmax(T &a, const U &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T, class U>bool chmin(T &a, const U &b) { if (b<a) { a=b; return 1; } return 0; }
template<class T>void println(T a){if(cout.precision()!=12)cout<<setprecision(12);cout<<a<<endl;}
//lambda: [](int x, int y){return x<y;}

signed main(void){
    int n;cin>>n;
    vint a(n+2,0);rep(i,n)cin>>a[i+1];

    vint d(n+1);
    rep(i,n+1)d[i]=abs(a[i+1]-a[i]);
    //rfor(x,d)cout << x << endl;
    
    int sum=accumulate(all(d),0);

    repi(i,1,n+1){
        cout << sum-d[i-1]-d[i]+abs(a[i-1]-a[i+1]) << endl;
    }

    return 0;
}


Measured memory_bytes: 2048
using Printf
parse_input(type=String, x=readline()) = begin
  type == String && return x
  parse(type, x)
end
parse_inputs(type=String) = parse_input.(type, split(readline()))

function main()
  l = parse_input(Int)
  @sprintf("%6.12f", (l^3)/27)
  
end

println(main())


Measured memory_bytes: 161588
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e5+7;
int main()
{
	ll a,b;scanf("%lld%lld",&a,&b);
	ll g=__gcd(a,b);ll tmp=g;int cnt=1;
	for(int i=2;i<=sqrt(tmp);i++)
	{
		if(tmp%i==0)
		{
			while(tmp%i==0)
			{
				tmp/=i;
			}
			cnt++;
		}
	}
	if(tmp!=1) cnt++;
	printf("%lld\n",cnt);
 } 

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <vector>
#include <cmath>
#include <cstdint>

int main() {
  int n;
  std::vector<int> a;
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    int n;
    std::cin >> n;
    a.push_back(n);
  }
  int min = *std::min_element(a.begin(), a.end());
  int max = *std::max_element(a.begin(), a.end());
  int64_t sum = std::accumulate(a.begin(), a.end(), int64_t(0));
  std::cout << min << " " << max << " " << sum << std::endl;
}

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

int main (){
    int w, h;
    while(1){
       cin >> h >> w;
       if( w == 0 && h == 0) break;
       for(int a = 0;a < h;a++){
           for(int b = 0;b < w;b++){
               cout << "#";
             }
         cout << endl;
       }
        cout << endl;
     }
     return 0;
   }

Measured memory_bytes: 1156
#define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <algorithm>
#include <ctime>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <random>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <cstring>
#include <iomanip>
using namespace std;

#define double long double
//#define int long long
#define mp make_pair
#define debug(x) cerr << #x << ": " << x << '\n';
#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
template <typename T1, typename T2> bool chkmin(T1 &x, T2 y) { return y < x ? (x = y, true) : false; };
template <typename T1, typename T2> bool chkmax(T1 &x, T2 y) { return y > x ? (x = y, true) : false; };

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

const int N = 1e5 + 10;
const int NN = 1e7 + 10;
int prime[NN];
int p[N];
int d[N];
pii qq[N];
int rs[N];

signed main() {
	fast();
	string s;
	cin >> s;
	if (s[2] == s[3] && s[4] == s[5]) {
		cout << "Yes\n";
	} else {
		cout << "No\n";
	}
 	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<algorithm>
#define INF (1<<29)
#define all(c) (c).begin(),(c).end()
 
using namespace std;
 
int main(void){
  
  int n;
  cin >> n;
 
  vector<int>in(n),l(n),r(n);
 
  for(int i=0;i<n;i++)cin >> in[i];
 
  fill(all(l),0);
  fill(all(r),0);
  
  int now=0;
  for(int i=0;i<n;i++){
    if(in[i]==0)now=INF;
    if(in[i]<0)now=min(now,-in[i]);
    if(in[i]>0)l[i]=min(now,in[i]);
    if(now!=INF && now>0)now--;
  }
  
  now=0;
  for(int i=n-1;i>=0;i--){
    if(in[i]==0)now=INF;
    if(in[i]<0)now=min(now,-in[i]);
    if(in[i]>0)r[i]=min(now,in[i]);
    if(now!=INF && now>0)now--;
  }
 
  int ans=0;
  for(int i=0;i<n;i++)ans+=max(l[i],r[i]);
  cout << ans << endl;  
 
  return 0;
}

Measured memory_bytes: 2324
#include <bits/stdc++.h>
#define mod 1000000007
using namespace std;

int main(){
    long n, k, m = mod;
    cin >> n >> k;
    vector<long> h(n);
    for(int i=0; i<n; i++)
    {
        cin >> h[i];
    }
    sort(h.begin(), h.end());
    
    for(int i=0; i<n-k+1; i++)
    {
        if(m > h[k+i-1] - h[i]) m = h[k+i-1] - h[i];
    }

    cout << m;
}

Measured memory_bytes: 1024
package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024*1024), bufio.MaxScanTokenSize)
}

//func nextString() string {
//	sc.Scan()
//	return sc.Text()
//}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

const INF = 10000000000
var min int = INF
var n int
var m int
var x int
var c []int
var a [][]int

func search(toBuy []bool, depth int) {
	if depth == n {
		skills := make([]int, m, m)
		cost := 0

		for i := 0; i < n; i++ {
			if toBuy[i] {
				cost += c[i]
				for j := 0; j < m; j++ {
					skills[j] += a[i][j]
				}
			}
		}

		for i := range skills {
			if skills[i] < x {
				return
			}
		}

		if cost < min {
			min = cost
		}
		return
	}

	toBuy[depth] = true
	search(toBuy, depth + 1)
	toBuy[depth] = false
	search(toBuy, depth + 1)
}

func main() {
	n = nextInt()
	m = nextInt()
	x = nextInt()
	c = make([]int, n, n)
	a = make([][]int, n, n)

	for i := 0; i < n; i++ {
		a[i] =  make([]int, m, m)
		for j := 0; j <= m; j++ {
			if j == 0 {
				c[i] = nextInt()
			} else {
				a[i][j-1] = nextInt()
			}
		}
	}

	toBuy := make([]bool, n)
	for i := range toBuy {
		toBuy[i] = true
	}

	search(toBuy, 0)

	if min == INF {
		fmt.Println(-1)
		return
	}
	fmt.Println(min)
}


Measured memory_bytes: 2216
n = int(input())
s = input()

ans=0
for num in range(10):
    found1=-1
    for i in range(len(s)):
        if s[i] == str(num):
            found1=i
            break
    if found1==-1:
        continue

    for num2 in range(10):
        found2=-1
        for j in range(found1+1,len(s)):
            if s[j]== str(num2):
                found2=j
                break
        if found2==-1:
            continue

        for num3 in range(10):
            found3=-1
            for k in range(found2+1,len(s)):
                if s[k]== str(num3):
                    found3=k
                    break
            if found3==-1:
                continue
            ans+=1
print(ans)

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

using namespace std;

int main() {
	string s1, s2, s3;
	cin >> s1 >> s2 >> s3;
	s1[0] -= 32;
	s2[0] -= 32;
	s3[0] -= 32;
	cout << s1[0] << s2[0] << s3[0] << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(int, char**)
{
	int N;
	cin >> N;
	vector<long> B(N - 1);
	for (int i = 0; i < N - 1; ++i)
	{
		cin >> B[i];
	}
	long total = 0;
	total += B[0];
	for (int i = 1; i < N - 1; ++i)
	{
		total += min(B[i], B[i - 1]);
	}
	total += B[N - 2];
	cout << total << endl;
	return 0;
}


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

using namespace std;

const int maxn = 1e5 + 5;

int n,m,a,b,deg[maxn];

int main()
{
    cin>>n>>m;
    for(int i=0;i<m;i++){
        cin>>a>>b;
        deg[a]++;
        deg[b]++;
    }
    for(int i=1;i<=n;i++)
        if(deg[i] % 2 != 0){
            cout<<"NO";
            return 0;
        }
    cout<<"YES";
}


Measured memory_bytes: 768
from collections import Counter 

N = int(input())
As = list(map(int, input().split()))
Q = int(input())

dic = Counter(As)

rlt = 0
for k in dic:
  rlt += k*dic[k]

for _ in range(Q):
  b,c = map(int, input().split())
  rlt += (c-b)*dic[b]
  dic[c] += dic[b]
  dic[b] = 0
  print(rlt)
  

Measured memory_bytes: 89484
// --------------------<optimizations>--------------------
#pragma GCC optimize("O3")

//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)
#pragma comment(linker, "/stack:200000000")
//(UNCOMMENT WHEN TRYING TO BRUTEFORCE WITH A LOT OF LOOPS)
#pragma GCC optimize("unroll-loops")
// -------------------</optimizations>--------------------
#include <iostream>
#include <bitset>
#include <algorithm>        // sort()
#include <vector>           // for vectors
#include <map>              // for ordered map
#include <unordered_map>
#include <list>             // for list
#include <iomanip>          // for setprecision()
#include <cmath>            // for pow(), sqrt(), log(), log10(), ....
#include <cstring>          // for memset()
#include <unordered_set>    // for unordered_set
#include <climits>          // for INT_MAX & INT_MIN
#include <set>              // for ordered set

#define C ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
#define INF INT_MAX
#define NINF INT_MIN
#define MOD 1000000007
const double pi=acos(-1); // value of pi


bool isVowel(char ch) {
    if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u') {
        return 1;
    }
    return 0;
}

bool compare(pair<ll, ll> a, pair<ll, ll> b) {
    return a.second<b.second;
}


bool isPrime(ll n) {
    for(ll i=3; i*i<=n; i+=2) {
        if(n%i==0) {
            return false;
        }
    }
    return true;
}

map<ll, list<ll>> m;
// map<ll, ll> m;

int main() {
    C
//     freopen("input.txt","r",stdin);
// 	freopen("output.txt","w",stdout);
    int t=1;
    // cin >> t;
    while(t--) {
        ll a;
        cin >> a;
        ll ans=a;
        ans+=(a*a);
        ans+=(a*a*a);
        cout << ans << endl;
    }
}


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

B = [A[i]-i for i in range(N)]
B.sort()

if N % 2 == 1:
  b = B[(N-1)//2]
else:
  b = (B[N//2] + B[N//2-1]) // 2
  
ans = 0
for a in B:
  ans += abs(a - b)
  
print(ans)

      

Measured memory_bytes: 100636
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const K = parseInt(arg[0].split(" ")[1]);
    
    const A = arg[1].split(" ").map(n=>parseInt(n)).sort((a,b)=>a-b);
    
    console.log(A.slice(0, K).reduce((m,n)=>m+n));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

Measured memory_bytes: 29712
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

a = int(input())
b = int(input())
c = int(input())
x = int(input())


cnt = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i*500+j*100+k*50 == x:
                cnt += 1
print(cnt)


Measured memory_bytes: 3832
import copy
from collections import deque

h, w = map(int,input().split())

maze_o = [0]*h
for i in range(h):
    maze_o[i] = list(input())

dy = [1, -1, 0, 0]
dx = [0, 0, 1, -1]
#すべての "." をスタート位置にする
ans = 0
for y in range(h):
    for x in range(w):
        if maze_o[y][x] == "#":
            continue
        maze = copy.deepcopy(maze_o)
        distance = deque([0])
        rireki = deque([])
        stack = deque([(y, x)])
        maze[y][x] = "#"
        while stack:
            yy, xx = stack.popleft()
            d = distance.popleft()
            rireki.append(d)
            for dxi,dyi in zip(dx, dy):
                if not (0<=dxi+xx<w and 0<=dyi+yy<h):
                    continue
                if maze[dyi+yy][dxi+xx] == "#":
                    continue
                distance.append(d+1)
                stack.append((dyi+yy,dxi+xx))
                maze[dyi+yy][dxi+xx] = "#"
        ans = max(ans, max(rireki))
print(ans)

Measured memory_bytes: 77520
N = gets.to_i

powers = (0..8).to_a.reverse
rem_array = []
rem_array[0] = N
fx_array = []

powers.each.with_index do |power, i|
  dev = 10 ** power
  fx_array[i] = rem_array[i] / dev
  rem_array[i + 1] = rem_array[i] % dev
end

fx = fx_array.inject(:+)

if N % fx == 0 then
  puts 'Yes'
else
  puts 'No'
end

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

int main(){
    unsigned long N, H;
    cin >> N >> H;
    for(unsigned long i = 1, h; i < N; ++i){
        cin >> h;
        if(H > h)return 0 & puts("No");
        if(H < h)--h;
        swap(H, h);
    }
    puts("Yes");
}

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

#define ll long long
#define pb push_back
#define fi first
#define se second
#define vi vector<int>
#define vii vector<int,int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define umii unordered_map<int,int>
#define mii map<int,int>
#define pii pair<int,int>

const long long MOD = 1e9+7;

unordered_set<int> node[200001];
bool visited[200001];

int dfs(int i) {
    visited[i]=true;
    int sz=1;
    for(auto it:node[i])
        if(!visited[it])
            sz+=dfs(it);
    return sz;
}

void solve() {
    int n,m;
    cin >> n >> m;
    for(int i=0; i<=n; i++)
        visited[i]=false;
    for(int i=0; i<m; i++) {
        int a,b;
        cin >> a >> b;
        node[a].insert(b);
        node[b].insert(a);
    }
    int ans=0, sz;
    for(int i=0; i<n; i++) {
        if(!visited[i]) {
            sz=dfs(i);
            ans=max(ans,sz);
        }
    }
    cout << ans;
}

signed main() 
{
    int t=1;
    // cin>>t;
    for(int i=1; i<=t; i++) {
        solve();
    }
}

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

#include <ext/pb_ds/assoc_container.hpp> //required
#include <ext/pb_ds/tree_policy.hpp> //required

using namespace __gnu_pbds; 
using namespace std;

template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; 
typedef long long  ll;
typedef vector<ll> VL;
typedef vector<int> VI;
typedef pair<ll,ll> PLL;
typedef pair<int,int> PII;
#define pb push_back

#define F first
#define S second
#define SZ(a) int((a).size())
#define ALL(a) a.begin(),a.end()
#define fr(i,x,y) for(int i=x;i<y;i++)
#define frr(i,x,y) for(int i=x-1;i>=y;i--)
#define inf 1e18+1
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const int mod=1000000007;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll power(ll a,ll b){ll ans=1;while(b!=0){if(b&1){ans*=a;}a=a*a;b>>=1;}return ans;}
ll powerm(ll a,ll b){ll ans=1;while(b!=0){if(b&1){ans*=a;ans%=mod;}a=a*a;a%=mod;b>>=1;}return ans%mod;}
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();

void solve()
{
    ll n;
    cin>>n;
    VL arr(n,0);
    arr[1]=1;
    for(int i=2;i<=n;i++)
    {
        if(arr[i]==0){
        for(int j=i;j<=n;j+=i)
        {
            arr[j]+=1;
            arr[j]+=arr[j/i];
        }
        }
    }
    ll ans=0;
    arr[1]=1;
    fr(i,1,n+1)
    {
        ans+=(arr[i]*i);
    }
    cout<<ans<<endl;
    return;
}
int main()
{
    IOS;
    ll t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}
/* stuff you should look for
        * int overflow, array bounds
        * special cases (n=1?)
        * do smth instead of nothing and stay organized
        * WRITE STUFF DOWN
*/
// BITMASK:
// 1)When some constrall is of the order of 15-20, think of bitmask DP.
// 2)When some constrall is around 40, try out meet in the middle
// 3) See Strings,palindromes,prefix,suffix etc -> KMP,Z algorithm

Measured memory_bytes: 81348
#include<iostream>
using namespace std;
#define         ll              long long
#define         f(i,a,b)        for(ll i=a;i<b;i++)
#define         pb              push_back

ll power(ll x,ll y)
{
    ll res = 1;
    while (y > 0)
    {       if (y & 1)
            res = res*x;
            y = y>>1;
            x = x*x;
    }
    return res;
}


int main()
{

    {
        ll a;cin>>a;
        cout<<a+a*a+a*a*a;

    }
}


Measured memory_bytes: 3152
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
#define all(x) (x).begin(),(x).end()
#define rp(i,s,e) for(int i=(s);i<(e);++i)

int main(){
	int N; cin>>N;
	vi P(N), Q(N);
	rp(i, 0, N) cin>>P[i];
	rp(i, 0, N) cin>>Q[i];

	vi b(N);

	rp(i,0,N) b[i]=i+1;
	int ip=0;
	do{
		bool ok = true;
		rp(i, 0, N) if(b[i]!=P[i]){ ok=false; break; }
		if(ok)break;
		ip++;
	}while(next_permutation(all(b)));

	rp(i,0,N) b[i]=i+1;
	int iq=0;
	do{
		bool ok = true;
		rp(i, 0, N) if(b[i]!=Q[i]){ ok=false; break; }
		if(ok)break;
		iq++;
	}while(next_permutation(all(b)));

	cout<< abs(ip-iq) <<endl;
}

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

using namespace std;

#define endl '\n'
#define ll long long

const ll mod = 1e9 + 7;
const ll maxn = 2e8 + 5;
const double pi = 3.1415926535897932384626433832795028841971693993751058209749445923078;
//iostream::sync_with_stdio(false);

int main()
{
	int n;
	int m[105];
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> m[i];
	}
	sort(m, m + n);
	int minn = m[0];
	int maxn = m[n - 1];
	int h = 1e9 + 5;
	for (ll i = minn; i <= maxn; i++)
	{
		int sum = 0;
		for (int j = 0; j < n; j++)
		{
			sum += pow(i - m[j], 2);
		}
		h = min(sum, h);
	}
	cout << h << endl;
	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
 
using namespace std;
 
// Competetive Template:
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ldb;
 
// Debugging :
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
 
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
 
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define ba  back
#define si size()
#define be begin()
#define en end()
#define le length()
#define mp make_pair 
#define mt make_tuple
#define fi first
#define se second
#define gcd __gcd
#define maxe *max_element
#define mine *min_element
#define deb debug
 
#define forz(i,n) for(long long int i=0;i<n;i++)
#define rep(i,k,n) for (lli i = k; i <= n; i++)
#define deci(n)  fixed<<setprecision(n)
#define high(n) __builtin_popcount(n)
#define parity(n) __builtin_parity(n)
#define ctz(n)  __builtin_ctz(n)
#define mod 1000000007
#define mod2 998244353
#define kira ios::sync_with_stdio(0), cin.tie(0),cout.tie(0)
 
typedef pair <lli,lli> pll;
 
 
lli countGreater(lli arr[], lli n, lli k) 
{ 
    lli l = 0; 
    lli r = n - 1; 
  
    lli leftGreater = n; 
  
    while (l <= r) { 
        lli m = l + (r - l) / 2; 
  

        if (arr[m] > k) { 
            leftGreater = m; 
            r = m - 1; 
        } 

        else
            l = m + 1; 
    } 
  
    return (n - leftGreater); 
}
 
bool is_palin(string input)
{
    if (input == string(input.rbegin(), input.rend())) 
        return true;
    return false;
}
void solve()
{
    lli n,x,y;
    cin>>n>>x>>y;
    lli d[n+1][n+1] = {0};
    lli ds = (y-x)-1;
    map<lli,lli> m;
    forz(i,n)
    {
        forz(j,n)
        {
            if(j<i)
                continue;
            
            lli tx = abs(x-(i+1)),ty = abs(y-(j+1));
            d[i+1][j+1] = min(tx+ty+1,j-i);
            m[d[i+1][j+1]]++;
        }
    }
    for(lli i = 1;i<n;i++)
    {
        cout<<m[i]<<endl;
    }
}
 
int main()
{
    kira; 
 
    lli t=1; //cin>>t;
    while(t--)
    {
        solve();
    }
    
    return 0;
}

Measured memory_bytes: 31616
n=int(input())
L=list(map(int,input().split()))
cnt=0
for i in range(n):
  for j in range(i):
    for k in range(j):
      if (L[i]!=L[j] and L[j]!=L[k] and L[i]!=L[k]) and (L[i]+L[j]>L[k] and L[j]+L[k]>L[i] and L[k]+L[i]>L[j]):
        cnt+=1
print(cnt)


Measured memory_bytes: 9088
# pdf解法（隣接行列でグラフを管理して、DFSで連結判定する）
def dfs(x):
    if visited[x]:
        return
    visited[x] = True
    for i in range(N):
        # xに繋がっている頂点をたどっていく
        if graph[x][i]:
            dfs(i)


N, M = map(int, input().split())

edge = []
graph = [[False]*N for _ in range(N)]   # 隣接行列
visited = [False]*N

for i in range(M):
    a, b = map(int, input().split())
    edge.append((a, b))
    graph[a-1][b-1] = True
    graph[b-1][a-1] = True

ans = 0
for i, e in enumerate(edge):
    # 辺を取り除く
    graph[e[0]-1][e[1]-1] = False
    graph[e[1]-1][e[0]-1] = False

    # 初期化（全ての頂点を未訪問にする）
    for j in range(N):
        visited[j] = False

    # 任意の１つの頂点からDFS
    dfs(0)

    # 連結判定（訪問していない頂点がある＝非連結）
    bridge = False
    for j in range(N):
        #if not visited[j]:
        if not all(visited):
            bridge = True
    if bridge:
        ans += 1

    # 取り除いた辺を戻す
    graph[e[0]-1][e[1]-1] = True
    graph[e[1]-1][e[0]-1] = True

print(ans)


Measured memory_bytes: 3188
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) ;for (int i = 0; i <=(int)(n); i++)
 
int main(){
int N, Y, x, y, z;
  cin >> N >> Y;
  rep(i,N){
    x = N-i;
  rep(j,i){
    y = i-j;
    z = j;
    if(10000*x+5000*y+1000*z==Y )
      break;
  }
    if(10000*x+5000*y+1000*z==Y)
      break;
  }
  if(10000*x+5000*y+1000*z==Y)
    cout << x << " " << y << " " << z << endl;
  else
    cout<< "-1 -1 -1"<< endl;
}

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

int main(){
  bool flag=0;
  char a;
  string s,t;
  cin >> s >> t;
  for(int i=0;i<s.size();i++){
    a = s.at(s.size()-1);
  	for(int j=s.size()-1;j>0;j--){
      s.at(j) = s.at(j-1);
  	}
    s.at(0) = a;
    if(s == t){
      flag = 1;
      cout << "Yes" << endl;
      break;
    }
  }
  if(!flag)
  cout << "No" << endl;
}

Measured memory_bytes: 256
X = int(input())
n = X // 100
X = X - n * 100
ans= 1
while n > 0:
    if X >= 5:
        X = X - 5
    elif X >= 4:
        X = X - 4
    elif X >= 3:
        X = X - 3
    elif X >= 2:
        X = X - 2
    elif X >= 1:
        X = X - 1
    elif X == 0:
        break
    n -= 1
if X > 0:
    ans = 0
print(ans)

Measured memory_bytes: 3064
#include <cstdio>
#include <cstdint>
#include <cinttypes>
#include <iostream>
#include <vector>
#include <utility>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <string>
using namespace std;
using u8t = std::uint64_t;
using i8t = std::int64_t;
#define F(I,N) for(i8t I=0,I##_N=N;I<I##_N;I++)
#define FR(I,N) for(i8t I=N;I--;)
#define R(V) i8t V;std::cin>>V;
#define RV(V,N) std::vector<i8t> V;F(_i,N){R(_x)V.push_back(_x);}
#define RL1(line) std::getline(std::cin,line);
#define RL(line) std::string line;RL1(line)
#define RM(V,L,C) std::vector<char> V;F(_i,L){RL(_l)F(_j,C)V.push_back(_l[_j]);}
#define P(X) std::cout<<(X)<<std::endl;

void range_add(vector<i8t>& arr,i8t beg,i8t end){
  auto it1 = lower_bound(arr.begin(),arr.end(),beg);
  auto it2 = upper_bound(arr.begin(),arr.end(),end);
  auto const d1 = it1 - arr.begin();
  auto const d2 = it2 - arr.begin();
  i8t data[2];
  i8t *p1 = data, *p2 = data;
  if (d1 % 2 == 0) *p2++ = beg;
  if (d1 % 2 == 0) *p2++ = end;
  arr.insert(arr.erase(it1,it2), p1, p2);
}

int main() {
  R(N)R(K);
  i8t mod=1000'000'007;

  // i8t base=1;
  // F(I,100){base = base*10 % mod;}
  // std::vector<i8t> arr;
  // range_add();

  i8t sum=0;
  for(i8t k=K;k<=N+1;k++){
    i8t mn = (0+k-1)*k/2;
    i8t mx = (N-k+1 + N)*k/2;
    sum += mx - mn + 1;
  }

  P(sum%mod);
  return 0;
}


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

#define fr first
#define sc second
#define OK puts("OK");
#define pb push_back
#define mk make_pair

using namespace std;

typedef long long ll;

const int inf = (int)1e9 + 7;
const int N = (int)1e5 + 7;

int q;
long long a,b;
long long pr;
long long l;
long long d;

long long sqrt(long long x) {
      long long r = 1e9,l = 0;
      while (r - l > 1) {
            long long m = (r + l) / 2ll;
            if (m * 1ll * m <= x)
                  l = m;
            else
                  r = m;
      }
      if (r * 1ll * r <= x)
            l = r;
      return l;
}
int main () {
      cin >> q;

      while (q --) {
            cin >> a >> b;
            pr = a * 1ll * b;
            l = sqrt(pr);
            d = l - min(a,b);

            if (l * 1ll * (l + 1) < pr)
                  d *= 2ll;
            else if (l * 1ll * l < pr)
                  d = (d - 1) * 1ll * 2 + 1;
            else if (l * (l - 1) < pr && min(a,b) < l - 1)
                  d = (d - 1) * 1ll * 2;
            else
                  d = 0;

            if ((min(a,b) + d + 1) * 1ll * min(a,b) < pr && (min(a,b) + d + 1) < max(a,b))
                  cout << (min(a,b) - 1) * 1ll * 2 + d + 1 << endl;
            else
                  cout << (min(a,b) - 1) * 1ll * 2 + d << endl;
      }
}


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

#ifndef ONLINE_JUDGE
#define debarr(a,x,y)cerr<<#a<<":";for(int i=x;i<=y;i++)cerr<<a[i]<<" ";cerr<<endl;
#define debmat(mat,row,col)cerr<<#mat<<":\n";for(int i=0;i<row;i++){for(int j=0;j<col;j++)cerr<<mat[i][j]<<" ";cerr<<endl;}
#define deb(...)dbs(#__VA_ARGS__,__VA_ARGS__)
template<class S, class T>ostream &operator<<(ostream &os, const pair<S, T> &p) {return os << "(" << p.first << "," << p.second << ")";}
template<class T>ostream &operator<<(ostream &os, const vector<T> &p) {os << "["; for (auto&it : p)os << it << " "; return os << "]";}
template<class T>ostream &operator<<(ostream &os, const set<T>&p) {os << "["; for (auto&it : p)os << it << " "; return os << "]";}
template<class T>ostream &operator<<(ostream &os, const multiset<T>&p) {os << "["; for (auto&it : p)os << it << " "; return os << "]";}
template<class S, class T>ostream &operator<<(ostream &os, const map<S, T>&p) {os << "["; for (auto&it : p)os << it << " "; return os << "]";}
template<class T>void dbs(string str, T t) {cerr << str << ":" << t << "\n";}
template<class T, class...S>void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << ":" << t << ","; dbs(str.substr(idx + 1), s...);}
#else
#define deb(...){}
#define debarr(a,x,y){}
#define debmat(mat,row,col){}
#endif
#define pr(x) {cout << x << "\n"; return;}
template<class T> bool umin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool umax(T &a, T b) { return a < b ? (a = b, true) : false; }

#define int              long long
#define ld               long double
#define fi               first
#define se               second
#define mp               make_pair
#define pb               push_back
#define rep(i,n)         for(int i=0;i<n;i++)
#define re(i,n)          for(int i=1;i<=n;i++)
#define fr(i,a,b)        for(int i=a;i<=b;i++)
#define fb(i,a,b)        for(int i=a;i>=b;i--)
#define sz(x)            (int)x.size()
#define all(x)           x.begin(),x.end()
#define ini(x,y)         memset(x,y,sizeof(x))
typedef vector<int>      vi;
typedef pair<int, int>   pii;
typedef vector<pii>      vii;
typedef map<int, int>    mii;
typedef set<int>         si;
const int N = 1e6 + 10;
const int mod = 998244353;
int dp[N], a[N];
void add(int &x, int y)
{
	x = (x + y + mod) % mod;
}
void sub(int &x, int y)
{
	x = (x - y + mod) % mod;
}
void solve(int tc)
{
	int n, k;
	cin >> n >> k;
	vii v(k);
	rep(i, k) cin >> v[i].fi >> v[i].se;
	dp[1] = 1;
	int extra = 0;
	a[1] = 0;
	for (int i = 1; i <= n; i++)
	{
		if (i > 1) {
			add(extra, a[i]);
			dp[i] = extra;
		}
		rep(j, k)
		{
			int l = i + v[j].fi;
			int r = i + v[j].se;
			add(a[l], dp[i]);
			sub(a[r + 1], dp[i]);
		}
	}

	cout << dp[n] << endl;

}




signed main() {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

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

Measured memory_bytes: 8348