jiahuimbzuai/CoQuIR huggingface dataset:
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/



/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (W, a, b) = (input[0], input[1], input[2])
var ans = b-(a+W)
if ans < 0 {
    ans = a-(b+W)
}
print(ans)
//  [typescript]
function main(input) {
  const [w, a, b] = input.trim().split(" ").map(n => Number(n));
  const min = Math.min(a, b);
  const max = Math.max(a, b);
  const result = min + w < max ? max - min - w : 0;
  console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10));
   let W = xs[0];
   let a = xs[1];
   let b = xs[2];
   let ans = 0;
   if(b-a>=W){
      console.log(ans=(b-a)-W);
   }else if(a-b>=W){
      console.log(ans=(a-b)-W);
   }else{
      console.log(ans=0);
   }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  const a=-tn()+abs(tn()-tn())
  to(a<0?0:a)
}
main()
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  to(-tn()+abs(tn()-tn()))
}
main()
//  [python]
n=int(input())
L=sorted(map(int,input().split()))
ans=L[0]
for i in L[1:]:
    ans+=i
    ans/=2
print(ans)
//  [python]
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(N: int, v: "List[int]"):
    v.sort()
    tmp = (v[0] + v[1]) / 2
    for i in range(2, N):
        tmp = (tmp + v[i]) / 2
    ret = tmp
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    v = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, v)

if __name__ == '__main__':
    main()
//  [python]
N = int(input())
V = list(map(int, input().split()))
V.sort()
ans = V[0]
for v in V[1:]:
    ans = (ans + v) / 2
print(ans)
//  [python]
n = int(input())
arr = list(map(int, input().split()))

for _ in range(n - 1):
    arr.sort()
    new_v = (arr[0] + arr[1]) / 2
    del arr[0:2]
    arr.append(new_v)

print(int(arr[0]))
//  [python]
n=int(input())
v=list(map(int ,input().split()))
l=[]
draw_list=[]
second_draw=[]
for i in range(0,len(v)-1):
    first_combination=float((v[i]+v[i+1])/2)
    draw_list.append(first_combination)
    # print(draw_list)
for j in range(0,len(v)-1):
    second_combination=float((draw_list[j]+v[j])/2)
    second_draw.append(second_combination)
    # print(second_draw)

draw_list.extend(second_draw)
print(int(max(draw_list)))
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		double v[] = new double[n];
		ArrayList<ArrayList<Double>> list = new ArrayList<ArrayList<Double>>();
		for (int i = 0; i < n; i++) {
			v[i] = Double.parseDouble(str[i]);
		}

		Arrays.sort(v);
		double d = v[0];
		for (int i = 0; i < n; i++) {
			d = (d + v[i]) / 2;
		}
		System.out.println(d);
	}

	static double get(double d[]) {
		if (d.length == 2)
			return (d[0] + d[1]) / 2;
		double dou1[] = new double[d.length / 2];
		double dou2[];
		if (d.length % 3 == 0)
			dou2 = new double[(d.length / 2)];
		else {
			dou2 = new double[(d.length / 2) + 1];
		}
		for (int i = 0; i < d.length / 2; i++) {
			dou1[i] = d[i];
			if (d.length % 3 == 0)
				dou2[i] = d[i + (d.length / 2)];
			else {
				dou2[i] = d[i + ((d.length / 2) + 1)];
			}

		}
		return (get(dou1) + get(dou2)) / 2;
	}
}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int N = sc.nextInt();
		int[] v = new int[N];
		for (int i = 0; i < N; ++i) {
			v[i] = sc.nextInt();
		}
		Arrays.sort(v);
		
		double tempResult = 0.0d;
		double two = 2.0d;
		
		tempResult += (double)v[0];
		tempResult += (double)v[1];
		for (int i = 0; i < N - 2; ++i) {
			tempResult += two * v[i+2];
			two *= (double)2.0d;
		}
		
		double result = tempResult / two;
		
		
		System.out.println(result);
		
	}
	
	private static int kaijo(int x) {
		int result = 1;
		for(int i = 1; i <= x; ++i) result *= 2;
		return result;
	}

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}
//  [java]
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int[] v = new int[N];
            for (int i = 0; i < N; i++) {
                v[i] = in.nextInt();
            }

            Arrays.sort(v);

            double res = 0;
            for (int i = N - 1, div = 2; i >= 0; i--, div *= 2) {
                if (i == 0) {
                    div /= 2;
                }
                res += (double) v[i] / div;
            }

            System.out.println(res);
        }
    }
}
//  [java]
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] v = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            v[i] = sc.nextInt();
        }
        Arrays.sort(v);
        Double s = (v[0] + v[1]) / 2.0;
        for(int i = 2 ; i < n ; i++ ){
            s = (s + v[2]) / 2.0;
        }
        System.out.println(s);
    }
}
//  [cpp]
#include<bits/stdc++.h>


using namespace std;

int a[55];

main(){
    int n;

    scanf("%d" , &n);

    for(int i = 0 ; i < n ; i ++){
        scanf("%d" , &a[i]);
    }
    sort(a , a + n);

    double ans = a[0];
    for(int i = 1 ; i < n ; i ++){
        ans = (ans + 1.0*a[i]) / 2.0;
    }

    printf("%.9f\n" , ans);

    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0, max_i = (n); i < max_i; i++)
#define repi(i, a, b) for (long long i = (a), max_i = (b); i < max_i; i++)
using namespace std;
typedef long long ll;

int main() {
  int N; cin >> N;
  vector<int> v(N);
  rep(i,N) cin >> v[i];
  sort(v.begin(), v.end());
  double ans = v[0];
  repi(i,1,N) ans = (ans + v[i])/2;
  printf("%.10f\n", ans);
  return 0;
}
//  [cpp]
#include <vector>
#include <sstream>
#include <algorithm>
#include <fstream>
#include <list>
#include <map>
#include <istream>
#include <bitset>
#include <sstream>
#include <unordered_map>
#include <stack>
#include <set>
#include <cmath>
#include <random>
#include <iostream>
#include <bitset>
#include <iomanip>
#include <queue>
#include <string>

#define int long long
#define endl "\n"
#define all(x) x.begin(),x.end()
#define rr return 0
#define xx first
#define yy second
#define pii pair<int,int>

using namespace std;
typedef long long ll;
typedef long double ld;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i = 0;i < n;i++){
        cin >> a[i];
    }
    sort(all(a));
    double p = a[0];
    for(int i = 1;i < n;i++){
        p = (p + a[i]) / 2;
    }
    cout << fixed << setprecision(10) << p;
    rr;
}
//  [cpp]
#include<iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include<map>
#include<cstring>
#include<iomanip>
#include <string>
#include <vector>	
#include<unordered_map>
#include<unordered_set>
using namespace std;


typedef long long unsigned llu;
typedef long double ld;
#define ll long long
#define PI 3.14159265358979323846
#define For(i, a, b) for (int i = a, sz = (int)b; i < sz; i++)
#define rFor(i, a, b, c) for (int i = (a); i >= (b); i -= (c))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fill(a, b) memset(a, b, sizeof(a))
#define IO ios_base::sync_with_stdio(false), cin.tie(0),cout.tie(0)
const int mod = 1000000007;
const ll inf = 1000000000009;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) { return a*b/gcd(a,b);}

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

int main()
{
	IO;
	int n{};double res,ans{},cnt{};
	cin>>n;
	vector<double>v(n);
	For(i,0,n)cin>>v[i];
	For(i,0,n)//500 300 200 100
	{
		//500
		For(j,i+1,n)
		{
			// 300 // 200
			res=(v[i]+v[j])/2.0;
			For(k,0,n)
			{
				
				if(k!=i && k!=j){  
					res=(res+v[k])/2.0;
				}
			}
				ans=max(res,ans);
				
		}
	}
	(!ans)?cout<<fixed<<setprecision(1)<<res<<'\n':cout<<fixed<<setprecision(1)<<ans<<'\n';
	//system("pause");
	return 0;
}
//  [cpp]
#include<iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include<map>
#include<cstring>
#include<iomanip>
#include <string>
#include <vector>	
#include<unordered_map>
#include<unordered_set>
using namespace std;


typedef long long unsigned llu;
typedef long double ld;
#define ll long long
#define PI 3.14159265358979323846
#define For(i, a, b) for (int i = a, sz = (int)b; i < sz; i++)
#define rFor(i, a, b, c) for (int i = (a); i >= (b); i -= (c))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fill(a, b) memset(a, b, sizeof(a))
#define IO ios_base::sync_with_stdio(false), cin.tie(0),cout.tie(0)
const int mod = 1000000007;
const ll inf = 1000000000009;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) { return a*b/gcd(a,b);}

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

int main()
{
	IO;
	int n{};double res,ans{},cnt{};
	cin>>n;
	vector<double>v(n);
	For(i,0,n)cin>>v[i];
	For(i,0,n)//500 300 200 100
	{
		//500
		For(j,i+1,n)
		{
			// 300 // 200
			res=(v[i]+v[j])/2.0;
			For(k,0,n)
			{
				
				if(k!=i && k!=j){  
					cnt=(res+v[k])/2.0;
					ans=max(cnt,ans);
				}
			}
		}
	}
	(!ans)?cout<<fixed<<setprecision(1)<<res<<'\n':cout<<fixed<<setprecision(1)<<ans<<'\n';
	//system("pause");
	return 0;
}
//  [cpp]
#include<iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include<map>
#include<cstring>
#include<iomanip>
#include <string>
#include <vector>	
#include<unordered_map>
#include<unordered_set>
using namespace std;


typedef long long unsigned llu;
typedef long double ld;
#define ll long long
#define PI 3.14159265358979323846
#define For(i, a, b) for (int i = a, sz = (int)b; i < sz; i++)
#define rFor(i, a, b, c) for (int i = (a); i >= (b); i -= (c))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fill(a, b) memset(a, b, sizeof(a))
#define IO ios_base::sync_with_stdio(false), cin.tie(0),cout.tie(0)
const int mod = 1000000007;
const ll inf = 1000000000009;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) { return a*b/gcd(a,b);}

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

int main()
{
	IO;
	int n{};double res,ans{},cnt{};
	cin>>n;
	vector<double>v(n);
	For(i,0,n)cin>>v[i];
	For(i,0,n)//500 300 200 100
	{
		//500
		For(j,i+1,n)
		{
			// 300 // 200
			res=(v[i]+v[j])/2;
			For(k,0,n)
			{
				
				if(k!=i && k!=j){  
					cnt=(res+v[k])/2.0;
					ans=max(cnt,ans);
				}
			}
		}
	}
	(!ans)?cout<<fixed<<setprecision(1)<<res<<'\n':cout<<fixed<<setprecision(1)<<ans<<'\n';
	//system("pause");
	return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <ctype.h>
#include <string.h>

int f(const void *a, const void *b)
{
	return(*(int *)a - *(int *)b);
}
int main(void)
{
	int n;
	scanf("%d",&n);
	int *v;
	v = (int *)malloc(sizeof(int)*(n));
	double *a;
	a = (double *)malloc(sizeof(double)*(n));
	int i = 0;
	while (i < n)
	{
		scanf("%d",&v[i]);
		i++;
	}
	qsort(v,n,sizeof(int),f);
	i = 0;
	while (i < n)
	{
		a[i] = (double)v[i];
		i++;
	}
	i = 1;
	while (i < n)
	{
		a[i] = (a[i] + a[i-1])/2.0;
		i++;
	}
	printf("%.12f\n",a[n-1]);
	return(0);
}
//  [c]
#include <stdio.h>

int main(){
  long n,v[1005],i,j,k,m,f=1;
  scanf("%ld",&n);
  for(i=0;i<n;i++){
    scanf("%ld",&v[i]);
    v[i]<<=(n-1);
  }
  while(f==1){
    f=0;
    for(i=0;i<n-1;i++){
      if(v[i]<v[i+1]){
        k=v[i];
        v[i]=v[i+1];
        v[i+1]=k;
        f=1;
      }
    }
  }
  for(i=n-1;i>0;i--){
    v[i-1]+=v[i];
    v[i-1]>>=1;
  }
  printf("%ld.",v[0]>>(n-1));
  v[0]&=((long)1<<(n-1))-1;
  for(i=0;i<=6;i++){
    v[0]*=10;
    printf("%ld",v[0]>>(n-1));
    v[0]&=((long)1<<(n-1))-1;
  }
  return(0);
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
/*double sort(const double *a,const double *b){
return *b-*a;
}*/
int main(void){
  int n;
  scanf("%d",&n);
  double a[n];
  for(int i=0;i<n;i++){
	scanf("%lf",&a[i]);
  }
  //qsort(a,n,sizeof(a[0]),sort);
   for(int i=0;i<n-1;i++){
	for(int j=i+1;j<n;j++){
	if(a[i]<a[j]){
      double w=a[i];
      a[i]=a[j];
      a[j]=w;
  }
    }}
double sum=0;
  for(int i=0;i<n-1;i++){
    //printf("%lf\n",a[i]/pow(2,i+1));
	sum+=a[i]/pow(2,i+1);
  }
  sum+=a[n-1]/pow(2,n-1);
  printf("%lf",sum);
  return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}


int main(void){
  int n;
  float v[1005];
  
  scanf("%d", &n);
  for(int i=0;i<n;i++){
    scanf("%f", &v[i]);
  }
   qsort(v, n, sizeof(int), compare_int);
  for(int i=0;i<n-1;i++){
    int x = v[i];
    int y= v[i+1];
    v[i+1]= (x+y)/2;
  }
  printf("%f", v[n-1]);
  return 0;
}
//  [c]
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int n,u[50];
	int i,j;
	double x=0;
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&u[i]);
	sort(u,u+n);
	x=u[0];
	for(i=0;i<n-1;i++){
		x=(double)((x+u[i+1])/2);
	}
	printf("%lf\n",x);
	return 0;
}
//  [c]
#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    double M = -1e9, tmp, count [n+10];
    int arr[n+10], i, j=0;
    for (i=0; i<n; i++)
        scanf("%d", &arr[i]);

    tmp = arr [n-1];
    for (i=n-2; i>=0; i--){
        tmp += arr[i];
        tmp /= 2;
        count [j] = tmp;
        j++;
    }
    for (i=0; i<j; i++){
        if (M <= count[i])
            M = count [i];
    }
    printf("%.1lf\n", M);
    return 0;
}
//  [javascript]
"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
const args_lines = arg_str.split('\n')
const n = args_lines[0]
const v_array = args_lines[1].split(' ')

const v_array_num = v_array.map(x=>parseInt(x))
const v_array_num_sort = v_array_num.sort((a,b)=>(a-b))

const result = v_array_num_sort.reduce((a,b)=>((a+b)/2))

console.log(result)
//  [javascript]
"use strict"

function Main(input) {
    const N = parseInt(input[0], 10);
    const V = input.slice(1).map(v => parseInt(v, 10));

    const sortedV = V.sort((a, b) => a - b);
    let result = 0;

    for (let i = 0; i < N - 1; i++) {
        if (i === 0) {
            result = (sortedV[i] + sortedV[i + 1]) / 2;
        } else {
            result = (result + sortedV[i + 1]) / 2;
        }
    }

    console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));
//  [javascript]
function Main(input) {
  "use strict"
  const temp = input.split("\n")

	const n = parseInt(temp.shift());
  const vn = temp.shift().split(" ").map(e => parseInt(e));
  vn.sort((a,b) => b - a);

  let value = 0;
  for(let i = 0; i < n; i++){
    if(i !== n - 1) value += vn[i] / Math.pow(2, i + 1)
    else value += vn[i] / Math.pow(2, i)
  }
  console.log(value)
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	var data = input.split("\n");
	var kazu = parseInt(data[0],10);
	var n =  data[1].split(" ").map((n) => parseInt(n, 10));
	
	n.sort(function(a, b) {
		return a-b;
	});
	
	var tmp = 0;
	
	for(var i=0;i < kazu -1; i++){
		tmp = (n[0]+n[1])/2;
		n.shift();
		n[0] = tmp;
		console.log(n)
	}
	console.log(n[0])
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	var data = input.split("\n");
	var n =  data[1].split(" ").map((n) => parseInt(n, 10));
	n = n.sort();
	var tmp = 0;
	
	for(var i=0;i < parseInt(data[0])-1; i++){
		tmp = (n[0]+n[1])/2
		n.shift();
		n[0] = tmp;
	}
	console.log(n[0])
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	var data = input.split("\n");
	var n =  data[1].split(" ").map((n) => parseInt(n, 10));
	n = n.sort();
	console.log(n)
	var tmp = 0;
	
	for(var i=0;i < parseInt(data[0])-1; i++){
		tmp = (n[0]+n[1])/2
		n.shift();
		n[0] = tmp;
	}
	console.log(n[0])
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
	"sort"
)

func main() {
	var n int
	fmt.Scan(&n)

	vs := make([]float64, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&vs[i])
	}

	sort.Float64s(vs)
	cur := vs[0]
	for i := 1 ; i < n; i++ {
		cur = (cur +vs[i])/2.0
	}
	fmt.Println(cur)

}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

func main() {
	var wtr = bufio.NewWriter(os.Stdout)
	var N int
	fmt.Scan(&N)
	v := make([]float64, N)
	for i := 0; i < N; i++ {
		fmt.Scan(&v[i])
	}
	sort.Float64s(v)
	for i := 0; i < N-1; i++ {
		v[i+1] = (v[i] + v[i+1]) / 2.0
	}
	fmt.Fprintln(wtr, v[N-1])

	_ = wtr.Flush()
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func main() {
	sc.Split(bufio.ScanWords)
	n := nextInt()

	x := []float64{}

	for i := 0; i < n; i++ {
		x = append(x, float64(nextInt()))
	}

	sort.Float64s(x)

	ave := (x[0] + x[1]) / 2
	for i := 2; i < len(x); i++ {
		ave = (ave + x[i]) / 2
	}

	fmt.Println(ave)
}
//  [go]
#include <iostream>
#include <iomanip>
#include <queue>
#include <vector>

int main() {
    int n;
    
    std::priority_queue<double, std::vector<double>, std::greater<double> > q;

    std::cin >> n;
    for (int i = 0; i < n; i++) {
        int v;
        std::cin >> v;
        q.push((double) v);
    }

    while (q.size() > 1) {
        double a, b;
        a = q.top();
        q.pop();
        b = q.top();
        q.pop();

        q.push((a + b) / 2);
    }

    double r = q.top();
    std::cout << std::setprecision(5) << r << std::endl;
}
//  [go]
package main

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

func main() {
	N := getStdinInt()
	v := getStdinIntArr()
	vf := make([]float64, N)
	for i := 0; i < N; i++ {
		vf[i] = (float64)(v[i])
	}

	sort.Slice(vf, func(i, j int) bool { return vf[i] < vf[j] })

	for {
		vftmp := make([]float64, 0)

		for i := 0; i+1 < len(vf); i += 2 {
			vftmp = append(vftmp,
				(float64)(vf[i]+vf[i+1])/2.0)
		}
		if len(vf)%2 == 1 {
			vftmp = append(vftmp, vf[len(vf)-1])
		}

		vf = vftmp
		if len(vftmp) <= 1 {
			break
		}
	}

	fmt.Printf("%f\n", vf[0])
}

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinInt2() (int, int) {
	list := getStdinIntArr()
	return list[0], list[1]
}
func getStdinInt3() (int, int, int) {
	list := getStdinIntArr()
	return list[0], list[1], list[2]
}
func getStdinInt64() int64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return rtn
}
func getStdinIntU64() uint64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return uint64(rtn)
}
func getStdinInt64_2() (int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1]
}
func getStdinInt64_3() (int64, int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1], list[2]
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}
func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}
func getStdinIntArrU64() []uint64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]uint64, len(list))
	for idx, val := range list {
		r, _ := strconv.ParseInt(val, 10, 64)
		rtn[idx] = uint64(r)
	}
	return rtn
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}
func max64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}
func abs(n int) int {
	if n < 0 {
		return -n
	}
	return n
}
func abs64(n int64) int64 {
	if n < 0 {
		return -n
	}
	return n
}
func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, _ := sc.ReadLine()
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}
//  [go]
package main
 
import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)
 
var sc = bufio.NewScanner(os.Stdin)
 
func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024*1024), bufio.MaxScanTokenSize)
}
 
//func nextString() string {
//	sc.Scan()
//	return sc.Text()
//}
 
func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var N int
var ANS float64
var L []int
func main() {
	N = nextInt()
	L = make([]int, N)
	for i := 0; i < N; i++ {
		L[i] = nextInt()
	}
	l := make([]int, N)
	dp(l, 0)
	fmt.Println(ANS)
}

func dp(l []int, depth int) {
	if depth == N {
		if uniq(l) {
			ans := float64(L[l[0]])
			for i := 1; i < N; i++ {
				ans = (ans + float64(L[l[i]])) / float64(2)
			}
			ANS = max(ANS, ans)
		}
		return
	}
	depth++
	for i := 0; i < N; i++ {
		l[depth - 1] = i
		dp(l, depth)
	}
}
func uniq(l []int) bool {
	for i := 0; i < N - 1; i++ {
		for j := i + 1; j < N; j++ {
			if l[i] == l[j] {
				return false
			}
		}
	}
	return true
}

func max(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}
//  [ruby]
n = gets.chomp.to_i
v = gets.chomp.split(' ').map(&:to_f).sort

(n-1).times do
  a = v.shift
  b = v.shift
  v.unshift((a+b)/2)
end

print(v[0])
//  [ruby]
# ABC 138 C
# https://atcoder.jp/contests/abc138/tasks/abc138_c

n = gets.to_i
v = gets.split(/ /).map(&:to_i)

class Item
  def initialize(value, i)
    @value = value
    @i = i
  end

  attr_reader :value, :i

  def composed_value(n)
    j = i == 0 ? n - 1 : n - i
    value * 1.0 / (2 ** j)
  end
end

composed_values = v.sort.map.with_index(0) { |value, i| Item.new(value, i).composed_value(n) }
# puts composed_values
puts composed_values.reduce(0) { |acc, i| acc + i }
//  [ruby]
n = gets.to_i
v = gets.split.map(&:to_i)
v.sort!
sum = v[0]
(1...n).each do |i|
  sum = (sum + v[i]) / 2.0
end
puts sum
//  [ruby]
  n = gets.to_i; break if n.zero?
  arr = gets.split(' ').map(&:to_f).sort#; break if arr.empty?
  e = arr.shift
  
  (n-1).times do
    e = (e + arr.shift) / 2.0
  end

  puts e
//  [ruby]
gets
p gets.split.map{|i|i.to_i*100}.sort.inject{|r,i| (r+i)/2}/100
//  [ruby]
n,*v=`dd`.split.map(&:to_r).sort
p v.inject{|r,i|(r+i)/2}.to_f
//  [rust]
use std::io::stdin;

fn main() {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.clear();

    stdin().read_line(&mut buf).unwrap();
    let iter = buf.trim().split_whitespace();
    let values: Vec<i32> = iter.map(|str| str.parse::<i32>().unwrap()).collect();

    println!("{}", solve(values));
}

fn solve(mut values: Vec<i32>) -> f64{
    values.sort();
    let mut result = values[0] as f64;
    for index in 1..values.len(){
        result = (result + values[index] as f64) / 2.0;
    }
    result
}
//  [rust]
use std::collections::VecDeque;

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|s| s.parse().ok().unwrap())
        .collect()
}

fn main() {
    let _n = read::<usize>();
    let mut vs = read_vec::<usize>();
    vs.sort();
    let vs = vs.iter().map(|&x| x as f64).collect::<Vec<_>>();

    let mut deque = VecDeque::from(vs);


    while deque.len() > 1 {
        if let (Some(a), Some(b)) = (deque.pop_front(), deque.pop_front()) {
            deque.push_front((a + b) / 2.0);
        }
    }

    let ans = deque.pop_front().unwrap();
    println!("{}", ans);
}
//  [rust]

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
 
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}
 
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
 
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}
 
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
 
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
 
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
 
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
 
 
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    /*     input! {
        n: usize,
        mut plan: [(i32, i32, i32); n],  // Vec<(i32, i32, i32)>
    }
 */
    input! {
        n:usize,
        vs:[usize;n],
    }

    let mut vs = vs;
    vs.sort();
    let ans = vs.iter().fold(0.0,|acc,cur|{
        if acc == 0.0 {
            return *cur as f32;
        }else{
            return (acc + *cur as f32) / 2.0;
        }
    });
    println!("{}",ans);

}
//  [rust]
use proconio::{fastout, input};
use std::cmp::Ordering;

#[fastout]
fn main() {
    input! {n: usize, v: [f64; n]};

    let mut v: Vec<f64> = v;
    v.sort_by(cmp_f64);

    while v.len() > 1 {
        let m1 = v.pop().unwrap();
        let m2 = v.pop().unwrap();
        v.push((m1 + m2) / 2.0);
        v.sort_by(cmp_f64);
    }

    println!("{}", v[0]);
}

fn cmp_f64(a: &f64, b: &f64) -> Ordering {
    if a < b {
        return Ordering::Less;
    } else if a > b {
        return Ordering::Greater;
    }
    return Ordering::Equal;
}
//  [rust]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {n: usize, v: [usize; n]};

    let mut v: Vec<usize> = v;
    v.sort();

    while v.len() > 1 {
        let m1 = v.pop().unwrap();
        let m2 = v.pop().unwrap();
        v.push((m1 + m2) / 2);
        v.sort();
    }

    println!("{}", v[0]);
}
//  [rust]
use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let n: usize = iterator.next().unwrap().parse().unwrap();
    let mut values: Vec<usize> = Vec::with_capacity(n);
    for _i in 0..n {
        values.push(iterator.next().unwrap().parse().unwrap());
    }

    let perms = make(n);
    let mut max: f64 = 0.0;
    for perm in perms {
        let mut sum: f64 = values[perm[0] - 1] as f64;
        for p in 1..perm.len() {
            sum = (sum + values[perm[p] - 1] as f64) / 2.0;
        }
        if sum > max {
            max = sum;
        }
    }

    return format!("{:.10}", max);
}

fn make(n: usize) -> Vec<Vec<usize>> {
    let mut original = Vec::new();
    for i in 1..(n + 1) {
        original.push(i)
    }

    let mut result = Vec::new();
    _make(original, Vec::new(), &mut result);
    return result;
}

fn _make(candidate: Vec<usize>, perm: Vec<usize>, result: &mut Vec<Vec<usize>>) {
    if candidate.is_empty() {
        result.push(perm);
        return;
    }

    for i in 0..candidate.len() {
        let mut c = candidate.clone();
        let mut p = perm.clone();
        p.push(c.remove(i));
        _make(c, p, result);
    }
}
//  [swift]
let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

let sorte = array.sort()
let reduced = sorte.dropFirst().reduce(sorte[0]) { ($0 + $1)/2.0 }

print(reduced)
//  [swift]
var n=Int(readLine()!)!
var arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var i = 0
var d : Double = 0

arr = arr.sort() 
//print( arr )

d = ( ( Double(arr[0]) + Double(arr[1]) ) / 2 )
//print( d )
for i in 2..<n {
  d = ( ( d + Double(arr[i]) ) / 2)
}
       
print( d )
//  [swift]
let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

array.sort()
let reduced = array.dropFirst().reduce(array[0]) { ($0 + $1)/2.0 }

print(reduced)
//  [swift]
let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

var sorte = array.sorted()
let reduced = sorte.reduce(array[0]) { ($0 + $1)/2.0 }

print(reduced)
//  [swift]
let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

var sorted = array.sorted()
let reduced = sorted.reduce(array[0]) { ($0 + $1)/2.0 }

print(reduced)
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a):any[]=>{return Array.from(new Set(a))};
const main=()=>{
  let n=tn()
  let ar=asc(tnn(n))
  let ans=ar[0]
  for(let i=1;i<n;i++){
    ans=(ans+ar[i])/2
  }
  to(ans)
}
main()
//  [typescript]
function main (input) {
	input = input.trim().split('\n');
  	const n = Number(input[0]);
  	const vs = input[1].split(' ').map(n => Number(n));
  	vs.sort(((a, b) => a  - b);
  	let result = (vs[0] + vs[1])/2;
  	for (let i = 2; i < vs.length; i++) {
      const v = vs[i];
      result = (result + v)/2;
    }
  	console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
import * as fs from 'fs'
const reader = (s: string) => s.split('\n') // .map(t => parseInt(t, 10))

function Main(input: string) {
  const N = parseInt(reader(input)[0], 10)
  const v = reader(input)[1]
    .split(' ')
    .map(x => parseInt(x, 10))
    .sort((a, b) => a - b)

  let ans = v[0]
  for (let i = 1; i <= N - 1; i++) {
    ans = (ans + v[i]) / 2
  }

  console.log(ans)
}

Main(fs.readFileSync('/dev/stdin', 'utf8'))
//  [typescript]
'use strict'
function main(input: string) {
    const n: number = Number(input.split('\n')[0]);
    const u: number[] = input.split('\n')[1].split(' ').map(Number).sort();
    const r = u.reduce((acc, cur) => (acc + cur) / 2);
    console.log(r);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
// general helpers
const debug = (message?: any, ...optionalParams: any[]) => {
  if (process.env.LOCAL_DEBUG === '1') console.log(message, ...optionalParams)
}

// helpers
const parseLines = (
  lines: string[]
): { N: number, v: number[] } => {
  const N = +lines[0]
  const v = lines[1].split(' ').map(line => +line)
  const obj = { N, v }
  debug(obj)
  return obj
}
// solver
export const solve = (lines: string[]): string => {
  const { N, v } = parseLines(lines)
  v.reverse()
  const first = v.shift() || 0
  const result = v.reduce((prev, current) => (prev + current) / 2, first)
  return `${result}`
}

// main
const main = (lines: string[]) => {
  console.log(solve(lines))
}

// exec main function for submit
if (process.env.LOCAL_DEBUG !== '1') {
  const { stdin: input, stdout: output } = process
  input.resume()
  input.setEncoding('utf8')
  const lines: string[] = []
  require('readline')
    .createInterface({ input, output })
    .on('line', (line: string) => lines.push(line))
    .on('close', () => main(lines))
}
//  [typescript]
function Main(input: string) {
  // 1行目がinput[0], 2行目がinput[1], …に入る
  const args = input.split("\n");
  // const N: number = parseInt(args[0], 10);
  const A: number[] = args[1].split(" ").map(s => parseInt(s, 10));

  const hoge = (A: number[]) => {
    const N = A.length;
    if (N == 2) {
      console.log((A[0] + A[1]) / 2);
      return;
    }

    let min = 1000;
    let i1 = -1;
    let i2 = -1;

    for (let i = 0; i < N - 1; i++) {
      for (let j = i + 1; j < N; j++) {
        const result = Math.abs(A[i] - A[j]);
        if (result < min) {
          min = result;
          i1 = i;
          i2 = j;
        }
      }
    }

    const n1 = A[i1];
    const n2 = A[i2];
    const newV = (n1 + n2) / 2;
    A[i1] = newV;
    // const newA = A.filter(n => n !== n2);
    A.pop();
    hoge(A);
  };

  hoge(A);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
//Main(require("fs").readFileSync("./input", "utf8"));
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]
A, B, K = list(map(int, input().split()))

if A >= K:
  A -= K
else:
  K -= A
  A = 0
  B = max(0, B - K)
print(A, B)
//  [python]
#ABC-B
a,b,k=map(int,input().split())
if a>=k:
    print(a-k,b,sep=' ')
else:
    if b>=k-a:
        print(0,b-k+a,sep=' ')
    else:
        print(0,0,sep=' ')
//  [python]
A, B, K = map(int,input().split())

A -= K
if(A < 0):
    B -= abs(A)
    A = 0
    if(B < 0):
        B = 0

print(str(A) + " " + str(B))
//  [python]
a, b, k = map(int, input().split())

aa = max (a - k, 0)
bb = max (a + b - k, 0)
print(f'{aa} {bb}')
//  [python]
a, b, k = map(int, input().split())

a -= k
if a < 0:
    b += a
    a = 0 
print(f'{a} {b}')
//  [python]
a, b, k = map(int, input().split())
if a > 0 and a < k:
  a = 0
  K = k - a
  if b > 0 and b > K:
    b = b - K
  elif b > 0 and K >= b:
    b = 0
elif a > 0 and a >= k:
  a = a - k
  exit()
else:
  if b > 0 and b > k:
    b = b - k
  elif b > 0 and k >= b:
    b = 0
print(a, b)
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {

		FastScanner sc = new FastScanner();
		long A = sc.nextLong();
		long B = sc.nextLong();
		long K = sc.nextLong();

		if(A+B<=K)
			System.out.println("0 0");
		else if  (A >= K)
			System.out.println( (A - K) + " " + B);
		else if (A < K)
			System.out.println("0 " + (B - K + A));
	}

	//以下、自作ライブラリ

	//最大公約数
	public static long gcd(long a, long b) {
		if (a < b)
			return gcd(b, a);
		long c = 0;
		c = a % b;
		if (c == 0)
			return b;
		return gcd(b, c);
	}

	//最小公倍数
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}

	//素数判定
	public static boolean isPrime(int n) {
		if (n < 2)
			return false;
		if (n == 2)
			return true;
		if (n % 2 == 0)
			return false;

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

//以下、高速スキャナークラス
class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}
//  [java]
import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        //input
        String[] input = br.readLine().split(" ");
        long A = Long.parseLong(input[0]);
        long B = Long.parseLong(input[1]);
        long K = Long.parseLong(input[2]);

        while(K > 0){
          if(A >= 1){
            if(K >= A){
              K = K - A;
              A = 0;
            }else{
              A = A - K;
              break;
            }
          }else if(B >= 1){
            if(K >= B){
              K = K - B;
              B = 0;
            }else{
              B = B - K;
              break;
            }
          }else{
            break;
          }
        }

        System.out.println(A + " " + B);
      }
    }
}
//  [java]
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            long A = in.nextLong();
            long B = in.nextLong();
            long K = in.nextLong();

            if (A >= K) {
                A -= K;
                K = 0;
            } else {
                A = 0;
                K -= A;
            }

            if (B >= K) {
                B -= K;
                K = 0;
            } else {
                B = 0;
                K -= B;
            }

            System.out.println(A + " " + B);
        }
    }
}
//  [java]
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long k = sc.nextLong();
        for (int i = 1; i < k; i++) {
            if (a >= 1 && b >= 1) a--;
            if (a == 0 && b >= 1) b--;
            if (a == 0 && b == 0) break;
        }
        System.out.print(a + "" + b);
    }
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int A=sc.nextInt();
      int B=sc.nextInt();
      int K=sc.nextInt();
      int cnt=1;
      while(cnt<=K){
         if(A>=1){
            A--;
         }else if(B>=1){
            B--;
         }
         cnt++;
      }
      System.out.print(A+" ");
      System.out.print(B);
   }
}
//  [cpp]
#include<stdio.h>

int main(void)
{
	long long int a, b, k;
	scanf("%lld %lld %lld", &a, &b, &k);

	if (a > k){
		a -= k;
	}

	else{
		k -= a;
		a = 0;
		if (b > k){
			b -= k;
		}
		else{
			b = 0;
		}
	}
	
	printf("%lld %lld\n", a, b);



	return 0;
}
//  [cpp]
#include <iostream>
#include <vector>
#include <algorithm>
#include <ctype.h>
#include <math.h>
using namespace std;


int main(){
    int64_t a,b,k;
    cin>>a>>b>>k;
    if(a>=k){
        cout<<a-k<<" "<<b<<endl;
    }
    else if(a+b<k){
        cout<<0<<" "<<0<<endl;
    }
    else{
        cout<<0<<" "<<b-k+a<<endl;
    }
}
//  [cpp]
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <iostream>
#include <string>
#include<algorithm>
#include <vector>
#include <cassert>
#include<cmath>
using namespace std;
int main() {
	long long i, j;
	long long A;
	long long B;
	long long K;

	cin >> A >> B >> K;

	if (K<=A) {
		cout << A-K<<" " << B << endl;
	}
	else if (K<=A+B) {
		cout << 0 << " " << B-(K-A) << endl;
	}
	else {
		cout << 0 << " " << 0 << endl;
	}


}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define all(z) (z).begin(),(z).end() 
#define MOD 1000000007
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll isprime(ll n)
{
	for(int i=2;i<n;i++)
		if(n%i==0)
		return 0;
		
	return 1;	
}
ll gcd(ll a,ll b)
{ 
    if(a==0) 
        return b;  
    return gcd(b%a,a);  
 } 
ll lcm(ll a,ll b)
{
	return (a*b)/gcd(a,b);
}
int main()
{ 
    FAST;
    ll a,b,k;
    cin>>a>>b>>k;
    while(k--)
    {
    	if(a>=1)a--;
    	else if(b>=1)b--;
    }
    cout<<a<<" "<<b;

    
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

int main() {
    long long a, b, k; cin >> a >> b >> k;
    long long num = min(k, a);
    a -= num; k -= num;
    b -= k;
    cout << a << " " << b << "\n";
}