akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <iomanip>
#include <set>
using namespace std;
typedef long long int ll;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define yes cout << "yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl
#define no cout << "no" << endl

const int INF = 1001001001;
const int mod = 1000000007;
#define PI 3.14159265359;

void P(int x) {cout << x << endl;}
void P(long x) {cout << x << endl;}
void P(double x) {cout << x << endl;}
void P(ll x) {cout << x << endl;}
void P(string x) {cout << x << endl;}
void P(char x) {cout << x << endl;}

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

int main() {
  double n, t, a;
  cin >> n >> t >> a;
  double h;
  int ans = 0;
  double diff = INF;
  rep (i, n) {
    cin >> h;
    if (diff > abs(a - (t - 0.006 * h))) {
      diff = abs(a - (t - 0.006 * h));
      ans = i + 1;
    }
  }

  P(ans);

  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i < (n);i++)
#define ALL(obj) (obj).begin(),(obj).end()
#define SCANF(i) int i;scanf("%d",&i)
using namespace std;
using P = pair<int,int>;
const long long INF = 1LL << 60;
const int IINF=100000000;
const int MOD = (int)1e9 + 7;
typedef long long ll;
//約数列挙
vector<long long> divisor(long long n) {
    vector<long long> ret;
    for (long long i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ret.push_back(i);
            if (i * i != n) ret.push_back(n / i);
        }
    }
    //sort(ret.begin(), ret.end()); // 昇順に並べる
    return ret;
}
vector<int> dx={1,0,-1,0};vector<int> dy={0,-1,0,1};

signed main () {
    ll n;scanf("%lld",&n);
    printf("%lld:",n);
    for(int i=2;i*i<=n;i++){
        while(n%i==0){
            printf(" %d",i);
            n/=i;
        }
    }
    if(n!=1)printf(" %lld",n);
    printf("\n");
}


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


using namespace std;

int main()
{
    int x;
     cin>>x;
    vector<int> z(x);
    int k=1;


    int b=x;
    for(int i=0;i<x;i++)
    {
        cin>>z[i];

    }
    sort(z.begin(),z.end());

    for(int j=0;j<x;j++,k++)
    {
      if(z[j]==z[k]) b--;

    }
    cout<<b;




        return 0;
}


Measured memory_bytes: 256
from bisect import bisect_left


def can_make_tri(a, b, c):
    return a < b + c and b < c + a and c < a + b


N, *L = map(int, open(0).read().split())
L.sort()
ans = 0
for i in range(N - 2):
    for j in range(i + 1, N - 1):
        pos = bisect_left(L, L[i] + L[j], lo=j + 1)
        ans += pos - (j + 1)
print(ans)


Measured memory_bytes: 9284
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastScanner in = new FastScanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskD {
		public void solve(int testNumber, FastScanner in, PrintWriter out) {
			int n = in.nextInt();
			int[] p = new int[n];
			for (int i = 0; i < n; i++) {
				p[i] = in.nextInt() - 1;
			}
			int ans = 0;
			for (int i = 0; i < n; ) {
				if (i + 1 < n && p[i] == i && p[i + 1] == i + 1) {
					++ans;
					i += 2;
				} else {
					if (p[i] == i) {
						++ans;
					}
					i += 1;
				}
			}
			out.println(ans);
		}

	}

	static class FastScanner {
		private BufferedReader in;
		private StringTokenizer st;

		public FastScanner(InputStream stream) {
			in = new BufferedReader(new InputStreamReader(stream));
		}

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

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

	}
}



Measured memory_bytes: 32444
#include <bits/stdc++.h>
using namespace std;
#define M 1000000007
long long int power(int a,int b)
{
    if(b==0)
        return 1;
    long long int k=power(a,b/2);
    if(b%2==0)
        return ((k%M)*(k%M))%M;
    else
        return ((k%M)*(k%M)*(a%M))%M;
}
long long int fact(long long int n)
{
    if(n==1 || n==0)
        return 1;
    else
        return ((n%M)*(fact(n-1)%M))%M;

}
int div(int n)
{  int c=0;
    for(int i=1;i<sqrt(n);i++)
    {
        if(n%i==0)
        {
          c++;
        }
    }
    c=c*2;
    if(pow(sqrt(n),2)==(sqrt(n)*sqrt(n)))
        c++;
    return  c;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
     #ifndef ONLINE_JUDGE
 
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
 
   #endif
   
   int n;
   cin>>n;
   int a[n],b[n],c[n];
   for(int i=0;i<n;i++)
    cin>>a[i];
   for(int i=0;i<n;i++)
{
   cin>>b[i];
   c[i]=a[i]-b[i];
}
long long int sum=0;
for(int i=0;i<n;i++)
{
    if(c[i]>=0)
        sum+=c[i];
}
cout<<sum;
 



 return 0;
}








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

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;
#define rep(i,s,e) for(int i = (s); i < (e); ++i)
#define per(i,s,e) for(int i = (s)-1; i >= e; --i)

using ll = long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;

const int inf = 1001001001;

template<class T>
bool ChangeMax(T&a,const T&b){
  if(a >= b) return false;
  a = b;    return true;
}

template<class T>
bool ChangeMin(T&a,const T&b){
  if(a <= b) return false;
  a = b;    return true;  
}

template<typename T, size_t N, typename U>
void Fill(T (&a)[N], const U&v){
    std::fill((U*)a,(U*)(a+N),v);
}

bool HasSqrt(int x){
  for(int i = 1; i*i <= x; ++i){
    if(i*i == x) return true;    
  }
  return false;
}

int main(){
  int n,d;cin >> n >> d;
  int v[10][10];
  rep(i,0,n)rep(j,0,d)cin >> v[i][j];

  int ans = 0;
  rep(i,0,n){
    rep(j,i+1,n){
      int sum = 0;
      rep(k,0,d)sum += pow(v[i][k]-v[j][k],2);
      if(HasSqrt(sum))ans++;
    }
  }

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


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

int main(){
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = (double)((e*c-b*f) / (a*e-b*d));
		double y = (double)((-(d*c)+a*f) / (a*e-b*d));
		if(x == 0)x = 0;if(y == 0)y = 0;
		printf("%.3f %.3f\n", x, y);
	}
    return 0;
}

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

int main(){
    int a[5];
    int sum = 0;
    for(int i = 0; i<5;i++){
        cin >> a[i];
    }
    for(int i = 4; i>0; i--){
        for(int j = 0; j<i; j++){
            if(a[j] % 10 < a[j+1] % 10 || a[j+1] % 10 == 0)
                swap(a[j], a[j+1]);
        }
    }
    for(int i = 0; i<4; i++){
        sum += a[i];
        if(sum % 10 != 0)
            sum += (10 - sum % 10);
    }
    sum += a[4];
    cout << sum << endl;
    return 0;
}

Measured memory_bytes: 384
#include <stdio.h>

int main(void) {
	int S, h, m, s, amari;
	scanf("%d", &S);
	h = S / 3600;
	amari = S % 3600;
	m = amari / 60;
	s = amari % 60;
	printf("%d:%d:%d\n", h, m, s);
	return 0;
}


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

int64_t MOD = 1e9+7;
void add(int64_t& a, int64_t b){
    a = (a+b) % MOD;
}

int main(){
    string L;
    cin >> L;
    int N = L.size();
    static int64_t dp[100010][2];
    //dp[i][j] := 上から i 桁目までを決めて、
    //その桁までが (0,0),(0,1),(1,0) の3通りから選ばれていて、
    //a+b が L より小さいことが
    //確定している (j=1) /いない (j=0) ような選び方の個数
    dp[0][0] = 1;
    for(int i=0; i<N; i++){
        add(dp[i+1][1], 3*dp[i][1]);//これはi-1桁目まで見てL以下だった場合はi桁目に3通り選べる
        if(L[i] == '1'){
            add(dp[i+1][0], 2*dp[i][0]);//(0,1)か(1,0)の場合を考えている？
            add(dp[i+1][1], dp[i][0]);//これはi桁目を0にした場合の数を足している
        }else{
            add(dp[i+1][0], dp[i][0]);
        }
    }
    int64_t ans = (dp[N][0] + dp[N][1]) % MOD;
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 2048
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;

public class Main{
    static long cnt;
    static int l;
    static int[] A = new int[1000000];
    static int n;
    static ArrayList<Integer> G = new ArrayList<Integer>();

    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        for(int i = 0; i < n; i++){
            A[i] = Integer.parseInt(br.readLine());
        }
        cnt = 0;

        shellSort(A, n);

        StringBuilder sb = new StringBuilder();
        sb.append(G.size()).append("\n");
        for(int i = G.size() - 1; i >= 0; i--){
            if(i != G.size() - 1)sb.append(" ");
            sb.append(G.get(i));
        }
        sb.append("\n");
        sb.append(cnt).append("\n");
        for(int i = 0; i < n; i++){
            sb.append(A[i]).append("\n");
        }
        System.out.print(sb);
    }
    public static void shellSort(int[] A, int n){
        for(int h = 1; ; ){
            if(h > n) break;
            G.add(h);
            h = 3 * h + 1;
        }

        for(int i = G.size() - 1; i >= 0; i--){
            insertionSort(A, n, G.get(i));
        }
    }

    public static void insertionSort(int[] A, int n, int g){
        //int temp;                                                                    
        for(int i = g; i < n; i++){
            int v = A[i];
            int j = i - g;
            while( j >= 0 && A[j] > v){
                A[j + g] = A[j];
                j -= g;
                cnt++;
            }
            A[j + g] = v;
        }
    }

}

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


int main(){
  string s;
  cin >>s;
  int ans=0;
  if(s[0]==s[1] && s[2]==s[3])ans++;
  if(s[0]==s[3] && s[1]==s[2])ans++;
  if(s[0]==s[2] && s[1]==s[3])ans++;
  if(ans==1){cout << "Yes" << endl;}else{cout << "No" <<endl;}
}

Measured memory_bytes: 256
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

s = ns()

s = s.replace("BC", "D")

cnt = 0
ans = 0
for i in range(len(s)):
    if s[i] == 'A':
        cnt += 1
    elif s[i] == 'D':
        ans += cnt
    else:
        cnt = 0

print(ans)

Measured memory_bytes: 3628
while(1):
    comb = []
    count =0
    inp = raw_input().split(" ")
    if inp[0] == "0" and inp[1] == "0":
        break
    for i in range(1,int(inp[0])+1):
        for j in range(1,int(inp[0])+1):
            if i == j:
                break
            sum = i + j
            if sum > int(inp[1]):
                j = int(inp[0])
                break
            for k in range(1,int(inp[0])+1):
                if i == j or i == k or j == k:
                    break
                sum = i + j + k
                if sum > int(inp[1]):
                    k = int(inp[0])
                    break
                if sum == int(inp[1]):
                    if not ([i,j,k] in comb or [i,k,j] in comb or [j,k,i] in comb or [j,i,k] in comb or [k,i,j]  in comb or [k,j,i] in comb):
                        comb.append([i,j,k])
                        count += 1
    print count


Measured memory_bytes: 4716
#include<bits/stdc++.h>
using namespace std;
int main(){

	int n, a, b, c, d, e, f;
	cin>>n>>a>>b>>c>>d;
	if(n % a == 0) e = n / a * b;
	if(n % a != 0) e = (n / a + 1) * b;
	if(n % c == 0) f = n / c * d;
	if(n % c != 0) f = (n / c + 1) * d;
	if(e > f) cout<<f<<endl;
	if(e <= f) cout<<e<<endl;

	return 0;
}
	



Measured memory_bytes: 3120
#include<iostream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<bitset>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<long long, int> ll_i;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define int4(v, x, y, z) int v, x, y, z; scanf("%d%d%d%d", &v, &x, &y, &z)
#define int5(v, w, x, y, z) int v, w, x, y, z; scanf("%d%d%d%d%d", &v, &w, &x, &y, &z)
#define pri(x) cout << (x) << "\n"
#define pri2(x, y) cout << (x) << " " << (y) << "\n"
#define pri3(x, y, z) cout << (x) << " " << (y) << " " << (z) << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << (x) << "\n"
#define debug2(x, y) cout << " --- " << (x) << " " << (y) << "\n"
#define debug3(x, y, z) cout << " --- " << (x) << " " << (y) << " " << (z) << "\n"
#define X first
#define Y second
#define eps 0.0001
#define prid(x) printf("%.15lf\n", x)


signed main(void){
  int i, j;
  for(int testcase = 0;testcase >= 0;testcase++){
    char a, b;
    scanf("%c %c", &a, &b);
    puts(a == b ? "H" : "D");

/*/

//*/ break;
  }
  return 0;
}


Measured memory_bytes: 256
///-----Bismillahir Rahmanir Rahim-----///

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

///---FAST I/O---///
#define Boost() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

///---DATA TYPE---///
typedef long long ll;
typedef long long int lli;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<int>::iterator vit;
typedef set<int>::iterator sit;

///---LOOP---///
#define rep0(i,n) for(i=0;i<n;i++)
#define rep1(i,n) for(i=1;i<=n;i++)

///---I/O---///
#define sf scanf
#define pf printf

///---OTHERS---///
#define pb push_back
#define all(c)		c.begin(),c.end()
#define MK make_pair
#define F first
#define S second
#define endl '\n'


///---INITIALIZATION---//
#define mem(a,b) memset(a, b, sizeof(a) )

///---CALCULATE---///
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define sqr(a) ((a) * (a))

///---BIT OPERATION---///
inline bool checkBit(ll n, int i)
{
    return n&(1LL<<i);
}
inline ll setBit(ll n, int i)
{
    return n|(1LL<<i);;
}
inline ll resetBit(ll n, int i)
{
    return n&(~(1LL<<i));
}

///------String/Char Related Functions-----///
string makeintString(int x)
{
    stringstream ss;
    ss << x;
    string str = ss.str();
    ///cout<<str<<endl;
    return str;
}
string makellString(ll x)
{
    stringstream ss;
    ss << x;
    string str = ss.str();
    ///cout<<str<<endl;
    return str;
}
char cpp(char c)
{
    return static_cast<char>(c + 1);
}

///------------Sorting STL----------///
struct func
{
    //this is a sample overloading function for sorting stl
    bool operator()(pii const &a, pii const &b)
    {
        if(a.F==b.F)
            return (a.S<b.S);
        return (a.F<b.F);
    }
};

///---CONSTANT---///
const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007

int main()
{
    Boost();

    int t;
    t=1;
    //cin>>t;
    while(t--)
    {
        int n,ans=inf;
        cin>>n;
        int a[n+5];
        for(int i=0; i<n; i++) cin>>a[i];

        for(int i=-100;i<=100;i++)
        {
            int cost=0;
            for(int j=0;j<n;j++)
            {
               cost+=(i-a[j])*(i-a[j]);
            }
            ans=min(ans,cost);
        }
         cout<<ans<<endl;
    }
    return 0;
}


Measured memory_bytes: 3668
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        int j = scanner.nextInt();
        int k = scanner.nextInt();
        if(i==j && i!=k || i==k && i!=j || j==k && j!=i){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
}


Measured memory_bytes: 25044
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
using ll = long long;
using P = pair<int, int>;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(), v.end()
#define sz(x) ((int) x.size())
#define pb push_back
#define mp make_pair
#define F first
#define S second
typedef vector<ll> vi;
const int MOD = 1000000007;
template<class T> void print(const T& t){ cout << t << endl; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main(){
  ll n;
  cin >> n;
  bool ans = false;
  for (ll i = 1; i <= 9;i++){
    if(n%i==0&&n/i<=9){
      ans = true;
    }
  }
  if(ans){
    print("Yes");
  }
  else{
    print("No");
  }
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
using namespace std;
typedef long long ll;

int main(void){
    ll a[5], n, mn = 1e18;
    cin >> n>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];
    for (int i = 0; i < 5; i++) {
        mn = min(mn, a[i]);
    }
    
    cout << ((n - 1) / mn + 1) + 4 << endl;
}


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

int Awar, Bwar;
int Csug, Dsug;
int Esaturate;
int Fweight;
vector<int> water;
vector<int> suger;

int main() {
    cin >> Awar >> Bwar >> Csug >> Dsug >> Esaturate >> Fweight;

    for (int i = 0; i <= Fweight; i++) {
        for (int a = 0; a < i/(Awar*100) +1; a++) {
            int b = (i - a*Awar*100)/Bwar*100;
            if (a*Awar*100 + b*Bwar*100 == i) {
                water.push_back(i);
                break;
            }
        }
    }
    for (int i = 0; i <= Fweight; i++) {
        for (int c = 0; c < i/Csug + 1; c++) {
            int d = (i - c*Csug)/Dsug;
            if (c*Csug + d*Dsug == i) {
                suger.push_back(i);
                break;
            }
        }
    }
    int answeight = 0, anssuger = 0;
    double maxconcentrate = 0;
    for (auto wat: water) {
        for (auto sug: suger) {
            int weight = wat + sug;
            int candissolution = wat*Esaturate/100;
            double concentrate = (double)sug/weight;
            if (candissolution >= sug && maxconcentrate <= concentrate && Fweight >= weight) {
                maxconcentrate = concentrate;
                answeight = weight;
                anssuger = sug;
            }
        }
    }
    printf("%d %d\n", answeight, anssuger);
    return 0;
}

Measured memory_bytes: 256
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int p = 700;

		// 文字列の入力
		String s = sc.next();

		String[] sr = s.split("");

		for(String ss : sr) {
			if("o".equals(ss)) {
				p += 100;
			}
		}

		// 出力
		System.out.println(p);
	}
}

Measured memory_bytes: 20820
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author yassin
 */

#include <fstream>

#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <cstdlib>
#include <tuple>
#include <queue>
#include <functional>
#include <stack>
#include <cassert>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pair<int,int>> vii;

class arc068C {
public:
    void solve(istream& in, ostream& out) {
        int64_t x;
        in >> x;
        
        int64_t num = x / (6 + 5);
        
        x -= num * 11;
        
        int64_t res = num * 2;
        while (x > 0) {
            x -= 6;
            ++res;
            if (x <= 0) {
                break;
            }
            x -= 5;
            ++res;
        }
        
        out << res << endl;
        
    }
};


int main() {
	std::ios::sync_with_stdio(false);

	arc068C solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


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

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

    int a=(n+1)/2-1;
    vector<int>ans;
    if(n&1){
        int ma;
        double val=-114514;
        for(int i=0;i<=m;i++){
            int x;
            if(i<=m/2){
                x=(n+1)/2*i+n/2*m;
            }
            else{
                x=(n+1)/2*i;
            }
            double y=(i-1.0*x/n);
            if(val<y){
                val=y;
                ma=i;
            }
        }

        if(ma<=m/2){
            for(int i=0;i<(n+1)/2;i++)ans.push_back(ma);
            for(int i=0;i<n/2;i++)ans.push_back(m);
        }
        else{
            for(int i=0;i<n/2;i++)ans.push_back(0);
            for(int i=0;i<(n+1)/2;i++)ans.push_back(ma);
        }
    }

    else{
        int ma1,ma2;
        double val=0;
        for(int i=0;i<=m;i++){
            for(int j=i;j<=m;j++){
                int x;
                if(i+j<=m*2){
                    x=i*n/2+j+(n-1)/2*m;
                }
                else{
                    x=i+j*n/2;
                }
                double y=fabs(1.0*(i+j)/2-1.0*x/n);
                if(val<y){
                    val=y;
                    ma1=i;
                    ma2=j;
                }
            }
        }

        if(ma1+ma2<=m*2){
            for(int i=0;i<n/2;i++)ans.push_back(ma1);
            ans.push_back(ma2);
            for(int i=0;i<(n-1)/2;i++)ans.push_back(m);
        }
        else{
            for(int i=0;i<(n-1)/2;i++)ans.push_back(0);
            ans.push_back(ma1);
            for(int i=0;i<n/2;i++)ans.push_back(ma2);
        }
    }

    for(int i=0;i<n;i++){
        if(i)cout<<" ";
        cout<<ans[i];
    }
    cout<<endl;
    return 0;
}

Measured memory_bytes: 1224
import java.io.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {

		int N = nextInt();
		int M = nextInt();
		int C = nextInt();
		int[] B = nextInts();
		int[][] A = new int[N][];
		for(int i=0;i<N;i++){
			A[i] = nextInts();
		}
		int ans = 0;
		for(int i=0;i<N;i++){
			long tmp =0;
			for(int k=0;k<M;k++){
				tmp+=B[k]*A[i][k];
			}
			if(tmp+C>0){
				ans++;
			}
		}

		System.out.println(ans);

	}

	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


}


Measured memory_bytes: 21204
#include <iostream>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <string>
#include <sstream>
#include <algorithm>
#include <random>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <cassert>
#include <climits>
#include <bitset>
#include <functional>
#include <iomanip>
#include <random>


#define FOR_LT(i, beg, end) for (int i = beg; i < end; i++)
#define FOR_LE(i, beg, end) for (int i = beg; i <= end; i++)
#define FOR_DW(i, beg, end) for (int i = beg; end <= i; i--)

using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout << fixed << setprecision(20);

	string s; cin >> s;
	if (s.size() & 1) {
		cout << "No" << endl;
		return 0;
	}

	for (int i = 0; i < s.size(); i += 2) {
		if (s[i] != 'h' || s[i + 1] != 'i') {
			cout << "No" << endl;
			return 0;
		}
	}

	cout << "Yes" << endl;
	return 0;
}

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


typedef pair<ll,ll> P;
const ll MO = 1000000007;


int main(){
    string s,t;
    cin >> s >> t;
    vector<vector<int>> dp(s.size()+5,vector<int>(t.size()+5));
    rep(i,s.size()+5)dp[i][0]=0;
    rep(i,t.size()+5)dp[0][i] = 0;
    s.insert(0," ");t.insert(0," ");
    rrep(i,s.size()){
        rrep(j,t.size()){
            if(s[i]==t[j])dp[i][j] = dp[i-1][j-1]+1;
            else{
                dp[i][j] = max(dp[i][j-1],dp[i-1][j]);
            }
        }
    }

    // rep(i,s.size()){
    //     rep(j,t.size()){
    //         cout << dp[i][j] << " ";
    //     }
    //     cout << endl;
    // }

    
    int cnt = dp[s.size()-1][t.size()-1];
    string ans="";
    
    int i = s.size()-1;
    int j = t.size()-1;
    // cout << "i,j:" << i << " "<< j << endl;
    // cout << cnt << endl;
    while(cnt>0){
        if(s[i]==t[j]){
            ans.push_back(s[i]);
            --i;--j;--cnt;
            // cout <<dp[i][j] << s[i]<<endl;;
    
            
        }
        else if (dp[i][j] == dp[i-1][j])i--;
        else {
            j--;
        }
    }
    reverse(ans.begin(),ans.end());
    cout << ans<<endl;
    return 0;
}

Measured memory_bytes: 35712
# D
# find primes s.t. p == 1(mod 5)
N = int(input())

primes = [1]*55555
primes[0] = 0
primes[1] = 0

for i in range(250):
    if primes[i] == 1:
        for j in range(2*i, 55555, i):
            primes[j] = 0

res_list = []
for i in range(55555):
    if primes[i] == 1 and i % 5 == 1:
        res_list.append(str(i))
    if len(res_list) == N:
        break
print(" ".join(res_list))

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

/*int main(){//C
    int N;cin>>N;
    vector<int> H(N);
    rep(i,0,N) cin>>H.at(i);
    int c=0;
    int max=0;
    int j=N-1;
    while(j>max&&j!=0){
        rep(i,N-(j+1),N-1) 
        if(H.at(i)>=H.at(i+1)) c++;
        else {
            j--;
            break;
        }
        if(c>=max) max=c;
        c=0;
    }
    cout<<max<<endl;
    return 0;
}*/

int main(){//D
    int N;cin>>N;
    long long j=0;
    rep(i,0,N) j+=i;
    cout<<j<<endl;
    return 0;
}

/*int main(){//A
    string S,T;
    cin>>S>>T;
    int c=0;
    for(int i=0;i<S.size();i++){
        if(S.at(i)==T.at(i)) c++;
    }
    cout<<c<<endl;
    return 0;
}*/

/*int main() {//B
    int A,B;
    cin>>A>>B;
    int c=1;
    int a=A;
    if(B==1) c=0;
    else{
        while(A<B){
            A+=a-1;
            c++;
        }
    }
    cout<<c<<endl;
    return 0;
}*/

Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);++i)
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
int gcd(int a,int b) { return b ? gcd(b,a%b) : a;}
int lcm(int a,int b) { return a/gcd(a,b)*b;}
void printb(unsigned int v) {
  unsigned int mask = (int)1 << (sizeof(v) * CHAR_BIT - 1);
  do putchar(mask & v ? '1' : '0');
  while (mask >>= 1);
}
void putb(unsigned int v) {putchar('0'), putchar('b'), printb(v), putchar('\n');}
#define ALL(W) (W).begin(),(W).end()

signed main(){
  int N,M;
  cin >> N >> M;
  if(N>M) swap(N,M);
  if(N==1){
    if(M==1) cout << 1 << endl;
    else if(M==2) cout << 0 << endl;
    else cout << M-2 << endl;
  }
  else if(N==2) cout << 0 << endl;
  else cout << (N-2)*(M-2) << endl;
  return 0;
}


Measured memory_bytes: 256
import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.lang.StringBuilder
import java.math.BigInteger
import java.util.*

fun PrintWriter.solve(sc: FastScanner) {
    val r = sc.nextInt()
    val g = sc.nextInt()
    val b = sc.nextInt()
    val n = sc.nextInt()
    var ans = 0L
    for (i in 0..n) {
        for (j in 0..n) {
            val x = n - i * r - j * g
            if (x < 0) continue
            if (x % b == 0) {
                ans++
            }
        }
    }
    println(ans)
}

fun main(args: Array<String>) {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}


Measured memory_bytes: 31388
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    # https://qiita.com/drken/items/dc53c683d6de8aeacf5a#dp-%E5%AE%9F%E8%A3%85%E3%81%AE%E9%A0%86%E5%BA%8F
    
    
    INF = 10**10  # INF+INFを計算してもオーバーフローしない範囲で大きく
    
    N = int(input())
    S=input()
    # dpテーブル dp[i][j]:= ...
    dp = [[0]*N for _ in range(N)]
    
    # 初期条件
    dp[0][0] = 0
    for i in range(N-1):
        if S[i]==S[N-1]:
            dp[N-1][i]=1


    # ループ
    for i in reversed(range(N-1)):
        for j in reversed(range(N-1)):
            if i>j:
                if S[i]!=S[j]:
                    dp[i][j]=0
                else:
                    dp[i][j]=min(i-j,dp[i+1][j+1]+1)
    
    ans=0
    for i in reversed(range(N)):
        for j in reversed(range(N)):
            if i>j:
                ans=max(ans,dp[i][j])
    print(ans)

    
    
resolve()

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

int cmpstr(const void * a, const void * b){
     const char *x = a, *y = b;
     return strcmp(x, y);

     //return 0;
}

int main(){
     int n, l;
     scanf("%d %d", &n, &l);

     char s[n][l+1];
     
     for(int i = 0; i < n; ++i){
          scanf("%s", s[i]);
     }

     qsort(s, n, sizeof(s[0]), cmpstr);

     for(int i = 0; i < n; ++i){
          printf("%s", s[i]);
     }
     printf("\n");


     return 0;
}


Measured memory_bytes: 128
//INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
//DEFINE
//------------------------------------------
#define ll long long
#define ld long double
#define ALLv(a)  (a).begin(),(a).end()
#define ALL(a,n)  (a),(a)+n
#define vi vector<long long>
#define vd vector<long double>
#define vs vector<string>
//CONST
//------------------------------------------
#define INF 1010000000000000017LL
#define MOD 1000000007LL
#define EPS 1e-12
#define PI 3.14159265358979323846
//REPEAT
//------------------------------------------
#define   FOR(i,m,n) for(ll (i)=(m);   (i)<(n);  (i)++)
#define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
#define  REPS(i,x)   for(ll (i)=1;     (i)<=(x); (i)++)
#define  RREP(i,x)   for(ll (i)=(x)-1; (i)>=0;   (i)--)
#define RREPS(i,x)   for(ll (i)=(x);   (i)> 0;   (i)--)
#define  WREP(i,in,j,jn) REP(i,in)REP(j,jn)
//-----------------------------------------
#define dcml(n) fixed<<setprecision(n)
using namespace std;
int main(void){
    priority_queue<ll,vector<ll>,less<ll>> que;
    ll N;cin>>N;

    ll A;ll mx=0;
    REP(i,N){
        cin>>A;
        que.push(A);
    }
    que.push(-1);
    ll cnt=0;ll z=0;ll c=0;
    REP(i,N+1){
        auto r=que.top();que.pop();
        if(r==-1){
            if(c%2==1)cnt++;
            break;
        }
        if(i==0||z==r)c++;
        else{
            if(c%2==1){
                cnt++;
            }
            c=1;
        }
        z=r;
    }
    cout<<cnt<<"\n";
}

Measured memory_bytes: 1400
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(){
  map<string,char>t2;
  map<char,string>t1;
  t1['A']="00000";
  t1['B']="00001";
  t1['C']="00010";
  t1['D']="00011";
  t1['E']="00100";
  t1['F']="00101";
  t1['G']="00110";
  t1['H']="00111";
  t1['I']="01000";
  t1['J']="01001";
  t1['K']="01010";
  t1['L']="01011";
  t1['M']="01100";
  t1['N']="01101";
  t1['O']="01110";
  t1['P']="01111";
  t1['R']="10001";
  t1['S']="10010";
  t1['T']="10011";
  t1['U']="10100";
  t1['V']="10101";
  t1['W']="10110";
  t1['X']="10111";
  t1['Y']="11000";
  t1['Z']="11001";
  t1[' ']="11010";
  t1['.']="11011";
  t1[',']="11100";
  t1['-']="11101";
  t1['\'']="11110";
  t1['?']="11111";
  t1['Q']="10000";

  t2["101"]=' ';
  t2["000000"]='\'';
  t2["000011"]=',';
  t2["10010001"]='-';
  t2["010001"]='.';
  t2["000001"]='?';
  t2["100101"]='A';
  t2["10011010"]='B';
  t2["0101"]='C';
  t2["0001"]='D';
  t2["110"]='E';
  t2["01001"]='F';
  t2["10011011"]='G';
  t2["010000"]='H';
  t2["0111"]='I';
  t2["10011000"]='J';
  t2["0110"]='K';
  t2["00100"]='L';
  t2["10011001"]='M';
  t2["10011110"]='N';
  t2["00101"]='O';
  t2["111"]='P';
  t2["10011111"]='Q';
  t2["1000"]='R';
  t2["00110"]='S';
  t2["00111"]='T';
  t2["10011100"]='U';
  t2["10011101"]='V';
  t2["000010"]='W';
  t2["10010010"]='X';
  t2["10010011"]='Y';
  t2["10010000"]='Z';
 
 string s,t;
  while(getline(cin,s)){
    t="";
    for(int i=0;i<s.size();i++)
      t+=t1[s[i]];
    string ans;
    for(int i=0;i<t.size();i++){
      ans+=t[i];
      if(t2[ans]){
	cout<<t2[ans];
	ans="";
      }
    }
    cout<<endl;
  }
}

Measured memory_bytes: 3156
import java.util.*;
import static java.lang.System.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(in);
int H=sc.nextInt();
int W=sc.nextInt();
int[][] a=new int[H][W];
for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
        a[i][j]=sc.nextInt();
    }
}
String[] s=new String[W*H*2];
int c=0;
for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
        if(a[i][j]%2!=0){
            if(i!=H-1){
                s[++c]=String.valueOf(i+1)+" "+String.valueOf(j+1)+" "+String.valueOf(i+2)+" "+String.valueOf(j+1);
                
                a[i][j]--;
                a[i+1][j]++;
            }else if(j!=W-1){
                s[++c]=String.valueOf(i+1)+" "+String.valueOf(j+1)+" "+String.valueOf(i+1)+" "+String.valueOf(j+2);
                
                a[i][j]--;
                a[i][j+1]++;
            }
        }
    }
}
s[0]=String.valueOf(c);
for (int j = 0; j <= c; j++) {
    out.println(s[j]);
}
}
}

Measured memory_bytes: 106708
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i,s,f) for(i=s;i<f;i++)
#define print(v) for(auto &z:v) cout<<z<<' ';cout<<'\n'
#define hi cout<<'h'<<'i'<<'\n' 
#define pb push_back
#define pii pair<int,int>
#define F first
#define S second
#define B begin()
#define E end()
#define all(v) v.B,v.E
#define sz(v) (int)((v).size())
#define vi vector<int>
#define vii vector<pair<int,int>>
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define clk1 clock_t start_time=clock()
#define clk2 cout<<(clock()-start_time)/(double)CLOCKS_PER_SEC
#define clean(arr) memset(arr,0,sizeof(arr))
#define mod 1000000007
#define mod2 998244353
#define space 100005
//<<fixed << setprecision(9)

int main()
{
    int n,i,j,t;
    boost;
    cin>>n;
    set<string> st;
    rep(i,0,n)
    {
        string s;
        cin>>s;
        st.insert(s);
    }
    cout<<sz(st);
    return 0;
}



Measured memory_bytes: 19236
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<cstdlib>
#include<map>
#include<fstream>
#include<string>
#include<sstream>
#include<iomanip>
#include<stdio.h>
#include<iostream>
#include<numeric>
using namespace std;

int main() {
	int k, x;
	cin >> k >> x;
	for (int i = x - k + 1; i < x + k-1; i++) {
		cout << i << ' ';
	}
	cout << x + k - 1 << endl;
}

Measured memory_bytes: 256
#include<iostream>
using namespace std;
template<class T>
class DequeSlide {
  T *d;
  int *q;
  int n, l, s, t;
  int cur;

public:
  DequeSlide(int n, int l) {
    d = new T[n];
    q = new int[n];
    this->n = n;
    this->l = l;
    s = t = cur = 0;
  }

  void push(T x) {
    if(s<t && q[s] == cur-l) s++;
    while(s<t && d[q[t-1]] >= x) t--;
    q[t++] = cur;
    d[cur++] = x;
  }

  T get() {
    return d[q[s]];
  }

};

int main() {
  int N, L, a;
  cin >> N >> L;
  DequeSlide<int> slide(N, L);
  for(int i = 0; i < L-1; ++i){
    cin >> a;
    slide.push(a);
  }

  for(int i = 0; i < N-L+1; ++i){
    cin >> a;
    slide.push(a);
    cout << (i ? " " : "") << slide.get();
  }
  cout << endl;

  return 0;
}



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

#define REP(i, n, N) for(ll i=(n); i<(N); i++)
#define RREP(i, n, N) for(ll i=(N-1); i>=n; i--)
#define SPACEREP(lst,itr) for(auto itr=lst.begin(); itr!=lst.end();++itr){cout<<*itr<<(++itr!=anslist.end()?" ":"\n");itr--;}
#define CK(n, a, b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define MCP(a, b) memcpy(b,a,sizeof(b))
#define p(s) cout<<(s)<<endl
#define p2(a, b) cout<<(a)<<" "<<(b)<<endl
#define v2(T) vector<vector<T>>
typedef long long ll;
using namespace std;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const ll maxi = 7368792;

int main(){
    int m,n;
    vector<bool> bamboo(maxi);
    while(cin >> m >> n,m+n!=0){
        REP(i,0,maxi){
            if(i<m){
                bamboo[i]=true;
            }else{
                bamboo[i]=false;
            }
        }
        int cnt=0;
        ll ans;
        for(ll i=m;i<maxi;i++){
            if(!bamboo[i]){
                bamboo[i]=true;
                for(ll j=2*i;j<maxi;j+=i) bamboo[j]=true;
                if(n==cnt){
                    //cout << "cnt " << cnt <<endl;
                    ans=i;
                    break;
                }
                cnt++;
            }
        }
        
        p(ans);
    }
}



Measured memory_bytes: 3392
#include<bits/stdc++.h>
using namespace std;
 
using ll = long long;
using pll = pair<ll, ll>;
#define all(x) (x).begin(), (x).end()
#define call(x) (x).cbegin(), (x).cend()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define sz(x) ((x).size())
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define rep(i, a, b) for(ll i = ll(a); i < ll(b); i++)
const double PI = acos(-1);
const int mod = 1e9+7;
const long long INF = (1LL << 60);
const int dx[] = {0,1,0,-1,1,1,-1,-1};
const int dy[] = {1,0,-1,0,1,-1,-1,1};
ll gcd(ll a,ll b){return b ? gcd(b,a%b) : a;}
ll lcm(ll a,ll b){return a / gcd(a,b) * b;}
ll stringcount(string s, char c){return count(s.cbegin(), s.cend(), c);}
bool isInteger(double x){return floor(x) == x;}
ll ceil(ll a, ll b){return ((a)+(b)-1)/b;}
template<class T> inline bool chmax(T &a, const T &b){ if(a < b){ a=b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b){ if(a > b){ a=b; return 1; } return 0; }

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

  string s;
  cin >> s;

  if(s == "Sunny") cout << "Cloudy" << endl;
  else if(s == "Cloudy") cout << "Rainy" << endl;
  else cout << "Sunny" << endl;

  return 0;
}

Measured memory_bytes: 256
n, m = map(int, input(). split())
x = list(map(int, input(). split()))
x.sort()
l = [x[i+1]-x[i] for i in range(m-1)]
l.sort()
L = l[:-(n-1)]
if n == 1:
  print(sum(l))
else:
  print(sum(L))


Measured memory_bytes: 56744
n=int(raw_input())
a=[[0 for x in range(10)] for x in range(12)]


for i in range(n):
	b,f,r,v=map(int,raw_input().split())
	a[b*3+f-4][r-1] += v
for i in range(12):
	print " "+" ".join(map(str,a[i]))
	if i==2 or i==5 or i==8:
		print "#"*20




Measured memory_bytes: 4652
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dump(...)
#endif
#define endl "\n"
#define ll long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(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 INF 2147483647
#define LLINF 9223372036854775807LL
#define vi vector<int>
#define vvi vector<vector<int>>
#define pi pair<int, int>
#define ALL(a) (a).begin(), (a).end()
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてからつかうこと
constexpr ll MOD = 1e9 + 7;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
ll ans = 0;

template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &x : vec)
        is >> x;
    return is;
}

signed main() {
    cin >> N >> M;
    vi a(N);
    cin >> a;
    sort(a.rbegin(), a.rend());
    REP(i, M)
    ans += a[i];
    cout << ans << endl;
}

Measured memory_bytes: 3636
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <queue>

#define CHECK_IMPL1(cond)                \
    if (!(cond)) {                       \
      DEBUG("expected cond: " << #cond); \
      assert(cond);                      \
    }

#define CHECK_IMPL2(cond, message)                                              \
    if (!(cond)) {                                                              \
      DEBUG("expected cond: " << #cond << " failed with message: " << message); \
      assert(cond);                                                             \
    }

#define CHECK_IMPL(_1, _2, NAME, ...) NAME
#define CHECK(...) CHECK_IMPL(__VA_ARGS__, CHECK_IMPL2, CHECK_IMPL1, CHECK_IMPL0)(__VA_ARGS__)

#ifdef __APPLE__
#define DEBUG(message) std::cerr << message << std::endl;
#else
#define DEBUG(message)
#endif

constexpr int MOD = 1e9 + 7;

int add(int64_t a, int64_t b) {
  int64_t s = a + b;
  return ((s + MOD) % MOD + MOD) % MOD;
}

int mul(int64_t a, int64_t b) {
  return (a * b) % MOD;
}

void solve() {
  int n;
  std::cin >> n;

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

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

  int ans = 0;
  for (int i = 0; i < n; ++i) {
    int64_t s = sum - a[i];
    ans = add(ans, mul(a[i], s % MOD));
  }

  std::cout << mul(ans, 500000004) << std::endl;
}

int main() {
#ifdef __APPLE__
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);
#endif
  int t = 1;
  //std::cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}


Measured memory_bytes: 3640
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>

using namespace std;

const int MOD = 1000000007;
typedef pair<int, int> P;
typedef long long ll;
#define rep(i, m, n) for(int i=m;i<n;i++)
#define rrep(i, n, m) for(int i=n;i>=m;i--)

ll dp[2050][2050] = {};

int main() {
    int N, M;
    cin >> N >> M;
    vector<int> s(N), t(M);
    rep(i, 0, N) cin >> s[i];
    rep(i, 0, M) cin >> t[i];

    for (int i = 1; i <= N; ++i) {
        for (int j = 1; j <= M; ++j) {
            if (s[i - 1] == t[j - 1]) {
                dp[i][j] += dp[i - 1][j - 1] + 1;
                dp[i][j] %= MOD;
            }
            dp[i][j] += (dp[i - 1][j] + dp[i][j - 1]) % MOD - dp[i - 1][j - 1];
            if (dp[i][j] < 0) {
                dp[i][j] += MOD;
            } else {
                dp[i][j] %= MOD;
            }
        }
    }
    cout << (dp[N][M] + 1) % MOD << endl;
}


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

int main(){
  vector<int> v(3);
  for (int i = 0; i < 3 ; i++){
    cin >> v[i];
  }
  sort(v.begin(),v.end());
  cout << v[2] - v[0] << endl;
}

Measured memory_bytes: 256