akhauriyash/Code-Regression huggingface dataset:
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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        private long MODULO = 1000000007;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int a = in.nextInt();
            int b = in.nextInt();
            long ans = binPow(2, n) - 1 - c(n, a) - c(n, b);
            for (int i = 0; i < 5; i++)
                ans = mod(ans, MODULO);
            out.println(ans);
        }

        private long c(int n, int k) {
            long res = 1;
            for (int i = 1; i <= k; ++i) {
                res *= (n - k + i);
                res %= MODULO;
                res *= binPow(i, (int) MODULO - 2);
                res %= MODULO;
            }
            return res;
        }

        private long mod(long a, long b) {
            long mod = a % b;
            if (mod >= 0)
                return mod;
            else
                return mod + b;
        }

        private long binPow(long a, int n) {
            if (n == 0)
                return 1;
            if (n == 1)
                return a % MODULO;
            if (n % 2 == 0) {
                long t = binPow(a, n / 2) % MODULO;
                return t * t % MODULO;
            } else
                return a * binPow(a, n - 1) % MODULO;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

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

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

    }
}



Measured memory_bytes: 23764
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
#define MAXN 200000
struct num
{
    int sa,pos;
}P[MAXN+5];
bool cmp(num s1,num s2)
{
    return s1.sa<s2.sa;
}
int n,a[MAXN+5];
bool is_set[MAXN+5];
int main()
{
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
        P[i].sa=a[i];
        P[i].pos=i;
    }
    sort(P+1,P+n+1,cmp);
    for(int i=1;i<=n/2;i++)
    is_set[P[i].pos]=1;
    for(int i=1;i<=n;i++)
    {
        if(is_set[i])printf("%d\n",P[n/2+1].sa);
        else printf("%d\n",P[n/2].sa);
    }
}

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

int main(){
  int N;
  string s;
  cin >> N >> s;
  int count=0;
  int st=0;
  int en=s.size()-1;
  while(st!=en&&st<N){
    if(s.at(st)=='W'){
      for(en;en>st;en--){
        if(s.at(en)=='R'){
          s.at(st)='R';
          s.at(en)='W';
          count++;
          break;
        }
      }
    }
    st++;
  }
  cout << count << endl;
}


Measured memory_bytes: 3760
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<climits>
#include<iostream>
#include<sstream>
#include<utility>
#include<map>
#include<vector>
#include<queue>
#include<algorithm>
#include<set>
#include<stack>
using namespace std;
typedef long long ll;
typedef pair<int,int>P;

int main()
{
	int N,t=0,r=0;
	cin>>N;
	for(int i=0;i<N;i++)
	{
		int a;
		cin>>a;
		if(a>t)
		{
			r+=t;
			t=a;
		}
		else
		{
			r+=a;
		}
	}
	cout<<(t<r?"Yes":"No")<<endl;
}


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

ai = list(sorted([a - i - 1 for i, a in enumerate(alist)]))
if n % 2 == 1:
  b = ai[n // 2]
  print(sum(abs(_ai - b) for _ai in ai))
else:
  b = (ai[n // 2 - 1] + ai[n // 2])
  if b % 2 == 0:
    b //= 2
    print(sum(abs(_ai - b) for _ai in ai))
  else:
    b //= 2
    print(min(sum(abs(_ai - b - 1) for _ai in ai), sum(abs(_ai - b) for _ai in ai)))


Measured memory_bytes: 26180
#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d;
  int left, right;
  cin >> a >> b >> c >> d;
  left  = a + b;
  right = c + d;
  if (left > right) {
    cout << "Left" << endl;
  }else if (left < right) {
    cout << "Right" << endl;
  }else
    cout << "Balanced" << endl;
}
  

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

class Program
{
	static void Main(string[] args)
	{
      var n = int.Parse(Console.ReadLine());
      var input = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
	  var count = int.MaxValue;
	  for (var i = 0; i < n; i++)
      {
        var tmp = 0;
        while (input[i] % 2 == 0)
        {
          input[i] /= 2;
          tmp++;
        }
        count = Math.Min(count, tmp);
      }   
      Console.WriteLine($"{count}");
	}
}


Measured memory_bytes: 13268
#include<bits/stdc++.h>
using namespace std;
int main (){
    long long int H,W;
    cin >> H >> W;
    if(H==1||W==1){
        cout << "1" <<endl;
        return 0;
    }

    if (H % 2 == 0){
        cout << H * W - (H / 2) * W << endl;
        return 0;
    }else{
        if(W%2==0){
            cout << H * W - (H/2 + H/2 + 1) * (W / 2) << endl;
            return 0;
        }else{
            cout << H * W - (H / 2) * (W / 2 + 1) - (H / 2+1) * (W / 2) << endl;
            return 0;
        }
    }
    return 0;
}


Measured memory_bytes: 256
var
i,k,x,min,max:longint;
begin
min:=233;
max:=0;
for i:=1 to 5 do
begin
read(x);
 if x<min then
 min:=x;
 if x>max then
 max:=x;
end;
read(k);
if max-min<=k then
writeln('Yay!')
else
writeln(':(');
end.

Measured memory_bytes: 128
#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = a; i < b; i++)
#define Rep(i, a, b) for(int i = a; i <= b; i++)
#define repr(i, a, b) for(int i = a; i >= b; i--)
#define _GLIBCXX_DEBUG
#define Vl vector<ll>
#define Vs vector<string>
#define Vp vector<pair<ll, ll>>
using ll = long long;
#define ALL(v) (v).begin(),(v).end()
#define endl "\n"
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define co(x) cout << x << endl
#define coel cout << endl
#define pb push_back
#define sz(v) ((ll)(v).size())
using namespace std;  
const double pi = acos(-1.0);
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 60;
#define pp pair<ll, pair<ll, ll>> 
#define fi first
#define se second

////////////////////////////////////////////////////////


int main() {
    ll n; cin >> n;
    Vl a(n);
    rep(i, 0, n) cin >> a[i];

    ll cnt = 0;
    rep(i, 0, n){
        if(i%2 == 0 && a[i]%2 != 0) cnt++;
    }
    co(cnt);

    return 0;
}




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

#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define RFOR(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define LL long long
#define INF INT_MAX

const double EPS = 1e-14;
const double PI  = acos(-1.0);


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

  int zero = 0;
  int one = 0;
  REP (i, s.size()) {
    if (s[i] == '0') zero++;
    else one++;
  }

  cout << 2 * min(zero, one) << endl;
}


Measured memory_bytes: 512
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
typedef long long int lli;

int main(){
	int a,b;
	cin >> a >> b;
	for(int i=0; i<=100000; i++){
		if((int)(i*0.08) == a and (int)(i*0.10) == b){
			cout << i << endl;
			return 0;
		}
	}
	cout << -1 << endl;
	return 0;
}

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

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

int ggg(int i, int j, int k){
  return gcd(gcd(i, j), k);
}

int main(){
  int N;
  cin >> N;
  int sum = 0;
  for(int i = 1; i <= N; i++){
    for(int j = 1; j <= N; j++){
      for(int k = 1; k <= N; k++){
        sum += ggg(i, j, k);
      }
    }
  }
  cout << sum << endl;
  return 0;
}


Measured memory_bytes: 3632
#include<bits/stdc++.h>
#define ll long long int
#define M 1000000007
#define mod 998244353
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pi pair<ll,ll>
using namespace std;
const ll N=2750131;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);

	ll n,k;
	cin>>n>>k;
	if(k==1){cout<<"0";return(0);}
	ll ch=n-(k-1);
	cout<<ch-1;

	return(0);
}


Measured memory_bytes: 256
import sys, collections
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
s_list = lines.pop(0).split(" ")
c = collections.Counter(s_list)
if len(c) == 3:
    print("Three")
elif len(c) == 4:
    print("Four")


Measured memory_bytes: 9416
#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<string>
#include<set>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
typedef long long ll;
#define big 1000000007
#define all(a) sort((a).begin(),(a).end()) //ソートのマクロ
#define Re(a) reverse((a).begin(),(a).end())
#define YN(a) if(a){cout<<"Yes"<<endl;}else cout<<"No"<<endl;//条件によってYes、Noを出力する

int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

int main(){//A
/*
    int n,x,t;
    cin>>n>>x>>t;
    int c;
    if(n%x==0){
        c=int(n/x);
    }
    else{
        c=int(n/x)+1;
    }
    cout<<c*t<<endl; 
    */
   //B
   /*
   string n;
   cin>>n;
   int len=n.length();
   ll c=0;
   rep(i,0,len){
       c+=ctoi(n[i]);
   }
    if(c%9==0) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    */
   //C
   int n;cin>>n;
   vector<ll> a(n);
   rep(i,0,n) cin>>a[i];
   ll bigger = a[0];
   ll c=0;
   rep(i,1,n){
       if(a[i]<bigger){
           int tmp=0;
           tmp+=a[i-1]-a[i];
           c+=tmp;
           a[i]+=tmp; 
       }
       else bigger=a[i];
   }
   cout<<c<<endl;
}

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

int main() {
    
    int a, b; cin >> a >> b;
    int ans;
    if ((a + b) % 2 == 1) ans = (a + b) / 2 + 1;
    else ans = (a + b) / 2;
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3624
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
    tmp = input[0].split(" ");
    var N = Number(tmp[0])
    var v = input[1].split(" ").map(Number)
    v.sort((a,b) => a-b)

    var ans=v[0]
    for(var i=1; i<N; i++)
    {
        ans = (ans + v[i]) / 2
    }
    console.log(ans)
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Measured memory_bytes: 7500
import java.io.*;
import java.util.*;
 
public class Main{
	
	int N;
	int A;
	int[] X;
	long[][][] dp;
	public void solve(){
		N = nextInt();
		A = nextInt();
		X = new int[N];
		
		for(int i = 0; i < N; i++){
			X[i] = nextInt();
		}
		
		dp = new long[51][51][50 * 50 + 5];
		for(int i = 0; i < dp.length; i++){
			for(int j = 0; j < dp[i].length; j++){
				for(int k = 0; k < dp[i][j].length; k++){
					dp[i][j][k] = -1;
				}
			}
		}
		
		out.println(dfs(0, 0, 0));
	}
	
	public long dfs(int i, int cnt, int sum){
		if(i == N){
			if(cnt != 0 && A * cnt == sum){
				return 1;
			}else{
				return 0;
			}
		}else{
			if(dp[i][cnt][sum] != -1){
				return dp[i][cnt][sum];
			}
			long ans = 0;
			ans += dfs(i + 1, cnt, sum);
			ans += dfs(i + 1, cnt + 1, sum + X[i]);
			return dp[i][cnt][sum] = ans;
		}
	}
	
	private static PrintWriter out;
	public static void main(String[] args){
		out = new PrintWriter(System.out);
		new Main().solve();
		out.flush();
	}
	
	
	
	public static int nextInt(){
		int num = 0;
		String str = next();
		boolean minus = false;
		int i = 0;
		if(str.charAt(0) == '-'){
			minus = true;
			i++;
		}
		int len = str.length();
		for(;i < len; i++){
			char c = str.charAt(i);
			if(!('0' <= c && c <= '9')) throw new RuntimeException();
			num = num * 10 + (c - '0');
		}
		return minus ? -num : num;
	}
	
	public static long nextLong(){
		long num = 0;
		String str = next();
		boolean minus = false;
		int i = 0;
		if(str.charAt(0) == '-'){
			minus = true;
			i++;
		}
		int len = str.length();
		for(;i < len; i++){
			char c = str.charAt(i);
			if(!('0' <= c && c <= '9')) throw new RuntimeException();
			num = num * 10l + (c - '0');
		}
		return minus ? -num : num;
	}
	public static String next(){
		int c;
		while(!isAlNum(c = read())){}
		StringBuilder build = new StringBuilder();
		build.append((char)c);
		while(isAlNum(c = read())){
			build.append((char)c);
		}
		return build.toString();
	}
	
	
	private static byte[] inputBuffer = new byte[1024];
	private static int bufferLength = 0;
	private static int bufferIndex = 0;
	private static int read(){
		if(bufferLength < 0) throw new RuntimeException();
		if(bufferIndex >= bufferLength){
			try{
				bufferLength = System.in.read(inputBuffer);
				bufferIndex = 0;
			}catch(IOException e){
				throw new RuntimeException(e);
			}
			if(bufferLength <= 0) return (bufferLength = -1);
		}
		return inputBuffer[bufferIndex++];
	}
	
	private static boolean isAlNum(int c){
		return '!' <= c && c <= '~';
	}
}

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

int main() {
	string a;
    cin >> a;
    int counter = 0;
  	if(a[0] == '1')counter++;
    if(a[1] == '1')counter++;
    if(a[2] == '1')counter++;
    cout << counter <<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#define DIVCEIL(A,B) ((A+(B-1))/B)
using namespace std;


void solve(long long N, long long M){
    double pow2M = 1<<M;
    double ans=0, prev=-1, acc=1;
    long long i=1;
    double a=(pow2M-1)/(pow2M);
    auto T = 1900*M+100*(N-M);

    while(prev!=ans){
        prev=ans;
        ans += (acc/pow2M)*(i*T);
        acc *= a;
        i++;
    }
    cout << ans << endl;
}

int main(){
    long long N;
    scanf("%lld",&N);
    long long M;
    scanf("%lld",&M);
    solve(N, M);
    return 0;
}


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

typedef long long ll;
using namespace std;

typedef pair<string,string> P;

int n,f;
map<pair<string,string>,int> mp;

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

	cin >> n >> f;

	int m;
	for (int i = 0;i < n;i++){
		cin >> m;
		string itm[m];
		for (int j = 0;j < m;j++){
			cin >> itm[j];
		}
		sort(itm,itm+m);
		for (int j = 0;j < m-1;j++){
			for (int k = j+1;k < m;k++){
				mp[P(itm[j],itm[k])]++;
			}
		}
	}

	vector<P> ans;

	for (auto&& i : mp) {
		if(i.second >= f) ans.push_back(i.first);
	}

	sort(ans.begin(),ans.end());

	cout << ans.size() << endl;

	for (int i = 0;i < ans.size();i++){
		cout << ans[i].first << " " << ans[i].second << endl;
	}

	return 0;

}



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

#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, m, n) for(int i = m; i <= n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define VSORTR(v) sort(v.rbegin(), v.rend());
#define ALL(v) (v).begin(),(v).end()

using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;

const string YES = "Yes";
const string NO = "No";
const ll mod = 1e9+7;


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

    queue<ll> que;
    ll k; cin >> k;
    for(int i=1; i<=9; i++) que.push(i);
    REP(i,k-1){
        ll a = que.front();
        que.pop();
        if(a % 10 != 0){
            que.push(10 * a + a % 10 -1);
        }
        que.push(10 * a + a%10);
        if(a% 10 != 9){
            que.push(10 * a + a % 10 + 1);
        }
    }
    cout << que.front() << endl;
    
    return 0;
    
}



Measured memory_bytes: 1792
def main():
    from string import ascii_lowercase
    dic = {i+1: a for i, a in enumerate(ascii_lowercase)}
    rdic = {a: i+1 for i, a in enumerate(ascii_lowercase)}
    N = int(input())

    def dfs(s, N):
        if N <= 0:
            return s
        v = N % 26
        if v == 0:
            v = 26
        N -= v
        N //= 26
        S = dfs(s+dic[v], N)
        return S
    ans = dfs('', N)[::-1]
    print(ans)


if __name__ == '__main__':
    main()


Measured memory_bytes: 9980
#include <bits/stdc++.h>
#define int long long
using namespace std;

int n,ii=0,now=0;

signed main()
{
	cin>>n;
	while (ii<=80000000)
	{
		ii++;
		now=(now*10+7)%n;
		
		if (now==0)  return cout<<ii<<endl,0;
	}
	cout<<-1<<endl;
	return 0;
}

Measured memory_bytes: 3616
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

n = I()
hl = LI()
wl = []
count = 0

len_h = len(hl)

def m1(n):
    if n > 0:
        n = n - 1
    else:
        n = 0
    return n

max_hana = max(hl)
if max_hana == 0:
    print(0)
    sys.exit()

for i in range(max_hana):
    for j in range(len_h):
        if j == 0:
            if hl[j] > 0:
                count += 1
        else:
            if hl[j] > 0 and hl[j-1] == 0:
                count += 1
            elif hl[j] > 0 and hl[j-1] == 0:
                count += 1
    hl = list(map(m1, hl))

print(count)

Measured memory_bytes: 9388
A = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]
res = [[0]*3 for _ in range(3)]
for i in range(3):
    for j in range(3):
        if A[i][j] in b:
            res[i][j] = 1
            
for i in res:
    if all(i):
        print('Yes')
        exit()
for i in range(3):
    if res[0][i]==1 and res[1][i]==1 and res[2][i]==1:
        print('Yes')
        exit()
if res[0][0]==1 and res[1][1]==1 and res[2][2]==1:
    print('Yes')
    exit()
if res[0][2]==1 and res[1][1]==1 and res[2][0]==1:
    print('Yes')
    exit()
print('No')

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

int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		int x, y, b, p;
		scanf("%d %d %d %d", &x, &y, &b, &p);
		int A = x * b + y * p;
		int B = (x * max(b, 5) + y * max(p, 2)) * 4 / 5;
		printf("%d\n", min(A, B));
	}
}

Measured memory_bytes: 1188
// #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;
using ll = long long int;
using int64 = long long int;
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const int INF = 1001001001;
const ll LONGINF = 1001001001001001LL;
const ll MOD = 1000000007LL;

const double PI = acos(-1);
const double EPS = 1e-9;
int main() {
    int N; cin >> N;
    vector< pair<int, int> > points(N);
    for(int i=0; i<N; i++) {
        int x, y; cin >> x >> y;
        points[i] = make_pair(x, y);
    }

    sort(points.begin(), points.end(), [](auto a, auto b) {
            double ra = atan2(a.second, a.first);
            double rb = atan2(b.second, b.first);
            return ra < rb;
        });
    for(int i=0; i<N; i++) points.emplace_back(points[i]);

    double ans = 0, cur = 0;
    ll x = 0, y = 0; int r = 0;
    for(int l=0; l<N; l++) {
        while(r < l + N) {
            ll nx = x + points[r].first;
            ll ny = y + points[r].second;
            if(cur > sqrt(nx*nx + ny*ny)) break;
            cur = sqrt(nx*nx + ny*ny);
            x = nx, y = ny;
            r++;
        }
        chmax(ans, cur);
        
        x -= points[l].first;
        y -= points[l].second;
        cur = sqrt(x*x + y*y);
    }
    printf("%.12f\n", ans);
    return 0;
}


Measured memory_bytes: 512
N = int(input())
A = sorted([int(_) for _ in input().split()], reverse=True)

e = []
pre = 0
for i in range(N):
    if pre == A[i]:
        e.append(A[i])
        if len(e) >= 2: break
        pre = 0
    else:
        pre = A[i]
if len(e) < 2: print(0)
else: print(e[0] * e[1])

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

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<=(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define Eunique(v) v.erase(unique(all(v)),v.end())
#define Eback(s) s.erase(s.end()-1,s.end())
#define rev(v) reverse(all(v))
#define minvec(v) *min_element(all(v))
#define maxvec(v) *max_element(all(v))
#define pb push_back
#define pf push_front
#define mod 1000000007
#define m_p make_pair
#define DOUBLE fixed << setprecision(15)
#define OK puts("OK")
#define OK1 puts("OK1")
#define OK2 puts("OK2")
#define SIZE(s) (int)s.size()
#define INF ((1LL<<62)-(1LL<<31))
#define zero(x,n) setw(x) << setfill('0') << n

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef vector<pair<int,int>> vpii;
typedef vector<pair<ll,ll>> vpll;
typedef vector<string> vs;
const double pi = acos(-1.0);

template<class A, class B>
ostream& operator<<(ostream& ost, const pair<A, B>&p) {
	ost << "{" << p.first << ", " << p.second << "} ";
	return ost;
}

template<class T>
ostream& operator<<(ostream& ost, const vector<T>&v) {
	ost << "{";
	for (int i = 0; i<(int)v.size(); i++) {
		if (i)ost << " ";
		ost << v[i];
	}
	ost << "} \n";
	return ost;
}

template<class A, class B>
ostream& operator<<(ostream& ost, const map<A, B>&v) {
	ost << "{";
	for (auto p:v) {
		ost << "{" << p.first << ", " << p.second << "} ";
	}
	ost << "} ";
	return ost;
}

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

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

ll gcd(ll x, ll y) {return __gcd(x,y);}
ll lcm(ll x, ll y) {return x/__gcd(x,y)*y;}

int main()
{
	double x1,x2,y1,y2;
	cin >> x1 >> y1 >> x2 >> y2;
	cout << DOUBLE << sqrt(pow(x1-x2,2)+pow(y1-y2,2)) << endl;
	return 0;
}


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

#define FAST ios_base::sync_with_stdio(false); cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define ph push
#define f first
#define s second
#define cbr cerr << "hi\n"
#define mmst(x, v) memset((x), v, sizeof ((x)))
#define siz(x) ((ll)x.size())
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
#define btinpct(x) __builtin_popcountll((x))
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());    //can be used by calling rng() or shuffle(A, A+n, rng)
inline long long rand(long long x, long long y) { return (rng() % (y+1-x)) + x; } //inclusivesss
string inline to_string(char c) {string s(1,c);return s;} template<typename T> inline T gcd(T a,T b){ return a==0?b:gcd(b%a,a); }

#define ll long long int 
#define ld long double
#define FOR(ii, ss, ee) for(ll ii = (ss); ii <= (ll)(ee); ++ii)
#define DEC(ii, ss, ee) for(ll ii = (ss); ii >= (ll)(ee); --ii)
typedef pair <ll, ll> pi; typedef pair <ll, pi> spi; typedef pair <pi, pi> dpi;

#define LLINF ((long long) 1e18)//1234567890987654321
#define INF 1234567890ll
// #define cerr if(0)cout
#define MAXN (500003)
int main()
{
	FAST
	string s; cin>>s;
	vector<pair<ll,char>> v;
	FOR(i,0,s.size()-1) {
		if(v.empty()) v.eb(1, s[i]);
		else if(s[i] == s[i-1]) ++ v.back().f;
		else v.eb(1, s[i]);
	}
	ll ans = 0;
	FOR(i,1,siz(v)-1) if(v[i-1].s == '<' && v[i].s == '>') {
		ans += v[i-1].f * (v[i-1].f - 1) / 2;
		ans += v[i].f * (v[i].f - 1) / 2;
		ans += max(v[i].f, v[i-1].f); 
	}
	if(v.back().s == '<') ans += v.back().f * (v.back().f + 1) / 2;
	if(v[0].s == '>') ans += v[0].f * (v[0].f + 1) / 2;
	cout<<ans<<'\n';
}


Measured memory_bytes: 6664
#include <vector>
#include <algorithm>
#include <cstddef>

struct strongly_connected_component {
	using size_type = std::size_t;
private : 
	std::vector<std::vector<size_type>> g, revg;
	std::vector<size_type> order, index;
	std::vector<bool> seen;

	void dfs (size_type v) {
		seen[v] = true;
		for (const size_type &u : g[v]) {
			if (not seen[u]) dfs(u);
		}
		order.push_back(v);
	}

	void dfs2 (size_type v, const size_type idx) {
		seen[v] = true; index[v] = idx;
		for (const size_type &u : revg[v]) {
			if (not seen[u]) dfs2(u, idx);
		}
	}

public : 
	strongly_connected_component (size_type n)
	noexcept : g(n), revg(n), index(n), seen(n) { order.reserve(n); }

	void add_edge (size_type u, size_type v) noexcept {
		g[u].push_back(v);
		revg[v].push_back(u);
	}

	size_type solve () noexcept {
		size_type idx = 0;
		order.clear();
		std::fill(seen.begin(), seen.end(), false);
		for (size_type v = 0; v < g.size(); v++) if (not seen[v]) dfs(v);
		std::fill(seen.begin(), seen.end(), false);
		std::reverse(order.begin(), order.end());
		for (const size_type &v : order) if (not seen[v]) dfs2(v, idx++);
		return idx;
	}

	std::vector<std::vector<size_type>> build () noexcept {
		std::vector<int> count(solve());
		std::vector<std::vector<size_type>> tpls(count.size());
		for (size_type i = 0; i < g.size(); i++) count[index[i]]++;
		for (size_type i = 0; i < count.size(); i++) tpls[i].reserve(count[i]);
		for (size_type i = 0; i < g.size(); i++) tpls[index[i]].push_back(i);
		return tpls;
	}

	const size_type &operator[] (size_type v) const noexcept {
		return index[v];
	}

};


#include <iostream>

using usize = std::size_t;

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
	usize n, m;
	std::cin >> n >> m;
	strongly_connected_component scc(n);
	for (usize i = 0; i < m; i++) {
		usize a, b;
		std::cin >> a >> b;
		scc.add_edge(a, b);
	}
	
	auto ans = scc.build();
	std::cout << ans.size() << '\n';
	for (const auto &v : ans) {
		std::cout << v.size();
		for (const auto &e : v) std::cout << ' ' << e;
		std::cout << '\n';
	}
	
	return 0;
}

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

#define MAX 100000

int dp[MAX+5][4];
int val[MAX+5][4];
int n;

void initialize()
{
    for(int i=0;i<=MAX;i++)
        for(int j=0;j<=3;j++)
            dp[i][j] = -1;
}

int vacation(int i, int j)
{
    if(i<=0) return 0;

    if(dp[i][j]!=-1) return dp[i][j];

    int mx = INT_MIN;

    for(int k=1;k<=3;k++)
    {
        if(j==k) continue;

        mx = max(mx, vacation(i-1, k)+ val[i][j]);
    }


    dp[i][j] = mx;

    return mx;
}

int main()
{
    initialize();

    cin>>n;
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=3;j++)
            cin>>val[i][j];
    }

    int retVal1 = vacation(n, 1);

    initialize();

    int retVal2 = vacation(n, 2);

    initialize();

    int retVal3 = vacation(n, 3);

    cout<<max({retVal1, retVal2, retVal3})<<endl;

    return 0;
}


Measured memory_bytes: 14444
import java.util.*;

public class Main {
        public static void main(String args[]) {
            Scanner sc = new Scanner(System.in);
            String a = sc.next();
            String b = sc.next();
            int x = sc.nextInt();
            int y = sc.nextInt();
            String o = sc.next();

            if (o.equals(a)) {
                x--;
                System.out.println(x + " " + y);
            }
            else if (o.equals(b)) {
                y--;
                System.out.println(x + " " + y);
            }
        }
}


Measured memory_bytes: 23764
program main
      implicit none
      character(3) :: n
      integer(4) ::i,j

      read *, n
      j=0
      do i = 1, 3
        if(n(i:i) == '7') then
              print *, 'Yes'
              exit
        else
               j = j + 1
        end if
      end do
      if ( j == 3 ) print *, 'No'

end program main


Measured memory_bytes: 2856
#include<cstdio>
#include<algorithm>
using namespace std;
int n;
int f[12][12313],a[12][12313];
int main()
{ 
  int i,j;
  scanf("%d",&n);
  for(i=1;i<=2;i++)
    for(j=1;j<=n;j++) scanf("%d",&a[i][j]);
  for(i=1;i<=2;i++)
    for(j=1;j<=n;j++)
      f[i][j]=max(f[i-1][j],f[i][j-1])+a[i][j];
  printf("%d\n",f[2][n]);
}

Measured memory_bytes: 128
function Main(input) {
    input = input.trim();
    tmp = input.split(" ");
    const a = parseInt(tmp[0],10);
    const b = parseInt(tmp[1],10);
    const c = parseInt(tmp[2],10);
    const k = parseInt(tmp[3],10);

    if(k <= a){
        console.log(k);
    }else{
        if(k <= a + b){
            console.log(a);
        }else{
            console.log(a - (k - a - b));
        }
    }

}
 
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Measured memory_bytes: 29568
package main

import (
	"fmt"
	"sort"
)

func main() {
	// Code for C - Bugged
	var N int
	fmt.Scanf("%d", &N)

	s := make([]int, N)
	var sum int
	for i := 0; i < N; i++ {
		fmt.Scanf("%d", &s[i])
		sum += s[i]
	}

	sort.Sort(sort.IntSlice(s))

	var temp int
	if sum%10 != 0 {
		fmt.Println(sum)
	} else {
		for j := 0; j < N; j++ {
			if s[j]%10 == 0 {
				continue
			} else {
				temp = s[j]
				break
			}
		}
		if temp == 0 {
			fmt.Println("0")
		} else {
			fmt.Println(sum - temp)
		}
	}
}


Measured memory_bytes: 1840
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define fi first
#define se second
#define mp make_pair
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;

ll N,M,H,W,K,A,B,L;
string S;
string alpha = "abcdefghijklmnopqrstuvwxyz";
string ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const ll MOD = 998244353;
const ll MAX_N = 100010;
typedef pair<ll,ll> P;

int main() {
    cin>>N>>M>>K;
    typedef tuple<ll,ll,ll> T;
    vector<T> G(M);
    for(int i = 0; i < M; i++) {
        // sからtへの辺を張る
        int s,t,u;
        cin>>s>>t>>u;
        get<0>(G[i]) = s;
        get<1>(G[i]) = t;
        get<2>(G[i]) = u-K;
    }
    ll INF;
    INF = -(1e+9);
    vec memo(N+1,INF);
    memo[1] = 0;
    vector<bool> roop_update(N+1,false);
    rep(i,N*2+10){
        rep(j,M){
            T tt = G[j];
            ll s = get<0>(tt),t = get<1>(tt),cost = get<2>(tt);
            if(memo[s] != INF){
                if(memo[t] < memo[s] + cost){
                    memo[t] = memo[s] + cost;
                }
            }
        }
    }
    rep(i,N*2+10){
        rep(j,M){
            T tt = G[j];
            ll s = get<0>(tt),t = get<1>(tt),cost = get<2>(tt);
            if(memo[s] != INF){
                if(roop_update[s]) roop_update[t] = true;
                if(memo[t] < memo[s] + cost){
                    roop_update[t] = true;
                    memo[t] = memo[s] + cost;
                }
            }
        }
    }
    cout<<(roop_update[N] ? -1 : max(0LL,memo[N]))<<endl;
}


Measured memory_bytes: 512
n = int(input())
zeros = 0
ab = {}
for _ in range(n):
    a, b = [int(i) for i in input().split()]
    if a == b == 0:
        zeros += 1
    elif a == 0 or b == 0:
        if None not in ab:
            ab[None] = [0, 0]
        if a == 0:
            ab[None][0] += 1
        else:
            ab[None][1] += 1
    else:
        x = 1 if a * b > 0 else -1
        c = max(abs(a) * 10 ** 100 // abs(b) * x,
                abs(b) * 10 ** 100 // abs(a) * (-x))
        if c not in ab:
            ab[c] = [0, 0]
        if a * b > 0:
            ab[c][0] += 1
        else:
            ab[c][1] += 1
ans = 1
mod = 10 ** 9 + 7
for _, v in ab.items():
    ans *= pow(2, v[0], mod) + pow(2, v[1], mod) - 1
    ans %= mod
ans += zeros - 1
print(ans % mod)


Measured memory_bytes: 154888
#include<iostream>
using namespace std;
int main(void){
  	int A,B;
	cin >> A >> B;
  	if( A > 12 ){
    	cout << B;
    }else if(A >= 6 ){
      	cout << B/2;
    }else{
    	cout << 0;
    }
  return 0;
}

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

int main() {
  string s;
  string t;
  cin >> s;
  cin >> t;
  int res=10000;
  rep(i,s.size()-t.size()+1){
    int a=t.size();
    rep(j,t.size()){
      if (s.substr(i+j,1)==t.substr(j,1)){
        a--;
      }
      if (a<res){
        res=a;
      }
    }
  }
  cout << res <<endl;
}


Measured memory_bytes: 3624
#include <bits/stdc++.h>
using namespace std;
#define REP(i,x,n) for(int i=x;i<(int)n;i++)
#define rep(i,n) REP(i,0,n)
#define sp(p) cout<<setprecision(16)<<fixed<<p<<endl;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(a))
#define UNIQ(a) unique(all(a))
#define UNIQNUM(a) UNIQ(a)-a.begin()
#define UNIQIT(a) a.erase(UNIQ(a), a.end());
#define VOUT(v,i) cout<<#v<<": ";for(int i=0;i<(int)v.size();i++){cout<<v[i]<<" ";}cout<<"\n";
#define vout(v) VOUT(v,z);
#define vmin(v) *min_element(all(v))
#define vmax(v) *max_element(all(v))
#define vsum(v) accumulate(all(v), 0LL);
#define MOUT(m,r,c) rep(i,r){rep(j,c){cout<<m[i][j]<<" ";}cout<<endl;}
#define mout(m) MOUT(m,m.size(),m[0].size())
#define debg(a) cout<<#a<<": "<<a<<endl;
#define show(a) for(cont &y:a){for(cont &x:y){cout<<x<<" ";}cout<<endl;}
#define digit(a) to_string(a).length();
template<class T>inline int out(const T &t){ print(t); putchar('\n'); return 0; }
template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef vector<ll> V;
// const long long MOD=1000000007;
const long long INF = 1e18;
#define EPS (1e-7)
#define PI (acos(-1))
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) { a = b; return true; }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) { a = b; return true; }
    return false;
}


void solve(long long H, long long A){
    cout << (H+A-1)/A << "\n";
}

int main(){
    long long H;
    scanf("%lld",&H);
    long long A;
    scanf("%lld",&A);
    solve(H, A);
    return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(void)
{
int a,b,i,n,d;
int card[4][13]={0};   
char c,f;
scanf("%d",&a);


for(i=0;i<a;i++)
{
	scanf("%s %d",&c,&b);
	switch(c)
	{
		case 'S':d=0;break;
		case 'H':d=1;break;
		case 'C':d=2;break;
		case 'D':d=3;break;
	}
	
	card[d][b-1]=1;
}

i=0;

for(n=0;n<4;n++)
{
	for(i=0;i<13;i++)
	{
		if(card[n][i]!=1)
		{
			switch(n)
			{
				case 0:f='S';break;
				case 1:f='H';break;
				case 2:f='C';break;
				case 3:f='D';break;
			}
			printf("%c %d\n",f,i+1);
		}
	}
}

return 0;

}

Measured memory_bytes: 596
#include <iostream>
#include <limits.h>

using namespace std;

int main(){
	int n, ain;
	int max = INT_MIN, min = INT_MAX;
	
	cin >> n;
	for(int i = 0;i < n;++i){
		cin >> ain;
		if(max < ain-min)max = ain - min;
		if(min > ain)min = ain;
	}
	cout << max << endl;
	
	return 0;
}


Measured memory_bytes: 3124
public class Main {

	private java.util.Scanner sc;
	private java.io.PrintStream out;

	public Main(java.io.InputStream in, java.io.PrintStream out) {
		this.sc = new java.util.Scanner(in);
		this.out = out;
	}
	
	public void run() {
		for (;;) {
			final int n = sc.nextInt();
			if (n == 0) break ;
			final int[] d = new int[n];
			for (int i = 0; i < n; ++i)
				d[i] = sc.nextInt();
			
			int rval = Integer.MAX_VALUE;
			for (int i = 0; i < n; ++i)
			for (int j = i + 1; j < n; ++j) {
				rval = Math.min(rval, Math.abs(d[i] - d[j]));
			}
			out.println(rval);
		}
	}
	
	public static void main(String[] args) {
		(new Main(System.in, System.out)).run();
	}

}

Measured memory_bytes: 49700
# frozen_string_literal: true

ary = gets.split.map(&:to_i)
temp = ary[1]
ary[1] = ary[0]
ary[0] = temp

temp = ary[2]
ary[2] = ary[0]
ary[0] = temp

puts "#{ary[0]} #{ary[1]} #{ary[2]}"


Measured memory_bytes: 14264
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    cin >> n;
    vector<string> v(n);
    int ans = 0, a = 0, b = 0, ab = 0;
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
        for (int j = 0; j+1 < v[i].size(); ++j) {
            if(v[i][j] == 'A' && v[i][j+1] == 'B') ans++;
        }
        if(v[i].front() == 'B' && v[i].back() == 'A') ab++;
        if(v[i].front() == 'B') b++;
        if(v[i].back() == 'A')a++;
    }
    ans += min(a, b);
    if(a == b && b == ab && a > 0) --ans;
    cout << ans << "\n";
    return 0;
}

Measured memory_bytes: 768
N=int(input())
h=list(map(int,input().split()))

dp=[0]*N
dp[1]=abs(h[1]-h[0])
for i in range(N-2):
  dp[i+2]=min(dp[i+1]+abs(h[i+2]-h[i+1]),dp[i]+abs(h[i+2]-h[i]))

print(dp[N-1])



Measured memory_bytes: 13980
import java.util.*;
import static java.lang.System.*;

public class Main {

	Scanner sc = new Scanner(in);
	
	int num(int[][] s, int t, int x, int y) {
		if (s[x][y] != 0) return 0;
		int[] dx = {-1, -1, -1, 0, 0, 1, 1, 1};
		int[] dy = {-1, 0, 1, -1, 1, -1, 0, 1};
		int res = 0;
		for (int i = 0; i < 8; i++) {
			int c = 1, count = 0;
			while (x+dx[i]*c >= 0 && x+dx[i]*c < 8 && y+dy[i]*c >= 0 && y+dy[i]*c < 8 && s[x+dx[i]*c][y+dy[i]*c] == -t) {
				count++;
				c++;
			}
			if (x+dx[i]*c >= 0 && x+dx[i]*c < 8 && y+dy[i]*c >= 0 && y+dy[i]*c < 8 && s[x+dx[i]*c][y+dy[i]*c] == t)
				res += count;
		}
		
		return res;
	}
	
	void renew(int[][] s, int t, int x, int y) {
		int[] dx = {-1, -1, -1, 0, 0, 1, 1, 1};
		int[] dy = {-1, 0, 1, -1, 1, -1, 0, 1};
		for (int i = 0; i < 8; i++) {
			int c = 1, count = 0;
			while (x+dx[i]*c >= 0 && x+dx[i]*c < 8 && y+dy[i]*c >= 0 && y+dy[i]*c < 8 && s[x+dx[i]*c][y+dy[i]*c] == -t) {
				count++;
				c++;
			}
			if (x+dx[i]*c >= 0 && x+dx[i]*c < 8 && y+dy[i]*c >= 0 && y+dy[i]*c < 8 && s[x+dx[i]*c][y+dy[i]*c] == t) {
				for (int j = 0; j <= count; j++) {
					s[x+dx[i]*j][y+dy[i]*j] = t;
				}
			}
		}
	}
	
	boolean calc1(int[][] s) {
		int x = -1, y = -1;
		int count = 0;
		for (int i = 0; i < 8; i++) {
			for (int j = 0; j < 8; j++) {
				int n = num(s, 1, i, j);
				if (count < n) {
					count = n;
					x = i; y = j;
				}
			}
		}
		if (count > 0) {
			renew(s, 1, x, y);
			return true;
		}
		return false;
	}
	
	boolean calc2(int[][] s) {
		int x = -1, y = -1;
		int count = 0;
		for (int i = 7; i >= 0; i--) {
			for (int j = 7; j >= 0; j--) {
				int n = num(s, -1, i, j);
				if (count < n) {
					count = n;
					x = i; y = j;
				}
			}
		}
		if (count > 0) {
			renew(s, -1, x, y);
			return true;
		}
		return false;
	}
	
	void run() {
		int[][] s = new int[8][8];
		String st;
		for (int i = 0; i < 8; i++) {
			st = sc.nextLine();
			for (int j = 0; j < 8; j++) {
				if (st.charAt(j) == 'o')
					s[i][j] = 1;
				else if (st.charAt(j) == 'x')
					s[i][j] = -1;
				else
					s[i][j] = 0;
			}
		}
		
		boolean mami = true, witch = true;
		while (mami || witch) {
			mami = calc1(s);
			witch = calc2(s);
		}
		
		for (int i = 0; i < 8; i++) {
			for (int j = 0; j < 8; j++) {
				if (s[i][j] == 1)
					out.print('o');
				else if (s[i][j] == -1)
					out.print('x');
				else
					out.print('.');
			}
			out.println();
		}
		
	}
	
	public static void main(String[] args) {
		new Main().run();
	}

}

Measured memory_bytes: 19304
#!/usr/bin/env python3
a, b, m = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = min(a) + min(b)
for _ in range(m):
    x, y, c = map(int, input().split())
    x -= 1
    y -= 1
    ans = min(ans, a[x] + b[y] - c)
print(ans)


Measured memory_bytes: 24756
#!usr/bin/env python3
def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def LIR(n): return [LI() for i in range(n)]

#A
"""
s = S()
if s[0] != "A":
    print("WA")
else:
    count = []
    for i in range(2,len(s)-1):
        if s[i] == "C": count.append(i)
    if len(count) != 1:
        print("WA")
    else:
        for i in range(1,len(s)):
            if i not in count:
                if s[i] == s[i].upper():
                    print("WA")
                    quit()
        print("AC")
"""

#B
n,m,k = LI()
for i in range((n+1)//2):
    if (k - m*i) % (n - 2*i) == 0 and (k-m*i)//(n-2*i) >= 0 and (k-m*i)//(n-2*i) <= m:
        print("Yes")
        quit()
print("No")

#C

#D

#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T


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

using namespace std;
typedef int long long ill;
typedef long long ll;

int main(){

    int X, Y; cin >> X >> Y;

    if (Y%2 == 0 && Y >= 2*X && Y <= 4*X) cout << "Yes" << endl;    
    else cout << "No" << endl;

}

Measured memory_bytes: 3628
/// Code By t_bone_289 (Tushar Singh)
/// An Immature Programmer.... I'm still developing !!
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define pll pair<ll,ll>
#define fi first
#define se second
#define mp make_pair
#define pb emplace_back
#define endl '\n'
#define M 1000000007
#define error(x) cout << #x << " = " << x << endl;
#define pi 3.14159265358979323846
typedef long long ll;
typedef double d;
typedef long double ld;
template <typename T>
void ContainerError(T &v){cout<<"{";for(auto &x:v){cout<<x<<',';}cout<<"}"<<endl;return;}
typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
ll powmod(ll base,ll exp,ll MOD){ll res=1;while(exp>0){if(exp%2==1) res=(res*base)%MOD;base=(base*base)%MOD;exp/=2;}return (res%MOD);}
ll mpow(ll base,ll exp){ll res=1;while(exp>0){if(exp%2==1) res=(res*base);base=(base*base);exp/=2;}return (res);}
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}

ll sol(ll i,ll j,vector<ll> &v,vector<vector<ll> > &dp)
{
    if(i==j)
    {
        return dp[i][j]=v[i];
    }
    if(i+1==j)
    {
        return dp[i][j]=max(v[i]-v[j],v[j]-v[i]);
    }
    if(i>j)
    {
        return INT_MAX;
    }
    if(dp[i][j]!=-1)
    {
        return dp[i][j];
    }
    ll ans1 = v[i] + min(sol(i+2,j,v,dp)-v[i+1],sol(i+1,j-1,v,dp)-v[j]);
    ll ans2 = v[j] + min(sol(i+1,j-1,v,dp)-v[i],sol(i,j-2,v,dp)-v[j-1]);
    return dp[i][j]=max(ans1,ans2);
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n;
    cin>>n;
    vector<ll> v(n);
    for(auto &x:v)
    {
        cin>>x;
    }
    vector<vector<ll> > dp(n+1,vector<ll>(n+1,-1));
    ll ans = sol(0,n-1,v,dp);
    cout<<ans;
    return 0;
}



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

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

using namespace std;

int main(void)
{
  int n;
  cin >> n;
  bool res = false;
  for (int i = 0; i <= (100 / 4); ++i) {
    for (int j = 0; j <= (100 / 7); ++j) {
      if (n == (i * 4 + j * 7)) res = true;
    }
  }
  cout << (res ? "Yes" : "No") << endl;
}

Measured memory_bytes: 3572
#include <bits/stdc++.h>
#define res register int
using namespace std;

inline int read()
{
	char ch=getchar();
	int x=0,f=0;
	while(ch<'0'||ch>'9')
	{
		f|=ch=='-';
		ch=getchar();
	}
	while(ch>='0'&&ch<='9')
	{
		x=x*10+ch-'0';
		ch=getchar();
	}
	return f?-x:x;
}
int n,m;
char str[510][510];
int main()
{
	n=read(),m=read();
	for(int i=1;i<=n;i++)
	{
		scanf("%s",str[i]+1);
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<m;j++)
		{
			if(j==1)
			printf("#");
			else
			if((i&1)||str[i][j]=='#')
			printf("#");
			else
			printf(".");
		}
		printf(".\n");
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<m;j++)
		{
			if(j==1)
			printf(".");
			else
			if(!(i&1)||str[i][j]=='#')
			printf("#");
			else
			printf(".");
		}
		printf("#\n");
	}
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int,int> P;
constexpr ll INF = (1LL << 55);

template <typename T> 
struct LazySegmentTree {
  
  int n;
  vector<T> node, lazy;

  T f(T a, T b) {return (a + b);}

  LazySegmentTree (int sz, T init = 0) {
    n = 1; while (n < sz) n <<= 1;
    node.assign(2*n, init);
    lazy.assign(2*n,0); /*区間加算の時は0*/
  }

  void eval (int k) {
    if (lazy[k] == 0) return ;
    node[k] += lazy[k]; /*区間加算に注意*/
    if (k < n) {
      lazy[2*k+1] += lazy[k];
      lazy[2*k+2] += lazy[k];
    }
    lazy[k] = 0;
  }

  void update(int a, int b, T x, int k = 0, int l = 0, int r = -1) {
    eval(k);
    if (r < 0) r = n;
    if (b <= l || r <= a) return ;
    if (a <= l && r <= b) {
      lazy[k] = x;
      eval(k);
    } else {
      update(a, b, x, 2*k+1, l, (r+l)/2);
      update(a, b, x, 2*k+2, (r+l)/2, r);
      node[k] = f(node[2*k+1], node[2*k+2]);
    }
  }

  T query(int a, int b, int k = 0, int l = 0, int r = -1) {
    eval(k);
    if (r < 0) r = n;
    if (r <= a || b <= l) return 0;
    if (a <= l && r <= b) return node[k];
    T vl = query(a, b, 2*k+1, l, (l+r)/2);
    T vr = query(a, b, 2*k+2, (l+r)/2, r);
    return f(vl, vr);
  }

};

int main(){
  int n, d, a;
  cin >> n >> d >> a;
  vector<pair<ll, ll>> mons;
  for (int i = 0; i < n; i++) {
    ll x, h;
    cin >> x >> h;
    mons.emplace_back(make_pair(x, h));
  }

  sort(mons.begin(), mons.end());
  LazySegmentTree<ll> seg(n);
  for (int i = 0; i < n; i++) seg.update(i, i + 1, mons[i].second);

  ll res = 0;
  for (int i = 0; i < n; i++) {
    if (seg.query(i, i + 1) <= 0) continue;
    ll cnt = (seg.query(i, i + 1) + a - 1) / a;
    res += cnt;
    ll x = mons[i].first + 2 * d;
    auto r = lower_bound(mons.begin(), mons.end(), make_pair(x,INF)) - mons.begin();
    seg.update(i, r, -cnt * a);
  }
  cout << res << endl;
  return 0;
} 

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

int main() {
  int i, j;
  int N;
  cin >> N;
  vector<string> s(N);
  for (i = 0; i < N; i++) cin >> s.at(i);
    
  int M;
  cin >> M;
  vector<string> t(M);
  for (i = 0; i < M; i++) cin >> t.at(i);
  
  int p = 0;
  for (i = 0; i < N; i++) {
    int q = 0;
    for (j = 0; j < N; j++) {
      if (s.at(j) == s.at(i)) q++;
    }
    for (j = 0; j < M; j++) {
      if (t.at(j) == s.at(i)) q--;
    }
    p = max(p, q);
  }
  cout << p << endl;
}


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

public class Main {

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

		String str[] = br.readLine().split(" ");

		int n = Integer.parseInt(str[0]);
		int x = Integer.parseInt(str[1]);
		int t = Integer.parseInt(str[2]);

		int now = 0;
		int time = 0;

		while (n > now) {
			now += x;
			time += t;
		}

		System.out.println(time);
	}
}


Measured memory_bytes: 32564