package leetcode;

/**
 * https://leetcode.com/problems/merge-triplets-to-form-target-triplet/
 */
public class Problem1899 {
    public boolean mergeTriplets(int[][] triplets, int[] target) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem1899 prob = new Problem1899();
        System.out.println(prob.mergeTriplets(new int[][]{
            {2,5,3},{1,8,4},{1,7,5}
        }, new int[]{2,7,5})); // true
        System.out.println(prob.mergeTriplets(new int[][]{
            {1,3,4},{2,5,8}
        }, new int[]{2,5,8})); // true
        System.out.println(prob.mergeTriplets(new int[][]{
            {2,5,3},{2,3,4},{1,2,5},{5,2,3}
        }, new int[]{5,5,5})); // true
        System.out.println(prob.mergeTriplets(new int[][]{
            {3,4,5},{4,5,6}
        }, new int[]{3,2,5})); // false
    }
}

@@ -405,16 +405,42 @@
 ,3%7D,
-%7B1,8,4%7D,
+%0A            %7B1,8,4%7D,%0A            
 %7B1,7
@@ -561,16 +561,29 @@
 %7B1,3,4%7D,
+%0A            
 %7B2,5,8%7D%0A
@@ -704,24 +704,63 @@
 ,3%7D,
-%7B2,3,4%7D,%7B1,2,5%7D,
+%0A            %7B2,3,4%7D,%0A            %7B1,2,5%7D,%0A            
 %7B5,2
@@ -878,15 +878,755 @@
    %7B
-3,4,5%7D,
+2,5,3%7D,%0A            %7B2,3,4%7D,%0A            %7B1,2,5%7D,%0A            %7B5,2,3%7D%0A        %7D, new int%5B%5D%7B5,5,3%7D)); // true%0A        System.out.println(prob.mergeTriplets(new int%5B%5D%5B%5D%7B%0A            %7B2,5,3%7D,%0A            %7B2,3,4%7D,%0A            %7B1,2,5%7D,%0A            %7B5,2,3%7D%0A        %7D, new int%5B%5D%7B1,5,3%7D)); // false%0A        System.out.println(prob.mergeTriplets(new int%5B%5D%5B%5D%7B%0A            %7B2,5,3%7D,%0A            %7B2,3,4%7D,%0A            %7B1,2,5%7D,%0A            %7B5,2,3%7D%0A        %7D, new int%5B%5D%7B2,2,3%7D)); // false%0A        System.out.println(prob.mergeTriplets(new int%5B%5D%5B%5D%7B%0A            %7B2,5,3%7D,%0A            %7B2,3,4%7D,%0A            %7B1,2,5%7D,%0A            %7B5,2,3%7D%0A        %7D, new int%5B%5D%7B2,3,3%7D)); // false%0A        System.out.println(prob.mergeTriplets(new int%5B%5D%5B%5D%7B%0A            %7B3,4,5%7D,%0A            
 %7B4,5

Update problem 1899