fork(1) download
  1. import java.io.BufferedReader;
  2. import java.io.BufferedWriter;
  3. import java.io.File;
  4. import java.io.FileReader;
  5. import java.io.FileWriter;
  6. import java.io.IOException;
  7. import java.io.PrintWriter;
  8. import java.util.HashMap;
  9.  
  10. import javax.swing.plaf.synth.SynthSpinnerUI;
  11.  
  12. public class Application {
  13.  
  14. private static int number;
  15. private static double distance;
  16. private static City city1 = new Application().new City();
  17. private static City city2 = new Application().new City();
  18. private static City city2min = new Application().new City();
  19. private static City city1min = new Application().new City();
  20. private static HashMap<Integer, String> map = new HashMap<Integer, String>();
  21. private static int saveCount = 1;
  22.  
  23. public class City {
  24.  
  25. @Override
  26. public String toString() {
  27. return "City " + Id + " name: " + name + "Latitude: " + latitude + "Longitude " + longitude;
  28. }
  29.  
  30. public double getLatitude() {
  31. return latitude;
  32. }
  33.  
  34. public void setLatitude(double latitude) {
  35. this.latitude = latitude;
  36. }
  37.  
  38. public double getLongitude() {
  39. return longitude;
  40. }
  41.  
  42. public void setLongitude(double longitude) {
  43. this.longitude = longitude;
  44. }
  45.  
  46. public int getId() {
  47. return Id;
  48. }
  49.  
  50. public void setId(int id) {
  51. Id = id;
  52. }
  53.  
  54. public String getName() {
  55. return name;
  56. }
  57.  
  58. public void setName(String name) {
  59. this.name = name;
  60. }
  61.  
  62. private double latitude;
  63. private double longitude;
  64. private int Id;
  65. private String name;
  66.  
  67. }
  68.  
  69. public static void main(String[] args) {
  70. System.out.println("Welcome to the program. \n Which units do you want to calculate distance in: ");
  71. System.out.println("Press 1 for kilometers.");
  72. System.out.println("Press 2 for miles.");
  73. System.out.println("Press 3 for nautical miles.");
  74. //int choice= System.in.read();
  75. String fileName = "Output.txt";
  76. File file = new File(fileName);
  77.  
  78. try (BufferedReader br = new BufferedReader(new FileReader("test case 9.txt"))) {
  79. String line;
  80. double dist;
  81. number = Integer.parseInt(br.readLine());
  82. while(number != 0) {
  83. System.out.println("Processing " + number + " cities");
  84. distance = Double.POSITIVE_INFINITY;
  85.  
  86. map.clear();
  87. for (int iterator = 0; iterator < number; iterator++) {
  88. line = br.readLine();
  89. map.put(iterator, line);
  90. }
  91.  
  92. //System.out.println("Map is: "+map.toString());
  93. setCity1Data(number-1);
  94. //System.out.println(city1.toString());
  95. for (int j = 0; j < number - 1; j++) {
  96. //System.out.println("Valueof j= "+j);
  97. for (int i = number - 1 -j ; i > 0; i--) {
  98. //System.out.println("Valueof i= "+i);
  99. setCity2Data(i - 1);
  100. //System.out.println(city2.toString());
  101. dist = findDistance();
  102.  
  103. if (dist < distance) {
  104. distance = dist;
  105. //System.out.println("Distance= "+distance);
  106. city1min.setName(city1.getName());
  107. city2min.setName(city2.getName());
  108. }
  109. }
  110. mapAdjust();
  111.  
  112. }
  113. number = Integer.parseInt(br.readLine());
  114. writeDistance(file);
  115. //System.out.println("Min. Distance= "+distance);
  116. }
  117. System.out.println("Finished processing. Please see file: " + fileName + " for the output.");
  118. br.close();
  119. } catch (IOException e) {
  120. System.out.println("Unable to read file.");
  121. }
  122.  
  123. }
  124.  
  125. private static void mapAdjust() {
  126. int length=map.size();
  127. map.remove(length-1);
  128. //for (int i = 0; i < number; i++) {
  129. //map.put(i, map.get(i + 1));
  130. //}
  131. setCity1Data(length-2);
  132. //.out.println("Map adjusted! "+city1.toString());
  133. }
  134.  
  135. private static void writeDistance(File file) {
  136. String message=null;
  137. String[] names={city1min.getName(),city2min.getName()};
  138. if(names[0].compareTo(names[1])>0) {
  139. message="Closest pair: " + city2min.getName() + " " + city1min.getName() + "\n" + "Distance: " + distance;
  140. }
  141. else if(names[0].compareTo(names[1])<0) {
  142. message="Closest pair: " + city1min.getName() + " " + city2min.getName() + "\n" + "Distance: " + distance;
  143. }
  144. try (PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, true)))) {
  145. out.println("Scenario " + saveCount + ":");
  146. out.println(message);
  147. saveCount++;
  148. } catch (IOException e) {
  149. System.out.println("Unable to write the file.");
  150. }
  151. }
  152.  
  153. private static double findDistance() {
  154. return distance(city1.getLatitude(), city1.getLongitude(), city2.getLatitude(), city2.getLongitude(), 'K');
  155.  
  156. }
  157.  
  158. private static void setCity1Data(int x) {
  159. String data1 = map.get(x);
  160. String[] data = data1.split(" ");
  161. city1.setName(data[0]);
  162. city1.setLatitude(Double.parseDouble(data[1]));
  163. city1.setLongitude(Double.parseDouble(data[2]));
  164. city1.setId(1);
  165.  
  166. }
  167.  
  168. private static void setCity2Data(int x) {
  169. String data2 = map.get(x);
  170. String[] data = data2.split(" ");
  171. city2.setName(data[0]);
  172. city2.setLatitude(Double.parseDouble(data[1]));
  173. city2.setLongitude(Double.parseDouble(data[2]));
  174. city2.setId(2);
  175.  
  176. }
  177.  
  178. private static double distance(double lat1, double lon1, double lat2, double lon2, char unit) {
  179. double theta = lon1 - lon2;
  180. double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2))
  181. + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));
  182. dist = Math.acos(dist);
  183. dist = rad2deg(dist);
  184. dist = dist * 60 * 1.1515;
  185. if (unit == 'K') {
  186. dist = dist * 1.609344;
  187. } else if (unit == 'N') {
  188. dist = dist * 0.8684;
  189. }
  190.  
  191. return (Math.round(dist * 10) / 10.0);
  192. }
  193.  
  194. /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
  195. /* :: This function converts decimal degrees to radians : */
  196. /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
  197. private static double deg2rad(double deg) {
  198. return (deg * Math.PI / 180.0);
  199. }
  200.  
  201. /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
  202. /* :: This function converts radians to decimal degrees : */
  203. /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
  204. private static double rad2deg(double rad) {
  205. return (rad * 180.0 / Math.PI);
  206. }
  207.  
  208. }
  209.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
232
Christmas 1.9833 -157.367
Cut 48.633 -112.317
Copenhagen 55.7167 12.45
Condon 45.233 -120.167
Caldwell 43.665 -116.687
Carson 39.1667 -119.767
Carmichael 38.6668 -121.329
Carrollton 33.583 -84.083
Cicero 41.85 -87.745
Chester 41.41 -72.48
Crocker 35.47 -92.08
Chesapeake 36.825 -76.2833
Charlottesville 38 -78.417
Coralville 41.684 -91.5968
Comox 49.68 -124.9
Circleville 39.583 -83
Cantonsville 39.2905 -76.6125
Cayenne 4.9 -52.5
Cave 33.775 -111.896
Corinth 34.917 -88.5
Calgary 51.05 -114.083
Charlotte 35.2289 -80.8458
Crawford 42.683 -103.417
Cumberland 39.65 -78.7633
Cheraw 34.667 -79.867
Cairo 30 31.2833
Cocos -12.1833 96.8333
Chino 34.017 -117.7
Cranford 40.662 -74.216
Clark 40.75 -74
Compton 33.895 -118.226
Chitose 42.8 141.6667
Cedar 37.667 -113.167
Carrizozo 33.667 -105.917
Clarksville 36.5267 -87.3483
Cranston 41.7833 -71.4383
Cary 42.2167 -88.2333
Caliente 37.633 -114.5
Carlton 46.667 -92.433
Cockeysville 39.5 -76.667
Canberra -35.35 149.1667
Colorado 38.8353 -104.821
Concord 37.975 -122.03
Carbondale 37.7 -89.2
Colon 9.3667 -79.8999
Cleveland 41.4975 -81.6972
Chapel 35.9347 -79.0672
Corpus 27.7975 -97.3958
Chinook 48.583 -109.25
Columbus 32.4686 -84.99
Camden 39.9447 -75.1205
Collegedale 35.047 -85.051
Chibougamau 49.9 -74.38
Chillicothe 41.917 -89.5
Colombo 6.9667 79.8666
Cherokee 36.733 -98.367
Covington 39.0867 -84.5117
Chicopee 42.14 -72.6117
Cordova 60.567 -145.633
Crestwood 38.14 -85.45
Corvallis 44.5667 -123.27
Charlevoix 47.61 -70.19
Claremont 43.375 -72.3367
Corning 40.967 -94.667
Claymont 39.805 -75.4533
Clinton 41.8433 -90.1933
Concepcion -36.7667 -73.05
Clarksdale 34.1983 -90.575
Cincinnati 39.1019 -84.5097
Clearlake 38.93333 -122.6
Chuuk 7.45972 151.8389
Council 41.2617 -95.865
Churchill 58.77 -94.09
Casa 32.88 -111.748
College 38.9867 -76.935
Castlerock 46.283 -122.883
Charlottetown 46.24 -63.13
Christchurch -43.483 172.533
Cologne 50.9333 6.95
Chignik 56.233 -158.2
Charleston 32.7764 -79.9314
Caracas 10.5 -66.9666
Central 40.79 -73.2
Clarksburg 39.28 -80.3483
Casper 42.8467 -106.313
Chiclayo -6.7833 -79.8333
Cold 55.2 -162.725
Cody 44.517 -109.033
Clifton 40.8833 -74.1467
Cranbrook 49.68 -115.76
Columbia 41.3178 -81.9606
Clovis 34.4017 -103.205
Crofton 42.733 -97.533
Cheltenham 40.05 -75.11
Cardiff 51.5 -3.2999
Costa 33.64 -117.918
Calais/Dunkirk 50.96 1.95
Conway 35.1 -92.45
Canoga 34.21 -118.57
Cambridge 52.19 0.17
Chattanooga 35.0447 -85.3089
Circle 65.83 -144.06
Centreville 39.083 -76.083
Cheyenne 41.1358 -104.819
Chicago 41.8744 -87.6394
Corbin 36.917 -84.1
Chittagong 22.25 91.8333
Cerritos 33.835 -118.083
Cherbourg 49.65 -1.467
Cape 28.45 -80.458
Chiang 18.7633 98.9667
Champaign 40.118 -88.2467
Calcutta 22.5333 88.3667
Casablanca 33.5333 -7.6832
Cannes 43.73 6.9
Cortez 37.35 -108.583
Culver 34.01 -118.383
Cartersville 34.15 -84.783
Chula 32.6433 -117.083
Chagrin 41.4 -81.6
Cheju 33.5 126.5
Creve 40.6436 -89.6106
Canton 23.1167 113.25
Chatham 47.05 -65.45
Cubi 14.8 120.1667
Clearwater 27.9667 -82.7983
Cripple 38.733 -105.2
Clear 29.53 -95.0778
Carbonado 47.083 -122.05
Attleboro 41.958 -71.2919
Anniston 33.65 -85.783
Auburn 32.6067 -85.4833
Auckland -36.8832 174.75
Antlers 24.233 -95.633
Asuncion -25.2333 -57.5167
Aalborg 57.097 9.85
Aiken 33.533 -81.717
Alexandria 31.19 29.95
AganaNAS 13.48167 144.7933
Alameda 37.7633 -122.243
Adak 51.667 -176.467
Alpine 32.5037 -116.451
Aztec 36.667 -108
Ahwahnee 37.25 -119.42
Ames 42.0317 -93.6167
Altenstadt 47.834 10.868
Annapolis 38.9733 -76.495
Austin 39.5 -117.083
Anaheim 33.835 -117.913
Altoona 40.5153 -78.4008
Atmore 31.017 -87.517
Armour 43.3 -98.35
Aspen 39.25 -106.917
Alert 82.52 -62.28
AddisAbaba 9 38.7333
Arcade-Arden 38.5833 -121.483
Asheville 35.595 -82.5572
Anchorage 61.1667 -149.983
Alamogordo 32.9 -105.957
Amilcar 16.75 -22.95
Augusta 35.267 -91.35
Ascención -7.88 -14.42
Ashland 37.183 -99.767
Ansbach 49.33 10.597
Amchitka 51.38 -179.26
Albuquerque 35.0836 -106.651
Aswan 23.965 32.82
Ardmore 34.167 -97.133
Amherst 41.3975 -82.2197
Allen 64 -145.72
Atlanta 33.7528 -84.3936
Asmara 15.2833 38.9
AnnArbor 42.2831 -83.7478
Alliance 42.1 -102.883
Anderson 13.5867 144.9367
Allentown 40.603 -75.4683
AlManamah 26.0167 50.55
Aden 12.8 45
AliceSprings -23.8 133.9
Athens 33.9567 -83.3833
Alamo 37.367 -115.167
Ambler 67.08 -157.85
Algiers 36.7 3.217
Ainsworth 42.533 -99.85
Ankara 40.03 32.9
Accra 5.6 -0.167
Anaconda 46.1283 -112.953
Acapulco 16.75 -99.767
Alhambra 34.14 -118.107
Abbotsford 49.03 -122.32
Avon 41.667 -72.833
Aberdeen 42.95 -112.83
Ada 47.283 -96.533
Albany 31.575 -84.1583
Antofagasta -23.4333 -70.6
Amman 31.95 35.95
Arica -18.35 -70.3333
Amarillo 35.2075 -101.834
Alpharetta 34.0611 -84.2222
American 42.75 -112.883
Abilene 38.9 -97.2
Afton 36.7 -94.933
Annette 55.045 -131.56
Antwerp 51.2167 4.4
Adams 42.583 -73.167
Arlington 42.0883 -87.98
Adelaide -34.7666 138.5367
Appleton 44.2617 -88.42
Ajo 32.333 -112.917
Astoria 46.183 -123.85
Aldermaston 51.11933 -1.15543
Albion 42.4 -113.57
Arkadelphia 34.1 -93.083
Aqaba 29.6 35.01
Angaur 6.9 134.15
Ash 35.217 -112.483
Aurora 39.74 -104.868
AberdeenPrvGnd 39.235 -76.1749
Argyle 48.35 -96.8
Amami 28.25 129.7
Arese 45.6 9.15
Atlantic 39.3589 -74.4314
Atkinson 42.533 -98.967
Amsterdam 52.35 4.8666
Akron 41.0833 -81.5122
Arvada 39.8 -105.078
Alcoa 35.75 -84
AlexanderCity 32.917 -85.917
Avalon -38.0333 144.4667
Ayase 35.45 139.45
Aviano 46.033 12.6
Ashley 46.05 -99.383
129
Christmas 1.9833 -157.367
Cut 48.633 -112.317
Copenhagen 55.7167 12.45
Condon 45.233 -120.167
Caldwell 43.665 -116.687
Carson 39.1667 -119.767
Carmichael 38.6668 -121.329
Carrollton 33.583 -84.083
Cicero 41.85 -87.745
Chester 41.41 -72.48
Crocker 35.47 -92.08
Chesapeake 36.825 -76.2833
Charlottesville 38 -78.417
Coralville 41.684 -91.5968
Comox 49.68 -124.9
Circleville 39.583 -83
Cantonsville 39.2905 -76.6125
Cayenne 4.9 -52.5
Cave 33.775 -111.896
Corinth 34.917 -88.5
Calgary 51.05 -114.083
Charlotte 35.2289 -80.8458
Crawford 42.683 -103.417
Cumberland 39.65 -78.7633
Cheraw 34.667 -79.867
Cairo 30 31.2833
Cocos -12.1833 96.8333
Chino 34.017 -117.7
Cranford 40.662 -74.216
Clark 40.75 -74
Compton 33.895 -118.226
Chitose 42.8 141.6667
Cedar 37.667 -113.167
Carrizozo 33.667 -105.917
Clarksville 36.5267 -87.3483
Cranston 41.7833 -71.4383
Cary 42.2167 -88.2333
Caliente 37.633 -114.5
Carlton 46.667 -92.433
Cockeysville 39.5 -76.667
Canberra -35.35 149.1667
Colorado 38.8353 -104.821
Concord 37.975 -122.03
Carbondale 37.7 -89.2
Colon 9.3667 -79.8999
Cleveland 41.4975 -81.6972
Chapel 35.9347 -79.0672
Corpus 27.7975 -97.3958
Chinook 48.583 -109.25
Columbus 32.4686 -84.99
Camden 39.9447 -75.1205
Collegedale 35.047 -85.051
Chibougamau 49.9 -74.38
Chillicothe 41.917 -89.5
Colombo 6.9667 79.8666
Cherokee 36.733 -98.367
Covington 39.0867 -84.5117
Chicopee 42.14 -72.6117
Cordova 60.567 -145.633
Crestwood 38.14 -85.45
Corvallis 44.5667 -123.27
Charlevoix 47.61 -70.19
Claremont 43.375 -72.3367
Corning 40.967 -94.667
Claymont 39.805 -75.4533
Clinton 41.8433 -90.1933
Concepcion -36.7667 -73.05
Clarksdale 34.1983 -90.575
Cincinnati 39.1019 -84.5097
Clearlake 38.93333 -122.6
Chuuk 7.45972 151.8389
Council 41.2617 -95.865
Churchill 58.77 -94.09
Casa 32.88 -111.748
College 38.9867 -76.935
Castlerock 46.283 -122.883
Charlottetown 46.24 -63.13
Christchurch -43.483 172.533
Cologne 50.9333 6.95
Chignik 56.233 -158.2
Charleston 32.7764 -79.9314
Caracas 10.5 -66.9666
Central 40.79 -73.2
Clarksburg 39.28 -80.3483
Casper 42.8467 -106.313
Chiclayo -6.7833 -79.8333
Cold 55.2 -162.725
Cody 44.517 -109.033
Clifton 40.8833 -74.1467
Cranbrook 49.68 -115.76
Columbia 41.3178 -81.9606
Clovis 34.4017 -103.205
Crofton 42.733 -97.533
Cheltenham 40.05 -75.11
Cardiff 51.5 -3.2999
Costa 33.64 -117.918
Calais/Dunkirk 50.96 1.95
Conway 35.1 -92.45
Canoga 34.21 -118.57
Cambridge 52.19 0.17
Chattanooga 35.0447 -85.3089
Circle 65.83 -144.06
Centreville 39.083 -76.083
Cheyenne 41.1358 -104.819
Chicago 41.8744 -87.6394
Corbin 36.917 -84.1
Chittagong 22.25 91.8333
Cerritos 33.835 -118.083
Cherbourg 49.65 -1.467
Cape 28.45 -80.458
Chiang 18.7633 98.9667
Champaign 40.118 -88.2467
Calcutta 22.5333 88.3667
Casablanca 33.5333 -7.6832
Cannes 43.73 6.9
Cortez 37.35 -108.583
Culver 34.01 -118.383
Cartersville 34.15 -84.783
Chula 32.6433 -117.083
Chagrin 41.4 -81.6
Cheju 33.5 126.5
Creve 40.6436 -89.6106
Canton 23.1167 113.25
Chatham 47.05 -65.45
Cubi 14.8 120.1667
Clearwater 27.9667 -82.7983
Cripple 38.733 -105.2
Clear 29.53 -95.0778
Carbonado 47.083 -122.05
129
Cairo 30 31.2833
Calais/Dunkirk 50.96 1.95
Calcutta 22.5333 88.3667
Caldwell 43.665 -116.687
Calgary 51.05 -114.083
Caliente 37.633 -114.5
Cambridge 52.19 0.17
Camden 39.9447 -75.1205
Canberra -35.35 149.1667
Cannes 43.73 6.9
Canoga 34.21 -118.57
Canton 23.1167 113.25
Cantonsville 39.2905 -76.6125
Cape 28.45 -80.458
Caracas 10.5 -66.9666
Carbonado 47.083 -122.05
Carbondale 37.7 -89.2
Cardiff 51.5 -3.2999
Carlton 46.667 -92.433
Carmichael 38.6668 -121.329
Carrizozo 33.667 -105.917
Carrollton 33.583 -84.083
Carson 39.1667 -119.767
Cartersville 34.15 -84.783
Cary 42.2167 -88.2333
Casa 32.88 -111.748
Casablanca 33.5333 -7.6832
Casper 42.8467 -106.313
Castlerock 46.283 -122.883
Cave 33.775 -111.896
Cayenne 4.9 -52.5
Cedar 37.667 -113.167
Central 40.79 -73.2
Centreville 39.083 -76.083
Cerritos 33.835 -118.083
Chagrin 41.4 -81.6
Champaign 40.118 -88.2467
Chapel 35.9347 -79.0672
Charleston 32.7764 -79.9314
Charlevoix 47.61 -70.19
Charlotte 35.2289 -80.8458
Charlottesville 38 -78.417
Charlottetown 46.24 -63.13
Chatham 47.05 -65.45
Chattanooga 35.0447 -85.3089
Cheju 33.5 126.5
Cheltenham 40.05 -75.11
Cheraw 34.667 -79.867
Cherbourg 49.65 -1.467
Cherokee 36.733 -98.367
Chesapeake 36.825 -76.2833
Chester 41.41 -72.48
Cheyenne 41.1358 -104.819
Chiang 18.7633 98.9667
Chibougamau 49.9 -74.38
Chicago 41.8744 -87.6394
Chiclayo -6.7833 -79.8333
Chicopee 42.14 -72.6117
Chignik 56.233 -158.2
Chillicothe 41.917 -89.5
Chino 34.017 -117.7
Chinook 48.583 -109.25
Chitose 42.8 141.6667
Chittagong 22.25 91.8333
Christchurch -43.483 172.533
Christmas 1.9833 -157.367
Chula 32.6433 -117.083
Churchill 58.77 -94.09
Chuuk 7.45972 151.8389
Cicero 41.85 -87.745
Cincinnati 39.1019 -84.5097
Circle 65.83 -144.06
Circleville 39.583 -83
Claremont 43.375 -72.3367
Clark 40.75 -74
Clarksburg 39.28 -80.3483
Clarksdale 34.1983 -90.575
Clarksville 36.5267 -87.3483
Claymont 39.805 -75.4533
Clear 29.53 -95.0778
Clearlake 38.93333 -122.6
Clearwater 27.9667 -82.7983
Cleveland 41.4975 -81.6972
Clifton 40.8833 -74.1467
Clinton 41.8433 -90.1933
Clovis 34.4017 -103.205
Cockeysville 39.5 -76.667
Cocos -12.1833 96.8333
Cody 44.517 -109.033
Cold 55.2 -162.725
College 38.9867 -76.935
Collegedale 35.047 -85.051
Cologne 50.9333 6.95
Colombo 6.9667 79.8666
Colon 9.3667 -79.8999
Colorado 38.8353 -104.821
Columbia 41.3178 -81.9606
Columbus 32.4686 -84.99
Comox 49.68 -124.9
Compton 33.895 -118.226
Concepcion -36.7667 -73.05
Concord 37.975 -122.03
Condon 45.233 -120.167
Conway 35.1 -92.45
Copenhagen 55.7167 12.45
Coralville 41.684 -91.5968
Corbin 36.917 -84.1
Cordova 60.567 -145.633
Corinth 34.917 -88.5
Corning 40.967 -94.667
Corpus 27.7975 -97.3958
Cortez 37.35 -108.583
Corvallis 44.5667 -123.27
Costa 33.64 -117.918
Council 41.2617 -95.865
Covington 39.0867 -84.5117
Cranbrook 49.68 -115.76
Cranford 40.662 -74.216
Cranston 41.7833 -71.4383
Crawford 42.683 -103.417
Crestwood 38.14 -85.45
Creve 40.6436 -89.6106
Cripple 38.733 -105.2
Crocker 35.47 -92.08
Crofton 42.733 -97.533
Cubi 14.8 120.1667
Culver 34.01 -118.383
Cumberland 39.65 -78.7633
Cut 48.633 -112.317
103
Alcoa 35.75 -84
Amilcar 16.75 -22.95
AliceSprings -23.8 133.9
Aztec 36.667 -108
Amami 28.25 129.7
Arcade-Arden 38.5833 -121.483
American 42.75 -112.883
Alameda 37.7633 -122.243
Altoona 40.5153 -78.4008
Aden 12.8 45
Atkinson 42.533 -98.967
Aiken 33.533 -81.717
Alamogordo 32.9 -105.957
Adams 42.583 -73.167
Austin 39.5 -117.083
Adak 51.667 -176.467
Arese 45.6 9.15
Abbotsford 49.03 -122.32
Ash 35.217 -112.483
Atmore 31.017 -87.517
Aldermaston 51.11933 -1.15543
Attleboro 41.958 -71.2919
Ames 42.0317 -93.6167
Arkadelphia 34.1 -93.083
Athens 33.9567 -83.3833
Alhambra 34.14 -118.107
Alamo 37.367 -115.167
Aberdeen 42.95 -112.83
Adelaide -34.7666 138.5367
Auburn 32.6067 -85.4833
Aviano 46.033 12.6
AddisAbaba 9 38.7333
Ashley 46.05 -99.383
Atlanta 33.7528 -84.3936
Alliance 42.1 -102.883
Astoria 46.183 -123.85
Albuquerque 35.0836 -106.651
Anaheim 33.835 -117.913
Annette 55.045 -131.56
Allentown 40.603 -75.4683
Ardmore 34.167 -97.133
Ambler 67.08 -157.85
Asuncion -25.2333 -57.5167
Anaconda 46.1283 -112.953
Ansbach 49.33 10.597
Ainsworth 42.533 -99.85
Anniston 33.65 -85.783
Auckland -36.8832 174.75
Amsterdam 52.35 4.8666
Ahwahnee 37.25 -119.42
Arlington 42.0883 -87.98
Ajo 32.333 -112.917
Atlantic 39.3589 -74.4314
Afton 36.7 -94.933
Anderson 13.5867 144.9367
Ankara 40.03 32.9
Alpine 32.5037 -116.451
Asheville 35.595 -82.5572
Aalborg 57.097 9.85
Algiers 36.7 3.217
Augusta 35.267 -91.35
Ayase 35.45 139.45
Armour 43.3 -98.35
Ashland 37.183 -99.767
Argyle 48.35 -96.8
Aurora 39.74 -104.868
Ada 47.283 -96.533
AnnArbor 42.2831 -83.7478
Aqaba 29.6 35.01
Appleton 44.2617 -88.42
Acapulco 16.75 -99.767
Arica -18.35 -70.3333
Antlers 24.233 -95.633
Akron 41.0833 -81.5122
Antwerp 51.2167 4.4
Asmara 15.2833 38.9
Arvada 39.8 -105.078
Alexandria 31.19 29.95
Allen 64 -145.72
Albany 31.575 -84.1583
Alert 82.52 -62.28
Abilene 38.9 -97.2
Amarillo 35.2075 -101.834
Alpharetta 34.0611 -84.2222
Annapolis 38.9733 -76.495
Avon 41.667 -72.833
Amman 31.95 35.95
Antofagasta -23.4333 -70.6
Amherst 41.3975 -82.2197
Accra 5.6 -0.167
Avalon -38.0333 144.4667
AlexanderCity 32.917 -85.917
AberdeenPrvGnd 39.235 -76.1749
Anchorage 61.1667 -149.983
AlManamah 26.0167 50.55
Angaur 6.9 134.15
Amchitka 51.38 -179.26
Altenstadt 47.834 10.868
Ascención -7.88 -14.42
Aswan 23.965 32.82
Aspen 39.25 -106.917
AganaNAS 13.48167 144.7933
Albion 42.4 -113.57
103
Aalborg 57.097 9.85
Abbotsford 49.03 -122.32
AberdeenPrvGnd 39.235 -76.1749
Aberdeen 42.95 -112.83
Abilene 38.9 -97.2
Acapulco 16.75 -99.767
Accra 5.6 -0.167
Ada 47.283 -96.533
Adak 51.667 -176.467
Adams 42.583 -73.167
AddisAbaba 9 38.7333
Adelaide -34.7666 138.5367
Aden 12.8 45
Afton 36.7 -94.933
AganaNAS 13.48167 144.7933
Ahwahnee 37.25 -119.42
Aiken 33.533 -81.717
Ainsworth 42.533 -99.85
Ajo 32.333 -112.917
Akron 41.0833 -81.5122
AlManamah 26.0167 50.55
Alameda 37.7633 -122.243
Alamo 37.367 -115.167
Alamogordo 32.9 -105.957
Albany 31.575 -84.1583
Albion 42.4 -113.57
Albuquerque 35.0836 -106.651
Alcoa 35.75 -84
Aldermaston 51.11933 -1.15543
Alert 82.52 -62.28
AlexanderCity 32.917 -85.917
Alexandria 31.19 29.95
Algiers 36.7 3.217
Alhambra 34.14 -118.107
AliceSprings -23.8 133.9
Allen 64 -145.72
Allentown 40.603 -75.4683
Alliance 42.1 -102.883
Alpharetta 34.0611 -84.2222
Alpine 32.5037 -116.451
Altenstadt 47.834 10.868
Altoona 40.5153 -78.4008
Amami 28.25 129.7
Amarillo 35.2075 -101.834
Ambler 67.08 -157.85
Amchitka 51.38 -179.26
American 42.75 -112.883
Ames 42.0317 -93.6167
Amherst 41.3975 -82.2197
Amilcar 16.75 -22.95
Amman 31.95 35.95
Amsterdam 52.35 4.8666
Anaconda 46.1283 -112.953
Anaheim 33.835 -117.913
Anchorage 61.1667 -149.983
Anderson 13.5867 144.9367
Angaur 6.9 134.15
Ankara 40.03 32.9
AnnArbor 42.2831 -83.7478
Annapolis 38.9733 -76.495
Annette 55.045 -131.56
Anniston 33.65 -85.783
Ansbach 49.33 10.597
Antlers 24.233 -95.633
Antofagasta -23.4333 -70.6
Antwerp 51.2167 4.4
Appleton 44.2617 -88.42
Aqaba 29.6 35.01
Arcade-Arden 38.5833 -121.483
Ardmore 34.167 -97.133
Arese 45.6 9.15
Argyle 48.35 -96.8
Arica -18.35 -70.3333
Arkadelphia 34.1 -93.083
Arlington 42.0883 -87.98
Armour 43.3 -98.35
Arvada 39.8 -105.078
Ascención -7.88 -14.42
Ash 35.217 -112.483
Asheville 35.595 -82.5572
Ashland 37.183 -99.767
Ashley 46.05 -99.383
Asmara 15.2833 38.9
Aspen 39.25 -106.917
Astoria 46.183 -123.85
Asuncion -25.2333 -57.5167
Aswan 23.965 32.82
Athens 33.9567 -83.3833
Atkinson 42.533 -98.967
Atlanta 33.7528 -84.3936
Atlantic 39.3589 -74.4314
Atmore 31.017 -87.517
Attleboro 41.958 -71.2919
Auburn 32.6067 -85.4833
Auckland -36.8832 174.75
Augusta 35.267 -91.35
Aurora 39.74 -104.868
Austin 39.5 -117.083
Avalon -38.0333 144.4667
Aviano 46.033 12.6
Avon 41.667 -72.833
Ayase 35.45 139.45
Aztec 36.667 -108
103
Alcoa 35.75 -84
Amilcar 16.75 -22.95
AliceSprings -23.8 133.9
Aztec 36.667 -108
Amami 28.25 129.7
Arcade-Arden 38.5833 -121.483
American 42.75 -112.883
Alameda 37.7633 -122.243
Altoona 40.5153 -78.4008
Aden 12.8 45
Atkinson 42.533 -98.967
Aiken 33.533 -81.717
Alamogordo 32.9 -105.957
Adams 42.583 -73.167
Austin 39.5 -117.083
Adak 51.667 -176.467
Arese 45.6 9.15
Abbotsford 49.03 -122.32
Ash 35.217 -112.483
Atmore 31.017 -87.517
Aldermaston 51.11933 -1.15543
Attleboro 41.958 -71.2919
Ames 42.0317 -93.6167
Arkadelphia 34.1 -93.083
Athens 33.9567 -83.3833
Alhambra 34.14 -118.107
Alamo 37.367 -115.167
Aberdeen 42.95 -112.83
Adelaide -34.7666 138.5367
Auburn 32.6067 -85.4833
Aviano 46.033 12.6
AddisAbaba 9 38.7333
Ashley 46.05 -99.383
Atlanta 33.7528 -84.3936
Alliance 42.1 -102.883
Astoria 46.183 -123.85
Albuquerque 35.0836 -106.651
Anaheim 33.835 -117.913
Annette 55.045 -131.56
Allentown 40.603 -75.4683
Ardmore 34.167 -97.133
Ambler 67.08 -157.85
Asuncion -25.2333 -57.5167
Anaconda 46.1283 -112.953
Ansbach 49.33 10.597
Ainsworth 42.533 -99.85
Anniston 33.65 -85.783
Auckland -36.8832 174.75
Amsterdam 52.35 4.8666
Ahwahnee 37.25 -119.42
Arlington 42.0883 -87.98
Ajo 32.333 -112.917
Atlantic 39.3589 -74.4314
Afton 36.7 -94.933
Anderson 13.5867 144.9367
Ankara 40.03 32.9
Alpine 32.5037 -116.451
Asheville 35.595 -82.5572
Aalborg 57.097 9.85
Algiers 36.7 3.217
Augusta 35.267 -91.35
Ayase 35.45 139.45
Armour 43.3 -98.35
Ashland 37.183 -99.767
Argyle 48.35 -96.8
Aurora 39.74 -104.868
Ada 47.283 -96.533
AnnArbor 42.2831 -83.7478
Aqaba 29.6 35.01
Appleton 44.2617 -88.42
Acapulco 16.75 -99.767
Arica -18.35 -70.3333
Antlers 24.233 -95.633
Akron 41.0833 -81.5122
Antwerp 51.2167 4.4
Asmara 15.2833 38.9
Arvada 39.8 -105.078
Alexandria 31.19 29.95
Allen 64 -145.72
Albany 31.575 -84.1583
Alert 82.52 -62.28
Abilene 38.9 -97.2
Amarillo 35.2075 -101.834
Alpharetta 34.0611 -84.2222
Annapolis 38.9733 -76.495
Avon 41.667 -72.833
Amman 31.95 35.95
Antofagasta -23.4333 -70.6
Amherst 41.3975 -82.2197
Accra 5.6 -0.167
Avalon -38.0333 144.4667
AlexanderCity 32.917 -85.917
AberdeenPrvGnd 39.235 -76.1749
Anchorage 61.1667 -149.983
AlManamah 26.0167 50.55
Angaur 6.9 134.15
Amchitka 51.38 -179.26
Altenstadt 47.834 10.868
Ascención -7.88 -14.42
Aswan 23.965 32.82
Aspen 39.25 -106.917
AganaNAS 13.48167 144.7933
Albion 42.4 -113.57
103
Aalborg 57.097 9.85
Abbotsford 49.03 -122.32
AberdeenPrvGnd 39.235 -76.1749
Aberdeen 42.95 -112.83
Abilene 38.9 -97.2
Acapulco 16.75 -99.767
Accra 5.6 -0.167
Ada 47.283 -96.533
Adak 51.667 -176.467
Adams 42.583 -73.167
AddisAbaba 9 38.7333
Adelaide -34.7666 138.5367
Aden 12.8 45
Afton 36.7 -94.933
AganaNAS 13.48167 144.7933
Ahwahnee 37.25 -119.42
Aiken 33.533 -81.717
Ainsworth 42.533 -99.85
Ajo 32.333 -112.917
Akron 41.0833 -81.5122
AlManamah 26.0167 50.55
Alameda 37.7633 -122.243
Alamo 37.367 -115.167
Alamogordo 32.9 -105.957
Albany 31.575 -84.1583
Albion 42.4 -113.57
Albuquerque 35.0836 -106.651
Alcoa 35.75 -84
Aldermaston 51.11933 -1.15543
Alert 82.52 -62.28
AlexanderCity 32.917 -85.917
Alexandria 31.19 29.95
Algiers 36.7 3.217
Alhambra 34.14 -118.107
AliceSprings -23.8 133.9
Allen 64 -145.72
Allentown 40.603 -75.4683
Alliance 42.1 -102.883
Alpharetta 34.0611 -84.2222
Alpine 32.5037 -116.451
Altenstadt 47.834 10.868
Altoona 40.5153 -78.4008
Amami 28.25 129.7
Amarillo 35.2075 -101.834
Ambler 67.08 -157.85
Amchitka 51.38 -179.26
American 42.75 -112.883
Ames 42.0317 -93.6167
Amherst 41.3975 -82.2197
Amilcar 16.75 -22.95
Amman 31.95 35.95
Amsterdam 52.35 4.8666
Anaconda 46.1283 -112.953
Anaheim 33.835 -117.913
Anchorage 61.1667 -149.983
Anderson 13.5867 144.9367
Angaur 6.9 134.15
Ankara 40.03 32.9
AnnArbor 42.2831 -83.7478
Annapolis 38.9733 -76.495
Annette 55.045 -131.56
Anniston 33.65 -85.783
Ansbach 49.33 10.597
Antlers 24.233 -95.633
Antofagasta -23.4333 -70.6
Antwerp 51.2167 4.4
Appleton 44.2617 -88.42
Aqaba 29.6 35.01
Arcade-Arden 38.5833 -121.483
Ardmore 34.167 -97.133
Arese 45.6 9.15
Argyle 48.35 -96.8
Arica -18.35 -70.3333
Arkadelphia 34.1 -93.083
Arlington 42.0883 -87.98
Armour 43.3 -98.35
Arvada 39.8 -105.078
Ascención -7.88 -14.42
Ash 35.217 -112.483
Asheville 35.595 -82.5572
Ashland 37.183 -99.767
Ashley 46.05 -99.383
Asmara 15.2833 38.9
Aspen 39.25 -106.917
Astoria 46.183 -123.85
Asuncion -25.2333 -57.5167
Aswan 23.965 32.82
Athens 33.9567 -83.3833
Atkinson 42.533 -98.967
Atlanta 33.7528 -84.3936
Atlantic 39.3589 -74.4314
Atmore 31.017 -87.517
Attleboro 41.958 -71.2919
Auburn 32.6067 -85.4833
Auckland -36.8832 174.75
Augusta 35.267 -91.35
Aurora 39.74 -104.868
Austin 39.5 -117.083
Avalon -38.0333 144.4667
Aviano 46.033 12.6
Avon 41.667 -72.833
Ayase 35.45 139.45
Aztec 36.667 -108
0
compilation info
Main.java:12: error: class Application is public, should be declared in a file named Application.java
public class Application {
       ^
1 error
stdout
Standard output is empty