index
int64
0
0
repo_id
stringlengths
26
205
file_path
stringlengths
51
246
content
stringlengths
8
433k
__index_level_0__
int64
0
10k
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIRST_UPPERCASE_LETTER_IN_A_STRING_ITERATIVE_AND_RECURSIVE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIRST_UPPERCASE_LETTER_IN_A_STRING_ITERATIVE_AND_RECURSIVE{ static char f_gold ( String str ) { for ( int i = 0 ; i < str . length ( ) ; i ++ ) if ( Character . isUpperCase ( str . charAt ( i ) ) ) return str . charAt ( i ) ; return 0 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("pH"); param0.add("96544000"); param0.add("000010000"); param0.add("ujqpx"); param0.add("20684847994"); param0.add("111"); param0.add("rclkv"); param0.add("45173693434"); param0.add("11111011001101"); param0.add("f"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,800
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_COUNT_OCCURRENCE_GIVEN_CHARACTER_STRING.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_COUNT_OCCURRENCE_GIVEN_CHARACTER_STRING{ public static int f_gold ( String s , char c ) { int res = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == c ) res ++ ; } return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("mhjnKfd"); param0.add("716662107"); param0.add("01"); param0.add("wPHSxIbnHakGRO"); param0.add("721106"); param0.add("111"); param0.add("TIBFU"); param0.add("0"); param0.add("10"); param0.add("lqq"); List<Character> param1 = new ArrayList<>(); param1.add('l'); param1.add('6'); param1.add('1'); param1.add('n'); param1.add('8'); param1.add('0'); param1.add('Q'); param1.add('3'); param1.add('0'); param1.add('d'); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,801
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_SUM_ODD_FACTORS_NUMBER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_ODD_FACTORS_NUMBER{ static int f_gold ( int n ) { int res = 1 ; while ( n % 2 == 0 ) n = n / 2 ; for ( int i = 3 ; i <= Math . sqrt ( n ) ; i ++ ) { int count = 0 , curr_sum = 1 ; int curr_term = 1 ; while ( n % i == 0 ) { count ++ ; n = n / i ; curr_term *= i ; curr_sum += curr_term ; } res *= curr_sum ; } if ( n >= 2 ) res *= ( 1 + n ) ; return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(20); param0.add(6); param0.add(39); param0.add(80); param0.add(88); param0.add(7); param0.add(16); param0.add(27); param0.add(83); param0.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,802
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_LARGE_NUMBER_DIVISIBLE_13_NOT.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_13_NOT{ static boolean f_gold ( String num ) { int length = num . length ( ) ; if ( length == 1 && num . charAt ( 0 ) == '0' ) return true ; if ( length % 3 == 1 ) { num += "00" ; length += 2 ; } else if ( length % 3 == 2 ) { num += "0" ; length += 1 ; } int sum = 0 , p = 1 ; for ( int i = length - 1 ; i >= 0 ; i -- ) { int group = 0 ; group += num . charAt ( i -- ) - '0' ; group += ( num . charAt ( i -- ) - '0' ) * 10 ; group += ( num . charAt ( i ) - '0' ) * 100 ; sum = sum + group * p ; p *= ( - 1 ) ; } sum = Math . abs ( sum ) ; return ( sum % 13 == 0 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("vzTUaItpCpLnjY"); param0.add("33855"); param0.add("0011110101011"); param0.add("MMQ"); param0.add("439340517954"); param0.add("000000000"); param0.add("UugAuRRJbjEgl"); param0.add("6406553695441"); param0.add("011001"); param0.add("yjFqEEvgiNjEX"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,803
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LARGEST_SUBSEQUENCE_GCD_GREATER_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LARGEST_SUBSEQUENCE_GCD_GREATER_1{ static int f_gold ( int arr [ ] , int n ) { int ans = 0 ; int maxele = Arrays . stream ( arr ) . max ( ) . getAsInt ( ) ; ; for ( int i = 2 ; i <= maxele ; ++ i ) { int count = 0 ; for ( int j = 0 ; j < n ; ++ j ) { if ( arr [ j ] % i == 0 ) ++ count ; } ans = Math . max ( ans , count ) ; } return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{10,18,22,22,22,29,30,32,33,34,37,39,40,41,44,47,49,50,50,51,53,67,69,70,71,71,73,75,78,80,81,82,91,91,93,97,97,99}); param0.add(new int[]{-42,62,6,98,38,-4,-38,72,42,4,-22,-94,78,-90,14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{89,92,96,71,24,27,18,19,41,1,45,8}); param0.add(new int[]{-98,-94,-92,-90,-82,-80,-76,-76,-72,-62,-60,-58,-56,-52,-42,-36,-32,-32,-24,-22,-20,-10,-10,-10,-8,-2,-2,0,2,4,6,6,8,10,14,18,22,26,30,46,46,62,68,74,78,82,86,86}); param0.add(new int[]{1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,0,1,0,1,0,0,0,1}); param0.add(new int[]{4,8,10,10,11,17,18,25,32,33,34,37,40,41,44,47,47,52,63,77,85,87,89,89,91,95,96,98}); param0.add(new int[]{-86,52,-48,70,10,-94,16,14,38,62}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{95,32,87,37,86,71,30,88,96,52,88,92,79,86,19,5,74,67}); List<Integer> param1 = new ArrayList<>(); param1.add(35); param1.add(10); param1.add(23); param1.add(7); param1.add(40); param1.add(41); param1.add(23); param1.add(9); param1.add(30); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,804
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PRINT_WORDS_STRING_REVERSE_ORDER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRINT_WORDS_STRING_REVERSE_ORDER{ static String f_gold ( String str ) { int i = str . length ( ) - 1 ; int start , end = i + 1 ; String result = "" ; while ( i >= 0 ) { if ( str . charAt ( i ) == ' ' ) { start = i + 1 ; while ( start != end ) result += str . charAt ( start ++ ) ; result += ' ' ; end = i ; } i -- ; } start = 0 ; while ( start != end ) result += str . charAt ( start ++ ) ; return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("m Dm YZ"); param0.add("65 48 57 71"); param0.add("01 010"); param0.add("mT vhByi"); param0.add("19 44 9 1"); param0.add("0"); param0.add("z vUi "); param0.add("7 591 36643 9 055"); param0.add("01"); param0.add("ti YGaijPY"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,805
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_DECIMAL_BINARY_CONVERSION_2.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_DECIMAL_BINARY_CONVERSION_2{ static int f_gold ( int N ) { int B_Number = 0 ; int cnt = 0 ; while ( N != 0 ) { int rem = N % 2 ; double c = Math . pow ( 10 , cnt ) ; B_Number += rem * c ; N /= 2 ; cnt ++ ; } return B_Number ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(18); param0.add(92); param0.add(87); param0.add(50); param0.add(56); param0.add(88); param0.add(3); param0.add(16); param0.add(45); param0.add(58); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,806
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE{ static int f_gold ( int b , int m ) { return ( b / m - 1 ) * ( b / m ) / 2 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(40); param0.add(38); param0.add(47); param0.add(52); param0.add(21); param0.add(50); param0.add(8); param0.add(56); param0.add(93); param0.add(21); List<Integer> param1 = new ArrayList<>(); param1.add(74); param1.add(35); param1.add(71); param1.add(29); param1.add(9); param1.add(33); param1.add(82); param1.add(80); param1.add(5); param1.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,807
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/K_TH_DIGIT_RAISED_POWER_B.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_DIGIT_RAISED_POWER_B{ public static int f_gold ( int a , int b , int k ) { int p = ( int ) Math . pow ( a , b ) ; int count = 0 ; while ( p > 0 && count < k ) { int rem = p % 10 ; count ++ ; if ( count == k ) return rem ; p = p / 10 ; } return 0 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(11); param0.add(41); param0.add(5); param0.add(1); param0.add(24); param0.add(5); param0.add(66); param0.add(7); param0.add(77); param0.add(60); List<Integer> param1 = new ArrayList<>(); param1.add(2); param1.add(3); param1.add(4); param1.add(2); param1.add(1); param1.add(2); param1.add(5); param1.add(10); param1.add(30); param1.add(50); List<Integer> param2 = new ArrayList<>(); param2.add(1); param2.add(0); param2.add(3); param2.add(4); param2.add(5); param2.add(3); param2.add(8); param2.add(3); param2.add(10); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,808
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/ARRAY_RANGE_QUERIES_ELEMENTS_FREQUENCY_VALUE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ARRAY_RANGE_QUERIES_ELEMENTS_FREQUENCY_VALUE{ static int f_gold ( int start , int end , int arr [ ] ) { Map < Integer , Integer > mp = new HashMap < > ( ) ; for ( int i = start ; i <= end ; i ++ ) mp . put ( arr [ i ] , mp . get ( arr [ i ] ) == null ? 1 : mp . get ( arr [ i ] ) + 1 ) ; int count = 0 ; for ( Map . Entry < Integer , Integer > entry : mp . entrySet ( ) ) if ( entry . getKey ( ) == entry . getValue ( ) ) count ++ ; return count ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(0); param0.add(1); param0.add(3); param0.add(10); param0.add(2); param0.add(0); param0.add(14); param0.add(29); param0.add(31); param0.add(21); List<Integer> param1 = new ArrayList<>(); param1.add(31); param1.add(25); param1.add(4); param1.add(15); param1.add(3); param1.add(6); param1.add(18); param1.add(33); param1.add(19); param1.add(32); List<int [ ]> param2 = new ArrayList<>(); param2.add(new int[]{1,2,2,3,3,3,12,13,18,18,26,28,29,36,37,39,40,49,55,57,63,69,69,73,85,86,87,87,89,89,90,91,92,93,93,93,95,99}); param2.add(new int[]{24,-62,2,1,94,56,-22,-70,-22,-34,-92,-18,56,2,60,38,-88,16,-28,30,-30,58,-80,94,6,56}); param2.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param2.add(new int[]{84,13,81,40,87,82,50,30,90,80,81,70,14,54,72,93,78,27,61}); param2.add(new int[]{-20,20,34,60,90}); param2.add(new int[]{1,0,0,0,0,0,0,0,0,0}); param2.add(new int[]{11,18,18,19,25,30,42,42,56,58,63,66,67,68,69,75,78,83,83}); param2.add(new int[]{-24,-82,24,-84,94,2,-30,86,58,-56,-96,60,-38,76,94,74,-98,-84,-38,46,4,-84,-90,-28,-50,46,16,28,-14,-82,-64,42,64,-2,-40,96,60,2,-86,32,38,-66}); param2.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param2.add(new int[]{2,91,42,85,97,92,24,39,63,89,31,59,51,89,72,62,26,92,75,4,6,13,20,95,22,30,52,60,37,27,49,15,67,26}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,809
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_SUBARRAY_WITH_GIVEN_SUM.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUBARRAY_WITH_GIVEN_SUM{ static int f_gold ( int arr [ ] , int n , int sum ) { int curr_sum , i , j ; for ( i = 0 ; i < n ; i ++ ) { curr_sum = arr [ i ] ; for ( j = i + 1 ; j <= n ; j ++ ) { if ( curr_sum == sum ) { int p = j - 1 ; System . out . println ( "Sum found between indexes " + i + " and " + p ) ; return 1 ; } if ( curr_sum > sum || j == n ) break ; curr_sum = curr_sum + arr [ j ] ; } } System . out . println ( "No subarray found" ) ; return 0 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,8,8,10,15,18,19,22,25,26,30,32,35,36,40,41,43,48,53,57,59,63,64,68,71,76,76,77,78,89,96,97}); param0.add(new int[]{-78,16,-16,-10,-2,-38,58,-72,-78,50,-68,-16,-96,82,70,2,-20}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{16,10,55,43,46,74,57,65,86,60,28,6,92}); param0.add(new int[]{-98,-98,-90,-84,-84,-80,-76,-76,-70,-54,-48,-46,-44,-42,-38,-14,-12,-4,6,8,24,28,32,40,40,42,64,84,98}); param0.add(new int[]{0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,1}); param0.add(new int[]{2,10,40,45,56,66,66,70,75,83,93,98}); param0.add(new int[]{-20,30,56,-68,54,-6,78,-86,88,-66,76,-66,62,78,22,46,-94,-10,18,16,-36,34,-98,-84,-40,98,82,10,12,54,-88}); param0.add(new int[]{0,0,1,1}); param0.add(new int[]{38,24,12}); List<Integer> param1 = new ArrayList<>(); param1.add(26); param1.add(9); param1.add(9); param1.add(10); param1.add(23); param1.add(12); param1.add(10); param1.add(30); param1.add(2); param1.add(1); List<Integer> param2 = new ArrayList<>(); param2.add(23); param2.add(12); param2.add(11); param2.add(6); param2.add(19); param2.add(8); param2.add(10); param2.add(17); param2.add(2); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,810
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int res = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int curr_sum = 0 ; for ( int j = 0 ; j < n ; j ++ ) { int index = ( i + j ) % n ; curr_sum += j * arr [ index ] ; } res = Math . max ( res , curr_sum ) ; } return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{11,12,16,26,29,40,54,59,65,70,71,73,78,81,87,87,88,90,95,97}); param0.add(new int[]{-46,-32,54,96,-72,-58,-36,-44,26,-2,-68,42,90,26,-92,-96,88,-42,-18,46,-70,24,0,24,34,34,-52,50,94,-60,64,58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{48,2,79,98,28,17,41,47,61,76,82,5,74,4,80,51,22,45,91,75,91,93,42,45,69,98,76,74,83,17,30,88,53,25,35,19,26}); param0.add(new int[]{-88,-84,-82,-74,-44,-34,-32,-20,-20,-14,6,6,10,12,16,24,32,34,38,46,54,54,56,60,82,88,90,94,98}); param0.add(new int[]{0,1,1,1,1,0,1,1,1,1,1,1,1}); param0.add(new int[]{10,14,14,14,19,20,22,26,35,36,40,53,54,55,55,57,57,67,72,72,77,78,83,84,95,96}); param0.add(new int[]{-80,18,-76,48,-52,-38,52,-82,40,-44,-90,86,-86,-36,-32,-2,56,-12,-88,14,-16,8,52,24,46,56,84,-36,84,-60,72,-46,32,-16,-20,68,-86,-62,58,8,78,-52,22,-28,-22,-42,12,-48}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{20,94,36,2,50,62,84,50,66,75,1,18,41,48,72,61,86,22,54,6,71,46,92,68,59,51,89,31,58,78,82,84}); List<Integer> param1 = new ArrayList<>(); param1.add(11); param1.add(22); param1.add(33); param1.add(20); param1.add(24); param1.add(7); param1.add(16); param1.add(30); param1.add(14); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,811
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND{ public static int f_gold ( int arr1 [ ] , int arr2 [ ] , int n1 , int n2 ) { Arrays . sort ( arr1 ) ; Arrays . sort ( arr2 ) ; return arr1 [ n1 - 1 ] * arr2 [ 0 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,11,12,12,14,14,15,33,51,51,61,63,68,69,75,83,84,97}); param0.add(new int[]{88,-10,-18,74,56,-36,-86,72,76,26,-36,10,-6,-80,-34,14,-82,74,48,-76,-78,-50,-62,-86,96,22,42,-28,18,6,58,-72,54}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{84,2,52,25,38,63,10,44,36,12,67,25,79,36,12,14,14,18,32,8,94,34,9,72,27,44,75,80,28,57,34,67,26,21,53,92,31,87,62}); param0.add(new int[]{-64,-60,-36,-36,-34,-32,-18,-16,-2,6,22,36,42,46,52,54,70,94}); param0.add(new int[]{0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,1,1,1,0,0,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0}); param0.add(new int[]{24,36,73}); param0.add(new int[]{86,-46,76,66,38,24,-10,-10,-88,-22,54,12,42,20,-6,-44,-26,78,-46,-88,-6,-24,72,-38,26,84,-70,90,56,-4,94,-72,-44,-40,-8,18,4,-72,72,-72,-38}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{41,47,59,85,10,38,4,63,74,71,76,32,54,40,20,38,17,76,87,49,53,73,92,90,36,76,1,65,62,10,93,65}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{4,4,5,12,16,27,28,41,44,60,73,76,77,90,91,92,96,96}); param1.add(new int[]{24,-26,38,28,94,64,-36,42,62,-50,-12,-18,-72,-76,26,-4,44,-98,32,-48,54,-66,-84,16,-12,-30,-58,42,-88,-40,66,-66,30}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{92,20,7,22,79,50,27,19,2,58,93,19,60,45,16,50,87,31,45,8,89,39,61,76,48,92,22,18,19,35,54,32,81,57,22,29,63,83,20}); param1.add(new int[]{-96,-92,-64,-44,-22,-22,-22,-20,6,8,14,16,24,40,46,54,76,78}); param1.add(new int[]{0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1}); param1.add(new int[]{5,41,60}); param1.add(new int[]{-30,-38,58,-6,-2,-18,34,24,-52,56,-80,-82,20,64,54,-96,70,-78,78,54,6,-4,34,0,90,-74,-50,-40,16,-48,-4,78,80,-98,-12,-64,94,-42,-22,-34,96}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{62,30,71,1,83,88,62,50,88,80,22,98,62,43,84,21,23,89,78,5,36,21,17,30,54,88,66,48,83,12,4,50}); List<Integer> param2 = new ArrayList<>(); param2.add(10); param2.add(20); param2.add(40); param2.add(32); param2.add(11); param2.add(37); param2.add(2); param2.add(20); param2.add(38); param2.add(26); List<Integer> param3 = new ArrayList<>(); param3.add(15); param3.add(27); param3.add(39); param3.add(19); param3.add(10); param3.add(44); param3.add(2); param3.add(28); param3.add(35); param3.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,812
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PRINT_MAXIMUM_SHORTEST_DISTANCE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRINT_MAXIMUM_SHORTEST_DISTANCE{ static int f_gold ( int a [ ] , int n , int k ) { HashMap < Integer , Integer > b = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int x = a [ i ] ; int d = Math . min ( 1 + i , n - i ) ; if ( ! b . containsKey ( x ) ) b . put ( x , d ) ; else { b . put ( x , Math . min ( d , b . get ( x ) ) ) ; } } int ans = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int x = a [ i ] ; if ( x != k - x && b . containsKey ( k - x ) ) ans = Math . min ( Math . max ( b . get ( x ) , b . get ( k - x ) ) , ans ) ; } return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,27,66,89,96,96}); param0.add(new int[]{84,-38,-56,-20,-98,-40,-16,22,20,98,-56,-32,-44,30,-58,26,-44,-32,50,46,92}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{20,71,66,58,74,2,63,13,1,36,28,83,24,20,85,30,59,56,8,97,58,28,28,42}); param0.add(new int[]{-94,-88,-86,-68,-66,-64,-28,-12,4,18,22,28,32,34,34,40,44,46,60,68,72,78,80,84,88,96}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,0,0,0,1,1,1}); param0.add(new int[]{8,13,54,59,61,69,89,90,92}); param0.add(new int[]{-58,50,-74,-8,-50,90,90,-2,-22,8,-76,16,4,56,94,36,28,-42,80,-88,88,52,74,40,12,-72,-50,50,88,-54,32,-24,-48,-66,-86,40,-6,14,10,-88,56,80,-34}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{2,60,66,39,18,60,37,75,3,64,24,16,72,95,96,44,23,58,58,33,24,96}); List<Integer> param1 = new ArrayList<>(); param1.add(4); param1.add(13); param1.add(23); param1.add(23); param1.add(16); param1.add(8); param1.add(4); param1.add(27); param1.add(9); param1.add(21); List<Integer> param2 = new ArrayList<>(); param2.add(4); param2.add(11); param2.add(13); param2.add(17); param2.add(15); param2.add(13); param2.add(8); param2.add(42); param2.add(12); param2.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,813
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_NON_NEGATIVE_INTEGRAL_SOLUTIONS_B_C_N_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_NON_NEGATIVE_INTEGRAL_SOLUTIONS_B_C_N_1{ static int f_gold ( int n ) { return ( ( n + 1 ) * ( n + 2 ) ) / 2 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(41); param0.add(72); param0.add(54); param0.add(75); param0.add(87); param0.add(41); param0.add(78); param0.add(80); param0.add(46); param0.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,814
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/BASIC_AND_EXTENDED_EUCLIDEAN_ALGORITHMS_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BASIC_AND_EXTENDED_EUCLIDEAN_ALGORITHMS_1{ public static int f_gold ( int a , int b , int x , int y ) { if ( a == 0 ) { x = 0 ; y = 1 ; return b ; } int x1 = 1 , y1 = 1 ; int gcd = f_gold ( b % a , a , x1 , y1 ) ; x = y1 - ( b / a ) * x1 ; y = x1 ; return gcd ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(44); param0.add(33); param0.add(39); param0.add(52); param0.add(64); param0.add(45); param0.add(53); param0.add(86); param0.add(57); param0.add(11); List<Integer> param1 = new ArrayList<>(); param1.add(17); param1.add(81); param1.add(77); param1.add(96); param1.add(48); param1.add(32); param1.add(88); param1.add(19); param1.add(67); param1.add(86); List<Integer> param2 = new ArrayList<>(); param2.add(10); param2.add(67); param2.add(21); param2.add(23); param2.add(17); param2.add(89); param2.add(24); param2.add(29); param2.add(30); param2.add(96); List<Integer> param3 = new ArrayList<>(); param3.add(65); param3.add(20); param3.add(34); param3.add(97); param3.add(33); param3.add(3); param3.add(74); param3.add(21); param3.add(32); param3.add(81); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,815
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING{ static int f_gold ( String str ) { int n = str . length ( ) ; int [ ] [ ] C = new int [ n ] [ n ] ; boolean [ ] [ ] P = new boolean [ n ] [ n ] ; int i , j , k , L ; for ( i = 0 ; i < n ; i ++ ) { P [ i ] [ i ] = true ; C [ i ] [ i ] = 0 ; } for ( L = 2 ; L <= n ; L ++ ) { for ( i = 0 ; i < n - L + 1 ; i ++ ) { j = i + L - 1 ; if ( L == 2 ) P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) ; else P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) && P [ i + 1 ] [ j - 1 ] ; if ( P [ i ] [ j ] == true ) C [ i ] [ j ] = 0 ; else { C [ i ] [ j ] = Integer . MAX_VALUE ; for ( k = i ; k <= j - 1 ; k ++ ) C [ i ] [ j ] = Integer . min ( C [ i ] [ j ] , C [ i ] [ k ] + C [ k + 1 ] [ j ] + 1 ) ; } } } return C [ 0 ] [ n - 1 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("ydYdV"); param0.add("4446057"); param0.add("0111"); param0.add("keEj"); param0.add("642861576557"); param0.add("11111000101"); param0.add("ram"); param0.add("09773261"); param0.add("1"); param0.add("AVBEKClFdj"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,816
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_WORDS_APPEAR_EXACTLY_TWO_TIMES_ARRAY_WORDS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_WORDS_APPEAR_EXACTLY_TWO_TIMES_ARRAY_WORDS{ static int f_gold ( String str [ ] , int n ) { HashMap < String , Integer > m = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( m . containsKey ( str [ i ] ) ) { int get = m . get ( str [ i ] ) ; m . put ( str [ i ] , get + 1 ) ; } else { m . put ( str [ i ] , 1 ) ; } } int res = 0 ; for ( Map . Entry < String , Integer > it : m . entrySet ( ) ) { if ( it . getValue ( ) == 2 ) res ++ ; } return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String [ ]> param0 = new ArrayList<>(); param0.add(new String[]{"hate", "love", "peace", "love", "peace", "hate", "love", "peace", "love", "peace"}); param0.add(new String[]{"16","946613197072","532052","42780833","511552","1241934","4","3444540","47487223670074","23753","14158","4","95420017116714","16","0845","689000748","976403809728","8922","487784120896","329","611","59101","611","2131059721","53952148295020","445948587","3905249775372","4683180907","7169093","01413852276627","63","5864","40862536595","2280304422294","930028582","05","33447"}); param0.add(new String[]{"001000100000","1010","01011","11","011","1010"}); param0.add(new String[]{"Om", "Om", "Shankar", "Tripathi", "Tom", "Jerry", "Jerry"}); param0.add(new String[]{"2","644","2","42484637089","81578664","0778"}); param0.add(new String[]{"001000101","011010","1","101010011","011010","01","10111000101","0","1","00101101","0","0"}); param0.add(new String[]{"kl","p sH","PwCPMPu","tQoIgPpk","wtsNP WjS","kl ","TXsFWgU","kl","AD","NjjTyFGwNWZcB","jpFQslbGbDI","cEpGAgvpk","EMaDkMOm","YZuNZgfwDIjG","k","hJx jHmGpQYwQP","CIETe","RH","Pj","h","DInR","AEsqOvliQtz","NwzHTALTt LS","LwLR","WvDCzlQF","soJb","WktoldCbWyTO","pIdRJxY","BmpWxjOwTXkjjL","zmtCiQ","g","yBmDW","QhaBZrQnOJaAJ","u","MGTwCKve","UxYQrONag","xsGSz","dqNPTT","U W","ygJKvCEKDClby","M","yXJQHxjyDQDLkT","oJmaREOEk YA","zUwiwhSMdiC","jYgZEktcdgLD","fwyTAAW","GENttdzeGY "}); param0.add(new String[]{"938","074209","0949093096","218622476","71692175","0714","81217924991","74016430795374","52213147","338","939","798161500954","90528060774015","68715","75810","43450","8017","0193164","5945740","212","4589289","2912211026","0","49","8230114","0733435391403","5429","10070"}); param0.add(new String[]{"00","0","00","0101111010100","110"}); param0.add(new String[]{"g","h","ok","h","ok","sqozuC","ut","ZwRcG","ok","MR","jHrWyy","qaJlrokgRHuZH","LjPNzDUKszYmCq","g","ZGjLfMnyAGL","kEZoSxOMEWSFpw","IFtqNaDVnG","iJoJXl","vjrQMyWor","FTEHZqbHGlmHph","QeSdzm","nPostKHkigyJt","mOSekk"}); List<Integer> param1 = new ArrayList<>(); param1.add(10); param1.add(32); param1.add(6); param1.add(7); param1.add(6); param1.add(12); param1.add(43); param1.add(20); param1.add(4); param1.add(15); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,817
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NEXT_POWER_OF_2_2.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NEXT_POWER_OF_2_2{ static int f_gold ( int n ) { n -- ; n |= n >> 1 ; n |= n >> 2 ; n |= n >> 4 ; n |= n >> 8 ; n |= n >> 16 ; n ++ ; return n ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(63); param0.add(78); param0.add(13); param0.add(5); param0.add(34); param0.add(69); param0.add(63); param0.add(78); param0.add(80); param0.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,818
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S{ static int f_gold ( int A [ ] , int B [ ] , int m , int n ) { int dp [ ] [ ] = new int [ n + 1 ] [ m + 1 ] ; for ( int [ ] row : dp ) Arrays . fill ( row , 0 ) ; for ( int i = 1 ; i <= n ; i ++ ) for ( int j = i ; j <= m ; j ++ ) dp [ i ] [ j ] = Math . max ( ( dp [ i - 1 ] [ j - 1 ] + ( A [ j - 1 ] * B [ i - 1 ] ) ) , dp [ i ] [ j - 1 ] ) ; return dp [ n ] [ m ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{7,9,22,68}); param0.add(new int[]{24,40,98,58,-24,24,76,48,-92,-16,-46,-48,-70,88,66,2,44,36,34,34,46,90,-80,-24,-58,68,72,-20,-62,-40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{32,15,41,41,4,42,22,33,33,11,68,5,41,80,39,15,36,75,41,11,25,40,50,19,39,12,75,28,52,20,63,5,27,53,19,62,98,72,10,90,74,93,52,81,91,65,90,93}); param0.add(new int[]{-94,-76,-68,-50,-28,-20,18,24,30,54,74,84,98}); param0.add(new int[]{1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,1,0}); param0.add(new int[]{14,27,43,49}); param0.add(new int[]{78,-26,-12,38,-90}); param0.add(new int[]{0,1,1,1}); param0.add(new int[]{12,69,57,7,52,14,15,83,67,57,15,86,81,43,1,64,45,68,30,23,14,70,13,51,23,33,98,68,24,43,12,82,46}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{14,22,54,58}); param1.add(new int[]{30,-88,6,-26,-76,14,-80,-30,-58,76,40,-28,-54,38,-60,-60,88,-80,-22,90,50,-48,68,-26,26,-2,68,-16,88,-72}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{80,18,9,29,62,89,4,40,47,15,35,82,22,97,63,54,7,58,64,73,54,79,21,21,20,19,56,42,6,97,7,34,55,35,57,86,73,88,20,29,48,52,8,77,2,12,6,47}); param1.add(new int[]{-88,-80,-78,-68,-44,-38,42,50,62,68,70,80,92}); param1.add(new int[]{1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0,1,0,1,0,1,0,1}); param1.add(new int[]{51,59,76,83}); param1.add(new int[]{14,50,-6,-38,80}); param1.add(new int[]{0,0,0,1}); param1.add(new int[]{12,48,57,40,47,36,22,50,68,98,77,78,39,55,87,75,65,27,33,27,70,34,67,71,84,33,7,61,3,9,67,92,60}); List<Integer> param2 = new ArrayList<>(); param2.add(3); param2.add(22); param2.add(22); param2.add(30); param2.add(11); param2.add(21); param2.add(2); param2.add(3); param2.add(3); param2.add(17); List<Integer> param3 = new ArrayList<>(); param3.add(2); param3.add(22); param3.add(19); param3.add(25); param3.add(8); param3.add(33); param3.add(2); param3.add(2); param3.add(2); param3.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,819
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUBARRAYS_DISTINCT_ELEMENTS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUBARRAYS_DISTINCT_ELEMENTS{ public static int f_gold ( int [ ] arr , int n ) { Set < Integer > s = new HashSet < > ( ) ; int j = 0 , ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { while ( j < n && ! s . contains ( arr [ j ] ) ) { s . add ( arr [ i ] ) ; j ++ ; } ans += ( ( j - i ) * ( j - i + 1 ) ) / 2 ; s . remove ( arr [ i ] ) ; } return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{3,4,5,6,12,15,16,17,20,20,22,24,24,27,28,34,37,39,39,41,43,49,49,51,55,62,63,67,71,74,74,74,77,84,84,89,89,97,99}); param0.add(new int[]{-8,54,-22,18,20,44,0,54,90,-4,4,40,-74,-16}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{36,71,36,58,38,90,17}); param0.add(new int[]{-90,-32,-16,18,38,82}); param0.add(new int[]{1,0,1}); param0.add(new int[]{3,11,21,25,28,28,38,42,48,53,55,55,55,58,71,75,79,80,80,94,96,99}); param0.add(new int[]{-16,-52,-4,-46,54,0,8,-64,-82,-10,-62,-10,58,44,-28,86,-24,16,44,22,-28,-42,-52,8,76,-44,-34,2,88,-88,-14,-84,-36,-68,76,20,20,-50}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{19,13,61,32,92,90,12,81,52}); List<Integer> param1 = new ArrayList<>(); param1.add(24); param1.add(13); param1.add(28); param1.add(4); param1.add(5); param1.add(2); param1.add(20); param1.add(35); param1.add(27); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,820
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2{ static int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(24); param0.add(46); param0.add(47); param0.add(41); param0.add(98); param0.add(69); param0.add(83); param0.add(2); param0.add(12); param0.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,821
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SQUARE_ROOT_OF_AN_INTEGER_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARE_ROOT_OF_AN_INTEGER_1{ public static int f_gold ( int x ) { if ( x == 0 || x == 1 ) return x ; int start = 1 , end = x , ans = 0 ; while ( start <= end ) { int mid = ( start + end ) / 2 ; if ( mid * mid == x ) return mid ; if ( mid * mid < x ) { start = mid + 1 ; ans = mid ; } else end = mid - 1 ; } return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(40); param0.add(10); param0.add(46); param0.add(54); param0.add(1); param0.add(67); param0.add(64); param0.add(10); param0.add(75); param0.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,822
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_FAI_AJ_PAIRS_ARRAY_N_INTEGERS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_FAI_AJ_PAIRS_ARRAY_N_INTEGERS{ public static int f_gold ( int a [ ] , int n ) { Map < Integer , Integer > cnt = new HashMap < Integer , Integer > ( ) ; int ans = 0 , pre_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { ans += ( i * a [ i ] ) - pre_sum ; pre_sum += a [ i ] ; if ( cnt . containsKey ( a [ i ] - 1 ) ) ans -= cnt . get ( a [ i ] - 1 ) ; if ( cnt . containsKey ( a [ i ] + 1 ) ) ans += cnt . get ( a [ i ] + 1 ) ; if ( cnt . containsKey ( a [ i ] ) ) { cnt . put ( a [ i ] , cnt . get ( a [ i ] ) + 1 ) ; } else { cnt . put ( a [ i ] , 1 ) ; } } return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,8,12,19,23,23,26,39,54,56,57,57,73,78,83,83,89,91}); param0.add(new int[]{62,-34,10,-28,-42,-12,4,20,-20,-84,-76,-16,-44,26,-78,-40,50,-10,-56,76,-88,24,64,10,64,-8,-68,-42,26,24,62,36,-68,8,-68,-2,8,38,-18}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{23,14,44,29,93,56,22,29,97,71,43,72,74,8,92,40,18,34,78,79,93,63,79,44,35,72,88,83,40,89,66,66,54,56,44,62,72,94,79,79,24,55,72,37,27,55,16,58,83}); param0.add(new int[]{-96,-94,-90,-90,-86,-82,-80,-80,-58,-48,-40,-32,-32,-20,-20,-20,-12,-12,-6,-6,-2,0,4,16,16,16,42,48,58,64,68,76,76,76,78,80,82,88,88,88,92,94,96,98}); param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,1}); param0.add(new int[]{3,4,4,8,10,10,11,15,19,19,20,24,25,25,27,30,41,43,44,45,47,55,59,59,61,63,63,67,67,69,72,73,75,77,77,78,81,81,83,84,92,94,99}); param0.add(new int[]{94,-86,94,54,-52,86,68,64,98,54,-14,-60,-60,-92,80,-16,28,16,-74,68,32,-54,58,-16,-2,-52,-92,-36,96,-18,14,76,16}); param0.add(new int[]{0,0,0,0,1,1,1,1}); param0.add(new int[]{10,28,63,2,78,12,51,82,89,65,99}); List<Integer> param1 = new ArrayList<>(); param1.add(15); param1.add(20); param1.add(18); param1.add(25); param1.add(27); param1.add(34); param1.add(31); param1.add(26); param1.add(7); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,823
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DIVISIBILITY_9_USING_BITWISE_OPERATORS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIVISIBILITY_9_USING_BITWISE_OPERATORS{ static boolean f_gold ( int n ) { if ( n == 0 || n == 9 ) return true ; if ( n < 9 ) return false ; return f_gold ( ( int ) ( n >> 3 ) - ( int ) ( n & 7 ) ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(96); param0.add(85); param0.add(54); param0.add(14); param0.add(47); param0.add(11); param0.add(49); param0.add(99); param0.add(28); param0.add(82); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,824
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LEXICOGRAPHICAL_CONCATENATION_SUBSTRINGS_STRING.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LEXICOGRAPHICAL_CONCATENATION_SUBSTRINGS_STRING{ static String f_gold ( String s ) { int n = s . length ( ) ; int sub_count = n * ( n + 1 ) / 2 ; String [ ] arr = new String [ sub_count ] ; int index = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int len = 1 ; len <= n - i ; len ++ ) { arr [ index ++ ] = s . substring ( i , i + len ) ; } Arrays . sort ( arr ) ; String res = "" ; for ( int i = 0 ; i < sub_count ; i ++ ) res += arr [ i ] ; return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("sqGOi"); param0.add("848580"); param0.add("01001110011001"); param0.add("ZhWXUKmeiI"); param0.add("0917296541285"); param0.add("01101001111100"); param0.add("tjP kR"); param0.add("999907"); param0.add("011100"); param0.add("qJPHNSJOUj"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,825
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/WRITE_A_C_PROGRAM_TO_CALCULATE_POWXN.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_A_C_PROGRAM_TO_CALCULATE_POWXN{ static int f_gold ( int x , int y ) { if ( y == 0 ) return 1 ; else if ( y % 2 == 0 ) return f_gold ( x , y / 2 ) * f_gold ( x , y / 2 ) ; else return x * f_gold ( x , y / 2 ) * f_gold ( x , y / 2 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(46); param0.add(99); param0.add(30); param0.add(1); param0.add(26); param0.add(1); param0.add(27); param0.add(10); param0.add(26); param0.add(29); List<Integer> param1 = new ArrayList<>(); param1.add(92); param1.add(87); param1.add(32); param1.add(86); param1.add(81); param1.add(49); param1.add(46); param1.add(52); param1.add(38); param1.add(80); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,826
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_SUBSEQUENCES_FORM_AI_BJ_CK.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBSEQUENCES_FORM_AI_BJ_CK{ static int f_gold ( String s ) { int aCount = 0 ; int bCount = 0 ; int cCount = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == 'a' ) aCount = ( 1 + 2 * aCount ) ; else if ( s . charAt ( i ) == 'b' ) bCount = ( aCount + 2 * bCount ) ; else if ( s . charAt ( i ) == 'c' ) cCount = ( bCount + 2 * cCount ) ; } return cCount ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add(""); param0.add("abbc"); param0.add("abcabc"); param0.add("agsdbkfdc "); param0.add("ababab"); param0.add("aaaaaaa"); param0.add("aabaaabcc"); param0.add("19"); param0.add("1001100"); param0.add("DtAnuQbU"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,827
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LONGEST_COMMON_SUBSTRING.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_COMMON_SUBSTRING{ static int f_gold ( char X [ ] , char Y [ ] , int m , int n ) { int LCStuff [ ] [ ] = new int [ m + 1 ] [ n + 1 ] ; int result = 0 ; for ( int i = 0 ; i <= m ; i ++ ) { for ( int j = 0 ; j <= n ; j ++ ) { if ( i == 0 || j == 0 ) LCStuff [ i ] [ j ] = 0 ; else if ( X [ i - 1 ] == Y [ j - 1 ] ) { LCStuff [ i ] [ j ] = LCStuff [ i - 1 ] [ j - 1 ] + 1 ; result = Integer . max ( result , LCStuff [ i ] [ j ] ) ; } else LCStuff [ i ] [ j ] = 0 ; } } return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<char [ ]> param0 = new ArrayList<>(); param0.add(new char[]{'A','D','E','E','L','L','T','r','x'}); param0.add(new char[]{'9','3','4','8','7','6','3','8','3','3','5','3','5','4','2','5','5','3','6','2','1','7','4','2','7','3','2','1','3','7','6','5','0','6','3','8','5','1','7','9','2','7'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'W','X','P','u','s','k','O','y','Q','i','t','z','F','f','s','N','K','m','I','M','g','e','E','P','b','Y','c','O',' ','G','F','x'}); param0.add(new char[]{'0','1','2','4','5','7','7','7','8','8','9','9','9'}); param0.add(new char[]{'0','0','1'}); param0.add(new char[]{'A','C','F','G','G','H','I','K','K','N','O','Q','R','V','V','W','Y','a','a','c','d','k','k','m','o','p','t','u','y','y','y','z'}); param0.add(new char[]{'0','0','0','2','8','3','5','1','0','7','7','9','9','4','8','9','5'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','1','1','1'}); param0.add(new char[]{'B','o','R','k','Y','M','g','b','h','A','i','X','p','i','j','f','V','n','d','P','T','U','f','G','M','W','g','a','C','E','v','C',' '}); List<char [ ]> param1 = new ArrayList<>(); param1.add(new char[]{'D','F','H','O','g','o','u','v','w'}); param1.add(new char[]{'5','5','3','7','8','0','9','8','5','8','5','1','4','4','0','2','9','2','3','1','1','3','6','1','2','0','5','4','3','7','5','5','8','1','1','4','8','1','7','5','5','4'}); param1.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param1.add(new char[]{'e','R','P','W','d','a','A','j','H','v','T','w','x','I','d','o','z','K','B','M','J','L','a',' ','T','L','V','t','M','U','z','R'}); param1.add(new char[]{'0','0','2','2','2','3','4','6','6','7','8','9','9'}); param1.add(new char[]{'0','0','1'}); param1.add(new char[]{' ',' ','B','C','C','C','D','E','I','J','M','N','P','T','U','U','V','V','W','W','Y','b','c','e','i','o','p','r','t','y','y','z'}); param1.add(new char[]{'8','5','8','7','1','4','0','2','2','7','2','4','0','8','3','8','7'}); param1.add(new char[]{'0','0','0','0','0','0','1','1','1','1','1'}); param1.add(new char[]{'F','h','G','H','Q','Q','K','g','k','u','l','c','c','o','n','G','i','Z','d','b','c','b','v','t','S','t','P','A','K','g','G','i','m'}); List<Integer> param2 = new ArrayList<>(); param2.add(4); param2.add(41); param2.add(35); param2.add(31); param2.add(12); param2.add(1); param2.add(21); param2.add(13); param2.add(9); param2.add(19); List<Integer> param3 = new ArrayList<>(); param3.add(4); param3.add(37); param3.add(29); param3.add(18); param3.add(8); param3.add(1); param3.add(23); param3.add(12); param3.add(9); param3.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,828
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CEILING_IN_A_SORTED_ARRAY_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CEILING_IN_A_SORTED_ARRAY_1{ static int f_gold ( int arr [ ] , int low , int high , int x ) { int mid ; if ( x <= arr [ low ] ) return low ; if ( x > arr [ high ] ) return - 1 ; mid = ( low + high ) / 2 ; if ( arr [ mid ] == x ) return mid ; else if ( arr [ mid ] < x ) { if ( mid + 1 <= high && x <= arr [ mid + 1 ] ) return mid + 1 ; else return f_gold ( arr , mid + 1 , high , x ) ; } else { if ( mid - 1 >= low && x > arr [ mid - 1 ] ) return mid ; else return f_gold ( arr , low , mid - 1 , x ) ; } } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,6,13,16,23,24,24,27,30,32,34,34,55,56,56,63,66,81,83,96}); param0.add(new int[]{-28,-96,48,22,-12,72,48,-70,-96,-84,-62,22,18,-92,-74,14,28,52,64,72,16,-76,46}); param0.add(new int[]{0,1}); param0.add(new int[]{51,98,25,10,43,91,33,25,85,51,94,6,35,48,11,97,67,21,50,9,11,51,86,61,22,88,89,11}); param0.add(new int[]{-94,-92,-88,-74,-52,-50,-48,-44,-40,-36,-32,-26,20,22,30,32,46,56,56,60,62,64,80,84,86,94,96,96}); param0.add(new int[]{1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0}); param0.add(new int[]{4,5,5,13,26,40,46,51,58,60,64,66,68,69,71,74,78,81,83,88,88,90,98,99}); param0.add(new int[]{92,6,-54,84,-10,32,50,40,-38,64,-64,-10,70,-68,-6,-16,68,34,-66,-82,84,98,50,82,78,4,34,-34,78,64,32,58,-94,40,50,0,-92,-36,10,-54,58,-78,-88,32,6}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{80,67,30,35,9}); List<Integer> param1 = new ArrayList<>(); param1.add(13); param1.add(11); param1.add(1); param1.add(20); param1.add(20); param1.add(15); param1.add(12); param1.add(23); param1.add(24); param1.add(2); List<Integer> param2 = new ArrayList<>(); param2.add(11); param2.add(18); param2.add(1); param2.add(20); param2.add(15); param2.add(17); param2.add(17); param2.add(28); param2.add(17); param2.add(3); List<Integer> param3 = new ArrayList<>(); param3.add(18); param3.add(21); param3.add(1); param3.add(15); param3.add(15); param3.add(22); param3.add(14); param3.add(28); param3.add(22); param3.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,829
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_EQULIBRIUM_SUM_ARRAY.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_EQULIBRIUM_SUM_ARRAY{ static int f_gold ( int [ ] arr , int n ) { int res = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int prefix_sum = arr [ i ] ; for ( int j = 0 ; j < i ; j ++ ) prefix_sum += arr [ j ] ; int suffix_sum = arr [ i ] ; for ( int j = n - 1 ; j > i ; j -- ) suffix_sum += arr [ j ] ; if ( prefix_sum == suffix_sum ) res = Math . max ( res , prefix_sum ) ; } return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{3,3,9,19,22,27,32,41,45,63,66,67,81,91}); param0.add(new int[]{-64,-2,68,-48,22,-14,-98}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{86,79,23,55,4,22,37,1,72,22,82,62,96,47}); param0.add(new int[]{-96,-96,-96,-96,-92,-82,-72,-72,-62,-58,-52,-48,-44,-44,-40,-34,-28,-26,-26,0,0,2,4,4,12,12,18,34,36,40,48,48,54,60,66,66,72,76,78,82,82,96,98}); param0.add(new int[]{0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1,0}); param0.add(new int[]{2,3,7,13,20,24,39,49,53,58,72,80,90,99}); param0.add(new int[]{-48,44,60,-30,8,20,70,-50,80,-2,-28,-14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{64,13,18,3,22,29,51,45,21,13,47,15,17,34,60,99,30,54,16,47,13,49,60,66,28,57,85,66,65,7,62,29,9}); List<Integer> param1 = new ArrayList<>(); param1.add(13); param1.add(4); param1.add(19); param1.add(8); param1.add(33); param1.add(38); param1.add(11); param1.add(11); param1.add(16); param1.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,830
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME{ static int f_gold ( int low , int high ) { int f1 = 0 , f2 = 1 , f3 = 1 ; int result = 0 ; while ( f1 <= high ) { if ( f1 >= low ) result ++ ; f1 = f2 ; f2 = f3 ; f3 = f1 + f2 ; } return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(76); param0.add(96); param0.add(19); param0.add(36); param0.add(60); param0.add(20); param0.add(76); param0.add(63); param0.add(2); param0.add(41); List<Integer> param1 = new ArrayList<>(); param1.add(43); param1.add(52); param1.add(79); param1.add(2); param1.add(11); param1.add(15); param1.add(4); param1.add(93); param1.add(25); param1.add(39); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,831
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE_1{ static int f_gold ( int arr [ ] , int n , int x ) { int curr_sum = 0 , min_len = n + 1 ; int start = 0 , end = 0 ; while ( end < n ) { while ( curr_sum <= x && end < n ) { if ( curr_sum <= 0 && x > 0 ) { start = end ; curr_sum = 0 ; } curr_sum += arr [ end ++ ] ; } while ( curr_sum > x && start < n ) { if ( end - start < min_len ) min_len = end - start ; curr_sum -= arr [ start ++ ] ; } } return min_len ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,4,5,10,14,15,16,20,23,28,31,35,36,36,43,48,49,55,57,57,58,61,64,64,68,70,70,73,74,76,76,77,81,81,82,87,89,92,99}); param0.add(new int[]{66,-20,12,-48,22,28,40,-30,-6,-96,10,-88,40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{28,19,38,31,17,27,60,35,19,47,34,51,3,95,33,29,84,46,74,87}); param0.add(new int[]{-48,-2}); param0.add(new int[]{1,1,0,1,1,1,1,0,1,0,1,1,0,1,1,0,1,1,0,1,1,1}); param0.add(new int[]{1,4,4,6,8,10,12,12,13,15,18,20,21,23,25,28,28,33,33,35,35,36,37,38,42,44,63,63,65,65,65,66,70,74,77,78,80,80,84,87,87,89,92,93,94,97,98,99}); param0.add(new int[]{-82,-12,-40,58,22,-76,-94,-28,42,36,64}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{76,65,96,76,1,91,22,29,95,21,73,68,30,52,73,86,52,66,67,37,76,53,68,6,95,81,98,42,63,38,92,78,59,86,10,38,18,15,52,62,16,66}); List<Integer> param1 = new ArrayList<>(); param1.add(33); param1.add(11); param1.add(42); param1.add(15); param1.add(1); param1.add(12); param1.add(42); param1.add(10); param1.add(10); param1.add(23); List<Integer> param2 = new ArrayList<>(); param2.add(28); param2.add(12); param2.add(23); param2.add(15); param2.add(1); param2.add(15); param2.add(27); param2.add(6); param2.add(14); param2.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,832
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE{ static boolean f_gold ( int [ ] arr , int n , int k ) { int count ; for ( int i = 0 ; i < n ; i ++ ) { count = 0 ; for ( int j = 0 ; j < n ; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++ ; if ( count > 2 * k ) return false ; } } return true ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,1,2,3,1}); param0.add(new int[]{2,3,3,5,3,3}); param0.add(new int[]{0,0,1,1,1}); param0.add(new int[]{7,60,78,91,80,75,85,21,41,63,1,84,69,13,94,25,54,54,52,68,53,35,17,37,98,27,2,31}); param0.add(new int[]{-96,-94,-82,-80,-78,-66,-36,-24,-18,-12,-2,-2,6,8,10,12,36,38,42,58,64,68,82,84,86,88,94}); param0.add(new int[]{0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0}); param0.add(new int[]{16,19,25,25,32,37,48,59,60,60,71,74,77,81,91,94}); param0.add(new int[]{-62,-94,72,-22,86,-80,64,98,-82,-50,12,-4,56,46,-80,2,-86,-44,-26,68,-94,-82,74,26,94,40,50,-40,-42,-10}); param0.add(new int[]{0,0,0,0,0,1,1,1}); param0.add(new int[]{83,57,2,47,70,22,49,51,25,57,32,7,8,99,6,86,24,79,42,43,1,24,68,11,24,12,43,40,14,45,11,46,12,80,66}); List<Integer> param1 = new ArrayList<>(); param1.add(5); param1.add(6); param1.add(2); param1.add(24); param1.add(24); param1.add(34); param1.add(10); param1.add(20); param1.add(5); param1.add(21); List<Integer> param2 = new ArrayList<>(); param2.add(2); param2.add(2); param2.add(1); param2.add(2); param2.add(3); param2.add(2); param2.add(8); param2.add(4); param2.add(2); param2.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,833
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_THE_FIRST_MISSING_NUMBER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_FIRST_MISSING_NUMBER{ static int f_gold ( int array [ ] , int start , int end ) { if ( start > end ) return end + 1 ; if ( start != array [ start ] ) return start ; int mid = ( start + end ) / 2 ; if ( array [ mid ] == mid ) return f_gold ( array , mid + 1 , end ) ; return f_gold ( array , start , mid ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{3,6,7,9,11,14,18,30,30,32,32,34,37,44,45,45,48,48,48,52,58,60,63,67,69,69,81,83,87,89,97,99}); param0.add(new int[]{88,-62,16,80,66,78,88,38,52,-96,48,98,96,-62,18,34,-58,30,-10,26,-98,48,-96,4,92,36,36,-36,-32,-70,62,-58,-58,-84,86,-98}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{79,99,79,85,61,58,62,61,39,87,39,74,36,70,30,43,20,52,54,50,81,98,42}); param0.add(new int[]{-98,-72,-46,-44,-42,-40,-16,-4,62,70,74}); param0.add(new int[]{1,1,0,1,0,0,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0}); param0.add(new int[]{58}); param0.add(new int[]{4,-84,-42,12,-50,42,-36,-38,-36,98,-2,20,6,-96,-78,24,34,88,0,74,0,-8,-86,-68,-42,98,-26,86,-70,-32,-82,78,46,58,84,4,-60,-90,-52,-78}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{8}); List<Integer> param1 = new ArrayList<>(); param1.add(24); param1.add(19); param1.add(26); param1.add(20); param1.add(8); param1.add(26); param1.add(0); param1.add(37); param1.add(28); param1.add(0); List<Integer> param2 = new ArrayList<>(); param2.add(18); param2.add(26); param2.add(28); param2.add(20); param2.add(10); param2.add(23); param2.add(0); param2.add(31); param2.add(28); param2.add(0); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,834
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SWAP_BITS_IN_A_GIVEN_NUMBER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SWAP_BITS_IN_A_GIVEN_NUMBER{ static int f_gold ( int x , int p1 , int p2 , int n ) { int set1 = ( x >> p1 ) & ( ( 1 << n ) - 1 ) ; int set2 = ( x >> p2 ) & ( ( 1 << n ) - 1 ) ; int xor = ( set1 ^ set2 ) ; xor = ( xor << p1 ) | ( xor << p2 ) ; int result = x ^ xor ; return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(95); param0.add(16); param0.add(55); param0.add(75); param0.add(90); param0.add(58); param0.add(69); param0.add(5); param0.add(36); param0.add(62); List<Integer> param1 = new ArrayList<>(); param1.add(88); param1.add(26); param1.add(56); param1.add(35); param1.add(12); param1.add(65); param1.add(64); param1.add(1); param1.add(33); param1.add(69); List<Integer> param2 = new ArrayList<>(); param2.add(97); param2.add(59); param2.add(40); param2.add(79); param2.add(59); param2.add(25); param2.add(17); param2.add(59); param2.add(97); param2.add(66); List<Integer> param3 = new ArrayList<>(); param3.add(92); param3.add(42); param3.add(41); param3.add(30); param3.add(34); param3.add(19); param3.add(94); param3.add(38); param3.add(44); param3.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,835
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_COST_CUT_BOARD_SQUARES.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_COST_CUT_BOARD_SQUARES{ static int f_gold ( Integer X [ ] , Integer Y [ ] , int m , int n ) { int res = 0 ; Arrays . sort ( X , Collections . reverseOrder ( ) ) ; Arrays . sort ( Y , Collections . reverseOrder ( ) ) ; int hzntl = 1 , vert = 1 ; int i = 0 , j = 0 ; while ( i < m && j < n ) { if ( X [ i ] > Y [ j ] ) { res += X [ i ] * vert ; hzntl ++ ; i ++ ; } else { res += Y [ j ] * hzntl ; vert ++ ; j ++ ; } } int total = 0 ; while ( i < m ) total += X [ i ++ ] ; res += total * vert ; total = 0 ; while ( j < n ) total += Y [ j ++ ] ; res += total * hzntl ; return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer [ ]> param0 = new ArrayList<>(); param0.add(new Integer[]{1,9,9,16,18,20,22,22,23,25,25,26,28,32,33,33,33,34,37,40,44,46,46,52,53,56,58,58,59,60,61,67,67,69,70,70,73,75,77,83,87,87,87,90,90,93,97,98}); param0.add(new Integer[]{-52,66,66,-4,-74,78,52,-72}); param0.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new Integer[]{58,78,48,44,63,37,89,76,66,83,52,97,19,28,67,38,54,77,2,96,28,87}); param0.add(new Integer[]{-84,-78,-76,-72,-68,-62,-62,-60,-58,-44,-34,-10,-8,-4,-2,-2,14,16,20,26,26,32,70,78,86,90,96}); param0.add(new Integer[]{0,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,0,0,1,1,1,1,0,0,0,1,1,0}); param0.add(new Integer[]{30,75}); param0.add(new Integer[]{70,78,-60,-10,-8,46,38,60,-54,-68,16,10,36,-10,38,-96,-52,-82,-56,22,-56,0,96,-60,24,70,40,62,-20,-36,74,32,44,14,-18,50,58}); param0.add(new Integer[]{0,0,0,1}); param0.add(new Integer[]{81,40,29,74,13,67,10,25,24,81,90}); List<Integer [ ]> param1 = new ArrayList<>(); param1.add(new Integer[]{2,3,9,10,13,16,17,19,20,23,25,27,29,30,30,35,37,39,39,45,47,50,55,55,55,56,59,60,62,63,67,70,70,71,72,73,73,74,77,86,87,88,91,92,95,96,97,99}); param1.add(new Integer[]{-40,30,-34,-76,84,88,-78,72}); param1.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param1.add(new Integer[]{37,36,26,5,83,75,33,33,72,63,91,94,75,92,9,19,79,29,40,47,63,36}); param1.add(new Integer[]{-98,-98,-86,-82,-76,-62,-60,-48,-32,-32,-24,-18,-10,-4,0,16,16,26,36,42,48,50,64,66,78,92,98}); param1.add(new Integer[]{1,0,1,1,1,0,1,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,1,0}); param1.add(new Integer[]{10,39}); param1.add(new Integer[]{64,-42,-50,-76,46,32,-66,86,-6,46,94,70,-62,90,78,4,6,-20,92,-18,-34,-96,92,-24,-90,-94,62,40,-14,-28,80,-86,-86,-56,40,-92,-22}); param1.add(new Integer[]{0,1,1,1}); param1.add(new Integer[]{51,45,23,7,53,14,49,58,25,75,74}); List<Integer> param2 = new ArrayList<>(); param2.add(25); param2.add(6); param2.add(15); param2.add(13); param2.add(15); param2.add(25); param2.add(1); param2.add(19); param2.add(2); param2.add(8); List<Integer> param3 = new ArrayList<>(); param3.add(27); param3.add(7); param3.add(19); param3.add(14); param3.add(24); param3.add(26); param3.add(1); param3.add(19); param3.add(2); param3.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,836
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_MANHATTAN_DISTANCES_PAIRS_POINTS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_MANHATTAN_DISTANCES_PAIRS_POINTS{ static int f_gold ( int x [ ] , int y [ ] , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) sum += ( Math . abs ( x [ i ] - x [ j ] ) + Math . abs ( y [ i ] - y [ j ] ) ) ; return sum ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,4,6,6,8,11,12,13,14,19,20,22,24,28,29,30,32,35,37,44,48,49,51,51,56,59,59,62,65,68,68,68,72,75,77,78,89,89,91,93,95,99}); param0.add(new int[]{16,76,2,42,-24,-82,68,-2,98,-42,-72,28,-22,-52,28,-38,36,66,84,64,-28,86,52,84,-98,-30}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{61,37,57,99,22,72,38,85,23,85,15,4,49,9,15,25,7,63,79,6,85,30,12,34,38,6,59,62,59,34,72,97,70,44,95,58,99}); param0.add(new int[]{-96,-86,-82,-72,-72,-64,-62,-60,-56,-56,-56,-54,-52,-40,-36,-30,-10,10,18,26,28,56,56,56,64,90,92,94}); param0.add(new int[]{1,0,1,1,1,0,1}); param0.add(new int[]{6,10,24,25,31,41,43,45,47,65,67,90}); param0.add(new int[]{-74,92,34,56,-54,-98,-76,-34,16,32,-4,-16,22,90,-52,-90,-60,70,-40,78,96,-68,78,-56,-94}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{20,32}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{6,19,19,22,25,27,31,33,34,35,37,38,38,44,46,50,51,55,58,58,64,64,64,64,65,66,66,66,67,70,75,78,79,81,81,81,82,84,84,86,94,96}); param1.add(new int[]{-34,92,-24,-62,28,72,-10,10,8,90,-72,-24,50,-46,52,58,68,-62,-64,-78,-12,24,62,-30,62,-60}); param1.add(new int[]{0,0,0,0,1,1,1,1,1,1}); param1.add(new int[]{72,41,77,62,78,36,75,28,91,39,32,56,60,64,21,15,80,85,28,22,53,58,69,62,60,48,66,91,38,66,54,5,24,1,49,71,49}); param1.add(new int[]{-98,-98,-96,-96,-82,-80,-80,-68,-62,-60,-46,-38,-26,-26,-20,-18,16,22,24,26,34,46,52,52,74,76,90,92}); param1.add(new int[]{1,0,1,0,0,1,1}); param1.add(new int[]{4,7,11,19,21,39,57,80,84,93,94,97}); param1.add(new int[]{14,20,24,-92,58,12,78,78,-90,96,-44,36,30,-46,-30,-80,26,-2,26,28,-16,-50,-2,-36,-8}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{23,50}); List<Integer> param2 = new ArrayList<>(); param2.add(37); param2.add(24); param2.add(5); param2.add(26); param2.add(26); param2.add(3); param2.add(10); param2.add(21); param2.add(23); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,837
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1{ static int f_gold ( int n ) { float fibo = 2.078087F * ( float ) Math . log ( n ) + 1.672276F ; return Math . round ( fibo ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(20); param0.add(95); param0.add(39); param0.add(21); param0.add(94); param0.add(79); param0.add(56); param0.add(62); param0.add(23); param0.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,838
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_ENTRIES_EQUAL_TO_X_IN_A_SPECIAL_MATRIX.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_ENTRIES_EQUAL_TO_X_IN_A_SPECIAL_MATRIX{ static int f_gold ( int n , int x ) { int f_gold = 0 ; for ( int i = 1 ; i <= n && i <= x ; i ++ ) { if ( x / i <= n && x % i == 0 ) f_gold ++ ; } return f_gold ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(47); param0.add(57); param0.add(55); param0.add(11); param0.add(55); param0.add(63); param0.add(64); param0.add(28); param0.add(49); param0.add(48); List<Integer> param1 = new ArrayList<>(); param1.add(30); param1.add(16); param1.add(63); param1.add(23); param1.add(49); param1.add(64); param1.add(98); param1.add(30); param1.add(61); param1.add(64); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,839
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LONGEST_CONSECUTIVE_SUBSEQUENCE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_CONSECUTIVE_SUBSEQUENCE{ static int f_gold ( int arr [ ] , int n ) { HashSet < Integer > S = new HashSet < Integer > ( ) ; int ans = 0 ; for ( int i = 0 ; i < n ; ++ i ) S . add ( arr [ i ] ) ; for ( int i = 0 ; i < n ; ++ i ) { if ( ! S . contains ( arr [ i ] - 1 ) ) { int j = arr [ i ] ; while ( S . contains ( j ) ) j ++ ; if ( ans < j - arr [ i ] ) ans = j - arr [ i ] ; } } return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,28,31,64,73}); param0.add(new int[]{46,26,-84,-24,50,94,-14,74,-52,-62,2,46,62,54,-30,-70,-76,74,60,10,60,98,-92,98,-96,34,30,58,-60,-52,-66,-40,-78,-26,80,-58,-26,80,92,66,90,4,46,-78,80,62,30,0,38}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{24,72,87,81,90,59,18,29,12,24,78,59,93,80,79,26,17,28,43,85,85,76,83,71,28,99,80,14,9,92,46,59,66,34}); param0.add(new int[]{-94,-94,-94,-76,-68,-64,-64,-56,-48,-46,-36,-26,-12,-6,-6,-2,-2,6,6,24,46,48,50,52,58,76,88}); param0.add(new int[]{1}); param0.add(new int[]{1,8,22,27,28,58,80,89,95}); param0.add(new int[]{46,38,-50,98,-22,92,84,-48}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{74,2,85,72,1,49,53,48,46,44,98,75,5,13,98,69,65,68,37,38,77,69,14,17,46,54,55,20,23,59,98,44,22,12,71,18,94,49,57,82,7,64,33,7,29,58,45,98}); List<Integer> param1 = new ArrayList<>(); param1.add(3); param1.add(29); param1.add(38); param1.add(32); param1.add(19); param1.add(0); param1.add(5); param1.add(6); param1.add(19); param1.add(36); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,840
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION{ public static int f_gold ( double n ) { if ( n == 1 ) return 1 ; double z ; double e = 2.71 ; z = Math . sqrt ( 2 * 3.14 * n ) * Math . pow ( ( n / e ) , n ) ; return ( int ) ( z ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Double> param0 = new ArrayList<>(); param0.add(1.0); param0.add(5.0); param0.add(10.0); param0.add(20.0); param0.add(40.0); param0.add(2.0); param0.add(3.0); param0.add(-1.0); param0.add(4663.43115050185); param0.add(-3722.039522409859); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,841
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS{ static int f_gold ( int n ) { if ( n < 4 ) return - 1 ; int rem = n % 4 ; if ( rem == 0 ) return n / 4 ; if ( rem == 1 ) { if ( n < 9 ) return - 1 ; return ( n - 9 ) / 4 + 1 ; } if ( rem == 2 ) return ( n - 6 ) / 4 + 1 ; if ( rem == 3 ) { if ( n < 15 ) return - 1 ; return ( n - 15 ) / 4 + 2 ; } return 0 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(55); param0.add(35); param0.add(24); param0.add(75); param0.add(5); param0.add(7); param0.add(50); param0.add(28); param0.add(67); param0.add(59); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,842
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_LENGTH_PREFIX_ONE_STRING_OCCURS_SUBSEQUENCE_ANOTHER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_LENGTH_PREFIX_ONE_STRING_OCCURS_SUBSEQUENCE_ANOTHER{ static int f_gold ( String s , String t ) { int count = 0 ; for ( int i = 0 ; i < t . length ( ) ; i ++ ) { if ( count == t . length ( ) ) break ; if ( t . charAt ( i ) == s . charAt ( count ) ) count ++ ; } return count ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("nObYIOjEQZ"); param0.add("84574"); param0.add("1010001010010"); param0.add("DjZtAfUudk"); param0.add("550"); param0.add("1110"); param0.add("GywyxwH"); param0.add("67318370914755"); param0.add("11011000000101"); param0.add("G"); List<String> param1 = new ArrayList<>(); param1.add("uARTDTQbmGI"); param1.add("8538229"); param1.add("11"); param1.add("OewGm"); param1.add("132744553919"); param1.add("0101"); param1.add("LPQqEqrDZiwY"); param1.add("9928"); param1.add("00000"); param1.add("V"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,843
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS{ static int f_gold ( int A [ ] , int B [ ] , int m , int n ) { Arrays . sort ( A ) ; Arrays . sort ( B ) ; int a = 0 , b = 0 ; int result = Integer . MAX_VALUE ; while ( a < m && b < n ) { if ( Math . abs ( A [ a ] - B [ b ] ) < result ) result = Math . abs ( A [ a ] - B [ b ] ) ; if ( A [ a ] < B [ b ] ) a ++ ; else b ++ ; } return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,2,11,13,18,18,23,25,28,28,37,39,53,56,67,70,74,74,75,79,80,82,84,89,94,95,95,98,98}); param0.add(new int[]{-78,10,-8,30,-70,-94,-48,-4,-22,-40,-36,-48,-4,86,-50,62,-72,-44,-62,22,-30,-72,6,-24,-78,72,-44,56,38,-36,0,-72,-10,-12,-70,-64,-24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{57,82,90,9,61,71,15,2,39,24,28,28,47}); param0.add(new int[]{-92,-90,-90,-28,-16,-14,-14,-8,42,52,62,84}); param0.add(new int[]{1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,1,0,0,1,0,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,0}); param0.add(new int[]{6,7,7,12,15,15,21,24,26,26,28,36,38,42,46,52,55,56,59,62,63,65,65,66,68,71,73,77,77,77,77,85,87,87,88,90,93,94,98}); param0.add(new int[]{-68,44,88,-68,22,34,-82,18,-60,30,24,18,78,90,-20,-60,94,70,4,-16,-38}); param0.add(new int[]{0,0,1}); param0.add(new int[]{14,7,9,71,37,20,85,62,70,67,26,47,61,99,2,90,70,46,53,16,56,7,15,81,85,94,73,40,35,58,21,98,45}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{5,6,11,13,13,16,17,19,23,25,28,31,31,39,41,44,45,52,62,64,70,71,73,78,78,79,85,86,92}); param1.add(new int[]{78,-80,-24,-50,-26,-62,26,-12,22,-90,84,10,18,62,26,-68,92,64,-52,76,-84,64,50,36,-24,-98,42,72,-78,-98,-24,86,2,60,-30,14,-42}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{85,92,84,27,54,77,26,49,47,51,70,11,41}); param1.add(new int[]{-98,-98,-58,-6,14,16,18,46,52,52,52,56}); param1.add(new int[]{0,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1}); param1.add(new int[]{1,3,4,4,6,7,8,8,15,17,18,18,20,23,23,24,25,25,26,33,39,43,46,54,59,67,69,69,69,69,76,76,81,81,85,86,86,91,95}); param1.add(new int[]{-18,-30,-74,-50,98,-44,-62,-20,18,84,62,-64,-2,62,-32,-34,-14,-52,-36,-60,-68}); param1.add(new int[]{0,0,1}); param1.add(new int[]{99,72,29,55,88,1,88,19,7,80,79,18,28,41,48,49,67,27,24,94,86,14,45,84,37,71,92,98,16,64,67,44,29}); List<Integer> param2 = new ArrayList<>(); param2.add(28); param2.add(23); param2.add(14); param2.add(7); param2.add(11); param2.add(35); param2.add(30); param2.add(16); param2.add(2); param2.add(20); List<Integer> param3 = new ArrayList<>(); param3.add(14); param3.add(33); param3.add(16); param3.add(8); param3.add(6); param3.add(33); param3.add(20); param3.add(12); param3.add(1); param3.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,844
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_1{ public static boolean f_gold ( int n ) { if ( ( n & 1 ) == 0 ) return true ; else return false ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(57); param0.add(73); param0.add(79); param0.add(36); param0.add(71); param0.add(23); param0.add(41); param0.add(66); param0.add(46); param0.add(50); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,845
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT{ static int f_gold ( int a [ ] , int b [ ] , int n ) { Arrays . sort ( a ) ; Arrays . sort ( b ) ; int result = 0 ; for ( int i = 0 ; i < n ; ++ i ) { if ( a [ i ] > b [ i ] ) result = result + Math . abs ( a [ i ] - b [ i ] ) ; else if ( a [ i ] < b [ i ] ) result = result + Math . abs ( a [ i ] - b [ i ] ) ; } return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,6,6,7,10,11,13,18,19,19,19,31,34,37,37,40,41,41,47,47,53,54,55,55,56,56,60,60,62,62,66,73,75,76,78,81,81,85,88,90,91,92,93,95,97,98}); param0.add(new int[]{-12,-6,78,62,86,-32}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{76,74}); param0.add(new int[]{-92,-90,-88,-84,-76,-54,-44,-42,-38,-30,34,42}); param0.add(new int[]{1,1,0,0,1,1,1,0,1,1,0,0,1,0,0,1,1,1}); param0.add(new int[]{4,5,6,13,16,24,36,40,40,44,47,52,58,58,59,63,66,67,69,70,74,77,81,88,89,90,94,96}); param0.add(new int[]{-16,66,-2,54,-8,10,44,-36,-54,50,92,84,-36,40,-12,98,36,22,-10}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{42,24,43,64,55,94,26,30,76,3,37,43,81,7,15,64,63,88,34,8,55,32,19,55}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{2,2,4,7,8,8,8,8,8,9,9,12,15,16,21,25,26,27,29,34,34,35,38,40,40,44,44,47,48,54,58,61,63,64,66,69,69,70,73,74,75,76,79,80,80,93}); param1.add(new int[]{-86,20,32,52,50,-60}); param1.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{16,98}); param1.add(new int[]{-80,-54,-34,12,14,16,16,46,50,64,84,92}); param1.add(new int[]{0,1,1,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1}); param1.add(new int[]{1,7,10,17,21,22,22,27,36,37,39,46,52,53,56,59,65,67,70,75,78,78,79,89,89,94,96,97}); param1.add(new int[]{-76,-74,62,22,50,84,78,26,-62,-10,86,-10,-92,-10,86,-6,-58,-26,-18}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{96,11,63,90,28,80,44,63,17,81,80,69,66,22,81,4,86,74,91,17,3,81,65,98}); List<Integer> param2 = new ArrayList<>(); param2.add(23); param2.add(4); param2.add(14); param2.add(1); param2.add(8); param2.add(14); param2.add(24); param2.add(16); param2.add(36); param2.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,846
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_2.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_2{ static int f_gold ( int num , int divisor ) { while ( num >= divisor ) num -= divisor ; return num ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(70); param0.add(77); param0.add(77); param0.add(88); param0.add(96); param0.add(6); param0.add(79); param0.add(44); param0.add(26); param0.add(82); List<Integer> param1 = new ArrayList<>(); param1.add(13); param1.add(3); param1.add(73); param1.add(54); param1.add(39); param1.add(10); param1.add(95); param1.add(32); param1.add(86); param1.add(91); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,847
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_TRIPLET_SUM_ARRAY_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_TRIPLET_SUM_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; return arr [ n - 1 ] + arr [ n - 2 ] + arr [ n - 3 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{6,8,18,18,27,33,33,38,42,43,44,47,52,58,64,65,67,68,71,75,85,89,91,94,94,95,95}); param0.add(new int[]{24,24,44,28,-88,18,34,92,-84,94,-12,30,-82,-58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{95,75,5,51,67,63,26,47,70,11,21,9,18,31,76,66,81,73,63,55,16,72,15,28,25,25,35,79,4,73,23,87,2,1,92,94,18,70,87,27,34,84,12}); param0.add(new int[]{-86,-86,-78,-56,-24,-14,-10,-6,12,12,18,22,22,26,50,50,72,78,94}); param0.add(new int[]{0,1,1,1,1,1,0,0,0,1,1,1,0,0,0}); param0.add(new int[]{2,13,17,19,20,23,28,28,29,40,45,51,52,58,58,68,70,75,79,81,92,96,97}); param0.add(new int[]{94,6,52,6,-78,40,-46,-20,64,76,-36,-62,50,-4,4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{34,11,15,42,32,4,6,25,52,44,14,57,3,44,7,89,35,3,70,66,58,22,5,17,33,11}); List<Integer> param1 = new ArrayList<>(); param1.add(26); param1.add(8); param1.add(15); param1.add(37); param1.add(9); param1.add(9); param1.add(15); param1.add(13); param1.add(27); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,848
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++ ; return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,6,9,16,16,21,36,41,58,60,62,73,77,81,95}); param0.add(new int[]{-86,-72,-26,-34,18,-62,-66}); param0.add(new int[]{1}); param0.add(new int[]{16}); param0.add(new int[]{-88,-80,-72,-68,-64,-26,4,14,16,22,30,32,60,74,82}); param0.add(new int[]{0,0,1,1,1,0,1,0,0,0,1}); param0.add(new int[]{3,9,10,12,17,23,27,29,42,44,59,61,71,76,78,82,84,84,89,90,93,93,97,97}); param0.add(new int[]{68,-40,-46,-20,-64,90}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{99,17,94,43,97,17,11,58,75,94,37,22,54,31,41,4,55,69,92,80,45,97,16,33,36,17,43,82,81,64,22,65,85,44,47,14}); List<Integer> param1 = new ArrayList<>(); param1.add(12); param1.add(3); param1.add(0); param1.add(0); param1.add(11); param1.add(9); param1.add(15); param1.add(5); param1.add(15); param1.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,849
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION{ static int f_gold ( int n , int m , int k ) { if ( m <= n - k + 1 ) return m + k - 1 ; m = m - ( n - k + 1 ) ; return ( m % n == 0 ) ? n : ( m % n ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(19); param0.add(23); param0.add(92); param0.add(9); param0.add(20); param0.add(68); param0.add(66); param0.add(77); param0.add(90); param0.add(26); List<Integer> param1 = new ArrayList<>(); param1.add(14); param1.add(51); param1.add(10); param1.add(50); param1.add(67); param1.add(25); param1.add(30); param1.add(22); param1.add(1); param1.add(34); List<Integer> param2 = new ArrayList<>(); param2.add(34); param2.add(5); param2.add(24); param2.add(34); param2.add(20); param2.add(40); param2.add(24); param2.add(32); param2.add(71); param2.add(54); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,850
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/TAIL_RECURSION.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TAIL_RECURSION{ static int f_gold ( int n ) { if ( n == 0 ) return 1 ; return n * f_gold ( n - 1 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(77); param0.add(62); param0.add(42); param0.add(16); param0.add(82); param0.add(37); param0.add(29); param0.add(32); param0.add(82); param0.add(91); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,851
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COMPUTE_MODULUS_DIVISION_BY_A_POWER_OF_2_NUMBER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPUTE_MODULUS_DIVISION_BY_A_POWER_OF_2_NUMBER{ static int f_gold ( int n , int d ) { return ( n & ( d - 1 ) ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(54); param0.add(39); param0.add(35); param0.add(9); param0.add(62); param0.add(16); param0.add(93); param0.add(32); param0.add(39); param0.add(63); List<Integer> param1 = new ArrayList<>(); param1.add(59); param1.add(84); param1.add(81); param1.add(60); param1.add(68); param1.add(16); param1.add(96); param1.add(38); param1.add(62); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,852
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2{ public static int f_gold ( int a , int b , int c ) { int x = a - b ; int y = b - c ; int z = a - c ; if ( x * y > 0 ) return b ; else if ( x * z > 0 ) return c ; else return a ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(48); param0.add(21); param0.add(71); param0.add(93); param0.add(3); param0.add(58); param0.add(88); param0.add(8); param0.add(17); param0.add(13); List<Integer> param1 = new ArrayList<>(); param1.add(46); param1.add(7); param1.add(4); param1.add(34); param1.add(61); param1.add(78); param1.add(41); param1.add(84); param1.add(66); param1.add(3); List<Integer> param2 = new ArrayList<>(); param2.add(38); param2.add(16); param2.add(31); param2.add(11); param2.add(32); param2.add(6); param2.add(66); param2.add(38); param2.add(27); param2.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,853
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_INSERTIONS_SORT_ARRAY.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_INSERTIONS_SORT_ARRAY{ static int f_gold ( int arr [ ] , int N ) { int [ ] lis = new int [ N ] ; for ( int i = 0 ; i < N ; i ++ ) lis [ i ] = 1 ; for ( int i = 1 ; i < N ; i ++ ) for ( int j = 0 ; j < i ; j ++ ) if ( arr [ i ] >= arr [ j ] && lis [ i ] < lis [ j ] + 1 ) lis [ i ] = lis [ j ] + 1 ; int max = 0 ; for ( int i = 0 ; i < N ; i ++ ) if ( max < lis [ i ] ) max = lis [ i ] ; return ( N - max ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,7,20,22,23,31,33,36,47,61,63,63,71,74,82,91,95,99}); param0.add(new int[]{-84,12,-42,-78,22,72,56,70,28,-72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{29,41,4,62,77,74,30,2,14,90,93,10,78,36,66,22,48,89,36,73,70,23,90}); param0.add(new int[]{-80,-72,-68,-66,-58,-50,-48,-32,-28,-24,-22,-18,0,2,6,10,12,14,14,18,24,24,24,28,28,28,34,38,42,42,46,46,46,58,80,82,82,84,84,86,88,90,92,96}); param0.add(new int[]{1,1,0,1,0,1,0,0,1,0}); param0.add(new int[]{26,36,58,64,69,72,79,82,82,87,89,90,95}); param0.add(new int[]{-52,-40,98,40,42,-50,60,-64,-92,36,-88,72,-72,38,-80,-52,68,70,16,22,-30,-74,56,-80,62,-54,-32,-22,-86,-70,88,-76,-46,28,40,-2,-84,68,-98,-16,90,36,-38,-86,20,-40,82,98,54}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{36,62,58,24,99,12,46,3,4,40,54,97,48,94,98,7,17,5,3,36,3}); List<Integer> param1 = new ArrayList<>(); param1.add(15); param1.add(7); param1.add(16); param1.add(13); param1.add(36); param1.add(8); param1.add(8); param1.add(41); param1.add(10); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,854
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING_1{ static int f_gold ( String str ) { int n = str . length ( ) ; int [ ] C = new int [ n ] ; boolean [ ] [ ] P = new boolean [ n ] [ n ] ; int i , j , k , L ; for ( i = 0 ; i < n ; i ++ ) { P [ i ] [ i ] = true ; } for ( L = 2 ; L <= n ; L ++ ) { for ( i = 0 ; i < n - L + 1 ; i ++ ) { j = i + L - 1 ; if ( L == 2 ) P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) ; else P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) && P [ i + 1 ] [ j - 1 ] ; } } for ( i = 0 ; i < n ; i ++ ) { if ( P [ 0 ] [ i ] == true ) C [ i ] = 0 ; else { C [ i ] = Integer . MAX_VALUE ; for ( j = 0 ; j < i ; j ++ ) { if ( P [ j + 1 ] [ i ] == true && 1 + C [ j ] < C [ i ] ) C [ i ] = 1 + C [ j ] ; } } } return C [ n - 1 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("YYGWgYrovdsh"); param0.add("56109778"); param0.add("101"); param0.add("RxM"); param0.add("187546405"); param0.add("0110010"); param0.add("wVODAmgvI"); param0.add("56719"); param0.add("10100011001100"); param0.add("Wtpai"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,855
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY{ static int f_gold ( int arr1 [ ] , int arr2 [ ] , int n ) { for ( int i = 0 ; i < n ; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i ; return n ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,6,7,10,11,12,12,16,17,29,32,33,35,35,45,49,52,56,57,58,61,62,63,64,68,71,71,77,79,79,81,82,82,83,83,89,89,93,94,94}); param0.add(new int[]{-48,-92,96,-18,10,-24,-4,96,-16,-78,4,-80,-96,-28,-78,68,2,-60,0}); param0.add(new int[]{1}); param0.add(new int[]{68,98,21,29,71,49}); param0.add(new int[]{-80,-76,-76,-76,-68,-66,-56,-44,-38,-28,-24,-10,8,14,16,18,24,26,30,32,50,64,76,80,90,94,94,94}); param0.add(new int[]{0,0,1,0,1,0,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,1,0,1,0,1,1,1,0,1}); param0.add(new int[]{3,7,16,17,20,22,29,32,34,34,35,40,40,40,41,46,49,58,60,62,63,64,64,68,70,73,76,79,83,86,90,92,99}); param0.add(new int[]{18,-68,-6,-32,-76,-86,-8,76,-46,20,-80,54,-88,-58,-48,-66,-66,18,-28,-74,-72,-26,-92,-78,24,-22,-80,-80,82,-2,-72,-88,-54,-84,-8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{74,75,52,58,34,53,51,45,34,28,53,94,10,20,23,12,95,78,48,11}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{3,12,13,14,15,17,18,19,22,24,28,29,33,37,41,42,44,49,51,51,52,53,56,56,59,60,64,64,67,70,71,78,83,88,88,90,92,93,93,95}); param1.add(new int[]{-38,-40,-50,50,-26,-80,64,54,74,-44,-40,-92,-16,4,-60,-42,-60,-74,38}); param1.add(new int[]{0}); param1.add(new int[]{97,90,25,89,57,41}); param1.add(new int[]{-90,-88,-66,-60,-48,-48,-46,-42,-40,-36,-26,-4,2,4,4,8,16,18,34,50,52,56,64,80,86,90,92,96}); param1.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,1}); param1.add(new int[]{4,4,7,13,23,23,25,25,26,34,38,39,39,45,48,50,52,54,58,59,60,65,72,76,80,80,80,84,87,90,92,94,96}); param1.add(new int[]{-30,96,92,-12,-14,-68,-16,20,74,-42,36,84,-82,66,44,70,-92,-56,-28,-68,-4,10,-4,90,72,84,68,14,32,60,40,60,-34,58,-56}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{62,56,17,1,11,30,59,18,99,21,86,49,24,85,25,56,21,66,23,96}); List<Integer> param2 = new ArrayList<>(); param2.add(36); param2.add(16); param2.add(0); param2.add(3); param2.add(14); param2.add(22); param2.add(26); param2.add(17); param2.add(24); param2.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,856
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_MEDIAN_ROW_WISE_SORTED_MATRIX.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MEDIAN_ROW_WISE_SORTED_MATRIX{ static int f_gold ( int m [ ] [ ] , int r , int c ) { int max = Integer . MIN_VALUE ; int min = Integer . MAX_VALUE ; for ( int i = 0 ; i < r ; i ++ ) { if ( m [ i ] [ 0 ] < min ) min = m [ i ] [ 0 ] ; if ( m [ i ] [ c - 1 ] > max ) max = m [ i ] [ c - 1 ] ; } int desired = ( r * c + 1 ) / 2 ; while ( min < max ) { int mid = min + ( max - min ) / 2 ; int place = 0 ; int get = 0 ; for ( int i = 0 ; i < r ; ++ i ) { get = Arrays . binarySearch ( m [ i ] , mid ) ; if ( get < 0 ) get = Math . abs ( get ) - 1 ; else { while ( get < m [ i ] . length && m [ i ] [ get ] == mid ) get += 1 ; } place = place + get ; } if ( place < desired ) min = mid + 1 ; else max = mid ; } return min ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ] [ ]> param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,3,5}, new int[]{2,6,9}, new int[]{3,6,9}}); param0.add(new int[][]{new int[]{7,22,92,20,32,19,28,89,86,66,85,70,97,42,54,67,64,24,12,69},new int[]{86,84,97,68,26,16,84,19,31,3,79,55,11,16,47,39,52,1,32,72},new int[]{19,59,90,41,85,86,11,71,70,25,96,33,95,16,36,17,45,26,23,45},new int[]{47,56,11,30,25,98,21,2,67,5,45,66,95,64,23,78,18,75,58,60},new int[]{15,85,69,67,82,8,38,26,96,64,77,64,74,1,42,11,69,1,65,83},new int[]{50,69,76,92,60,37,23,5,87,88,81,4,17,30,54,89,81,78,23,24},new int[]{17,59,52,46,81,78,59,79,19,69,17,97,6,25,47,17,33,11,33,28},new int[]{41,59,5,85,30,46,90,56,3,85,12,7,26,44,56,55,13,78,25,81},new int[]{16,92,41,82,4,40,51,81,55,33,39,24,83,63,60,98,94,52,49,95},new int[]{66,41,15,57,49,59,74,6,97,64,23,42,69,40,31,14,70,97,45,96},new int[]{12,39,22,78,35,88,99,79,13,40,21,58,67,72,14,63,10,97,72,56},new int[]{4,55,9,61,65,61,56,87,77,93,53,44,56,94,39,23,21,77,95,13},new int[]{59,26,88,89,47,4,85,71,70,70,43,39,31,73,2,85,7,1,7,9},new int[]{89,48,55,77,95,60,70,78,58,49,30,22,4,93,66,30,24,80,25,65},new int[]{76,16,55,27,93,93,68,60,58,96,57,48,41,68,34,34,2,92,1,87},new int[]{37,83,59,91,43,59,76,65,13,1,45,74,14,40,22,46,84,47,59,92},new int[]{12,57,80,65,18,68,70,58,51,62,62,35,76,27,56,29,43,17,37,40},new int[]{91,57,6,59,59,71,43,84,74,15,15,87,10,68,33,76,9,27,62,11},new int[]{96,15,71,90,8,69,66,2,74,17,77,9,80,71,76,4,31,96,3,41},new int[]{7,66,75,50,60,71,47,57,84,22,22,89,18,74,62,12,29,3,53,26}}); param0.add(new int[][]{new int[]{99,84,78,41,13,40,92,51,96,2,36,14,26,66,11,73,50,71,35,81,90,29,38,33,75,98,6,18,31,79,94,77,5,84,40,47},new int[]{63,82,43,2,76,20,24,73,35,55,52,95,45,47,93,51,29,68,50,14,28,58,33,72,51,1,68,29,35,18,44,55,36,19,49,21},new int[]{53,80,70,90,1,82,1,27,19,99,90,52,79,70,63,95,98,81,67,84,2,37,53,73,87,97,39,31,19,42,51,68,34,54,58,15},new int[]{29,57,6,46,71,27,89,1,73,22,22,53,66,70,93,65,55,81,96,44,37,38,68,5,23,60,42,81,98,24,42,48,98,99,6,67},new int[]{16,29,74,58,93,95,3,22,65,31,5,91,38,20,65,87,64,68,30,68,7,61,92,52,31,17,78,19,7,23,66,54,76,43,11,29},new int[]{35,61,28,58,96,7,17,66,22,28,57,2,92,84,61,75,45,21,82,56,60,95,67,36,41,19,48,7,94,75,11,81,61,96,4,56},new int[]{6,62,30,59,43,61,56,58,59,77,65,60,53,11,80,49,42,89,62,66,91,20,94,17,89,44,16,58,21,53,82,10,6,17,12,42},new int[]{60,33,36,94,23,3,73,67,62,46,9,83,22,78,50,95,98,54,53,87,33,41,92,21,26,10,64,23,67,10,1,28,77,39,78,58},new int[]{38,65,2,70,18,52,54,18,22,47,76,75,73,28,42,39,19,20,68,27,65,91,46,64,64,57,50,92,99,1,3,4,27,37,23,27},new int[]{89,82,2,10,44,98,90,27,96,37,75,49,29,77,8,88,60,93,65,77,54,25,7,22,97,15,3,55,8,48,65,76,95,92,83,82},new int[]{52,77,99,38,22,57,13,36,54,47,47,70,72,88,80,83,38,48,67,22,22,62,87,1,86,63,80,42,67,2,61,61,10,36,57,16},new int[]{13,34,22,19,18,48,10,83,27,14,12,76,86,9,35,14,24,67,90,46,26,46,99,71,29,5,30,12,89,61,14,31,43,76,62,52},new int[]{67,89,45,23,94,5,58,97,40,12,94,17,15,43,67,75,14,59,81,96,35,30,69,13,98,21,90,38,56,70,68,82,95,24,73,27},new int[]{8,90,77,64,57,5,19,52,78,45,37,96,15,58,27,81,98,91,91,8,48,26,78,9,76,15,98,86,12,89,33,4,5,16,53,45},new int[]{68,19,13,3,5,15,91,33,84,41,34,17,41,58,7,44,37,44,37,15,98,3,66,98,60,99,63,84,17,95,81,74,87,30,37,44},new int[]{66,41,60,70,13,56,24,3,64,29,16,88,4,71,54,20,79,73,57,99,67,56,89,64,67,15,75,88,70,21,78,27,77,87,66,95},new int[]{77,16,1,66,96,66,4,66,4,77,45,1,57,67,15,67,97,14,10,87,43,8,1,45,92,75,73,43,11,41,65,40,52,67,87,83},new int[]{45,9,70,80,45,83,19,3,44,13,26,20,64,23,83,31,70,99,51,6,17,65,92,44,61,95,16,68,67,7,60,23,68,20,77,72},new int[]{36,98,68,26,35,53,20,10,70,94,3,84,46,67,80,4,40,39,17,29,4,74,73,75,65,95,17,64,47,18,71,26,24,33,90,29},new int[]{88,46,76,92,26,41,25,15,95,34,51,72,27,4,76,95,85,20,48,53,63,17,95,79,32,66,92,85,50,13,97,27,26,53,34,82},new int[]{74,83,57,12,88,65,9,93,45,92,99,82,44,48,19,86,82,54,76,73,36,15,9,9,46,31,55,70,58,15,40,10,1,72,24,85},new int[]{64,48,94,50,3,70,64,25,56,41,59,33,75,12,1,68,69,99,59,75,30,33,40,85,22,25,98,4,12,4,23,70,58,97,35,58},new int[]{97,6,7,21,15,66,87,67,12,49,79,62,33,61,13,13,59,28,77,24,30,4,13,76,1,44,49,81,24,34,39,42,7,23,21,43},new int[]{60,24,67,93,28,66,4,81,84,36,57,90,57,86,19,31,42,60,89,30,48,73,30,41,32,59,48,79,99,65,21,36,67,79,88,16},new int[]{58,7,80,28,50,12,25,30,72,11,60,42,55,36,49,46,94,70,35,94,14,37,92,40,52,41,5,21,55,49,61,6,51,61,62,24},new int[]{52,16,7,42,90,21,48,60,82,17,21,52,6,19,66,19,22,80,25,44,11,76,28,66,38,76,25,2,33,13,56,52,45,50,59,64},new int[]{88,84,84,47,12,45,37,8,97,31,29,18,56,20,72,46,88,1,58,67,75,42,43,3,21,69,65,78,68,19,47,20,7,60,48,9},new int[]{34,42,13,68,36,19,81,60,89,14,5,7,78,97,76,52,4,52,56,6,65,84,90,87,76,13,59,57,82,95,46,53,28,69,39,20},new int[]{20,98,50,14,15,36,30,18,98,26,83,64,68,91,55,67,44,59,12,36,2,42,34,31,69,20,38,75,95,89,4,85,62,1,42,51},new int[]{37,43,92,62,51,53,1,64,16,2,2,58,17,86,80,77,7,62,17,21,95,79,64,43,87,53,41,26,94,75,26,70,67,89,79,59},new int[]{21,42,70,23,57,53,76,27,62,79,72,25,43,48,61,19,35,21,18,93,91,40,74,53,5,22,56,14,40,1,77,27,49,58,81,72},new int[]{92,26,20,83,14,25,36,28,8,49,97,6,89,1,94,5,73,8,88,89,41,72,85,19,3,39,16,65,74,70,69,17,21,93,62,31},new int[]{3,38,60,92,92,65,76,16,89,82,8,70,51,50,73,18,94,84,82,29,75,82,33,3,92,5,80,59,4,18,27,18,66,6,99,83},new int[]{93,11,38,65,59,54,21,99,8,67,15,81,92,61,51,41,78,17,39,20,39,70,70,77,35,99,27,32,98,3,32,71,34,21,29,4},new int[]{68,1,31,45,81,71,52,44,50,36,21,23,77,34,69,31,12,28,48,28,7,34,86,51,88,78,80,11,94,38,42,7,46,45,3,79},new int[]{57,30,97,52,81,54,48,84,33,91,20,98,95,5,82,83,17,87,2,24,51,48,44,1,52,22,14,77,76,71,66,67,40,36,77,58}}); param0.add(new int[][]{new int[]{37,14,64,26,40,7,92,8,79,5,97,43,36,59,3,62,22,22,96,38,50,87,53,85,4,79,21,20,84,25,45,64,61,53,95,68},new int[]{56,93,99,94,58,73,37,5,18,33,13,33,40,66,12,93,93,47,48,23,40,5,36,31,23,16,72,9,54,66,18,47,83,37,40,72},new int[]{81,69,72,74,3,67,95,91,92,38,27,16,15,72,49,28,79,60,24,69,70,60,55,5,25,40,7,31,61,3,52,82,64,93,65,56},new int[]{29,59,40,33,88,35,71,97,68,35,34,74,74,20,44,81,41,77,7,94,22,11,13,23,74,28,17,47,94,22,49,40,84,6,82,95},new int[]{26,47,66,45,31,50,13,38,99,25,96,29,35,28,83,19,7,49,83,72,14,99,8,66,64,93,24,15,72,3,11,71,39,5,21,22},new int[]{96,38,7,90,91,53,53,43,51,4,18,2,58,33,65,94,63,89,90,31,80,68,13,27,57,14,52,63,80,73,94,9,39,91,7,57},new int[]{55,7,83,80,16,47,98,63,93,96,79,33,21,95,39,29,16,45,87,71,32,43,30,10,15,13,58,86,23,53,34,70,45,32,53,76},new int[]{31,44,79,76,99,65,25,10,33,57,42,52,63,15,8,38,28,72,88,2,3,25,34,36,81,52,19,93,62,52,83,30,11,9,98,20},new int[]{4,69,53,77,68,10,66,55,10,47,66,80,71,73,24,73,46,93,8,12,2,9,71,29,96,84,23,89,79,33,94,16,9,74,36,55},new int[]{32,47,14,35,14,1,51,88,76,48,58,41,73,13,57,26,15,80,10,17,10,47,10,61,35,8,10,71,98,65,69,81,48,20,68,46},new int[]{98,36,1,50,60,29,20,29,16,80,40,88,17,91,73,20,46,24,42,85,81,50,31,14,37,13,93,97,85,43,6,79,14,32,63,9},new int[]{46,74,83,67,32,1,16,32,66,83,47,79,5,14,69,11,27,39,7,2,49,42,23,21,87,1,29,51,35,35,37,47,18,97,6,74},new int[]{28,58,76,68,25,71,38,84,55,44,23,59,72,81,29,48,99,54,26,10,75,79,82,68,91,69,70,10,19,76,59,24,80,73,77,18},new int[]{32,19,38,21,56,85,57,49,6,55,2,6,81,30,55,11,25,35,73,89,8,67,90,86,24,21,16,46,36,10,66,97,91,17,75,73},new int[]{57,10,75,79,66,17,75,32,69,18,46,46,2,27,8,92,28,56,49,69,94,91,27,89,27,12,4,52,57,34,50,24,36,53,17,32},new int[]{54,60,55,62,59,76,6,32,2,16,55,91,68,28,80,23,47,10,61,82,99,53,68,85,59,90,16,36,19,21,99,39,37,57,21,85},new int[]{13,1,35,97,50,53,9,95,86,57,6,48,59,91,87,94,67,84,22,21,15,49,79,50,47,79,69,41,84,22,92,91,77,62,78,10},new int[]{74,19,91,88,43,65,27,8,54,81,28,44,91,97,24,65,8,2,18,79,61,42,40,4,64,39,79,90,77,10,34,91,27,45,88,95},new int[]{10,77,83,37,3,15,62,9,67,4,29,29,31,60,22,82,66,44,35,12,22,90,89,32,9,64,59,74,64,99,48,53,32,54,41,67},new int[]{55,94,35,58,69,94,1,9,49,68,46,84,88,37,77,77,19,81,20,39,15,97,93,72,21,54,10,49,1,32,88,14,28,40,52,27},new int[]{15,61,89,62,1,4,39,27,31,51,84,42,63,88,81,30,7,54,97,59,68,72,66,29,59,34,53,81,40,58,84,29,70,84,91,70},new int[]{49,6,7,36,70,98,1,94,22,81,42,84,32,32,6,6,72,11,29,33,1,91,72,77,37,37,93,26,41,90,96,42,60,88,3,13},new int[]{11,57,69,65,98,32,13,17,66,21,85,70,54,94,15,15,9,76,71,88,21,9,96,66,71,2,56,12,56,79,99,51,70,59,71,11},new int[]{3,34,95,85,93,19,7,11,63,67,56,43,56,45,60,33,28,96,57,52,4,99,17,35,42,60,26,48,64,17,98,72,73,7,65,52},new int[]{41,16,66,72,86,56,27,18,63,80,26,22,58,1,96,46,86,27,44,33,94,83,33,54,25,6,48,93,60,62,15,76,59,38,15,31},new int[]{65,20,29,75,73,16,80,33,55,19,89,50,34,64,24,32,3,13,94,87,94,12,62,45,24,24,94,81,15,50,88,96,88,67,45,65},new int[]{20,21,12,85,83,19,2,33,37,10,32,94,81,30,14,5,36,77,58,80,13,93,88,18,8,69,48,78,3,70,17,51,57,43,42,29},new int[]{86,98,55,70,43,60,41,91,49,78,84,27,3,81,68,42,77,54,1,21,67,47,89,59,1,14,98,40,67,9,69,25,64,60,33,5},new int[]{76,52,75,33,16,3,5,62,19,11,85,73,18,12,43,87,50,40,77,35,57,56,28,62,99,87,15,8,15,65,35,58,76,9,39,97},new int[]{21,95,60,94,43,63,42,83,34,17,98,65,25,99,58,10,97,78,6,50,20,46,76,91,11,79,28,2,64,14,69,74,78,82,98,81},new int[]{28,38,95,33,54,60,4,54,87,21,25,51,15,78,13,61,97,21,44,61,24,89,35,23,68,55,21,24,90,61,89,8,70,62,98,3},new int[]{16,6,21,3,65,71,24,20,34,46,72,89,38,28,37,61,25,76,43,20,82,33,33,39,12,78,20,18,74,17,5,64,28,33,38,85},new int[]{39,92,65,3,77,26,70,89,35,19,50,35,86,11,89,26,10,46,28,83,19,36,18,26,49,55,8,5,72,30,8,36,74,27,15,84},new int[]{38,82,39,76,43,82,35,51,38,91,72,35,52,96,9,44,8,72,1,25,71,32,62,10,86,17,11,47,56,41,16,25,30,76,41,61},new int[]{49,90,90,76,42,63,95,26,38,28,70,1,66,91,42,8,50,10,73,52,11,4,30,37,91,17,9,6,93,69,49,1,18,14,12,68},new int[]{72,70,60,84,87,81,65,53,39,49,78,2,16,48,45,26,11,55,97,13,27,62,12,63,3,4,15,92,47,78,24,41,70,75,93,16}}); param0.add(new int[][]{new int[]{82,57,41,47,46,74,62,36,30,15,18,29,58,93,22,55,23,93,44,70,60,88,5,87,34,12,75,67,88,93,41,95,8,2},new int[]{93,58,37,80,60,41,72,36,78,76,91,19,51,54,77,29,67,8,61,56,78,7,68,21,45,12,95,73,7,45,35,40,11,42},new int[]{2,34,54,99,80,51,32,79,74,12,13,30,86,71,80,45,97,87,97,70,46,32,83,36,30,3,37,82,98,80,4,68,43,7},new int[]{82,43,37,99,66,46,69,3,35,15,80,27,76,69,53,67,75,39,6,14,87,4,16,7,27,67,3,32,48,68,10,1,18,94},new int[]{28,43,80,22,64,30,41,39,74,25,11,87,22,20,5,22,81,18,79,94,76,2,3,44,78,36,37,78,23,53,79,62,71,58},new int[]{33,57,49,38,76,51,58,24,78,42,71,20,93,44,54,47,7,5,97,52,77,32,27,50,66,77,38,56,63,30,46,70,67,51},new int[]{94,59,83,59,50,80,68,52,45,9,64,8,49,55,90,9,12,92,69,80,19,87,8,18,26,43,26,79,14,7,89,2,48,70},new int[]{73,56,21,75,7,96,40,27,77,2,13,4,68,26,87,20,94,89,57,27,64,20,80,4,73,71,47,20,41,61,96,65,73,40},new int[]{83,40,98,54,98,23,65,36,56,87,64,93,87,47,87,42,27,91,91,23,87,85,71,85,45,84,32,39,54,44,64,70,82,6},new int[]{8,66,40,63,84,42,77,72,90,62,74,73,92,7,1,97,43,13,98,11,93,91,35,38,89,45,51,15,59,66,14,14,41,24},new int[]{5,34,32,92,46,77,16,85,22,87,32,76,41,22,53,23,35,89,43,62,45,94,57,94,67,55,31,54,36,35,14,22,15,87},new int[]{72,50,24,42,40,49,97,71,9,98,43,62,20,19,96,21,90,9,61,34,70,33,79,82,87,59,71,14,78,53,54,84,98,94},new int[]{44,29,7,94,94,46,90,69,89,94,34,46,19,30,8,86,94,18,87,60,88,44,52,80,8,13,42,78,20,96,35,72,66,87},new int[]{49,66,92,69,89,1,51,86,71,54,87,88,26,78,95,91,22,49,46,17,94,60,85,8,61,61,2,48,46,61,6,13,29,63},new int[]{99,94,46,34,84,15,74,24,82,3,28,50,76,97,16,49,42,3,33,88,1,51,78,9,99,16,73,76,31,49,6,30,45,89},new int[]{29,52,29,86,68,73,85,11,77,20,74,57,87,96,88,44,11,33,91,59,87,68,49,15,3,67,89,86,11,75,55,8,37,28},new int[]{20,22,58,46,75,23,98,34,50,47,88,49,3,30,23,65,18,52,67,88,25,2,58,86,73,54,16,63,43,44,16,79,7,27},new int[]{18,7,86,62,61,62,62,13,59,83,26,17,17,16,57,13,69,98,19,93,93,91,76,54,69,61,94,49,29,59,23,61,1,69},new int[]{48,4,11,43,14,32,56,77,96,50,62,9,31,51,50,81,77,30,26,11,3,54,83,22,49,55,86,63,96,71,64,88,73,47},new int[]{89,86,24,44,7,53,23,65,37,69,23,42,85,15,66,85,18,40,18,18,79,59,75,76,65,99,32,63,10,12,87,91,1,97},new int[]{19,23,11,49,68,67,75,48,9,24,39,9,15,1,75,23,9,6,12,54,15,3,1,13,97,75,62,80,3,16,32,90,28,91},new int[]{81,48,48,27,12,35,19,97,17,9,46,12,33,79,29,13,67,99,58,85,99,99,95,77,96,63,82,18,10,80,87,31,53,98},new int[]{44,29,49,80,57,94,89,37,48,83,96,59,12,15,56,79,84,60,70,19,53,29,62,27,99,97,83,40,36,69,20,98,48,71},new int[]{98,55,58,92,39,86,41,50,59,56,53,63,41,30,55,85,61,40,73,36,13,46,97,90,1,60,2,36,45,94,80,9,15,39},new int[]{55,59,86,79,4,16,11,96,22,65,54,90,3,96,97,97,66,86,57,12,66,8,81,4,44,65,6,62,40,86,35,50,40,11},new int[]{66,18,73,70,34,12,21,60,90,10,16,79,23,21,61,43,16,58,11,84,21,16,75,33,86,89,33,98,15,65,4,81,92,32},new int[]{8,36,83,56,88,3,14,96,76,95,34,95,36,96,35,32,80,1,52,13,75,75,25,64,5,63,85,99,76,52,46,77,67,76},new int[]{47,34,20,39,52,50,68,41,43,49,71,47,57,67,46,41,77,29,41,85,46,25,3,30,86,2,9,58,4,72,19,85,14,1},new int[]{20,83,80,74,66,65,8,9,39,64,57,82,15,80,85,25,88,16,49,73,79,48,77,60,61,44,24,51,33,12,10,31,56,4},new int[]{36,10,67,22,85,38,46,67,29,51,60,59,5,3,64,94,47,40,8,56,77,54,84,77,6,74,53,26,70,26,28,76,53,61},new int[]{40,68,88,15,88,13,67,91,45,79,26,56,23,39,97,21,14,13,32,12,63,52,74,22,47,25,93,71,35,93,80,72,51,59},new int[]{73,20,19,16,62,29,98,92,34,81,4,55,52,98,30,59,64,38,30,95,43,96,56,98,82,6,3,40,78,38,17,51,27,37},new int[]{26,78,60,88,21,65,62,42,96,63,75,58,81,62,67,29,19,97,5,66,9,41,25,84,75,12,65,88,81,16,55,38,43,8},new int[]{53,61,88,70,46,9,67,23,31,34,35,48,81,21,67,38,53,35,98,14,80,58,68,73,38,15,54,65,10,11,95,36,98,57}}); param0.add(new int[][]{new int[]{37,18,39,36},new int[]{40,7,76,19},new int[]{37,8,74,36},new int[]{71,92,41,43}}); param0.add(new int[][]{new int[]{65,54,93,86,22,47,45,88,25,20,30,51,71,3,70,80,77,7,29,55,75,2,88,26,45,54,38,9,70,54,47,94,78,48,78,78,24},new int[]{82,2,96,90,31,21,93,78,64,49,47,1,34,32,63,63,52,39,76,48,3,14,86,26,35,87,4,45,26,53,64,26,90,94,29,96,61},new int[]{14,93,53,59,69,30,22,96,81,94,6,5,41,86,47,23,77,53,40,61,80,14,22,68,81,3,67,73,38,7,13,96,55,2,37,77,93},new int[]{77,50,20,49,11,50,41,73,4,43,79,31,2,12,85,30,44,87,75,36,25,71,50,72,22,36,3,78,27,90,7,37,55,44,72,60,59},new int[]{52,4,2,17,85,84,30,48,2,79,66,27,21,89,93,5,65,25,25,48,11,97,19,18,7,87,4,21,41,77,91,6,77,63,18,27,87},new int[]{46,46,95,85,89,45,43,80,50,80,21,33,92,30,1,69,33,75,72,95,85,89,18,12,12,99,64,29,78,77,19,84,2,12,44,74,36},new int[]{17,7,18,13,77,60,12,79,48,51,67,60,10,23,4,25,65,61,69,69,47,27,62,71,49,61,88,87,72,30,31,16,92,65,11,62,38},new int[]{87,96,96,93,95,59,19,9,96,95,69,23,55,85,20,13,57,20,47,77,7,34,56,53,53,81,63,30,68,4,37,39,36,15,86,75,36},new int[]{96,19,16,74,81,43,6,97,84,14,28,6,19,6,5,66,48,70,14,78,94,45,40,88,30,75,78,22,3,29,48,8,49,7,24,5,84},new int[]{64,5,49,70,92,15,59,90,21,85,9,47,41,56,74,48,62,89,85,98,31,66,16,35,49,31,76,54,23,17,14,97,48,48,6,23,48},new int[]{49,61,31,5,67,38,28,31,58,54,17,22,64,13,44,85,47,85,6,10,58,40,14,23,71,88,15,87,5,41,20,52,10,87,27,51,60},new int[]{95,6,77,28,16,17,46,95,10,31,59,39,6,84,49,21,16,25,39,36,34,72,14,57,49,87,76,84,60,88,77,33,34,32,55,29,27},new int[]{77,86,71,71,93,14,2,7,81,33,22,14,54,1,72,41,8,29,81,91,45,8,6,51,94,23,79,60,41,14,27,67,12,67,40,65,17},new int[]{18,10,59,12,17,22,14,41,8,17,79,6,71,50,96,43,9,84,42,45,39,66,64,82,61,38,66,79,11,3,9,43,87,63,10,88,32},new int[]{68,7,93,45,46,60,29,64,73,46,2,3,92,84,42,68,62,30,31,41,22,73,9,31,16,35,22,52,59,95,13,92,51,39,59,39,71},new int[]{89,48,65,50,46,35,63,75,98,82,31,60,16,51,94,55,37,25,28,24,98,21,11,53,91,73,16,11,14,43,79,86,42,86,89,86,67},new int[]{30,65,45,3,47,81,97,77,61,56,8,32,57,26,70,76,8,93,20,13,45,8,18,26,84,33,8,76,66,16,43,11,81,94,44,8,87},new int[]{74,70,65,75,87,67,78,77,20,99,49,15,5,53,41,85,49,75,71,76,68,23,26,48,60,66,16,98,75,87,51,23,51,55,94,45,84},new int[]{80,11,46,95,88,58,26,66,57,79,45,22,26,49,68,6,22,38,23,64,89,67,20,33,20,70,76,44,83,25,49,82,15,27,88,21,79},new int[]{26,10,67,93,38,55,69,88,69,32,90,48,27,76,32,36,55,70,13,50,95,18,29,10,39,3,82,48,93,42,47,26,32,27,75,70,95},new int[]{8,88,18,73,22,63,50,74,1,3,90,56,7,27,15,87,85,77,32,49,84,69,32,53,28,92,76,70,90,81,36,62,10,90,80,96,80},new int[]{14,25,65,39,43,80,97,86,92,50,23,2,15,44,44,63,37,5,32,87,23,97,70,48,33,20,2,84,87,90,54,26,2,66,97,74,28},new int[]{15,82,91,52,39,76,14,31,73,46,40,59,26,91,16,2,81,93,96,63,25,67,41,55,99,3,27,14,33,85,10,53,81,71,91,95,40},new int[]{98,24,10,49,28,33,47,13,44,93,27,75,74,29,78,85,40,89,7,79,72,86,77,39,25,28,51,80,71,49,57,70,15,99,2,12,78},new int[]{53,60,66,43,34,28,5,35,16,38,99,46,44,44,5,46,46,77,65,29,2,63,81,36,38,88,18,8,28,4,38,82,64,72,58,63,20},new int[]{60,35,81,37,75,63,35,52,18,57,20,59,68,26,13,21,88,95,55,42,83,97,99,23,70,44,26,65,76,51,74,90,27,37,40,27,65},new int[]{60,56,78,52,53,14,32,96,83,72,35,49,14,59,5,95,32,88,22,61,21,33,79,51,48,15,3,94,57,56,62,18,72,83,56,48,91},new int[]{5,90,14,41,60,50,63,65,32,91,18,18,41,75,70,51,93,36,5,34,15,9,97,81,11,42,63,41,61,30,13,75,7,58,42,64,45},new int[]{85,71,22,96,4,79,39,85,41,41,41,28,43,64,6,66,31,91,9,1,15,23,17,58,71,67,98,53,83,30,10,55,42,48,82,23,87},new int[]{4,99,73,75,65,10,95,14,92,36,88,28,59,4,78,69,96,17,98,37,62,90,31,92,28,93,53,36,26,86,99,28,61,22,50,35,82},new int[]{69,93,11,88,38,59,45,44,25,16,20,54,13,35,12,63,4,36,94,93,82,93,9,74,10,53,8,59,19,44,44,34,53,3,87,2,60},new int[]{46,15,99,7,61,35,35,69,49,83,95,2,34,13,64,35,98,78,35,26,44,7,39,85,79,13,84,98,90,4,98,84,19,31,83,43,64},new int[]{2,90,22,81,88,76,22,84,67,15,43,14,74,20,23,54,73,62,62,64,74,53,61,53,3,12,20,25,89,28,16,51,40,21,71,76,99},new int[]{82,82,11,32,97,47,45,97,79,18,86,6,59,86,6,15,94,61,30,46,96,84,17,93,75,84,84,8,50,17,57,58,76,96,86,27,58},new int[]{51,47,57,50,90,31,29,95,24,63,68,78,77,23,8,13,1,63,27,81,41,9,27,90,21,46,48,68,14,42,59,75,62,4,59,34,5},new int[]{32,80,92,66,35,8,57,25,23,36,25,17,63,64,90,37,85,5,24,74,66,90,73,48,30,39,63,96,57,72,61,3,4,89,49,91,16},new int[]{23,26,79,26,25,42,75,77,44,1,36,95,22,5,19,95,87,61,86,57,95,21,67,53,60,61,75,12,42,89,48,85,71,95,75,65,78}}); param0.add(new int[][]{new int[]{69,40,56,69,66,38,70,81,5,78,60,47,92,76,97,40,24,18,75,89,83,68,62,7,82,15,79,66,36,59,71,29,25,55,21,49,12,8,85,41,24,36,2},new int[]{29,13,89,7,40,59,58,11,29,17,13,9,94,42,9,21,78,27,55,35,91,40,89,12,72,29,5,60,19,35,46,46,45,39,41,89,18,59,87,30,65,90,84},new int[]{41,85,55,59,45,84,67,17,91,82,74,20,23,64,8,65,60,7,4,28,19,6,26,40,19,81,93,21,5,17,38,62,40,7,27,31,98,62,26,70,31,12,15},new int[]{58,1,62,59,90,37,6,24,47,64,36,83,56,82,80,17,11,4,80,9,87,74,90,39,67,84,81,47,28,1,36,89,97,50,85,94,77,39,50,23,53,6,83},new int[]{10,16,77,22,66,42,90,5,94,37,86,51,82,93,19,4,72,27,55,93,97,7,61,99,68,26,59,77,75,39,34,25,85,36,66,89,96,65,97,6,13,17,80},new int[]{38,86,43,41,71,2,1,19,16,34,93,72,90,11,74,68,51,98,49,23,2,97,32,54,20,77,67,93,18,70,14,68,90,76,61,38,58,92,41,6,4,72,44},new int[]{95,96,4,28,7,9,67,53,97,20,19,16,3,6,93,54,98,78,26,34,9,55,33,60,19,73,39,6,23,57,9,90,10,70,14,17,68,78,24,13,59,65,38},new int[]{97,17,14,81,46,16,71,47,76,23,6,38,30,22,1,67,40,1,97,48,39,44,49,61,75,54,96,19,21,75,86,19,28,96,90,19,15,5,12,23,49,81,11},new int[]{95,41,58,72,40,22,96,10,39,51,45,70,99,75,18,97,41,77,69,53,64,46,25,68,47,29,24,85,58,75,27,48,41,74,11,43,73,3,49,49,44,6,48},new int[]{89,71,27,50,86,83,94,86,23,76,66,29,93,14,73,90,29,5,86,59,93,77,18,71,77,61,48,85,92,44,38,3,28,54,45,86,43,33,13,41,57,5,8},new int[]{66,44,43,81,4,19,34,62,81,89,5,81,11,58,16,80,70,82,3,18,7,75,47,15,62,78,23,36,17,22,24,27,17,23,71,1,50,63,50,91,98,37,15},new int[]{56,82,56,68,29,87,43,86,20,86,12,99,90,14,61,84,76,61,9,97,88,73,24,94,69,8,79,45,53,20,58,79,86,96,70,33,61,11,92,3,49,57,67},new int[]{29,11,55,96,50,15,4,32,52,62,98,74,94,41,82,17,5,72,69,81,39,91,32,7,86,76,50,88,49,43,17,71,81,20,91,45,74,70,48,32,8,44,62},new int[]{83,83,22,35,28,33,6,12,97,50,98,61,50,76,37,67,61,92,11,80,54,67,86,58,49,79,99,84,43,68,93,84,29,14,1,18,81,15,89,13,97,24,34},new int[]{11,62,47,25,32,65,29,41,75,22,76,1,16,16,3,94,3,99,52,31,35,50,76,94,89,23,81,65,81,59,35,63,18,10,47,33,6,21,47,30,90,71,21},new int[]{45,97,50,3,76,33,88,71,58,72,47,37,54,35,63,7,4,34,39,86,33,75,9,15,92,30,44,23,68,78,83,88,57,45,71,18,45,49,15,47,5,62,84},new int[]{7,74,65,98,87,94,40,83,57,33,98,80,34,30,24,96,36,16,83,58,3,81,31,3,12,38,46,94,62,70,77,53,34,5,86,73,33,27,12,18,47,42,73},new int[]{89,30,37,42,16,27,23,70,95,78,27,17,6,78,83,10,45,56,31,91,40,3,47,92,24,11,75,31,47,78,43,11,56,6,1,76,2,36,73,80,41,98,65},new int[]{33,66,93,73,8,92,3,44,11,1,48,70,42,77,45,91,87,34,32,61,93,6,78,78,97,88,62,35,11,14,45,26,90,40,34,79,92,95,66,22,41,59,99},new int[]{82,32,35,70,4,94,76,8,53,85,31,22,14,73,33,16,18,16,30,12,14,94,85,6,24,13,52,92,81,74,77,97,71,69,97,98,14,85,82,78,91,39,48},new int[]{26,28,65,13,99,86,45,3,50,85,1,99,52,38,10,88,63,52,8,58,49,4,34,32,25,31,10,35,40,77,60,78,68,3,67,3,64,48,53,8,47,61,27},new int[]{73,70,20,10,28,68,52,2,38,1,43,58,64,3,69,8,16,76,84,14,92,33,43,42,46,47,88,2,70,33,69,59,44,88,28,48,64,97,58,18,89,37,29},new int[]{52,61,77,53,80,77,20,67,43,58,14,12,33,81,82,12,45,26,28,77,12,57,4,84,57,10,49,45,47,74,28,12,22,64,85,45,15,80,64,66,50,79,79},new int[]{87,82,93,43,33,93,37,17,26,43,58,9,21,65,63,73,27,78,36,59,95,46,99,30,82,17,81,52,47,92,88,37,99,92,14,36,35,58,50,6,62,62,38},new int[]{85,92,9,13,80,23,96,33,54,45,48,85,68,61,99,52,46,44,75,49,37,41,22,42,58,52,53,49,13,62,36,52,41,37,19,58,24,63,55,4,25,61,31},new int[]{21,94,5,68,96,5,16,91,12,65,66,72,43,98,25,98,46,1,78,32,61,29,48,83,94,23,69,87,99,53,71,95,78,91,87,26,71,21,88,81,60,55,73},new int[]{79,68,88,95,12,8,17,43,9,17,16,51,35,52,77,12,94,67,69,13,13,28,47,44,63,69,20,92,36,45,82,57,87,91,2,42,50,31,82,48,87,80,26},new int[]{25,35,86,73,34,45,23,91,74,16,4,54,95,68,53,14,80,83,3,42,67,50,20,55,66,84,53,26,19,63,33,98,28,48,53,56,49,78,63,14,29,53,26},new int[]{33,69,66,73,19,91,59,91,90,78,3,58,21,46,40,72,70,66,57,6,59,39,75,69,74,52,38,71,82,74,57,7,36,95,50,72,40,74,40,51,92,90,20},new int[]{2,87,23,81,41,57,21,39,26,95,72,51,71,21,58,50,23,77,42,42,92,40,27,96,20,62,13,42,66,43,83,49,79,91,12,40,74,92,68,4,92,42,93},new int[]{12,22,68,89,72,93,71,8,18,90,60,73,61,31,6,79,18,54,40,51,74,72,89,98,36,6,23,48,20,61,87,55,87,36,45,86,87,42,73,29,21,62,37},new int[]{37,30,67,33,61,48,43,80,28,20,43,74,28,8,88,65,17,60,20,13,13,31,22,15,79,98,47,36,96,13,84,25,53,86,67,41,29,41,68,82,54,40,21},new int[]{95,98,17,90,89,4,60,92,38,66,52,67,29,28,60,91,7,21,38,78,44,87,52,99,94,93,73,51,23,69,14,15,15,35,11,93,37,72,21,15,45,76,97},new int[]{8,24,32,71,25,46,81,95,10,50,56,72,1,9,48,26,10,90,58,45,18,59,57,67,28,81,15,35,42,25,13,66,99,57,61,86,82,85,11,57,43,47,42},new int[]{4,62,25,34,56,69,41,33,44,71,92,84,74,30,67,28,95,40,31,66,95,18,10,32,72,85,85,43,46,85,95,27,93,78,9,11,71,5,72,59,67,33,83},new int[]{47,32,41,9,11,35,12,12,98,50,51,36,98,30,41,3,98,49,55,32,79,8,51,49,73,90,63,22,38,94,33,14,69,10,44,25,84,52,75,51,51,34,16},new int[]{68,57,53,52,28,74,88,48,73,6,37,10,61,95,41,52,34,9,29,41,1,64,12,23,1,95,25,38,4,43,90,61,32,28,33,27,1,8,85,23,32,3,44},new int[]{54,6,70,49,59,57,89,61,56,41,14,83,77,37,41,30,92,42,36,56,71,83,78,26,84,14,39,96,60,94,28,44,45,18,30,70,70,3,7,34,82,65,27},new int[]{54,79,43,24,91,62,93,84,40,30,44,82,83,15,49,87,43,6,50,46,40,30,74,30,1,29,89,95,15,17,8,74,46,57,79,28,90,84,77,31,51,78,29},new int[]{78,14,84,41,35,5,64,79,56,77,1,7,12,96,21,76,36,33,4,51,49,73,39,71,18,59,23,20,31,89,67,53,54,62,20,25,94,51,21,48,99,54,99},new int[]{94,16,87,60,75,12,99,69,56,44,38,22,81,21,91,13,94,46,59,79,18,43,55,75,71,98,32,77,16,90,40,41,54,34,85,18,20,76,85,96,9,47,61},new int[]{11,11,28,81,97,98,24,21,35,37,11,32,26,18,76,20,34,91,54,98,65,79,14,43,27,67,2,76,63,51,98,93,87,49,73,15,1,37,10,21,35,50,34},new int[]{75,48,54,68,74,10,31,11,4,87,75,5,22,39,41,11,58,11,48,72,53,57,40,98,49,62,61,52,28,66,77,42,78,69,35,98,9,7,57,36,35,14,74}}); param0.add(new int[][]{new int[]{74,32,24,39,84,34,39,40,15,49,60,14,15,12,18,15,6},new int[]{61,8,50,18,95,67,24,95,91,88,40,24,56,45,12,39,91},new int[]{29,1,1,37,12,68,71,48,40,15,26,55,25,95,42,25,25},new int[]{25,17,75,21,58,16,97,7,75,5,98,79,25,8,1,62,33},new int[]{78,47,60,43,5,90,22,63,2,99,3,1,98,11,99,69,93},new int[]{17,1,33,46,30,77,52,9,72,75,3,48,26,84,53,12,66},new int[]{83,65,93,23,6,43,98,83,96,83,59,94,97,61,42,65,24},new int[]{35,25,15,27,15,16,62,56,22,87,65,17,59,11,2,93,58},new int[]{70,12,55,3,77,66,92,66,1,80,65,31,96,18,46,26,24},new int[]{41,30,8,68,46,60,46,89,90,74,1,95,62,46,19,3,86},new int[]{58,90,79,63,77,10,54,18,69,59,44,96,49,56,20,24,79},new int[]{40,58,23,41,59,14,43,11,86,99,31,17,82,53,46,78,25},new int[]{25,55,22,90,42,12,55,43,96,38,5,54,17,85,17,32,62},new int[]{34,59,69,90,4,84,95,72,70,81,89,4,14,81,60,79,89},new int[]{51,13,99,74,30,82,67,18,21,89,44,57,56,47,7,95,99},new int[]{69,73,65,19,41,96,66,82,17,58,99,68,47,65,14,77,16},new int[]{33,99,5,56,37,12,73,65,37,82,65,47,7,23,17,42,62}}); param0.add(new int[][]{new int[]{49,31,43,10,49,12,37,33,44,33,45,47,72,76,53,27,59,99,91,75,50,74,20,97,56,18,80,65,79,54,5,15,62,86,38,45,89,61,52,97,60,24,63,60},new int[]{10,46,68,6,73,44,78,92,82,31,35,35,19,33,95,89,59,47,71,68,2,89,25,34,53,25,22,37,1,32,79,48,78,7,67,66,57,36,93,74,13,83,44,82},new int[]{62,68,47,30,73,35,51,53,10,43,1,2,5,32,95,39,28,71,51,2,75,48,83,27,48,64,87,95,70,49,9,33,23,93,94,70,60,17,2,39,14,80,37,88},new int[]{68,29,90,19,18,92,92,31,12,85,32,68,23,58,13,17,95,22,73,6,73,66,59,62,8,48,9,99,21,38,76,41,3,24,28,61,55,42,73,4,91,3,75,73},new int[]{62,47,94,35,62,61,97,15,94,75,52,64,56,31,2,71,61,57,9,90,52,10,31,15,17,27,54,61,14,92,72,50,92,30,41,93,12,99,83,54,46,69,76,70},new int[]{5,88,18,25,58,56,28,49,88,87,65,78,83,38,97,70,34,23,91,14,86,38,78,86,45,61,9,75,76,89,2,9,50,45,35,96,62,78,93,57,83,46,69,81},new int[]{98,86,75,30,50,93,15,36,39,81,60,27,54,2,70,4,87,47,95,48,57,65,58,51,47,77,70,34,37,80,55,96,44,79,68,43,76,10,66,88,16,35,40,81},new int[]{72,93,62,34,42,95,81,4,63,23,11,23,61,69,52,61,96,5,17,87,34,94,91,97,16,95,4,52,20,48,96,98,51,45,80,93,49,93,56,3,42,71,42,85},new int[]{99,29,95,17,85,28,60,87,95,92,47,11,65,60,88,61,77,43,39,91,1,9,85,74,9,3,29,86,42,43,94,24,3,8,45,26,99,51,95,55,33,35,80,11},new int[]{49,79,25,78,73,10,87,45,6,28,13,77,64,30,5,71,55,90,87,52,28,24,97,77,49,98,77,95,93,95,48,31,24,94,71,20,2,82,76,58,54,85,39,19},new int[]{70,73,4,20,3,73,91,62,69,68,19,16,22,80,21,56,60,34,69,80,66,13,96,78,21,60,68,74,46,16,55,11,33,86,50,52,75,92,62,98,41,11,7,79},new int[]{84,16,29,5,85,64,15,6,49,87,51,42,93,65,5,73,79,97,24,37,53,6,39,75,89,62,82,86,60,41,78,10,81,93,70,7,5,27,35,55,17,7,61,65},new int[]{15,58,49,75,52,26,43,53,56,78,77,68,33,14,77,17,39,48,6,22,87,37,43,45,99,96,65,4,68,97,57,34,30,39,79,96,90,39,72,90,17,94,99,12},new int[]{6,29,14,1,91,39,6,97,44,41,95,32,97,84,5,47,17,33,42,23,70,50,29,64,4,7,79,62,59,21,16,70,13,8,97,61,3,46,62,23,8,20,30,75},new int[]{54,20,2,98,17,15,65,69,98,69,72,68,43,12,94,83,22,92,94,70,20,15,8,37,28,11,70,27,42,75,83,76,81,8,59,60,95,62,19,43,60,51,84,64},new int[]{66,70,91,48,18,20,73,67,40,18,12,83,26,97,33,6,58,57,9,10,44,53,27,81,52,84,64,54,13,31,81,49,75,27,13,46,51,43,79,86,89,19,29,87},new int[]{83,67,19,13,97,88,38,35,33,45,57,49,66,83,39,47,33,91,50,66,33,49,71,10,28,89,95,44,13,95,29,40,9,95,29,4,81,81,19,48,67,97,42,82},new int[]{85,58,88,59,16,95,60,67,17,64,33,71,22,7,97,5,13,94,10,14,71,31,4,48,63,4,78,79,57,35,98,14,77,24,23,53,80,99,27,98,85,8,33,92},new int[]{91,17,58,62,78,30,46,17,67,57,6,56,89,70,50,67,35,19,75,15,37,96,31,55,86,71,1,96,54,85,34,72,27,43,87,16,78,25,69,3,68,75,72,59},new int[]{97,61,86,15,61,12,63,24,71,24,78,62,13,10,65,5,98,47,8,51,78,37,81,43,86,57,44,65,49,39,76,30,93,80,66,51,79,46,8,6,59,5,78,68},new int[]{3,32,88,62,88,30,49,12,89,50,82,18,93,47,63,44,21,48,66,32,94,45,51,53,28,89,62,29,61,8,46,31,66,62,18,55,85,37,86,30,83,21,78,13},new int[]{99,19,4,21,24,45,13,22,87,49,48,17,20,32,50,62,15,42,11,37,68,38,81,61,61,93,15,28,87,67,21,29,61,16,43,24,96,31,98,85,13,25,6,86},new int[]{79,43,82,95,51,75,89,41,89,82,35,44,14,56,84,58,43,59,55,37,34,46,48,90,40,20,42,72,64,23,51,99,12,51,3,7,37,20,88,58,89,19,27,77},new int[]{86,36,60,23,84,30,83,91,39,66,34,9,85,84,72,50,85,80,1,2,69,35,74,45,10,63,26,79,3,79,46,39,80,50,60,87,19,10,4,97,39,77,75,43},new int[]{72,93,98,37,85,18,29,94,46,50,17,23,6,91,35,37,89,49,3,40,60,35,40,59,4,41,55,5,65,31,60,43,9,91,58,16,70,88,89,34,35,85,96,77},new int[]{38,50,94,12,97,30,44,87,89,94,96,94,92,2,74,9,71,12,34,79,49,51,12,6,26,69,49,51,74,85,92,41,11,47,14,16,44,58,21,14,76,26,73,3},new int[]{88,49,41,19,12,55,2,28,42,65,29,3,87,8,78,28,42,85,3,60,51,78,19,4,87,7,41,16,65,53,55,20,90,4,37,82,81,22,44,98,61,72,46,26},new int[]{3,89,55,37,47,48,36,15,7,31,61,46,15,13,22,50,52,56,44,87,67,20,83,46,48,30,42,96,41,30,24,12,44,53,17,73,79,25,12,78,84,46,49,45},new int[]{37,27,30,25,92,81,26,71,47,39,84,8,28,15,81,91,26,53,15,55,13,20,81,89,85,8,17,34,48,10,95,78,75,75,29,16,19,86,24,43,56,39,9,93},new int[]{48,33,42,91,92,34,45,36,32,82,26,80,96,33,88,43,6,52,60,78,84,90,78,59,44,24,71,67,40,90,20,25,94,32,71,52,85,21,49,23,64,12,68,83},new int[]{5,65,95,64,43,48,2,66,75,73,67,33,23,82,62,74,59,95,80,27,68,43,54,65,46,12,55,58,9,93,46,37,65,83,77,64,73,22,25,9,35,53,46,46},new int[]{63,57,73,7,81,76,73,6,88,19,55,64,81,78,65,56,82,94,88,80,18,11,64,34,38,66,36,27,8,80,79,1,90,95,67,65,4,10,97,71,79,73,69,33},new int[]{42,29,63,25,19,81,29,85,79,90,3,30,81,6,77,71,41,80,5,81,65,73,50,77,92,21,71,69,56,72,23,33,65,94,24,87,21,77,98,41,87,85,22,46},new int[]{29,53,23,22,98,8,88,44,9,31,11,49,95,52,54,67,25,77,80,44,22,13,19,58,61,92,21,26,41,42,51,81,61,7,90,57,58,24,17,58,64,14,4,80},new int[]{20,33,49,18,28,82,53,12,84,69,58,36,63,64,11,41,32,1,22,22,54,77,47,69,31,80,30,90,83,9,54,83,69,10,97,89,8,56,26,32,87,12,38,32},new int[]{96,26,2,94,39,99,5,84,60,81,23,97,60,40,76,57,59,28,5,86,2,41,66,33,69,88,83,38,29,72,50,68,71,89,58,2,7,72,63,47,29,61,85,85},new int[]{89,31,91,33,39,14,34,31,48,70,26,93,52,32,5,52,61,19,73,17,38,65,77,21,14,83,53,14,72,63,25,18,77,88,56,9,90,23,98,13,39,14,61,93},new int[]{91,86,41,21,62,43,25,29,22,77,92,13,86,46,91,94,58,28,41,41,20,99,51,8,50,32,43,61,85,86,88,85,44,36,68,11,8,4,74,12,97,37,65,81},new int[]{14,98,40,91,24,82,63,16,51,16,58,35,68,98,33,87,74,57,75,68,92,12,17,69,96,2,77,85,13,32,41,20,59,1,47,47,87,77,5,99,4,93,66,48},new int[]{54,3,22,78,77,2,55,73,16,12,56,50,66,97,85,79,78,11,18,51,89,72,66,84,57,26,74,72,94,6,98,56,47,80,19,3,13,82,41,41,7,22,31,83},new int[]{19,47,15,72,93,56,50,17,34,42,85,29,72,6,68,24,20,83,81,52,88,91,23,78,54,75,87,8,12,45,57,65,68,4,62,77,31,54,31,32,40,4,7,56},new int[]{57,46,49,50,49,80,43,65,6,86,30,72,67,54,74,25,42,72,61,38,36,41,47,87,31,2,68,34,8,56,96,11,87,70,74,68,67,12,61,1,78,92,11,30},new int[]{2,6,24,78,36,2,67,26,29,87,50,7,60,68,79,23,22,71,50,82,89,48,15,6,59,76,80,26,39,72,27,91,65,43,41,61,32,3,94,61,17,9,57,48},new int[]{7,32,93,58,82,5,98,39,15,70,32,53,59,3,25,57,51,17,47,11,35,6,25,17,55,30,10,28,67,55,82,80,26,83,81,41,61,57,45,28,20,38,94,13}}); List<Integer> param1 = new ArrayList<>(); param1.add(3); param1.add(10); param1.add(24); param1.add(30); param1.add(22); param1.add(3); param1.add(32); param1.add(39); param1.add(14); param1.add(34); List<Integer> param2 = new ArrayList<>(); param2.add(3); param2.add(13); param2.add(29); param2.add(28); param2.add(33); param2.add(3); param2.add(21); param2.add(39); param2.add(13); param2.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,857
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_REPETITIVE_ELEMENT_1_N_1_2.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPETITIVE_ELEMENT_1_N_1_2{ static int f_gold ( int arr [ ] , int n ) { int res = 0 ; for ( int i = 0 ; i < n - 1 ; i ++ ) res = res ^ ( i + 1 ) ^ arr [ i ] ; res = res ^ arr [ n - 1 ] ; return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,2,4,5,5,7,7,7,8,11,14,15,18,19,20,25,25,29,29,31,32,32,33,38,42,48,52,55,60,61,63,71,74,78,82,82,84,84,87,87,88,90,93,94,94}); param0.add(new int[]{46,2,62,60,92,4,26,66,66,90,26,-14,76,-20,-68}); param0.add(new int[]{0,0,0,1,1,1,1,1}); param0.add(new int[]{87,67,11,47,64,81,94,75,58,77,18,2,85,26,6,44,55,19,46,49,5,69,44,12,42,66,46,9,26,49,68,95,6,9,11,72,5,67}); param0.add(new int[]{-98,-94,-92,-82,-78,-64,-62,-58,-52,-44,-40,-38,-8,6,10,20,22,28,30,30,36,54,54,58,64,68,76,78,84,88,90,94,96}); param0.add(new int[]{1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,0,0,0,0,1,1}); param0.add(new int[]{1,14,15,15,21,34,38,39,41,50,60,74,96,97}); param0.add(new int[]{96,-12,-16,-52}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{66,21,21,59,78,8,46,41,16,32,97,93,32,86,91,61,67,61,97,49,66,35,24,35,65,45,83}); List<Integer> param1 = new ArrayList<>(); param1.add(31); param1.add(8); param1.add(4); param1.add(34); param1.add(29); param1.add(17); param1.add(7); param1.add(3); param1.add(21); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,858
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DECIMAL_BINARY_CONVERSION_WITHOUT_USING_ARITHMETIC_OPERATORS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DECIMAL_BINARY_CONVERSION_WITHOUT_USING_ARITHMETIC_OPERATORS{ static String f_gold ( int n ) { if ( n == 0 ) return "0" ; String bin = "" ; while ( n > 0 ) { bin = ( ( n & 1 ) == 0 ? '0' : '1' ) + bin ; n >>= 1 ; } return bin ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(35); param0.add(17); param0.add(8); param0.add(99); param0.add(57); param0.add(39); param0.add(99); param0.add(14); param0.add(22); param0.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,859
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHANGE_BITS_CAN_MADE_ONE_FLIP.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHANGE_BITS_CAN_MADE_ONE_FLIP{ static boolean f_gold ( String str ) { int zeros = 0 , ones = 0 ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { char ch = str . charAt ( i ) ; if ( ch == '0' ) ++ zeros ; else ++ ones ; } return ( zeros == 1 || ones == 1 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("00001"); param0.add("0000"); param0.add("11"); param0.add("111110"); param0.add("1"); param0.add("111010111010"); param0.add("hUInqJXNdbfP"); param0.add("5191"); param0.add("1110101101"); param0.add("NupSrU xz"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,860
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/POSITION_OF_RIGHTMOST_SET_BIT_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class POSITION_OF_RIGHTMOST_SET_BIT_1{ static int f_gold ( int n ) { int position = 1 ; int m = 1 ; while ( ( n & m ) == 0 ) { m = m << 1 ; position ++ ; } return position ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(17); param0.add(97); param0.add(73); param0.add(68); param0.add(6); param0.add(84); param0.add(72); param0.add(66); param0.add(57); param0.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,861
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT{ static boolean f_gold ( String str ) { int n = str . length ( ) ; if ( n == 0 ) return false ; if ( n == 1 ) return ( ( str . charAt ( 0 ) - '0' ) % 4 == 0 ) ; int last = str . charAt ( n - 1 ) - '0' ; int second_last = str . charAt ( n - 2 ) - '0' ; return ( ( second_last * 10 + last ) % 4 == 0 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("PjAFZXQgN"); param0.add("12325195609714"); param0.add("00101111101"); param0.add("xOtbXZiA"); param0.add("980"); param0.add("000000100"); param0.add("zFacc W"); param0.add("8"); param0.add("110011"); param0.add("afiutekeSfYrX"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,862
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_SUBSTRINGS_STRING.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBSTRINGS_STRING{ static int f_gold ( String str ) { int n = str . length ( ) ; return n * ( n + 1 ) / 2 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("gZFGZsHCimLf"); param0.add("505357"); param0.add("011011101"); param0.add("ovfwP Osauz"); param0.add("92132238746026"); param0.add("01100"); param0.add("RaOWYQRfiWKSyC"); param0.add("861330202"); param0.add("001100010"); param0.add("uvpKlGUBLOMba"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,863
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_THE_ELEMENT_BEFORE_WHICH_ALL_THE_ELEMENTS_ARE_SMALLER_THAN_IT_AND_AFTER_WHICH_ALL_ARE_GREATER_THAN_IT.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_ELEMENT_BEFORE_WHICH_ALL_THE_ELEMENTS_ARE_SMALLER_THAN_IT_AND_AFTER_WHICH_ALL_ARE_GREATER_THAN_IT{ static int f_gold ( int [ ] arr , int n ) { int [ ] leftMax = new int [ n ] ; leftMax [ 0 ] = Integer . MIN_VALUE ; for ( int i = 1 ; i < n ; i ++ ) leftMax [ i ] = Math . max ( leftMax [ i - 1 ] , arr [ i - 1 ] ) ; int rightMin = Integer . MAX_VALUE ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( leftMax [ i ] < arr [ i ] && rightMin > arr [ i ] ) return i ; rightMin = Math . min ( rightMin , arr [ i ] ) ; } return - 1 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,24,30,33,56,67,87,90}); param0.add(new int[]{72,-48,12,4,46,36,2,58,82,-88,-14,56,90,76,18,-6,-28,18,88,90,40,-68,-10,-82,-28,16,32,-90,12,-86,-16,78,-98,-52,-26,80,6,50,40,-12,52,38,-92,94,-32,14,-80,-88,48}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{51,87,46,76,2,89,56,34,49,61,44,73,14,60,89}); param0.add(new int[]{-90,-90,-80,-72,-68,-64,-62,-62,-60,-46,-44,-44,-44,-42,-42,-32,-22,-22,-18,-2,4,6,10,12,14,30,34,34,40,56,56,56,58,68,74,78,78,82,84,86,88,90,92}); param0.add(new int[]{0,0,0,1,1,0,1,1,1,0,0,1,1,1,0,0,1,1,1,0,1,0,1,0,0,0,0,0,1,0,0,1,1,1,0,0,0,1,1,0}); param0.add(new int[]{7,8,11,12,15,17,28,34,57,61,66,76,92}); param0.add(new int[]{-22,-96,-78,-60,34,-18,86,-42,-78,76,8,28,-80,80,6,-72,34,66,84,50,-4,18,72,-66,-68,-24,56,-12,-70,24,-82}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{79,81,55,6,78,93,81,33,29,1,27,49,21,58,22,65,44,95,6,51,75,42,14,55,79,82,90,8,15,15,53,98,76,43,33}); List<Integer> param1 = new ArrayList<>(); param1.add(4); param1.add(28); param1.add(30); param1.add(11); param1.add(29); param1.add(26); param1.add(9); param1.add(19); param1.add(9); param1.add(30); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,864
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMIZE_THE_SUM_OF_DIGITS_OF_A_AND_B_SUCH_THAT_A_B_N.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMIZE_THE_SUM_OF_DIGITS_OF_A_AND_B_SUCH_THAT_A_B_N{ static int f_gold ( int n ) { int sum = 0 ; while ( n > 0 ) { sum += ( n % 10 ) ; n /= 10 ; } if ( sum == 1 ) return 10 ; return sum ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(2); param0.add(39); param0.add(31); param0.add(45); param0.add(35); param0.add(94); param0.add(67); param0.add(50); param0.add(4); param0.add(63); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,865
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/EULERIAN_NUMBER_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EULERIAN_NUMBER_1{ public static int f_gold ( int n , int m ) { int [ ] [ ] dp = new int [ n + 1 ] [ m + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= m ; j ++ ) { if ( i > j ) { if ( j == 0 ) dp [ i ] [ j ] = 1 ; else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ) ; } } } return dp [ n ] [ m ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(27); param0.add(77); param0.add(35); param0.add(26); param0.add(6); param0.add(66); param0.add(44); param0.add(26); param0.add(74); param0.add(65); List<Integer> param1 = new ArrayList<>(); param1.add(7); param1.add(34); param1.add(22); param1.add(20); param1.add(10); param1.add(47); param1.add(29); param1.add(33); param1.add(86); param1.add(97); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,866
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_SWAPS_REQUIRED_BRING_ELEMENTS_LESS_EQUAL_K_TOGETHER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SWAPS_REQUIRED_BRING_ELEMENTS_LESS_EQUAL_K_TOGETHER{ static int f_gold ( int arr [ ] , int n , int k ) { int count = 0 ; for ( int i = 0 ; i < n ; ++ i ) if ( arr [ i ] <= k ) ++ count ; int bad = 0 ; for ( int i = 0 ; i < count ; ++ i ) if ( arr [ i ] > k ) ++ bad ; int ans = bad ; for ( int i = 0 , j = count ; j < n ; ++ i , ++ j ) { if ( arr [ i ] > k ) -- bad ; if ( arr [ j ] > k ) ++ bad ; ans = Math . min ( ans , bad ) ; } return ans ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{7,12,15,30,33,34,53,66,73,74,76,77,85,90}); param0.add(new int[]{-62,-20,-26,-24,92,66,-74,-4,18,-82,-36,92,-4,92,-80,56,-24,4,-48,-10,-14,-46,-16,-58,-58,-6,-68,-22,-82,-16,76,-30,-86,-38,-66,28,58,30,-44,-56}); param0.add(new int[]{0,0,0,0,0,1,1}); param0.add(new int[]{8,48,64,77,61,60,96,95,41,68,9,67,10,66,16,59,83,21,47,16,13,85,52,11,48,31,99,57,57,44,66,93,80,69,23,2,55,90}); param0.add(new int[]{-80,-58,-40,-34,14,36,48,56,58,60,84,90,92,92}); param0.add(new int[]{1,0,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,1,0,1,0,1,1,0,1,0,0,0,1}); param0.add(new int[]{4,4,8,9,13,17,18,19,21,22,22,23,27,28,30,44,46,48,53,53,55,60,61,62,68,70,70,71,73,80,82,82,85,88,90,93,99}); param0.add(new int[]{-28,50,82,-32,32,-78,12,50,38,34,-10,6,86,-56,-2}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{37,88,83,91,11,39,98,70,93,74,24,90,66,3,6,28}); List<Integer> param1 = new ArrayList<>(); param1.add(9); param1.add(24); param1.add(5); param1.add(36); param1.add(7); param1.add(26); param1.add(28); param1.add(13); param1.add(9); param1.add(12); List<Integer> param2 = new ArrayList<>(); param2.add(8); param2.add(28); param2.add(6); param2.add(24); param2.add(8); param2.add(23); param2.add(36); param2.add(9); param2.add(8); param2.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,867
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS{ public static int f_gold ( int ar [ ] , int n ) { int res = 0 ; Arrays . sort ( ar ) ; for ( int i = 0 ; i < n ; i ++ ) { int count = 1 ; for ( ; i < n - 1 ; i ++ ) { if ( ar [ i ] == ar [ i + 1 ] ) count ++ ; else break ; } res = Math . max ( res , count ) ; } return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,2,5,8,16,21,21,22,23,26,26,27,27,29,31,33,36,37,37,38,42,45,47,50,57,58,60,60,62,63,66,66,76,84,84,88,96,99}); param0.add(new int[]{-30,-60,34,4,86,80,-96,-94,52,46,8,82,-94,-96,78,82,-22,-36,78,50,-46,-36,80,24,-14,94,-46,-38,82,4,-24,2,4,-82,-82,-18,-62,12,8,92,70,-10}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{38,47,84,49,48,62,48,41,38,48,92,16,99}); param0.add(new int[]{-88,-64,-40,-38,-38,-16,16,20,28,40,56,58,60,68,74,92}); param0.add(new int[]{1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{14,24,82,87,95}); param0.add(new int[]{-34,62,40,-84,52,-76,2,-58,94,22,2,-18,-88,62,-14,46,50,-58,-80,68,-64,90,-58,12,76,-40,40,-46,8,-80,4,-90,14,-10,64,-68}); param0.add(new int[]{0,1,1,1}); param0.add(new int[]{43,41,90,5,6,17,68,68,86,89}); List<Integer> param1 = new ArrayList<>(); param1.add(25); param1.add(35); param1.add(34); param1.add(6); param1.add(12); param1.add(29); param1.add(3); param1.add(34); param1.add(3); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,868
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { HashSet < Integer > s = new HashSet < > ( ) ; int count = 0 , maxm = Integer . MIN_VALUE , minm = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { s . add ( arr [ i ] ) ; if ( arr [ i ] < minm ) minm = arr [ i ] ; if ( arr [ i ] > maxm ) maxm = arr [ i ] ; } for ( int i = minm ; i <= maxm ; i ++ ) if ( ! s . contains ( i ) ) count ++ ; return count ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,4,5,5,11,11,12,14,16,20,23,23,25,27,29,33,33,35,37,39,39,44,44,45,47,51,51,53,55,65,73,73,75,78,79,79,80,82,86,86,87,87,88,90,91,91,94}); param0.add(new int[]{-38,20,-94,-68,-96,36,48,32,44,-56,72,-28,-6,22,-54,-46,58,-60,-80,28,-34,60,-12,-26,-32,28,72,-50,66,-36,28,30,10,14,0,-78,94,-24,-42,-60,66,-12,92,54,-34,-58,56}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{73,69,12,82,65,55,93,93,88,52,33,94,62,75,61,81,48,43,29,8,28,60,60,58,54,44,25,36,46,88,54,36,83,46,34,44,71,90,68,75,42}); param0.add(new int[]{-98,-94,-88,-80,-74,-70,-70,-56,-50,-48,-40,-24,-22,-14,0,2,2,6,12,22,30,32,32,40,48,52,52,58,64,66,66,68,70,72,74,76,78,94,98,98}); param0.add(new int[]{1,0,1,0,1,1,1,0,0,1,1,1,1,0,1,1,1,0,1,1}); param0.add(new int[]{1,2,3,4,7,11,12,13,14,15,20,21,22,25,25,28,32,32,35,36,37,38,42,42,45,48,48,48,54,67,70,70,71,74,80,81,82,82,85,94}); param0.add(new int[]{-90,92,28,-32,76,94,48,80,52,-12,-6,22,40,26,-18,-84,90,16,-76,52,10,-56,6}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{4,21,34,35,71,10,88,44,82,13,79,92,35,73,28,91,33,9,12,76,40,91,4,22,90,53,98,7,30}); List<Integer> param1 = new ArrayList<>(); param1.add(26); param1.add(31); param1.add(20); param1.add(31); param1.add(22); param1.add(18); param1.add(24); param1.add(11); param1.add(14); param1.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,869
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_PERIMETER_CYLINDER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_PERIMETER_CYLINDER{ static int f_gold ( int diameter , int height ) { return 2 * ( diameter + height ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(70); param0.add(97); param0.add(49); param0.add(56); param0.add(87); param0.add(64); param0.add(75); param0.add(90); param0.add(55); param0.add(73); List<Integer> param1 = new ArrayList<>(); param1.add(78); param1.add(46); param1.add(26); param1.add(61); param1.add(79); param1.add(21); param1.add(93); param1.add(16); param1.add(16); param1.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,870
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/REMOVE_MINIMUM_ELEMENTS_EITHER_SIDE_2MIN_MAX.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REMOVE_MINIMUM_ELEMENTS_EITHER_SIDE_2MIN_MAX{ static int f_gold ( int arr [ ] , int n ) { int longest_start = - 1 , longest_end = 0 ; for ( int start = 0 ; start < n ; start ++ ) { int min = Integer . MAX_VALUE , max = Integer . MIN_VALUE ; for ( int end = start ; end < n ; end ++ ) { int val = arr [ end ] ; if ( val < min ) { min = val ; } if ( val > max ) { max = val ; } if ( 2 * min <= max ) { break ; } if ( end - start > longest_end - longest_start || longest_start == - 1 ) { longest_start = start ; longest_end = end ; } } } if ( longest_start == - 1 ) { return n ; } return ( n - ( longest_end - longest_start + 1 ) ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{32,50,66,73,76,87}); param0.add(new int[]{68,74,16,40,6,-44,-36,94,6,-24,-4,-58,-16,24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{91,22}); param0.add(new int[]{-84,-80,-78,-76,-58,-54,-52,-48,-42,-42,-40,-38,-34,-32,-28,-24,-6,2,2,4,10,14,16,18,26,26,36,40,50,52,62,64,72,74,84,90,94,96,98}); param0.add(new int[]{1,0,1,1,1,0,1,1,1,0,1,0,0,1,0,1,1,1,1,0,1}); param0.add(new int[]{10,19,25,29,32,37,40,43,43,44,46,51,51,54,56,58,63,79,83,86,87,97,97}); param0.add(new int[]{-48,-28,10,30,78,-72,78,52,-52,-68,56,42,8,-42,16,-56,2,-90,-26,-28,-56,-2,80,-50,98,-64,-96,10,-10,44,98,-48,-88,42,30,24,38,-26,-52,-12,0,34,-82,-80,0,-84,-20}); param0.add(new int[]{0,0,1,1,1,1,1,1}); param0.add(new int[]{25,82}); List<Integer> param1 = new ArrayList<>(); param1.add(5); param1.add(11); param1.add(11); param1.add(1); param1.add(35); param1.add(13); param1.add(11); param1.add(25); param1.add(6); param1.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,871
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4{ static int f_gold ( int n ) { int DP [ ] = new int [ n + 1 ] ; DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1 ; DP [ 3 ] = 2 ; for ( int i = 4 ; i <= n ; i ++ ) DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ] ; return DP [ n ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(44); param0.add(9); param0.add(19); param0.add(10); param0.add(78); param0.add(94); param0.add(70); param0.add(81); param0.add(81); param0.add(49); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,872
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_BINOMIAL_COEFFICIENTS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_BINOMIAL_COEFFICIENTS{ static int f_gold ( int n ) { int C [ ] [ ] = new int [ n + 1 ] [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= Math . min ( i , n ) ; j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1 ; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ; } } int sum = 0 ; for ( int i = 0 ; i <= n ; i ++ ) sum += C [ n ] [ i ] ; return sum ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(8); param0.add(39); param0.add(25); param0.add(44); param0.add(72); param0.add(6); param0.add(72); param0.add(62); param0.add(48); param0.add(39); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,873
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIBONACCI_MODULO_P.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIBONACCI_MODULO_P{ static int f_gold ( int p ) { int first = 1 , second = 1 , number = 2 , next = 1 ; while ( next > 0 ) { next = ( first + second ) % p ; first = second ; second = next ; number ++ ; } return number ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(51); param0.add(40); param0.add(68); param0.add(7); param0.add(8); param0.add(32); param0.add(93); param0.add(75); param0.add(71); param0.add(15); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,874
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NTH_EVEN_LENGTH_PALINDROME.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NTH_EVEN_LENGTH_PALINDROME{ static String f_gold ( String n ) { String res = n ; for ( int j = n . length ( ) - 1 ; j >= 0 ; -- j ) res += n . charAt ( j ) ; return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("lSUhEvxcgfI"); param0.add("77329283"); param0.add("010111111"); param0.add("Stazb"); param0.add("0702"); param0.add("01111111"); param0.add("a"); param0.add("359118754930"); param0.add("11011010010"); param0.add("rznb"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,875
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER{ static int f_gold ( int n ) { int count = 0 ; for ( int i = 5 ; n / i >= 1 ; i *= 5 ) count += n / i ; return count ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(9); param0.add(43); param0.add(50); param0.add(32); param0.add(37); param0.add(51); param0.add(33); param0.add(49); param0.add(1); param0.add(75); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,876
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_OF_PAIRS_IN_AN_ARRAY_HAVING_SUM_EQUAL_TO_PRODUCT.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_OF_PAIRS_IN_AN_ARRAY_HAVING_SUM_EQUAL_TO_PRODUCT{ static int f_gold ( int a [ ] , int n ) { int zero = 0 , two = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == 0 ) { zero ++ ; } if ( a [ i ] == 2 ) { two ++ ; } } int cnt = ( zero * ( zero - 1 ) ) / 2 + ( two * ( two - 1 ) ) / 2 ; return cnt ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{9,10,20,26,26,28,31,34,35,36,36,37,39,43,44,44,46,49,54,57,58,63,64,64,65,67,70,70,74,75,77,78,79,81,82,83,84,86,95}); param0.add(new int[]{0,-10,10,0,68,4,-6,-14,74,-80,56,-4,36,56,10,-16,90,84,-38,-40,40,-86,-36,-16,-48,-76,-72,-18,-14,-40,-82,56,-60}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{88,20,53,21,29,73,62,91,72,34,47,42,98,9,79,80,94,36,7,67,96,34,99,56,37,70,55,36,10,77,41,51,5,37,57,29,56,74,97,31,96,52,13,29,87,58,28,31}); param0.add(new int[]{20}); param0.add(new int[]{1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1}); param0.add(new int[]{2,4,9,16,22,23,25,33,33,36,39,48,49,52,53,60,67,68,76,77,79,84,84,86,89}); param0.add(new int[]{-62,42,-88,-44,90,30,52,54,56,-72,-76,90,18,42,62,-84,56,-80,72}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{22,15,28,29,32,16,33,83}); List<Integer> param1 = new ArrayList<>(); param1.add(31); param1.add(19); param1.add(22); param1.add(38); param1.add(0); param1.add(21); param1.add(24); param1.add(13); param1.add(15); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,877
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8{ static boolean f_gold ( String str ) { int i , j , k , l = str . length ( ) ; int arr [ ] = new int [ l ] ; for ( i = 0 ; i < l ; i ++ ) { for ( j = i ; j < l ; j ++ ) { for ( k = j ; k < l ; k ++ ) { if ( arr [ i ] % 8 == 0 ) return true ; else if ( ( arr [ i ] * 10 + arr [ j ] ) % 8 == 0 && i != j ) return true ; else if ( ( arr [ i ] * 100 + arr [ j ] * 10 + arr [ k ] ) % 8 == 0 && i != j && j != k && i != k ) return true ; } } } return false ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("1787075866"); param0.add("8"); param0.add("1110101110111"); param0.add("6673177113"); param0.add("7"); param0.add("000001"); param0.add("dbxMF"); param0.add("71733"); param0.add("01101101100"); param0.add(""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,878
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/TAIL_RECURSION_FIBONACCI.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TAIL_RECURSION_FIBONACCI{ static int f_gold ( int n , int a , int b ) { if ( n == 0 ) return a ; if ( n == 1 ) return b ; return f_gold ( n - 1 , b , a + b ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(4); param0.add(60); param0.add(92); param0.add(73); param0.add(58); param0.add(82); param0.add(53); param0.add(57); param0.add(47); param0.add(83); List<Integer> param1 = new ArrayList<>(); param1.add(43); param1.add(48); param1.add(21); param1.add(79); param1.add(38); param1.add(26); param1.add(10); param1.add(37); param1.add(91); param1.add(3); List<Integer> param2 = new ArrayList<>(); param2.add(24); param2.add(98); param2.add(69); param2.add(38); param2.add(30); param2.add(12); param2.add(17); param2.add(26); param2.add(99); param2.add(64); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,879
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS{ static boolean f_gold ( int x , int y ) { return ( ( x ^ y ) < 0 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(59); param0.add(-20); param0.add(-100); param0.add(54); param0.add(-16); param0.add(-23); param0.add(93); param0.add(24); param0.add(-8); param0.add(29); List<Integer> param1 = new ArrayList<>(); param1.add(-99); param1.add(-21); param1.add(79); param1.add(-49); param1.add(16); param1.add(-68); param1.add(37); param1.add(-61); param1.add(69); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,880
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1{ static int f_gold ( int n ) { int x = 0 , yCount , res = 0 ; for ( yCount = 0 ; yCount * yCount < n ; yCount ++ ) ; while ( yCount != 0 ) { res += yCount ; x ++ ; while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount -- ; } return res ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(72); param0.add(75); param0.add(92); param0.add(30); param0.add(45); param0.add(40); param0.add(81); param0.add(17); param0.add(81); param0.add(99); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,881
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES{ static int f_gold ( int [ ] a , int n ) { int result = 1 ; for ( int i = 1 ; i <= n ; ++ i ) { int y = ( i * ( i + 1 ) ) / 2 ; if ( y < n ) result = i ; else break ; } return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{8,10,11,14,14,17,20,20,22,22,22,23,25,30,33,39,39,41,43,45,46,46,46,50,51,53,57,59,60,64,64,66,72,72,75,77,85,85,87,88,90,91,93,94,94,95}); param0.add(new int[]{-44,-90,20,4,-56,-50,-80,74,-82,20,62,-26,-10,-14,-76,82,-88,92,30,44,-62,-86,-20,-96,-60,-88,-78,-40,-48,-92,62,58,94,68,68,44,80,4,48,-92,30,-76,-46,-20,4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{8,34,48,10,5,12,80,7,67,1,79,59,63,13,16,23,62,56,99,89,7,80}); param0.add(new int[]{-88,-46,-40,-40,38}); param0.add(new int[]{1,0,0,1,0,1,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,1,1,0,1,1,1}); param0.add(new int[]{8,15,35,39,49,81,86,91}); param0.add(new int[]{-24,56,-74,-76,-80,86,90,0,-26,18,72,78,-66,-28,22,22,72,78,-50,-12,20,12,-68,-2,-58,-44,28,-58,90,-28,32,-70,-48,-66,-94,-50,18,-12,80,12,82,56,-64,10,-22}); param0.add(new int[]{0,0}); param0.add(new int[]{62,93,69,40,26,2,29,83,66,68,67,73,12,65,89,57,38,99,42,27,38,24,43,4,4,54,72,47,52,46,53,24,3,41,64,33,88,3,1,7,17,31,20,33,69,21,9,24,59}); List<Integer> param1 = new ArrayList<>(); param1.add(38); param1.add(36); param1.add(28); param1.add(12); param1.add(3); param1.add(44); param1.add(7); param1.add(36); param1.add(1); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,882
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_BINARY_STRINGS_K_TIMES_APPEARING_ADJACENT_TWO_SET_BITS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_BINARY_STRINGS_K_TIMES_APPEARING_ADJACENT_TWO_SET_BITS{ static int f_gold ( int n , int k ) { int dp [ ] [ ] [ ] = new int [ n + 1 ] [ k + 1 ] [ 2 ] ; dp [ 1 ] [ 0 ] [ 0 ] = 1 ; dp [ 1 ] [ 0 ] [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) { for ( int j = 0 ; j < i && j < k + 1 ; j ++ ) { dp [ i ] [ j ] [ 0 ] = dp [ i - 1 ] [ j ] [ 0 ] + dp [ i - 1 ] [ j ] [ 1 ] ; dp [ i ] [ j ] [ 1 ] = dp [ i - 1 ] [ j ] [ 0 ] ; if ( j - 1 >= 0 ) { dp [ i ] [ j ] [ 1 ] += dp [ i - 1 ] [ j - 1 ] [ 1 ] ; } } } return dp [ n ] [ k ] [ 0 ] + dp [ n ] [ k ] [ 1 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(29); param0.add(47); param0.add(77); param0.add(9); param0.add(29); param0.add(94); param0.add(51); param0.add(46); param0.add(18); param0.add(86); List<Integer> param1 = new ArrayList<>(); param1.add(85); param1.add(29); param1.add(96); param1.add(91); param1.add(80); param1.add(85); param1.add(87); param1.add(62); param1.add(96); param1.add(86); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,883
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FORM_SMALLEST_NUMBER_USING_ONE_SWAP_OPERATION.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FORM_SMALLEST_NUMBER_USING_ONE_SWAP_OPERATION{ public static String f_gold ( String str ) { char [ ] num = str . toCharArray ( ) ; int n = str . length ( ) ; int [ ] rightMin = new int [ n ] ; rightMin [ n - 1 ] = - 1 ; int right = n - 1 ; for ( int i = n - 2 ; i >= 1 ; i -- ) { if ( num [ i ] > num [ right ] ) rightMin [ i ] = right ; else { rightMin [ i ] = - 1 ; right = i ; } } int small = - 1 ; for ( int i = 1 ; i < n ; i ++ ) if ( num [ i ] != '0' ) { if ( small == - 1 ) { if ( num [ i ] < num [ 0 ] ) small = i ; } else if ( num [ i ] < num [ small ] ) small = i ; } if ( small != - 1 ) { char temp ; temp = num [ 0 ] ; num [ 0 ] = num [ small ] ; num [ small ] = temp ; } else { for ( int i = 1 ; i < n ; i ++ ) { if ( rightMin [ i ] != - 1 ) { char temp ; temp = num [ i ] ; num [ i ] = num [ rightMin [ i ] ] ; num [ rightMin [ i ] ] = temp ; break ; } } } return ( new String ( num ) ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("ncYltuhSxEfG"); param0.add("26615541616459"); param0.add("0101"); param0.add("hK"); param0.add("422162103899"); param0.add("0010"); param0.add("zfcSh"); param0.add("92"); param0.add("0"); param0.add("v"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,884
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S{ static int f_gold ( int n ) { int a [ ] = new int [ n ] ; int b [ ] = new int [ n ] ; a [ 0 ] = b [ 0 ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) { a [ i ] = a [ i - 1 ] + b [ i - 1 ] ; b [ i ] = a [ i - 1 ] ; } return a [ n - 1 ] + b [ n - 1 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(86); param0.add(75); param0.add(14); param0.add(5); param0.add(41); param0.add(35); param0.add(30); param0.add(89); param0.add(84); param0.add(53); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,885
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DIVISIBILITY_BY_12_FOR_A_LARGE_NUMBER.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIVISIBILITY_BY_12_FOR_A_LARGE_NUMBER{ static boolean f_gold ( String num ) { if ( num . length ( ) >= 3 ) { int d1 = ( int ) num . charAt ( num . length ( ) - 1 ) ; if ( d1 % 2 != 0 ) return false ; int d2 = ( int ) num . charAt ( num . length ( ) - 2 ) ; int sum = 0 ; for ( int i = 0 ; i < num . length ( ) ; i ++ ) sum += num . charAt ( i ) ; return ( sum % 3 == 0 && ( d2 * 10 + d1 ) % 4 == 0 ) ; } else { int number = Integer . parseInt ( num ) ; return ( number % 12 == 0 ) ; } } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("12244824607284961224"); param0.add("392603977949"); param0.add("11101001111"); param0.add("92387493287593874594898678979792"); param0.add("2233244912"); param0.add("10101"); param0.add("12"); param0.add("254535361"); param0.add("1"); param0.add("hMPxVMpOBt"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,886
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES{ public static boolean f_gold ( int r , int R , int r1 , int x1 , int y1 ) { int dis = ( int ) Math . sqrt ( x1 * x1 + y1 * y1 ) ; return ( dis - r1 >= R && dis + r1 <= r ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(8); param0.add(400); param0.add(1); param0.add(61); param0.add(60); param0.add(88); param0.add(60); param0.add(26); param0.add(33); param0.add(70); List<Integer> param1 = new ArrayList<>(); param1.add(4); param1.add(1); param1.add(400); param1.add(40); param1.add(49); param1.add(10); param1.add(79); param1.add(88); param1.add(65); param1.add(57); List<Integer> param2 = new ArrayList<>(); param2.add(2); param2.add(10); param2.add(10); param2.add(2); param2.add(68); param2.add(69); param2.add(92); param2.add(75); param2.add(57); param2.add(77); List<Integer> param3 = new ArrayList<>(); param3.add(6); param3.add(74); param3.add(74); param3.add(50); param3.add(77); param3.add(71); param3.add(29); param3.add(84); param3.add(21); param3.add(52); List<Integer> param4 = new ArrayList<>(); param4.add(0); param4.add(38); param4.add(38); param4.add(0); param4.add(71); param4.add(26); param4.add(38); param4.add(10); param4.add(61); param4.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,887
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION{ static int f_gold ( String X , String Y ) { int m = X . length ( ) ; int n = Y . length ( ) ; int result = 0 ; int [ ] [ ] len = new int [ 2 ] [ n ] ; int currRow = 0 ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i == 0 || j == 0 ) { len [ currRow ] [ j ] = 0 ; } else if ( X . charAt ( i - 1 ) == Y . charAt ( j - 1 ) ) { len [ currRow ] [ j ] = len [ ( 1 - currRow ) ] [ ( j - 1 ) ] + 1 ; result = Math . max ( result , len [ currRow ] [ j ] ) ; } else { len [ currRow ] [ j ] = 0 ; } } currRow = 1 - currRow ; } return result ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("GeeksforGeeks"); param0.add("333940"); param0.add("1000"); param0.add("Facebook"); param0.add("2684247"); param0.add("111"); param0.add("abcdxyz"); param0.add("625330958530"); param0.add("01011000001111"); param0.add("KXm"); List<String> param1 = new ArrayList<>(); param1.add("GeeksQuiz"); param1.add("390"); param1.add("0"); param1.add("nice book"); param1.add("1"); param1.add("10"); param1.add("xyzabcd"); param1.add("412511"); param1.add("1001010001"); param1.add("gF"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,888
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1{ static int f_gold ( int a , int b ) { return ( a / 2 ) + ( b / 2 ) + ( ( a % 2 + b % 2 ) / 2 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(9); param0.add(68); param0.add(51); param0.add(31); param0.add(14); param0.add(73); param0.add(51); param0.add(75); param0.add(98); param0.add(83); List<Integer> param1 = new ArrayList<>(); param1.add(81); param1.add(79); param1.add(2); param1.add(49); param1.add(10); param1.add(9); param1.add(13); param1.add(67); param1.add(51); param1.add(74); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,889
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_AREA_SQUARE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_AREA_SQUARE{ static int f_gold ( int side ) { int area = side * side ; return area ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(50); param0.add(64); param0.add(92); param0.add(23); param0.add(38); param0.add(55); param0.add(67); param0.add(56); param0.add(60); param0.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,890
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE{ static int f_gold ( int arr [ ] , int N , int K ) { Arrays . sort ( arr ) ; int dp [ ] = new int [ N ] ; dp [ 0 ] = 0 ; for ( int i = 1 ; i < N ; i ++ ) { dp [ i ] = dp [ i - 1 ] ; if ( arr [ i ] - arr [ i - 1 ] < K ) { if ( i >= 2 ) dp [ i ] = Math . max ( dp [ i ] , dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ) ; else dp [ i ] = Math . max ( dp [ i ] , arr [ i ] + arr [ i - 1 ] ) ; } } return dp [ N - 1 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{48,53,67,78,78,93,95}); param0.add(new int[]{-2,52,18,70,32,88,-70,-32,72,30}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{98,84,13,61,58,90,45,89,45,80,3,5,57,86,40,80,60,51,60,73,67,10,52,56,60,36,34,60,75,63,23,86,51,68,86,13,71,86,99,6,42,2,39,82,16,5,23,47,12}); param0.add(new int[]{-84,-56,68,78}); param0.add(new int[]{0,0,1,0,0,1,1,0,0,0,1,0,1,1,1,1,0}); param0.add(new int[]{1,2,3,9,12,12,16,17,18,19,20,21,21,26,29,42,44,45,48,48,48,54,54,55,60,63,63,64,64,67,67,68,69,74,78,78,79,83,95,95,95,96,97,99}); param0.add(new int[]{40,-48,-14,64,-58,60,-42,-56,54,28,-16,-92,42}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{64,25,96}); List<Integer> param1 = new ArrayList<>(); param1.add(6); param1.add(8); param1.add(37); param1.add(31); param1.add(3); param1.add(14); param1.add(27); param1.add(9); param1.add(21); param1.add(1); List<Integer> param2 = new ArrayList<>(); param2.add(4); param2.add(8); param2.add(31); param2.add(37); param2.add(3); param2.add(9); param2.add(42); param2.add(8); param2.add(19); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,891
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT{ static float f_gold ( int a ) { float area = ( float ) ( Math . PI * a * a ) / 4 ; return area ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(77); param0.add(18); param0.add(83); param0.add(39); param0.add(68); param0.add(28); param0.add(71); param0.add(14); param0.add(21); param0.add(73); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,892
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MULTIPLY_AN_INTEGER_WITH_3_5.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MULTIPLY_AN_INTEGER_WITH_3_5{ static int f_gold ( int x ) { return ( x << 1 ) + x + ( x >> 1 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(58); param0.add(16); param0.add(82); param0.add(33); param0.add(88); param0.add(51); param0.add(81); param0.add(38); param0.add(79); param0.add(89); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,893
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS{ static int f_gold ( int arr [ ] , int N , int k ) { int MS [ ] = new int [ N ] ; MS [ N - 1 ] = arr [ N - 1 ] ; for ( int i = N - 2 ; i >= 0 ; i -- ) { if ( i + k + 1 >= N ) MS [ i ] = Math . max ( arr [ i ] , MS [ i + 1 ] ) ; else MS [ i ] = Math . max ( arr [ i ] + MS [ i + k + 1 ] , MS [ i + 1 ] ) ; } return MS [ 0 ] ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{3,5,20,21,23,26,27,31,33,38,39,41,48,48,50,51,56,57,64,68,69,70,71,74,76,86,97}); param0.add(new int[]{32,34,-40,90,-82,-70,30,26,-76,-46,-84,76,-76}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{96,15,30,25,83}); param0.add(new int[]{-90,-82,-80,-76,-62,-58,-50,-48,-46,-38,-38,-38,-38,-38,-34,-32,-24,-22,-16,-16,-4,-2,10,10,20,26,26,32,38,38,44,44,46,48,58,62,64,66,76,78,78,82,92,96,96,98}); param0.add(new int[]{1,1,1,1,1,0,0,0,0,1,1,1,0,1,0,0,1,0,0}); param0.add(new int[]{1,2,9,17,24,31,31,33,56,57,61,71,73,74,76,77,79,83,86,95,99}); param0.add(new int[]{-12,52,-44,80,-66,34,42,-46,8,12,-22,-56,74,-98,-44,2,-24,-14,-54,-56,-26,-18,-72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{65,1,34,38,15,6,55,21,32,90,39,25,43,48,64,66,88,70,82,75,25,56,23,27,41,33,33,55,60,90,41,58,42,53,38,90,7,15}); List<Integer> param1 = new ArrayList<>(); param1.add(23); param1.add(9); param1.add(22); param1.add(2); param1.add(27); param1.add(9); param1.add(12); param1.add(13); param1.add(13); param1.add(37); List<Integer> param2 = new ArrayList<>(); param2.add(15); param2.add(10); param2.add(34); param2.add(3); param2.add(30); param2.add(9); param2.add(10); param2.add(19); param2.add(13); param2.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,894
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DYNAMIC_PROGRAMMING_SET_28_MINIMUM_INSERTIONS_TO_FORM_A_PALINDROME.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_28_MINIMUM_INSERTIONS_TO_FORM_A_PALINDROME{ static int f_gold ( char str [ ] , int l , int h ) { if ( l > h ) return Integer . MAX_VALUE ; if ( l == h ) return 0 ; if ( l == h - 1 ) return ( str [ l ] == str [ h ] ) ? 0 : 1 ; return ( str [ l ] == str [ h ] ) ? f_gold ( str , l + 1 , h - 1 ) : ( Integer . min ( f_gold ( str , l , h - 1 ) , f_gold ( str , l + 1 , h ) ) + 1 ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<char [ ]> param0 = new ArrayList<>(); param0.add(new char[]{'F','F','J','K','K','L','P','S','T','V','W','Y','b','d','j','l','t','u','x','y'}); param0.add(new char[]{'0','1','8','8','8','4','4','3','9','6','5','2','8','2','0','2','6','0','7','7','3','2','4','5','9','7','2','4','1','8','7','9','8','0','8','5','4','2','3'}); param0.add(new char[]{'1'}); param0.add(new char[]{'g','y','r','M','v','z',' ','k','S','P','x','p','E','z','T','K','k','B','s','P','p','e','G','t','r','M','p',' ','H','a'}); param0.add(new char[]{'0','1','1','1','1','1','1','2','2','2','2','3','3','3','3','3','4','4','4','5','5','5','5','5','6','6','6','6','6','6','6','7','8','8','8','9','9'}); param0.add(new char[]{'1','1','0','1','0','1','0','1','0','1','1','1','1','1','1','0'}); param0.add(new char[]{' ',' ',' ','B','C','C','D','I','K','O','P','R','T','V','W','a','b','d','j','y'}); param0.add(new char[]{'5','0','8','6','9','3','0','3','2','0','6','2','3','7','8','9','2','0','1','9','4','1','3','1','9','2','3','4','1','2','3','8','1'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'X','B','E','v','K','t','k','K','Q','s','V','N','l','k','T','N','J','z','f','p','J','g','S','P','M','b','H','L','v','E','A','n','D','U','c','s','M','Q','P','g','g',' '}); List<Integer> param1 = new ArrayList<>(); param1.add(11); param1.add(19); param1.add(0); param1.add(24); param1.add(33); param1.add(13); param1.add(16); param1.add(31); param1.add(37); param1.add(26); List<Integer> param2 = new ArrayList<>(); param2.add(11); param2.add(22); param2.add(0); param2.add(27); param2.add(34); param2.add(8); param2.add(14); param2.add(25); param2.add(35); param2.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,895
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SEARCH_ALMOST_SORTED_ARRAY.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_ALMOST_SORTED_ARRAY{ static int f_gold ( int arr [ ] , int l , int r , int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2 ; if ( arr [ mid ] == x ) return mid ; if ( mid > l && arr [ mid - 1 ] == x ) return ( mid - 1 ) ; if ( mid < r && arr [ mid + 1 ] == x ) return ( mid + 1 ) ; if ( arr [ mid ] > x ) return f_gold ( arr , l , mid - 2 , x ) ; return f_gold ( arr , mid + 2 , r , x ) ; } return - 1 ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{6,7,15,42,47,54,56,59,59,64,68,70,71,75,91,93}); param0.add(new int[]{6,7,15,42,47,56,54,59,59,64,68,71,70, 75,91,93}); param0.add(new int[]{-92,-96,-68,-40,70}); param0.add(new int[]{-92,-86,-68,-40,70}); param0.add(new int[]{-3,-1,0,30,10,45,70,60}); param0.add(new int[]{-3,-1,0,10,5,45,60,50}); param0.add(new int[]{-3,-1,0,10,30,45,60,70}); param0.add(new int[]{0,0,1}); param0.add(new int[]{1,1,1}); param0.add(new int[]{30,2,30,45}); List<Integer> param1 = new ArrayList<>(); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); List<Integer> param2 = new ArrayList<>(); param2.add(15); param2.add(15); param2.add(4); param2.add(4); param2.add(7); param2.add(7); param2.add(7); param2.add(2); param2.add(2); param2.add(3); List<Integer> param3 = new ArrayList<>(); param3.add(71); param3.add(71); param3.add(-96); param3.add(20); param3.add(0); param3.add(12); param3.add(18); param3.add(20); param3.add(17); param3.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,896
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_SERIES_555555_N_TERMS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SERIES_555555_N_TERMS{ static int f_gold ( int n ) { return ( int ) ( 0.6172 * ( Math . pow ( 10 , n ) - 1 ) - 0.55 * n ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(18); param0.add(81); param0.add(77); param0.add(84); param0.add(87); param0.add(14); param0.add(15); param0.add(3); param0.add(21); param0.add(60); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,897
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_SUBSETS_SET_FORMED_FIRST_N_NATURAL_NUMBERS.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SUBSETS_SET_FORMED_FIRST_N_NATURAL_NUMBERS{ static long f_gold ( int n ) { return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(76); param0.add(26); param0.add(45); param0.add(35); param0.add(34); param0.add(22); param0.add(3); param0.add(25); param0.add(22); param0.add(78); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,898
0
Create_ds/CodeGen/data/transcoder_evaluation_gfg
Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_1.java
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_1{ static int f_gold ( int num , int divisor ) { if ( divisor == 0 ) { System . out . println ( "Error: divisor " + "can't be zero \n" ) ; return - 1 ; } if ( divisor < 0 ) divisor = - divisor ; if ( num < 0 ) num = - num ; int i = 1 ; int product = 0 ; while ( product <= num ) { product = divisor * i ; i ++ ; } return num - ( product - divisor ) ; } //TOFILL public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(34); param0.add(63); param0.add(15); param0.add(56); param0.add(63); param0.add(28); param0.add(54); param0.add(2); param0.add(94); param0.add(82); List<Integer> param1 = new ArrayList<>(); param1.add(55); param1.add(22); param1.add(26); param1.add(58); param1.add(94); param1.add(45); param1.add(97); param1.add(58); param1.add(91); param1.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
5,899