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

Commit c0d3133

Browse files
authored
Update usacotools.java
1 parent 1eb9816 commit c0d3133

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

usacotools.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
public abstract class usacotools {
44
public static int ERROR=1;
55
public static String error="Error";
6+
public static int[][] morph(int[][] map,int a,int b){
7+
for(int i=0;i<map.length;i++) {
8+
for(int j=0;j<map[i].length;j++) {
9+
if(map[i][j]==a) {
10+
map[i][j]=b;
11+
}
12+
}
13+
}
14+
return map;
15+
}
616
public static boolean isrect(int[][] map,int x,int y) {
717
int cachedsize=-1;
818
int cachey=-1;

0 commit comments

Comments
 (0)