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[][]{
            {2,5,3},
            {2,3,4},
            {1,2,5},
            {5,2,3}
        }, new int[]{5,5,3})); // true
        System.out.println(prob.mergeTriplets(new int[][]{
            {2,5,3},
            {2,3,4},
            {1,2,5},
            {5,2,3}
        }, new int[]{1,5,3})); // false
        System.out.println(prob.mergeTriplets(new int[][]{
            {2,5,3},
            {2,3,4},
            {1,2,5},
            {5,2,3}
        }, new int[]{2,2,3})); // false
        System.out.println(prob.mergeTriplets(new int[][]{
            {2,5,3},
            {2,3,4},
            {1,2,5},
            {5,2,3}
        }, new int[]{2,3,3})); // false
        System.out.println(prob.mergeTriplets(new int[][]{
            {3,4,5},
            {4,5,6}
        }, new int[]{3,2,5})); // false
    }
}

@@ -1117,32 +1117,214 @@
         %7B5,2,3%7D%0A
+        %7D, new int%5B%5D%7B5,3,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 i

Update problem 1899