Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 3f3b2e3

Browse files
authored
Add files via upload
1 parent 2fdbb90 commit 3f3b2e3

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

barn1.in

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
4 50 18
2+
3
3+
4
4+
6
5+
8
6+
14
7+
15
8+
16
9+
17
10+
21
11+
25
12+
26
13+
27
14+
30
15+
31
16+
40
17+
41
18+
42
19+
43

barn1.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,22 @@ public static void main(String[] args) throws IOException{
5555

5656
for(int bs1:bstalls) {
5757
for(int bs2:bstalls) {
58-
if(bs1==bs2) {
59-
System.out.println("Debug point 2: Info, blockedstall: "+blockedstall+", combination: "+combination+", More info: bs1: "+bs1+", bs2: "+bs2);
58+
if(bs1==bs2 || bs1>bs2) {
59+
//System.out.println("Debug point 2: Info, blockedstall: "+blockedstall+", combination: "+combination+", More info: bs1: "+bs1+", bs2: "+bs2);
60+
System.out.println("Both are same, bs1: "+bs1+", bs2: "+bs2);
61+
continue;
6062
}else {
6163
combination++;//increment
6264
blockedstall=boarddist(bs1,bs2);
63-
System.out.println("Debug point 1: Info, blockedstall: "+blockedstall+", combination: "+combination+", More info: bs1: "+bs1+", bs2: "+bs2);
65+
//System.out.println("Debug point 1: Info, blockedstall: "+blockedstall+", combination: "+combination+", More info: bs1: "+bs1+", bs2: "+bs2);
66+
System.out.println("bs1: "+bs1+", bs2: "+bs2);
6467
mergecosts[blockedstall][combination][0]=bs1;
6568
mergecosts[blockedstall][combination][1]=bs2;
6669

6770
}
6871
}
6972
}
73+
System.out.println(combination);
7074
combination=0;
7175
//for(int i=0;i<)
7276

0 commit comments

Comments
 (0)