import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; /* * 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. */ /** * * @author jakab4 */ public class Stavitel { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // BufferedReader r = new BufferedReader(new FileReader(new File("C:\\Users\\jakab4\\Documents\\NetBeansProjects\\Stavitel\\src\\vstup.txt"))); BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); int pocet = Integer.valueOf(r.readLine()); for(int i=0; i< pocet; i++) { int vstup = Integer.valueOf(r.readLine()); int [] front = new int[vstup]; StringTokenizer token = new StringTokenizer(r.readLine()," "); int fs,hs; int pom = 0; for(int j=0; j hs) min = fs; else min = hs; System.out.println("Minimalni budova obsahuje " +min +" kostek, maximalni " +max +" kostek."); } } }