codeparrot/codecomplex huggingface dataset:
// Problem: 135_A. Replacement
// Time complexity: nlogn
import java.util.Arrays;
import java.util.Scanner;


public class A {
    static final Scanner sc = new Scanner(System.in);
    
    void run() {
        int n = sc.nextInt();
        int[] xs = new int[n];
        for(int i = 0; i < n; i++) {
            xs[i] = sc.nextInt();
        }
        Arrays.sort(xs);
        xs[n-1] = xs[n-1] == 1 ? 2 : 1;
        Arrays.sort(xs);
        for(int i = 0; i < n; i++)
            System.out.print(xs[i] + " ");
    }
    
    public static void main(String[] args) {
        new A().run();
    }
}
// Problem: 135_A. Replacement
// Time complexity: nlogn
import java.io.*;
import java.util.*;



public class Replacement {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader r=new BufferedReader(new InputStreamReader(System.in));	
		String s=r.readLine();
		int n=new Integer(s);
		int[]arr=new int[n];
		String[]sp=r.readLine().split("[ ]+");
		for (int i = 0; i < sp.length; i++) {
			arr[i]=new Integer(sp[i]);
		}
		Arrays.sort(arr);
		if(arr[arr.length-1]==1){
			arr[arr.length-1]=2;
			Arrays.sort(arr);
			for (int i = 0; i < n; i++) {
				if(i==n-1){
					System.out.println(arr[i]);
				}else
				System.out.print(arr[i]+" ");
			}
			return;
		}
		arr[arr.length-1]=1;
		Arrays.sort(arr);
		for (int i = 0; i < n; i++) {
			if(i==n-1){
				System.out.println(arr[i]);
			}else
			System.out.print(arr[i]+" ");
		}
	}
}
// Problem: 135_A. Replacement
// Time complexity: nlogn
import java.io.*;

import java.awt.geom.Point2D;
import java.text.*;
import java.math.*;
import java.util.*;

public class Main implements Runnable {

	final String filename = "";

	public void solve() throws Exception {
		int n = iread();
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = iread();
		Arrays.sort(a);
		boolean test = true;

		for (int i = 0; i < n; i++) {
			if (a[i] != 1)
				test = false;
			int min = (i == 0) ? 1 : a[i - 1];
			if (test && i == n - 1)
				out.write((min + 1) + "");
			else
				out.write(min + "");
			if (i == n - 1)
				out.write("\n");
			else
				out.write(" ");
		}
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new BufferedWriter(new OutputStreamWriter(System.out));
			// in = new BufferedReader(new FileReader(filename+".in"));
			// out = new BufferedWriter(new FileWriter(filename+".out"));
			solve();
			out.flush();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public int iread() throws Exception {
		return Integer.parseInt(readword());
	}

	public double dread() throws Exception {
		return Double.parseDouble(readword());
	}

	public long lread() throws Exception {
		return Long.parseLong(readword());
	}

	BufferedReader in;

	BufferedWriter out;

	public String readword() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}

	public static void main(String[] args) {
		try {
			Locale.setDefault(Locale.US);
		} catch (Exception e) {

		}
		// new Thread(new Main()).start();
		new Thread(null, new Main(), "1", 1 << 25).start();
	}
}
// Problem: 135_A. Replacement
// Time complexity: nlogn
import java.io.*;
import java.util.*;

public class A {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;

    void solve() throws IOException {
        int n = nextInt();
        int[] a = new int[n];

        boolean onlyOnes = true;

        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
            if (a[i] != 1)
                onlyOnes = false;
        }

        Arrays.sort(a);
        if (onlyOnes) {
            for (int i = 0; i < n - 1; i++)
                out.print("1 ");
            out.print(2);
        } else {
            out.print("1 ");
            for (int i = 0; i < n - 1; i++)
                out.print(a[i] + " ");
        }

    }

    void inp() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new A().inp();
    }

    String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return "0";
            }
        }
        return st.nextToken();
    }

    String nextString() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return "0";
            }
        }
        return st.nextToken("\n");
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

}
// Problem: 135_A. Replacement
// Time complexity: nlogn
import java.io.*;
import java.util.*;

/*
 * Raudel Ravelo Suarez
 * Problem: 
 */

public class C 
{
	Scanner sc;
	BufferedReader in;
	PrintStream out;
	StringTokenizer tok;
	
	public C() throws NumberFormatException, IOException
	{
		//sc = new Scanner(System.in);
		//sc = new Scanner(new FileReader("in.txt"));
		in = new BufferedReader(new InputStreamReader(System.in));
		//in = new BufferedReader(new FileReader("in.txt"));
		out = System.out;
		run();
	}
	void run() throws NumberFormatException, IOException
	{
		//Add your code here
		int[] array;
		int n = nextInt();
		array = new int[n];
		int max = 0;
		int pos = 0;
		for(int i = 0; i <n; i++)
		{
			int l = nextInt();
			if(l > max)
			{
				pos = i;
				max = l;
			}
			array[i] = l;
		}
		if(max == 1)array[pos] = 2;
		else array [pos] = 1;
		Arrays.sort(array);
		out.print(array[0]);
		for(int i = 1; i < n; i++)
			out.print(" " + array[i]);
		out.println();
	}
	public static void main(String[] args) throws NumberFormatException, IOException 
	{
		new C();
	}
	String nextToken() throws IOException
	{
		if(tok ==null || !tok.hasMoreTokens()) tok = new StringTokenizer(in.readLine());
		return tok.nextToken();
	}
	int nextInt() throws NumberFormatException, IOException
	{
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws NumberFormatException, IOException
	{
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws NumberFormatException, IOException
	{
		return Double.parseDouble(nextToken());
	}
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic

/**
 * @author: Mehul Raheja
 */

import java.util.*;
import java.io.*;

public class p3{

    /*
        Runtime = O()
     */
    static int N, M, K;
    static String s;
    static StringTokenizer st;
    static int[] d;
    
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));  
        st = new StringTokenizer(br.readLine());
        int N = Integer.parseInt(st.nextToken());
        int R = Integer.parseInt(st.nextToken());
        double[] x = new double[N];
        st = new StringTokenizer(br.readLine());
        for (int i = 0; i < N; i++) {
            x[i] = Double.parseDouble(st.nextToken());
        }
        double[] y = new double[N];
        for (int i = 0; i < N; i++) {
          //  int found = -1;
            double maxy = R;
            for (int j = i-1; j >= 0; j--) {
                if(Math.abs(x[j] - x[i]) <= 2 * R){
                    maxy = Math.max(y[j] + inc(x[j] - x[i],R), maxy);
                }
            }
            
            y[i] = maxy;
        }
        
        for (int i = 0; i < y.length-1; i++) {
            System.out.print(y[i] + " ");
        }
        System.out.println(y[y.length-1]);
       // System.out.println(Arrays.toString(y));
    }  
    
    public static  double inc(double x, double R){
        return Math.sqrt((4*R*R)-(x*x));
    }
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        FastScanner sc=new FastScanner();
        PrintWriter pw=new PrintWriter(System.out);
        double eps=1e-12;
        while(sc.hasNext()){
            int n=sc.nextInt();
            int r=sc.nextInt();
            double[]shu=new double[n];
            for(int i=0;i<n;i++)shu[i]=sc.nextDouble();
            double[]res=new double[n];
            for(int i=0;i<n;i++){
                for(int j=0;j<i;j++){
                    double temp=Math.abs(shu[i]-shu[j]);
                    if(temp<2*r||Math.abs(temp-2*r)<eps){
                        res[i]=Math.max(res[i],res[j]+Math.sqrt(4*r*r-temp*temp));
                    }
                }
                res[i]=Math.max(res[i],r);
            }
            for(int i=0;i<n;i++){
                pw.print(res[i]+" ");
            }
            pw.flush();
        }
    }
}
class FastScanner{
    BufferedReader br;
    StringTokenizer st;
    FastScanner(){
        br=new BufferedReader(new InputStreamReader(System.in));
        st=new StringTokenizer("");
    }

    String nextLine(){
        String s="";
        try {
            s=br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }
    boolean hasNext(){
        String s="";
        while(!st.hasMoreTokens()){
            s=nextLine();
            if(s==null)return false;
            st=new StringTokenizer(s);
        }
        return true;
    }
    String next(){
        String s="";
        while(!st.hasMoreTokens()){
            s=nextLine();
            st=new StringTokenizer(s);
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.valueOf(next());
    }
    long nextLong(){
        return Long.valueOf(next());
    }
    double nextDouble(){
        return Double.valueOf(next());
    }
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic
import java.io.*;
import java.util.*;

public class Main {

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

		public InputReader() {
			reader = new BufferedReader(new InputStreamReader(System.in), 32768);
			tokenizer = null;
		}

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(System.in), 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 char nextChar() {
			return next().charAt(0);
		}

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

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

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

	public static void main(String[] args) {
		// InputStream inputStream = System.in; // Useful when taking input other than
		// console eg file handling // check ctor of inputReader
		InputReader scn = new InputReader();
		
		int n = scn.nextInt(), r = scn.nextInt();
		double[] y = new double[n];
		int[] x = new int[n];
		boolean[] mark = new boolean[n];
		for(int i = 0; i < n; i++) {
			x[i] = scn.nextInt();
		}
		for(int i = 0; i < n; i++) {
			double yc = r;
			for(int j = 0; j < n; j++) {
				if(i == j || !mark[j]) {
					continue;
				}
				if(x[i] + r < x[j] - r || x[i] - r > x[j] + r) {
					continue;
				}
				
				yc = Math.max(yc, y[j] + Math.sqrt(Math.abs(Math.pow(x[i] - x[j], 2) - 4 * r * r)));
			}
			y[i] = yc;
			mark[i] = true;
		}
		
		for(int i = 0; i < n; i++) {
			System.out.print(y[i] + " ");
		}
		System.out.println();
	}
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int r = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++)
			arr[i] = sc.nextInt();

		double[] ans = new double[n];

		for (int i = 0; i < n; i++) {
			double max = 0;
			for (int j = 0; j < i; j++) {
				int difx = Math.abs(arr[i] - arr[j]);
				if (difx <= 2 * r) {
					max = Math.max(max, ans[j] + Math.sqrt(4 * r * r - difx * difx));
				}
			}
			ans[i] = max;
		}
		PrintWriter pw = new PrintWriter(System.out);
		for (int i = 0; i < n; i++)
			pw.print(ans[i] + r + " ");
		pw.flush();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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

		public String nextLine() throws IOException {
			return br.readLine();
		}

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

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic
import java.util.*;

import java.io.*;
import java.lang.reflect.Array;

public class C {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	public static class Pair {
		int x;
		int y;

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

	public void solve() {
		int n = in.nextInt();
		int r = 2 * in.nextInt();
		int[] x = new int[n];
		for (int i = 0; i < x.length; i++) {
			x[i] = in.nextInt();
		}
		double[] y = new double[n];
		for (int i = 0; i < y.length; i++) {
			y[i] = r / 2;
		}
		for (int i = 0; i < y.length; i++) {
			for (int j = 0; j < i; j++) {
				if (Math.abs(x[i] - x[j]) == r) {
					y[i] = Math.max(y[i], y[j]);
				} else if (Math.abs(x[i] - x[j]) < r) {
					y[i] = Math.max(y[i], y[j] + Math.sqrt(r * r - (x[j] - x[i]) * (x[j] - x[i])));
				}
			}
		}
		for (int i = 0; i < y.length; i++) {
			out.print(y[i] + " ");
		}
	}

	public void run() {
		try {
			if (systemIO) {
				in = new FastScanner(System.in);
				out = new PrintWriter(System.out);
			} else {
				in = new FastScanner(new File("segments.in"));
				out = new PrintWriter(new File("segments.out"));
			}
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

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

	}

	// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
	public static void main(String[] arg) {
		new C().run();
	}
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic
import java.util.*;
import java.io.*;
import java.math.*;
public class Solution{
    public static void main(String[] args) throws Exception {
        int n=nextInt();
        int r=nextInt();
        int x[]=new int[n];
        double y[]=new double[n];
        for(int i=0;i<n;i++)
            x[i]=nextInt();
        for(int i=0;i<n;i++){
            //(x1-x2)2+(y1-y2)2=r2
            y[i]=r;
            for(int j=0;j<i;j++){
                int d=sq(2*r)-sq(x[i]-x[j]);
                if(d>=0){
                    double y1=Math.sqrt(d)+y[j];
                    y[i]=Math.max(y1,y[i]);
                }
            }
        }
        for(int i=0;i<n;i++)
            System.out.printf("%.12g ",y[i]);
    }
    static int sq(int a){
        return a*a;
    }
    static int nextInt()throws IOException{
        InputStream in=System.in;
        int ans=0;
        boolean flag=true;
        byte b=0;
        while ((b>47 && b<58) || flag){
            if(b>=48 && b<58){
                ans=ans*10+(b-48);
                flag=false;
            }
            b=(byte)in.read();
        }
        return ans;
    }
    static String next()throws Exception{
        StringBuilder sb=new StringBuilder(1<<16);
        InputStream in=System.in;
        byte b=0;
        do{
            if(!isWhiteSpace(b))
                sb.append((char)b);
            b=(byte)in.read();
        }while(!isWhiteSpace(b) || sb.length()==0);
        return sb.toString();
    }
    static boolean isWhiteSpace(byte b){
        char ch=(char)b;
        return ch=='\0' || ch==' ' || ch=='\n';
    }
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class C {
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int n = Integer.parseInt(line[0]);
		int r=  Integer.parseInt(line[1]);
		line = in.readLine().split(" ");
		double[] x = new double[n];
		double[] y= new double[n];
		for(int i = 0; i<n; i++) {
			y[i] = r;
			x[i] = Integer.parseInt(line[i]);
		}
		for(int i = 1; i<n; i++) {
			for(int j = 0; j<i; j++) {
				if(Math.abs(x[i]-x[j])>r*2) {
					continue;
				}
				double low = y[j];
				double high = y[j]+(double)r*2.0;
				for(int k = 0; k<85 && low<high; k++) {
					double mid = (low+high)/2.0;
					if(Point2D.distance(x[j], y[j], x[i], mid)<(double)r*2.0) {
						low = mid;
					}
					else {
						high = mid;
					}
				}
				y[i] = Math.max(y[i], low);
			}
		}
		System.out.printf("%.15f",y[0]);
		for(int i = 1; i<n; i++) {
			System.out.printf(" %.15f",y[i]);
		}
		System.out.print("\n");
	}
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic
import java.util.*;
import java.io.*;

public class NewYearAndCurling {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		StringTokenizer t = new StringTokenizer(in.readLine());
		int N = Integer.parseInt(t.nextToken());
		int R = Integer.parseInt(t.nextToken());
		int[] x = new int[N];
		t = new StringTokenizer(in.readLine());
		for(int i = 0; i < N; ++i)
			x[i] = Integer.parseInt(t.nextToken());
		double[] y = new double[N];
		for(int i = 0; i < N; ++i) {
			double max = R;
			for(int j = 0; j < i; ++j ) {
				int xDiff = Math.abs(x[i] - x[j]);
				if(xDiff <= 2 * R)
					max = Math.max(max, y[j] + Math.sqrt(4*R*R - xDiff*xDiff));
			}
			y[i] = max;
		}
		out.print(y[0]);
		for(int i = 1; i < N; ++i)
			out.print(" " + y[i]);
		out.println();
		in.close();
		out.close();
	}
}
// Problem: 908_C. New Year and Curling
// Time complexity: quadratic
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


import java.io.*;
import java.util.*;

/**
 *
 * @author kamranmaharov
 */
public class Main {

    
    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
        
        String[] line = in.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int r = Integer.parseInt(line[1]);
        
        line = in.readLine().split(" ");
        int[] x = new int[n+1];
        double[] y = new double[n+1];
        
        for (int i=1; i<=n; ++i) {
            x[i] = Integer.parseInt(line[i-1]);
            double maxy = -1.0;
            for (int j=1; j<i; ++j) {
                double x2 = x[i];
                double x1 = x[j];
                double y1 = y[j];
                
                double a = 1;
                double b = -2 * y1;
                double c = x1 * x1 + x2 * x2 - 2 * x1 * x2 + y1 * y1 - 4.0 * r * r;
                
                double D = b * b - 4 * a * c;
                //System.out.println(i + " " + j + " " + D);
                if (D >= 0) {
                    double y2 = (-b + Math.sqrt(D)) / (2 * a);
                    maxy = Math.max(maxy, y2);
                }
            }
            if (maxy < 0) {
                maxy = r;
            }
            y[i] = maxy;
            if (i>1) {System.out.print(" ");}
            System.out.printf("%.13f", y[i]);
        }
        System.out.println();
    }
}