Advertisement
Guest User

1613

a guest
Mar 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.84 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. /**
  4.  * Created by entsmv on 29.03.2017.
  5.  */
  6. public class Solution {
  7.    
  8.    
  9.     private static void Remove(int id) {
  10.  
  11.     }
  12.  
  13.     private static void Find(int id) {
  14.  
  15.     }
  16.  
  17.     private static void Add(int idp, int idc) {
  18.  
  19.     }
  20.    
  21.     public static void main(String[] args) {
  22.         Scanner scanner = new Scanner(System.in);
  23.         int n = scanner.nextInt();
  24.         StringBuilder answer;
  25.         for (int i = 0; i < n; i++) {
  26.             String s = scanner.next();
  27.             if (s.equals("ADD")) {
  28.                 int idp = scanner.nextInt();
  29.                 int idc = scanner.nextInt();
  30.  
  31.                 Add(idp, idc);
  32.             }
  33.             else if (s.equals("FIND")) {
  34.                 int id = scanner.nextInt();
  35.                 Find(id);
  36.             }
  37.             else {
  38.                 int id = scanner.nextInt();
  39.                 Remove(id);
  40.             }
  41.         }
  42.     }
  43.     public class Edge {
  44.         int x;
  45.         int deep = 0;
  46.         Edge left = null, right = null;
  47.  
  48.         public Edge(int x, int deep, Edge left, Edge right) {
  49.             this.x = x;
  50.             this.deep = deep;
  51.             this.left = left;
  52.             this.right = right;
  53.         }
  54.  
  55.         public int getX() {
  56.             return x;
  57.         }
  58.  
  59.         public void setX(int x) {
  60.             this.x = x;
  61.         }
  62.  
  63.         public int getDeep() {
  64.             return deep;
  65.         }
  66.  
  67.         public void setDeep(int deep) {
  68.             this.deep = deep;
  69.         }
  70.  
  71.         public Edge getLeft() {
  72.             return left;
  73.         }
  74.  
  75.         public void setLeft(Edge left) {
  76.             this.left = left;
  77.         }
  78.  
  79.         public Edge getRight() {
  80.             return right;
  81.         }
  82.  
  83.         public void setRight(Edge right) {
  84.             this.right = right;
  85.         }
  86.     }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement