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/N_TH_ROOT_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 N_TH_ROOT_NUMBER{
static double f_gold ( int A , int N ) {
double xPre = Math . random ( ) % 10 ;
double eps = 0.001 ;
double delX = 2147483647 ;
double xK = 0.0 ;
while ( delX > eps ) {
xK = ( ( N - 1.0 ) * xPre + ( double ) A / Math . pow ( xPre , N - 1 ) ) / ( double ) N ;
delX = Math . abs ( xK - xPre ) ;
xPre = xK ;
}
return xK ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(94);
param0.add(74);
param0.add(29);
param0.add(29);
param0.add(18);
param0.add(96);
param0.add(3);
param0.add(35);
param0.add(51);
param0.add(19);
List<Integer> param1 = new ArrayList<>();
param1.add(85);
param1.add(1);
param1.add(4);
param1.add(11);
param1.add(6);
param1.add(92);
param1.add(61);
param1.add(85);
param1.add(88);
param1.add(54);
for(int i = 0; i < param0.size(); ++i)
{
if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i))) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,000 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/REPLACE_CHARACTER_C1_C2_C2_C1_STRING_S.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 REPLACE_CHARACTER_C1_C2_C2_C1_STRING_S{
static String f_gold ( String s , char c1 , char c2 ) {
int l = s . length ( ) ;
char [ ] arr = s . toCharArray ( ) ;
for ( int i = 0 ;
i < l ;
i ++ ) {
if ( arr [ i ] == c1 ) arr [ i ] = c2 ;
else if ( arr [ i ] == c2 ) arr [ i ] = c1 ;
}
return String . valueOf ( arr ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("IZTSMw j");
param0.add("7288334");
param0.add("010110000");
param0.add("b gJX");
param0.add("734");
param0.add("1");
param0.add("xCaUKdhA");
param0.add("4370992644981");
param0.add("01010");
param0.add("ZNIFGshaWA");
List<Character> param1 = new ArrayList<>();
param1.add('W');
param1.add('6');
param1.add('1');
param1.add('t');
param1.add('4');
param1.add('1');
param1.add('X');
param1.add('5');
param1.add('0');
param1.add('Q');
List<Character> param2 = new ArrayList<>();
param2.add('k');
param2.add('9');
param2.add('1');
param2.add('P');
param2.add('4');
param2.add('1');
param2.add('S');
param2.add('6');
param2.add('1');
param2.add('x');
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i)).equals(f_gold(param0.get(i),param1.get(i),param2.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,001 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_A_FIXED_POINT_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_A_FIXED_POINT_IN_A_GIVEN_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
int i ;
for ( i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] == i ) return i ;
}
return - 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{8,16,21,26,27,29,34,35,35,37,38,40,48,52,58,59,60,61,63,63,65,66,69,75,79,83,86,88,91,91,96});
param0.add(new int[]{22,-70,34,-44,84,54,14,-88});
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,1,1,1,1});
param0.add(new int[]{59,67,70,34,18,22,52,95,11,66,60,24,7,71,52,88,32,52,85,81,32,44,25,51,47,97,81,33,88,38,36,54,80,25,70,27,75,29,94});
param0.add(new int[]{-96,-96,-94,-88,-88,-82,-72,-72,-70,-70,-66,-64,-64,-62,-58,-54,-46,-44,-30,-26,-22,-8,-6,-2,0,26,30,30,34,42,42,48,64,76,90,96});
param0.add(new int[]{0,1,0,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,1,0,1,1});
param0.add(new int[]{2,2,4,7,10,15,16,16,23,24,27,39,42,58,60,64,72,74,78,78,78,80,80,84,85,86,88,88,90,92,93,94,95,96});
param0.add(new int[]{-68,-48,36,22,-80,-48,-74,-14,44,-46,-76,18,-16,-36,-68,0,-30,-56,42,92,82,64,-18,-6,-78,-86,26,86,36,-66,-50,18,-26,48,8});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{3,76,99,1,1,29,9,12,57,12,74,22,83,77,39,84,50,60,36,90,88,62,79,58,58,40,44,99,84,63,23,21,16,98,68,8,46});
List<Integer> param1 = new ArrayList<>();
param1.add(23);
param1.add(7);
param1.add(31);
param1.add(37);
param1.add(34);
param1.add(15);
param1.add(22);
param1.add(20);
param1.add(23);
param1.add(35);
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,002 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_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_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1{
static int f_gold ( int n ) {
return 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) / 2 ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(55);
param0.add(36);
param0.add(69);
param0.add(92);
param0.add(73);
param0.add(16);
param0.add(88);
param0.add(19);
param0.add(66);
param0.add(68);
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,003 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED_1.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED_1{
static Boolean f_gold ( int arr [ ] , int n ) {
HashSet < Integer > us = new HashSet < Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) us . add ( arr [ i ] ) ;
int count = 1 ;
int curr_ele = arr [ 0 ] - 1 ;
while ( us . contains ( curr_ele ) == true ) {
count ++ ;
curr_ele -- ;
}
curr_ele = arr [ 0 ] + 1 ;
while ( us . contains ( curr_ele ) == true ) {
count ++ ;
curr_ele ++ ;
}
return ( count == ( us . size ( ) ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{15,19,38,59,71});
param0.add(new int[]{-20,66,-22,-56,-6,94,70,-80,24,-26,-58,-76,-20,-8,-62,18,-56,-20,42,-40,-88,-74,64,-26,-92,66,-18,-64,66,12,24,-8,78,-82,14,-76});
param0.add(new int[]{0,0,1,1,1});
param0.add(new int[]{40,38,17,50,16,35,34,23,3,12,97,53,75,36,3,73,99,11,70,9,23,3,11,9,64,44,62,94,55,69,44,59,57,99,69,12,27,42,14,83,53,4,4});
param0.add(new int[]{-78,-36,-28,-16,-8,-4,4,4,10,14,30,30,32,32,38,46,54,72});
param0.add(new int[]{1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1});
param0.add(new int[]{7,32,54,70,79,88});
param0.add(new int[]{-38,48,-96,-84,10,70,-28,-66,40,-26,-24,-8,28,-6,6,-14,-2,-58,-6,-14,-58,-74,20,32,98,-24,-10,42,-4,-96,-56,-40,74,-98,-86,-94,12,80,10,-54,-44});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1});
param0.add(new int[]{49,87,18,19,56,25,64,94,43,97,74,79,13,36,72,46,10,84,2,11,41,87,55,38,89,92,65,57,62,16});
List<Integer> param1 = new ArrayList<>();
param1.add(3);
param1.add(26);
param1.add(4);
param1.add(26);
param1.add(16);
param1.add(38);
param1.add(5);
param1.add(30);
param1.add(12);
param1.add(21);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,004 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR.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_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR{
static int f_gold ( int n ) {
return n * ( n - 1 ) * ( n - 2 ) / 6 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(67);
param0.add(58);
param0.add(67);
param0.add(60);
param0.add(4);
param0.add(97);
param0.add(9);
param0.add(16);
param0.add(83);
param0.add(87);
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,005 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_SUM_EVEN_INDEX_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 FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS{
static int f_gold ( int n ) {
int C [ ] [ ] = new int [ n + 1 ] [ n + 1 ] ;
int i , j ;
for ( i = 0 ;
i <= n ;
i ++ ) {
for ( 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 ( i = 0 ;
i <= n ;
i += 2 ) sum += C [ n ] [ i ] ;
return sum ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(18);
param0.add(54);
param0.add(67);
param0.add(17);
param0.add(47);
param0.add(99);
param0.add(26);
param0.add(93);
param0.add(57);
param0.add(98);
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,006 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DECODE_MEDIAN_STRING_ORIGINAL_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 DECODE_MEDIAN_STRING_ORIGINAL_STRING{
static String f_gold ( String s ) {
int l = s . length ( ) ;
String s1 = "" ;
boolean isEven = ( l % 2 == 0 ) ? true : false ;
for ( int i = 0 ;
i < l ;
i += 2 ) {
if ( isEven ) {
s1 = s . charAt ( i ) + s1 ;
s1 += s . charAt ( i + 1 ) ;
}
else {
if ( l - i > 1 ) {
s1 += s . charAt ( i ) ;
s1 = s . charAt ( i + 1 ) + s1 ;
}
else {
s1 += s . charAt ( i ) ;
}
}
}
return s1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add(" EgvQCeqYpZtv");
param0.add("488540");
param0.add("0000101010111");
param0.add("syw");
param0.add("402355");
param0.add("0");
param0.add("wmHMlAtq");
param0.add("7962");
param0.add("111111");
param0.add("UbgRGDquop");
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,007 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING{
static String f_gold ( String str ) {
String mx = "" ;
for ( int i = 0 ;
i < str . length ( ) ;
++ i ) {
if ( mx . compareTo ( str . substring ( i ) ) <= 0 ) {
mx = str . substring ( i ) ;
}
}
return mx ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("HCoAefoaan");
param0.add("80336005");
param0.add("01111111110");
param0.add("qIH");
param0.add("4210598472796");
param0.add("10101");
param0.add("imqmKdatcgXjs");
param0.add("950509666021");
param0.add("10111101101");
param0.add("wasqgYFvz");
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,008 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_LARGEST_PRIME_FACTOR_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_LARGEST_PRIME_FACTOR_NUMBER{
static long f_gold ( long n ) {
long maxPrime = - 1 ;
while ( n % 2 == 0 ) {
maxPrime = 2 ;
n >>= 1 ;
}
for ( int i = 3 ;
i <= Math . sqrt ( n ) ;
i += 2 ) {
while ( n % i == 0 ) {
maxPrime = i ;
n = n / i ;
}
}
if ( n > 2 ) maxPrime = n ;
return maxPrime ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Long> param0 = new ArrayList<>();
param0.add(98L);
param0.add(8L);
param0.add(78L);
param0.add(65L);
param0.add(55L);
param0.add(10L);
param0.add(10L);
param0.add(37L);
param0.add(39L);
param0.add(15L);
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,009 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_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_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1{
static int f_gold ( int n ) {
int nCr = 1 , res = 1 ;
for ( int r = 1 ;
r <= n ;
r ++ ) {
nCr = ( nCr * ( n + 1 - r ) ) / r ;
res += nCr * nCr ;
}
return res ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(52);
param0.add(75);
param0.add(25);
param0.add(80);
param0.add(18);
param0.add(17);
param0.add(33);
param0.add(8);
param0.add(99);
param0.add(8);
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,010 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION.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_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION{
static int f_gold ( int a , int b ) {
String s = String . valueOf ( b ) ;
int i ;
for ( i = 0 ;
i < s . length ( ) ;
i ++ ) {
if ( s . charAt ( i ) != '9' ) break ;
}
int result ;
if ( i == s . length ( ) ) result = a * s . length ( ) ;
else result = a * ( s . length ( ) - 1 ) ;
return result ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(31);
param0.add(72);
param0.add(23);
param0.add(42);
param0.add(13);
param0.add(93);
param0.add(33);
param0.add(94);
param0.add(60);
param0.add(11);
List<Integer> param1 = new ArrayList<>();
param1.add(91);
param1.add(85);
param1.add(49);
param1.add(32);
param1.add(7);
param1.add(5);
param1.add(32);
param1.add(76);
param1.add(60);
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,011 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING_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_REPEATED_CHARACTER_PRESENT_FIRST_STRING_1{
public static int f_gold ( String s ) {
int p = - 1 , i , k ;
int MAX_CHAR = 256 ;
int hash [ ] = new int [ MAX_CHAR ] ;
int pos [ ] = new int [ MAX_CHAR ] ;
for ( i = 0 ;
i < s . length ( ) ;
i ++ ) {
k = ( int ) s . charAt ( i ) ;
if ( hash [ k ] == 0 ) {
hash [ k ] ++ ;
pos [ k ] = i ;
}
else if ( hash [ k ] == 1 ) hash [ k ] ++ ;
}
for ( i = 0 ;
i < MAX_CHAR ;
i ++ ) {
if ( hash [ i ] == 2 ) {
if ( p == - 1 ) p = pos [ i ] ;
else if ( p > pos [ i ] ) p = pos [ i ] ;
}
}
return p ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("iwLT");
param0.add("225168787");
param0.add("00100111");
param0.add("ktdzbGbqsvQ");
param0.add("5574573212164");
param0.add("01000110101101");
param0.add("ftiv");
param0.add("48956");
param0.add("10100111001101");
param0.add("YvhEOhhz");
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,012 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/WILDCARD_CHARACTER_MATCHING.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 WILDCARD_CHARACTER_MATCHING{
static boolean f_gold ( String first , String second ) {
if ( first . length ( ) == 0 && second . length ( ) == 0 ) return true ;
if ( first . length ( ) > 1 && first . charAt ( 0 ) == '*' && second . length ( ) == 0 ) return false ;
if ( ( first . length ( ) > 1 && first . charAt ( 0 ) == '?' ) || ( first . length ( ) != 0 && second . length ( ) != 0 && first . charAt ( 0 ) == second . charAt ( 0 ) ) ) return f_gold ( first . substring ( 1 ) , second . substring ( 1 ) ) ;
if ( first . length ( ) > 0 && first . charAt ( 0 ) == '*' ) return f_gold ( first . substring ( 1 ) , second ) || f_gold ( first , second . substring ( 1 ) ) ;
return false ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("g*ks");
param0.add("ge?ks*");
param0.add("g*k");
param0.add("*pqrs");
param0.add("abc*bcd");
param0.add("abc*c?d");
param0.add("*c*d");
param0.add("*?c*d");
param0.add("?*1");
param0.add("a*");
List<String> param1 = new ArrayList<>();
param1.add("geeks");
param1.add("geeksforgeeks");
param1.add("gee");
param1.add("pqrst");
param1.add("abcdhghgbcd");
param1.add("abcd");
param1.add("abcd");
param1.add("abcd");
param1.add("010111111001");
param1.add("CBzHMjUGCUJD");
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,013 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SMALLEST_ELEMENT_REPEATED_EXACTLY_K_TIMES_NOT_LIMITED_SMALL_RANGE.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class SMALLEST_ELEMENT_REPEATED_EXACTLY_K_TIMES_NOT_LIMITED_SMALL_RANGE{
public static int f_gold ( int a [ ] , int n , int k ) {
HashMap < Integer , Integer > m = new HashMap < Integer , Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) if ( m . containsKey ( a [ i ] ) ) m . put ( a [ i ] , m . get ( a [ i ] ) + 1 ) ;
else m . put ( a [ i ] , 1 ) ;
int res = Integer . MAX_VALUE ;
Set < Integer > s = m . keySet ( ) ;
for ( int temp : s ) if ( m . get ( temp ) == k ) res = Math . min ( res , temp ) ;
return ( res != Integer . MAX_VALUE ) ? res : - 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,5,5,8,11,13,14,15,15,16,18,23,24,26,28,31,33,39,39,39,40,41,44,51,53,55,55,59,59,61,64,65,74,74,76,76,76,77,87,88,88,94,95,96});
param0.add(new int[]{-98,-64,-44,20,-46,96,-48,-54,-26,30,-42,94,58,-58,-54,50,6,-34,-44,-50,-66,-14,-96,74,4,-86,56,-46,-94,-24,-80,58,34,24});
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});
param0.add(new int[]{55,78,71,60,41,82,45,66,46,5,92,49,57,16,49,40,77,40,44,47,52,58,33,3,27,37,38,56,3,32,7,17,43,35,79,66,50,63,97,12,16});
param0.add(new int[]{-90,-86,-74,-68,-64,-56,-30,-24,-14,-2,0,2,8,16,18,20,24,30,32,36,42,54,62,62,62,62,76,78,90,92,94});
param0.add(new int[]{0,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,1,1});
param0.add(new int[]{4,5,5,5,10,13,17,17,20,20,22,25,28,36,40,42,49,51,57,59,65,66,66,68,72,74,78,81,87,88,94,95});
param0.add(new int[]{-12,-20,-78,-10,6,26,-94,-48,22,-2,12,-68,-90,-22,-94,-94,-10,-66,62,-20,74,-90,54,-52,90,50,60,10,56,-32,52,-12,-84,66,-82,34,24,-8,-60,-20,-94,80});
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});
param0.add(new int[]{2,57,53,3,63,29,12,99,21,26,3,35,96,84,48,61});
List<Integer> param1 = new ArrayList<>();
param1.add(27);
param1.add(26);
param1.add(26);
param1.add(32);
param1.add(22);
param1.add(18);
param1.add(28);
param1.add(28);
param1.add(29);
param1.add(10);
List<Integer> param2 = new ArrayList<>();
param2.add(2);
param2.add(2);
param2.add(1);
param2.add(3);
param2.add(2);
param2.add(8);
param2.add(7);
param2.add(3);
param2.add(2);
param2.add(1);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
}
| 1,014 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_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_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1{
static int f_gold ( int n ) {
int der [ ] = new int [ n + 1 ] ;
der [ 0 ] = 1 ;
der [ 1 ] = 0 ;
der [ 2 ] = 1 ;
for ( int i = 3 ;
i <= n ;
++ i ) der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] ) ;
return der [ n ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(22);
param0.add(91);
param0.add(33);
param0.add(93);
param0.add(90);
param0.add(59);
param0.add(88);
param0.add(41);
param0.add(70);
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,015 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_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_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
int invcount = 0 ;
for ( int i = 0 ;
i < n - 2 ;
i ++ ) {
for ( int j = i + 1 ;
j < n - 1 ;
j ++ ) {
if ( arr [ i ] > arr [ j ] ) {
for ( int k = j + 1 ;
k < n ;
k ++ ) {
if ( arr [ j ] > arr [ k ] ) invcount ++ ;
}
}
}
}
return invcount ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{11,17,27,29,31,31,32,44,45,93});
param0.add(new int[]{-48,-10,-44,-94,50,-24,30,72,-6,56,94,-44,-96,-52,-2,68,-52,30,98,0,12,-98,-94,48,-96,-86});
param0.add(new int[]{0,0,0,1,1,1,1,1,1});
param0.add(new int[]{78,82,51,92,88,95});
param0.add(new int[]{-98,-96,-84,-72,-70,-62,-62,-58,-56,-54,-52,-52,-52,-50,-40,-40,-38,-36,-34,-26,-26,-22,-22,-20,-12,-8,-2,4,14,14,18,22,28,32,34,34,42,44,54,58,60,64,74,80,88,90,92,94,96});
param0.add(new int[]{1,0,0,0});
param0.add(new int[]{2,3,5,5,5,7,7,15,16,21,29,29,35,39,39,40,42,44,46,48,48,52,52,52,54,55,57,62,67,67,67,70,71,71,76,78,79,87,94,96});
param0.add(new int[]{-60,-42,20,52,-54,40,56});
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,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[]{98,81,23,71,82,31,15,21,4,68,68,22,77,83,22,9,10,56});
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(15);
param1.add(6);
param1.add(3);
param1.add(47);
param1.add(3);
param1.add(39);
param1.add(6);
param1.add(37);
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,016 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/BREAKING_NUMBER_FIRST_PART_INTEGRAL_DIVISION_SECOND_POWER_10.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 BREAKING_NUMBER_FIRST_PART_INTEGRAL_DIVISION_SECOND_POWER_10{
static int f_gold ( String N ) {
int len = N . length ( ) ;
int l = ( len ) / 2 ;
int count = 0 ;
for ( int i = 1 ;
i <= l ;
i ++ ) {
String s = N . substring ( 0 , i ) ;
int l1 = s . length ( ) ;
String t = N . substring ( i , l1 + i ) ;
if ( s . charAt ( 0 ) == '0' || t . charAt ( 0 ) == '0' ) continue ;
if ( s . compareTo ( t ) == 0 ) count ++ ;
}
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("ZCoQhuM");
param0.add("2674377254");
param0.add("11");
param0.add("LbuGlvRyWAPBpo");
param0.add("26382426486138");
param0.add("111010111010");
param0.add("hUInqJXNdbfP");
param0.add("5191");
param0.add("1110101101");
param0.add("2202200");
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,017 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DOUBLE_FACTORIAL_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 DOUBLE_FACTORIAL_1{
static int f_gold ( int n ) {
int res = 1 ;
for ( int i = n ;
i >= 0 ;
i = i - 2 ) {
if ( i == 0 || i == 1 ) return res ;
else res *= i ;
}
return res ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(88);
param0.add(24);
param0.add(3);
param0.add(22);
param0.add(53);
param0.add(2);
param0.add(88);
param0.add(30);
param0.add(38);
param0.add(2);
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,018 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME.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_WAYS_REACH_GIVEN_SCORE_GAME{
static int f_gold ( int n ) {
int table [ ] = new int [ n + 1 ] , i ;
Arrays . fill ( table , 0 ) ;
table [ 0 ] = 1 ;
for ( i = 3 ;
i <= n ;
i ++ ) table [ i ] += table [ i - 3 ] ;
for ( i = 5 ;
i <= n ;
i ++ ) table [ i ] += table [ i - 5 ] ;
for ( i = 10 ;
i <= n ;
i ++ ) table [ i ] += table [ i - 10 ] ;
return table [ n ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(83);
param0.add(29);
param0.add(17);
param0.add(12);
param0.add(93);
param0.add(55);
param0.add(97);
param0.add(75);
param0.add(22);
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,019 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ.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_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ{
public static int f_gold ( int n , int k ) {
if ( n + 1 >= k ) return ( k - 1 ) ;
else return ( 2 * n + 1 - k ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(90);
param0.add(86);
param0.add(92);
param0.add(72);
param0.add(25);
param0.add(11);
param0.add(94);
param0.add(91);
param0.add(66);
param0.add(34);
List<Integer> param1 = new ArrayList<>();
param1.add(74);
param1.add(36);
param1.add(38);
param1.add(71);
param1.add(57);
param1.add(53);
param1.add(80);
param1.add(75);
param1.add(58);
param1.add(88);
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,020 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_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 FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X{
static long f_gold ( long y , long x ) {
if ( ( Math . log ( y ) / Math . log ( 2 ) ) < x ) return y ;
if ( x > 63 ) return y ;
return ( y % ( 1 << ( int ) x ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Long> param0 = new ArrayList<>();
param0.add(57L);
param0.add(80L);
param0.add(84L);
param0.add(35L);
param0.add(3L);
param0.add(42L);
param0.add(7L);
param0.add(99L);
param0.add(13L);
param0.add(44L);
List<Long> param1 = new ArrayList<>();
param1.add(76L);
param1.add(46L);
param1.add(96L);
param1.add(16L);
param1.add(84L);
param1.add(79L);
param1.add(2L);
param1.add(83L);
param1.add(61L);
param1.add(8L);
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,021 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_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 WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_INTEGERS{
static int f_gold ( int n ) {
int table [ ] = new int [ n + 1 ] ;
Arrays . fill ( table , 0 ) ;
table [ 0 ] = 1 ;
for ( int i = 1 ;
i < n ;
i ++ ) for ( int j = i ;
j <= n ;
j ++ ) table [ j ] += table [ j - i ] ;
return table [ n ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(66);
param0.add(90);
param0.add(8);
param0.add(77);
param0.add(44);
param0.add(20);
param0.add(34);
param0.add(22);
param0.add(50);
param0.add(10);
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,022 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME{
static int f_gold ( int arr [ ] , int n ) {
int count = 0 ;
int cummulative_sum = 0 ;
Arrays . sort ( arr ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] >= cummulative_sum ) {
count ++ ;
cummulative_sum += arr [ i ] ;
}
}
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{7,33,34,42,42,45,73});
param0.add(new int[]{32,-10,-64,-20,92,-66,6,44,-62,-98,4,-48,44,42,12,-90,52,86,-30,-80,64,94,14});
param0.add(new int[]{0,0,0,0,1});
param0.add(new int[]{11,85,89,71,82,44});
param0.add(new int[]{-96,-92,-78,-72,-68,-58,-52,-50,-50,-48,-42,-32,-20,-18,-4,0,0,2,18,18,20,24,32,34,36,38,38,60,66,68,70,72,72,74,76,96,98});
param0.add(new int[]{0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1});
param0.add(new int[]{8,9,10,11,12,15,17,19,20,21,24,30,33,35,36,39,41,41,42,54,62,63,68,70,71,72,77,85,86,86,94,95,97,97});
param0.add(new int[]{96,22,-60,4,-94,-16,46,10,76,-90,4,70,-72,60,28,-24,-66,92,-70,72,36});
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[]{90,63,16,40,28,97,20,63,42,31,57,84,10,12,59,69,47,7,53,67});
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(16);
param1.add(2);
param1.add(3);
param1.add(21);
param1.add(16);
param1.add(31);
param1.add(20);
param1.add(13);
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,023 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_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 MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME{
static boolean f_gold ( String s ) {
int l = s . length ( ) ;
for ( int i = 0 , j = l - 1 ;
i <= j ;
i ++ , j -- ) {
if ( s . charAt ( i ) != s . charAt ( j ) ) {
return false ;
}
}
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("aadaa");
param0.add("2674377254");
param0.add("11");
param0.add("0011000 ");
param0.add("26382426486138");
param0.add("111010111010");
param0.add("abccba");
param0.add("5191");
param0.add("1110101101");
param0.add("abcdecbe");
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,024 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_STRING_CAN_OBTAINED_ROTATING_ANOTHER_STRING_2_PLACES.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_STRING_CAN_OBTAINED_ROTATING_ANOTHER_STRING_2_PLACES{
static boolean f_gold ( String str1 , String str2 ) {
if ( str1 . length ( ) != str2 . length ( ) ) return false ;
String clock_rot = "" ;
String anticlock_rot = "" ;
int len = str2 . length ( ) ;
anticlock_rot = anticlock_rot + str2 . substring ( len - 2 , len ) + str2 . substring ( 0 , len - 2 ) ;
clock_rot = clock_rot + str2 . substring ( 2 ) + str2 . substring ( 0 , 2 ) ;
return ( str1 . equals ( clock_rot ) || str1 . equals ( anticlock_rot ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("amazon");
param0.add("onamaz");
param0.add("amazon");
param0.add("ab");
param0.add("737009");
param0.add("000110");
param0.add("l");
param0.add("4420318628");
param0.add("11011111000000");
param0.add(" pvFHANc");
List<String> param1 = new ArrayList<>();
param1.add("azonam");
param1.add("amazon");
param1.add("azoman");
param1.add("ab");
param1.add("239119");
param1.add("01111");
param1.add("YVo hqvnGxow");
param1.add("52856");
param1.add("10");
param1.add("xBIDFbiGb");
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,025 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/REQUIRED_MINIMUM_DIGITS_REMOVE_NUMBER_MAKE_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 REQUIRED_MINIMUM_DIGITS_REMOVE_NUMBER_MAKE_PERFECT_SQUARE{
static int f_gold ( String s ) {
int n = s . length ( ) ;
int ans = - 1 ;
String num = "" ;
for ( int i = 1 ;
i < ( 1 << n ) ;
i ++ ) {
String str = "" ;
for ( int j = 0 ;
j < n ;
j ++ ) {
if ( ( ( i >> j ) & 1 ) == 1 ) {
str += s . charAt ( j ) ;
}
}
if ( str . charAt ( 0 ) != '0' ) {
int temp = 0 ;
for ( int j = 0 ;
j < str . length ( ) ;
j ++ ) temp = temp * 10 + ( int ) ( str . charAt ( j ) - '0' ) ;
int k = ( int ) Math . sqrt ( temp ) ;
if ( k * k == temp ) {
if ( ans < ( int ) str . length ( ) ) {
ans = ( int ) str . length ( ) ;
num = str ;
}
}
}
}
if ( ans == - 1 ) return ans ;
else {
System . out . print ( num + " " ) ;
return n - ans ;
}
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("h");
param0.add("1391212");
param0.add("010");
param0.add("ksRFLRVL");
param0.add("5809836998");
param0.add("1111000");
param0.add("hJoDzrrBaF");
param0.add("6076");
param0.add("001010010");
param0.add("lU DBBVF");
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,026 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_ROTATIONS_REQUIRED_GET_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 MINIMUM_ROTATIONS_REQUIRED_GET_STRING{
static int f_gold ( String str ) {
String tmp = str + str ;
int n = str . length ( ) ;
for ( int i = 1 ;
i <= n ;
i ++ ) {
String substring = tmp . substring ( i , str . length ( ) ) ;
if ( str == substring ) return i ;
}
return n ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("vdevdNdQSopPtj");
param0.add("5");
param0.add("100010101011");
param0.add("tlDOvJHAyMllu");
param0.add("06");
param0.add("101");
param0.add("DYgtU");
param0.add("4");
param0.add("00");
param0.add("Dt");
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,027 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_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_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1{
static int f_gold ( int arr [ ] , int n ) {
int cum_sum = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) cum_sum += arr [ i ] ;
int curr_val = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) curr_val += i * arr [ i ] ;
int res = curr_val ;
for ( int i = 1 ;
i < n ;
i ++ ) {
int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ) ;
curr_val = next_val ;
res = Math . max ( res , next_val ) ;
}
return res ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{6,6,13,14,16,20,24,24,24,27,28,36,49,51,55,56,62,69,74,74,76,85,86,90,92,98});
param0.add(new int[]{-42,96,68,64,14,-74,76,42,34,-92,-20,28,-80,-34,-22,96,-46,96,10,-82,82,50,-24,48,56,72,-40,-86,84,66,-62,50,-76,34});
param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1});
param0.add(new int[]{37,88,70,86,24,62,34,44,37,42,46,34,23,32,55,2,5,70,30,46,40,65,91,4,7,74,46,12,30,22,1,91,89,88,97,6,6,11,33,14,68,24});
param0.add(new int[]{-92,-90,-70,-70,-10,2,10,12,14,40,44,46,64,68,68,96});
param0.add(new int[]{1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1});
param0.add(new int[]{9,15,15,17,19,20,21,23,25,25,25,32,32,33,45,51,54,59,68,71,71,71,72,75,78,80,82,82,88,89,92,93,94,97});
param0.add(new int[]{52,-78,-80,32,-56,-98,-36,86,34,-36,42,46,50,0,34,-46,-2,-18,-96,12,-42,62,32,78,66,-8,50,60,10,-18,66,80,-24,-98,8,48,34,44,-80,-34,72,0,-60,52,40,20});
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});
param0.add(new int[]{45,35,25,7,24,73,25,86,48,70,47,91,96,15,39,9});
List<Integer> param1 = new ArrayList<>();
param1.add(13);
param1.add(27);
param1.add(10);
param1.add(39);
param1.add(11);
param1.add(15);
param1.add(22);
param1.add(45);
param1.add(33);
param1.add(8);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,028 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SQUARE_ROOT_OF_A_PERFECT_SQUARE_1.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class SQUARE_ROOT_OF_A_PERFECT_SQUARE_1{
static long f_gold ( int n ) {
int x = n ;
int y = 1 ;
while ( x > y ) {
x = ( x + y ) / 2 ;
y = n / x ;
}
return ( long ) x ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(58);
param0.add(55);
param0.add(51);
param0.add(42);
param0.add(2);
param0.add(30);
param0.add(77);
param0.add(82);
param0.add(31);
param0.add(9);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,029 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS.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_MAX_MIN_K_SIZE_SUBSETS{
static int f_gold ( int arr [ ] , int N , int K ) {
Arrays . sort ( arr ) ;
int res = 2147483647 ;
for ( int i = 0 ;
i <= ( N - K ) ;
i ++ ) {
int curSeqDiff = arr [ i + K - 1 ] - arr [ i ] ;
res = Math . min ( res , curSeqDiff ) ;
}
return res ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,1,4,18,21,35,37,39,76,81,86,92,96});
param0.add(new int[]{-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34});
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});
param0.add(new int[]{23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34});
param0.add(new int[]{-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92});
param0.add(new int[]{0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1});
param0.add(new int[]{6,7,9,27,30,42,54,55,57,57,59,76,84,84,84});
param0.add(new int[]{88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12});
param0.add(new int[]{0,1});
param0.add(new int[]{89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,10});
List<Integer> param1 = new ArrayList<>();
param1.add(7);
param1.add(9);
param1.add(16);
param1.add(17);
param1.add(21);
param1.add(21);
param1.add(13);
param1.add(31);
param1.add(1);
param1.add(22);
List<Integer> param2 = new ArrayList<>();
param2.add(6);
param2.add(12);
param2.add(26);
param2.add(20);
param2.add(12);
param2.add(22);
param2.add(14);
param2.add(26);
param2.add(1);
param2.add(14);
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,030 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SORT_ARRAY_APPLYING_GIVEN_EQUATION.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;
class SORT_ARRAY_APPLYING_GIVEN_EQUATION{
static void f_gold ( int arr [ ] , int n , int A , int B , int C ) {
for ( int i = 0 ;
i < n ;
i ++ ) arr [ i ] = A * arr [ i ] * arr [ i ] + B * arr [ i ] + C ;
int index = - 1 ;
int maximum = - 999999 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( maximum < arr [ i ] ) {
index = i ;
maximum = arr [ i ] ;
}
}
int i = 0 , j = n - 1 ;
int [ ] new_arr = new int [ n ] ;
int k = 0 ;
while ( i < index && j > index ) {
if ( arr [ i ] < arr [ j ] ) new_arr [ k ++ ] = arr [ i ++ ] ;
else new_arr [ k ++ ] = arr [ j -- ] ;
}
while ( i < index ) new_arr [ k ++ ] = arr [ i ++ ] ;
while ( j > index ) new_arr [ k ++ ] = arr [ j -- ] ;
new_arr [ n - 1 ] = maximum ;
for ( int p = 0 ;
p < n ;
p ++ ) arr [ p ] = new_arr [ p ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{9,30,49,65,78,85,85,92});
param0.add(new int[]{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18});
param0.add(new int[]{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88});
param0.add(new int[]{0,0,0,1,1,0,1,1,1,1});
param0.add(new int[]{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95});
param0.add(new int[]{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22});
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});
param0.add(new int[]{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58});
List<Integer> param1 = new ArrayList<>();
param1.add(4);
param1.add(18);
param1.add(25);
param1.add(33);
param1.add(8);
param1.add(7);
param1.add(22);
param1.add(20);
param1.add(23);
param1.add(28);
List<Integer> param2 = new ArrayList<>();
param2.add(4);
param2.add(20);
param2.add(26);
param2.add(42);
param2.add(12);
param2.add(8);
param2.add(33);
param2.add(16);
param2.add(21);
param2.add(21);
List<Integer> param3 = new ArrayList<>();
param3.add(5);
param3.add(20);
param3.add(15);
param3.add(35);
param3.add(8);
param3.add(6);
param3.add(19);
param3.add(19);
param3.add(19);
param3.add(23);
List<Integer> param4 = new ArrayList<>();
param4.add(4);
param4.add(23);
param4.add(18);
param4.add(41);
param4.add(8);
param4.add(7);
param4.add(25);
param4.add(16);
param4.add(23);
param4.add(23);
List<int [ ]> filled_function_param0 = new ArrayList<>();
filled_function_param0.add(new int[]{9,30,49,65,78,85,85,92});
filled_function_param0.add(new int[]{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16});
filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1});
filled_function_param0.add(new int[]{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18});
filled_function_param0.add(new int[]{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88});
filled_function_param0.add(new int[]{0,0,0,1,1,0,1,1,1,1});
filled_function_param0.add(new int[]{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95});
filled_function_param0.add(new int[]{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22});
filled_function_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});
filled_function_param0.add(new int[]{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58});
List<Integer> filled_function_param1 = new ArrayList<>();
filled_function_param1.add(4);
filled_function_param1.add(18);
filled_function_param1.add(25);
filled_function_param1.add(33);
filled_function_param1.add(8);
filled_function_param1.add(7);
filled_function_param1.add(22);
filled_function_param1.add(20);
filled_function_param1.add(23);
filled_function_param1.add(28);
List<Integer> filled_function_param2 = new ArrayList<>();
filled_function_param2.add(4);
filled_function_param2.add(20);
filled_function_param2.add(26);
filled_function_param2.add(42);
filled_function_param2.add(12);
filled_function_param2.add(8);
filled_function_param2.add(33);
filled_function_param2.add(16);
filled_function_param2.add(21);
filled_function_param2.add(21);
List<Integer> filled_function_param3 = new ArrayList<>();
filled_function_param3.add(5);
filled_function_param3.add(20);
filled_function_param3.add(15);
filled_function_param3.add(35);
filled_function_param3.add(8);
filled_function_param3.add(6);
filled_function_param3.add(19);
filled_function_param3.add(19);
filled_function_param3.add(19);
filled_function_param3.add(23);
List<Integer> filled_function_param4 = new ArrayList<>();
filled_function_param4.add(4);
filled_function_param4.add(23);
filled_function_param4.add(18);
filled_function_param4.add(41);
filled_function_param4.add(8);
filled_function_param4.add(7);
filled_function_param4.add(25);
filled_function_param4.add(16);
filled_function_param4.add(23);
filled_function_param4.add(23);
for(int i = 0; i < param0.size(); ++i)
{
f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i),filled_function_param3.get(i),filled_function_param4.get(i));
f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i));
if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i) && param3.get(i) == filled_function_param3.get(i) && param4.get(i) == filled_function_param4.get(i))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,031 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS.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 ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS{
static int f_gold ( int arr [ ] , int n , int x ) {
int i ;
for ( i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] == x ) {
return i ;
}
}
return - 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,5,5,11,13,14,15,19,22,22,23,26,29,29,36,44,48,49,65,65,67,68,70,76,79,79,81,85,88,91,91,92,92,97});
param0.add(new int[]{-24,-78,-32,-48,0,4,-42});
param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1});
param0.add(new int[]{38,14,75,16,91,11,98,43,67,9,21,10,82,72,32,81,48,60,2,91,10,90,12,83});
param0.add(new int[]{-92,-92,-82,-80,-76,-66,-64,-64,-56,-48,-38,-38,-34,-32,-32,-10,-8,-6,-2,0,8,10,18,20,22,22,30,34,38,38,38,44,50,52,56,64,64,66,70,76,88});
param0.add(new int[]{0,1,1,0,0,1,1,0,0,0,1,1,1,1});
param0.add(new int[]{1,4,4,4,4,8,12,13,14,14,22,25,25,27,29,33,36,38,40,40,40,41,47,47,47,48,48,50,51,52,52,52,55,56,59,59,62,64,66,77,82,84,90,91,91,93});
param0.add(new int[]{-90,-60,-58,-72,92,54,-32,-70,-94,18,64,-90,-90,-56,82,-14,-74,-96,-90,-8,-48,76,-28,10,-52,-8,-46,-32,82,46,58,92,4,48,-96,-66,60,60,62,-68});
param0.add(new int[]{0,0,0,0,0,0,1,1,1,1});
param0.add(new int[]{42,17,77,96,72,36,74,97,7,94,80,7,27,58,49,81,51,9});
List<Integer> param1 = new ArrayList<>();
param1.add(17);
param1.add(4);
param1.add(6);
param1.add(17);
param1.add(25);
param1.add(11);
param1.add(38);
param1.add(22);
param1.add(8);
param1.add(16);
List<Integer> param2 = new ArrayList<>();
param2.add(5);
param2.add(0);
param2.add(0);
param2.add(75);
param2.add(25);
param2.add(-1);
param2.add(4);
param2.add(22);
param2.add(8);
param2.add(16);
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,032 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES{
static int f_gold ( int a [ ] , int n , int k ) {
if ( k >= n - 1 ) return n ;
int best = 0 , times = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( a [ i ] > best ) {
best = a [ i ] ;
if ( i == 1 ) times = 1 ;
}
else times += 1 ;
if ( times >= k ) return best ;
}
return best ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,5,5,9,10,10,11,14,23,27,31,32,33,33,33,37,39,41,41,42,42,43,47,60,61,68,73,73,73,78,80,80,82,83,86,87,89,92,94,98});
param0.add(new int[]{80,-58,64,48,-16,60,-50,-52,62,-86,-96,52,26,-30,14});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1});
param0.add(new int[]{90,23,43,42,7,71,79});
param0.add(new int[]{-96,-96,-90,-84,-68,-64,-56,-56,-50,-50,-48,-46,-28,-18,0,0,6,32,32,34,42,42,46,50,50,52,64,64,70,76,84,88});
param0.add(new int[]{1,1,1});
param0.add(new int[]{2,9,15,19,26,29,42,45,46,47,55,60,60,61,62,64,68,69,74,79,96});
param0.add(new int[]{-32,12,80,42,80,8,58,-76,-42,-98,22,-90,-16,-4,-62,-32,28,12,78,-52,-84,78,88,-76,-52,68,-34,-16,-4,2,-78,-94,-22,34,6,-62,72});
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,1});
param0.add(new int[]{52,19});
List<Integer> param1 = new ArrayList<>();
param1.add(33);
param1.add(14);
param1.add(7);
param1.add(4);
param1.add(28);
param1.add(1);
param1.add(14);
param1.add(26);
param1.add(26);
param1.add(1);
List<Integer> param2 = new ArrayList<>();
param2.add(37);
param2.add(13);
param2.add(6);
param2.add(4);
param2.add(21);
param2.add(2);
param2.add(17);
param2.add(31);
param2.add(14);
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,033 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NUMBER_DIGITS_PRODUCT_TWO_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 NUMBER_DIGITS_PRODUCT_TWO_NUMBERS{
static int f_gold ( int a , int b ) {
int count = 0 ;
int p = Math . abs ( a * b ) ;
if ( p == 0 ) return 1 ;
while ( p > 0 ) {
count ++ ;
p = p / 10 ;
}
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(86);
param0.add(81);
param0.add(48);
param0.add(64);
param0.add(56);
param0.add(5);
param0.add(25);
param0.add(94);
param0.add(5);
param0.add(46);
List<Integer> param1 = new ArrayList<>();
param1.add(39);
param1.add(87);
param1.add(84);
param1.add(80);
param1.add(20);
param1.add(70);
param1.add(13);
param1.add(83);
param1.add(55);
param1.add(46);
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,034 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FLOOR_IN_A_SORTED_ARRAY_1.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FLOOR_IN_A_SORTED_ARRAY_1{
static int f_gold ( int arr [ ] , int low , int high , int x ) {
if ( low > high ) return - 1 ;
if ( x >= arr [ high ] ) return high ;
int mid = ( low + high ) / 2 ;
if ( arr [ mid ] == x ) return mid ;
if ( mid > 0 && arr [ mid - 1 ] <= x && x < arr [ mid ] ) return mid - 1 ;
if ( x < arr [ mid ] ) return f_gold ( arr , low , mid - 1 , x ) ;
return f_gold ( arr , mid + 1 , high , x ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,11,20,42,42,55,58,98,99});
param0.add(new int[]{50,-90,-38,-46,-10,-22,-66,72,-52,38,90,34,-12,-44,-6,0,-20,-38,86,26,64,-24,40,90,-26,-2,-28,12,22,-14});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{69,28,68,98,24,67,86,2,18,22,44,77,52,62,24,46});
param0.add(new int[]{-96,-94,-88,-84,-68,-60,-52,-52,-42,-34,-32,-16,-12,-6,-6,-4,-2,0,16,18,38,58,70,72,76,78,90,92,98});
param0.add(new int[]{0,1,1,0,0,1,0,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,0,0,1,0,0});
param0.add(new int[]{1,6,7,9,10,11,19,19,22,22,26,34,36,37,37,38,39,40,49,54,60,62,65,67,71,76,78,79,82,82,89,95,97});
param0.add(new int[]{76,-32,-98,-18,-80,74,-22,-82,40,-64,58,-18,-64,34,-44,-82,-46,62,-80,-76,32,44,-32,98,-26,62,16,86,-52,-72,-90,-30,6});
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,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[]{81,69,15,52,49,54,18,92,33,21,91,21,5,25,77,92,26,58,72,55,76,18,13,59,9,12,31,24,36,33,71,87,55,19,42,25});
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(26);
param1.add(11);
param1.add(15);
param1.add(22);
param1.add(24);
param1.add(22);
param1.add(28);
param1.add(28);
param1.add(35);
List<Integer> param2 = new ArrayList<>();
param2.add(7);
param2.add(28);
param2.add(9);
param2.add(11);
param2.add(27);
param2.add(15);
param2.add(26);
param2.add(31);
param2.add(29);
param2.add(19);
List<Integer> param3 = new ArrayList<>();
param3.add(6);
param3.add(23);
param3.add(18);
param3.add(13);
param3.add(20);
param3.add(26);
param3.add(25);
param3.add(24);
param3.add(30);
param3.add(33);
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,035 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_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 HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_1{
static int f_gold ( int n ) {
int sum ;
for ( sum = 0 ;
n > 0 ;
sum += n % 10 , n /= 10 ) ;
return sum ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(50);
param0.add(92);
param0.add(49);
param0.add(94);
param0.add(7);
param0.add(30);
param0.add(88);
param0.add(98);
param0.add(94);
param0.add(23);
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,036 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/BREAK_NUMBER_THREE_PARTS_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 BREAK_NUMBER_THREE_PARTS_1{
static long f_gold ( long n ) {
long count = 0 ;
count = ( n + 1 ) * ( n + 2 ) / 2 ;
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Long> param0 = new ArrayList<>();
param0.add(71L);
param0.add(71L);
param0.add(36L);
param0.add(3L);
param0.add(97L);
param0.add(69L);
param0.add(15L);
param0.add(48L);
param0.add(77L);
param0.add(6L);
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,037 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3{
static int f_gold ( int n ) {
int odd_count = 0 ;
int even_count = 0 ;
if ( n < 0 ) n = - n ;
if ( n == 0 ) return 1 ;
if ( n == 1 ) return 0 ;
while ( n != 0 ) {
if ( ( n & 1 ) != 0 ) odd_count ++ ;
if ( ( n & 2 ) != 0 ) even_count ++ ;
n = n >> 2 ;
}
return f_gold ( Math . abs ( odd_count - even_count ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(94);
param0.add(94);
param0.add(79);
param0.add(39);
param0.add(16);
param0.add(90);
param0.add(64);
param0.add(76);
param0.add(83);
param0.add(47);
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,038 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/BINARY_REPRESENTATION_OF_NEXT_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 BINARY_REPRESENTATION_OF_NEXT_NUMBER{
static String f_gold ( String num ) {
int l = num . length ( ) ;
int i ;
for ( i = l - 1 ;
i >= 0 ;
i -- ) {
if ( num . charAt ( i ) == '0' ) {
num = num . substring ( 0 , i ) + '1' + num . substring ( i + 1 ) ;
break ;
}
else {
num = num . substring ( 0 , i ) + '0' + num . substring ( i + 1 ) ;
}
}
if ( i < 0 ) {
num = "1" + num ;
}
return num ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("DXh");
param0.add("48703586411816");
param0.add("0001");
param0.add("yWg WvjNKS");
param0.add("8408568459");
param0.add("01");
param0.add("DFECZ CWtN");
param0.add("37742236");
param0.add("001101");
param0.add("LDxERLmYn");
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,039 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD{
public static boolean f_gold ( int n ) {
return ( n % 2 == 0 ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(67);
param0.add(90);
param0.add(55);
param0.add(90);
param0.add(83);
param0.add(32);
param0.add(58);
param0.add(38);
param0.add(87);
param0.add(87);
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,040 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_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 ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_NUMBER{
static int f_gold ( int n ) {
return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(58);
param0.add(42);
param0.add(76);
param0.add(16);
param0.add(49);
param0.add(60);
param0.add(99);
param0.add(45);
param0.add(6);
param0.add(70);
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,041 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/UGLY_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 UGLY_NUMBERS{
static int f_gold ( int n ) {
int ugly [ ] = new int [ n ] ;
int i2 = 0 , i3 = 0 , i5 = 0 ;
int next_multiple_of_2 = 2 ;
int next_multiple_of_3 = 3 ;
int next_multiple_of_5 = 5 ;
int next_ugly_no = 1 ;
ugly [ 0 ] = 1 ;
for ( int i = 1 ;
i < n ;
i ++ ) {
next_ugly_no = Math . min ( next_multiple_of_2 , Math . min ( next_multiple_of_3 , next_multiple_of_5 ) ) ;
ugly [ i ] = next_ugly_no ;
if ( next_ugly_no == next_multiple_of_2 ) {
i2 = i2 + 1 ;
next_multiple_of_2 = ugly [ i2 ] * 2 ;
}
if ( next_ugly_no == next_multiple_of_3 ) {
i3 = i3 + 1 ;
next_multiple_of_3 = ugly [ i3 ] * 3 ;
}
if ( next_ugly_no == next_multiple_of_5 ) {
i5 = i5 + 1 ;
next_multiple_of_5 = ugly [ i5 ] * 5 ;
}
}
return next_ugly_no ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(27);
param0.add(64);
param0.add(93);
param0.add(90);
param0.add(85);
param0.add(86);
param0.add(72);
param0.add(86);
param0.add(32);
param0.add(1);
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,042 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/UNIQUE_CELLS_BINARY_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 UNIQUE_CELLS_BINARY_MATRIX{
static int f_gold ( int mat [ ] [ ] , int n , int m ) {
int [ ] rowsum = new int [ n ] ;
int [ ] colsum = new int [ m ] ;
for ( int i = 0 ;
i < n ;
i ++ ) for ( int j = 0 ;
j < m ;
j ++ ) if ( mat [ i ] [ j ] != 0 ) {
rowsum [ i ] ++ ;
colsum [ j ] ++ ;
}
int uniquecount = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) for ( int j = 0 ;
j < m ;
j ++ ) if ( mat [ i ] [ j ] != 0 && rowsum [ i ] == 1 && colsum [ j ] == 1 ) uniquecount ++ ;
return uniquecount ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ] [ ]> param0 = new ArrayList<>();
param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 0}, new int[] {1, 0, 0, 1}});
param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 1}, new int[] {1, 0, 1, 1}});
param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 0}, new int[] {1, 1, 0, 1}});
param0.add(new int[][]{ new int[] {1, 1, 1, 1}, new int[] {0, 0, 1, 0}, new int[] {1, 0, 0, 1}});
param0.add(new int[][]{ new int[] {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 13, 43, 21, 83, 34, 30, 20, 82, 85, 36}, new int[]{7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41, 38, 44, 15, 35, 81, 27, 21, 40, 44, 90, 44, 5, 97, 49}, new int[]{69, 92, 21, 8, 66, 37, 14, 34, 60, 61, 46, 21, 91, 18, 61, 69, 34, 82, 54, 99, 90, 29, 41, 92, 70, 90, 58, 82, 30, 33}, new int[]{63, 96, 90, 86, 34, 49, 12, 22, 85, 24, 56, 25, 66, 1, 74, 34, 5, 17, 1, 78, 21, 6, 75, 39, 59, 20, 84, 85, 64, 24}, new int[]{41, 90, 67, 38, 38, 28, 10, 24, 62, 52, 71, 87, 87, 24, 95, 50, 86, 91, 38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94}, new int[]{66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77, 57, 72, 99, 62, 4, 62, 46, 71, 21, 60, 45, 79, 98, 22, 65}, new int[]{6, 65, 83, 27, 10, 55, 78, 34, 41, 32, 67, 51, 80, 39, 97, 5, 58, 99, 17, 23, 90, 46, 7, 62, 7, 15, 30, 20, 67, 86}, new int[]{54, 50, 71, 95, 49, 50, 3, 64, 46, 81, 22, 52, 37, 60, 67, 48, 30, 88, 97, 43, 10, 71, 80, 96, 2, 72, 79, 67, 84, 98}, new int[]{46, 41, 4, 87, 8, 10, 5, 74, 90, 80, 59, 58, 23, 61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46}, new int[]{70, 6, 83, 23, 94, 1, 73, 61, 22, 65, 57, 36, 25, 16, 26, 92, 5, 22, 14, 73, 78, 80, 94, 96, 70, 17, 1, 18, 75, 11}, new int[]{92, 12, 34, 80, 74, 8, 90, 42, 14, 51, 9, 83, 98, 38, 29, 29, 28, 88, 92, 76, 83, 6, 2, 53, 31, 37, 56, 93, 40, 12}, new int[]{55, 97, 57, 45, 25, 42, 18, 30, 18, 7, 79, 30, 5, 69, 33, 6, 48, 4, 13, 26, 49, 20, 32, 96, 65, 89, 89, 53, 65, 3}, new int[]{21, 43, 25, 85, 67, 93, 35, 86, 23, 13, 98, 23, 63, 99, 83, 15, 79, 26, 67, 81, 94, 61, 28, 34, 16, 43, 11, 24, 87, 25}, new int[]{77, 19, 34, 66, 72, 5, 75, 66, 54, 96, 24, 76, 80, 51, 24, 50, 54, 17, 96, 84, 35, 30, 47, 42, 22, 31, 51, 37, 88, 88}, new int[]{13, 89, 31, 14, 84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27, 23, 35, 13, 26, 78, 35, 41, 6, 72, 52, 53, 79}, new int[]{8, 47, 80, 93, 64, 34, 29, 35, 48, 74, 65, 69, 67, 14, 46, 27, 46, 29, 1, 82, 3, 26, 21, 24, 45, 84, 29, 18, 3, 51}, new int[]{97, 18, 37, 63, 85, 19, 23, 84, 55, 24, 83, 26, 97, 96, 54, 99, 89, 33, 88, 57, 9, 64, 75, 85, 59, 81, 16, 5, 44, 46}, new int[]{10, 77, 58, 70, 64, 80, 70, 93, 60, 25, 87, 11, 93, 85, 63, 26, 41, 53, 75, 24, 81, 73, 72, 94, 7, 87, 73, 83, 64, 72}, new int[]{46, 78, 51, 92, 99, 71, 6, 30, 16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73}, new int[]{30, 62, 77, 26, 66, 61, 61, 45, 46, 24, 77, 16, 82, 16, 66, 1, 74, 25, 14, 81, 82, 7, 21, 93, 91, 49, 4, 12, 22, 34}, new int[]{26, 28, 19, 31, 14, 87, 81, 23, 81, 8, 38, 10, 30, 7, 2, 22, 5, 67, 73, 69, 56, 20, 93, 70, 68, 57, 21, 17, 79, 27}, new int[]{39, 83, 67, 92, 86, 70, 95, 69, 13, 98, 50, 10, 56, 44, 28, 85, 37, 36, 56, 92, 77, 57, 36, 1, 43, 9, 84, 81, 67, 32}, new int[]{99, 70, 58, 52, 70, 89, 28, 65, 40, 80, 20, 88, 79, 10, 76, 62, 37, 99, 60, 91, 77, 94, 67, 52, 35, 62, 12, 29, 30, 22}, new int[]{81, 53, 91, 22, 60, 49, 49, 7, 46, 11, 16, 54, 57, 36, 51, 22, 37, 3, 35, 38, 55, 41, 38, 88, 34, 99, 11, 79, 14, 81}, new int[]{21, 28, 86, 60, 34, 65, 87, 96, 4, 56, 70, 80, 10, 35, 88, 10, 76, 63, 97, 91, 25, 74, 89, 32, 56, 26, 68, 73, 27, 73}, new int[]{90, 11, 53, 32, 59, 30, 9, 11, 87, 17, 96, 11, 57, 86, 50, 96, 73, 81, 53, 89, 80, 97, 66, 43, 39, 42, 76, 34, 25, 78}, new int[]{9, 94, 12, 10, 88, 34, 76, 26, 96, 35, 77, 83, 56, 77, 56, 86, 48, 23, 65, 8, 98, 13, 49, 10, 3, 28, 27, 85, 11, 88}, new int[]{12, 7, 42, 96, 10, 61, 64, 28, 26, 93, 91, 52, 74, 4, 22, 10, 4, 7, 63, 87, 67, 88, 30, 76, 21, 48, 17, 67, 79, 96}, new int[]{9, 40, 86, 96, 59, 69, 41, 68, 48, 61, 5, 7, 75, 6, 29, 51, 81, 28, 57, 63, 38, 83, 49, 12, 45, 83, 97, 45, 5, 65}, new int[]{35, 35, 31, 36, 40, 99, 40, 61, 12, 82, 92, 13, 30, 40, 17, 73, 22, 56, 62, 57, 15, 93, 54, 16, 84, 89, 24, 80, 80, 25}});
param0.add(new int[][]{ new int[] {0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 45, 59, 40, 83, 46, 59, 89, 37, 82, 68, 65, 97, 28, 41, 83, 97, 15, 87, 93, 39, 78, 94, 66, 77, 28, 31, 12, 13, 3}, new int[]{63, 29, 64, 94, 76, 85, 66, 50, 80, 96, 92, 73, 17, 56, 83, 7, 36, 40, 1, 42, 36, 39, 1, 88, 63, 74, 75, 86, 56, 31, 1, 41, 11, 6, 51, 64, 81, 78, 96, 20, 4, 39, 47, 22, 93, 42, 77, 79}, new int[]{35, 25, 3, 51, 12, 14, 40, 32, 50, 68, 29, 31, 96, 24, 11, 30, 19, 36, 6, 2, 19, 46, 40, 18, 36, 46, 56, 52, 54, 56, 20, 1, 23, 38, 20, 4, 69, 6, 63, 90, 1, 63, 79, 80, 87, 86, 54, 69}, new int[]{43, 5, 70, 66, 10, 36, 35, 45, 23, 62, 47, 16, 37, 42, 35, 40, 16, 69, 11, 51, 93, 75, 80, 89, 50, 67, 67, 65, 12, 7, 43, 46, 96, 22, 76, 6, 38, 39, 60, 85, 62, 92, 96, 27, 49, 15, 33, 96}, new int[]{46, 98, 71, 13, 53, 39, 50, 70, 60, 9, 4, 94, 92, 21, 12, 77, 50, 13, 52, 91, 92, 82, 80, 21, 55, 10, 78, 92, 29, 11, 30, 40, 91, 49, 3, 1, 32, 39, 85, 2, 74, 31, 18, 7, 5, 29, 68, 46}, new int[]{56, 3, 13, 67, 72, 50, 4, 42, 99, 76, 24, 19, 99, 82, 40, 34, 89, 7, 75, 38, 19, 99, 45, 20, 91, 95, 89, 2, 93, 37, 31, 42, 6, 85, 97, 9, 74, 86, 95, 53, 11, 83, 76, 16, 13, 38, 13, 15}, new int[]{18, 16, 41, 50, 69, 91, 66, 41, 27, 59, 65, 14, 35, 23, 22, 27, 50, 25, 98, 54, 49, 91, 99, 85, 3, 25, 68, 57, 15, 67, 11, 92, 3, 18, 53, 9, 79, 72, 40, 56, 14, 61, 13, 47, 74, 94, 5, 86}, new int[]{99, 5, 12, 35, 85, 26, 1, 10, 38, 24, 95, 47, 87, 85, 2, 95, 2, 30, 25, 83, 62, 1, 92, 63, 84, 59, 54, 69, 55, 94, 87, 42, 91, 53, 65, 9, 71, 51, 90, 16, 53, 70, 62, 37, 61, 57, 45, 76}, new int[]{88, 17, 2, 95, 37, 54, 42, 29, 65, 78, 40, 11, 58, 96, 20, 66, 31, 5, 96, 50, 9, 41, 10, 53, 49, 26, 67, 36, 23, 94, 39, 59, 23, 23, 43, 25, 84, 60, 33, 33, 65, 47, 33, 38, 24, 73, 95, 49}, new int[]{92, 87, 30, 82, 58, 90, 97, 59, 16, 93, 16, 33, 39, 46, 38, 23, 26, 49, 81, 24, 83, 42, 27, 2, 8, 79, 41, 13, 91, 22, 47, 47, 65, 69, 29, 79, 30, 46, 6, 6, 87, 52, 5, 86, 41, 20, 20, 39}, new int[]{30, 48, 81, 60, 23, 60, 50, 13, 74, 38, 39, 68, 19, 52, 41, 92, 27, 23, 19, 80, 35, 5, 88, 5, 93, 6, 41, 41, 54, 44, 48, 37, 93, 56, 33, 91, 35, 6, 46, 74, 36, 44, 7, 7, 29, 80, 65, 60}, new int[]{35, 57, 29, 38, 77, 12, 87, 80, 58, 78, 80, 6, 36, 52, 88, 27, 25, 40, 36, 60, 29, 95, 3, 13, 68, 11, 48, 79, 60, 2, 79, 70, 13, 35, 51, 56, 40, 77, 59, 12, 16, 53, 41, 20, 40, 61, 77, 34}, new int[]{19, 45, 91, 29, 19, 56, 27, 2, 40, 65, 78, 8, 27, 97, 95, 30, 25, 49, 56, 65, 31, 99, 60, 85, 34, 17, 73, 29, 72, 83, 6, 88, 6, 3, 95, 31, 76, 52, 8, 90, 26, 15, 77, 56, 86, 62, 13, 46}, new int[]{54, 9, 88, 3, 23, 12, 41, 44, 58, 11, 19, 59, 73, 37, 10, 73, 33, 77, 20, 44, 75, 93, 13, 63, 14, 73, 54, 42, 38, 83, 72, 82, 98, 36, 9, 80, 5, 15, 24, 64, 48, 43, 39, 25, 80, 86, 80, 97}, new int[]{5, 60, 7, 18, 6, 12, 33, 98, 21, 58, 82, 78, 42, 94, 46, 3, 57, 53, 62, 13, 51, 19, 59, 62, 37, 77, 15, 90, 70, 91, 12, 89, 50, 47, 16, 16, 67, 34, 88, 46, 87, 64, 94, 49, 21, 53, 62, 81}, new int[]{54, 82, 3, 53, 12, 80, 38, 78, 91, 18, 84, 35, 81, 84, 70, 90, 71, 76, 17, 21, 70, 47, 37, 89, 54, 15, 11, 9, 68, 3, 13, 96, 6, 1, 5, 66, 86, 96, 41, 50, 7, 21, 81, 53, 20, 65, 32, 96}, new int[]{84, 74, 6, 41, 33, 74, 25, 24, 95, 93, 12, 37, 50, 9, 93, 67, 4, 54, 85, 6, 66, 37, 84, 45, 97, 14, 84, 43, 66, 7, 55, 37, 76, 16, 17, 95, 71, 90, 1, 2, 95, 84, 33, 13, 65, 51, 33, 3}, new int[]{60, 83, 44, 96, 5, 47, 43, 47, 6, 60, 36, 37, 77, 76, 6, 30, 92, 10, 28, 6, 73, 24, 52, 82, 68, 45, 87, 27, 68, 13, 75, 75, 19, 33, 78, 13, 7, 33, 32, 45, 56, 72, 46, 98, 19, 34, 63, 70}, new int[]{54, 55, 50, 65, 45, 30, 79, 73, 61, 93, 59, 2, 30, 46, 68, 19, 84, 5, 73, 84, 57, 63, 52, 59, 60, 80, 84, 20, 90, 33, 12, 21, 56, 23, 20, 87, 49, 47, 70, 45, 76, 35, 72, 27, 80, 47, 32, 29}, new int[]{71, 80, 53, 93, 56, 89, 43, 4, 64, 91, 87, 23, 60, 30, 43, 88, 48, 80, 7, 87, 31, 19, 52, 68, 6, 83, 60, 91, 93, 12, 38, 13, 28, 5, 46, 46, 81, 27, 26, 62, 68, 72, 90, 97, 12, 77, 85, 52}, new int[]{37, 25, 39, 67, 19, 71, 81, 77, 24, 51, 45, 8, 72, 45, 2, 30, 67, 45, 26, 17, 38, 67, 57, 33, 94, 79, 72, 94, 64, 23, 12, 8, 73, 72, 38, 33, 48, 97, 45, 75, 23, 43, 25, 15, 10, 20, 16, 99}, new int[]{98, 85, 57, 46, 1, 25, 56, 46, 59, 62, 78, 61, 83, 8, 41, 15, 44, 82, 1, 97, 65, 34, 4, 81, 2, 39, 54, 10, 42, 45, 26, 27, 39, 25, 29, 82, 22, 90, 60, 90, 52, 85, 21, 8, 66, 98, 76, 18}, new int[]{81, 15, 3, 85, 83, 59, 55, 32, 11, 82, 53, 29, 67, 4, 92, 9, 57, 38, 7, 65, 35, 47, 34, 63, 9, 90, 72, 19, 26, 46, 56, 10, 43, 30, 40, 55, 58, 31, 72, 47, 77, 37, 94, 57, 79, 57, 99, 3}, new int[]{29, 88, 45, 87, 73, 2, 15, 96, 18, 29, 40, 3, 97, 58, 71, 94, 91, 38, 29, 31, 65, 43, 27, 27, 93, 69, 3, 29, 13, 97, 60, 84, 67, 70, 81, 47, 68, 97, 33, 6, 64, 78, 71, 70, 51, 67, 22, 72}, new int[]{24, 77, 77, 65, 53, 41, 32, 69, 71, 45, 32, 28, 97, 14, 13, 93, 50, 40, 1, 47, 91, 30, 34, 46, 1, 34, 59, 7, 65, 42, 82, 99, 19, 13, 23, 66, 3, 86, 36, 49, 72, 87, 72, 57, 89, 99, 64, 11}, new int[]{41, 6, 45, 81, 57, 82, 33, 61, 18, 7, 29, 69, 16, 95, 69, 74, 29, 29, 16, 4, 65, 72, 92, 1, 92, 3, 64, 66, 89, 57, 75, 18, 39, 84, 81, 7, 55, 17, 68, 36, 94, 1, 35, 76, 17, 80, 28, 32}, new int[]{55, 35, 19, 93, 93, 80, 4, 21, 44, 62, 1, 83, 51, 90, 76, 17, 37, 92, 36, 29, 69, 3, 15, 67, 77, 69, 21, 23, 47, 86, 34, 41, 90, 47, 31, 35, 7, 45, 57, 96, 22, 70, 21, 49, 47, 27, 10, 86}, new int[]{44, 51, 18, 68, 99, 38, 36, 60, 68, 74, 96, 74, 45, 74, 75, 9, 13, 57, 82, 57, 37, 47, 11, 28, 6, 33, 14, 47, 29, 15, 56, 69, 86, 31, 19, 18, 58, 70, 73, 30, 95, 35, 17, 16, 97, 68, 95, 33}, new int[]{36, 11, 60, 4, 63, 5, 64, 85, 77, 4, 35, 26, 26, 19, 37, 11, 66, 31, 18, 75, 44, 16, 58, 2, 59, 96, 48, 86, 36, 8, 36, 25, 40, 95, 4, 43, 74, 27, 38, 81, 38, 64, 89, 17, 13, 85, 79, 24}, new int[]{7, 64, 63, 22, 53, 74, 97, 12, 72, 22, 39, 47, 64, 44, 16, 59, 34, 46, 80, 78, 70, 55, 74, 24, 27, 73, 16, 2, 31, 63, 47, 19, 56, 11, 86, 93, 95, 8, 74, 6, 31, 99, 50, 29, 21, 41, 69, 69}, new int[]{88, 79, 56, 28, 34, 56, 77, 55, 44, 32, 86, 29, 3, 69, 11, 48, 53, 56, 53, 26, 9, 75, 65, 56, 28, 23, 31, 66, 61, 82, 16, 59, 81, 48, 17, 35, 95, 99, 59, 88, 41, 37, 30, 82, 91, 16, 84, 47}, new int[]{28, 21, 41, 45, 97, 73, 64, 88, 13, 94, 43, 97, 58, 88, 20, 63, 1, 23, 33, 57, 81, 54, 66, 95, 31, 54, 16, 37, 7, 1, 94, 18, 42, 39, 26, 75, 65, 57, 69, 86, 77, 17, 7, 71, 12, 38, 87, 48}, new int[]{55, 54, 72, 15, 30, 55, 73, 21, 60, 78, 8, 47, 36, 73, 26, 84, 70, 34, 60, 23, 97, 85, 41, 90, 69, 55, 73, 45, 61, 33, 89, 52, 81, 19, 75, 8, 70, 6, 72, 57, 88, 60, 19, 52, 41, 91, 84, 88}, new int[]{38, 69, 16, 39, 97, 74, 51, 5, 83, 62, 41, 85, 67, 59, 92, 19, 80, 62, 53, 66, 8, 46, 12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45}, new int[]{26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45, 26, 60, 69, 68, 86, 70, 31, 69, 7, 69, 4, 91, 73, 37, 2, 49, 83, 17, 17, 40, 51, 88, 77, 28, 46, 78, 87, 87, 74, 49, 17, 27, 62, 11, 83, 44}, new int[]{91, 36, 16, 60, 87, 97, 52, 22, 78, 77, 86, 71, 38, 65, 51, 97, 86, 23, 15, 79, 31, 28, 67, 42, 25, 33, 97, 23, 92, 53, 16, 37, 5, 11, 12, 21, 18, 14, 33, 21, 26, 89, 25, 35, 63, 20, 63, 66}, new int[]{12, 32, 97, 48, 95, 97, 59, 20, 37, 40, 61, 56, 14, 36, 76, 90, 34, 6, 46, 77, 22, 99, 83, 23, 64, 96, 44, 11, 68, 61, 76, 56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44, 67, 2, 58, 6, 42}, new int[]{17, 37, 44, 23, 40, 85, 44, 31, 76, 93, 13, 90, 97, 98, 20, 47, 10, 65, 52, 63, 29, 54, 86, 50, 65, 44, 8, 9, 23, 84, 34, 16, 86, 62, 87, 65, 78, 52, 23, 38, 40, 8, 32, 40, 66, 48, 13, 27}, new int[]{46, 71, 3, 85, 61, 72, 65, 17, 26, 29, 72, 38, 51, 43, 72, 8, 25, 55, 45, 91, 86, 67, 57, 49, 54, 47, 64, 24, 62, 33, 99, 40, 29, 8, 75, 16, 33, 64, 11, 29, 49, 88, 66, 5, 88, 53, 44, 7}, new int[]{95, 94, 70, 69, 79, 27, 99, 54, 73, 23, 58, 17, 87, 46, 47, 93, 59, 45, 62, 54, 75, 13, 12, 2, 42, 54, 11, 78, 22, 85, 49, 37, 36, 89, 49, 58, 3, 66, 91, 33, 18, 48, 75, 71, 37, 50, 36, 27}, new int[]{22, 31, 40, 54, 64, 70, 53, 54, 54, 97, 71, 6, 64, 54, 65, 46, 42, 93, 75, 92, 56, 40, 15, 30, 23, 12, 92, 95, 30, 16, 30, 68, 33, 57, 97, 28, 85, 79, 26, 14, 57, 15, 66, 16, 37, 11, 11, 33}, new int[]{2, 33, 63, 3, 84, 33, 26, 34, 78, 52, 93, 66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20, 66, 35, 79, 51, 14, 55, 36, 53}, new int[]{54, 63, 94, 58, 27, 2, 85, 78, 91, 85, 23, 35, 62, 72, 59, 76, 64, 92, 41, 33, 97, 9, 79, 74, 49, 2, 3, 23, 74, 19, 18, 35, 54, 60, 9, 95, 94, 52, 50, 12, 17, 91, 85, 49, 48, 27, 14, 55}, new int[]{13, 3, 64, 88, 96, 72, 99, 23, 80, 73, 39, 58, 18, 54, 31, 64, 42, 37, 98, 70, 78, 88, 97, 42, 83, 29, 70, 3, 18, 85, 29, 52, 42, 52, 36, 95, 8, 96, 80, 86, 2, 51, 15, 17, 13, 54, 99, 25}, new int[]{74, 75, 33, 78, 98, 22, 44, 4, 26, 1, 10, 2, 29, 25, 87, 94, 60, 89, 13, 40, 34, 35, 79, 39, 42, 84, 86, 25, 14, 83, 86, 87, 1, 39, 30, 5, 94, 71, 62, 77, 31, 7, 29, 51, 89, 77, 79, 51}, new int[]{94, 71, 69, 14, 94, 23, 80, 88, 43, 56, 21, 30, 76, 40, 94, 22, 2, 23, 87, 86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17, 2, 66, 29, 4, 30, 61}, new int[]{58, 76, 34, 78, 24, 88, 82, 25, 89, 25, 92, 30, 55, 89, 24, 39, 77, 2, 34, 16, 48, 24, 50, 2, 93, 39, 81, 59, 23, 12, 77, 69, 15, 60, 64, 2, 70, 64, 36, 87, 13, 2, 5, 40, 80, 64, 39, 35}, new int[]{57, 41, 45, 34, 19, 90, 42, 17, 35, 76, 35, 6, 52, 74, 43, 23, 83, 43, 53, 72, 73, 67, 97, 66, 34, 35, 82, 27, 27, 64, 39, 60, 81, 73, 96, 23, 78, 11, 4, 51, 38, 51, 48, 80, 36, 25, 5, 74}});
param0.add(new int[][]{ new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, new int[]{69, 62, 79, 46, 48, 38, 61, 81, 17, 48, 33, 18, 36, 54, 3, 89, 99, 20}, new int[]{31, 21, 34, 57, 37, 1, 57, 55, 31, 23, 75, 48, 20, 7, 99, 2, 97, 40}, new int[]{24, 74, 9, 43, 97, 51, 85, 78, 50, 87, 76, 22, 92, 91, 10, 82, 88, 67}, new int[]{4, 30, 85, 22, 92, 73, 41, 16, 56, 69, 14, 52, 14, 47, 16, 43, 68, 37}, new int[]{14, 41, 87, 73, 24, 75, 92, 19, 83, 12, 47, 98, 12, 3, 30, 58, 46, 51}, new int[]{99, 15, 43, 22, 9, 92, 93, 39, 81, 68, 57, 68, 7, 2, 54, 37, 74, 82}, new int[]{28, 59, 46, 63, 35, 99, 94, 85, 58, 89, 13, 71, 6, 84, 45, 5, 38, 44}, new int[]{25, 82, 88, 15, 72, 77, 39, 48, 52, 60, 89, 23, 69, 52, 86, 22, 25, 55}, new int[]{64, 65, 4, 52, 32, 53, 26, 79, 35, 91, 14, 34, 60, 25, 54, 27, 21, 48}, new int[]{35, 52, 70, 99, 26, 15, 5, 90, 33, 25, 81, 52, 44, 20, 56, 66, 8, 83}, new int[]{64, 29, 48, 19, 9, 72, 15, 98, 68, 63, 91, 38, 47, 13, 96, 99, 46, 36}, new int[]{10, 55, 23, 23, 68, 44, 5, 4, 30, 52, 97, 13, 18, 32, 33, 58, 62, 71}, new int[]{14, 14, 10, 59, 39, 46, 18, 19, 37, 3, 55, 7, 71, 52, 54, 38, 63, 64}, new int[]{6, 74, 52, 44, 36, 37, 64, 48, 27, 65, 1, 48, 85, 37, 92, 49, 55, 39}, new int[]{36, 66, 66, 68, 2, 65, 18, 41, 98, 91, 39, 26, 75, 3, 49, 28, 16, 99}, new int[]{22, 80, 97, 77, 49, 28, 16, 64, 60, 66, 26, 42, 92, 3, 21, 32, 70, 69}, new int[]{24, 65, 23, 80, 8, 45, 89, 11, 57, 12, 72, 10, 63, 35, 38, 21, 51, 18}});
param0.add(new int[][]{ new int[] {0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 93, 66, 82, 36, 56}, new int[]{21, 97, 63, 2, 74, 15, 62, 12, 3, 4, 9, 46, 42, 74, 31, 37, 11, 61, 27, 46, 70, 94, 43, 99, 45}, new int[]{18, 50, 6, 13, 12, 7, 14, 73, 99, 47, 7, 39, 56, 85, 19, 27, 61, 66, 52, 56, 14, 33, 12, 85, 94}, new int[]{86, 66, 93, 24, 96, 45, 76, 55, 71, 53, 66, 19, 51, 82, 98, 66, 45, 40, 83, 6, 51, 41, 47, 17, 23}, new int[]{40, 73, 37, 85, 58, 21, 27, 11, 39, 94, 63, 28, 84, 47, 47, 4, 61, 18, 50, 93, 36, 91, 1, 35, 5}, new int[]{6, 60, 5, 32, 39, 95, 40, 42, 74, 95, 8, 91, 29, 60, 78, 23, 4, 34, 38, 61, 27, 83, 31, 3, 93}, new int[]{77, 27, 43, 60, 96, 46, 37, 67, 6, 59, 3, 77, 11, 27, 2, 64, 44, 76, 55, 40, 76, 23, 64, 95, 57}, new int[]{10, 35, 6, 89, 95, 54, 94, 79, 67, 82, 56, 81, 60, 14, 46, 16, 27, 37, 97, 61, 20, 25, 50, 58, 78}, new int[]{37, 5, 54, 37, 74, 10, 9, 78, 33, 93, 24, 70, 57, 26, 39, 44, 64, 48, 67, 48, 40, 46, 96, 90, 3}, new int[]{76, 14, 83, 4, 12, 99, 23, 3, 3, 42, 80, 77, 19, 28, 38, 9, 56, 17, 7, 72, 76, 54, 28, 66, 28}, new int[]{25, 91, 99, 79, 49, 48, 99, 47, 62, 33, 42, 87, 27, 8, 62, 38, 4, 54, 48, 69, 16, 61, 18, 45, 18}, new int[]{8, 29, 21, 54, 91, 47, 66, 68, 48, 76, 80, 89, 23, 17, 61, 52, 42, 51, 1, 21, 57, 36, 2, 23, 60}, new int[]{59, 66, 43, 59, 74, 73, 93, 90, 36, 60, 93, 4, 21, 97, 95, 92, 97, 4, 4, 33, 14, 9, 88, 64, 62}, new int[]{89, 7, 92, 5, 13, 2, 84, 12, 91, 7, 34, 21, 60, 82, 10, 38, 58, 56, 44, 85, 80, 64, 20, 50, 54}, new int[]{46, 40, 24, 85, 58, 31, 50, 10, 84, 14, 19, 30, 57, 16, 22, 54, 84, 70, 43, 97, 19, 5, 71, 98, 20}, new int[]{15, 38, 1, 5, 98, 54, 85, 61, 78, 17, 76, 27, 70, 25, 91, 45, 2, 22, 96, 54, 17, 61, 66, 26, 56}, new int[]{33, 1, 40, 43, 44, 62, 36, 56, 39, 89, 13, 39, 12, 21, 87, 18, 13, 19, 35, 46, 57, 34, 62, 56, 1}, new int[]{57, 86, 28, 4, 71, 75, 76, 40, 53, 39, 35, 98, 82, 10, 51, 64, 79, 59, 26, 3, 77, 98, 17, 65, 78}, new int[]{1, 88, 57, 11, 67, 77, 55, 86, 41, 59, 30, 25, 71, 64, 89, 25, 66, 34, 55, 58, 86, 54, 1, 18, 16}, new int[]{56, 74, 31, 48, 77, 34, 34, 60, 76, 37, 40, 17, 41, 56, 54, 79, 13, 46, 72, 17, 11, 40, 46, 65, 32}, new int[]{52, 10, 59, 15, 3, 9, 8, 74, 8, 16, 11, 23, 56, 56, 22, 18, 39, 3, 8, 5, 91, 5, 19, 81, 61}, new int[]{46, 18, 61, 60, 2, 50, 63, 71, 49, 80, 71, 18, 90, 93, 16, 46, 94, 25, 8, 64, 14, 22, 78, 91, 35}, new int[]{51, 76, 43, 85, 75, 3, 73, 55, 19, 42, 61, 23, 80, 4, 96, 65, 4, 59, 90, 91, 80, 30, 33, 80, 33}, new int[]{20, 95, 48, 27, 32, 86, 27, 25, 66, 87, 12, 46, 48, 85, 75, 85, 37, 4, 90, 84, 61, 71, 47, 91, 47}, new int[]{17, 32, 10, 50, 75, 59, 18, 66, 35, 6, 3, 71, 35, 77, 66, 66, 51, 72, 73, 34, 39, 95, 93, 49, 47}});
param0.add(new int[][]{ new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 83, 85, 49, 74}, new int[]{4, 62, 18, 60, 64, 20, 52, 36, 62, 48, 96, 57, 57, 91, 41, 88, 93, 53, 88, 62, 29, 39, 82}, new int[]{10, 61, 56, 9, 50, 75, 12, 2, 90, 73, 17, 35, 46, 67, 70, 87, 35, 79, 72, 96, 34, 11, 3}, new int[]{93, 10, 82, 82, 12, 91, 51, 83, 97, 89, 59, 2, 2, 5, 22, 33, 69, 28, 58, 14, 50, 74, 41}, new int[]{15, 74, 68, 43, 55, 49, 18, 81, 95, 97, 25, 12, 55, 47, 85, 81, 84, 93, 67, 71, 64, 60, 97}, new int[]{90, 84, 43, 37, 32, 99, 85, 52, 53, 56, 72, 2, 48, 16, 91, 36, 10, 92, 81, 89, 79, 18, 92}, new int[]{2, 40, 42, 95, 95, 25, 1, 82, 16, 42, 37, 37, 71, 6, 78, 22, 95, 74, 46, 40, 54, 46, 36}, new int[]{41, 98, 67, 23, 43, 61, 17, 93, 65, 3, 78, 75, 30, 21, 16, 62, 60, 9, 66, 26, 67, 15, 12}, new int[]{19, 14, 15, 87, 11, 63, 43, 67, 43, 1, 4, 85, 25, 84, 74, 82, 97, 53, 35, 25, 3, 51, 50}, new int[]{13, 35, 89, 55, 18, 51, 30, 40, 30, 58, 88, 90, 65, 97, 72, 12, 8, 75, 78, 18, 65, 85, 10}, new int[]{37, 29, 46, 88, 44, 36, 18, 79, 32, 20, 34, 73, 41, 98, 35, 57, 27, 18, 21, 18, 27, 95, 28}, new int[]{97, 15, 45, 47, 36, 19, 99, 96, 45, 57, 76, 29, 98, 16, 22, 72, 55, 12, 98, 16, 55, 47, 73}, new int[]{27, 99, 11, 83, 95, 15, 53, 91, 33, 71, 87, 22, 65, 58, 27, 75, 12, 60, 85, 72, 77, 33, 66}, new int[]{9, 77, 26, 45, 55, 52, 9, 79, 7, 57, 57, 37, 73, 78, 30, 51, 47, 84, 54, 23, 79, 58, 56}, new int[]{31, 68, 89, 62, 83, 60, 37, 34, 1, 41, 95, 44, 35, 27, 21, 72, 82, 23, 41, 93, 80, 50, 74}, new int[]{81, 22, 40, 2, 42, 30, 44, 83, 10, 84, 63, 24, 6, 45, 18, 16, 40, 16, 79, 70, 97, 13, 68}, new int[]{96, 50, 29, 58, 7, 97, 5, 40, 4, 7, 80, 37, 75, 59, 50, 69, 29, 55, 89, 67, 96, 30, 20}, new int[]{94, 67, 61, 44, 56, 79, 60, 41, 78, 40, 50, 10, 17, 15, 93, 53, 98, 99, 73, 51, 81, 66, 26}, new int[]{38, 92, 30, 55, 9, 92, 16, 24, 86, 20, 62, 52, 78, 52, 43, 96, 10, 66, 71, 65, 15, 75, 84}, new int[]{50, 41, 60, 33, 52, 38, 84, 64, 10, 96, 50, 63, 59, 12, 58, 89, 9, 49, 61, 81, 78, 88, 51}, new int[]{45, 67, 80, 18, 61, 50, 14, 10, 74, 6, 3, 86, 2, 76, 1, 52, 13, 32, 25, 38, 5, 18, 10}, new int[]{53, 83, 34, 30, 32, 11, 86, 30, 1, 6, 78, 56, 67, 58, 79, 95, 19, 61, 62, 86, 71, 91, 35}, new int[]{43, 5, 46, 35, 87, 36, 4, 61, 2, 35, 46, 4, 60, 48, 4, 70, 51, 17, 4, 86, 57, 85, 76}});
List<Integer> param1 = new ArrayList<>();
param1.add(3);
param1.add(2);
param1.add(3);
param1.add(3);
param1.add(3);
param1.add(1);
param1.add(1);
param1.add(10);
param1.add(15);
param1.add(17);
List<Integer> param2 = new ArrayList<>();
param2.add(4);
param2.add(2);
param2.add(4);
param2.add(4);
param2.add(3);
param2.add(28);
param2.add(32);
param2.add(12);
param2.add(17);
param2.add(22);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,043 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_POSSIBLE_DECODINGS_GIVEN_DIGIT_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 COUNT_POSSIBLE_DECODINGS_GIVEN_DIGIT_SEQUENCE_1{
static int f_gold ( char digits [ ] , int n ) {
int count [ ] = new int [ n + 1 ] ;
count [ 0 ] = 1 ;
count [ 1 ] = 1 ;
if ( digits [ 0 ] == '0' ) return 0 ;
for ( int i = 2 ;
i <= n ;
i ++ ) {
count [ i ] = 0 ;
if ( digits [ i - 1 ] > '0' ) count [ i ] = count [ i - 1 ] ;
if ( digits [ i - 2 ] == '1' || ( digits [ i - 2 ] == '2' && digits [ i - 1 ] < '7' ) ) count [ i ] += count [ i - 2 ] ;
}
return count [ n ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<char [ ]> param0 = new ArrayList<>();
param0.add(new char[]{'B','C','E','E','F','F','G','J','K','K','L','L','M','O','O','P','Q','R','V','X','Z','a','a','a','c','c','c','d','e','g','g','k','k','k','l','m','m','n','p','t','y','z'});
param0.add(new char[]{'0','9','5','0','2','6','5','4','4','5','2','6','8','2','0','3','1','9','0','1','5'});
param0.add(new char[]{'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 char[]{'x','a','R','O','S','r','g','e','Y','Z','t'});
param0.add(new char[]{'0','1','1','1','2','2','2','2','2','2','2','3','3','4','4','5','5','5','5','5','6','6','7','7','7','7','8','8'});
param0.add(new char[]{'1','1','1','1','1','1'});
param0.add(new char[]{' ',' ',' ','B','B','C','D','F','H','I','J','K','L','O','P','V','W','W','Z','Z','a','c','h','i','q','s','x'});
param0.add(new char[]{'0','9','1','5','2','4','9','3'});
param0.add(new char[]{'0','0','0','1','1','1'});
param0.add(new char[]{'w','t','U','R','a','c','G'});
List<Integer> param1 = new ArrayList<>();
param1.add(31);
param1.add(13);
param1.add(19);
param1.add(5);
param1.add(21);
param1.add(4);
param1.add(26);
param1.add(5);
param1.add(4);
param1.add(5);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,044 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PERFECT_REVERSIBLE_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 PERFECT_REVERSIBLE_STRING{
static boolean f_gold ( String str ) {
int i = 0 , j = str . length ( ) - 1 ;
while ( i < j ) {
if ( str . charAt ( i ) != str . charAt ( j ) ) return false ;
i ++ ;
j -- ;
}
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("ab");
param0.add("303");
param0.add("11110000");
param0.add("aba");
param0.add("404");
param0.add("10101");
param0.add("abab");
param0.add("6366");
param0.add("001");
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,045 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_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_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2{
static boolean f_gold ( int n ) {
return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) && ( n & 0xAAAAAAAA ) == 0 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(4);
param0.add(64);
param0.add(-64);
param0.add(128);
param0.add(1024);
param0.add(97);
param0.add(86);
param0.add(14);
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,046 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE{
static int f_gold ( int arr [ ] , int n ) {
int brr [ ] = new int [ 2 * n + 1 ] ;
for ( int i = 0 ;
i < n ;
i ++ ) brr [ i ] = arr [ i ] ;
for ( int i = 0 ;
i < n ;
i ++ ) brr [ n + i ] = arr [ i ] ;
int maxHam = 0 ;
for ( int i = 1 ;
i < n ;
i ++ ) {
int currHam = 0 ;
for ( int j = i , k = 0 ;
j < ( i + n ) ;
j ++ , k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++ ;
if ( currHam == n ) return n ;
maxHam = Math . max ( maxHam , currHam ) ;
}
return maxHam ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,4,18,22,28,34,35,39,44,45,67,73,75,79,81,83,89,93,96});
param0.add(new int[]{52,-28});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{24});
param0.add(new int[]{-68,14,36,62});
param0.add(new int[]{1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0});
param0.add(new int[]{7,10,19,22,24,28,29,39,46,55,62,66,68,73,74,76,83,84,85,99});
param0.add(new int[]{-38,56,86,12,24,-90,-20,-46,38,92,-44,-74,54,50,46,50,-94,64,32,-84,70});
param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{61,89,8});
List<Integer> param1 = new ArrayList<>();
param1.add(12);
param1.add(1);
param1.add(21);
param1.add(0);
param1.add(2);
param1.add(12);
param1.add(15);
param1.add(14);
param1.add(8);
param1.add(2);
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,047 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/STOOGE_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;
class STOOGE_SORT{
static void f_gold ( int arr [ ] , int l , int h ) {
if ( l >= h ) return ;
if ( arr [ l ] > arr [ h ] ) {
int t = arr [ l ] ;
arr [ l ] = arr [ h ] ;
arr [ h ] = t ;
}
if ( h - l + 1 > 2 ) {
int t = ( h - l + 1 ) / 3 ;
f_gold ( arr , l , h - t ) ;
f_gold ( arr , l + t , h ) ;
f_gold ( arr , l , h - t ) ;
}
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{6,25,42,52,53,54,58,66,67,70});
param0.add(new int[]{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{7,49,26,33,48,79,2,71,32,4,20,36});
param0.add(new int[]{88});
param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0});
param0.add(new int[]{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99});
param0.add(new int[]{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34});
param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55});
List<Integer> param1 = new ArrayList<>();
param1.add(6);
param1.add(16);
param1.add(28);
param1.add(9);
param1.add(0);
param1.add(20);
param1.add(28);
param1.add(15);
param1.add(12);
param1.add(27);
List<Integer> param2 = new ArrayList<>();
param2.add(6);
param2.add(14);
param2.add(24);
param2.add(10);
param2.add(0);
param2.add(28);
param2.add(29);
param2.add(11);
param2.add(17);
param2.add(20);
List<int [ ]> filled_function_param0 = new ArrayList<>();
filled_function_param0.add(new int[]{6,25,42,52,53,54,58,66,67,70});
filled_function_param0.add(new int[]{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25});
filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
filled_function_param0.add(new int[]{7,49,26,33,48,79,2,71,32,4,20,36});
filled_function_param0.add(new int[]{88});
filled_function_param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0});
filled_function_param0.add(new int[]{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99});
filled_function_param0.add(new int[]{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34});
filled_function_param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
filled_function_param0.add(new int[]{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55});
List<Integer> filled_function_param1 = new ArrayList<>();
filled_function_param1.add(6);
filled_function_param1.add(16);
filled_function_param1.add(28);
filled_function_param1.add(9);
filled_function_param1.add(0);
filled_function_param1.add(20);
filled_function_param1.add(28);
filled_function_param1.add(15);
filled_function_param1.add(12);
filled_function_param1.add(27);
List<Integer> filled_function_param2 = new ArrayList<>();
filled_function_param2.add(6);
filled_function_param2.add(14);
filled_function_param2.add(24);
filled_function_param2.add(10);
filled_function_param2.add(0);
filled_function_param2.add(28);
filled_function_param2.add(29);
filled_function_param2.add(11);
filled_function_param2.add(17);
filled_function_param2.add(20);
for(int i = 0; i < param0.size(); ++i)
{
f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i));
f_gold(param0.get(i),param1.get(i),param2.get(i));
if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,048 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/COUNT_DIGITS_FACTORIAL_SET_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_DIGITS_FACTORIAL_SET_1{
static int f_gold ( int n ) {
if ( n < 0 ) return 0 ;
if ( n <= 1 ) return 1 ;
double digits = 0 ;
for ( int i = 2 ;
i <= n ;
i ++ ) digits += Math . log10 ( i ) ;
return ( int ) ( Math . floor ( digits ) ) + 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(66);
param0.add(7);
param0.add(55);
param0.add(37);
param0.add(76);
param0.add(16);
param0.add(17);
param0.add(95);
param0.add(71);
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,049 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE.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 PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE{
static int f_gold ( int a ) {
return 4 * a ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(98);
param0.add(9);
param0.add(18);
param0.add(38);
param0.add(84);
param0.add(8);
param0.add(39);
param0.add(6);
param0.add(60);
param0.add(47);
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,050 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SPACE_OPTIMIZED_SOLUTION_LCS.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 SPACE_OPTIMIZED_SOLUTION_LCS{
public static int f_gold ( String X , String Y ) {
int m = X . length ( ) , n = Y . length ( ) ;
int L [ ] [ ] = new int [ 2 ] [ n + 1 ] ;
int bi = 0 ;
for ( int i = 0 ;
i <= m ;
i ++ ) {
bi = i & 1 ;
for ( int j = 0 ;
j <= n ;
j ++ ) {
if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0 ;
else if ( X . charAt ( i - 1 ) == Y . charAt ( j - 1 ) ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1 ;
else L [ bi ] [ j ] = Math . max ( L [ 1 - bi ] [ j ] , L [ bi ] [ j - 1 ] ) ;
}
}
return L [ bi ] [ n ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("YNpjSv");
param0.add("736519");
param0.add("11010000100010");
param0.add("v ");
param0.add("8311172");
param0.add("100011101011");
param0.add("u");
param0.add("3943042");
param0.add("101");
param0.add("MpbfF OsizevaM");
List<String> param1 = new ArrayList<>();
param1.add("qtUkJn");
param1.add("07592");
param1.add("0");
param1.add("qGBQT");
param1.add("157219329531");
param1.add("1000001111");
param1.add("YzkubTqLhP");
param1.add("3859");
param1.add("00010000101010");
param1.add("WgsFGaQwtp");
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,051 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_PAIRWISE_PRODUCTS_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 SUM_PAIRWISE_PRODUCTS_2{
static int f_gold ( int n ) {
return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(57);
param0.add(18);
param0.add(97);
param0.add(9);
param0.add(42);
param0.add(67);
param0.add(71);
param0.add(66);
param0.add(69);
param0.add(18);
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,052 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_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 N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1{
public static int f_gold ( int n ) {
int count = 0 ;
for ( int curr = 19 ;
;
curr += 9 ) {
int sum = 0 ;
for ( int x = curr ;
x > 0 ;
x = x / 10 ) sum = sum + x % 10 ;
if ( sum == 10 ) count ++ ;
if ( count == n ) return curr ;
}
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(93);
param0.add(10);
param0.add(55);
param0.add(94);
param0.add(2);
param0.add(5);
param0.add(37);
param0.add(4);
param0.add(11);
param0.add(46);
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,053 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MINIMUM_OPERATION_MAKE_ELEMENTS_EQUAL_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_OPERATION_MAKE_ELEMENTS_EQUAL_ARRAY{
public static int f_gold ( int arr [ ] , int n ) {
HashMap < Integer , Integer > hash = new HashMap < Integer , Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) if ( hash . containsKey ( arr [ i ] ) ) hash . put ( arr [ i ] , hash . get ( arr [ i ] ) + 1 ) ;
else hash . put ( arr [ i ] , 1 ) ;
int max_count = 0 ;
Set < Integer > s = hash . keySet ( ) ;
for ( int i : s ) if ( max_count < hash . get ( i ) ) max_count = hash . get ( i ) ;
return ( n - max_count ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,4,6,8,17,25,29,33,33,33,38,42,43,49,55,60,62,63,68,69,70,75,77,79,79,85,87,87,90,90,90,90,94,98});
param0.add(new int[]{-66,-44,72,-82,46,66,-78,-62,32,86,62,56,22,-58,46,-6,94});
param0.add(new int[]{0,1,1});
param0.add(new int[]{68,78,2,48,1,10,18,67,97,31,72,12,25,39,51,12,29,46,93,66,28,29,5,86,97,59,7,94,64,13,42,48,25,33,10,1,5,32,14,27});
param0.add(new int[]{-98,-96,-78,-72,-64,-62,-56,-40,-36,-14,-8,4,18,22,28,32,52,56,58,60,78,88,94});
param0.add(new int[]{0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0});
param0.add(new int[]{3,3,7,9,14,15,15,25,25,26,28,31,37,37,47,51,53,58,58,60,63,65,68,70,70,71,77,79,81,88,89,97});
param0.add(new int[]{40,-64,-62,74,-10,48,-56,70,-60,54,-6,74,-8,-54,-20,-50,40,-22,-54,-76,-92,-76,36,16,-42,58,-74,-90,-54,-32,-38,-50,74,26,52,38,24,-32,78,68,82,36,64,56,86,-28,-44,48,88});
param0.add(new int[]{0,0,1,1,1,1,1});
param0.add(new int[]{87,77,76,1,59,15,98,45,62,10,87,59,13,50,58,10});
List<Integer> param1 = new ArrayList<>();
param1.add(33);
param1.add(11);
param1.add(1);
param1.add(36);
param1.add(18);
param1.add(21);
param1.add(23);
param1.add(36);
param1.add(4);
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,054 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_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 SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N{
static int f_gold ( int n ) {
int prime [ ] = new int [ n + 1 ] , sum = 0 ;
Arrays . fill ( prime , 0 ) ;
int max = n / 2 ;
for ( int p = 2 ;
p <= max ;
p ++ ) {
if ( prime [ p ] == 0 ) {
for ( int i = p * 2 ;
i <= n ;
i += p ) prime [ i ] = p ;
}
}
for ( int p = 2 ;
p <= n ;
p ++ ) {
if ( prime [ p ] != 0 ) sum += prime [ p ] ;
else sum += p ;
}
return sum ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(6);
param0.add(35);
param0.add(87);
param0.add(91);
param0.add(63);
param0.add(11);
param0.add(66);
param0.add(17);
param0.add(92);
param0.add(81);
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,055 |
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_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_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_1{
static int f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n , int x ) {
int count = 0 ;
HashSet < Integer > us = new HashSet < Integer > ( ) ;
for ( int i = 0 ;
i < m ;
i ++ ) us . add ( arr1 [ i ] ) ;
for ( int j = 0 ;
j < n ;
j ++ ) if ( us . contains ( x - arr2 [ j ] ) ) count ++ ;
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,2,5,5,9,11,12,14,16,18,35,36,39,44,50,52,52,59,69,81,82,84,85,87,87,87,88,88,89,90,90,92,97});
param0.add(new int[]{52,28,-38,78,-86,78,-48,-70,-80,28,-8,60,-28,90,6,76,32,-54,30,30,-32,-24,-36,62,36,-66,56,92,-20,90,32});
param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{91,95,13,13,76,18,36,86,26,13,17,68,58,42,38,9,42,90,14,74,38,64,15});
param0.add(new int[]{-96,-94,-94,-92,-74,-70,-66,-54,-48,-20,-18,-10,-6,-2,2,18,36,48,52,58,68,74,88,90,94});
param0.add(new int[]{1,1,1,0,0,0,1,1,0,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1,1,0});
param0.add(new int[]{7,18,19,20,24,25,25,27,30,35,39,42,58,59,63,64,64,66,66,68,69,77,86,93});
param0.add(new int[]{86,44,10,80,12,52,-92,2,42,-32,-14,2,-42,40,96,22,58,-90,-20,22,96,10,-92,-28,-28,80,36,72,-2,32,-46,62,-58,20,22,32,-98,-2,-42,-90,10,70,54,-32});
param0.add(new int[]{0,0,1,1,1,1});
param0.add(new int[]{43,2,4,99,45,80,27,8,64,77,57,55,71,67,51,42,58,70,5,62,55,20,61,47,66,80,70,24,56,22,58,63,61,41,20,97,47});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{5,5,8,20,20,24,25,29,34,37,43,45,48,49,59,60,68,70,70,72,72,75,76,77,79,81,84,85,86,88,95,96,96});
param1.add(new int[]{-88,-32,30,32,-46,62,-92,-90,-18,-18,10,16,60,-40,32,-88,60,-82,76,50,86,-82,-48,-68,-42,34,4,0,98,92,-78});
param1.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1});
param1.add(new int[]{16,96,8,35,12,27,81,21,32,82,95,81,53,76,72,16,9,16,61,1,36,71,28});
param1.add(new int[]{-92,-72,-72,-64,-58,-52,-30,-28,-24,-24,-16,-10,-2,4,12,22,30,38,44,62,64,68,86,88,90});
param1.add(new int[]{1,0,1,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,0,0,1,0,0,0,0,0,1,1,1,0,0});
param1.add(new int[]{2,2,18,20,22,22,31,35,36,40,41,41,41,42,42,43,45,61,79,83,87,91,95,96});
param1.add(new int[]{-4,-76,-98,14,30,-10,-10,62,88,-94,-74,-82,84,44,58,8,-42,-66,-18,68,-78,42,-32,38,-98,38,-78,42,86,-38,-6,-72,-44,8,-6,-48,-62,82,94,-92,-56,28,-54,34});
param1.add(new int[]{0,0,1,1,1,1});
param1.add(new int[]{11,66,41,17,93,25,24,17,12,33,62,86,48,68,36,36,39,82,7,66,5,48,27,9,56,6,61,91,98,74,61,63,98,96,57,63,85});
List<Integer> param2 = new ArrayList<>();
param2.add(17);
param2.add(30);
param2.add(13);
param2.add(11);
param2.add(19);
param2.add(18);
param2.add(22);
param2.add(26);
param2.add(5);
param2.add(24);
List<Integer> param3 = new ArrayList<>();
param3.add(29);
param3.add(27);
param3.add(11);
param3.add(12);
param3.add(14);
param3.add(19);
param3.add(18);
param3.add(36);
param3.add(3);
param3.add(29);
List<Integer> param4 = new ArrayList<>();
param4.add(32);
param4.add(17);
param4.add(8);
param4.add(15);
param4.add(21);
param4.add(29);
param4.add(18);
param4.add(31);
param4.add(5);
param4.add(21);
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,056 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K.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 PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K{
static boolean f_gold ( Integer a [ ] , int b [ ] , int n , int k ) {
Arrays . sort ( a , Collections . reverseOrder ( ) ) ;
Arrays . sort ( b ) ;
for ( int i = 0 ;
i < n ;
i ++ ) if ( a [ i ] + b [ i ] < k ) return false ;
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer [ ]> param0 = new ArrayList<>();
param0.add(new Integer[]{9,12,16,25,27,40,43,52,52,70,87,88,90,97,99});
param0.add(new Integer[]{-96,-90,-80,10,-84,-96,-28,-42,30,-92,-44,-14,18,-68,-94,6,-76,72,-90,42,70,-78,56,-26,8,74,12,-74,20,-86,-74,-90,-98,92,30,94,14,92,88,-98,42,-48});
param0.add(new Integer[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new Integer[]{13,35,6,69,42,55,11,97,15,65,70,77,51,16,3,26,47,72,15,71,2,31,18,59,75,48});
param0.add(new Integer[]{-72,-70,-66,-64,-52,-52,-52,-48,-46,-42,-40,-34,-20,-4,-4,-2,2,4,16,16,18,18,32,36,52,54,56,56,58,68,72,74,84,84,90,90,92,94});
param0.add(new Integer[]{1,0,0,1,0,1,1,0,1,0,1,1,1,0,0,1,0,1,0});
param0.add(new Integer[]{8,17,18,21,23,32,34,37,44,48,53,58,64,66,66,72,72,79,80,80,80,82,87,92,93,94,96,96,98});
param0.add(new Integer[]{-20,-22,-16,-80,-88,22,-78,-82,-50,32,28,-8,-48,80,62,-14,14,10,-78,78,52,94,-66,14,50,18,-38,-98,24,18,-28,24,10,-88,-14});
param0.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new Integer[]{75,31,58,10,92,65,45,72,53,91,39,33,10,13,67,85});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{4,7,11,20,34,35,36,44,46,71,72,78,85,85,91});
param1.add(new int[]{-48,84,16,-72,96,-78,-76,-84,-76,-32,-50,62,-22,24,-32,94,8,-14,-20,44,-80,68,-44,60,94,-42,-44,-74,-98,-86,16,62,-80,18,-18,70,30,40,-56,76,-32,50});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1});
param1.add(new int[]{88,15,44,36,38,98,89,81,73,51,37,4,79,60,11,62,48,45,12,21,65,14,78,20,12,46});
param1.add(new int[]{-94,-76,-74,-56,-54,-50,-46,-38,-26,-24,-24,-22,-16,-10,-6,-4,-4,0,0,6,12,12,18,20,38,50,52,52,54,64,64,72,72,72,76,90,96,96});
param1.add(new int[]{1,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1});
param1.add(new int[]{11,15,17,19,23,23,26,27,36,43,46,47,55,59,63,66,77,79,79,82,85,86,86,91,91,94,94,97,99});
param1.add(new int[]{6,-54,90,98,-30,88,36,88,38,12,46,-66,-80,32,42,-96,62,-44,-80,-14,20,2,70,-46,96,-40,52,56,96,-82,24,98,-16,90,66});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{41,91,78,28,40,71,74,69,71,12,7,21,92,19,39,34});
List<Integer> param2 = new ArrayList<>();
param2.add(10);
param2.add(40);
param2.add(11);
param2.add(25);
param2.add(26);
param2.add(13);
param2.add(20);
param2.add(31);
param2.add(31);
param2.add(14);
List<Integer> param3 = new ArrayList<>();
param3.add(7);
param3.add(38);
param3.add(15);
param3.add(16);
param3.add(30);
param3.add(13);
param3.add(14);
param3.add(24);
param3.add(30);
param3.add(8);
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,057 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_TWO_LARGE_NUMBERS_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 SUM_TWO_LARGE_NUMBERS_1{
static String f_gold ( String str1 , String str2 ) {
if ( str1 . length ( ) > str2 . length ( ) ) {
String t = str1 ;
str1 = str2 ;
str2 = t ;
}
String str = "" ;
int n1 = str1 . length ( ) , n2 = str2 . length ( ) ;
int diff = n2 - n1 ;
int carry = 0 ;
for ( int i = n1 - 1 ;
i >= 0 ;
i -- ) {
int sum = ( ( int ) ( str1 . charAt ( i ) - '0' ) + ( int ) ( str2 . charAt ( i + diff ) - '0' ) + carry ) ;
str += ( char ) ( sum % 10 + '0' ) ;
carry = sum / 10 ;
}
for ( int i = n2 - n1 - 1 ;
i >= 0 ;
i -- ) {
int sum = ( ( int ) ( str2 . charAt ( i ) - '0' ) + carry ) ;
str += ( char ) ( sum % 10 + '0' ) ;
carry = sum / 10 ;
}
if ( carry > 0 ) str += ( char ) ( carry + '0' ) ;
return new StringBuilder ( str ) . reverse ( ) . toString ( ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("G");
param0.add("48578");
param0.add("010");
param0.add("KkGp");
param0.add("48928969618416");
param0.add("0101011010");
param0.add("X");
param0.add("10073867");
param0.add("01110000000");
param0.add("k ");
List<String> param1 = new ArrayList<>();
param1.add("FcAiuKhw");
param1.add("5117561223135");
param1.add("00000");
param1.add("nSE");
param1.add("88497275");
param1.add("11");
param1.add("MomtbuxLRR");
param1.add("28");
param1.add("0110");
param1.add("aSSlhOYp");
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,058 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/BREAK_NUMBER_THREE_PARTS.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 BREAK_NUMBER_THREE_PARTS{
static long f_gold ( long n ) {
long count = 0 ;
for ( int i = 0 ;
i <= n ;
i ++ ) for ( int j = 0 ;
j <= n ;
j ++ ) for ( int k = 0 ;
k <= n ;
k ++ ) if ( i + j + k == n ) count ++ ;
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Long> param0 = new ArrayList<>();
param0.add(52L);
param0.add(47L);
param0.add(75L);
param0.add(36L);
param0.add(68L);
param0.add(16L);
param0.add(99L);
param0.add(38L);
param0.add(84L);
param0.add(45L);
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,059 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET.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 BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET{
static int f_gold ( int n ) {
int [ ] [ ] bell = new int [ n + 1 ] [ n + 1 ] ;
bell [ 0 ] [ 0 ] = 1 ;
for ( int i = 1 ;
i <= n ;
i ++ ) {
bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ] ;
for ( int j = 1 ;
j <= i ;
j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ] ;
}
return bell [ n ] [ 0 ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(84);
param0.add(78);
param0.add(9);
param0.add(73);
param0.add(4);
param0.add(53);
param0.add(85);
param0.add(38);
param0.add(39);
param0.add(6);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,060 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_ONE_EXTRA_CHARACTER_STRING_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_ONE_EXTRA_CHARACTER_STRING_1{
static char f_gold ( String strA , String strB ) {
int res = 0 , i ;
for ( i = 0 ;
i < strA . length ( ) ;
i ++ ) {
res ^= strA . charAt ( i ) ;
}
for ( i = 0 ;
i < strB . length ( ) ;
i ++ ) {
res ^= strB . charAt ( i ) ;
}
return ( ( char ) ( res ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("obfLA mmMYvghH");
param0.add("2941");
param0.add("0111111");
param0.add("oWvbFstI");
param0.add("4937516500");
param0.add("101110100");
param0.add("hYZscJQFBE");
param0.add("58443");
param0.add("1100");
param0.add("ZUdYuIBVNaeeb");
List<String> param1 = new ArrayList<>();
param1.add("obfLA mmMYvghH");
param1.add("2941");
param1.add("0111111");
param1.add("oWvbFstI");
param1.add("4937516500");
param1.add("101110100");
param1.add("hYZscJQFBE");
param1.add("58443");
param1.add("1100");
param1.add("ZUdYuIBVNaeeb");
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,061 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MULTIPLY_LARGE_NUMBERS_REPRESENTED_AS_STRINGS.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_LARGE_NUMBERS_REPRESENTED_AS_STRINGS{
static String f_gold ( String num1 , String num2 ) {
int len1 = num1 . length ( ) ;
int len2 = num2 . length ( ) ;
if ( len1 == 0 || len2 == 0 ) return "0" ;
int result [ ] = new int [ len1 + len2 ] ;
int i_n1 = 0 ;
int i_n2 = 0 ;
for ( int i = len1 - 1 ;
i >= 0 ;
i -- ) {
int carry = 0 ;
int n1 = num1 . charAt ( i ) - '0' ;
i_n2 = 0 ;
for ( int j = len2 - 1 ;
j >= 0 ;
j -- ) {
int n2 = num2 . charAt ( j ) - '0' ;
int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry ;
carry = sum / 10 ;
result [ i_n1 + i_n2 ] = sum % 10 ;
i_n2 ++ ;
}
if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry ;
i_n1 ++ ;
}
int i = result . length - 1 ;
while ( i >= 0 && result [ i ] == 0 ) i -- ;
if ( i == - 1 ) return "0" ;
String s = "" ;
while ( i >= 0 ) s += ( result [ i -- ] ) ;
return s ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("OaITtzE");
param0.add("88111031");
param0.add("1100111");
param0.add("eiWPbMrFx");
param0.add("43701248");
param0.add("100001111110");
param0.add("jVgOapMp");
param0.add("68337672");
param0.add("00110101");
param0.add("JqSh");
List<String> param1 = new ArrayList<>();
param1.add("RnYlJUqzk");
param1.add("558471");
param1.add("11111110111101");
param1.add("tBAJaI");
param1.add("4027");
param1.add("11");
param1.add("Xm");
param1.add("56939");
param1.add("1");
param1.add("iAfjQRwuVyost");
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,062 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_PRODUCT_SUBSET_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_PRODUCT_SUBSET_ARRAY{
static int f_gold ( int a [ ] , int n ) {
if ( n == 1 ) {
return a [ 0 ] ;
}
int max_neg = Integer . MIN_VALUE ;
int count_neg = 0 , count_zero = 0 ;
int prod = 1 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( a [ i ] == 0 ) {
count_zero ++ ;
continue ;
}
if ( a [ i ] < 0 ) {
count_neg ++ ;
max_neg = Math . max ( max_neg , a [ i ] ) ;
}
prod = prod * a [ i ] ;
}
if ( count_zero == n ) {
return 0 ;
}
if ( count_neg % 2 == 1 ) {
if ( count_neg == 1 && count_zero > 0 && count_zero + count_neg == n ) {
return 0 ;
}
prod = prod / max_neg ;
}
return prod ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{22,62,97});
param0.add(new int[]{-96,30,34,16,82,12,68,6,-2,-78,-74,-52,38,62,20,4,-32,44,-34,12,-44,-66,-94,24,-86,56,-20,-62,90,-16,-2,54,80,-16,-56,-98,20,84,30,-44,-78,66,-62,18});
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,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[]{9,1,90,53,67,14,42,52,55,52,86,99,43,74,48,71,55,85,87,73,41,55,52});
param0.add(new int[]{-92,-78,-74,-72,-70,-66,-46,-44,-42,-34,-32,-30,-10,18,30,34,56,64,66});
param0.add(new int[]{0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0});
param0.add(new int[]{1,2,3,18,20,33,38,53,55,56,67,80,83,87,90,97,98});
param0.add(new int[]{-78,-14,20,70,-40,-96,78,70,-36,-30,24,-36,86,42,24,86,-52,-34,72,-58,-36,-24,-10,-68,-20,-64,34,42,-2,-8});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{1,6,32,4,63,85,48,64,11,29,77,59,1,99,17,17,38,49,78,82,50,87,75,18,75,73,98,17,27,51,4,98,96,6,74,5});
List<Integer> param1 = new ArrayList<>();
param1.add(2);
param1.add(41);
param1.add(43);
param1.add(20);
param1.add(10);
param1.add(16);
param1.add(9);
param1.add(16);
param1.add(11);
param1.add(32);
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,063 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SCHEDULE_ELEVATOR_TO_REDUCE_THE_TOTAL_TIME_TAKEN.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 SCHEDULE_ELEVATOR_TO_REDUCE_THE_TOTAL_TIME_TAKEN{
static int f_gold ( int n , int k , int a [ ] ) {
int temp ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = i + 1 ;
j < n ;
j ++ ) {
if ( a [ i ] < a [ j ] ) {
temp = a [ i ] ;
a [ i ] = a [ j ] ;
a [ j ] = temp ;
}
}
}
int f_gold = 0 ;
for ( int i = 0 ;
i < n ;
i += k ) f_gold += ( 2 * a [ i ] ) ;
return f_gold ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(17);
param0.add(2);
param0.add(0);
param0.add(16);
param0.add(31);
param0.add(28);
param0.add(9);
param0.add(32);
param0.add(17);
param0.add(19);
List<Integer> param1 = new ArrayList<>();
param1.add(15);
param1.add(2);
param1.add(0);
param1.add(27);
param1.add(23);
param1.add(33);
param1.add(10);
param1.add(26);
param1.add(22);
param1.add(15);
List<int [ ]> param2 = new ArrayList<>();
param2.add(new int[]{1,4,8,18,24,34,38,38,39,39,41,53,56,57,63,72,73,77,79,99});
param2.add(new int[]{-8,70,-90,-74});
param2.add(new int[]{0});
param2.add(new int[]{3,66,11,21,82,75,19,39,1,55,7,26,10,87,11,94,91,76,21,91,83,18,44,29,47,84,6,10,83,74,26,50});
param2.add(new int[]{-96,-84,-80,-72,-60,-60,-58,-58,-52,-46,-36,-34,-32,-26,-22,-22,-20,-18,-14,-14,-6,-2,-2,0,2,4,18,22,24,38,42,46,50,58,72,78,82,84,90,96,96,96});
param2.add(new int[]{0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1});
param2.add(new int[]{8,13,17,19,24,33,43,54,63,74,79,83});
param2.add(new int[]{0,52,20,40,-2,74,12,10,-56,68,-52,36,8,34,82,-64,-78,-22,-24,74,-54,62,-70,-76,-80,8,-24,84,-84,-74,-90,6,22,58,62,24,-74,50,92});
param2.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});
param2.add(new int[]{97,4,69,27,23,97,26,67,72,26,15,67,66,73,27,68,27,60,53,80,20,59,96,9,94,66,5,32});
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,064 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_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_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY{
static int f_gold ( int arr [ ] , int l , int h , int key ) {
if ( l > h ) return - 1 ;
int mid = ( l + h ) / 2 ;
if ( arr [ mid ] == key ) return mid ;
if ( arr [ l ] <= arr [ mid ] ) {
if ( key >= arr [ l ] && key <= arr [ mid ] ) return f_gold ( arr , l , mid - 1 , key ) ;
return f_gold ( arr , mid + 1 , h , key ) ;
}
if ( key >= arr [ mid ] && key <= arr [ h ] ) return f_gold ( arr , mid + 1 , h , key ) ;
return f_gold ( arr , l , mid - 1 , key ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5, 6, 7, 8, 9, 10, 1, 2, 3});
param0.add(new int[]{{30, 40, 50, 10, 20});
param0.add(new int[]{40,50,55,67,70,4,5,6,7});
param0.add(new int[]{14,41,38,67,99,11,96,52,4,29,22,57,3,45,14,76,70,38,93,5,74,50,18,17,20,34,51,69,86,73});
param0.add(new int[]{-90,-88,-88,-82,-62,-44,-38,-38,-36,-34,-34,-32,-30,-28,-28,-26,-24,-20,-16,-16,-16,-6,-6,2,6,8,10,14,18,18,46,50,50,54,56,58,58,60,62,70,70,74,82,84,88,94,96});
param0.add(new int[]{1,1,1,1,0,0,1,1,1,1,1,1,1,0});
param0.add(new int[]{4,7,9,10,10,11,14,16,17,21,25,27,31,34,34,34,38,41,42,42,52,56,56,58,60,66,67,68,68,70,72,74,76,82,88,88,88,89,91,93,94,95,95});
param0.add(new int[]{92,60,-60,64,18,70,56,34,58,14,28,-72,-22,-74,-46,-28,64,88,18,-50,-14,-20,64,6,-4,-98,60,98,84,-58,-98,66,80,68,-42,-58,82,90,-72,34,34,80,88,-64,66,-20,-26});
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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{33,18,98,47,76,58,29,68,62,78,12,95,20,88,39,12,43,45,5,45,96,64,38,28,70,25,65,79,39});
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(8);
param2.add(4);
param2.add(9);
param2.add(16);
param2.add(24);
param2.add(10);
param2.add(23);
param2.add(25);
param2.add(40);
param2.add(16);
List<Integer> param3 = new ArrayList<>();
param3.add(3);
param3.add(40);
param3.add(67);
param3.add(15);
param3.add(24);
param3.add(10);
param3.add(39);
param3.add(25);
param3.add(29);
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,065 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_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 DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT{
static boolean f_gold ( String bin ) {
int n = bin . length ( ) ;
if ( bin . charAt ( n - 1 ) == '1' ) return false ;
int sum = 0 ;
for ( int i = n - 2 ;
i >= 0 ;
i -- ) {
if ( bin . charAt ( i ) == '1' ) {
int posFromRight = n - i - 1 ;
if ( posFromRight % 4 == 1 ) sum = sum + 2 ;
else if ( posFromRight % 4 == 2 ) sum = sum + 4 ;
else if ( posFromRight % 4 == 3 ) sum = sum + 8 ;
else if ( posFromRight % 4 == 0 ) sum = sum + 6 ;
}
}
if ( sum % 10 == 0 ) return true ;
return false ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("101000");
param0.add("39613456759141");
param0.add("11");
param0.add("PoiHjo");
param0.add("2");
param0.add("0000101");
param0.add("T s dZKeDX gK");
param0.add("3944713969");
param0.add("1000");
param0.add("ifYUgdpmt");
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,066 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS.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_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS{
public static int f_gold ( int arr [ ] [ ] , int n ) {
int d1 = 0 , d2 = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = 0 ;
j < n ;
j ++ ) {
if ( i == j ) d1 += arr [ i ] [ j ] ;
if ( i == n - j - 1 ) d2 += arr [ i ] [ j ] ;
}
}
return Math . abs ( d1 - d2 ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ] [ ]> param0 = new ArrayList<>();
param0.add(new int[][]{new int[]{1,7,17,19,22,25,27,29,41,60,67,73,79,85,94},new int[]{2,6,16,21,30,42,43,48,50,52,60,61,68,92,95},new int[]{4,8,10,14,15,20,22,23,23,39,40,63,70,75,87},new int[]{7,21,24,36,39,43,50,58,58,67,70,89,94,98,99},new int[]{4,13,17,20,21,24,30,45,57,58,59,65,66,91,97},new int[]{15,15,18,33,38,43,51,57,64,68,70,75,85,94,97},new int[]{2,5,6,6,12,41,43,44,48,48,53,53,60,69,99},new int[]{1,13,14,24,24,25,35,36,40,67,74,75,87,88,96},new int[]{6,13,23,28,29,39,40,50,50,63,63,81,85,88,96},new int[]{4,13,26,27,36,40,42,42,46,48,57,62,67,67,70},new int[]{20,25,29,61,69,70,73,75,78,80,84,85,88,95,97},new int[]{2,2,6,11,11,31,39,48,50,52,54,64,77,89,97},new int[]{1,14,25,26,29,41,46,55,67,68,77,77,83,84,88},new int[]{6,9,11,25,29,33,36,44,63,65,67,68,78,89,91},new int[]{12,13,13,15,43,45,50,60,62,62,64,86,91,96,96}});
param0.add(new int[][]{new int[]{74,-94,42,56,-64,-46,-34,54,-2,-92,0,-38,-76,-16,42,20,-58,36,66,-88,6,-82,46,2,2,-62,-76,-10,-26,-44,-38,70,46,16,12,84,4,-72,-84,66,-6,-92,46,-94,-46,74,64},new int[]{20,-22,-40,-22,-40,56,0,-84,-96,32,-36,-16,56,36,-24,20,50,28,52,-44,-36,-18,14,42,28,24,-88,90,76,-72,-80,-80,48,56,-28,-18,-56,32,-72,30,-46,-60,8,-90,52,-10,86},new int[]{-82,60,60,72,-68,2,40,-56,-38,-80,10,54,-22,34,62,-78,10,28,-8,28,-22,-34,12,14,-18,38,88,-10,-70,44,-70,10,70,-58,36,-70,-32,-60,-98,32,32,6,58,-78,-58,-66,74},new int[]{58,-16,66,-26,18,46,92,14,62,-8,62,12,72,8,36,22,-24,-2,80,88,-16,46,16,-70,22,-58,-46,-66,4,86,54,-86,-6,-36,-54,14,-38,16,-12,-68,-18,96,54,70,-22,78,40},new int[]{-38,-50,-20,-58,80,-42,-64,-12,64,-56,50,36,18,58,12,12,12,-22,-72,-44,28,48,-2,34,-78,-36,-60,-34,28,8,30,-98,4,0,6,70,-90,-4,38,-88,-84,86,24,-18,96,-72,76},new int[]{-78,18,-82,-18,32,-26,-54,-18,84,68,-94,42,26,88,34,18,-22,20,44,-60,54,-60,14,86,18,10,-48,96,-36,-98,96,-6,-96,-2,-92,-78,-24,40,-82,-74,0,18,0,28,16,78,-76},new int[]{32,46,-30,98,-92,24,42,-2,-92,12,-24,84,80,-74,-80,-48,54,30,-4,28,0,-56,78,76,-96,-32,-52,82,-78,46,-92,-16,58,78,-14,-82,78,-44,-34,34,2,76,72,-34,-80,88,20},new int[]{-66,6,70,82,-86,-16,38,22,42,76,58,2,-12,0,14,-8,-8,62,46,-38,-90,8,36,-68,56,26,40,-36,76,-54,44,88,46,-62,34,-26,90,-94,52,40,24,-86,36,28,-12,-48,6},new int[]{-12,14,-96,-4,-96,-18,-60,-52,86,22,-44,-22,-68,66,-66,72,-42,-14,-98,56,82,-52,-84,82,98,-36,-14,20,-48,90,-20,80,-18,6,-82,-4,88,88,82,78,88,-34,22,6,-16,4,32},new int[]{18,24,52,-50,-82,-66,58,42,-60,66,86,82,-66,-72,-6,80,78,68,-30,-76,-64,98,-62,80,-96,32,60,-52,-26,-66,52,-8,42,74,-72,94,-94,-56,-14,74,72,-82,-86,-80,-4,-64,-52},new int[]{-82,2,-16,56,-14,70,-60,16,82,62,-52,12,-74,-22,50,-82,-14,-48,-88,52,-12,92,-40,16,-66,-92,30,-80,-10,48,-4,16,50,66,44,-40,-52,48,18,-16,-56,58,28,-42,-80,22,-58},new int[]{42,38,28,30,16,66,-92,36,-40,28,12,2,-50,-42,-96,-56,6,-16,10,96,-62,64,-8,82,46,94,6,30,84,64,-58,88,42,88,0,16,-30,48,-10,30,94,-42,56,-82,-60,-84,-34},new int[]{60,-50,-90,24,-8,40,-92,-28,28,84,-36,-62,-24,-54,98,-90,50,-26,-18,8,-74,-20,54,-22,-44,-84,64,66,-20,56,96,54,94,-60,96,-46,-66,66,-48,2,-90,-94,-86,-80,-36,-66,36},new int[]{82,-38,10,18,8,-12,-92,-96,-50,-34,18,-54,8,-36,56,-32,80,-84,96,76,6,72,62,24,58,20,-56,-94,-92,16,22,-68,-18,-26,-56,80,-52,50,56,78,-6,54,-58,16,78,52,80},new int[]{-34,-56,-86,42,26,-78,8,92,2,10,-56,-14,84,-20,14,-76,2,82,90,28,18,16,94,-96,-40,22,-52,-90,-28,-64,38,-68,-62,-94,76,-78,-48,70,-60,-98,84,-38,-12,-20,8,84,-52},new int[]{-74,-94,42,80,12,56,-90,58,4,-58,20,14,80,-88,22,94,-18,-96,76,88,72,-98,-80,88,-8,6,-10,50,-78,16,-40,28,14,-98,-90,-4,30,56,28,56,32,12,68,2,2,18,96},new int[]{70,24,-78,-52,-10,-54,-4,22,-96,-60,-16,90,70,64,78,90,-74,98,80,84,-84,-22,58,-12,-84,-2,-72,24,-96,52,-62,58,72,-24,-54,-38,-12,34,42,-50,-14,-16,62,-72,14,-34,50},new int[]{76,48,-66,12,-92,36,64,-86,-18,2,16,2,88,70,-8,4,-62,-34,-6,54,10,-8,-54,32,12,94,-12,-68,74,84,-38,-4,-32,20,14,-8,82,-66,48,-26,-74,10,-20,-74,-46,78,-96},new int[]{28,24,16,40,12,-68,-42,94,18,98,68,-56,2,-92,-10,-54,-2,-82,86,-64,-38,-12,48,-32,16,30,-36,-94,84,-74,-30,-54,62,-38,-74,-6,70,-64,-26,-58,30,2,96,64,-86,-24,-12},new int[]{-30,-78,84,58,20,2,10,-24,62,-56,-80,76,-40,-20,-66,-2,-62,48,-74,-48,-82,88,64,-72,74,-42,30,-60,-88,-46,-72,36,-98,70,-84,-52,68,-18,-90,-20,44,-40,-92,20,-98,-80,-84},new int[]{-90,44,-30,84,-10,36,28,46,-96,-42,-60,2,-14,78,80,44,-54,-10,-12,-30,80,-80,94,72,50,-98,74,14,-28,-84,60,62,-72,-90,-46,-90,56,-36,98,64,-26,64,-68,-58,-10,-12,-18},new int[]{84,-86,90,-90,-42,38,6,8,-90,-6,-52,18,-62,96,42,-26,-86,-24,54,10,94,-66,58,-82,84,-42,-6,48,72,54,94,-36,-56,-66,0,28,80,-22,92,44,64,-86,-96,6,56,-62,-88},new int[]{32,-90,68,72,-74,-70,-4,58,-78,-18,-50,-10,-84,26,38,-84,72,44,-52,44,-26,42,-84,2,-42,76,-16,-46,0,-46,-26,-28,-10,56,-84,-92,84,32,-80,-46,-10,-30,52,-78,-50,56,-22},new int[]{-78,12,-90,-90,-74,48,-46,32,4,24,-6,40,80,-26,-68,-20,70,86,60,-60,84,30,34,-60,-42,50,38,64,30,-18,-50,-48,66,-2,-20,86,26,-96,96,-68,38,64,-40,-94,-52,74,52},new int[]{-40,88,72,-56,-26,-48,-48,-20,46,88,14,86,4,46,6,-54,-86,34,58,-72,92,-18,-88,8,0,-28,-78,-4,40,0,28,-38,-60,-28,-44,48,-56,-52,2,20,72,-98,6,22,64,36,-60},new int[]{90,-8,0,-42,-58,-96,80,52,-78,24,-24,-92,-70,42,-46,96,-10,-32,-18,22,24,86,-4,-86,-70,-70,-96,-98,-34,0,16,-84,28,-70,94,-72,-52,-78,62,-56,-12,-88,76,74,12,12,-28},new int[]{-42,-94,96,74,70,-40,50,-40,-26,2,-76,-88,-54,80,66,38,-8,42,94,-12,-88,38,-44,-26,-98,80,-56,-40,48,-48,-8,50,6,74,94,-50,-70,-30,70,-2,60,-92,38,-28,-64,-62,-54},new int[]{-40,70,-60,-38,-70,6,24,-72,22,-58,-2,70,58,28,90,-68,-12,18,-66,-56,66,32,4,98,64,-34,10,-78,-88,-38,36,-76,-96,94,-38,-18,-40,94,-18,-66,-34,66,82,-94,76,-38,14},new int[]{-98,-72,14,10,-30,56,-56,30,20,60,52,46,-16,-60,60,0,-70,50,-64,90,-62,-10,-94,74,-92,98,86,42,-18,-66,34,40,36,-44,-44,-86,-22,-50,50,-28,-34,-40,-30,44,-54,74,54},new int[]{16,-12,-44,82,-60,36,-24,-12,78,-74,-82,66,-48,74,-2,-4,-4,10,-4,18,8,-84,-56,64,66,-46,-56,-60,-60,-72,92,-82,44,28,30,84,68,34,-36,-58,60,-26,10,74,50,-70,-40},new int[]{-94,-12,-34,-82,-22,22,-14,-66,76,-42,-94,24,40,10,-24,60,80,-52,62,76,96,92,46,-44,-20,-92,-36,-6,-90,-64,-64,44,54,-60,-30,80,32,32,-76,-10,48,88,-84,-32,-94,-50,80},new int[]{86,56,-50,-48,74,36,2,6,-64,24,86,58,-92,-66,-32,-4,-74,-94,16,-18,10,-66,82,-96,-96,56,18,78,-12,32,48,70,42,20,0,-80,78,-28,80,0,-94,-56,-28,48,-30,-50,-20},new int[]{46,-94,-6,60,-94,-18,80,-58,-62,-70,-20,-8,-60,92,32,78,4,-26,-32,98,40,98,-92,-96,2,-96,42,30,2,-4,20,-84,-8,-40,42,8,92,32,-12,44,-60,32,14,-56,-68,-72,-18},new int[]{2,50,48,44,-24,68,16,88,-66,-48,-82,-50,-24,-50,-56,40,30,-58,38,24,44,42,52,18,-86,26,-4,-64,70,-12,6,-90,78,12,-82,52,70,32,74,66,-98,-62,76,20,74,-48,-46},new int[]{90,66,-62,86,76,-54,78,98,66,-16,16,32,48,-42,50,16,-86,66,12,88,-92,-78,-84,74,10,0,-86,-34,14,-74,-88,86,-48,-34,44,-58,26,-48,-70,-96,-26,84,82,-90,-14,30,-20},new int[]{-26,58,-32,22,-82,50,-50,42,14,60,-28,-12,34,94,-68,-48,-6,-98,66,94,-60,26,72,10,-58,-66,-50,-92,-34,66,36,44,94,-34,-76,22,-94,14,56,-2,38,42,16,20,-90,-36,-34},new int[]{-90,98,34,26,58,70,-86,46,-40,70,94,40,-36,2,-82,0,-4,-18,70,40,92,-38,-46,-74,-82,-54,44,-34,24,-46,60,-36,-86,92,-32,-38,76,46,-42,-56,-42,-8,48,-64,88,-50,24},new int[]{70,-26,-72,-18,-88,-58,76,-96,62,-12,-56,74,62,68,-86,82,34,-98,-52,22,-16,-48,-14,-8,-56,10,48,98,-70,82,2,-86,76,72,-70,-6,58,-18,-48,52,-48,-76,68,-64,-34,-56,-88},new int[]{34,-80,-50,74,-26,2,40,-66,-16,56,22,10,-72,86,54,34,30,38,-86,-22,-38,-28,-86,28,96,6,-86,54,4,-84,34,-58,-6,40,54,-60,-22,84,74,-92,-58,-86,-76,-66,-36,90,-30},new int[]{26,74,84,-60,52,-14,98,-74,24,16,-96,-86,18,-82,-34,-82,-56,-86,-8,-50,-32,-44,8,50,-12,82,-10,80,-28,-28,2,-34,-88,28,-44,-94,-42,2,-48,54,90,16,-38,14,82,42,58},new int[]{-22,14,26,-60,-18,-38,-60,54,-48,60,50,-70,24,-50,18,48,98,42,-52,-68,24,94,60,74,76,6,-76,-70,-86,-22,76,16,-4,48,20,-60,82,38,32,36,-56,-58,40,12,46,18,-96},new int[]{-92,44,94,-42,-84,-78,-72,-62,-32,4,-12,-42,4,12,20,-12,6,38,-92,-64,64,92,-62,64,54,-60,-42,-54,-14,-28,26,-6,-14,0,80,10,-64,-54,2,82,-8,98,-20,72,-94,-78,-64},new int[]{50,44,-64,-36,60,-44,64,-64,40,-66,60,-44,6,-8,-80,36,2,30,-26,82,-82,26,-92,-40,-66,-62,76,-34,-46,-36,36,-92,36,-74,-78,50,-80,16,-88,92,-50,-80,12,-92,8,-18,-84},new int[]{20,-24,94,-62,40,-16,-24,-36,62,-88,98,-28,-80,96,-96,18,60,-92,22,96,98,-48,-82,62,-28,-74,-84,-56,88,-82,38,42,-82,-76,-16,-12,46,-46,48,96,12,66,74,-58,-2,-84,16},new int[]{-4,18,-28,22,70,-70,-70,66,46,-68,72,-60,-54,2,-82,60,86,-92,36,-44,98,88,-88,86,24,88,-80,-12,-18,-8,0,-26,2,56,94,90,30,-96,32,48,2,-72,-36,10,-52,0,98},new int[]{46,-62,-78,-50,98,26,42,6,26,-28,-56,60,-36,-54,-84,90,68,94,-28,60,52,54,28,12,58,-42,86,-74,-84,-88,54,-18,54,38,-96,84,-78,-26,50,86,58,24,-2,-78,40,-68,6},new int[]{2,26,-82,-84,46,46,0,18,90,-92,24,-34,-70,-84,18,32,-36,-84,-36,20,26,-72,-12,36,72,42,58,-34,30,40,-6,-18,-52,20,-52,4,-64,-64,-2,36,64,-86,-70,-38,-50,-34,60}});
param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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,1},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},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},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,1},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},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},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},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},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[][]{new int[]{49,76,85,2,48,20},new int[]{13,2,84,21,44,17},new int[]{70,85,58,75,89,16},new int[]{86,45,19,97,95,63},new int[]{62,44,26,75,73,95},new int[]{93,35,62,88,6,33}});
param0.add(new int[][]{new int[]{-80,-72,-68,-62,-56,-40,-28,4,22,24,34,58,60,60,78},new int[]{-88,-68,-48,-28,-24,-4,0,2,12,30,42,48,52,64,68},new int[]{-92,-86,-82,-44,-38,-20,-18,-16,2,4,12,32,42,54,96},new int[]{-82,-74,-64,-48,-30,-10,16,20,28,46,46,54,60,74,96},new int[]{-84,-78,-70,-30,-28,-18,-10,-2,2,14,30,44,50,92,98},new int[]{-92,-74,-64,-48,-46,-8,20,22,28,30,30,32,46,62,84},new int[]{-92,-82,-82,-66,-64,-60,-40,-2,2,40,44,46,66,68,74},new int[]{-70,-58,-54,-46,-34,-18,14,20,22,32,48,62,84,86,90},new int[]{-92,-62,-58,-48,-30,-28,0,8,16,20,26,38,70,92,98},new int[]{-90,-80,-46,0,14,36,42,48,48,50,50,50,52,76,98},new int[]{-80,-78,-58,-58,-54,-44,-42,6,20,24,28,34,40,58,78},new int[]{-90,-80,-60,-40,4,6,10,26,28,34,36,38,42,44,56},new int[]{-96,-96,-72,-58,-54,-40,-34,-34,-28,-26,-22,-18,-2,18,54},new int[]{-98,-90,-76,-64,-62,-58,-54,-30,-16,14,36,54,54,72,92},new int[]{-86,-70,-58,-48,-46,-38,-32,2,20,44,54,56,66,82,84}});
param0.add(new int[][]{new int[]{0,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,0,1,0,1,1,1,0,0},new int[]{0,1,1,1,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,1,1,1,1,1,1,0},new int[]{0,0,1,1,0,0,0,1,0,1,0,0,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,0,1,1,0},new int[]{0,0,1,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0},new int[]{0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,0,1,1,0,1,0,1,0,0,0,0,1,1},new int[]{1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0},new int[]{1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,1,0},new int[]{1,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,0,0,1,0,0,1,1,0},new int[]{0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0,1,1,0,1,1},new int[]{1,0,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,0,1,1,1},new int[]{1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,1,1,1,0,0,1,0,1,0,0},new int[]{0,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,1,1,0,1},new int[]{0,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,0,0,0,0,1,1,1,0,0},new int[]{1,1,0,0,1,1,0,1,0,1,1,0,0,0,1,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,1,1,1,1},new int[]{1,1,1,0,1,1,1,1,0,0,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1},new int[]{1,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,1,0,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,1,1,0,0,1},new int[]{1,0,0,1,0,1,0,1,1,1,1,0,0,1,1,1,0,1,1,1,1,1,0,0,1,0,0,1,0,1,1,1,1,1,1,0},new int[]{0,1,1,1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,0,1},new int[]{1,0,0,0,0,1,1,0,1,0,0,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1},new int[]{1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,1,0,1,1,1,1},new int[]{1,1,0,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,1,1,1},new int[]{0,0,1,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0},new int[]{0,1,0,0,0,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,0,0,0},new int[]{0,0,1,0,0,0,0,1,1,0,0,1,0,0,1,1,0,1,0,0,1,0,0,0,1,0,1,0,1,1,1,1,0,1,0,1},new int[]{0,1,1,0,1,1,1,1,1,1,0,1,0,0,1,1,0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,0,1,0},new int[]{1,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0},new int[]{0,0,1,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,1,1,1,1,1,0,1,1,1,1,0,0,1,0},new int[]{1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,0},new int[]{1,1,0,0,1,1,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,1,0,1,1,0,1,1,1,1,1,0,0,0},new int[]{0,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,1,0,0,0,1,1,0,0},new int[]{0,0,0,1,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0,0,1,1,1,0,0,0,1,0,0,1,1,1,1},new int[]{0,1,1,1,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,1,1,0,0,1},new int[]{0,1,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0},new int[]{0,0,0,1,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,0},new int[]{0,1,0,0,0,1,0,1,1,0,1,0,0,1,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,1,0,1,0}});
param0.add(new int[][]{new int[]{1,2,2,2,3,3,10,11,11,19,27,30,31,36,38,51,55,64,64,68,72,78,79,83,87,98},new int[]{1,3,5,6,19,25,31,32,39,40,51,51,52,54,57,58,64,65,66,73,76,83,87,90,92,97},new int[]{1,6,7,26,29,33,35,42,44,46,47,50,61,64,65,67,73,75,81,81,86,87,88,88,95,95},new int[]{1,3,6,19,19,21,29,34,36,36,43,44,52,53,53,63,64,67,68,75,75,75,76,78,81,83},new int[]{9,10,18,18,20,22,28,31,35,42,47,48,48,62,63,65,65,70,73,75,75,82,92,95,95,97},new int[]{10,14,16,17,27,30,33,36,37,37,39,47,48,48,56,57,62,74,78,81,82,84,87,88,95,95},new int[]{2,16,16,18,21,21,25,26,33,38,51,51,57,59,66,68,68,69,70,74,74,74,84,86,96,98},new int[]{3,5,14,14,17,23,26,26,27,31,33,36,37,51,63,64,70,70,72,75,79,86,90,90,97,97},new int[]{15,15,16,19,23,29,31,33,35,35,37,38,44,49,56,68,73,74,75,76,80,84,87,89,95,99},new int[]{2,3,7,13,14,16,19,19,21,28,32,39,43,47,58,64,66,80,80,82,83,84,91,91,95,98},new int[]{2,3,11,21,22,24,26,34,39,41,41,47,49,50,50,59,61,67,78,79,80,85,87,87,90,96},new int[]{6,9,11,15,20,27,27,27,28,42,47,47,58,61,67,70,70,71,76,77,78,80,83,91,97,98},new int[]{4,8,12,13,14,14,15,20,21,22,24,25,29,51,51,57,60,68,73,76,76,81,92,93,94,98},new int[]{1,8,23,26,26,26,31,40,41,45,46,49,50,53,55,58,62,65,66,68,71,77,87,87,97,98},new int[]{3,9,11,17,26,28,31,32,32,33,35,41,41,41,44,48,48,63,72,74,82,84,85,91,92,94},new int[]{3,5,6,8,10,17,36,41,42,45,50,51,52,53,56,58,63,64,69,72,73,74,78,87,90,92},new int[]{2,6,12,19,20,25,27,30,35,38,42,45,45,50,53,54,56,59,62,62,66,74,78,81,91,94},new int[]{6,8,9,15,18,20,23,23,29,30,39,41,49,62,65,69,76,79,83,84,85,86,90,94,98,98},new int[]{5,6,7,11,12,16,19,19,20,20,26,44,46,53,56,60,61,74,75,75,76,80,93,95,96,99},new int[]{7,15,19,22,23,24,31,34,35,37,40,42,44,52,57,67,73,74,76,77,78,83,84,95,96,97},new int[]{2,4,15,16,16,23,26,32,34,39,40,41,46,52,56,61,62,65,76,80,81,82,84,85,86,87},new int[]{9,13,22,41,42,42,42,45,48,49,51,51,54,58,59,60,73,74,75,83,83,86,91,94,98,98},new int[]{5,9,9,16,21,21,22,27,28,31,31,32,38,38,49,51,61,62,65,69,73,75,85,91,91,96},new int[]{4,4,7,7,7,9,11,21,31,36,43,43,57,58,63,63,64,66,70,71,73,77,82,83,92,97},new int[]{1,6,9,9,12,14,15,16,20,24,25,29,30,37,43,44,45,53,58,63,69,70,72,78,83,88},new int[]{1,15,16,17,19,24,25,35,43,44,44,46,48,49,50,53,54,61,61,67,70,74,74,83,87,88}});
param0.add(new int[][]{new int[]{-62,-26,-90,-96,66,8,88,98,26,-4,-62,38,24,18,-88,-78,22,-80,80,8,62,22,-20,42,78,-96,38,22,44,18,-98,4,66,-58,50,-98,42,48,-52,98,-72,72,60,-66,-78,-92},new int[]{24,94,24,64,78,-82,12,-96,-80,32,-18,-8,-98,-32,-8,-40,-98,-52,-86,-50,-16,-36,6,6,70,-78,10,-34,-98,24,-62,4,-8,-86,60,-52,-48,-44,82,68,98,30,6,-58,94,-52},new int[]{-20,84,-82,42,42,86,38,64,84,88,46,-48,-8,-60,-94,-74,-72,-74,-52,-96,46,68,84,-64,22,-44,78,-62,64,14,-80,90,-26,84,92,-82,36,-56,-46,28,86,-58,50,-78,-36,-50},new int[]{-26,-94,-38,-38,-10,58,-42,36,12,22,52,48,40,22,84,-56,-76,48,-42,-58,50,98,-46,-30,16,30,66,-2,68,44,-60,-4,40,16,68,-40,96,-40,-6,60,62,90,90,-20,98,94},new int[]{80,36,26,86,76,38,88,80,-90,-60,-52,92,48,-32,-18,4,-44,52,14,2,92,2,-70,-16,92,12,-66,62,52,-92,-98,-80,-46,-50,72,98,64,-32,52,-10,20,-20,-54,-12,64,-64},new int[]{38,94,60,44,-26,-46,92,60,-18,-10,-60,-78,-96,54,-88,-20,60,66,-62,40,98,-50,86,-56,-52,-60,52,26,62,62,-4,54,-60,52,-50,-2,92,-38,-98,-66,60,70,76,64,-80,-88},new int[]{94,84,38,-60,-72,50,-42,-52,-4,16,-40,90,-18,-20,34,-28,-4,-66,-82,-30,-36,94,-38,-56,-22,62,-2,30,-58,70,-80,0,-98,14,40,-28,76,30,18,6,-72,-28,24,26,66,-56},new int[]{38,52,34,-60,78,64,2,64,-50,14,-66,-2,-10,10,98,36,96,96,-76,-58,-52,22,40,-28,18,-34,-72,-98,-54,82,30,90,0,-22,6,-36,-34,44,-60,-40,70,-26,14,14,-72,98},new int[]{38,-88,26,34,32,-78,38,12,-16,-76,28,-74,6,-54,96,8,-34,72,84,-70,-26,16,-86,-14,46,-24,-24,-96,-82,-66,78,20,-94,-76,-76,90,-32,-24,-36,-62,-88,-26,-36,0,-92,40},new int[]{0,66,60,82,-14,92,88,30,60,36,80,-54,28,-10,-96,-4,-68,46,98,42,38,30,-74,-2,30,6,-78,74,-56,-6,-48,32,88,-40,18,36,-34,-28,30,-54,-82,98,34,-56,50,40},new int[]{18,-96,54,-6,94,-68,-28,-18,-90,-64,-88,60,60,-72,82,48,6,-44,-22,-82,62,52,-32,0,2,-12,-78,92,22,2,84,-64,50,-6,-2,90,76,-48,-28,22,-30,14,68,26,80,20},new int[]{-94,-26,-52,4,-44,12,74,-26,28,64,84,-62,-10,-12,74,68,94,-80,32,-26,80,44,-80,-74,-82,-86,98,-12,30,60,90,16,-58,-28,18,14,-86,-46,-62,-88,-84,74,-48,-8,-26,60},new int[]{10,64,58,-92,-48,38,-30,-64,-58,-68,-26,-68,52,48,-72,96,32,-48,-60,54,-6,-72,-22,74,4,14,80,52,-50,22,74,-14,-92,-96,54,-90,-18,18,-16,-82,26,98,-68,8,-78,-48},new int[]{-78,12,70,-42,34,-52,86,64,-32,-96,-22,-8,84,36,-38,-80,84,72,58,34,-86,-84,30,-40,-90,10,0,-74,14,76,-22,-2,86,86,-60,32,-62,-34,4,14,68,-38,86,94,18,30},new int[]{66,16,82,-70,-24,-90,-70,82,32,-42,-82,74,-24,-16,68,-92,32,-58,-58,-14,-34,68,-24,20,68,54,78,-72,-14,-46,74,-90,-98,-64,-2,-58,-6,-20,54,-70,-46,-56,50,-62,0,-14},new int[]{4,50,66,84,-44,50,-22,36,20,94,-2,66,-16,-82,-90,-74,88,42,16,42,-76,0,28,-42,-44,48,-12,78,-40,54,34,-86,-26,-46,78,-68,-80,-94,-2,-48,-42,62,48,-24,-20,60},new int[]{-16,20,16,-10,-96,-32,42,-52,-72,2,-66,-40,32,86,96,-46,88,64,90,68,-22,0,-18,82,22,62,-82,-44,76,-62,-26,8,82,84,96,8,76,66,-56,96,96,-54,-70,66,60,40},new int[]{64,-58,-76,94,-4,-48,-40,96,46,-16,2,-52,42,-80,-44,10,-60,28,-52,-54,-88,72,-40,-2,78,86,-26,-86,-90,-4,-14,46,-84,-36,-88,4,-4,-92,-42,36,-94,-10,-38,-82,-50,4},new int[]{-72,22,-40,24,10,26,72,14,-90,-66,-88,-30,40,40,-80,-56,-4,-88,32,-98,22,10,58,62,-10,24,-80,-90,28,-64,-26,30,-32,-44,90,-12,16,-48,98,88,-58,-54,-10,48,-12,-40},new int[]{70,-36,-30,-26,-48,86,-12,-78,62,-8,-80,-14,-48,52,-38,38,-54,-40,-24,-80,-94,-50,-46,64,12,62,-8,12,-22,24,-30,20,-8,-76,-18,-76,52,-74,38,-26,-98,58,76,38,44,-14},new int[]{32,-62,24,-58,-50,32,-84,0,-62,-12,28,72,0,42,82,32,-20,-96,-20,92,-32,86,-70,74,-76,64,48,66,94,52,48,6,-78,-88,24,74,32,38,38,92,50,24,34,46,-14,18},new int[]{-42,86,-48,-96,-72,52,-28,8,-92,-28,-56,-16,-48,-88,90,42,30,62,-50,78,-20,26,10,-14,-40,22,-34,-98,-48,-56,54,0,-54,-68,52,70,78,-20,60,-88,-26,40,-80,-6,66,-86},new int[]{18,-68,-46,24,-62,-8,14,-46,-60,-48,0,-46,50,98,-86,2,92,-94,66,-90,-74,-34,-80,14,-42,-72,-54,36,70,38,-92,64,-86,-64,6,-22,92,-60,38,94,-74,46,96,-32,-10,22},new int[]{2,44,44,-16,-96,26,-32,-66,-22,30,68,-12,-94,32,-48,16,-80,-94,2,-4,-56,-22,-22,36,16,50,-2,46,56,-68,-72,-34,-54,-76,-84,74,22,-38,26,36,30,-56,-82,54,92,-50},new int[]{-12,2,-28,98,-94,-52,18,-30,-50,36,46,-22,-54,-70,64,-30,32,-14,38,-56,-34,84,24,10,26,32,52,-16,-48,4,-24,-70,-94,-10,-76,-36,46,88,18,48,-64,-12,-8,-70,-4,-80},new int[]{90,-8,30,-44,-64,42,8,-14,-6,-70,-42,-98,-48,34,-88,-22,48,-98,0,-16,32,-36,78,84,60,80,90,58,-72,80,-96,-98,-96,58,-62,86,-6,-14,-50,-96,8,18,-84,-34,-72,-18},new int[]{-42,36,86,26,10,-20,-22,46,28,88,-34,-84,60,8,-22,38,-40,-36,18,-76,40,-22,14,86,22,24,98,88,-90,58,-58,30,70,84,-32,2,20,80,28,-44,-98,-6,-64,90,42,-92},new int[]{0,-38,82,46,-24,34,34,-82,2,-86,-30,64,16,-6,22,-88,-26,-88,-74,-20,82,94,-16,64,26,76,58,-92,28,-16,44,56,20,40,20,78,-96,-86,-54,-46,54,-76,82,-50,-54,-40},new int[]{-66,-18,2,98,6,70,32,-6,66,4,88,64,20,-24,68,2,-86,66,-46,18,70,-90,6,-44,-28,-86,16,-38,-34,2,96,80,80,34,-34,-66,68,-20,32,36,8,-40,-34,8,80,-94},new int[]{54,-28,-22,-26,96,-34,96,-92,20,-24,26,24,18,96,14,96,48,-96,38,86,88,-66,26,-22,54,72,42,0,-10,-42,-54,78,-42,-2,-30,-60,-20,-84,-14,98,24,96,-62,-28,-52,34},new int[]{-96,78,-66,-94,2,36,-62,-14,70,-22,-92,-58,-58,-2,40,80,86,-84,-98,-66,-44,-58,56,-90,88,34,76,82,-2,38,-26,92,-94,62,-56,-10,14,-50,-92,80,8,-36,-96,-10,42,-84},new int[]{50,-14,12,78,50,-54,-22,-34,-70,-58,-18,38,8,-88,-88,-86,58,-42,-28,-42,-26,26,90,14,-40,98,94,58,68,14,36,20,58,14,-22,-34,-48,-64,38,-12,-12,30,24,6,38,50},new int[]{-48,6,82,94,30,58,-30,-54,-26,-32,48,40,20,-68,-28,-50,-4,88,-58,-46,-70,48,-30,76,-58,-96,-56,36,10,56,14,-6,38,12,-52,-78,-56,-36,48,-56,-78,98,-56,-92,-50,46},new int[]{-30,-64,-90,-38,-28,74,70,-44,56,-38,64,98,62,-50,-68,82,-6,36,-16,-60,-44,-34,92,-56,12,12,88,30,-72,98,-86,-64,82,-56,58,28,24,-72,-98,-68,-54,-52,50,8,44,18},new int[]{-92,-86,-68,-18,56,26,68,-84,60,-68,20,-2,-86,-76,-92,-86,-96,50,84,-44,62,24,-20,88,-94,-66,32,50,-32,-96,18,56,48,18,-40,50,-18,-10,84,-48,8,-50,86,88,90,-70},new int[]{60,46,46,96,44,-38,-66,-56,12,-28,-36,-32,-98,50,16,-8,58,-94,20,-94,88,82,30,-32,-6,-50,6,44,-98,-16,-96,-68,54,0,68,44,58,-72,-96,-84,-70,-14,-12,-52,-78,-76},new int[]{-8,72,32,-90,-68,60,-10,-34,-38,-88,22,82,-46,-76,96,54,0,-52,94,-66,34,28,-50,-32,-80,0,98,18,96,28,72,64,-52,98,14,28,46,48,34,-34,-96,-24,-48,-86,-26,-74},new int[]{36,26,22,18,4,78,72,28,-24,-64,28,2,-4,46,82,-70,36,66,22,-32,-48,24,-20,66,80,-22,88,26,68,22,84,-44,-28,76,-10,90,-46,-40,-94,22,14,96,-66,66,-4,40},new int[]{-44,-22,52,30,70,22,22,74,56,-14,66,-34,34,-2,-96,-90,-38,32,-4,-74,16,-34,-6,14,38,-66,68,-2,-28,-66,-8,-22,80,-70,-62,-66,-18,-84,82,-8,34,-42,16,10,-64,34},new int[]{-10,92,-78,-80,18,54,8,16,-98,14,8,14,-6,-72,-30,68,-76,40,92,-94,20,90,68,28,38,-8,-94,50,56,-92,-46,-54,-12,-48,18,76,10,58,24,-32,6,94,64,66,96,90},new int[]{88,62,-84,24,76,-24,-22,26,42,-56,-56,-26,-40,88,74,32,54,-96,-24,-44,90,66,56,-68,34,18,44,-38,82,-12,-8,80,70,92,6,-50,40,-62,60,-98,54,36,-4,84,48,84},new int[]{86,-98,-60,26,-58,-26,92,-80,-56,-30,60,-10,96,92,-76,-28,88,4,-88,-82,-22,96,-18,-8,-88,16,12,-30,-66,-26,38,-76,68,-22,-78,56,-70,-42,76,92,8,-76,0,70,-70,32},new int[]{42,-88,-52,-12,-58,78,4,98,-92,96,70,96,96,86,-6,-58,-14,-92,-6,16,-28,88,28,14,-14,22,-46,-30,-6,-34,-12,-70,82,68,34,58,20,90,-58,-66,-12,-20,-76,-86,56,32},new int[]{-62,-58,-60,26,38,68,-18,26,-42,30,-52,-28,-98,-58,-2,86,-38,-58,-58,-82,-52,80,42,-4,-92,32,-90,60,70,-96,96,-36,-16,40,-24,44,-34,48,-54,80,-86,14,34,52,50,38},new int[]{68,-46,-50,64,-32,-94,14,-66,90,-54,60,20,52,36,-26,-92,38,10,84,-18,-38,-98,92,-50,-58,40,-56,-44,-46,-50,-2,52,22,-80,-20,86,8,64,48,-8,14,-86,-56,-26,-6,28},new int[]{-58,-40,-82,8,26,-46,-14,-62,-28,-28,90,76,62,-18,-34,18,-78,14,24,2,62,62,-88,-84,-54,66,96,44,-46,-18,-44,32,-12,-94,-54,-18,62,12,4,8,-66,72,12,-32,48,68}});
param0.add(new int[][]{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},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},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},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},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},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},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},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},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},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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},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},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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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}});
param0.add(new int[][]{new int[]{94,55,14,44,30,47,19,87,68,17,34,15,93,98,10,27,43,51,83,24,19,45,91,59,84,82,80,51},new int[]{4,37,73,13,56,1,10,52,62,6,71,18,21,24,48,82,41,86,45,79,74,42,49,92,73,40,57,28},new int[]{63,27,3,18,66,35,77,76,77,17,69,56,34,48,83,96,57,6,7,20,41,11,14,78,10,10,24,76},new int[]{75,75,93,9,27,21,26,88,55,93,73,46,37,14,94,15,87,91,66,76,90,95,6,14,33,22,69,34},new int[]{32,11,56,49,83,82,15,80,85,68,22,87,8,33,50,87,59,82,73,34,31,39,77,30,51,44,57,92},new int[]{66,57,78,33,72,1,88,46,15,89,96,67,28,91,99,7,69,13,18,26,36,48,20,39,66,57,25,66},new int[]{40,41,73,88,44,60,53,70,38,51,3,35,25,34,30,56,58,66,67,63,7,64,48,46,43,21,33,67},new int[]{41,71,98,92,82,99,88,68,7,52,92,75,25,95,54,39,46,30,71,69,53,51,73,65,2,63,60,95},new int[]{19,56,87,21,61,51,78,34,40,23,65,80,94,90,70,98,32,89,65,82,35,91,83,18,46,89,47,10},new int[]{69,26,55,42,59,37,59,88,16,97,11,51,67,3,84,50,39,44,92,36,36,88,44,29,73,92,93,48},new int[]{86,59,11,78,91,40,93,61,6,20,70,18,98,14,25,89,49,26,32,79,1,76,30,47,22,81,28,9},new int[]{96,52,64,21,57,31,23,75,71,69,40,67,54,18,64,52,99,77,20,52,59,16,47,26,49,83,53,86},new int[]{27,61,59,50,90,15,24,36,40,96,35,46,52,45,97,77,15,67,59,18,86,6,21,40,29,89,94,21},new int[]{97,78,48,95,78,24,11,45,29,18,41,68,88,66,20,13,75,14,90,17,40,76,91,40,62,21,19,55},new int[]{92,89,85,12,93,53,47,60,39,14,63,87,82,98,49,59,34,64,57,85,49,27,87,67,94,62,89,68},new int[]{98,25,36,88,5,79,87,67,70,88,2,33,46,81,38,43,11,10,38,32,40,94,63,52,77,32,52,39},new int[]{25,2,1,7,56,64,59,37,56,32,37,58,28,67,45,61,95,69,96,96,16,86,18,8,8,89,8,46},new int[]{41,21,95,76,6,55,40,59,96,50,38,15,82,58,76,3,80,21,63,97,17,20,8,50,22,75,46,30},new int[]{72,75,28,67,4,83,57,98,8,24,9,39,3,97,49,32,91,36,68,1,76,98,67,68,34,38,43,96},new int[]{84,29,46,41,1,42,79,84,49,95,25,18,22,61,39,90,51,11,57,28,35,68,51,77,46,72,19,54},new int[]{72,65,70,48,89,7,92,78,95,27,41,85,20,54,54,33,19,28,84,35,29,35,97,63,57,2,29,28},new int[]{26,65,73,34,38,95,83,73,23,67,42,19,79,13,13,63,1,53,52,71,40,40,45,42,13,50,30,39},new int[]{9,56,62,34,18,82,94,2,12,45,40,38,35,20,95,13,21,90,68,20,59,1,6,89,24,96,40,68},new int[]{27,44,44,50,10,72,77,69,49,66,94,32,3,48,67,77,49,71,46,76,91,5,69,46,61,90,14,74},new int[]{88,44,35,20,13,82,8,38,67,85,88,93,16,96,4,43,67,24,44,66,57,26,26,32,85,1,91,88},new int[]{74,52,93,80,26,34,69,46,61,3,45,82,17,45,90,67,36,39,9,56,76,79,34,94,53,87,80,71},new int[]{81,47,80,21,34,27,67,38,92,35,37,74,17,91,36,91,49,18,92,1,55,46,55,48,19,36,25,26},new int[]{30,49,79,30,21,84,33,48,65,43,62,63,52,43,5,88,75,27,54,95,83,42,41,18,62,99,77,68}});
List<Integer> param1 = new ArrayList<>();
param1.add(10);
param1.add(44);
param1.add(16);
param1.add(4);
param1.add(9);
param1.add(27);
param1.add(24);
param1.add(43);
param1.add(19);
param1.add(20);
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,067 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NTH_MULTIPLE_NUMBER_FIBONACCI_SERIES.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_MULTIPLE_NUMBER_FIBONACCI_SERIES{
public static int f_gold ( int k , int n ) {
long f1 = 0 , f2 = 1 , f3 ;
int i = 2 ;
while ( i != 0 ) {
f3 = f1 + f2 ;
f1 = f2 ;
f2 = f3 ;
if ( f2 % k == 0 ) {
return n * i ;
}
i ++ ;
}
return 0 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(50);
param0.add(52);
param0.add(42);
param0.add(2);
param0.add(37);
param0.add(48);
param0.add(31);
param0.add(9);
param0.add(78);
param0.add(64);
List<Integer> param1 = new ArrayList<>();
param1.add(60);
param1.add(45);
param1.add(17);
param1.add(68);
param1.add(43);
param1.add(46);
param1.add(4);
param1.add(64);
param1.add(14);
param1.add(80);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,068 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_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_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1{
static boolean f_gold ( int arr [ ] , int n ) {
if ( n == 0 || n == 1 ) return true ;
for ( int i = 1 ;
i < n ;
i ++ ) if ( arr [ i - 1 ] > arr [ 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[]{6,8,8,16,19,19,21,23,26,33,34,36,38,39,41,41,45,47,52,52,55,57,60,60,60,61,69,69,70,70,72,73,73,75,78,81,84,84,85,88,88,89,90,91,97});
param0.add(new int[]{2,-90,66,24,-18,70,34,18,84,-62});
param0.add(new int[]{1,1});
param0.add(new int[]{12,88,65,82,23,39,60,27,57,44,70,28,23,34,25,11,48,65,10,73,26,10,18,60,73,45,26,9,36,15,24,40,2,4,95,20,39,45});
param0.add(new int[]{-38,38,40,72});
param0.add(new int[]{1,0,0,0,1});
param0.add(new int[]{11,15,16,17,17,17,22,23,23,25,27,28,28,31,33,36,38,40,42,44,46,49,51,51,52,60,62,65,67,71,74,77,77,78,78,79,83,83,86,86,87,87,87,88,91,92,97,97,97});
param0.add(new int[]{-26,-90,-78,-76,-58,-64,-72,-34,-58,-48,78,-50,-30,26,-60,26});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{56,51,63,30,10,88,23,1,48,4,28,44});
List<Integer> param1 = new ArrayList<>();
param1.add(22);
param1.add(9);
param1.add(1);
param1.add(23);
param1.add(2);
param1.add(3);
param1.add(44);
param1.add(9);
param1.add(23);
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,069 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LONGEST_SUBARRAY_SUM_DIVISIBLE_K.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_SUBARRAY_SUM_DIVISIBLE_K{
static int f_gold ( int arr [ ] , int n , int k ) {
HashMap < Integer , Integer > um = new HashMap < Integer , Integer > ( ) ;
int mod_arr [ ] = new int [ n ] ;
int max = 0 ;
int curr_sum = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
curr_sum += arr [ i ] ;
mod_arr [ i ] = ( ( curr_sum % k ) + k ) % k ;
}
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( mod_arr [ i ] == 0 ) max = i + 1 ;
else if ( um . containsKey ( mod_arr [ i ] ) == false ) um . put ( mod_arr [ i ] , i ) ;
else if ( max < ( i - um . get ( mod_arr [ i ] ) ) ) max = i - um . get ( mod_arr [ i ] ) ;
}
return max ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{14,16,17,17,31,32,34,35,37,38,39,46,47,52,57,58,60,61,69,75,76,77,81,88,97});
param0.add(new int[]{-16,64,-62,-86,10,-40,52,50,-42,34,-32,-32,90,72,-96,-46,-6,92,14,98,-66,96,-48,-80,-22,-82,-50,-60,-70,82,-78,-68,88,-56,24,-52});
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[]{33,1,92,27,17,46,79,78,95,34,3,56,12,26,24,60,58,63,98,8,76,73,26,58,38,49,43,59,83,21,13,99,3,89,32,21,14,95,8,7,99,83,59,2,69,44,66});
param0.add(new int[]{-92,-76,-58,-56,-54,-20,-18,-16,-14,8,20,52,72,82,82,84});
param0.add(new int[]{1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0});
param0.add(new int[]{7,7,8,9,13,14,16,18,19,20,24,24,30,32,32,45,49,55,62,62,84,90,90,93,95,98});
param0.add(new int[]{-28,-52,-84,-98,48,74,48,-34,-38,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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{30,44,9,92,82,11,66,22,87,20});
List<Integer> param1 = new ArrayList<>();
param1.add(23);
param1.add(35);
param1.add(13);
param1.add(40);
param1.add(15);
param1.add(34);
param1.add(22);
param1.add(7);
param1.add(28);
param1.add(9);
List<Integer> param2 = new ArrayList<>();
param2.add(23);
param2.add(21);
param2.add(13);
param2.add(37);
param2.add(15);
param2.add(26);
param2.add(14);
param2.add(8);
param2.add(37);
param2.add(9);
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,070 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SUM_AREA_RECTANGLES_POSSIBLE_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 SUM_AREA_RECTANGLES_POSSIBLE_ARRAY{
static int f_gold ( int [ ] a , int n ) {
Arrays . sort ( a ) ;
int sum = 0 ;
boolean flag = false ;
int len = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ! flag ) {
flag = true ;
len = a [ i + 1 ] ;
i ++ ;
}
else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) {
sum = sum + a [ i + 1 ] * len ;
flag = false ;
i ++ ;
}
}
return sum ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{3,11,14,15,22,33,64,81,82,95});
param0.add(new int[]{-42,2,84,18,60,84,-12,64,46,60,40,52,-62,-48,60,64,76,50,88,92,42,-82,44,-98,-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,1,1,1});
param0.add(new int[]{50,6,43,82,99,1,20,7,52,18,52,18,45,75,58,48,49,70,69,19,49,35,45,14,52,33,9,31,86,70,77,70,91,56,76,69,68,31,21,72,78,83,76,1});
param0.add(new int[]{-92,-76,-70,-62,-46,-36,-36,-32,-26,-8,-2,4,8,14,14,26,34,48,58,68,74,78,84,86});
param0.add(new int[]{1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1});
param0.add(new int[]{19,20,23,25,26,26,34,43,43,46,49,56,59,59,68,73,93,93});
param0.add(new int[]{-82,-80,-68,-98,34,96,-72,22,-30,-92,74,-68,48,92,-26,-32,-8,72,84,-10,60,74,-98,78,-32,84,64,-56,94,24,72,40,-44,2,-18,34});
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,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{40,32,38,69,56,28,79,29,63,72,4,46,25,32,12,83,59,59,32,1,56,15,62,3,6,85,29,45,88,84,52,62,89,33,48,23,85,54,46,78,7,12});
List<Integer> param1 = new ArrayList<>();
param1.add(9);
param1.add(22);
param1.add(22);
param1.add(32);
param1.add(21);
param1.add(38);
param1.add(10);
param1.add(33);
param1.add(24);
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,071 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_DISTANCE_TWO_OCCURRENCES_ELEMENT_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_DISTANCE_TWO_OCCURRENCES_ELEMENT_ARRAY{
static int f_gold ( int [ ] arr , int n ) {
HashMap < Integer , Integer > map = new HashMap < > ( ) ;
int max_dist = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( ! map . containsKey ( arr [ i ] ) ) map . put ( arr [ i ] , i ) ;
else max_dist = Math . max ( max_dist , i - map . get ( arr [ i ] ) ) ;
}
return max_dist ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,20,25,28,29,31,34,35,38,39,41,43,46,55,56,60,65,66,74,77,79,80,81,83,84,88,88,88,90,91,99});
param0.add(new int[]{26,14,56,84,-56,-84,-98,12,-78,18,-42,58,46,-66,-46,66,98,34,-16,8,-20,66,74,26,42,-84,38,86,14,86,26,-42,-30,6,-54,-76,-66,18,58,66,74,-62,8,-42,62,-14,-90,98,-24});
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[]{69,87});
param0.add(new int[]{-98,-88,-86,-62,-52,-26,-24,-20,-12,6,8,26,36,40,42,54,68,72,84,92,94,98,98});
param0.add(new int[]{1,1,1,1,0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0});
param0.add(new int[]{11,16,17,19,20,21,21,22,27,37,45,49,64,77,81,85,96});
param0.add(new int[]{-20,0,18,-96});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{54,5,98,71,9,34,60,28,58,66,28,45,4});
List<Integer> param1 = new ArrayList<>();
param1.add(27);
param1.add(34);
param1.add(11);
param1.add(1);
param1.add(12);
param1.add(29);
param1.add(9);
param1.add(2);
param1.add(22);
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,072 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/NTH_PENTAGONAL_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 NTH_PENTAGONAL_NUMBER{
static int f_gold ( int n ) {
return ( 3 * n * n - n ) / 2 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(96);
param0.add(93);
param0.add(15);
param0.add(8);
param0.add(21);
param0.add(14);
param0.add(11);
param0.add(79);
param0.add(24);
param0.add(94);
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,073 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_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 SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N{
static int f_gold ( int n ) {
int count = 0 ;
if ( n > 0 && ( n & ( n - 1 ) ) == 0 ) return n ;
while ( n != 0 ) {
n >>= 1 ;
count += 1 ;
}
return 1 << count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(13);
param0.add(27);
param0.add(1);
param0.add(24);
param0.add(98);
param0.add(94);
param0.add(36);
param0.add(41);
param0.add(74);
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,074 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/K_TH_ELEMENT_TWO_SORTED_ARRAYS.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class K_TH_ELEMENT_TWO_SORTED_ARRAYS{
static int f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n , int k ) {
int [ ] sorted1 = new int [ m + n ] ;
int i = 0 , j = 0 , d = 0 ;
while ( i < m && j < n ) {
if ( arr1 [ i ] < arr2 [ j ] ) sorted1 [ d ++ ] = arr1 [ i ++ ] ;
else sorted1 [ d ++ ] = arr2 [ j ++ ] ;
}
while ( i < m ) sorted1 [ d ++ ] = arr1 [ i ++ ] ;
while ( j < n ) sorted1 [ d ++ ] = arr2 [ j ++ ] ;
return sorted1 [ k - 1 ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,2,4,4,9,10,14,16,16,19,20,21,25,26,29,36,36,37,38,44,44,49,53,54,56,61,62,64,72,72,73,77,80,84,84,87,93,94});
param0.add(new int[]{2,4,-90,62,22,-94,-74,-22,44,-94,20,-40,20,0,32,24,78,8,4,98,-74,-60});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{85,44,62,2,71,88,60,78,32,46,17,47,65,78,65,94});
param0.add(new int[]{-94,-84,-82,-70,-70,-60,-54,-54,-52,-52,-46,-40,-40,-36,-34,-32,-30,-22,-18,-16,-10,-4,8,12,18,22,32,38,38,44,50,56,64,82,84,86,88});
param0.add(new int[]{0,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,1,1});
param0.add(new int[]{53,96,99});
param0.add(new int[]{98,86,36,-68,86,22,52,-20,-2,74,-72,86,80,-78,14,62,10,94,-66,78,28,92,-8,46,-24,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,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[]{6,21,86,58,48,27,18,73,16,79,51,33,63,26,37,88,48,58,44,32,58,23,31});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{6,8,10,10,12,14,24,31,33,33,35,35,35,41,46,47,49,51,52,56,57,59,62,65,72,72,73,73,79,80,82,83,83,84,87,87,93,99});
param1.add(new int[]{58,74,-46,38,-58,-78,-32,-84,84,-54,84,-34,-26,88,74,48,26,-92,68,-86,74,88});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{18,3,15,9,61,73,3,62,87,1,54,97,61,37,23,65});
param1.add(new int[]{-92,-68,-64,-62,-54,-52,-52,-34,-24,-22,-20,-12,-12,-10,6,10,14,22,22,24,24,30,30,36,36,48,50,56,58,64,68,80,84,88,88,92,94});
param1.add(new int[]{1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,1,0,1,0,1,1,0,0,0,1,0});
param1.add(new int[]{30,55,56});
param1.add(new int[]{72,-72,-90,24,-22,60,78,-68,98,26,-30,-20,44,-96,8,90,0,98,-24,-68,-32,-62,0,-60,26,-98});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{87,77,44,15,70,89,36,79,82,3,18,76,37,79,85,97,19,53,17,74,87,58,49});
List<Integer> param2 = new ArrayList<>();
param2.add(27);
param2.add(18);
param2.add(30);
param2.add(11);
param2.add(19);
param2.add(24);
param2.add(1);
param2.add(22);
param2.add(42);
param2.add(14);
List<Integer> param3 = new ArrayList<>();
param3.add(21);
param3.add(11);
param3.add(31);
param3.add(11);
param3.add(26);
param3.add(17);
param3.add(1);
param3.add(19);
param3.add(40);
param3.add(22);
List<Integer> param4 = new ArrayList<>();
param4.add(23);
param4.add(12);
param4.add(42);
param4.add(13);
param4.add(28);
param4.add(23);
param4.add(1);
param4.add(24);
param4.add(42);
param4.add(19);
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,075 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_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 FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7{
static int f_gold ( String n ) {
int k = 0 , pos = 0 , i = 0 ;
while ( k != n . length ( ) ) {
switch ( n . charAt ( i ) ) {
case '4' : pos = pos * 2 + 1 ;
break ;
case '7' : pos = pos * 2 + 2 ;
break ;
}
i ++ ;
k ++ ;
}
return pos ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("7");
param0.add("305745689");
param0.add("444");
param0.add("4");
param0.add("2074");
param0.add("27");
param0.add("447");
param0.add("255");
param0.add("10000111111011");
param0.add("fAKcSDRTNz");
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,076 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_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 FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT{
static int f_gold ( int n ) {
if ( n == 0 ) return 0 ;
while ( n != 1 ) {
if ( n % 4 != 0 ) return 0 ;
n = n / 4 ;
}
return 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(45);
param0.add(16);
param0.add(15);
param0.add(91);
param0.add(82);
param0.add(18);
param0.add(31);
param0.add(6);
param0.add(93);
param0.add(35);
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,077 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/QUICK_WAY_CHECK_CHARACTERS_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 QUICK_WAY_CHECK_CHARACTERS_STRING{
static boolean f_gold ( String s ) {
int n = s . length ( ) ;
for ( int i = 1 ;
i < n ;
i ++ ) if ( s . charAt ( i ) != s . charAt ( 0 ) ) return false ;
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("");
param0.add("ggg");
param0.add("11");
param0.add("KoYIHns");
param0.add("232");
param0.add("10111000011101");
param0.add("DDDD");
param0.add("11");
param0.add("11111");
param0.add("ewJvixQzu");
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,078 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_ROTATION_COUNT_ROTATED_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_ROTATION_COUNT_ROTATED_SORTED_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
int min = arr [ 0 ] , min_index = - 1 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( min > arr [ i ] ) {
min = arr [ i ] ;
min_index = i ;
}
}
return min_index ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,4,4,9,10,13,14,15,28,28,41,46,47,48,52,55,62,67,69,73,74,79,79,80,87,90,96,99});
param0.add(new int[]{44,62,-40,62,98,30,16,76,-4,-2,78,-96,78,-72,94,-66,-38,-80,40,78,-26,28,-40,-32,-64,76,26,-2,12,82,16,-46,10,70,-62,-54,-6,58,32,98});
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[]{90,26,71,74,69,47,76,96,42,31,22,17,84,20,8,98,49,87,38,53,28,77,29});
param0.add(new int[]{-64,-56,-10,-10,-6,-2,0,22,78,86,98});
param0.add(new int[]{0,1,1,1,1,0,1});
param0.add(new int[]{2,3,3,5,8,10,11,16,17,26,35,36,38,42,59,73,73,75,75,81,82,82,86,87,88,88,90,95,96,98,98,99});
param0.add(new int[]{-96,70,-32,-46,-26,42,-56,36,-72,96,-54,-12,78,30,58,92,56,22,70,10,42,70,0,-76,58,-70,-66,-32,-30,-22,56,10,18,-90,-40,-92,-70,-30,48,10,32,20,-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,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[]{35,52,21,28,96,44,80,56,10,23,48,52,15,55,43,50,6,33,62,55,39,12,31,74,53,34,41,10,52,75,57,78,3});
List<Integer> param1 = new ArrayList<>();
param1.add(27);
param1.add(38);
param1.add(11);
param1.add(18);
param1.add(9);
param1.add(5);
param1.add(29);
param1.add(42);
param1.add(28);
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,079 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SWAP_ALL_ODD_AND_EVEN_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 SWAP_ALL_ODD_AND_EVEN_BITS{
static int f_gold ( int x ) {
int even_bits = x & 0xAAAAAAAA ;
int odd_bits = x & 0x55555555 ;
even_bits >>= 1 ;
odd_bits <<= 1 ;
return ( even_bits | odd_bits ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(99);
param0.add(94);
param0.add(11);
param0.add(3);
param0.add(77);
param0.add(57);
param0.add(54);
param0.add(66);
param0.add(98);
param0.add(36);
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,080 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE.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 QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE{
static int f_gold ( int arr [ ] , int n , int x , int y ) {
int count = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] >= x && arr [ i ] <= y ) count ++ ;
}
return count ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{9,16,19,24,36,38,42,49,51,53,53,57,57,58,71,78,78,92,92,93});
param0.add(new int[]{28,-74,-18,10,26,28,-96,-80,82,94,22,50,72,-90,76,50,20,-44,-80});
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,1,1,1,1});
param0.add(new int[]{25,8,66,90,50,65,76,90,27});
param0.add(new int[]{-98,-96,-90,-82,-80,-78,-70,-66,-60,-60,-50,-48,-34,-26,-24,-16,-14,-8,-6,4,22,24,26,30,30,48,52,56,60,62,74,76,78,86});
param0.add(new int[]{1,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,0});
param0.add(new int[]{4,6,17,19,24,29,30,31,32,37,37,40,43,44,44,45,57,64,69,70,73,78,86,89,91,92,94});
param0.add(new int[]{32,-88,70,-6,28,-48});
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[]{37,84,97,74,12,26,47,10,14,33});
List<Integer> param1 = new ArrayList<>();
param1.add(13);
param1.add(18);
param1.add(30);
param1.add(4);
param1.add(32);
param1.add(15);
param1.add(17);
param1.add(4);
param1.add(13);
param1.add(5);
List<Integer> param2 = new ArrayList<>();
param2.add(12);
param2.add(13);
param2.add(21);
param2.add(8);
param2.add(24);
param2.add(16);
param2.add(21);
param2.add(3);
param2.add(12);
param2.add(9);
List<Integer> param3 = new ArrayList<>();
param3.add(13);
param3.add(13);
param3.add(31);
param3.add(5);
param3.add(24);
param3.add(12);
param3.add(15);
param3.add(4);
param3.add(11);
param3.add(8);
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,081 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND.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 CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND{
static int f_gold ( double h , double m ) {
if ( h < 0 || m < 0 || h > 12 || m > 60 ) System . out . println ( "Wrong input" ) ;
if ( h == 12 ) h = 0 ;
if ( m == 60 ) m = 0 ;
int hour_angle = ( int ) ( 0.5 * ( h * 60 + m ) ) ;
int minute_angle = ( int ) ( 6 * m ) ;
int angle = Math . abs ( hour_angle - minute_angle ) ;
angle = Math . min ( 360 - angle , angle ) ;
return angle ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Double> param0 = new ArrayList<>();
param0.add(7322.337365895532);
param0.add(-0.5025472034247969);
param0.add(8735.336068205026);
param0.add(-5478.862697905712);
param0.add(8264.126919165505);
param0.add(-9671.311773842834);
param0.add(9995.328351000411);
param0.add(-5274.574323066984);
param0.add(1310.8711644223736);
param0.add(-2829.678131972794);
List<Double> param1 = new ArrayList<>();
param1.add(6996.326968156217);
param1.add(-2910.070017192333);
param1.add(1910.3752934680874);
param1.add(-9470.18148108585);
param1.add(7058.937313484608);
param1.add(-3867.070379361206);
param1.add(2145.339179488316);
param1.add(-3583.7503371694124);
param1.add(5214.059687285893);
param1.add(-9371.556600288217);
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,082 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/TRIANGULAR_MATCHSTICK_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 TRIANGULAR_MATCHSTICK_NUMBER{
public static int f_gold ( int x ) {
return ( 3 * x * ( x + 1 ) ) / 2 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(6);
param0.add(25);
param0.add(15);
param0.add(30);
param0.add(17);
param0.add(80);
param0.add(27);
param0.add(13);
param0.add(12);
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,083 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1{
static boolean f_gold ( int arr [ ] , int n ) {
if ( n == 1 ) {
return true ;
}
int i ;
for ( i = 1 ;
arr [ i - 1 ] < arr [ i ] && i < n ;
i ++ ) ;
if ( i == n ) {
return true ;
}
int j = i ++ ;
while ( arr [ j ] < arr [ j - 1 ] ) {
if ( i > 1 && arr [ j ] < arr [ i - 2 ] ) {
return false ;
}
j ++ ;
}
if ( j == n ) {
return true ;
}
int k = j ;
if ( arr [ k ] < arr [ i - 1 ] ) {
return false ;
}
while ( k > 1 && k < n ) {
if ( arr [ k ] < arr [ k - 1 ] ) {
return false ;
}
k ++ ;
}
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,2,5,4,3});
param0.add(new int[]{1,2,4,5,3});
param0.add(new int[]{1,1,0,0});
param0.add(new int[]{5,99,40,33,61,4,64,92,28,27,21,35,40,79,10,20,76,87,80,15,57,39,96,98,99,72,72,50,61,39,35,70,27});
param0.add(new int[]{-98,-92,-86,-58,-22,-12,0,26});
param0.add(new int[]{0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,0,1,0,1,0,1,1,1,0,1,1,0});
param0.add(new int[]{6,10,27,30,40,47,49,55,59,60,68,82,91});
param0.add(new int[]{36,56,-56,94,52,-82,88,-62,70,-94,38,10,-78,66,-94,-72,18,96,-72,88,-6,48,6,-88,64,-96,-40,8,36,36,-90,-68,-20,-76,22,-92});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{2,5,42,28,47,26,88,16,30,30,36,49,21,95,99,21,41,52,57,39,69,2,42,22,55,92,64,27,95,71,19,38,40,65,7,21,29,38,13,11,41,54,38,40,35,51,88});
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(5);
param1.add(4);
param1.add(32);
param1.add(6);
param1.add(24);
param1.add(8);
param1.add(30);
param1.add(31);
param1.add(46);
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,084 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/C_PROGRAM_FIND_LARGEST_ELEMENT_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 C_PROGRAM_FIND_LARGEST_ELEMENT_ARRAY_1{
static int f_gold ( int [ ] arr , int n ) {
Arrays . sort ( arr ) ;
return arr [ n - 1 ] ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{10,12,14,16,17,17,20,24,26,28,37,38,41,45,49,50,59,61,63,65,65,66,69,70,70,73,73,74,81,81,83,87,94,97});
param0.add(new int[]{-56,38,-22,84,-60,2,68,-78,62,-98,24,26,48,62,-80,-14,-84,12,-54,-12,-20,-82,10,-34,-50,-72,78,16,30,-76,72,34,6,52,44,18,-38,48,-14});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{92,5,40,65,86,51,14,29,66,6,62,92,29,13,88,54,15,60,45,2,51,9,33,51,31,11,62,61,77,38,11,4,27,54,72,64,85,46,24,44,39,73,82,85});
param0.add(new int[]{-92,-90,-84,-80,-80,-76,-70,-70,-48,-44,-38,-28,-14,-14,-12,-2,2,4,6,10,16,16,20,22,24,26,50,52,56,56,58,58,74,80,82,84,86});
param0.add(new int[]{0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,1,0});
param0.add(new int[]{5,19,20,26,31,32,34,37,39,40,46,46,50,53,58,58,59,65,72,72,75,76,77,78,81,83,83,95,98,99});
param0.add(new int[]{32,-84,-84,86,-24,36,-12,82,48,-12,82,-76,84,-20,-12,-18,46,-74,-14,-86});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{95,73,74,14,73,74,19,93,34,53,85,75,80,15,36,57,15,98,51,37,8,9,62,71,28,24,37,53,84,76,22,48,15,19,43,88,58,38,63,68,27,22,37,76,59,66,22});
List<Integer> param1 = new ArrayList<>();
param1.add(17);
param1.add(25);
param1.add(11);
param1.add(40);
param1.add(33);
param1.add(29);
param1.add(28);
param1.add(14);
param1.add(33);
param1.add(34);
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,085 |
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.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{
static int f_gold ( int num , int divisor ) {
return ( num - divisor * ( num / divisor ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(80);
param0.add(63);
param0.add(1);
param0.add(22);
param0.add(66);
param0.add(61);
param0.add(45);
param0.add(29);
param0.add(95);
param0.add(9);
List<Integer> param1 = new ArrayList<>();
param1.add(54);
param1.add(21);
param1.add(56);
param1.add(39);
param1.add(7);
param1.add(67);
param1.add(63);
param1.add(44);
param1.add(65);
param1.add(68);
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,086 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/LONGEST_INCREASING_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_INCREASING_SUBSEQUENCE_1{
static int f_gold ( int arr [ ] , int n ) {
int f_gold [ ] = new int [ n ] ;
int i , j , max = 0 ;
for ( i = 0 ;
i < n ;
i ++ ) f_gold [ i ] = 1 ;
for ( i = 1 ;
i < n ;
i ++ ) for ( j = 0 ;
j < i ;
j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1 ;
for ( i = 0 ;
i < n ;
i ++ ) if ( max < f_gold [ i ] ) max = f_gold [ i ] ;
return max ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{14,17,27,28,36,38,40,49,51,57,58,61,62,71,91,94,99});
param0.add(new int[]{-48,54,98,68,24,-46,4,-28,-34,40});
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});
param0.add(new int[]{94,74,27,59,3,71,67,91,91,87,1,79,42,33,85,37,76,86,80,84,62,8,31,54,17,48,4,12,88,63,12,51,36,20,73,48,41,88,21,98,57,3,54});
param0.add(new int[]{-96,-94,-90,-88,-86,-82,-76,-74,-68,-54,-54,-50,-50,-46,-46,-40,-36,-34,-34,-32,-30,-26,-26,-20,-16,-6,-4,2,10,14,22,26,26,28,28,30,30,36,54,64,68,74,78,80,84,90,92,94});
param0.add(new int[]{0,0,0,0,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,1,0,0,1,0,0});
param0.add(new int[]{6,12,18,34,37,37,37,40,45,60,64,66,73,78,79,80,92});
param0.add(new int[]{64,-18,-22,96,-92,6,-46,-54,76,0,46,74,-8,22,-46,-44,-94,-88,-52,-54,2,98,-22,46,26,2,-64,-84,20,22,12,-32,-16,-96,46,-4,-8,46,-64,-58,58,92,0,-26,-58,82});
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,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[]{57,34,3,67,21,69,31,49,7,70,27,53,94,23,74,24,44,53,78,46,6,29,5,41,38,22,40,38,40,59,9});
List<Integer> param1 = new ArrayList<>();
param1.add(14);
param1.add(8);
param1.add(17);
param1.add(24);
param1.add(36);
param1.add(34);
param1.add(11);
param1.add(24);
param1.add(33);
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,087 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CONSTRUCT_LEXICOGRAPHICALLY_SMALLEST_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 CONSTRUCT_LEXICOGRAPHICALLY_SMALLEST_PALINDROME{
static String f_gold ( char [ ] str , int len ) {
int i = 0 , j = len - 1 ;
for ( ;
i < j ;
i ++ , j -- ) {
if ( str [ i ] == str [ j ] && str [ i ] != '*' ) continue ;
else if ( str [ i ] == str [ j ] && str [ i ] == '*' ) {
str [ i ] = 'a' ;
str [ j ] = 'a' ;
continue ;
}
else if ( str [ i ] == '*' ) {
str [ i ] = str [ j ] ;
continue ;
}
else if ( str [ j ] == '*' ) {
str [ j ] = str [ i ] ;
continue ;
}
System . out . println ( "Not Possible" ) ;
return "" ;
}
return String . valueOf ( str ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<char [ ]> param0 = new ArrayList<>();
param0.add(new char[]{'A','B','C','G','I','L','L','O','O','P','Q','S','W','Y','c','d','e','f','f','i','m','m','o','q','v','w','x','x','y','z'});
param0.add(new char[]{'3','2','3','6','8','9','0','5','0','5','8','7','9','0','3','6','9','6','2','4','2','3','1','2','7','9','1','8','8','7','1','1','6','1'});
param0.add(new char[]{'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 char[]{'z','v','B','Y','n','K','h','C','T','L','g'});
param0.add(new char[]{'1','2','5','6','7'});
param0.add(new char[]{'0','0','1','0'});
param0.add(new char[]{'D','n','r'});
param0.add(new char[]{'0','9','9','1','2','1','5','3','7','5','9','2','4','4','8','9','6','4','2','8','8','5','5','7','1','7','6','2','2','2','3','3','7','9'});
param0.add(new char[]{'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 char[]{'E','s','I','S','h','H','i','m','v','B'});
List<Integer> param1 = new ArrayList<>();
param1.add(27);
param1.add(30);
param1.add(27);
param1.add(7);
param1.add(4);
param1.add(3);
param1.add(1);
param1.add(24);
param1.add(21);
param1.add(6);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,088 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE.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;
class REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE{
public static void f_gold ( int arr [ ] , int n ) {
int max_idx = n - 1 , min_idx = 0 ;
int max_elem = arr [ n - 1 ] + 1 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( i % 2 == 0 ) {
arr [ i ] += ( arr [ max_idx ] % max_elem ) * max_elem ;
max_idx -- ;
}
else {
arr [ i ] += ( arr [ min_idx ] % max_elem ) * max_elem ;
min_idx ++ ;
}
}
for ( int i = 0 ;
i < n ;
i ++ ) arr [ i ] = arr [ i ] / max_elem ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,1,2,3,9,10,14,22,26,28,29,29,30,32,32,32,34,37,39,40,42,42,42,43,45,47,49,52,53,54,56,58,59,68,71,73,76,81,81,83,84,91,94});
param0.add(new int[]{50,46,6,-57,67,34,-52,26,-93,97,-84,29,15,-63,65,25,-19,92,-38,-28,89,25,61,-34,-70,-80,88,-18,7,52,32,-63,32,-23,-11,46,-12,94,76,-67,-42});
param0.add(new int[]{0,0,0,0,0,0,1,1,1});
param0.add(new int[]{15,99,57,69,22,64,41,87,71,56,23,25,91,6,34,63,9,60,49,97,51,60,70,37,31,98,41,62,93,58,14,36,36,79,8,26,36,48,85,28,68,62,80,86,76,80,51});
param0.add(new int[]{-99,-99,-90,-90,-85,-85,-79,-77,-72,-71,-67,-66,-61,-39,-39,-35,-35,-23,-20,-18,-16,-13,-2,1,5,6,10,24,27,32,33,38,48,67,70,76,82,88});
param0.add(new int[]{0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0});
param0.add(new int[]{2,22,32,34,43,66,70,74,94,94});
param0.add(new int[]{-99,-28,76,-50,41,-85,-47,72,-92,-26,-54,-31,14,47,66,23});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{19,31,26,42,41,23,47,13,89,66,66,16,73,28,77,35,41,77,31,85,32,54,98,72,59});
List<Integer> param1 = new ArrayList<>();
param1.add(29);
param1.add(38);
param1.add(4);
param1.add(30);
param1.add(34);
param1.add(33);
param1.add(6);
param1.add(10);
param1.add(42);
param1.add(20);
List<int [ ]> filled_function_param0 = new ArrayList<>();
filled_function_param0.add(new int[]{1,1,2,3,9,10,14,22,26,28,29,29,30,32,32,32,34,37,39,40,42,42,42,43,45,47,49,52,53,54,56,58,59,68,71,73,76,81,81,83,84,91,94});
filled_function_param0.add(new int[]{50,46,6,-57,67,34,-52,26,-93,97,-84,29,15,-63,65,25,-19,92,-38,-28,89,25,61,-34,-70,-80,88,-18,7,52,32,-63,32,-23,-11,46,-12,94,76,-67,-42});
filled_function_param0.add(new int[]{0,0,0,0,0,0,1,1,1});
filled_function_param0.add(new int[]{15,99,57,69,22,64,41,87,71,56,23,25,91,6,34,63,9,60,49,97,51,60,70,37,31,98,41,62,93,58,14,36,36,79,8,26,36,48,85,28,68,62,80,86,76,80,51});
filled_function_param0.add(new int[]{-99,-99,-90,-90,-85,-85,-79,-77,-72,-71,-67,-66,-61,-39,-39,-35,-35,-23,-20,-18,-16,-13,-2,1,5,6,10,24,27,32,33,38,48,67,70,76,82,88});
filled_function_param0.add(new int[]{0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0});
filled_function_param0.add(new int[]{2,22,32,34,43,66,70,74,94,94});
filled_function_param0.add(new int[]{-99,-28,76,-50,41,-85,-47,72,-92,-26,-54,-31,14,47,66,23});
filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
filled_function_param0.add(new int[]{19,31,26,42,41,23,47,13,89,66,66,16,73,28,77,35,41,77,31,85,32,54,98,72,59});
List<Integer> filled_function_param1 = new ArrayList<>();
filled_function_param1.add(29);
filled_function_param1.add(38);
filled_function_param1.add(4);
filled_function_param1.add(30);
filled_function_param1.add(34);
filled_function_param1.add(33);
filled_function_param1.add(6);
filled_function_param1.add(10);
filled_function_param1.add(42);
filled_function_param1.add(20);
for(int i = 0; i < param0.size(); ++i)
{
f_filled(filled_function_param0.get(i),filled_function_param1.get(i));
f_gold(param0.get(i),param1.get(i));
if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,089 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/HORNERS_METHOD_POLYNOMIAL_EVALUATION.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 HORNERS_METHOD_POLYNOMIAL_EVALUATION{
static int f_gold ( int poly [ ] , int n , int x ) {
int result = poly [ 0 ] ;
for ( int i = 1 ;
i < n ;
i ++ ) result = result * x + poly [ i ] ;
return result ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{3,18,22,27,31,33,36,36,37,37,40,48,49,49,50,58,66,71,75,85,89,91});
param0.add(new int[]{42,-88,28,8,30,-8,-16,86,50,84,12,-20,-70,-40,-54,-76,84,90,-40,-68,-40,36,-34,14,94,-44,70,58,-48,-72,14,-70,32});
param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1});
param0.add(new int[]{66,72,27,72,71,75,94,49,47,21,21,71,84,61,14,20,5,31,62,12,56,56,12,66,26,68,30,98,20});
param0.add(new int[]{-96,-96,-94,-82,-72,-54,-54,-46,-34,-30,-28,-18,-2,2,6,8,10,16,18,24,26,28,44,48,48,52,56,58,58,70,70,82,84,88,94});
param0.add(new int[]{0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,0,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,1});
param0.add(new int[]{2,3,8,13,15,17,18,18,25,29,29,31,36,37,42,42,42,51,52,52,54,54,58,64,70,70,74,75,78,80,83,85,86,88,95,96,97,98,99});
param0.add(new int[]{-56,-12,-92,-48,-98,-80,-96,-42,-50,74,88,20,78,-74,-20,-32,-30,58,-22,-16,68,72,-50,-72,66,72,74,-98,-22,-40,-90,88,42,24});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{86,62,30,27,98,75,93,37,70,16,20,74,46,74,25,59,86,32,17,90,80,10,17});
List<Integer> param1 = new ArrayList<>();
param1.add(16);
param1.add(31);
param1.add(10);
param1.add(15);
param1.add(25);
param1.add(20);
param1.add(19);
param1.add(29);
param1.add(20);
param1.add(12);
List<Integer> param2 = new ArrayList<>();
param2.add(16);
param2.add(20);
param2.add(8);
param2.add(26);
param2.add(34);
param2.add(25);
param2.add(32);
param2.add(23);
param2.add(23);
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,090 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS.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 PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS{
static boolean f_gold ( int arr [ ] , int n , int x ) {
for ( int i = 0 ;
i < n - 1 ;
i ++ ) for ( int j = i + 1 ;
j < n ;
j ++ ) if ( arr [ i ] * arr [ j ] == x ) return true ;
return false ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{10, 20, 9, 40});
param0.add(new int[]{1,-10, 20, 9, -40});
param0.add(new int[]{0,0,0,0,0,1,1,1,1});
param0.add(new int[]{4,10, 20, 9, -40});
param0.add(new int[]{-90,-86,-76,-72,-70,-62,-56,-50,-18,-12,-10,4,16,26,42,48,52,54,54,70,84,86,88,98});
param0.add(new int[]{1});
param0.add(new int[]{4,7,14,14,16,18,19,20,22,24,29,38,38,38,40,40,46,46,47,51,51,52,55,56,56,62,62,62,78,79,81,84,86,88,89,89,89});
param0.add(new int[]{72,80,-82,24,-98,90,-32,-56,-22,8,-12,8,-78,60,-62,50,12,-60,10,-54,74,98,26,56,24});
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});
param0.add(new int[]{93,40,48,99,95,59,43,58,79,70,28});
List<Integer> param1 = new ArrayList<>();
param1.add(4);
param1.add(5);
param1.add(7);
param1.add(5);
param1.add(23);
param1.add(0);
param1.add(23);
param1.add(21);
param1.add(22);
param1.add(9);
List<Integer> param2 = new ArrayList<>();
param2.add(400);
param2.add(400);
param2.add(8);
param2.add(-400);
param2.add(23);
param2.add(0);
param2.add(32);
param2.add(19);
param2.add(18);
param2.add(5);
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,091 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_LAST_DIGIT_FACTORIAL_DIVIDES_FACTORIAL_B.java | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_LAST_DIGIT_FACTORIAL_DIVIDES_FACTORIAL_B{
static int f_gold ( long A , long B ) {
int variable = 1 ;
if ( A == B ) return 1 ;
else if ( ( B - A ) >= 5 ) return 0 ;
else {
for ( long i = A + 1 ;
i <= B ;
i ++ ) variable = ( int ) ( variable * ( i % 10 ) ) % 10 ;
return variable % 10 ;
}
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Long> param0 = new ArrayList<>();
param0.add(79L);
param0.add(61L);
param0.add(39L);
param0.add(39L);
param0.add(61L);
param0.add(86L);
param0.add(7L);
param0.add(86L);
param0.add(86L);
param0.add(11L);
List<Long> param1 = new ArrayList<>();
param1.add(84L);
param1.add(29L);
param1.add(77L);
param1.add(65L);
param1.add(78L);
param1.add(73L);
param1.add(92L);
param1.add(50L);
param1.add(63L);
param1.add(2L);
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,092 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/SQUARE_PYRAMIDAL_NUMBER_SUM_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 SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES{
static int f_gold ( int s ) {
int sum = 0 ;
for ( int n = 1 ;
sum < s ;
n ++ ) {
sum += n * n ;
if ( sum == s ) return n ;
}
return - 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(5);
param0.add(14);
param0.add(140);
param0.add(204);
param0.add(3);
param0.add(506);
param0.add(42);
param0.add(4);
param0.add(87);
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,093 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/FIND_MINIMUM_DIFFERENCE_PAIR.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_DIFFERENCE_PAIR{
static int f_gold ( int [ ] arr , int n ) {
int diff = Integer . MAX_VALUE ;
for ( int i = 0 ;
i < n - 1 ;
i ++ ) for ( int j = i + 1 ;
j < n ;
j ++ ) if ( Math . abs ( ( arr [ i ] - arr [ j ] ) ) < diff ) diff = Math . abs ( ( arr [ i ] - arr [ j ] ) ) ;
return diff ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,1,2,3,5,8,10,11,15,15,16,20,26,28,30,30,33,33,39,50,50,50,54,62,66,68,69,69,74,74,75,75,76,78,82,83,85,86,86,89,89,91,91,92,92,92,93,94,98});
param0.add(new int[]{6,6,-20,88,-78,-18,74,72,80,76,-62,38});
param0.add(new int[]{0,1,1,1,1});
param0.add(new int[]{75,85,49,66,44,89,80,39,64,70,25,21,81,33,90,68,51});
param0.add(new int[]{-96,-10,0,4,54,64});
param0.add(new int[]{1,0,1,0,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,0,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,0});
param0.add(new int[]{3,3,5,5,7,7,9,11,11,18,18,18,20,29,29,31,31,32,37,43,44,46,48,50,52,52,53,63,63,65,69,72,76,76,81,84,85,86,87,87,90,94,97,97});
param0.add(new int[]{40,-46,72,-28,8,90,86,-90,8,-66,-98,6,42,86,88,42,-50,74,-34,-16,-94,-56,-18,-18,84,-44,34,80,96,42,-50,-92,70,80,62,-38,-4,68,54,-14,30,-18,-58});
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});
param0.add(new int[]{15,41,32,19,68,36,61,59,5,91,53,95,10,64,15,32,14,64,48,70,85,19,83,2,33,58,93,88,21,88,45,45,18,8});
List<Integer> param1 = new ArrayList<>();
param1.add(32);
param1.add(11);
param1.add(3);
param1.add(16);
param1.add(3);
param1.add(41);
param1.add(27);
param1.add(33);
param1.add(26);
param1.add(24);
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,094 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/POSITION_OF_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 POSITION_OF_RIGHTMOST_SET_BIT{
public static int f_gold ( int n ) {
return ( int ) ( ( Math . log10 ( n & - n ) ) / Math . log10 ( 2 ) ) + 1 ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(45);
param0.add(26);
param0.add(74);
param0.add(80);
param0.add(46);
param0.add(67);
param0.add(16);
param0.add(87);
param0.add(27);
param0.add(17);
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,095 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/STACK_PERMUTATIONS_CHECK_IF_AN_ARRAY_IS_STACK_PERMUTATION_OF_OTHER.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 STACK_PERMUTATIONS_CHECK_IF_AN_ARRAY_IS_STACK_PERMUTATION_OF_OTHER{
static boolean f_gold ( int ip [ ] , int op [ ] , int n ) {
Queue < Integer > input = new LinkedList < > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
input . add ( ip [ i ] ) ;
}
Queue < Integer > output = new LinkedList < > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
output . add ( op [ i ] ) ;
}
Stack < Integer > tempStack = new Stack < > ( ) ;
while ( ! input . isEmpty ( ) ) {
int ele = input . poll ( ) ;
if ( ele == output . peek ( ) ) {
output . poll ( ) ;
while ( ! tempStack . isEmpty ( ) ) {
if ( tempStack . peek ( ) == output . peek ( ) ) {
tempStack . pop ( ) ;
output . poll ( ) ;
}
else break ;
}
}
else {
tempStack . push ( ele ) ;
}
}
return ( input . isEmpty ( ) && tempStack . isEmpty ( ) ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,3,3,3,4,5,6,9,18,20,35,39,39,45,50,55,57,61,63,65,72,73,77,77,78,87,88,91,93,95,98});
param0.add(new int[]{-86,10,-8,8,-24,-2,-84,-86,-54,50,56,-22,-8,-62,0,-50,-32});
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});
param0.add(new int[]{3,42,88,89,41,71,67,5,84,20,75,36,34,20,31,16,86,89,53,47,57,27,47,93,59,66,40,18,69,36,98,99,81});
param0.add(new int[]{-98,-94,-94,-90,-88,-82,-80,-78,-78,-68,-58,-58,-52,-36,-30,-14,-12,-6,-2,-2,2,4,10,14,22,24,26,38,38,46,46,48,50,54,58,60,64,64,66,70,74,74,86,88,96,96});
param0.add(new int[]{1,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1});
param0.add(new int[]{19,37,44,65,72,87});
param0.add(new int[]{88});
param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1});
param0.add(new int[]{5,8,53,60,85,94,77,53,81,54,67,48,56,49,16,1,85,6,55,98,62,36,4,7,64});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{2,5,7,13,16,23,24,25,27,31,31,33,34,35,38,46,49,49,51,52,58,61,62,66,68,71,73,78,91,94,98});
param1.add(new int[]{-8,-46,22,-66,-94,-96,70,58,-4,-70,-96,34,-80,-26,-52,52,-76});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{16,61,39,99,71,73,35,47,62,80,1,49,54,35,39,55,7,6,85,84,11,51,38,4,72,10,33,65,64,32,16,99,9});
param1.add(new int[]{-92,-92,-80,-72,-72,-72,-70,-68,-64,-56,-40,-38,-34,-24,-10,-8,-8,-2,0,2,4,6,14,14,18,20,34,36,36,38,38,42,48,56,64,70,72,76,76,76,76,78,84,90,94,96});
param1.add(new int[]{0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0});
param1.add(new int[]{17,31,39,46,56,88});
param1.add(new int[]{-30});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1});
param1.add(new int[]{69,37,32,5,84,14,25,9,86,85,30,82,99,92,32,43,79,58,75,90,49,54,95,76,80});
List<Integer> param2 = new ArrayList<>();
param2.add(23);
param2.add(16);
param2.add(21);
param2.add(19);
param2.add(27);
param2.add(19);
param2.add(4);
param2.add(0);
param2.add(13);
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,096 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_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_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_1{
static int f_gold ( int a [ ] , int n ) {
return ( int ) Math . floor ( ( - 1 + Math . sqrt ( 1 + ( 8 * n ) ) ) / 2 ) ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,2,2,3,5,6,7,8,8,12,15,16,18,18,20,21,21,22,22,24,24,25,30,35,42,49,52,55,55,63,68,70,72,73,77,80,83,87,87,88,88,94,95,97});
param0.add(new int[]{48,-72,84,-24,28,94,36,28,32,66,-62,64,6,-68,-12,46,4,98,18,86,-60,76,14,98});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{11,16,84,8,86,44,79,11,73,12,29,62,22,44,28,8,48,92,73,63,59,44,95,66});
param0.add(new int[]{-94,-94,-92,-88,-86,-82,-80,-80,-78,-76,-56,-56,-50,-44,-42,-36,-36,-32,-32,-26,-14,-12,-6,12,24,28,34,38,42,42,46,50,56,62,62,74,84,92,94});
param0.add(new int[]{0,1,0,1,0,1,1,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,0,1,1,1,1,1,0,0});
param0.add(new int[]{2,2,3,3,3,4,5,13,16,18,21,22,27,28,32,34,36,37,41,42,43,51,52,52,54,54,61,65,67,67,68,71,75,77,77,78,80,81,81,84,86,90,90,93,93,94,99,99});
param0.add(new int[]{54,-86});
param0.add(new int[]{0,1});
param0.add(new int[]{5,54,49,80,56,62,31,49,60,19,45,94,33,46,32});
List<Integer> param1 = new ArrayList<>();
param1.add(22);
param1.add(12);
param1.add(25);
param1.add(14);
param1.add(19);
param1.add(24);
param1.add(31);
param1.add(1);
param1.add(1);
param1.add(8);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | 1,097 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS.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 EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS{
static boolean f_gold ( int n , int p ) {
n = n % p ;
for ( int x = 2 ;
x < p ;
x ++ ) if ( ( x * x ) % p == n ) return true ;
return false ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(71);
param0.add(85);
param0.add(4);
param0.add(20);
param0.add(71);
param0.add(72);
param0.add(36);
param0.add(95);
param0.add(83);
param0.add(72);
List<Integer> param1 = new ArrayList<>();
param1.add(78);
param1.add(75);
param1.add(35);
param1.add(99);
param1.add(29);
param1.add(88);
param1.add(54);
param1.add(52);
param1.add(33);
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,098 |
0 | Create_ds/CodeGen/data/transcoder_evaluation_gfg | Create_ds/CodeGen/data/transcoder_evaluation_gfg/java/CHECK_IF_A_GIVEN_ARRAY_CAN_REPRESENT_PREORDER_TRAVERSAL_OF_BINARY_SEARCH_TREE.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_GIVEN_ARRAY_CAN_REPRESENT_PREORDER_TRAVERSAL_OF_BINARY_SEARCH_TREE{
static boolean f_gold ( int pre [ ] , int n ) {
Stack < Integer > s = new Stack < Integer > ( ) ;
int root = Integer . MIN_VALUE ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( pre [ i ] < root ) {
return false ;
}
while ( ! s . empty ( ) && s . peek ( ) < pre [ i ] ) {
root = s . peek ( ) ;
s . pop ( ) ;
}
s . push ( pre [ i ] ) ;
}
return true ;
}
//TOFILL
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,9,21,25,33,36,44,48,55,55,56,58,66,66,66,66,78,92,96,97});
param0.add(new int[]{-16,80,70,72,-86,-28,42,28,-28,56,-32,40,-78,32,22,-52,-58});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{10,85,45,52,98,9,59,58,61,91,4,90,43,48,47});
param0.add(new int[]{-92,-90,-88,-50,-48,-48,-44,-42,-40,-34,-28,-26,-26,-24,-8,-6,4,8,12,20,32,36,38,40,46,52,58,88,92});
param0.add(new int[]{1,0,1,1,1});
param0.add(new int[]{1,2,3,4,14,16,17,18,19,19,21,21,22,25,25,28,29,33,34,40,41,42,44,50,52,58,61,62,67,70,74,74,75,75,76,77,77,77,81,83,87,90,90,90,96,98,99,99});
param0.add(new int[]{-98,40,84,-8,42,-52,2,16,-68,-28,-54,88,8,-4,-98,-40,-32,-64,54,32,-76,-10,-48,-88,80,32,-2,-94,-26,-54,30,-56});
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[]{9,35,62,78,55,29,55,36,77,89,73,31,53,94,22,23,87,96,7,15,71,61,25,61,99,34,1,87,21,14,58,69,61,49,54,7,89,52,78,97,11,78,27,37,56,19,20,21});
List<Integer> param1 = new ArrayList<>();
param1.add(18);
param1.add(16);
param1.add(35);
param1.add(8);
param1.add(17);
param1.add(2);
param1.add(30);
param1.add(26);
param1.add(17);
param1.add(34);
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,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.