Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1. import java.util.Arrays;
  2. import java.util.Scanner;
  3.  
  4. public class Naloga3 {
  5.     public static void main(String[] args) {
  6.         Scanner scanner = new Scanner(System.in);
  7.         String orientation = "Jure";
  8.         String action = "Jure";
  9.         String parameter = "Jure";
  10.         int count = 0;
  11.        
  12.         while (scanner.hasNextLine()) {
  13.             int number = scanner.nextInt();
  14.             int[][] matrix = new int[number][number];
  15.             while(2*number >= 0){
  16.                 int nmb = scanner.nextInt();
  17.                 int nmbj = scanner.nextInt();
  18.                 matrix[nmb][nmbj] = 1;
  19.                 number--;
  20.                
  21.             }
  22.             /*String string = null;
  23.             for (int i = 0; i < matrix.length; i++) {
  24.                 for (int j = 0; j < matrix[i].length; j++) {
  25.                     string+= matrix[i][j];
  26.                 }
  27.                 System.out.print(string);
  28.             }*/
  29.            
  30.             System.out.println(Arrays.deepToString(matrix));
  31.             runCommand(orientation, action, parameter, matrix);
  32.         }
  33.        
  34.        
  35.         scanner.close();
  36.        
  37.    
  38.     }
  39.    
  40.     static void runCommand(String orientation, String action, String parameter ,int[][] matrix){
  41.        
  42.     }
  43.    
  44.     static int KPaths(int graph[][], int k){
  45.         int count = 0;
  46.         for (int i = 0; i < graph.length; i++) {
  47.             if (graph[][])
  48.         }
  49.         return k;
  50.     }
  51.    
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement