This repository was archived by the owner on Feb 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +64
-4
lines changed Expand file tree Collapse file tree 2 files changed +64
-4
lines changed Original file line number Diff line number Diff line change 221
331
441
5+ 1
6+ 1
7+ 1
8+ 1
9+ 1
10+ 1
11+ 1
12+ 1
13+ 1
14+ 1
15+ 1
16+ 1
17+ 1
18+ 1
19+ 1
20+ 1
21+ 1
22+ 1
23+ 1
24+ 1
25+ 1
26+ 1
27+ 1
28+ 1
29+ 1
30+ 1
31+ 1
32+ 1
33+ 1
34+ 1
35+ 1
36+ 1
37+ 1
38+ 1
39+ 1
40+ 1
41+ 1
42+ 1
43+ 1
44+ 1
45+ 1
46+ 1
47+ 1
48+ 1
49+ 1
50+ 1
51+ 1
52+ 1
53+ 1
54+ 1
55+ 1
56+ 1
57+ 1
58+ 1
59+ 1
60+ 1
61+ 1
62+ 1
63+ 1
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ public static int[] dijkstra(int[][] graph1, int startVertex) {
5151
5252 }
5353 //if(pastures.contains(new IPair(nearestVertex,vertexIndex))) {
54- if (pastures .contains (nearestVertex ) || pastures .contains (vertexIndex )) {
54+
55+ if (pastures .contains (nearestVertex ) ) {
5556 System .out .println ("Info: " +nearestVertex +" " +vertexIndex );
5657 System .out .println ("Set " +(nearestVertex - 1 ) + " and " +(vertexIndex - 1 ));
5758 arr [nearestVertex ] = 1 ;
@@ -83,7 +84,7 @@ public static int[] dijkstra(int[][] graph1, int startVertex) {
8384 return dists ;
8485 }
8586 public static void main (String [] args ) throws IOException {
86- BufferedReader f = new BufferedReader (new FileReader ("1 .in" ));
87+ BufferedReader f = new BufferedReader (new FileReader ("2 .in" ));
8788 StringTokenizer st = new StringTokenizer (f .readLine ());
8889 int N = Integer .parseInt (st .nextToken ());
8990 int M = Integer .parseInt (st .nextToken ());
@@ -131,8 +132,8 @@ public static void main(String[] args) throws IOException{
131132 System .out .println (Arrays .toString (root ));
132133 System .out .println (Arrays .toString (out ));
133134 PrintWriter pw = new PrintWriter (new FileWriter ("dining.out" ));
134- for (int k : arr ) {
135- pw .println (k );
135+ for (int k = 0 ; k < arr . length - 1 ; k ++ ) {
136+ pw .println (arr [ k ] );
136137 }
137138 pw .close ();
138139
You can’t perform that action at this time.
0 commit comments