akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <numeric>
#include <cmath>
#include <limits>
#include <stdio.h>
#include <iomanip>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
using namespace std;
using ll = long long;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
ll Max(ll(a), ll(b), ll(c)) {
	return max(max(a, b), c);
}
ll Min(ll(a), ll(b), ll(c)) {
	return min(min(a, b), c);
}





int main() {

	ll A, B, C, X, Y,an=9999999999999;
	cin >> A >> B >> C >> X >> Y;
	rep(i, 100009) {
		ll p =2* C * i + max(X - i, ll(0)) * A + max(Y - i, ll(0)) * B;
		an = min(an, p);
	}
	cout << an << endl;
		
}


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

namespace ABC132_A
{
    class Program
    {
        static void Main(string[] args) {
            string input = Console.ReadLine();
            string str1 = input.Substring(0, 1);
            string str2 = "";
            int str1Index = 0;
            int str2Index = 0;
            bool str1arraive = false;

            List<string> inputStr = new List<string>();
            for(int i = 0; i < 4; i++) {
                inputStr.Add(input.Substring(i, 1));
                if(str1 != inputStr[i]) {
                    str2 = inputStr[i];
                }
            }
            if(str2 == "") {
                Console.WriteLine("No");
                return;
            }

            int str1Count = inputStr.Where(str => str == str1).Count();
            int str2Count = inputStr.Where(str => str == str2).Count();

            if(str1Count == 2 && str2Count == 2) {
                Console.WriteLine("Yes");
                return;
            } else {
                Console.WriteLine("No");
                return;
            }

            for (int i = 1; i < 4; i++) {
                string str = input.Substring(i, 1);
                if(str1 == str) {
                    str1Index = i;
                    str1arraive = true;
                } else {
                    str2 = str;
                    str2Index = i;
                }

                if(str1 == str && str1Index != 0 && str1arraive) {
                    Console.WriteLine("No");
                    return;
                }
            }

            if(str1Index == 0 || str2Index == 0) {
                Console.WriteLine("No");
                return;
            }

            for (int i = 1; i < 4; i++) {
                if (i == str2Index && str2 == input.Substring(i, 1)) {
                    Console.WriteLine("Yes");
                    return;
                }
            }
          
            Console.WriteLine("No");

            //string[] input = Console.ReadLine().Split();
            //int number1 = int.Parse(input[0]);

            //List<long> list = new List<long>();
            //for(int i = 0; i < number1; i++) {
            //    input = Console.ReadLine().Split();
            //    list.Add(long.Parse(input[0]));
            //}
        }
    }
}

Measured memory_bytes: 13396
from collections import deque
def bfs(maze, visited, sy, sx, gy, gx):
    queue = deque([[sy, sx]])
    visited[sy][sx] = 0
    while queue:
        y, x = queue.popleft()
        if maze[y+1][x]=="#" and maze[y][x+1]=="#":
            return("Impossible")
        for j, k in ([-1, 0], [0, -1]):
            new_y, new_x = y+j, x+k
            if maze[new_y][new_x] == "#" and visited[new_y][new_x] == -1:
                return("Impossible")
        for j, k in ([1, 0], [0, 1]):
            new_y, new_x = y+j, x+k
            if maze[new_y][new_x] == "#" and visited[new_y][new_x] == -1:
                visited[new_y][new_x] = visited[y][x] + 1
                queue.append([new_y, new_x])
        if x==gx and y==gy:
            return("Possible")
h,w=map(int,input().split())
sy,sx=1,1
gy,gx=h,w
maze =["$"*(w+2)]+["$"+input()+"$" for i in range(h)]+["$"*(w+2)]
visited = [[-1]*(w+2) for j in range(h+2)]
print(bfs(maze, visited, sy, sx, gy, gx))

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

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

using ll = long long;
using lb = long double;
using P = pair<ll,ll>;
using graph = vector<vector<ll>>;

const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ll INF = 1LL<<60;
const ll mod = 1000000007LL;

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

vector<int> b,w;

int main() {
  int N,M;
  cin>>N>>M;
  vector<string> grid(N);
  rep(i,N) cin>>grid[i];
  vector<vector<int>> col(N,vector<int>(M,0));
  rep(i,N){
    rep(j,M){
      if(j!=0) col[i][j] = 1-col[i][j-1];
      else if(i!=0) col[i][j] = 1-col[i-1][j];
      if(grid[i][j] == '.'){
        if(col[i][j]==0) b.push_back(i*M+j);
        else w.push_back(i*M+j);
      }
    }
  }
  mf_graph<ll> mf(N*M+2);
  int cnt = 0;
  for(auto x:b){
    int p = x/M;
    int q = x%M;
    rep(i,2){
      int nx = p + dx[i];
      int ny = q + dy[i];
      if(nx<0||nx>=N||ny<0||ny>=M) continue;
      if(grid[nx][ny]=='#') continue;
      mf.add_edge(x,nx*M + ny,1);
      cnt++;
    }
  }
  for(auto x:w){
    int p = x/M;
    int q = x%M;
    rep(i,2){
      int nx = p + dx[i];
      int ny = q + dy[i];
      if(nx<0||nx>=N||ny<0||ny>=M) continue;
      if(grid[nx][ny]=='#') continue;
      mf.add_edge(nx*M + ny,x,1);
      cnt++;
    }
  }
  for(auto x:b) mf.add_edge(N*M,x,1);
  for(auto x:w) mf.add_edge(x,N*M+1,1);
  cout<<mf.flow(N*M,N*M+1)<<endl;
  vector<string> ans = grid;
  rep(i,cnt){
    if(mf.get_edge(i).flow==1) {
      int a = mf.get_edge(i).from,b = mf.get_edge(i).to;
      if(b - a == M) {
        ans[a/M][a%M] = 'v';
        ans[b/M][b%M] = '^';
      }
      else if(b - a == -M) {
        ans[a/M][a%M] = '^';
        ans[b/M][b%M] = 'v';
      }
      else if(b-a ==1){
        ans[a/M][a%M] = '>';
        ans[b/M][b%M] = '<';
      }
      else if(b-a ==-1){
        ans[a/M][a%M] = '<';
        ans[b/M][b%M] = '>';
      }
    }
  }
  rep(i,N) cout<<ans[i]<<endl;
}

Measured memory_bytes: 5888
package main

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

var (
	readString func() string
	stdout     *bufio.Writer
)

func init() {
	readString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func readInt() int {
	return int(readInt64())
}

func readInt64() int64 {
	i, err := strconv.ParseInt(readString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = readInt()
	}
	return b
}

func readLengthAndSlice() []int {
	n := readInt()
	return readIntSlice(n)
}

func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(stdout, f, args...)
}

func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(stdout, args...)
}

func minInt(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func minUint(a, b uint) uint {
	if a < b {
		return a
	}
	return b
}

func minInt64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func minUint64(a, b uint64) uint64 {
	if a < b {
		return a
	}
	return b
}

func maxInt(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func maxUint(a, b uint) uint {
	if a < b {
		return b
	}
	return a
}
func maxInt64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}

func maxUint64(a, b uint64) uint64 {
	if a < b {
		return b
	}
	return a
}

func absInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func absInt64(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// readString() string
// readInt() int
// readIntSlice(n int) []int
// readLengthAndSlice() []int
func main() {
	defer stdout.Flush()
	n := readInt()
	k := readInt()
	ans := 0
	for i := 0; i < n; i++ {
		x := readInt()
		ans += 2 * minInt(x, k-x)
	}
	println(ans)
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
#define ll long long

using namespace std;

string s; 
ll k; 

int main () {
  cin >> s >> k; 
  int n = s.length(); 
  int op = 1; 
  for(int i = 1; i < n; i++) {
    if(s[i] != s[i - 1]) {
      op = 0; break ; 
    }
  }
  if(op) {
    printf("%lld\n", 1ll * n * k / 2); 
  }
  else {
    ll t1 = 0, t2 = 0; 
    for(int i = 0; i < n - 1; i++) {
      if(s[i % n] == s[(i + 1) % n]) {
        t1++; i++; 
      }
    }
    for(int i = 0; i + 1 < 2 * n; i++) {
      if(s[i % n] == (s[(i + 1) % n])) {
        t2++; i++; 
      }
    }
    printf("%lld\n", t1 + 1ll * (t2 - t1) * (k - 1)); 
  }
  return 0; 
}


Measured memory_bytes: 256
import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter
import kotlin.math.max

val br = BufferedReader(InputStreamReader(System.`in`))
val out = PrintWriter(System.out)

fun main() {
    br.use { out.use {
        solve()
        out.flush()
    } }
}

fun solve() {
//    a < b - 2 交換する
//    a == b tap
//    a > b　tap
    val (k, a, b) = readLongList()
    if (b - a <= 2) {
        out.println(k + 1)
    } else {
        val diff = b - a
        val count = max(k - (a - 1), 0)
        println(a + (count / 2) * diff + (count % 2))
    }
}

fun readInteger() = Integer.parseInt(br.readLine())
fun readLong() = java.lang.Long.parseLong(br.readLine())
fun readStringList() = br.readLine()!!.split(' ')
fun readIntegerList() = readStringList().map(Integer::parseInt)
fun readLongList() = readStringList().map(java.lang.Long::parseLong)
fun readDoubleList() = readStringList().map(java.lang.Double::parseDouble)


Measured memory_bytes: 36496
#pragma comment(linker, "/STACK:102400000,102400000")
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
#include <string>
#include <vector>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <sstream>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#define MOD 1000000007
#define lson root<<1,l,mid
#define rson root<<1|1,mid+1,r
#define Key_Value ch[ch[root][1]][0]
#define DBN1(a)           cerr<<#a<<"="<<(a)<<"\n"
#define DBN2(a,b)         cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define DBN3(a,b,c)       cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define DBN4(a,b,c,d)     cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define DBN5(a,b,c,d,e)   cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define DBN6(a,b,c,d,e,f) cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define clr(a,x) memset(a,x,sizeof(a))
using namespace std;
typedef long long ll;
const int maxn=500000+5;
const int INF=0x3f3f3f3f;
const double PI=acos(-1.0);
template<typename T> inline T gcd(T&a,T&b){return b==0?a:gcd(b,a%b);}
template<typename T> inline T lcm(T&a,T&b){return a/gcd(a,b)*b;}
template<typename T>
inline T read(T&x){
    x=0;int _f=0;char ch=getchar();
    while(ch<'0'||ch>'9')_f|=(ch=='-'),ch=getchar();
    while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar();
    return x=_f?-x:x;
}
string s;
map<char,int>mp;
int main(){
    cin>>s;
    for (int i=0;i<s.length();i++){
        mp[s[i]]++;
    }
    bool flag=false;
    for (int i=0;i<26;i++){
        char ss='a'+i;
        if (!mp.count(ss)){
            cout<<ss<<endl;
            flag=true;
            break;
        }
    }
    if (!flag) cout<<"None"<<endl;
    return 0;
}


Measured memory_bytes: 512
unittest
{
	assert( [ "100", "1" ].solve == 19 );
	assert( [ "25", "2" ].solve == 14 );
	assert( [ "314159", "2" ].solve == 937 );
	assert( [ "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", "3" ].solve == 117879300 );
	
	assert( [ "99", "3" ].solve == 0 );		// 追加ケース
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.map!( ( a ) => ( a - '0' ).to!( long ) ).array;
	input.popFront;
	auto k = input.front.to!( long );
	
	// dp[ i桁目 ][ i桁目までのゼロ以外の個数 ][ n未満フラグ ] = パターン数
	auto dp = new long[][][]( 1 + n.length, 1 + k + 1, 2 );
	dp[ 0 ][ 0 ][ 0 ] = 1;
	foreach( i, d; n )
	{
		foreach( j; 0L .. k + 1 )
		{
			if( d == 0 )
			{
				// 同値⇒同値
				dp[ i + 1 ][ j ][ 0 ] += dp[ i ][ j ][ 0 ];
			}
			else
			{
				// 同値⇒同値
				dp[ i + 1 ][ j + 1 ][ 0 ] += dp[ i ][ j ][ 0 ];
				
				// 同値⇒未満
				dp[ i + 1 ][ j     ][ 1 ] += dp[ i ][ j ][ 0 ];					// 0
				dp[ i + 1 ][ j + 1 ][ 1 ] += dp[ i ][ j ][ 0 ] * ( d - 1 );		// [1,d)
			}
			
			// 未満⇒未満
			dp[ i + 1 ][ j     ][ 1 ] += dp[ i ][ j ][ 1 ];			// 0
			dp[ i + 1 ][ j + 1 ][ 1 ] += dp[ i ][ j ][ 1 ] * 9;		// [1,10)
		}
	}
	return dp[ $ - 1 ][ k ].sum;
}


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

int main(){
  int h,w;
  cin>>h>>w;
  map<char,int> mp;
  rep(i,h)rep(j,w){
    char c; cin>>c;
    mp[c]++;
  }
  bool ans=1;
  bool odd=0;
  if(h%2==1 && w%2==1) odd=1;
  for(auto x : mp){
    if(x.second%2==1){
      if(odd){
        mp[x.first]--;
        odd=0;
      }
      else ans=0;
    }
  }
  int sec=0;
  if(h%2==1) sec+=w/2;
  if(w%2==1) sec+=h/2;
  for(auto x : mp){
    if(x.second%4!=0){
      if(sec>0)sec--;
      else ans=0;
    }
  }
  if(ans) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Measured memory_bytes: 3632
/* In the name of Allah */
#include<bits/stdc++.h>
using namespace std;

const int N = 2e3 + 5, P = 924844033;
int fact[N] = {1}, dp[N][N], cnt[N] = {1};

int main() {
	int n, k;
	cin >> n >> k;
	for (int i = 0; i <= n; i++) {
		for (int j = dp[i][0] = 1; j <= i; j++)
			dp[i][j] = (dp[i - 1][j] + dp[i - 2][j - 1]) % P;
		fact[i + 1] = (i + 1LL) * fact[i] % P;
	}
	for (int i = 0, s = 0; i < k; i++) {
		int x = (n + k - i - 1) / k;
		for (int j = (s += (x + 1) / 2); ~j; j--) {
			int ans = 0;
			for (int k = max(j - s + (x + 1) / 2, 0); k <= min((x + 1) / 2, j); k++)
				(ans += 1LL * cnt[j - k] * dp[x][k] % P) %= P;
			cnt[j] = ans;
		}
		for (int j = (s += x / 2); ~j; j--) {
			int ans = 0;
			for (int k = max(j - s + x / 2, 0); k <= min(x / 2, j); k++)
				(ans += 1LL * cnt[j - k] * dp[x][k] % P) %= P;
			cnt[j] = ans;
		}
	}
	int ans = 0;
	for (int i = 0; i <= n; i++)
		(ans += (i & 1? -1LL: 1LL) * cnt[i] * fact[n - i] % P) %= P;
	cout << (ans + P) % P;
}


Measured memory_bytes: 15104
#include<iostream>
#include<utility>
#include<algorithm>
using namespace std ;
typedef pair < int,int > pii ;
pii arr[100005];
int main()
{
    int n,temp=0;
    cin >> n ;
    for(int i=0;i<n;i++)
    {
        int x,v;
        cin >> x >> v ;
        arr[i]=pii(x+v,x-v);
    }
    sort(arr,arr+n);
    int v = -1e9+5;
    for(int i=0;i<n;i++)
    {
        if(v<=arr[i].second)
        {
            temp++;
            v=arr[i].first;
        }
    }
    cout << temp  << endl;
    return 0 ;
}


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

// グラフを記憶させる中身が配列のvector
vector<int> to[200005];
vector<int> ans;

// 深さ優先探索
void dfs(int v, int p=-1){
    for(int u : to[v]){
        if(u == p) continue;
        ans[u] += ans[v];
        dfs(u,v);
    }
}

int main(){
    int N, Q;
    cin >> N >> Q;
    // グラフを格納している
    for(int i = 0; i < N - 1; i++){
        int a, b;
        cin >> a >> b;
        --a; --b;
        to[a].push_back(b);
        to[b].push_back(a);
    }
    ans.resize(N);
    for(int i = 0; i < Q; i++){
        int p, x;
        cin >> p >> x;
        --p;
        ans[p] += x;
    }
    dfs(0);
    for(int i = 0; i < N; i++){
        cout << ans[i] << endl;
    }
    return 0;
}

Measured memory_bytes: 23552
#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define pb push_back
bool isPrime(ll n) 
{ 
   
   if (n <= 1)  return false; 
   if (n <= 3)  return true; 
 
   if (n%2 == 0 || n%3 == 0) return false; 
 
   for (ll i=5; i*i<=n; i=i+6) 
       if (n%i == 0 || n%(i+2) == 0) 
          return false; 
 
   return true; 
} 
ll minthis(ll a, ll b){
if(a < b){
return a;
}
return b;
}
ll maxthis(ll a, ll b){
if(a > b){
return a;
}
return b;
}
int gcd(int a, int b){
   if( a<0 ) a = -a;
   if( b<0 ) b = -b;
   while( b!=0 ){
       a %= b;
       if( a==0 ) return b;
       b %= a;
   }
   return a;
}
 
int findLargestDivisor(int n) 
{ 
int max = 1;
   for (int i = 2; i < n; i++) {        
       if(n %(i) == 0) { 
           max = i;
       } 
    }
   return max;     
} 
 
 
ll power(ll x, ll y)  
{  
   ll temp;  
   if(y == 0)  
       return 1;  
   temp = power(x, y / 2);  
   if (y % 2 == 0)  
       return temp * temp;  
   else
   {  
       if(y > 0)  
           return x * temp * temp;  
       else
           return (temp * temp) / x;  
   }  
} 
bool sortbysec(const pair<int, int>& a, 
               const pair<int, int>& b) 
{ 
   return (a.second < b.second); 
} 



void solve(){
	int n;
	cin >> n;
	if( n >= 400 && n <= 599) cout << 8 << "\n";
	else if(n >= 600 && n <= 799) cout << 7 << "\n";
	else if(n >= 800 && n <= 999) cout << 6 << "\n";
	else if(n >= 1000 && n<= 1199) cout << 5 << "\n";
	else if(n >= 1200 && n <= 1399) cout << 4 << "\n";
	else if(n >= 1400 && n <= 1599) cout << 3 << "\n";
	else if(n >= 1600 && n <= 1799) cout << 2 << "\n";
	else if(n >= 1800 && n <= 1999) cout << 1 << "\n";		

}

int main(){ 
  ios_base::sync_with_stdio(false);
   cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  //cin >> t;
  while(t--){
solve();
}
  return 0; 
}




Measured memory_bytes: 3648
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> riceCookies(N);
  for(int i = 0; i < N;i++){
    cin >> riceCookies.at(i);
  }
  
  sort(riceCookies.begin(), riceCookies.end());
  
  int ans = 1;
  int d = riceCookies.at(N-1);
  for(int i = N-2; i >= 0 ; i --){
 	if(d > riceCookies.at(i)){
      ans++;
      d = riceCookies.at(i);
    }
  }
 
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define Rushia_mywife ios::sync_with_stdio(0);cin.tie(0);
#define rep(i,head,n) for(int i=(head);i<n;i++)
#define int long long
#define F first
#define S second
#define pb push_back
#define p2(n) (1<<(n))
#define lg2(n) __lg(n)
using namespace std;
using pii = pair<long long,long long>;
using ld = long double;
mt19937 mt_rand(time(0));
const int mod = 1000000007;
const int hnum = 998244353;
const ld PI = acos(-1);
const int N = 1e6+10;

int n,d;
int vis[N];
int cnt,cur;
bool cant;

void solve(){
    cin >> n;
    cur = 7%n;
    cnt = 1;
    while(cur&&!vis[cur]){
        cnt++;
        vis[cur] = 1;
        cur = cur*10+7;
        cur %= n;
        if(vis[cur])
            cant = 1;
    }
    cout << (cant ? -1 : cnt) << '\n';
}

signed main(){
    Rushia_mywife
    solve();
}

Measured memory_bytes: 11336
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define pi 3.141592653589793238
#define int long long
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>;


signed main()
{

ios_base::sync_with_stdio(false);
cin.tie(NULL);  
cout.tie(0);   

#ifndef ONLINE_JUDGE
    if(fopen("INPUT.txt","r"))
    {
    freopen ("INPUT.txt" , "r" , stdin);
    freopen ("OUTPUT.txt" , "w" , stdout);
    }
#endif  

    long double a,b;
    cin>>a>>b;
    int x=a*b;
    cout<<x;
  
} 



Measured memory_bytes: 3804
#!/usr/bin python3
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
retBW = [['#']*100 for i in range(50)]
retWB = [['.']*100 for i in range(50)]
for i in range(0, 50, 2):
    for j in range(0, 100, 2):
        if a>1:
            retBW[i][j]='.'
            a -= 1

for i in range(1, 50, 2):
    for j in range(0, 100, 2):
        if b>1:
            retWB[i][j]='#'
            b -= 1

print('100 100')
for x in retBW:
    print(''.join(x))
for x in retWB:
    print(''.join(x))


Measured memory_bytes: 9136
#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;

int main() {
	int n;
	double m;
	cin >> n >> m;
	vector<double> a(n);
	int cnt = 0;
	double sum = 0;
	rep(i, n) {
		cin >> a[i];
		sum += a[i];
	}
	double ok = sum / (4 * m);
	rep(i, n) {
		if (a[i] >= ok) cnt++;
	}
	if (cnt >= m) cout << "Yes" << endl;
	else cout << "No" << endl;
}

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

using namespace std;

int main(int argc, const char *argv[]) {
  int n, m;
  cin >> n >> m;

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

  vector<vector<int>> t(n);
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    t[a].push_back(b);
    t[b].push_back(a);
  }

  int ans = 0;
  for (int i = 0; i < n; ++i) {
    bool is_good = true;
    for (int j = 0; j < t[i].size(); ++j) {
      if (vh[i] <= vh[t[i][j]]) {
        is_good = false;
        break;
      }
    }

    if (is_good) {
      ans++;
    }
  }

  cout << ans << '\n';
  return 0;
}

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


int main(){
    string S; //ABCD
    cin >> S;
    for(int bit = 0; bit < (1<< 3); bit++){
        int64_t sum = S[0]-'0';
        vector<char> op(3);
        for(int i = 0; i < 3; i++){
            if(bit & (1<<i)){
                sum += S[i+1]-'0';
                op.at(i) = '+';
            }else{
                sum -= S[i+1]-'0';
                op.at(i) = '-';
            }
        }
        if(sum == 7) {
            cout << S.at(0) << op.at(0) << S.at(1) << op.at(1) << S.at(2) << op.at(2) << S.at(3) << "=7";
            break;
        }

    }
}


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

int main() {
    int k, s;
    cin >> k >> s;
    int x, y, z;
    int ret = 0;
    for (int i=0; i<=k; i++)
        for (int j=0; j<=k; j++) {
            int tmp = s - i - j;
            if (tmp >= 0 && tmp <= k)
                ret++;
        }
    cout << ret << '\n';
    return 0;
}


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

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a=0,w=0,t=0,r=0,n;
  cin >>n;
  rep(i,n){
    string s;
    cin >>s;
    if(s=="AC")a++;
    if(s=="WA")w++;
    if(s=="TLE")t++;
    if(s=="RE")r++;
  }
  cout <<"AC x "<<a<<endl;
  cout <<"WA x "<<w<<endl;
  cout <<"TLE x "<<t<<endl;
  cout <<"RE x "<<r<<endl;
}

Measured memory_bytes: 3620
import fractions
N,M = map(int,input().split())
S = input()
T = input()

gcd = fractions.gcd(N,M)
ans = True
for i in range(gcd):
    if S[(N//gcd)*i] != T[(M//gcd)*i]:
        ans = False

if ans:
    print(N*M//gcd)
else:
    print(-1)

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

using namespace std;

const int maxn=2e5+5;
typedef long long ll;

char s[maxn];

int main(){
	int n;
	scanf("%d",&n);
	scanf("%s",s);
	if(n<3200) printf("red");
	else printf("%s",s);
	return 0;
} 

Measured memory_bytes: 256
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

public class Main {
    private static Set<Integer> intersection(Set<Integer> a, Set<Integer> b) {
        Set<Integer> response = new HashSet<>();
        for (int x : b) {
            if ( a.contains(x) ) {
                response.add(x);
            }
        }
        return response;
    }

    // a - b
    private static Set<Integer> subtract(Set<Integer> a, Set<Integer> b) {
        Set<Integer> response = new HashSet<>();
        for (int x : a) {
            if ( !b.contains(x) ) {
                response.add(x);
            }
        }
        return response;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int N = sc.nextInt();
            List<Set<Integer>> t = new ArrayList<>();
            for (int i = 0; i < 3; i++) {
                t.add(new HashSet<>());

                int M = sc.nextInt();
                for (int j = 0; j < M; j++) {
                    t.get(i).add(sc.nextInt());
                }
            }

            Set<Integer> AandBandC = intersection(t.get(0), intersection(t.get(1), t.get(2)));
            Set<Integer> CsubA = subtract(t.get(2), t.get(0));
            AandBandC.addAll(CsubA);

            System.out.println(AandBandC.size());
        }
    }
}



Measured memory_bytes: 27020
const Main = (input) => {
  const a = Number(input);
  let cnt =0;
  for(let i = 1; i < a; i++) {
    for(let j = 1; j < a; j++) {
      if(i*j < a){
        cnt++;
      }else {
        break;
      }
    }
  }
  console.log(cnt);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
// Main(`1000000`);

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

using namespace std;

int main()
{
  long long n, k, q;
  scanf("%lld %lld %lld", &n, &k, &q);
  vector <long long> v(n, k);
  long long po, cut = q;
  while (q--){
    scanf("%lld", &po);
    v[po-1]++;
  }
  //for (long long i = 0;i < n;i++){
  //  cout << v[i] << " ";
  //}puts("");
  for (long long i = 0;i < n;i++){
    v[i] -= cut;
    //cout << v[i] << " ";
  }//puts("");
  for (long long i = 0;i < n;i++){
    if (v[i] <= 0)puts("No");
    else puts("Yes");
  }
  return 0;
}


Measured memory_bytes: 1408
using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;

class Program {
    static void Main(string[] args) {
        int[] inp = ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        int K = inp[0];
        int S = inp[1];
        int res = 0;

        for (int x = 0; x <= K; x++) {
            for (int y = 0; y <= K; y++) {
                int z = S - (x + y);
                if (0 <= z && z <= K) { res++; }
            }
        }

        WriteLine(res);
    }
}



Measured memory_bytes: 13268
H,W=map(int,input().split())
bwmap=[]
hlist=[]
for i in range(H):
    a=input()
    if a=='.'*W:
        bwmap.append(a)
    else:
        hlist.append(i)
        bwmap.append(a)
wlist=[]
for j in range(W):
    for i in range(H):
        if bwmap[i][j]=='#' :
            wlist.append(j)
            break
        if i==H-1:
            pass
result=[]
for i in hlist:
    res=''
    for j in wlist:
        res=res+bwmap[i][j]
    print(res)

Measured memory_bytes: 3064
/** omgursocute **/
#include <bits/stdc++.h>

using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	
	int a, b;
	cin >> a >> b;
	cout << max(a+b, max(a-b, a*b));
	return 0;
}




Measured memory_bytes: 256
n,m = map(int, input().split())
A = []
for _ in range(n):
  A.append(list(input()))
B = []
for _ in range(m):
  B.append(list(input()))
  
ans = 'No'
for r in range(0, n-m+1):
  for c in range(0, n-m+1):
    row = 0
    while A[r+row][c:c+m] == B[row]:
      row += 1
      if row > m-1:
        ans = 'Yes'
        break

print(ans)

Measured memory_bytes: 3064
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define rn return
typedef std::pair<int,int> P;
using namespace std;
using ll = long long;

vector<vector<int>> sum;
int buildSumTable(vector<int> L, vector<int>R, int N, int M){
    sum = vector<vector<int>> (N+1,vector<int>(N+1));
    rep(i,M) sum[L[i]][R[i]]++;
    FOR(i,1,N+1){
        FOR(j,1,N+1){
            sum[i][j] += sum[i-1][j];
            sum[i][j] += sum[i][j-1];
            sum[i][j] -= sum[i-1][j-1];
        }
    }
    rn 0;
}


int getSumRange(int L,int R){
    rn sum[R][R] - sum[L-1][R] - sum[R][L-1] + sum[L-1][L-1];
}

int main(){
    int N,M,Q; cin >> N >> M >> Q;
    vector<int> L(M);
    vector<int> R(M);
    rep(i,M) cin >> L[i] >> R[i];
    vector<int> p(Q);
    vector<int> q(Q);
    rep(i,Q) cin >> p[i] >> q[i];
    
    buildSumTable(L,R,N,M);
    
    rep(i,Q) cout << getSumRange(p[i],q[i]) << endl;

    
    rn 0;
}


Measured memory_bytes: 5120
#include<iostream>
using namespace std;
int main()
{
  int n,temp,max1,min1;
  cin>>n;
  int data[100000];
  for(int i=0;i<n;i++){
    cin>>temp;
    data[i]=temp;
  }
  max1=max(data[0],data[1]);
  min1=min(data[0],data[1]);
  while(max1%min1!=0){
    temp=min1;
    min1=max1%min1;
    max1=temp;
  }
  for(int i=2;i<n;i++){
    if(data[i]%min1!=0) min1=data[i]%min1;
  }
  cout<<min1<<endl;
}


Measured memory_bytes: 640
/********   All Required Header Files ********/
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>

typedef long long ll;

using namespace std;

int main() {
    // your code goes here
    char c;

    cin>>c;

    if(c>='a')cout<<"a";
    else cout<<"A";
    return 0;
}


Measured memory_bytes: 3588
import java.util.Scanner;

public class Main {

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int t = Integer.parseInt(sc.next());
		
		int [][] a = new int [n][2];
		
		for(int i = 0 ; i  < n ;i++) {
			a[i][0] = Integer.parseInt(sc.next());
			a[i][1] = Integer.parseInt(sc.next());
		}
		
		
		int [][]dp1 = new int [n+1][t];
		int [][]dp2 = new int [n+1][t];
		
		for(int i = 0 ; i < n ;i++) {
			int k = n - 1 - i;
			for(int j = t-1 ; j >= 0 ; j--) {
			dp1[i+1][j] = dp1[i][j];
			if(j + a[i][0] < t) {
				dp1[i+1][j+a[i][0]] = Math.max(dp1[i+1][j+a[i][0]], dp1[i][j] + a[i][1]);
			}
			dp2[k][j] = dp2[k+1][j];
			if(j + a[k][0] < t) {
				dp2[k][j+a[k][0]] = Math.max(dp2[k+1][j+a[k][0]], dp2[k+1][j] + a[k][1]);
			}
		}		
	}
		
		int ans = 0;
		
		for(int i = 0 ;i < n ;i++) {
			for(int j = t-1 ; j >= 0 ; j--) {
				int temp = dp1[i][j] + dp2[i+1][t-1-j] + a[i][1];
				ans = Math.max(temp, ans);
				}
			}
		
		System.out.println(ans);
		
	}
	

}


Measured memory_bytes: 129868
import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		int N = Integer.parseInt(in.readLine());
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < N; ++i) {
			set.add(Integer.parseInt(in.readLine()));
		}
		System.out.println(set.size());
		
	}
}


Measured memory_bytes: 22996
#include <stdio.h>
 
int start, end, year, answer, i;

int years(void)
{
     if (year % 4 == 0) {
        if (year % 100 != 0) {
            printf("%d\n", year);
            answer++;
        } else if (year % 400 == 0) {
            printf("%d\n", year);
            answer++;
        }
      }
}

int main(void)
{
    i = 0;
    while(1) {
    scanf("%d %d", &start, &end);
    if (start == 0 && end == 0) {
        break;
    }
    if (i != 0) {
        printf("\n");
    }
    i++;
    answer = 0;
    for (year = start; year <= end; year++) {
        years();
    }
    if (answer == 0) {
        printf("NA\n");
    }
    }
    return 0;
}

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

using namespace std;

typedef long long ll;
const ll INF = 1LL<<60;

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

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; }

ll modpow(ll a, ll n, ll mod) {
  ll res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}

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

  double a, b, x;
  cin >> a >> b >> x;

  if(x <= a * a * b / 2){
    cout << setprecision(16) << atan(a * b * b / (2 * x)) * 360 / (2 * M_PI) << endl;
  }else{
    cout << setprecision(16) << atan(2 * (a*a*b-x)/(a*a*a)) * 360 / (2 * M_PI) << endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>

using namespace std;

int n;
int64_t suma;

int64_t suma_cifre(int64_t v[11]) {
    int64_t suma = 0;
    for (int i = 0; i < n; ++i) {
        suma += v[i];
        //cout << v[i] << " ";
    }
    //cout << suma << endl;
    return suma;
}

int64_t put10(int n) {
    switch (n) {
    case 0: return 1;
    case 1: return 10;
    case 2: return 100;
    case 3: return 1000;
    case 4: return 10000;
    case 5: return 100000;
    case 6: return 1000000;
    case 7: return 10000000;
    case 8: return 100000000;
    case 9: return 1000000000;
    case 10: return 10000000000;
    default: return 1;
    }
}

void bt(int index, int64_t v[11], int log_sum, int last_put) {
    if (index == n) {
        if (log_sum <= n*(n+1) / 2) {
            //for (int i = 0; i < n; ++i)
            //    cout << v[i] << " ";
            //cout << endl;
            suma += suma_cifre(v);
        }
        return;
    }
    if (last_put == 0)
        for (int i = 0; i < n - index; ++i) {
            //if (index == 0)
            //    cout << i<< endl;
            v[index] *= put10(i);
            bt(index + 1, v, log_sum + i, i);
            v[index] /= put10(i);
        }
    else {
        v[index] *= put10(last_put - 1);
        bt(index + 1, v, log_sum + last_put - 1, last_put - 1);
        v[index] /= put10(last_put - 1);
    }
}

int main()
{
    string s;
    cin >> s;
    n = s.size();
    int64_t v[11];
    for (string::iterator i = s.begin(); i != s.end(); ++i)
        v[i - s.begin()] = *i - '0';
    bt(0, v, 0, 0);
    cout << suma;
    return 0;
}


Measured memory_bytes: 256
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {

		new Main().run();
	}

	private void run() throws IOException {
		Scanner scanner = new Scanner(System.in);
		while (true) {
			m = scanner.nextInt();
			n = scanner.nextInt();
			if ((m | n) == 0)
				break;
			M = new HashMap<Integer, Integer>(1000000);
			h = 1;
			a = new int[n][m];
			pairs = new Pair[24];
			for (int i = 0; i < n; i++)
				for (int j = 0; j < m; j++) {
					int t = scanner.nextInt();
					if (t == 0) {
						a[i][j] = -1;
					} else if (t == 1) {
						pairs[h] = new Pair(i, j);
						a[i][j] = h++;
					} else {
						pairs[0] = new Pair(i, j);
						a[i][j] = 0;
					}
				}
			System.out.println(slove(0, 1));
		}
	}

	private int slove(int cur, int bit) {
		int k = cur << 24 | bit;
		if (M.containsKey(k))
			return M.get(k);
		int res = 0;
		for (int[] mo : move) {
			int y = pairs[cur].y;
			int x = pairs[cur].x;
			while (true) {
				y += mo[0];
				x += mo[1];
				if (!isOK(y, x))
					break;
				if (a[y][x] == 0)
					if (Integer.bitCount(bit) == h) {
						return res + 1;
					}
				if (a[y][x] >= 1) {
					if ((bit >> a[y][x] & 1) == 1)
						continue;
					res += slove(a[y][x], bit | 1 << a[y][x]);
					break;
				}
			}
		}
		M.put(k, res);
		return res;
	}

	private boolean isOK(int y, int x) {
		if (0 <= y && y < n && 0 <= x && x < m)
			return true;
		return false;
	}
	class Pair{
		int y,x;

		public Pair(int y, int x) {
			super();
			this.y = y;
			this.x = x;
		}
		
	}

	int m, n, h;
	Pair[] pairs;
	int[][] a;
	int[][] move = { { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 } };
	Map<Integer, Integer> M;
}

Measured memory_bytes: 193312
S = '>' + input() + '<'
N = len(S) + 1
a = [0] * N

for i in range(N - 1):
    if S[i] == '>' and S[i+1] == '<':
        j = 0
        while i - j >= 0 and S[i-j] == '>' and a[i-j] < j + 1:
            a[i-j] = j + 1
            j += 1
        j = 0
        while i + 2 + j < N and S[i+1+j] == '<' and a[i+2+j] < j + 1:
            a[i+2+j] = j + 1
            j += 1
print(sum(a) - a[0] - a[-1])


Measured memory_bytes: 23272
n=int(input())
L=[0]*n

def dev(x):
    num=x
    for i in range(2,-int(-(x**0.5))+1):
        cnt=0
        while num%i==0:
            num //= i
            cnt += 1
        L[i-1] += cnt
    if num>1:
        L[num-1] += 1

for j in range(1,n+1):
    dev(j)

ans=1
for j in range(1,n+1):
    ans *= (L[j-1]+1)

print(ans%(10**9+7))

Measured memory_bytes: 3188
import java.util.*;
import java.util.stream.IntStream;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        UnionFind unionFind = new UnionFind(n);
        PriorityQueue<Edge> queue = new PriorityQueue<>(Comparator.comparingInt(edge -> edge.cost));
        int[] x = new int[n];
        int[] y = new int[n];
        for (int i = 0; i < n; i++) {
            x[i] = scanner.nextInt();
            y[i] = scanner.nextInt();
        }

        int[] a = IntStream.range(0, n).mapToObj(Integer::valueOf).sorted(Comparator.comparingInt(i -> x[i])).mapToInt(Integer::intValue).toArray();
        int[] b = IntStream.range(0, n).mapToObj(Integer::valueOf).sorted(Comparator.comparingInt(i -> y[i])).mapToInt(Integer::intValue).toArray();
        for (int i = 1; i < n; i++) {
            queue.add(new Edge(a[i - 1], a[i], x[a[i]] - x[a[i - 1]]));
            queue.add(new Edge(b[i - 1], b[i], y[b[i]] - y[b[i - 1]]));
        }

        long sum = 0;
        while (!queue.isEmpty()) {
            Edge edge = queue.poll();
            if (!unionFind.same(edge.to, edge.from)) {
                sum += edge.cost;
                unionFind.unite(edge.to, edge.from);
            }
        }
        System.out.println(sum);
    }

    static class Edge {
        int to;
        int from;
        int cost;

        Edge(int to, int from, int cost) {
            this.to = to;
            this.from = from;
            this.cost = cost;
        }

        @Override
        public String toString() {
            return String.format("[%s, %s, %s]", to, from, cost);
        }
    }

    static class UnionFind {
        private int[] parent;

        UnionFind(int n) {
            parent = new int[n];
            for (int i = 0; i < n; i++) {
                parent[i] = i;
            }
        }

        int root(int n) {
            while (parent[n] != n) {
                n = parent[n] = parent[parent[n]];
            }
            return n;
        }

        void unite(int x, int y) {
            x = root(x);
            y = root(y);
            if (x != y) {
                parent[x] = y;
            }
        }

        boolean same(int x, int y) {
            return root(x) == root(y);
        }
    }
}

Measured memory_bytes: 94960
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
 
#define IOS ios :: sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define AfterDecimal(n) cout << fixed << setprecision(n);
#define ll long long int
#define ld long double
#define all(a) a.begin(), a.end()
#define pii pair<int, int>
#define pll pair<ll, ll>
#define bits(x) __builtin_popcount(x)
 
 
 
using namespace __gnu_pbds;
using namespace std;
 
template <class T> T printr(T p){ cout << p << '\n'; return 0; }
template <class T> T printe(T p){ cout << p << '\n'; exit(0); }
template <class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template <class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }
 
 
//template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
typedef tree<int, null_type, less<int>, rb_tree_tag,  
            tree_order_statistics_node_update>  
    ordered_set;  
 
#ifdef LOCAL
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
template<typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << "# "<< name << " = " << arg1 << '\n';
}
template<typename Arg1, typename... Args>
void __f(const char* names, Arg1 && arg1, Args &&... args){
        const char* comma = strchr(names + 1 ,',');
        cout << "# ";
        cout.write(names, comma - names)<< " = " << arg1 << " | ";
        __f(comma + 1, args...);
}
#else
#define debug(...) 36
#endif
 
std::mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline int ri(int a, int b) {
    return uniform_int_distribution<int>(a, b)(rng);
}
 
ll power(ll x, ll y, ll p){ 
   ll res = 1;
   x = x % p;  
   while (y > 0) {
      if (y & 1) 
         res = (res * x) % p; 
      y = y >> 1;
      x = (x * x) % p; 
   }
   return res;
}
 
const ll INF = (ll)(8e18);
const ll MOD = (ll)(1e9 + 7);
const ll HMOD = (ll)4222234727;
const ll Hashprime = (ll)31;
 
const int maxn = 200010;


int32_t main(){
    IOS;
    #ifndef ONLINE_JUDGE
    //  freopen("input.txt", "r", stdin);
    //  freopen("output.txt", "w", stdout);
    #endif
    int t = 1;
    while(t--){
       string s; cin >> s;
       bool flag = true;
       if(s[2] != s[3]) flag = false;
       if(s[4] != s[5]) flag = false;
       cout << (flag ? "Yes" : "No") << '\n';
    }
    #ifdef LOCAL
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
    #endif
}
//g++ -DLOCAL -std=c++17 -Wshadow -Wall -o "c" "comp.cpp" -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG -g

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define eb emplace_back
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
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 const INF = 1001001001;


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

int H,W;
cin >> H >> W;

vector<string> s(H);
rep(h,H){
    cin >> s[h];
    cout << s[h] << "\n" << s[h] << endl;
}

return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
int main()
{
  int n;
  cin >> n;
  ll ans = 0;
  REP(i,n){
    int a;
    cin >> a;
    ans += a-1;
  }
  cout << ans << endl;
  return 0;
}

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

int main(){
    int a;
    cin>>a;
    if(a<1200){
        cout<<"ABC"<<endl;
    }else if(a<2800){
        cout<<"ARC"<<endl;
    }else{
        cout<<"AGC"<<endl;
    }
    return(0);
}

Measured memory_bytes: 3604
// warm heart, wagging tail,and a smile just for you!
//                                                                     ███████████
//                                                                   ███╬╬╬╬╬╬╬╬╬╬███
//                                                                ███╬╬╬╬╬████╬╬╬╬╬╬███
//                                            ███████████       ██╬╬╬╬╬████╬╬████╬╬╬╬╬██
//                                      █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██
//                               ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██
//                             ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██
//                           ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████
//                         ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██
//                       ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███
//                     ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██
//                 ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████
//     █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████
//   ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████
//   ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██
//       ██████████████  ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████
//                         ███████                           █████  ███████████████████
#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL<<60)
#define D double
#define fs first
#define sc second
#define int long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define RFOR(i,a,b) for(int i = (b-1);i>=(a);--i)
#define REP(i,n)  FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr,mp) for(auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x)  cout << #x << " = " << (x) << endl;
#define SP << " " << 
typedef pair<int,int> P;
typedef vector<int> vec;
typedef vector<vector<int>> mat;

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

  int n;
  cin >> n;

  vector<int> a(n);
  REP(i,n) cin >> a[i];
  
  sort(a.begin(),a.end());
  int ans = 0, c = 0;
  REP(i,n) {
    if(c < a[i]) c = a[i], ans++;
  }

  cout << ans << endl;

  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define pa(x,n) for(ll i=0;i<n;i++){cout<<(x[i])<<" \n"[i==n-1];};
#define pb push_back

using ll = long long;
using namespace std;
using pint = pair<int,int>;
using pll = pair<ll,ll>;
const int INFint = 1e9;
const ll INFll = 1e18;
ll MOD=1e9+7;

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

// aのn乗をMODで割りながら計算する
ll modpow(ll a, ll n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % MOD;
    a = a * a % MOD;
    n >>= 1; // right shift
  }
  return res;
}

// MODを法としたaの逆元を計算する
ll modinv(ll a) {
  return modpow(a, MOD - 2);
}

int main(){
  int x,a,b;
  cin>>x>>a>>b;
  cout << (x - a) % b << endl;
  return 0;
}



Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;cin>>n;
vector<int> c(n-1),s(n-1),f(n-1);
for(int i=0;i<n-1;i++)cin>>c[i]>>s[i]>>f[i];
for(int i=0;i<n-1;++i){
int t=0;
for(int j=i;j<n-1;++j){
t=max(s[j],(t+f[j]-1)/f[j]*f[j]);
t+=c[j];
}
cout<<t<<endl;

}
cout<<0<<endl;
}


Measured memory_bytes: 256