index int64 0 0 | repo_id stringlengths 9 205 | file_path stringlengths 31 246 | content stringlengths 1 12.2M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
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());
}
} | 1,200 |
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());
}
} | 1,201 |
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());
}
} | 1,202 |
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());
}
} | 1,203 |
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());
}
} | 1,204 |
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());
}
} | 1,205 |
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());
}
} | 1,206 |
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());
}
} | 1,207 |
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());
}
} | 1,208 |
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());
}
} | 1,209 |
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());
}
} | 1,210 |
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());
}
} | 1,211 |
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());
}
} | 1,212 |
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());
}
} | 1,213 |
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());
}
} | 1,214 |
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());
}
} | 1,215 |
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());
}
} | 1,216 |
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());
}
} | 1,217 |
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());
}
} | 1,218 |
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());
}
} | 1,219 |
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());
}
} | 1,220 |
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());
}
} | 1,221 |
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());
}
} | 1,222 |
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());
}
} | 1,223 |
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());
}
} | 1,224 |
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());
}
} | 1,225 |
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());
}
} | 1,226 |
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());
}
} | 1,227 |
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());
}
} | 1,228 |
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());
}
} | 1,229 |
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());
}
} | 1,230 |
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());
}
} | 1,231 |
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());
}
} | 1,232 |
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());
}
} | 1,233 |
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());
}
} | 1,234 |
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());
}
} | 1,235 |
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());
}
} | 1,236 |
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());
}
} | 1,237 |
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());
}
} | 1,238 |
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());
}
} | 1,239 |
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());
}
} | 1,240 |
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());
}
} | 1,241 |
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());
}
} | 1,242 |
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());
}
} | 1,243 |
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());
}
} | 1,244 |
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());
}
} | 1,245 |
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());
}
} | 1,246 |
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());
}
} | 1,247 |
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());
}
} | 1,248 |
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());
}
}
| 1,249 |
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());
}
} | 1,250 |
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());
}
} | 1,251 |
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());
}
} | 1,252 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COMPOSITE_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 COMPOSITE_NUMBER{
static boolean f_gold ( int n ) {
if ( n <= 1 ) System . out . println ( "False" ) ;
if ( n <= 3 ) System . out . println ( "False" ) ;
if ( n % 2 == 0 || n % 3 == 0 ) return true ;
for ( int i = 5 ;
i * i <= n ;
i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true ;
return false ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(62);
param0.add(13);
param0.add(29);
param0.add(72);
param0.add(30);
param0.add(20);
param0.add(10);
param0.add(47);
param0.add(91);
param0.add(52);
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());
}
} | 1,253 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_PAGE_REPLACEMENT_ALGORITHMS_SET_2_FIFO.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_PAGE_REPLACEMENT_ALGORITHMS_SET_2_FIFO{
static int f_gold ( int pages [ ] , int n , int capacity ) {
HashSet < Integer > s = new HashSet < > ( capacity ) ;
Queue < Integer > indexes = new LinkedList < > ( ) ;
int page_faults = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( s . size ( ) < capacity ) {
if ( ! s . contains ( pages [ i ] ) ) {
s . add ( pages [ i ] ) ;
page_faults ++ ;
indexes . add ( pages [ i ] ) ;
}
}
else {
if ( ! s . contains ( pages [ i ] ) ) {
int val = indexes . peek ( ) ;
indexes . poll ( ) ;
s . remove ( val ) ;
s . add ( pages [ i ] ) ;
indexes . add ( pages [ i ] ) ;
page_faults ++ ;
}
}
}
return page_faults ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,4,6,7,8,11,13,18,26,35,36,37,45,46,46,47,48,49,51,52,53,56,61,74,75,77,80,83,85,86,87,90,93,95,97,98,99,99});
param0.add(new int[]{78,-48,50,-20,-6,58,-8,66,72,68,4,80,58,-26,-82,-56,92,76,20,82,-46,86,38,60,-62,-48,76,8,-66,-4,-98,-96,-52,92});
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});
param0.add(new int[]{98,78,94,42,62,83,7,62,60,94,16,28,50,15,18,71,86,47,62,89});
param0.add(new int[]{-82,-70,-68,-56,-50,-44,4,18,28,30,30,42,66,78,80});
param0.add(new int[]{1,1,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,0});
param0.add(new int[]{4,5,13,15,18,28,32,40,46,46,55,57,61,63,65,68,77,79,79,96});
param0.add(new int[]{-2,82,2,-74,-6,-24,54,-74,-98,8,-94,-60,-42,-38,36,-38,-58,-70,-28,-34,70,-6,-2,-76,-40,-4,0,-4,76,48,-34,-26,-48,-58,-88,-44,20,-22,78});
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});
param0.add(new int[]{4,90,28,71,69,45,92,63,72,76,47,85,36,59,88,46,28,19,50,31,63,13});
List<Integer> param1 = new ArrayList<>();
param1.add(36);
param1.add(33);
param1.add(19);
param1.add(15);
param1.add(9);
param1.add(25);
param1.add(17);
param1.add(31);
param1.add(26);
param1.add(15);
List<Integer> param2 = new ArrayList<>();
param2.add(37);
param2.add(23);
param2.add(13);
param2.add(11);
param2.add(11);
param2.add(25);
param2.add(18);
param2.add(24);
param2.add(24);
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());
}
} | 1,254 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_TRIPLET_SUM_ARRAY_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 MAXIMUM_TRIPLET_SUM_ARRAY_2{
static int f_gold ( int arr [ ] , int n ) {
int maxA = - 100000000 , maxB = - 100000000 ;
int maxC = - 100000000 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] > maxA ) {
maxC = maxB ;
maxB = maxA ;
maxA = arr [ i ] ;
}
else if ( arr [ i ] > maxB ) {
maxC = maxB ;
maxB = arr [ i ] ;
}
else if ( arr [ i ] > maxC ) maxC = arr [ i ] ;
}
return ( maxA + maxB + maxC ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,7,12,21,22,25,27,28,28,31,32,32,41,45,47,51,53,60,61,61,63,71,74,82,83,85,88,92,96,96});
param0.add(new int[]{-52,26,74,-62,-76});
param0.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{63,71,15,28,31,84,8,17,24,42,66,95,30});
param0.add(new int[]{-94,-92,-92,-90,-88,-88,-86,-82,-80,-78,-66,-54,-52,-52,-46,-46,-42,-36,-32,-24,-24,-14,-14,-14,-12,-10,0,6,8,20,24,24,28,38,38,52,54,56,64,74,74,76,82,94,94});
param0.add(new int[]{0,0,0,1,1,0,1,0,1,1,0,1,0,1,0,0,0,1,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,1,0,0,0,1,0});
param0.add(new int[]{15,19,80});
param0.add(new int[]{4,80,18,74,36,-30,-72,-28,-32,-16,-8,38,78,-48,98,-64,86,-60,-44,84,-98,40,14,30,44,90,-30,-42,24,-28,24,40,-96,98,90,-68,-54,-52,62,34,-98,68,-56,-94,-78,-12,28});
param0.add(new int[]{0,1,1,1,1,1});
param0.add(new int[]{2,18,96,7,99,83,3,88,23,77,6,28,55,49,69,55,48,76,43,11,43,44,17,74,27,64,76,77,53,26,73,12,19,62,18,34,13,31,97,96,85,27,30,97,89,25});
List<Integer> param1 = new ArrayList<>();
param1.add(28);
param1.add(2);
param1.add(11);
param1.add(6);
param1.add(31);
param1.add(30);
param1.add(2);
param1.add(41);
param1.add(3);
param1.add(41);
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());
}
} | 1,255 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_CALCULATE_AREA_OCTAGON.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_CALCULATE_AREA_OCTAGON{
static double f_gold ( double side ) {
return ( float ) ( 2 * ( 1 + Math . sqrt ( 2 ) ) * side * side ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Double> param0 = new ArrayList<>();
param0.add(5859.798616323926);
param0.add(-6381.210375893524);
param0.add(2442.246292006922);
param0.add(-9624.81536339737);
param0.add(8679.436805247444);
param0.add(-2682.3245401089525);
param0.add(7216.9161613024435);
param0.add(-5881.789859815442);
param0.add(2497.776395789202);
param0.add(-9598.912195459263);
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.001)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,256 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_CALCULATE_VOLUME_OCTAHEDRON.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_CALCULATE_VOLUME_OCTAHEDRON{
static double f_gold ( double side ) {
return ( ( side * side * side ) * ( Math . sqrt ( 2 ) / 3 ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Double> param0 = new ArrayList<>();
param0.add(3355.322051344013);
param0.add(-891.0551553192736);
param0.add(8242.699647177868);
param0.add(-9259.146104439229);
param0.add(7712.806145993083);
param0.add(-4998.858862079315);
param0.add(9771.127582524628);
param0.add(-5415.8106399098115);
param0.add(670.0774772280249);
param0.add(-7068.634369272122);
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.001)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,257 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SEARCH_INSERT_AND_DELETE_IN_A_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_INSERT_AND_DELETE_IN_A_SORTED_ARRAY{
static int f_gold ( int arr [ ] , int low , int high , int key ) {
if ( high < low ) return - 1 ;
int mid = ( low + high ) / 2 ;
if ( key == arr [ mid ] ) return mid ;
if ( key > arr [ mid ] ) return f_gold ( arr , ( mid + 1 ) , high , key ) ;
return f_gold ( arr , low , ( mid - 1 ) , key ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,10,73,91,98});
param0.add(new int[]{30,24,24,-8,64,50,46,-76,26,8,-92,-78,40,-86,96,14,60,38,6,-72,-6,-20,26,-26,0,2});
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[]{30,79,3,76,18});
param0.add(new int[]{-96,-90,-88,-84,-78,-78,-70,-68,-66,-66,-64,-64,-58,-56,-52,-42,-40,-38,-36,-30,-30,-28,-14,-8,0,14,16,22,24,26,36,40,40,48,48,50,52,54,54,58,64,74,82,88,94});
param0.add(new int[]{1,1,0,0,0,1,1,1,0,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,0,1});
param0.add(new int[]{2,8,8,14,15,16,17,17,18,18,24,25,25,26,36,37,39,39,40,44,46,47,51,54,56,57,57,61,61,67,68,69,72,76,77,81,82,82,82,85,85,87,94,94,98,99});
param0.add(new int[]{-4,84,20,-84,-6,-78,20,56,40,0,98,80,-94,36,-6,-98,50,66,-12,-58,-34,68,-80,-30,-82,-76,-38,-60,92,94,48,-84,20,-66,-32,-92,16,-96,-68,94,-46,30,32,-34,96,-92,-96,-86,-22});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{71,70,13,18,70,62,88,27,17,44,89,28,74,41,20,91,95,79,40,43,38,20,5});
List<Integer> param1 = new ArrayList<>();
param1.add(2);
param1.add(20);
param1.add(30);
param1.add(3);
param1.add(35);
param1.add(25);
param1.add(33);
param1.add(34);
param1.add(19);
param1.add(21);
List<Integer> param2 = new ArrayList<>();
param2.add(4);
param2.add(13);
param2.add(27);
param2.add(2);
param2.add(30);
param2.add(26);
param2.add(40);
param2.add(27);
param2.add(13);
param2.add(22);
List<Integer> param3 = new ArrayList<>();
param3.add(4);
param3.add(21);
param3.add(29);
param3.add(2);
param3.add(40);
param3.add(30);
param3.add(26);
param3.add(34);
param3.add(19);
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());
}
} | 1,258 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_NUMBER_SEGMENTS_LENGTHS_B_C.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_SEGMENTS_LENGTHS_B_C{
static int f_gold ( int n , int a , int b , int c ) {
int dp [ ] = new int [ n + 10 ] ;
Arrays . fill ( dp , - 1 ) ;
dp [ 0 ] = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( dp [ i ] != - 1 ) {
if ( i + a <= n ) dp [ i + a ] = Math . max ( dp [ i ] + 1 , dp [ i + a ] ) ;
if ( i + b <= n ) dp [ i + b ] = Math . max ( dp [ i ] + 1 , dp [ i + b ] ) ;
if ( i + c <= n ) dp [ i + c ] = Math . max ( dp [ i ] + 1 , dp [ i + c ] ) ;
}
}
return dp [ n ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(23);
param0.add(62);
param0.add(32);
param0.add(82);
param0.add(94);
param0.add(44);
param0.add(4);
param0.add(53);
param0.add(9);
param0.add(23);
List<Integer> param1 = new ArrayList<>();
param1.add(16);
param1.add(76);
param1.add(46);
param1.add(48);
param1.add(99);
param1.add(21);
param1.add(57);
param1.add(23);
param1.add(55);
param1.add(15);
List<Integer> param2 = new ArrayList<>();
param2.add(23);
param2.add(81);
param2.add(1);
param2.add(72);
param2.add(62);
param2.add(46);
param2.add(2);
param2.add(80);
param2.add(26);
param2.add(73);
List<Integer> param3 = new ArrayList<>();
param3.add(18);
param3.add(97);
param3.add(78);
param3.add(58);
param3.add(38);
param3.add(60);
param3.add(77);
param3.add(5);
param3.add(85);
param3.add(42);
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());
}
} | 1,259 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_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_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1{
static int f_gold ( int dist ) {
int [ ] count = new int [ dist + 1 ] ;
count [ 0 ] = 1 ;
count [ 1 ] = 1 ;
count [ 2 ] = 2 ;
for ( int i = 3 ;
i <= dist ;
i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ] ;
return count [ dist ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(37);
param0.add(82);
param0.add(87);
param0.add(80);
param0.add(92);
param0.add(58);
param0.add(98);
param0.add(53);
param0.add(11);
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());
}
} | 1,260 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_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 MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1{
public static int f_gold ( int a , int b , int c ) {
if ( a > b ) {
if ( b > c ) return b ;
else if ( a > c ) return c ;
else return a ;
}
else {
if ( a > c ) return a ;
else if ( b > c ) return c ;
else return b ;
}
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(43);
param0.add(76);
param0.add(57);
param0.add(10);
param0.add(59);
param0.add(92);
param0.add(49);
param0.add(16);
param0.add(33);
param0.add(66);
List<Integer> param1 = new ArrayList<>();
param1.add(24);
param1.add(54);
param1.add(5);
param1.add(13);
param1.add(47);
param1.add(14);
param1.add(62);
param1.add(95);
param1.add(41);
param1.add(63);
List<Integer> param2 = new ArrayList<>();
param2.add(7);
param2.add(66);
param2.add(40);
param2.add(4);
param2.add(56);
param2.add(50);
param2.add(65);
param2.add(12);
param2.add(90);
param2.add(46);
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());
}
} | 1,261 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS.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_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS{
static int f_gold ( String str ) {
int N = str . length ( ) ;
int [ ] [ ] dp = new int [ N + 1 ] [ N + 1 ] ;
for ( int i = 0 ;
i <= N ;
i ++ ) for ( int j = 0 ;
j <= N ;
j ++ ) dp [ i ] [ j ] = 0 ;
for ( int len = 1 ;
len <= N ;
len ++ ) {
for ( int i = 0 , j = len - 1 ;
j < N ;
i ++ , j ++ ) {
if ( len == 1 ) dp [ i ] [ j ] = 1 ;
else {
dp [ i ] [ j ] = 1 + dp [ i + 1 ] [ j ] ;
if ( str . charAt ( i ) == str . charAt ( i + 1 ) ) dp [ i ] [ j ] = Math . min ( 1 + dp [ i + 2 ] [ j ] , dp [ i ] [ j ] ) ;
for ( int K = i + 2 ;
K <= j ;
K ++ ) if ( str . charAt ( i ) == str . charAt ( K ) ) dp [ i ] [ j ] = Math . min ( dp [ i + 1 ] [ K - 1 ] + dp [ K + 1 ] [ j ] , dp [ i ] [ j ] ) ;
}
}
}
return dp [ 0 ] [ N - 1 ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("YCtLQtHLwr");
param0.add("47713514383248");
param0.add("0100101001111");
param0.add("XfdIYVn");
param0.add("45499225407");
param0.add("000100111001");
param0.add("ZoUQhQwoap");
param0.add("18579027952");
param0.add("00000001111");
param0.add("JD");
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());
}
} | 1,262 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM.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_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM{
static int f_gold ( int high [ ] , int low [ ] , int n ) {
if ( n <= 0 ) return 0 ;
return Math . max ( high [ n - 1 ] + f_gold ( high , low , ( n - 2 ) ) , low [ n - 1 ] + f_gold ( high , low , ( n - 1 ) ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,3,9,10,13,14,15,15,17,22,23,28,30,31,37,42,45,62,62,68,68,68,78,79,82,84,87,90,99});
param0.add(new int[]{-78,-12,26,80,50,4,-80,86,12,-2,18,-50,-90,56,-50,88,-62,96,-44,-82,56});
param0.add(new int[]{1});
param0.add(new int[]{21,28,13,48,26,49,16,70,81,35,74,12,97,61,10,84,94,78,40,30,30,84,41,4,95,79,38,29,9});
param0.add(new int[]{-80,-36,-32,-20,-14,-12,10,12,72});
param0.add(new int[]{1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1});
param0.add(new int[]{1,7,9,10,13,14,15,20,23,24,24,24,26,27,29,31,32,33,34,35,46,48,49,51,51,53,53,56,56,60,62,64,64,70,73,73,73,74,77,78,79,79,79,80,86,89,89,92,98});
param0.add(new int[]{56,48,40,-56,44,-86,-28,-32,-34,4,-94,-14,28,-74});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1});
param0.add(new int[]{85,13,35,57,8,48,65,54,88,7,66,30,47,51});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{5,10,11,14,16,22,24,30,34,35,37,37,39,41,42,42,43,55,57,63,71,76,83,83,85,90,91,97,99});
param1.add(new int[]{-44,-14,14,0,30,78,40,-12,-44,-16,60,-12,-50,-66,70,-98,-56,48,-82,94,14});
param1.add(new int[]{1});
param1.add(new int[]{49,88,25,93,24,56,47,44,33,27,86,57,21,25,64,44,37,99,36,54,17,29,37,17,26,43,61,27,21});
param1.add(new int[]{-76,-54,-50,-28,0,58,70,78,90});
param1.add(new int[]{0,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,0,1});
param1.add(new int[]{1,3,3,4,8,8,10,10,10,12,12,15,15,22,23,28,28,30,31,33,34,35,36,36,36,42,44,44,51,54,57,58,59,59,63,65,66,68,69,71,73,76,77,78,79,79,86,87,93});
param1.add(new int[]{82,-40,-16,-64,12,-6,60,48,-58,-4,42,-28,24,-58});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1});
param1.add(new int[]{1,42,42,89,3,21,49,98,4,59,26,85,53,34});
List<Integer> param2 = new ArrayList<>();
param2.add(18);
param2.add(16);
param2.add(0);
param2.add(25);
param2.add(4);
param2.add(24);
param2.add(31);
param2.add(8);
param2.add(16);
param2.add(8);
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());
}
} | 1,263 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_SUM_MODULO_K_FIRST_N_NATURAL_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 FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER_1{
static int f_gold ( int N , int K ) {
int ans = 0 ;
int y = N / K ;
int x = N % K ;
ans = ( K * ( K - 1 ) / 2 ) * y + ( x * ( x + 1 ) ) / 2 ;
return ans ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(40);
param0.add(46);
param0.add(97);
param0.add(63);
param0.add(92);
param0.add(60);
param0.add(67);
param0.add(61);
param0.add(74);
param0.add(67);
List<Integer> param1 = new ArrayList<>();
param1.add(90);
param1.add(64);
param1.add(20);
param1.add(1);
param1.add(52);
param1.add(35);
param1.add(40);
param1.add(62);
param1.add(61);
param1.add(41);
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());
}
} | 1,264 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_PERIMETER_N_BLOCKS.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_PERIMETER_N_BLOCKS{
public static long f_gold ( int n ) {
int l = ( int ) Math . sqrt ( n ) ;
int sq = l * l ;
if ( sq == n ) return l * 4 ;
else {
long row = n / l ;
long perimeter = 2 * ( l + row ) ;
if ( n % l != 0 ) perimeter += 2 ;
return perimeter ;
}
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(45);
param0.add(80);
param0.add(54);
param0.add(48);
param0.add(83);
param0.add(68);
param0.add(32);
param0.add(20);
param0.add(68);
param0.add(66);
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());
}
} | 1,265 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/TURN_OFF_THE_RIGHTMOST_SET_BIT.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 TURN_OFF_THE_RIGHTMOST_SET_BIT{
static int f_gold ( int n ) {
return n & ( n - 1 ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(9);
param0.add(54);
param0.add(60);
param0.add(32);
param0.add(41);
param0.add(64);
param0.add(4);
param0.add(51);
param0.add(57);
param0.add(92);
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());
}
} | 1,266 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_REPEATED_CHARACTER_PRESENT_FIRST_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 FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING{
static int f_gold ( String s ) {
int p = - 1 , i , j ;
for ( i = 0 ;
i < s . length ( ) ;
i ++ ) {
for ( j = i + 1 ;
j < s . length ( ) ;
j ++ ) {
if ( s . charAt ( i ) == s . charAt ( j ) ) {
p = i ;
break ;
}
}
if ( p != - 1 ) break ;
}
return p ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("ORXMflacQFBv");
param0.add("39977638567848");
param0.add("011110011011");
param0.add("fYjfNy");
param0.add("222280492");
param0.add("11");
param0.add("UjntBg");
param0.add("6866190138212");
param0.add("0000");
param0.add("FWz PWEQgVlRZ");
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());
}
} | 1,267 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_REPETITIVE_ELEMENT_1_N_1_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_REPETITIVE_ELEMENT_1_N_1_1{
static int f_gold ( int arr [ ] , int n ) {
HashSet < Integer > s = new HashSet < Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( s . contains ( arr [ i ] ) ) return arr [ i ] ;
s . add ( arr [ i ] ) ;
}
return - 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{9,10,14,17,30,37,39,42,49,56,68,74,85,85,92});
param0.add(new int[]{62,-18,78,-32,38,90});
param0.add(new int[]{0,0,0,0,1,1,1,1,1,1});
param0.add(new int[]{56,1,96,81,49,18,39,87,97});
param0.add(new int[]{-98,-94,-80,-76,-60,-56,-56,-54,-48,-28,-14,-10,26,30,40,58,64,74,78,82,86,92,96,98});
param0.add(new int[]{1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,1,1,1,0});
param0.add(new int[]{5,7,19,20,22,29,33,35,35,36,37,40,44,49,50,53,60,60,61,62,68,68,69,72,72,81,81,83,85,85,90,91,92,97,98});
param0.add(new int[]{14});
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,1,1,1,1,1,1,1});
param0.add(new int[]{29,29,14,91,42,70,79,75,9,86,48,47,37,48,69,81,49,37,33,23,42,45,10,33,47,39,96,45,94,48,44,4,6,73,91});
List<Integer> param1 = new ArrayList<>();
param1.add(10);
param1.add(4);
param1.add(7);
param1.add(5);
param1.add(16);
param1.add(11);
param1.add(26);
param1.add(0);
param1.add(18);
param1.add(33);
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());
}
} | 1,268 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_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 FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
int ans = Integer . MIN_VALUE ;
for ( int i = 0 ;
i < n ;
i ++ ) {
int curr_xor = 0 ;
for ( int j = i ;
j < n ;
j ++ ) {
curr_xor = curr_xor ^ arr [ j ] ;
ans = Math . max ( ans , curr_xor ) ;
}
}
return ans ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,7,7,11,12,18,20,23,27,30,44,47,53,53,55,57,57,58,61,62,67,74,76,80,86,86});
param0.add(new int[]{-34,-4,68,-82,54,20,6,-18,-70,98,-40,80,-28,78,28,56,26,2,2,-56,-66,44,0,-72,12,54,-40,18,28,-48,-56,72,84,60,76,26,-8,62});
param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{33,98});
param0.add(new int[]{-92,-80,-76,-76,-74,-58,-44,-38,-34,-32,-30,-24,-20,-18,-4,-2,2,8,44,52,52,56,70,72,80,80,98});
param0.add(new int[]{0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0});
param0.add(new int[]{1,2,3,6,9,15,15,18,19,25,31,31,33,37,39,47,49,51,51,52,52,54,58,59,59,61,62,62,65,66,66,66,66,67,71,76,77,78,79,80,83,86,87,92,97,97,98,99});
param0.add(new int[]{34,-90,64,88,-46,-4,-96,76,-32,10,-8,-24,32,-4,86,-20,-86,-88,-72,64,12,66,-96,-84,16,-58,-48,80,-80,70,-94,-84,56,8,-14,86,72,-16,-18,74,40,34,20,80});
param0.add(new int[]{1,1});
param0.add(new int[]{57,76,2,30,24,12,49,12,5,75,55,17,62,87,21,91,88,10,20,49,46,79,51,33,94,59,48,97,70,49});
List<Integer> param1 = new ArrayList<>();
param1.add(13);
param1.add(21);
param1.add(12);
param1.add(1);
param1.add(15);
param1.add(33);
param1.add(38);
param1.add(35);
param1.add(1);
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());
}
} | 1,269 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/STRING_CONTAINING_FIRST_LETTER_EVERY_WORD_GIVEN_STRING_SPACES.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 STRING_CONTAINING_FIRST_LETTER_EVERY_WORD_GIVEN_STRING_SPACES{
static String f_gold ( String str ) {
String result = "" ;
boolean v = true ;
for ( int i = 0 ;
i < str . length ( ) ;
i ++ ) {
if ( str . charAt ( i ) == ' ' ) {
v = true ;
}
else if ( str . charAt ( i ) != ' ' && v == true ) {
result += ( str . charAt ( i ) ) ;
v = false ;
}
}
return result ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("t a");
param0.add("77 78 2 600 7");
param0.add("011 10 10");
param0.add("kV Co O iR");
param0.add("2");
param0.add("0 11");
param0.add("Y sT wgheC");
param0.add("58 824 6");
param0.add("00 100 001 0111");
param0.add("Q");
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());
}
} | 1,270 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_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_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY{
static int f_gold ( int [ ] arr , int n ) {
int SubsetSum_1 = 0 , SubsetSum_2 = 0 ;
for ( int i = 0 ;
i <= n - 1 ;
i ++ ) {
boolean isSingleOccurance = true ;
for ( int j = i + 1 ;
j <= n - 1 ;
j ++ ) {
if ( arr [ i ] == arr [ j ] ) {
isSingleOccurance = false ;
arr [ i ] = arr [ j ] = 0 ;
break ;
}
}
if ( isSingleOccurance ) {
if ( arr [ i ] > 0 ) SubsetSum_1 += arr [ i ] ;
else SubsetSum_2 += arr [ i ] ;
}
}
return Math . abs ( SubsetSum_1 - SubsetSum_2 ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,14,15,21,42,42,42,46,46,48,48,48,52,52,53,60,62,69,69,79,82,86,96});
param0.add(new int[]{-54,4,-22,94,58,-28,-12,84,64,4,-34,16,-10,-32,50,-78,68,-52,-64,66,64,-28,-38,-18,-84,-66,-36,64,-12,44,48,8,42});
param0.add(new int[]{0,0,0,1});
param0.add(new int[]{63,49,18,36,21,30,45,87});
param0.add(new int[]{-96,-78,-78,-72,-62,-56,-52,-44,-38,-38,-28,-22,-20,-12,-6,-6,-2,2,2,4,36,44,46,50,50,54,66,92});
param0.add(new int[]{0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,1,1,0});
param0.add(new int[]{1,2,8,12,13,13,14,17,18,27,28,31,34,37,38,42,43,45,49,52,53,56,56,58,62,66,71,74,87,93,96,99});
param0.add(new int[]{30,-28,-30,86,-8,-80,76,-2,28,30,82,84,-32,82,-88,-24,42,16,-32,-8,78,-8,-46,-6,-86,-86,-24,-12,-32,-72,84,-82,76,-84,80,-50,90,-50,-14,-82,78,48,-10,86,34,-20,-76,58});
param0.add(new int[]{0,1});
param0.add(new int[]{83,86,57,18,98,52,1,37,11,49,10,67,2,60,30,42,8,97,25,55,5,75,9,67});
List<Integer> param1 = new ArrayList<>();
param1.add(15);
param1.add(28);
param1.add(2);
param1.add(6);
param1.add(18);
param1.add(34);
param1.add(25);
param1.add(28);
param1.add(1);
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());
}
} | 1,271 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_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 RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_1{
static int f_gold ( int n ) {
int dp [ ] = new int [ n + 1 ] ;
dp [ 0 ] = 0 ;
dp [ 1 ] = 1 ;
for ( int i = 2 ;
i <= n ;
i ++ ) dp [ i ] = Math . max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ] , i ) ;
return dp [ n ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(50);
param0.add(83);
param0.add(18);
param0.add(24);
param0.add(31);
param0.add(38);
param0.add(94);
param0.add(24);
param0.add(13);
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());
}
} | 1,272 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN.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_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN{
static int f_gold ( int coin [ ] , int n , int k ) {
Arrays . sort ( coin ) ;
int coins_needed = ( int ) Math . ceil ( 1.0 * n / ( k + 1 ) ) ;
int ans = 0 ;
for ( int i = 0 ;
i <= coins_needed - 1 ;
i ++ ) ans += coin [ i ] ;
return ans ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,4,5,9,10,10,11,14,15,19,21,22,29,36,36,38,39,39,39,41,41,42,45,45,48,55,56,57,64,66,66,66,66,69,74,76,80,81,82,82,85,87,95,95});
param0.add(new int[]{-6,-52,20,-98,-10,48,36,66,-88,94,68,16});
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,1});
param0.add(new int[]{91,62,29,49,6,11,10,43,78,35,32,5,1,48,15,24,4,71});
param0.add(new int[]{-98,-92,-88,-84,-82,-78,-74,-74,-68,-62,-62,-56,-56,-50,-46,-44,-26,-18,-14,-8,-8,-6,8,16,20,20,22,26,36,42,44,44,52,60,66,68,68,70,76,84});
param0.add(new int[]{1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0});
param0.add(new int[]{5,12,38,39,52,54,62,81,87,93});
param0.add(new int[]{86,-18,-32,70,40,-76,-8,8,-84,-10,92,94,-18,-12,-26,-40,-74,60,16,-70,44,-32,40,-24,0,4});
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,1,1,1,1,1});
param0.add(new int[]{86,62,98,97,61,31,23,56,63,72,44,74,58,97});
List<Integer> param1 = new ArrayList<>();
param1.add(33);
param1.add(6);
param1.add(16);
param1.add(13);
param1.add(25);
param1.add(32);
param1.add(6);
param1.add(25);
param1.add(37);
param1.add(12);
List<Integer> param2 = new ArrayList<>();
param2.add(27);
param2.add(10);
param2.add(16);
param2.add(17);
param2.add(34);
param2.add(32);
param2.add(8);
param2.add(20);
param2.add(29);
param2.add(13);
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());
}
} | 1,273 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PADOVAN_SEQUENCE.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 PADOVAN_SEQUENCE{
static int f_gold ( int n ) {
int pPrevPrev = 1 , pPrev = 1 , pCurr = 1 , pNext = 1 ;
for ( int i = 3 ;
i <= n ;
i ++ ) {
pNext = pPrevPrev + pPrev ;
pPrevPrev = pPrev ;
pPrev = pCurr ;
pCurr = pNext ;
}
return pNext ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(92);
param0.add(29);
param0.add(52);
param0.add(55);
param0.add(13);
param0.add(83);
param0.add(83);
param0.add(10);
param0.add(67);
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());
}
} | 1,274 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CEILING_IN_A_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 CEILING_IN_A_SORTED_ARRAY{
static int f_gold ( int arr [ ] , int low , int high , int x ) {
int i ;
if ( x <= arr [ low ] ) return low ;
for ( i = low ;
i < high ;
i ++ ) {
if ( arr [ i ] == x ) return i ;
if ( arr [ i ] < x && arr [ i + 1 ] >= x ) return i + 1 ;
}
return - 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,3,4,6,8,9,9,10,11,16,19,20,21,21,21,24,24,25,28,30,30,30,32,34,35,39,41,42,49,52,57,59,61,62,66,68,71,73,76,79,83,84,85,86,87,87});
param0.add(new int[]{92,50,-84,60,32,-54,84,-82,-42,-72,-64,-28,-48,66,92,-42,42,-66,52,-30,48,42,36,-4,64,62,-16,0,20,26,78,78,12,-6,-30,-14,76,72,70,-34,98,32});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1});
param0.add(new int[]{26,68,73,76,14,19,56,80,17,7,15,64,99,98,21,21,72,12,14,10,44,82,25,42,46,86,79,43,91});
param0.add(new int[]{-90,-86,-84,-50,-30,-24,-12,-2,8,22,30,44,58,58,60,60,62,90});
param0.add(new int[]{0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,1,1});
param0.add(new int[]{2,2,29,31,34,39,48,50,56,61,66,66,69,73,88});
param0.add(new int[]{-98,48,-58,8,70,62,92,84,-58,-46,-26,-92,18,-88,40,-12,60,14,54,-64,88,52,-44,88,-46,-8,36,-22,28,-20,-50,58,-82,-44,-44,54,-86,40,10,0,-24,-84,-10,62,58,0,-88});
param0.add(new int[]{0,0,0,0,1,1});
param0.add(new int[]{56,30,33,5,67,35,22,54,36,55,94,89,40,65,29,76,17,14,14,49,40,44,35,69,63,2,81,78,19,67,12,14,68,30,82,85,12,2,94,33,85,75,97,31,69,31,85,26});
List<Integer> param1 = new ArrayList<>();
param1.add(23);
param1.add(36);
param1.add(11);
param1.add(23);
param1.add(9);
param1.add(12);
param1.add(9);
param1.add(40);
param1.add(5);
param1.add(46);
List<Integer> param2 = new ArrayList<>();
param2.add(37);
param2.add(35);
param2.add(9);
param2.add(27);
param2.add(16);
param2.add(15);
param2.add(12);
param2.add(29);
param2.add(5);
param2.add(47);
List<Integer> param3 = new ArrayList<>();
param3.add(44);
param3.add(34);
param3.add(13);
param3.add(26);
param3.add(10);
param3.add(18);
param3.add(10);
param3.add(24);
param3.add(5);
param3.add(47);
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());
}
} | 1,275 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_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_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_1{
static int f_gold ( int ar [ ] , int n ) {
if ( n <= 4 ) return Arrays . stream ( ar ) . min ( ) . getAsInt ( ) ;
int [ ] sum = new int [ n ] ;
sum [ 0 ] = ar [ 0 ] ;
sum [ 1 ] = ar [ 1 ] ;
sum [ 2 ] = ar [ 2 ] ;
sum [ 3 ] = ar [ 3 ] ;
for ( int i = 4 ;
i < n ;
i ++ ) sum [ i ] = ar [ i ] + Arrays . stream ( Arrays . copyOfRange ( sum , i - 4 , i ) ) . min ( ) . getAsInt ( ) ;
return Arrays . stream ( Arrays . copyOfRange ( sum , n - 4 , n ) ) . min ( ) . getAsInt ( ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,4,9,26,31,31,33,35,40,45,48,52,57,60,69,75,82,89,90,92,95,97});
param0.add(new int[]{60,-68,30,-62,-8,48,-20,30,16,-60,-20});
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,1,1,1,1});
param0.add(new int[]{15,70,50,28,67,11,27,42,1,61,37,8,66,54,50,91,86,57,4});
param0.add(new int[]{-98,-92,-84,-80,-70,-58,-58,-48,-42,-14,-8,24,30,32,42,62,68,70,72,88});
param0.add(new int[]{1,1,1,1,0,1,0,1,1,1,0,1,1,1,0});
param0.add(new int[]{4,5,5,10,12,13,16,19,19,21,22,25,26,29,30,33,34,44,46,52,55,55,56,78,86,88,88,90,92});
param0.add(new int[]{40,-50,-96,78,82,-16,26,8,38,38,54,-24,88,96,-42,-84,-28,-32,-64,74,74,-10,-8,66,14,-78,56,-22,-90,66,-68});
param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{29,38,20,25,16,97,16,90,30,99});
List<Integer> param1 = new ArrayList<>();
param1.add(19);
param1.add(5);
param1.add(43);
param1.add(15);
param1.add(16);
param1.add(7);
param1.add(16);
param1.add(26);
param1.add(7);
param1.add(9);
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());
}
} | 1,276 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.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_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X{
static int f_gold ( int [ ] arr1 , int [ ] arr2 , int m , int n , int x ) {
int count = 0 ;
for ( int i = 0 ;
i < m ;
i ++ ) for ( int j = 0 ;
j < n ;
j ++ ) if ( ( arr1 [ i ] + arr2 [ j ] ) == x ) count ++ ;
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98});
param0.add(new int[]{50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50});
param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{88,14,29,87,86,58});
param0.add(new int[]{-98,-92,-88,-86,-82,-76,-72,-66,-56,-48,-34,-28,-28,-26,-20,-18,-18,-16,-16,-12,-4,0,6,12,16,20,22,30,34,34,36,56,58,62,64,80,82,94});
param0.add(new int[]{1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,0});
param0.add(new int[]{70,70,74});
param0.add(new int[]{-20,-12,-50,76,24,64,-22,-4,-68});
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});
param0.add(new int[]{68,75,51,45,73,95,48,53,70,41,65,47,46,43,79,29,50});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{1,1,9,14,17,23,26,31,33,36,53,60,71,75,76,84,87,88});
param1.add(new int[]{34,-6,-66,0,-6,82,60,-98,-8,60,-2,4,22,76});
param1.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{91,95,64,4,63,35});
param1.add(new int[]{-94,-90,-88,-84,-82,-78,-76,-72,-70,-58,-58,-46,-42,-40,-40,-32,-22,-20,-18,-12,-8,-6,6,6,18,20,34,46,60,62,66,72,72,76,76,78,92,98});
param1.add(new int[]{1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0});
param1.add(new int[]{15,55,84});
param1.add(new int[]{18,98,-88,86,72,-44,82,94,58});
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,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{4,6,76,65,16,13,85,43,31,14,81,90,24,87,40,25,88});
List<Integer> param2 = new ArrayList<>();
param2.add(9);
param2.add(11);
param2.add(14);
param2.add(3);
param2.add(34);
param2.add(39);
param2.add(1);
param2.add(5);
param2.add(27);
param2.add(10);
List<Integer> param3 = new ArrayList<>();
param3.add(15);
param3.add(12);
param3.add(9);
param3.add(5);
param3.add(32);
param3.add(26);
param3.add(1);
param3.add(4);
param3.add(26);
param3.add(10);
List<Integer> param4 = new ArrayList<>();
param4.add(11);
param4.add(8);
param4.add(12);
param4.add(5);
param4.add(23);
param4.add(34);
param4.add(1);
param4.add(7);
param4.add(37);
param4.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),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());
}
} | 1,277 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_IF_A_NUMBER_IS_JUMBLED_OR_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_IF_A_NUMBER_IS_JUMBLED_OR_NOT{
static boolean f_gold ( int num ) {
if ( num / 10 == 0 ) return true ;
while ( num != 0 ) {
if ( num / 10 == 0 ) return true ;
int digit1 = num % 10 ;
int digit2 = ( num / 10 ) % 10 ;
if ( Math . abs ( digit2 - digit1 ) > 1 ) return false ;
num = num / 10 ;
}
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(67);
param0.add(77);
param0.add(35);
param0.add(79);
param0.add(45);
param0.add(22);
param0.add(68);
param0.add(17);
param0.add(5);
param0.add(85);
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());
}
} | 1,278 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/EFFICIENTLY_FIND_FIRST_REPEATED_CHARACTER_STRING_WITHOUT_USING_ADDITIONAL_DATA_STRUCTURE_ONE_TRAVERSAL.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 EFFICIENTLY_FIND_FIRST_REPEATED_CHARACTER_STRING_WITHOUT_USING_ADDITIONAL_DATA_STRUCTURE_ONE_TRAVERSAL{
static int f_gold ( String str ) {
int checker = 0 ;
for ( int i = 0 ;
i < str . length ( ) ;
++ i ) {
int val = ( str . charAt ( i ) - 'a' ) ;
if ( ( checker & ( 1 << val ) ) > 0 ) return i ;
checker |= ( 1 << val ) ;
}
return - 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("XFGfXTDgpIuerN");
param0.add("5621946166");
param0.add("11010110");
param0.add("xL");
param0.add("2575");
param0.add("0100010");
param0.add("SZmmQ");
param0.add("9735892999350");
param0.add("1001101101101");
param0.add("oEXDbOU");
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());
}
} | 1,279 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LONGEST_REPEATED_SUBSEQUENCE_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 LONGEST_REPEATED_SUBSEQUENCE_1{
static String f_gold ( String str ) {
int n = str . length ( ) ;
int [ ] [ ] dp = new int [ n + 1 ] [ n + 1 ] ;
for ( int i = 0 ;
i <= n ;
i ++ ) for ( int j = 0 ;
j <= n ;
j ++ ) dp [ i ] [ j ] = 0 ;
for ( int i = 1 ;
i <= n ;
i ++ ) for ( int j = 1 ;
j <= n ;
j ++ ) if ( str . charAt ( i - 1 ) == str . charAt ( j - 1 ) && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] ;
else dp [ i ] [ j ] = Math . max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) ;
String res = "" ;
int i = n , j = n ;
while ( i > 0 && j > 0 ) {
if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) {
res = res + str . charAt ( i - 1 ) ;
i -- ;
j -- ;
}
else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i -- ;
else j -- ;
}
String reverse = "" ;
for ( int k = res . length ( ) - 1 ;
k >= 0 ;
k -- ) {
reverse = reverse + res . charAt ( k ) ;
}
return reverse ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("qnQxjoRx");
param0.add("27473733400077");
param0.add("000010111111");
param0.add("TNVwgrWSLu");
param0.add("9537");
param0.add("1100");
param0.add("lYcoiQfzN");
param0.add("52");
param0.add("00100001100");
param0.add("Rkxe");
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());
}
} | 1,280 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_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 NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES{
static int f_gold ( int n ) {
int ans = 0 ;
for ( int length = 1 ;
length <= Math . sqrt ( n ) ;
++ length ) for ( int height = length ;
height * length <= n ;
++ height ) ans ++ ;
return ans ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(34);
param0.add(49);
param0.add(41);
param0.add(17);
param0.add(67);
param0.add(38);
param0.add(59);
param0.add(64);
param0.add(61);
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());
}
} | 1,281 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/POSITION_ELEMENT_STABLE_SORT.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_ELEMENT_STABLE_SORT{
static int f_gold ( int arr [ ] , int n , int idx ) {
int result = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] < arr [ idx ] ) result ++ ;
if ( arr [ i ] == arr [ idx ] && i < idx ) result ++ ;
}
return result ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,8,9,12,15,16,18,28,28,31,33,36,36,37,40,41,44,44,46,50,50,50,52,52,54,55,60,61,65,68,71,75,75,78,81,84,87,89,90,92,94,97,97,98,98,99});
param0.add(new int[]{-16,86,94,-86,-38,64,96,-64,94,10,-10,-62,-50,-46,-62,-32,-4,72,14,36,74,-66,46,82,-44,-22,-26,16,-8,0,-90,94,-50,22,-82,8,92,-84,-34,-36,-66});
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});
param0.add(new int[]{66,8,30,84,36,96,45,63,23,23,14,34,86,51,18,97,21,39,96,70,28,96,78,68,88,66,13,24,74,94});
param0.add(new int[]{-94,-90,-86,-86,-72,-72,-58,-50,-32,-22,-18,-10,-4,-2,-2,0,0,6,14,22,22,36,36,40,44,58,60,70,70,76,82,82,84,88,96});
param0.add(new int[]{1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1});
param0.add(new int[]{3,5,6,7,8,10,17,20,20,26,27,27,27,32,32,38,40,44,45,45,45,45,47,50,57,57,57,58,62,63,63,67,68,73,75,76,77,79,79,80,85,88,89,89,89,94,96,98});
param0.add(new int[]{98,-92,18,-18,44,-88,-90,-66,-38,78,-22,-46,-20,64,-10,54});
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,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{14,17});
List<Integer> param1 = new ArrayList<>();
param1.add(37);
param1.add(31);
param1.add(30);
param1.add(26);
param1.add(17);
param1.add(30);
param1.add(42);
param1.add(14);
param1.add(19);
param1.add(1);
List<Integer> param2 = new ArrayList<>();
param2.add(32);
param2.add(27);
param2.add(34);
param2.add(21);
param2.add(31);
param2.add(36);
param2.add(35);
param2.add(12);
param2.add(31);
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());
}
} | 1,282 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_SUBSTRINGS_DIVISIBLE_4_STRING_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 NUMBER_SUBSTRINGS_DIVISIBLE_4_STRING_INTEGERS{
static int f_gold ( String s ) {
int n = s . length ( ) ;
int count = 0 ;
for ( int i = 0 ;
i < n ;
++ i ) if ( s . charAt ( i ) == '4' || s . charAt ( i ) == '8' || s . charAt ( i ) == '0' ) count ++ ;
for ( int i = 0 ;
i < n - 1 ;
++ i ) {
int h = ( s . charAt ( i ) - '0' ) * 10 + ( s . charAt ( i + 1 ) - '0' ) ;
if ( h % 4 == 0 ) count = count + i + 1 ;
}
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("Qaq");
param0.add("9400761825850");
param0.add("0011001111");
param0.add("lasWqrLRq");
param0.add("5662");
param0.add("110");
param0.add(" tOYKf");
param0.add("6536991235305");
param0.add("11111");
param0.add("uZftT iDHcYiCt");
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());
}
} | 1,283 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SQUARE_ROOT_OF_A_PERFECT_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 SQUARE_ROOT_OF_A_PERFECT_SQUARE{
static float f_gold ( float n ) {
float x = n ;
float y = 1 ;
double e = 0.000001 ;
while ( x - y > e ) {
x = ( x + y ) / 2 ;
y = n / x ;
}
return x ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Float> param0 = new ArrayList<>();
param0.add(1763.655093333857F);
param0.add(-3544.737136289062F);
param0.add(7893.209433000695F);
param0.add(-3008.0331952533734F);
param0.add(6155.190186637041F);
param0.add(-5799.751467314729F);
param0.add(8234.151546380555F);
param0.add(-1829.5367705266551F);
param0.add(5778.227173218819F);
param0.add(-7785.473710863676F);
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());
}
} | 1,284 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/EFFICIENT_WAY_TO_MULTIPLY_WITH_7.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 EFFICIENT_WAY_TO_MULTIPLY_WITH_7{
static int f_gold ( int n ) {
return ( ( n << 3 ) - n ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(41);
param0.add(42);
param0.add(62);
param0.add(4);
param0.add(31);
param0.add(75);
param0.add(5);
param0.add(75);
param0.add(85);
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());
}
} | 1,285 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_BINOMIAL_COEFFICIENT_TERM_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 MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE{
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 maxvalue = 0 ;
for ( int i = 0 ;
i <= n ;
i ++ ) maxvalue = Math . max ( maxvalue , C [ n ] [ i ] ) ;
return maxvalue ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(23);
param0.add(41);
param0.add(69);
param0.add(56);
param0.add(71);
param0.add(38);
param0.add(26);
param0.add(52);
param0.add(93);
param0.add(44);
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());
}
} | 1,286 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM.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_THE_VOLUME_OF_A_TRIANGULAR_PRISM{
static float f_gold ( float l , float b , float h ) {
float volume = ( l * b * h ) / 2 ;
return volume ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Float> param0 = new ArrayList<>();
param0.add(8448.900678262902F);
param0.add(-1849.728957491451F);
param0.add(412.667844022232F);
param0.add(-5954.835911765373F);
param0.add(8437.913444665008F);
param0.add(-7183.181663518317F);
param0.add(2340.7905920227954F);
param0.add(-7281.157547371143F);
param0.add(471.3930826982504F);
param0.add(-7550.426360065503F);
List<Float> param1 = new ArrayList<>();
param1.add(8135.461799983198F);
param1.add(-4240.89241631363F);
param1.add(9798.083992381831F);
param1.add(-661.8872499003203F);
param1.add(8182.675681595904F);
param1.add(-6846.746446198541F);
param1.add(5479.00956987109F);
param1.add(-615.8705455524116F);
param1.add(1357.3753126091392F);
param1.add(-2693.2262997056355F);
List<Float> param2 = new ArrayList<>();
param2.add(6577.239053611328F);
param2.add(-9953.518310747193F);
param2.add(1449.9204200270522F);
param2.add(-8049.6051526695055F);
param2.add(9863.296545513396F);
param2.add(-971.2199894221352F);
param2.add(7073.449591910562F);
param2.add(-3343.0245192607968F);
param2.add(1907.815700915636F);
param2.add(-9110.64755244532F);
for(int i = 0; i < param0.size(); ++i)
{
if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i),param2.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i),param2.get(i))) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,287 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE.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_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE{
static int f_gold ( int arr [ ] , int n ) {
if ( n <= 0 ) return 0 ;
int incl = arr [ 0 ] ;
int excl = 0 ;
for ( int i = 1 ;
i < n ;
i ++ ) {
int incl_new = arr [ i ] + Math . min ( excl , incl ) ;
int excl_new = incl ;
incl = incl_new ;
excl = excl_new ;
}
return Math . min ( incl , excl ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,17,25,27,29,30,34,49,72,75,90,93,93,94});
param0.add(new int[]{-70,-32,62,0,-10,92,-94,-86,52,6,-26,-92,-10,70,-82,28,86,58,86,-58,84,-80,-18,-92,-34,6,34,36,70,-50,-6,-54,84,22,30,-96,-84,72,2,26,-20,4,48,-98,62,-28,-68});
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});
param0.add(new int[]{34,40,92,35,29,26,12,66,7,28,86,4,35,79,1,48,41,47,15,75,45,6,3,94,39,50,20,8,58,51,83,44,53,76,19,84,68,54,36,53});
param0.add(new int[]{-98,-98,-92,-92,-88,-82,-74,-70,-68,-68,-64,-60,-52,-52,-42,-42,-38,-36,-36,-34,-26,-24,-22,-12,-2,-2,4,6,44,44,48,54,62,62,64,74,78,82,86,86,90,90,94});
param0.add(new int[]{1,1,0,0,1,0,0,1,1,1});
param0.add(new int[]{9,15,19,29,30,39,40,61});
param0.add(new int[]{92,0,46,70,-60,-50,58,-56,8,-90,84,16,40,-62,50,78,26,-42,-40,98,-52,62,16,-62,-76,-70,-60,32,4,-68,52,-64,70,12,-10});
param0.add(new int[]{0,0,0,1,1,1,1});
param0.add(new int[]{32,96,63,93,53,1,22,19,50,74,6,94,81,85,4,86,88,75,94});
List<Integer> param1 = new ArrayList<>();
param1.add(8);
param1.add(36);
param1.add(21);
param1.add(29);
param1.add(36);
param1.add(5);
param1.add(4);
param1.add(21);
param1.add(5);
param1.add(18);
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());
}
} | 1,288 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON.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_SURFACE_AREA_OF_OCTAHEDRON{
static double f_gold ( double side ) {
return ( 2 * ( Math . sqrt ( 3 ) ) * ( side * side ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Double> param0 = new ArrayList<>();
param0.add(1449.255716877097);
param0.add(-8772.104874265995);
param0.add(2948.419328234334);
param0.add(-1184.220109553511);
param0.add(7422.825800698956);
param0.add(-5808.280006171851);
param0.add(829.8963781665169);
param0.add(-7368.438572511732);
param0.add(5572.033890611617);
param0.add(-3998.9441642787706);
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.001)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,289 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_OCCURRENCES_CHARACTER_APPEAR_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 CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER{
static boolean f_gold ( String s , char c ) {
boolean oneSeen = false ;
int i = 0 , n = s . length ( ) ;
while ( i < n ) {
if ( s . charAt ( i ) == c ) {
if ( oneSeen == true ) return false ;
while ( i < n && s . charAt ( i ) == c ) i ++ ;
oneSeen = true ;
}
else i ++ ;
}
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("gILrzLimS");
param0.add("307471222");
param0.add("110");
param0.add("GcAB");
param0.add("113");
param0.add("011110010");
param0.add("wcwob");
param0.add("74571582216153");
param0.add("100000011");
param0.add("ryPErkzY");
List<Character> param1 = new ArrayList<>();
param1.add('m');
param1.add('2');
param1.add('0');
param1.add('v');
param1.add('3');
param1.add('0');
param1.add('w');
param1.add('1');
param1.add('0');
param1.add('q');
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());
}
} | 1,290 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO.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_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO{
static long f_gold ( long a [ ] , int n ) {
Arrays . sort ( a ) ;
int i , j ;
Vector < Long > s = new Vector < > ( ) ;
for ( i = 0 , j = n - 1 ;
i < j ;
i ++ , j -- ) s . add ( ( a [ i ] + a [ j ] ) ) ;
long mini = Collections . min ( s ) ;
long maxi = Collections . max ( s ) ;
return Math . abs ( maxi - mini ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<long [ ]> param0 = new ArrayList<>();
param0.add(new long[]{11L,12L,14L,15L,20L,21L,28L,28L,30L,33L,39L,39L,42L,43L,44L,45L,48L,53L,53L,58L,59L,67L,68L,70L,70L,72L,74L,76L,76L,81L,87L,91L});
param0.add(new long[]{28L,-42L,-14L,0L,-56L,42L,14L,52L,58L,58L,92L,-62L,-14L,-12L,-84L,-30L,-94L,-70L,18L,-44L,88L,-60L});
param0.add(new long[]{0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L});
param0.add(new long[]{90L,8L,24L,31L,70L,61L,78L,67L,49L,28L,31L,4L,64L,66L,21L,61L,6L,49L,10L,46L,34L,31L,48L,28L,78L,70L,44L,9L,38L,2L,4L,36L,76L,37L,32L,97L,46L,85L,76L});
param0.add(new long[]{-98L,-78L,-68L,-58L,-26L,-10L,32L,42L,90L,96L});
param0.add(new long[]{1L,0L,0L,1L,0L,1L,1L,0L,0L,1L,0L,1L,1L,1L,1L,0L,1L,1L,0L,1L,1L,0L,0L,0L,1L,0L,1L,0L,1L,0L,0L,0L,1L,1L,0L,1L});
param0.add(new long[]{8L,17L,23L,25L,29L,32L,35L,35L,52L,56L,57L,59L,70L,71L,77L,88L,96L});
param0.add(new long[]{62L,-10L,82L,18L,46L});
param0.add(new long[]{0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L});
param0.add(new long[]{42L,71L,12L,33L,3L,58L,60L,60L,5L,52L,46L,53L,43L,50L,98L,53L,16L,82L,39L,93L,70L,13L,93L,69L,7L,92L,76L,11L,61L,48L,27L,28L,20L,76L,44L,24L,52L,56L,21L,82L,49L,5L,61L,76L,67L});
List<Integer> param1 = new ArrayList<>();
param1.add(31);
param1.add(11);
param1.add(19);
param1.add(37);
param1.add(8);
param1.add(35);
param1.add(16);
param1.add(3);
param1.add(20);
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());
}
} | 1,291 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_TO_CHECK_IF_A_MATRIX_IS_SYMMETRIC.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_CHECK_IF_A_MATRIX_IS_SYMMETRIC{
static boolean f_gold ( int mat [ ] [ ] , int N ) {
for ( int i = 0 ;
i < N ;
i ++ ) for ( int j = 0 ;
j < N ;
j ++ ) if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) return false ;
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ] [ ]> param0 = new ArrayList<>();
param0.add(new int[][]{new int[]{29}});
param0.add(new int[][]{new int[]{ 1, 3, 5 }, new int[]{ 3, 2, 4 }, new int[]{ 5, 4, 1 }});
param0.add(new int[][]{new int[]{ 1, 2, 5 }, new int[]{ 3, 2, 4 }, new int[]{ 5, 4, 1 }});
param0.add(new int[][]{new int[]{32,53,61,4,94,83,17,81,12,79,93,11,91,14,15},new int[]{13,34,5,70,47,93,43,97,24,44,49,93,33,2,34},new int[]{94,82,63,86,67,80,10,15,76,76,39,51,15,91,20},new int[]{71,90,63,91,53,14,13,78,84,44,96,39,66,80,82},new int[]{60,33,64,97,47,93,89,32,10,64,77,3,60,87,26},new int[]{69,81,93,32,34,95,76,38,85,22,30,53,84,86,2},new int[]{71,38,57,33,49,92,28,63,54,6,62,95,36,74,19},new int[]{6,34,8,6,41,89,15,22,4,73,86,56,18,24,99},new int[]{67,18,89,84,39,89,61,77,78,94,44,28,30,51,33},new int[]{82,64,52,28,73,14,69,99,54,49,7,44,60,1,51},new int[]{99,38,66,68,74,99,59,98,62,39,63,32,21,85,23},new int[]{15,1,29,94,19,33,88,70,10,46,47,55,18,71,10},new int[]{92,59,34,42,98,91,42,67,7,15,35,53,1,14,90},new int[]{22,84,62,36,99,16,63,6,22,7,95,17,80,50,59},new int[]{42,40,14,73,80,53,8,91,78,59,66,88,72,71,63}});
param0.add(new int[][]{new int[]{93,91,59,11,73,34,33,29,78,95,52,61,39,63,91,82,75,35,18,71,19,42,64},new int[]{92,7,2,46,32,22,94,78,67,73,52,15,70,89,48,40,60,4,21,67,60,67,39},new int[]{94,67,26,74,69,58,14,10,9,3,75,67,48,38,39,41,43,78,67,6,46,78,16},new int[]{25,44,27,86,54,56,75,43,59,83,83,80,94,72,94,56,8,51,29,14,12,13,12},new int[]{78,10,44,59,8,24,37,43,89,8,64,77,67,73,40,74,46,83,92,18,82,72,8},new int[]{59,36,96,21,3,88,16,83,55,22,22,77,12,60,92,72,9,84,79,68,24,48,45},new int[]{6,64,87,15,30,84,27,27,98,97,58,10,73,72,78,1,74,4,59,82,94,41,90},new int[]{43,14,29,73,37,22,88,99,36,95,58,15,61,7,99,91,42,98,25,64,44,6,4},new int[]{66,14,4,35,77,93,34,26,56,90,68,78,75,3,87,8,44,90,78,5,58,86,78},new int[]{12,67,94,20,3,33,77,18,75,26,7,90,3,1,17,12,73,81,82,23,91,2,27},new int[]{55,15,44,69,95,49,63,35,19,53,92,2,52,20,59,3,8,40,30,12,49,17,66},new int[]{23,39,27,57,19,44,66,32,33,43,23,14,80,57,98,57,58,62,40,44,47,84,46},new int[]{53,29,49,53,9,73,25,47,81,50,71,16,37,18,39,78,56,82,8,57,89,20,57},new int[]{1,88,13,75,52,97,30,81,57,5,22,51,79,74,1,46,79,42,42,93,64,21,79},new int[]{99,69,19,14,15,51,83,91,16,83,53,55,23,36,18,45,88,71,89,45,7,69,88},new int[]{84,85,20,74,87,46,33,15,34,79,5,9,91,64,60,28,9,50,36,9,31,45,55},new int[]{78,15,41,66,63,96,27,64,60,56,71,14,60,93,40,20,51,5,82,72,50,71,88},new int[]{60,86,20,27,20,6,8,79,22,35,42,77,92,20,93,69,3,27,69,60,20,23,96},new int[]{12,55,49,96,80,27,65,51,76,77,72,44,29,39,16,5,43,57,97,20,36,96,48},new int[]{50,2,12,39,53,63,12,34,34,12,17,6,30,86,37,87,80,26,48,40,31,46,66},new int[]{67,88,91,37,17,94,68,59,82,40,27,95,12,31,28,26,13,82,17,41,32,22,99},new int[]{80,50,3,22,59,95,16,66,40,56,86,56,78,14,62,69,27,47,80,68,87,74,95},new int[]{17,27,51,59,59,79,24,54,99,13,14,70,70,52,96,85,21,30,54,86,19,59,47}});
param0.add(new int[][]{new int[]{1,88,52,21,60,48,74,12,87,76,80,55,3,66,6,22,67,73,21,37,33,1,65,71,37,40,63,52,76,32,27,42,52},new int[]{29,46,66,46,83,25,99,65,57,28,18,63,18,24,51,29,19,31,95,86,29,20,66,68,46,19,7,42,16,52,33,39,43},new int[]{84,46,4,15,43,30,39,43,14,70,86,18,46,79,21,76,91,61,75,95,65,25,89,81,71,32,48,89,82,35,90,76,78},new int[]{8,22,76,32,46,13,33,1,92,67,80,50,32,10,1,71,47,7,62,52,68,4,57,89,5,71,55,67,57,99,75,76,39},new int[]{80,43,71,85,10,82,29,26,30,65,38,15,89,19,28,97,15,78,61,38,99,32,78,77,41,85,76,15,88,84,63,1,43},new int[]{14,2,8,11,20,44,59,17,12,84,74,21,67,4,88,54,27,95,74,68,76,79,90,34,1,59,52,45,18,73,50,34,54},new int[]{54,52,30,4,53,24,50,45,61,90,7,45,85,78,34,10,11,45,49,40,51,71,99,28,62,15,38,49,1,50,14,13,22},new int[]{57,85,41,37,82,73,95,5,31,65,86,57,15,90,29,54,41,91,34,85,76,35,55,98,33,42,87,8,83,99,91,30,84},new int[]{92,74,42,25,14,65,30,13,89,12,24,70,73,38,87,52,70,35,28,5,42,84,80,20,22,51,87,76,47,97,39,28,68},new int[]{47,72,21,48,50,49,76,62,35,80,72,5,76,90,37,73,41,92,40,58,72,2,50,86,94,80,48,24,91,33,70,94,42},new int[]{26,78,95,16,21,2,59,8,7,90,21,18,82,1,91,8,92,2,22,20,78,35,60,31,41,67,72,90,24,15,38,79,99},new int[]{38,81,95,66,5,2,2,90,38,37,10,91,72,74,99,24,24,95,4,40,14,26,12,27,6,27,14,22,49,20,3,73,80},new int[]{73,49,96,98,25,27,91,2,22,66,48,53,1,54,39,10,12,37,46,17,3,85,76,59,27,15,45,41,67,5,34,63,98},new int[]{85,13,89,14,82,61,3,3,45,96,18,32,96,44,93,37,99,27,40,24,56,36,99,6,71,78,17,61,27,44,70,3,39},new int[]{35,66,83,87,17,9,9,35,9,12,67,85,57,92,97,98,43,22,60,30,31,80,99,65,73,65,87,37,82,4,10,27,2},new int[]{55,68,40,97,8,15,61,7,94,24,20,55,5,7,2,74,77,21,3,53,14,53,80,63,54,72,24,78,50,6,88,93,26},new int[]{34,44,69,98,98,77,67,5,86,85,91,88,39,53,8,68,36,70,95,69,6,2,1,62,29,87,18,3,80,31,22,8,22},new int[]{77,29,80,10,46,34,56,59,33,78,96,23,15,25,26,12,64,19,49,19,96,74,91,23,56,63,52,64,18,99,50,13,66},new int[]{36,22,84,7,12,79,93,8,23,13,97,5,83,7,68,9,19,89,65,68,82,71,83,52,87,28,93,6,44,27,46,4,87},new int[]{30,45,58,62,54,24,96,75,30,90,80,57,53,70,89,84,10,1,44,59,11,76,20,76,60,44,16,79,62,90,56,75,3},new int[]{2,44,83,96,87,44,24,13,1,39,5,13,8,51,49,49,48,40,30,44,92,93,53,36,84,69,71,30,38,7,75,75,84},new int[]{33,79,68,51,10,38,40,3,24,2,23,51,59,42,19,8,26,82,44,48,73,36,9,97,11,41,62,88,24,32,33,81,90},new int[]{45,33,2,66,78,21,87,22,65,32,29,69,36,25,22,69,52,67,24,97,92,47,85,80,11,6,51,83,61,82,44,10,76},new int[]{33,64,15,76,50,5,1,38,98,12,30,11,73,44,46,71,81,52,63,26,27,97,39,5,73,87,94,36,1,52,8,1,74},new int[]{7,38,59,60,67,7,8,34,40,42,96,32,69,91,13,55,12,74,1,85,7,10,81,37,48,65,42,13,23,57,92,19,32},new int[]{10,82,8,16,35,58,81,48,48,23,26,55,23,50,23,54,56,45,71,12,22,17,77,48,78,71,50,83,59,39,71,60,91},new int[]{17,34,75,9,39,67,23,40,4,57,16,59,85,25,5,1,96,20,11,97,32,83,39,45,57,82,36,42,88,96,9,24,79},new int[]{47,46,86,98,59,10,2,42,7,1,9,42,26,79,57,22,87,3,11,56,86,62,40,78,16,98,5,53,72,66,11,45,62},new int[]{87,65,74,6,67,83,29,79,87,49,8,89,88,52,12,1,4,94,98,60,43,97,44,30,40,13,30,19,20,38,63,68,23},new int[]{89,11,31,76,41,98,57,30,80,96,82,8,95,36,77,82,62,35,27,6,64,74,37,47,44,71,80,66,43,57,47,89,90},new int[]{90,18,20,92,67,57,1,74,95,84,56,8,48,58,64,71,57,51,99,40,84,3,63,11,58,76,46,12,8,45,86,84,15},new int[]{49,31,46,94,40,31,20,2,6,78,26,97,87,89,37,92,99,71,59,66,64,17,91,48,66,12,80,32,18,62,16,5,24},new int[]{49,75,64,46,42,88,78,1,90,26,68,90,4,96,16,80,40,84,81,49,84,96,42,11,62,93,55,27,85,29,32,41,12}});
param0.add(new int[][]{new int[]{97,17,59,40,18,53,65,84,85,42,38,32,22,61,89,32,31,99,58,77,80,56,83,41,15,46,97,59,65,51,13,24,87,93,16,49,32,16,43,88,53,21,33,59,60},new int[]{27,29,33,50,32,46,28,51,26,48,58,47,63,47,70,19,79,81,98,65,19,67,81,46,78,75,80,54,94,91,82,87,49,27,56,44,75,77,44,23,90,42,64,34,99},new int[]{43,84,88,96,26,2,13,3,12,27,14,74,38,76,40,75,50,66,95,62,10,6,55,42,61,22,47,19,74,47,91,92,10,45,60,17,79,43,12,84,64,80,47,84,50},new int[]{27,22,91,13,59,69,81,98,22,94,67,71,15,71,3,29,6,49,91,65,54,34,58,8,89,15,38,11,73,27,77,76,11,58,35,44,57,87,21,28,7,77,95,35,81},new int[]{88,86,74,80,6,12,1,16,98,63,58,91,5,83,11,37,63,75,8,53,16,95,11,65,47,81,49,25,55,26,34,2,16,31,22,86,32,70,2,71,11,10,16,51,1},new int[]{35,39,74,59,99,77,78,76,44,3,38,75,98,25,87,72,64,27,50,4,62,88,60,63,13,31,64,14,84,86,76,67,96,5,96,76,92,91,87,68,69,45,9,9,93},new int[]{57,81,83,66,96,54,15,2,78,96,49,90,12,90,36,76,97,90,87,13,37,40,92,34,54,83,89,99,85,70,16,24,51,16,94,28,74,17,84,48,24,80,20,55,26},new int[]{29,22,20,96,29,87,57,98,76,83,17,86,10,82,69,1,90,89,77,39,46,12,20,6,18,2,73,33,54,1,75,22,68,21,29,20,69,51,27,97,18,22,41,37,18},new int[]{21,6,28,2,79,11,11,26,91,43,87,56,8,63,46,59,84,98,26,65,63,88,53,41,93,11,8,30,79,82,25,64,60,11,48,51,73,32,12,42,23,88,83,74,82},new int[]{15,94,47,98,42,39,13,42,23,45,22,60,27,52,69,11,40,6,67,32,74,40,20,18,98,82,2,13,56,46,62,77,47,59,90,64,12,12,12,23,18,24,47,91,70},new int[]{40,45,67,62,58,95,96,92,54,9,34,60,27,27,60,25,83,78,40,83,76,95,36,25,58,61,52,6,14,7,93,90,34,36,51,75,76,81,87,31,82,53,61,26,87},new int[]{50,8,23,75,95,19,22,41,81,49,57,91,31,17,17,98,99,11,84,60,4,58,3,72,36,43,83,20,5,90,86,55,26,50,74,88,52,96,61,89,15,53,34,16,47},new int[]{64,74,70,61,41,85,45,2,49,19,38,87,17,6,54,48,44,59,34,15,91,22,35,83,2,44,20,45,62,61,97,81,56,56,2,12,82,23,19,54,69,21,60,20,80},new int[]{6,59,90,96,99,23,54,18,42,85,48,13,28,14,94,37,99,47,53,41,40,22,35,77,9,80,77,18,53,73,8,19,80,75,43,92,32,19,7,24,23,7,40,79,23},new int[]{79,72,73,91,22,22,20,21,14,85,22,33,78,13,86,90,85,15,75,12,6,32,24,17,98,88,25,60,63,86,23,86,84,45,76,81,53,27,65,45,56,1,37,78,43},new int[]{90,67,47,22,16,72,11,25,17,50,89,84,15,7,22,32,89,15,10,5,81,6,3,31,43,72,33,23,43,12,10,33,13,48,6,24,27,92,63,99,24,55,10,20,22},new int[]{45,52,19,18,80,74,48,70,47,13,8,88,84,89,5,68,90,35,15,35,75,33,40,68,60,21,67,96,35,1,18,6,19,31,48,60,56,49,8,70,87,68,12,15,51},new int[]{68,10,30,46,76,42,39,8,59,61,70,81,87,50,7,97,53,7,96,93,30,77,54,38,82,30,85,30,18,62,98,29,49,45,51,20,31,47,83,13,77,45,70,57,87},new int[]{28,1,55,6,63,56,56,97,48,21,77,81,95,80,48,64,45,45,17,72,42,89,64,95,92,52,40,64,8,51,66,73,50,20,68,99,60,54,64,43,32,9,30,49,1},new int[]{49,96,37,62,18,86,55,83,16,85,49,64,57,39,68,15,12,80,64,93,89,77,20,34,19,75,93,92,19,82,49,29,20,28,8,40,46,56,99,69,41,89,84,71,28},new int[]{25,56,58,92,77,94,72,67,80,80,87,10,6,83,38,90,18,91,20,6,81,30,16,25,51,16,70,37,64,71,60,96,55,52,56,17,27,3,92,98,29,4,27,84,76},new int[]{99,74,14,56,22,24,90,11,84,72,29,73,38,70,92,90,9,45,26,89,52,6,21,60,59,21,91,11,20,17,98,51,64,55,86,16,85,77,98,54,54,56,7,96,13},new int[]{96,83,88,44,40,69,28,81,40,94,62,59,50,11,15,60,10,20,30,35,99,96,59,51,58,12,46,7,64,18,28,11,98,35,76,76,15,54,40,19,40,53,10,72,22},new int[]{21,20,69,1,27,36,33,90,63,14,86,32,11,93,93,74,65,49,84,94,34,61,56,95,39,50,30,14,35,25,53,56,29,40,65,53,99,64,21,81,14,10,74,1,12},new int[]{79,15,42,97,70,30,28,31,17,97,85,50,51,87,67,49,92,28,81,14,80,89,3,69,70,95,68,67,60,68,99,44,74,55,69,78,34,2,79,34,4,12,13,73,4},new int[]{31,44,56,6,71,62,82,94,22,78,12,48,46,72,25,42,75,55,25,80,81,54,92,68,98,26,6,52,85,64,58,57,72,68,75,34,2,83,39,67,73,95,76,12,73},new int[]{39,32,69,72,32,22,88,51,91,41,50,17,45,59,44,32,48,30,28,83,18,20,74,11,60,34,39,38,17,49,87,71,6,56,24,60,72,4,81,66,22,51,51,16,85},new int[]{40,8,71,64,71,4,25,59,70,82,79,85,16,55,24,11,71,42,3,41,22,26,4,16,63,17,19,79,7,66,55,45,87,72,1,17,39,8,57,85,50,55,26,95,53},new int[]{33,30,94,36,21,41,37,21,29,8,52,39,69,14,85,38,15,30,71,27,72,35,41,53,61,95,45,30,91,1,33,78,7,62,22,51,69,85,55,31,54,27,44,79,87},new int[]{60,53,17,94,36,66,2,97,20,10,69,58,81,47,63,39,62,82,60,73,74,32,63,39,18,24,2,16,79,51,84,54,56,62,71,82,89,77,60,75,72,91,20,64,98},new int[]{68,79,77,49,86,26,52,61,9,5,30,4,31,14,25,28,15,67,95,77,9,66,23,48,33,28,63,8,36,2,24,22,79,24,69,91,97,53,85,81,58,35,55,26,46},new int[]{25,85,11,24,78,24,73,2,6,25,81,3,5,32,48,55,93,36,36,25,56,28,35,13,79,60,27,75,6,56,27,42,94,97,38,55,19,86,13,68,6,29,94,89,61},new int[]{15,12,21,82,25,38,69,76,49,29,62,42,22,95,48,28,23,53,16,60,40,97,39,68,6,47,11,10,31,71,14,59,6,58,18,33,30,84,92,1,57,81,59,26,53},new int[]{18,24,18,39,79,36,90,32,84,70,91,72,39,86,37,38,71,73,34,98,28,63,73,30,41,95,8,8,78,9,98,25,9,64,3,96,27,74,66,82,59,40,24,23,41},new int[]{53,49,66,61,64,34,27,64,60,35,53,72,71,58,13,76,77,53,17,57,60,15,78,19,35,18,17,84,25,37,23,23,75,46,84,7,87,62,23,91,85,21,58,96,50},new int[]{28,66,93,9,35,61,68,86,23,6,84,69,12,59,65,39,41,3,42,43,85,66,96,29,47,92,97,26,15,45,90,73,61,85,20,49,27,65,9,58,51,38,84,19,44},new int[]{11,78,89,76,45,7,3,80,62,1,15,44,11,1,3,22,43,6,22,50,28,78,96,29,5,35,11,1,7,3,86,31,3,17,18,79,99,80,94,99,17,79,42,27,65},new int[]{30,30,69,65,4,11,58,13,10,88,84,18,87,42,99,44,62,91,79,24,30,65,41,67,24,32,63,4,98,1,21,8,46,12,1,22,78,89,28,72,64,40,89,55,87},new int[]{60,41,80,59,68,36,33,94,45,75,50,47,77,44,68,88,33,97,76,21,97,46,97,73,31,62,94,16,12,54,9,35,53,43,70,89,56,64,28,87,29,86,58,24,20},new int[]{27,97,19,90,38,60,3,23,59,91,91,74,24,56,52,41,66,98,22,66,28,88,38,86,67,58,37,2,57,87,77,79,97,45,53,77,84,7,77,39,68,63,46,91,96},new int[]{2,15,5,3,16,49,90,6,35,38,84,86,64,85,32,1,48,23,18,17,31,93,54,77,60,66,73,96,86,18,18,83,63,31,29,88,97,83,80,51,32,21,30,7,38},new int[]{12,59,92,14,71,17,23,77,20,5,6,13,3,53,31,3,8,71,50,71,75,88,59,21,20,93,74,49,80,74,38,33,69,59,12,8,70,87,48,67,38,93,34,4,7},new int[]{85,74,96,89,77,85,83,59,8,61,50,84,8,16,48,62,56,28,74,21,44,79,70,41,35,56,85,17,26,63,74,34,71,32,4,10,79,56,35,33,25,47,11,34,36},new int[]{17,12,80,97,26,74,13,82,85,87,87,36,69,45,79,88,12,83,97,89,38,77,88,67,76,66,20,40,34,22,15,97,66,35,98,91,31,77,53,94,90,88,57,65,38},new int[]{38,86,10,46,27,42,2,58,19,62,11,14,57,33,44,18,29,30,3,32,15,49,87,60,98,46,80,50,6,80,20,49,28,26,56,48,6,53,59,80,33,12,78,39,2}});
param0.add(new int[][]{new int[]{19,98,9,31,79,4,63,46,32,81,5,39,97,92,13,68,28,13,92,57,99,24,9,7,22,3,72,4,42,2,53,46,6,57,86,3,17,74,88,60,39,28,45,94},new int[]{92,4,82,39,3,65,97,16,46,94,40,55,97,36,60,95,36,36,47,48,10,22,28,36,32,13,34,63,65,80,91,22,31,48,93,22,71,55,40,4,78,43,81,65},new int[]{2,82,3,56,85,77,49,27,60,67,69,37,48,66,94,70,27,77,5,52,58,25,91,62,16,48,71,52,67,15,81,67,61,66,69,24,95,44,71,25,20,89,66,66},new int[]{10,50,70,11,93,30,85,27,42,36,45,97,27,56,37,70,39,8,76,47,67,54,9,43,12,40,3,97,77,12,37,7,70,41,4,87,4,67,38,27,11,93,93,37},new int[]{58,8,32,78,84,88,93,60,65,10,19,39,45,48,18,71,88,86,16,6,71,82,99,49,88,80,19,83,65,22,31,14,30,95,51,32,43,17,92,98,62,17,61,6},new int[]{93,9,31,30,59,73,10,64,33,3,93,53,41,78,15,10,80,97,92,39,24,79,13,83,11,13,40,59,96,54,61,90,59,80,17,13,13,15,11,1,35,82,44,58},new int[]{1,86,52,66,94,53,82,65,3,74,48,15,67,77,62,88,30,43,32,99,35,55,15,34,98,82,99,23,32,50,50,83,93,40,44,12,68,22,43,79,85,42,99,19},new int[]{72,79,4,25,51,60,37,26,73,44,55,50,31,70,25,60,6,19,5,69,59,54,5,49,20,54,77,73,78,13,97,48,87,94,63,82,82,43,78,12,39,91,57,93},new int[]{71,79,83,9,84,62,22,36,96,3,82,16,3,76,88,58,75,23,33,68,61,14,38,73,98,53,61,33,83,67,56,61,38,27,40,6,96,48,18,32,84,36,79,23},new int[]{14,85,46,3,7,17,68,58,50,99,70,96,99,46,59,22,72,91,28,2,59,54,66,63,27,7,12,8,9,86,18,92,38,34,70,95,15,61,68,5,87,77,61,27},new int[]{45,58,95,19,30,63,94,5,62,75,74,41,65,79,85,86,96,26,77,69,78,54,55,68,8,9,95,3,27,9,93,98,29,74,77,65,40,78,96,80,56,26,33,95},new int[]{72,25,97,94,1,1,27,68,37,24,44,88,6,39,65,93,88,77,92,15,64,31,86,76,17,26,77,53,41,45,81,26,51,92,38,50,42,42,32,85,9,80,5,38},new int[]{9,70,79,82,69,41,74,80,27,40,53,23,92,75,4,68,80,28,29,58,17,70,18,13,64,60,61,35,89,55,35,42,11,76,54,38,32,78,25,97,98,59,70,57},new int[]{41,4,7,99,19,31,20,21,25,12,98,17,96,1,79,65,63,25,71,34,44,70,1,79,77,21,77,40,17,17,76,34,39,75,14,79,87,4,33,25,41,86,32,1},new int[]{63,88,53,7,43,37,70,15,34,63,65,72,35,76,46,24,1,77,79,34,37,13,16,36,70,98,76,54,44,38,47,49,36,64,63,24,68,89,11,46,3,7,54,11},new int[]{65,41,55,59,26,54,14,47,16,12,93,59,32,10,93,83,55,73,89,19,39,9,17,91,8,87,55,77,41,8,13,77,55,81,20,69,25,16,43,82,59,73,35,10},new int[]{99,19,13,89,69,81,34,43,87,67,10,32,97,71,13,38,11,15,87,83,8,49,88,66,30,44,54,97,83,31,24,86,39,93,34,61,4,50,53,81,28,38,4,16},new int[]{42,43,64,31,79,9,68,83,34,88,11,35,28,92,11,38,98,15,61,8,65,24,50,10,17,78,1,11,41,3,17,64,75,88,33,32,25,91,47,43,81,81,57,40},new int[]{68,82,75,41,40,76,37,74,15,58,58,11,98,99,8,31,15,93,79,64,31,7,94,89,79,77,74,19,49,15,3,18,22,96,95,74,45,21,34,93,74,28,54,10},new int[]{32,78,32,52,30,56,72,19,22,88,28,41,43,69,73,72,59,56,82,40,77,70,16,18,42,81,2,82,64,11,55,2,2,57,18,86,16,27,17,54,17,6,97,13},new int[]{6,90,83,19,61,90,86,11,86,96,7,86,6,15,38,41,56,18,35,98,45,29,69,88,32,94,5,44,98,50,82,21,22,61,39,85,99,5,33,71,24,39,72,15},new int[]{70,5,87,48,20,76,21,86,89,12,66,30,7,58,18,60,18,92,48,34,72,83,6,45,60,71,84,24,93,92,69,17,62,33,62,6,3,74,54,11,87,46,4,7},new int[]{26,97,35,28,41,50,99,39,80,10,71,7,25,69,90,30,11,71,39,26,57,55,22,12,64,86,66,60,62,52,62,76,65,15,40,7,55,37,86,97,33,29,19,69},new int[]{14,9,5,35,85,28,45,2,6,31,32,75,59,14,74,59,1,55,31,59,8,66,99,95,12,31,99,96,81,57,8,19,53,11,57,69,59,28,2,11,64,18,47,53},new int[]{5,19,5,40,83,76,92,48,99,23,55,34,87,97,58,77,98,93,30,61,82,56,99,5,4,69,39,79,73,50,72,74,22,88,24,73,22,34,48,76,81,4,57,63},new int[]{30,65,97,91,78,4,35,33,51,12,68,98,78,2,91,95,33,91,45,56,28,98,30,34,1,52,13,82,40,65,9,70,72,72,88,49,25,26,26,40,34,8,2,82},new int[]{16,92,72,63,18,39,42,83,32,62,32,85,93,69,84,22,27,1,13,97,6,13,78,72,67,37,76,8,93,20,62,23,68,25,32,58,25,69,10,64,31,4,57,71},new int[]{34,21,83,7,98,58,33,42,53,85,55,50,38,81,46,81,15,8,49,53,37,83,93,38,97,28,61,97,7,99,72,7,59,21,25,67,32,48,55,75,85,96,66,23},new int[]{45,10,78,55,60,9,83,3,32,54,87,83,76,23,14,36,48,67,10,86,68,79,52,99,49,44,5,92,91,15,94,8,55,20,77,6,1,46,42,82,70,49,90,34},new int[]{57,17,89,63,61,59,92,79,4,91,33,20,21,41,74,44,32,64,37,61,26,22,40,59,50,77,96,73,39,16,98,74,88,10,45,90,34,63,68,93,86,89,11,84},new int[]{88,95,25,69,31,57,87,53,81,66,56,66,91,22,81,53,57,33,5,13,17,43,84,84,92,12,84,71,56,69,29,25,11,41,11,96,38,82,62,79,81,24,44,19},new int[]{37,5,4,1,94,17,43,50,30,64,82,36,1,69,82,29,81,85,66,36,62,20,83,54,82,13,47,75,97,28,55,43,44,21,94,53,47,96,87,25,96,41,31,13},new int[]{6,1,8,56,62,87,69,93,22,64,69,17,18,45,54,39,65,95,88,54,16,69,32,26,35,53,43,41,24,44,79,23,75,94,45,94,55,70,69,64,14,30,4,6},new int[]{39,18,51,56,89,57,59,61,17,97,38,76,81,89,37,17,91,31,14,53,36,86,5,40,70,69,88,22,14,25,84,65,49,35,52,92,29,58,72,82,31,21,6,9},new int[]{30,18,30,84,60,55,10,13,41,2,5,33,65,37,61,58,12,41,28,82,36,94,42,54,54,38,85,71,69,58,99,79,9,48,18,12,27,78,77,94,36,49,9,34},new int[]{76,50,89,50,22,5,15,18,77,15,89,98,66,21,87,81,61,4,48,1,7,61,53,95,35,21,60,76,5,3,59,76,10,46,50,62,59,94,17,56,44,19,18,26},new int[]{28,49,32,20,85,46,58,16,76,1,46,32,14,14,83,65,25,42,13,53,68,60,84,68,41,6,26,91,22,29,40,66,36,87,19,16,88,34,63,25,75,69,84,14},new int[]{21,90,44,52,79,85,80,75,48,78,85,62,80,2,42,66,28,5,8,73,81,83,42,26,95,98,93,74,58,11,97,95,22,54,93,41,85,40,12,16,43,26,94,87},new int[]{97,88,6,98,19,23,25,93,16,2,93,58,97,18,44,54,9,2,55,5,20,4,5,17,5,50,72,96,25,25,89,42,31,92,47,79,51,55,60,27,39,78,13,96},new int[]{35,48,14,36,53,39,5,72,10,2,95,39,25,34,79,56,81,22,33,70,58,82,30,63,67,95,12,10,62,63,36,56,6,31,33,74,63,38,26,16,24,24,73,25},new int[]{23,54,67,32,74,47,35,86,14,25,59,54,79,94,95,78,8,8,95,3,97,12,32,96,21,74,41,42,57,90,77,62,73,97,95,56,12,56,58,23,89,93,33,18},new int[]{41,12,62,58,4,13,31,22,39,58,30,34,95,6,90,49,45,77,93,50,26,39,86,52,4,35,5,28,21,73,10,55,33,40,5,73,81,33,81,70,91,91,78,5},new int[]{81,4,71,37,78,13,29,98,98,39,48,89,35,62,20,95,59,44,54,89,58,93,52,50,46,98,10,19,11,40,40,36,87,55,44,89,44,45,85,63,91,2,6,99},new int[]{73,20,55,97,47,93,27,1,13,67,65,84,58,90,76,70,50,9,55,36,20,10,10,31,84,89,45,31,9,88,4,45,24,78,72,91,53,94,78,40,58,82,77,29}});
param0.add(new int[][]{new int[]{91,36,24,57},new int[]{88,3,45,19},new int[]{49,9,86,22},new int[]{55,16,72,81}});
param0.add(new int[][]{new int[]{27,35,35,78,52,41,22,22,75,96,91,20,46,34,83,62,10,13,92,8,86,54,92,16,17,40,49,62,19,49,38,82,62,37,93,15,85},new int[]{61,56,7,36,86,37,70,40,78,17,1,44,66,42,45,46,55,21,5,84,41,86,40,87,65,13,88,89,92,68,23,4,40,61,58,98,84},new int[]{17,30,92,24,95,96,38,59,63,93,64,71,52,54,15,56,70,54,81,97,61,44,1,63,59,3,13,11,61,12,82,80,33,41,4,88,47},new int[]{46,54,71,9,83,93,70,36,58,86,86,38,43,67,25,78,5,18,28,30,70,95,18,25,34,72,92,71,63,98,25,65,59,66,98,96,63},new int[]{12,44,54,26,54,86,31,97,22,48,8,80,28,78,68,24,83,25,47,17,66,91,8,62,37,5,46,4,59,70,29,8,48,74,99,61,53},new int[]{74,64,16,76,25,79,64,78,60,70,67,27,17,89,35,69,62,94,82,84,27,44,81,63,98,56,8,57,76,61,99,3,47,14,45,79,39},new int[]{67,24,62,2,69,68,2,62,11,17,12,83,77,83,84,21,56,31,31,69,40,2,11,52,24,48,62,95,2,90,17,60,55,49,75,55,42},new int[]{77,90,94,20,72,64,84,75,28,75,73,36,27,6,28,13,87,47,11,85,39,24,75,45,90,48,42,84,59,29,68,82,46,58,12,32,95},new int[]{8,89,11,26,41,60,19,48,17,63,10,34,93,51,45,28,18,96,36,5,82,80,3,6,97,60,80,44,66,66,69,92,52,1,5,68,93},new int[]{66,79,5,59,95,26,14,41,75,83,74,52,42,81,82,60,89,15,47,33,95,37,47,36,70,46,52,72,75,26,29,2,24,18,33,85,86},new int[]{33,32,33,40,62,14,45,26,27,10,71,81,43,68,97,16,24,21,93,50,79,62,92,52,18,8,9,59,44,70,98,67,18,83,73,13,40},new int[]{69,47,24,37,44,46,44,75,60,74,3,17,51,5,35,82,91,90,57,31,77,60,80,50,22,80,72,32,18,33,64,45,38,30,64,42,13},new int[]{77,68,42,6,79,27,96,53,7,31,88,66,72,71,65,8,53,68,30,83,61,37,84,45,53,13,32,62,2,77,8,96,48,14,85,33,36},new int[]{85,59,70,69,48,30,28,41,76,58,41,11,6,20,91,29,73,48,71,85,82,15,2,97,75,53,55,70,13,44,58,17,41,25,69,14,29},new int[]{52,30,12,91,95,93,91,69,9,26,27,15,79,98,14,2,46,70,80,73,80,44,86,19,72,44,45,85,67,79,66,22,17,58,80,47,14},new int[]{41,69,55,21,80,31,32,80,9,37,9,21,56,8,24,80,95,20,5,50,2,67,58,96,89,99,30,15,93,2,70,93,22,70,93,62,81},new int[]{96,82,25,18,46,75,69,63,54,27,44,62,70,75,29,96,4,69,60,82,72,23,38,62,12,85,22,96,58,92,61,18,67,94,77,65,35},new int[]{39,26,17,50,32,22,39,89,32,88,59,8,44,30,77,23,64,77,30,70,94,98,17,88,73,54,19,31,25,97,38,55,50,37,35,96,60},new int[]{86,67,75,88,98,30,15,75,84,88,74,39,99,42,95,27,5,76,98,75,29,62,91,56,43,80,79,13,97,5,94,50,49,90,73,69,99},new int[]{55,59,1,67,9,26,66,92,20,90,14,2,21,59,19,46,15,32,36,78,35,9,98,95,25,41,44,74,98,49,55,15,66,62,26,42,35},new int[]{45,32,62,64,52,96,43,92,55,44,91,79,59,54,88,85,1,85,87,22,50,31,50,29,39,1,65,50,18,49,75,37,70,76,35,72,43},new int[]{65,43,66,35,34,42,80,8,6,40,68,23,63,14,89,58,36,34,76,21,45,58,15,45,17,50,88,55,92,31,31,85,97,10,66,53,11},new int[]{56,79,89,34,87,43,92,68,3,14,29,85,17,70,45,53,50,48,69,65,74,5,28,96,71,42,60,2,22,92,97,95,98,10,28,88,78},new int[]{36,61,2,51,34,35,43,11,32,38,47,81,85,95,5,64,86,53,29,1,30,26,86,10,13,25,15,1,75,44,35,13,19,48,12,73,84},new int[]{82,64,25,6,5,38,12,55,66,67,26,51,31,6,30,96,82,39,9,99,73,63,70,99,4,30,45,26,74,70,31,26,71,8,61,85,38},new int[]{48,62,97,16,3,62,56,67,99,87,12,88,55,13,15,7,24,13,19,67,5,50,74,64,48,49,84,80,63,7,98,34,79,5,57,74,42},new int[]{72,85,45,71,40,9,64,93,60,20,17,39,63,22,71,45,28,6,81,66,61,8,7,80,66,22,43,49,71,26,98,54,39,12,41,99,2},new int[]{52,93,84,53,55,19,26,37,13,87,25,58,47,23,3,51,78,79,35,78,17,6,58,84,48,10,14,27,68,83,52,51,45,66,57,27,47},new int[]{88,42,63,58,68,66,46,22,85,54,78,84,98,84,33,73,42,38,77,13,55,69,97,58,49,50,46,1,91,39,6,52,68,73,63,90,2},new int[]{61,24,64,5,65,50,55,35,71,4,50,85,73,90,58,1,20,75,32,13,28,10,2,5,71,97,71,66,14,85,18,14,13,83,21,30,35},new int[]{96,51,55,58,82,71,12,74,38,3,46,73,57,71,26,46,48,18,63,44,57,59,82,62,46,18,85,15,6,60,59,82,23,32,35,55,35},new int[]{2,24,90,62,90,44,4,22,51,16,56,30,66,37,18,19,94,9,31,82,69,74,86,49,40,80,23,94,60,10,75,92,30,25,27,72,74},new int[]{98,93,17,27,23,91,74,80,70,1,89,49,17,33,32,14,4,96,62,17,89,14,6,11,28,9,72,30,60,44,38,80,64,84,74,62,53},new int[]{99,7,63,10,21,94,70,34,12,75,55,68,87,33,33,14,2,3,52,18,35,68,8,71,37,44,26,11,57,81,69,77,20,99,82,14,77},new int[]{86,13,54,5,89,15,79,15,86,36,85,17,13,59,94,16,60,16,50,99,49,2,8,91,69,92,58,52,5,23,42,74,26,71,82,83,2},new int[]{89,44,88,67,64,70,91,85,18,33,46,80,57,85,66,51,45,2,39,3,80,28,28,97,31,44,20,11,11,39,6,64,63,60,63,31,38},new int[]{99,18,9,42,28,67,23,10,5,2,25,60,87,67,53,17,41,33,92,5,87,73,70,6,73,81,13,3,73,14,67,36,84,46,82,1,20}});
List<Integer> param1 = new ArrayList<>();
param1.add(0);
param1.add(3);
param1.add(3);
param1.add(13);
param1.add(12);
param1.add(22);
param1.add(34);
param1.add(37);
param1.add(3);
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());
}
} | 1,292 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_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 FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE{
static int f_gold ( int n ) {
int count = 0 , ans = 1 ;
while ( n % 2 == 0 ) {
count ++ ;
n /= 2 ;
}
if ( count % 2 == 1 ) ans *= 2 ;
for ( int i = 3 ;
i <= Math . sqrt ( n ) ;
i += 2 ) {
count = 0 ;
while ( n % i == 0 ) {
count ++ ;
n /= i ;
}
if ( count % 2 == 1 ) ans *= i ;
}
if ( n > 2 ) ans *= n ;
return ans ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(95);
param0.add(48);
param0.add(3);
param0.add(10);
param0.add(82);
param0.add(1);
param0.add(77);
param0.add(99);
param0.add(23);
param0.add(61);
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());
}
} | 1,293 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_SUM_NON_REPEATING_DISTINCT_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 FIND_SUM_NON_REPEATING_DISTINCT_ELEMENTS_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
int sum = 0 ;
HashSet < Integer > s = new HashSet < Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( ! s . contains ( arr [ i ] ) ) {
sum += arr [ i ] ;
s . add ( arr [ i ] ) ;
}
}
return sum ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,6,8,10,21,22,27,32,35,36,43,44,46,48,49,55,60,61,69,69,71,72,73,78,88,94});
param0.add(new int[]{80,94,16,-74,32,-64,-84,-66,-10});
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[]{99,4,96,39,39,24,15,47,25,74,7,98,88,91,62,12,31,14,48,26,37,25,11,32,34,64,72,5,80,86,6});
param0.add(new int[]{-86,-84,-84,-78,-78,-76,-74,-68,-66,-64,-60,-60,-56,-50,-42,-42,-38,-34,-32,-22,-16,-14,-10,-6,-6,4,4,26,36,36,54,62,64,68,70,76,76,76,84,92,92,94,96});
param0.add(new int[]{1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1});
param0.add(new int[]{3,3,5,8,32,33,35,35,42,48,67,71,71,74,77,80,94,96,96,97});
param0.add(new int[]{-50,-18,-66,76,-54,96,98,26,42,64,-60});
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,1,1});
param0.add(new int[]{70,21,44,82,62,41,86});
List<Integer> param1 = new ArrayList<>();
param1.add(24);
param1.add(6);
param1.add(27);
param1.add(15);
param1.add(27);
param1.add(25);
param1.add(19);
param1.add(9);
param1.add(15);
param1.add(3);
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());
}
} | 1,294 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/C_PROGRAM_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 C_PROGRAM_FACTORIAL_NUMBER{
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(84);
param0.add(41);
param0.add(5);
param0.add(38);
param0.add(79);
param0.add(80);
param0.add(64);
param0.add(62);
param0.add(24);
param0.add(12);
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());
}
} | 1,295 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_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 FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_1{
static String f_gold ( String seq ) {
int n = seq . length ( ) ;
if ( n >= 9 ) return "-1" ;
char result [ ] = new char [ n + 1 ] ;
int count = 1 ;
for ( int i = 0 ;
i <= n ;
i ++ ) {
if ( i == n || seq . charAt ( i ) == 'I' ) {
for ( int j = i - 1 ;
j >= - 1 ;
j -- ) {
result [ j + 1 ] = ( char ) ( ( int ) '0' + count ++ ) ;
if ( j >= 0 && seq . charAt ( j ) == 'I' ) break ;
}
}
}
return new String ( result ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("D");
param0.add("I");
param0.add("DD");
param0.add("II");
param0.add("DIDI");
param0.add("IIDDD");
param0.add("DDIDDIID");
param0.add("176297");
param0.add("1");
param0.add("XHkhZq");
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());
}
} | 1,296 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS.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_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS{
public static int f_gold ( int stack1 [ ] , int stack2 [ ] , int stack3 [ ] , int n1 , int n2 , int n3 ) {
int sum1 = 0 , sum2 = 0 , sum3 = 0 ;
for ( int i = 0 ;
i < n1 ;
i ++ ) sum1 += stack1 [ i ] ;
for ( int i = 0 ;
i < n2 ;
i ++ ) sum2 += stack2 [ i ] ;
for ( int i = 0 ;
i < n3 ;
i ++ ) sum3 += stack3 [ i ] ;
int top1 = 0 , top2 = 0 , top3 = 0 ;
int ans = 0 ;
while ( true ) {
if ( top1 == n1 || top2 == n2 || top3 == n3 ) return 0 ;
if ( sum1 == sum2 && sum2 == sum3 ) return sum1 ;
if ( sum1 >= sum2 && sum1 >= sum3 ) sum1 -= stack1 [ top1 ++ ] ;
else if ( sum2 >= sum3 && sum2 >= sum3 ) sum2 -= stack2 [ top2 ++ ] ;
else if ( sum3 >= sum2 && sum3 >= sum1 ) sum3 -= stack3 [ top3 ++ ] ;
}
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,10,11,24,27,33,34,36,36,40,42,43,52,58,67,69,77,86,86,88});
param0.add(new int[]{40,54,14,58,-64,-60,-98,-64,-52,30,0,-42,74,46,-14,76,84,74,-24,30,96,88,-98,82,44,-86,-92,-52,28,62});
param0.add(new int[]{0,0});
param0.add(new int[]{64,40,45,93,30,79,24,95,1,84,74,5,9,6,22,33,10,53,33,9,31,21,22,77,21,93,86,68,92,57,27,82,87,11,51,2,27,2,24,57,20,2,32,43});
param0.add(new int[]{-94,-50,-24,-12,-6,-6,8,26,28,44});
param0.add(new int[]{1,1,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,1});
param0.add(new int[]{3,3,4,5,9,18,21,22,25,27,28,33,35,39,39,43,57,58,59,63,65,65,72,77,78,78,80,80,88,92,99});
param0.add(new int[]{40,28,-84,-38,82,2,38,10,-10,20,-54,48,56,38,-98,68,-8,-30,-96,-16,28,94,-52,28,34,68,-46,44,-28,-52,-48,-14,-30,24,56,8,-30,-46,18,-68,86,-12});
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,1,1,1});
param0.add(new int[]{22,31,75,48,30,39,82,93,26,87,77,87,67,88,19,51,54,48,6,37,38,27});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{4,13,34,40,41,47,47,52,55,62,66,66,69,70,73,74,75,76,85,98});
param1.add(new int[]{24,34,-52,50,-8,-48,-28,68,-12,-26,0,6,-76,-94,-12,8,38,-88,30,98,-78,-54,-48,42,26,-76,4,46,26,60});
param1.add(new int[]{1,1});
param1.add(new int[]{48,85,55,12,24,26,88,76,15,34,23,61,2,99,11,37,65,74,92,96,68,50,67,98,89,17,62,18,51,61,41,41,90,64,89,51,48,95,9,86,28,54,64,35});
param1.add(new int[]{-96,-94,-86,-70,-52,-18,-6,20,52,52});
param1.add(new int[]{1,0,0,0,0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,1,0,1,1});
param1.add(new int[]{3,17,18,23,24,24,26,28,34,48,53,54,56,61,64,67,69,74,77,79,79,81,81,82,84,84,85,86,88,92,96});
param1.add(new int[]{26,24,-50,18,78,-90,62,88,-36,-96,78,6,-94,-2,-28,-38,66,72,-36,14,-48,-64,-24,82,92,-16,-26,-12,6,34,30,-46,48,-22,34,-64,4,-32,84,-20,32,-22});
param1.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});
param1.add(new int[]{18,20,53,87,85,63,6,81,89,82,43,76,59,60,79,96,29,65,5,56,96,95});
List<int [ ]> param2 = new ArrayList<>();
param2.add(new int[]{6,8,10,12,14,29,41,52,53,54,55,66,69,73,77,77,78,80,90,99});
param2.add(new int[]{-8,-24,54,28,92,94,0,62,28,80,82,2,88,-4,-28,80,44,34,-98,36,28,76,-48,40,98,4,22,-36,-20,-70});
param2.add(new int[]{0,0});
param2.add(new int[]{99,77,11,20,33,91,5,68,75,67,37,70,59,26,2,62,6,97,95,38,46,89,29,61,27,93,26,74,98,85,91,92,40,97,58,44,20,57,65,62,65,26,74,58});
param2.add(new int[]{-70,-40,-22,4,12,12,38,54,72,74});
param2.add(new int[]{0,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,1,1,0,0,1,0});
param2.add(new int[]{1,3,5,8,15,16,27,27,27,28,29,30,32,35,36,37,44,47,57,65,69,70,70,76,76,83,85,87,88,90,92});
param2.add(new int[]{66,26,-90,-40,-52,-98,84,88,40,-92,30,28,32,92,18,-34,-42,64,-34,70,-72,28,44,34,76,-78,46,-48,20,54,-2,66,6,56,52,-98,-48,-70,-60,94,90,10});
param2.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});
param2.add(new int[]{10,76,49,36,41,18,60,44,81,34,56,7,13,83,82,16,7,38,33,55,91,54});
List<Integer> param3 = new ArrayList<>();
param3.add(10);
param3.add(26);
param3.add(1);
param3.add(42);
param3.add(5);
param3.add(39);
param3.add(24);
param3.add(32);
param3.add(16);
param3.add(19);
List<Integer> param4 = new ArrayList<>();
param4.add(12);
param4.add(28);
param4.add(1);
param4.add(27);
param4.add(5);
param4.add(34);
param4.add(16);
param4.add(37);
param4.add(23);
param4.add(16);
List<Integer> param5 = new ArrayList<>();
param5.add(18);
param5.add(15);
param5.add(1);
param5.add(31);
param5.add(5);
param5.add(26);
param5.add(29);
param5.add(41);
param5.add(22);
param5.add(17);
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),param5.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,297 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_SUM_MODULO_K_FIRST_N_NATURAL_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_MODULO_K_FIRST_N_NATURAL_NUMBER{
static int f_gold ( int N , int K ) {
int ans = 0 ;
for ( int i = 1 ;
i <= N ;
i ++ ) ans += ( i % K ) ;
return ans ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(11);
param0.add(36);
param0.add(71);
param0.add(74);
param0.add(66);
param0.add(38);
param0.add(2);
param0.add(73);
param0.add(79);
param0.add(30);
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(69);
param1.add(28);
param1.add(1);
param1.add(84);
param1.add(14);
param1.add(11);
param1.add(87);
param1.add(11);
param1.add(55);
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());
}
} | 1,298 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_NUMBER_CHARACTERS_TWO_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 MAXIMUM_NUMBER_CHARACTERS_TWO_CHARACTER_STRING{
static int f_gold ( String str ) {
int n = str . length ( ) ;
int res = - 1 ;
for ( int i = 0 ;
i < n - 1 ;
i ++ ) for ( int j = i + 1 ;
j < n ;
j ++ ) if ( str . charAt ( i ) == str . charAt ( j ) ) res = Math . max ( res , Math . abs ( j - i - 1 ) ) ;
return res ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("cI");
param0.add("76478");
param0.add("1");
param0.add("tr");
param0.add("10");
param0.add("01");
param0.add("Rmhzp");
param0.add("5784080133917");
param0.add("1100");
param0.add("OK");
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());
}
} | 1,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.