Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- import java.math.*;
- /**
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- class Solution {
- public List<String> getGolfPathArray(List<String> rows, int furthest) {
- for(int i = 0; i < rows.size(); i++) {
- }
- return rows;
- }
- public int getFurthest(List<String> rows) {
- for(int i = 0; i < rows.size(); i++) {
- }
- }
- public static void main(String args[]) {
- Scanner in = new Scanner(System.in);
- int width = in.nextInt();
- int height = in.nextInt();
- int numberOfHoles = 0;
- List<String> rows = new ArrayList<>();
- for (int i = 0; i < height; i++) {
- String input = in.next();
- rows.add(input);
- numberOfHoles += input.length() - input.replaceAll("H","").length();
- }
- for(int i = 0; i < numberOfHoles; i++)
- rows = getGolfPathArray(rows, getFurthest(rows));
- for(String r : rows)
- System.out.println(r);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement