@Korkin/

CodeQuest2017-18

Java

No description

fork
loading
Files
  • Main.java
  • CORRECT_OUTPUT.txt
  • Main.class
  • Prob18.in.txt
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import java.util.*;
import java.io.*;

class Main {

  // CodeQuest 2017 Problem 18

  // Problem packet available at: 
  // http://bit.ly/CQpack2017

  public static void main(String[] args)  throws FileNotFoundException {
    Scanner scan = new Scanner(new File("Prob18.in.txt"));

    // Read # of test cases.
    int T = scan.nextInt();
    scan.nextLine();

    // Loop through all test cases.
    for(int zz = 0; zz < T; zz++) {
      String site = scan.nextLine();
      String[] split = site.split(" ");
      String abbrev = "";
      for(String word:split){
        abbrev+=split.substring(0,1);
      }
      int mean;
      int basinNum = scan.nextInt();
      int[] basins = new int[basinNum];
      for(int i = 0; i<basins; i++){
        basins[i] = scan.nextInt();
      }
      //
    }
  }
  public static double ifOpened(int[] basins){
    double mean = 0.0;
    for(int i: basins){
      mean+=i;
    }
    mean/=basins.length;
  }
}