id
stringlengths 9
111
| java
stringlengths 188
2.04k
| python
stringlengths 40
1.94k
⌀ | cpp
stringlengths 65
1.25k
⌀ | java_test
stringlengths 532
56.4k
| python_test
stringlengths 348
57.4k
⌀ | cpp_test
stringlengths 328
4.71k
⌀ |
---|---|---|---|---|---|---|
RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_1{
static int f_gold ( int n ) {
int dp [ ] = new int [ n + 1 ] ;
dp [ 0 ] = 0 ;
dp [ 1 ] = 1 ;
for ( int i = 2 ;
i <= n ;
i ++ ) dp [ i ] = Math . max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ] , i ) ;
return dp [ n ] ;
}
| def f_gold ( n ) :
dp = [ 0 ] * ( n + 1 )
dp [ 0 ] = 0
dp [ 1 ] = 1
for i in range ( 2 , n + 1 ) :
dp [ i ] = max ( dp [ int ( i / 2 ) ] + dp [ int ( i / 3 ) ] + dp [ int ( i / 4 ) ] , i ) ;
return dp [ n ]
|
using namespace std;
int f_gold ( int n ) {
int dp [ n + 1 ];
dp [ 0 ] = 0, dp [ 1 ] = 1;
for ( int i = 2;
i <= n;
i ++ ) dp [ i ] = max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ], i );
return dp [ n ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(50);
param0.add(83);
param0.add(18);
param0.add(24);
param0.add(31);
param0.add(38);
param0.add(94);
param0.add(24);
param0.add(13);
param0.add(53);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(50,),
(83,),
(18,),
(24,),
(31,),
(38,),
(94,),
(24,),
(13,),
(53,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {50,83,18,24,31,38,94,24,13,53};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN{
static int f_gold ( int coin [ ] , int n , int k ) {
Arrays . sort ( coin ) ;
int coins_needed = ( int ) Math . ceil ( 1.0 * n / ( k + 1 ) ) ;
int ans = 0 ;
for ( int i = 0 ;
i <= coins_needed - 1 ;
i ++ ) ans += coin [ i ] ;
return ans ;
}
| import math
def f_gold ( coin , n , k ) :
coin.sort ( )
coins_needed = math.ceil ( 1.0 * n // ( k + 1 ) ) ;
ans = 0
for i in range ( coins_needed - 1 + 1 ) :
ans += coin [ i ]
return ans
|
using namespace std;
int f_gold ( int coin [ ], int n, int k ) {
sort ( coin, coin + n );
int coins_needed = ceil ( 1.0 * n / ( k + 1 ) );
int ans = 0;
for ( int i = 0;
i <= coins_needed - 1;
i ++ ) ans += coin [ i ];
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,4,5,9,10,10,11,14,15,19,21,22,29,36,36,38,39,39,39,41,41,42,45,45,48,55,56,57,64,66,66,66,66,69,74,76,80,81,82,82,85,87,95,95});
param0.add(new int[]{-6,-52,20,-98,-10,48,36,66,-88,94,68,16});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{91,62,29,49,6,11,10,43,78,35,32,5,1,48,15,24,4,71});
param0.add(new int[]{-98,-92,-88,-84,-82,-78,-74,-74,-68,-62,-62,-56,-56,-50,-46,-44,-26,-18,-14,-8,-8,-6,8,16,20,20,22,26,36,42,44,44,52,60,66,68,68,70,76,84});
param0.add(new int[]{1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0});
param0.add(new int[]{5,12,38,39,52,54,62,81,87,93});
param0.add(new int[]{86,-18,-32,70,40,-76,-8,8,-84,-10,92,94,-18,-12,-26,-40,-74,60,16,-70,44,-32,40,-24,0,4});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{86,62,98,97,61,31,23,56,63,72,44,74,58,97});
List<Integer> param1 = new ArrayList<>();
param1.add(33);
param1.add(6);
param1.add(16);
param1.add(13);
param1.add(25);
param1.add(32);
param1.add(6);
param1.add(25);
param1.add(37);
param1.add(12);
List<Integer> param2 = new ArrayList<>();
param2.add(27);
param2.add(10);
param2.add(16);
param2.add(17);
param2.add(34);
param2.add(32);
param2.add(8);
param2.add(20);
param2.add(29);
param2.add(13);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([2, 4, 5, 9, 10, 10, 11, 14, 15, 19, 21, 22, 29, 36, 36, 38, 39, 39, 39, 41, 41, 42, 45, 45, 48, 55, 56, 57, 64, 66, 66, 66, 66, 69, 74, 76, 80, 81, 82, 82, 85, 87, 95, 95],33,27,),
([-6, -52, 20, -98, -10, 48, 36, 66, -88, 94, 68, 16],6,10,),
([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],16,16,),
([91, 62, 29, 49, 6, 11, 10, 43, 78, 35, 32, 5, 1, 48, 15, 24, 4, 71],13,17,),
([-98, -92, -88, -84, -82, -78, -74, -74, -68, -62, -62, -56, -56, -50, -46, -44, -26, -18, -14, -8, -8, -6, 8, 16, 20, 20, 22, 26, 36, 42, 44, 44, 52, 60, 66, 68, 68, 70, 76, 84],25,34,),
([1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0],32,32,),
([5, 12, 38, 39, 52, 54, 62, 81, 87, 93],6,8,),
([86, -18, -32, 70, 40, -76, -8, 8, -84, -10, 92, 94, -18, -12, -26, -40, -74, 60, 16, -70, 44, -32, 40, -24, 0, 4],25,20,),
([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],37,29,),
([86, 62, 98, 97, 61, 31, 23, 56, 63, 72, 44, 74, 58, 97],12,13,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{2,4,5,9,10,10,11,14,15,19,21,22,29,36,36,38,39,39,39,41,41,42,45,45,48,55,56,57,64,66,66,66,66,69,74,76,80,81,82,82,85,87,95,95},{-6,-52,20,-98,-10,48,36,66,-88,94,68,16},{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},{91,62,29,49,6,11,10,43,78,35,32,5,1,48,15,24,4,71},{-98,-92,-88,-84,-82,-78,-74,-74,-68,-62,-62,-56,-56,-50,-46,-44,-26,-18,-14,-8,-8,-6,8,16,20,20,22,26,36,42,44,44,52,60,66,68,68,70,76,84},{1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0},{5,12,38,39,52,54,62,81,87,93},{86,-18,-32,70,40,-76,-8,8,-84,-10,92,94,-18,-12,-26,-40,-74,60,16,-70,44,-32,40,-24,0,4},{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},{86,62,98,97,61,31,23,56,63,72,44,74,58,97}};
vector<int> param1 {33,6,16,13,25,32,6,25,37,12};
vector<int> param2 {27,10,16,17,34,32,8,20,29,13};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PADOVAN_SEQUENCE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PADOVAN_SEQUENCE{
static int f_gold ( int n ) {
int pPrevPrev = 1 , pPrev = 1 , pCurr = 1 , pNext = 1 ;
for ( int i = 3 ;
i <= n ;
i ++ ) {
pNext = pPrevPrev + pPrev ;
pPrevPrev = pPrev ;
pPrev = pCurr ;
pCurr = pNext ;
}
return pNext ;
}
| def f_gold ( n ) :
pPrevPrev , pPrev , pCurr , pNext = 1 , 1 , 1 , 1
for i in range ( 3 , n + 1 ) :
pNext = pPrevPrev + pPrev
pPrevPrev = pPrev
pPrev = pCurr
pCurr = pNext
return pNext ;
|
using namespace std;
int f_gold ( int n ) {
int pPrevPrev = 1, pPrev = 1, pCurr = 1, pNext = 1;
for ( int i = 3;
i <= n;
i ++ ) {
pNext = pPrevPrev + pPrev;
pPrevPrev = pPrev;
pPrev = pCurr;
pCurr = pNext;
}
return pNext;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(92);
param0.add(29);
param0.add(52);
param0.add(55);
param0.add(13);
param0.add(83);
param0.add(83);
param0.add(10);
param0.add(67);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(1,),
(92,),
(29,),
(52,),
(55,),
(13,),
(83,),
(83,),
(10,),
(67,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {1,92,29,52,55,13,83,83,10,67};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
CEILING_IN_A_SORTED_ARRAY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CEILING_IN_A_SORTED_ARRAY{
static int f_gold ( int arr [ ] , int low , int high , int x ) {
int i ;
if ( x <= arr [ low ] ) return low ;
for ( i = low ;
i < high ;
i ++ ) {
if ( arr [ i ] == x ) return i ;
if ( arr [ i ] < x && arr [ i + 1 ] >= x ) return i + 1 ;
}
return - 1 ;
}
| def f_gold ( arr , low , high , x ) :
if x <= arr [ low ] :
return low
i = low
for i in range ( high ) :
if arr [ i ] == x :
return i
if arr [ i ] < x and arr [ i + 1 ] >= x :
return i + 1
return - 1
|
using namespace std;
int f_gold ( int arr [ ], int low, int high, int x ) {
int i;
if ( x <= arr [ low ] ) return low;
for ( i = low;
i < high;
i ++ ) {
if ( arr [ i ] == x ) return i;
if ( arr [ i ] < x && arr [ i + 1 ] >= x ) return i + 1;
}
return - 1;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,3,4,6,8,9,9,10,11,16,19,20,21,21,21,24,24,25,28,30,30,30,32,34,35,39,41,42,49,52,57,59,61,62,66,68,71,73,76,79,83,84,85,86,87,87});
param0.add(new int[]{92,50,-84,60,32,-54,84,-82,-42,-72,-64,-28,-48,66,92,-42,42,-66,52,-30,48,42,36,-4,64,62,-16,0,20,26,78,78,12,-6,-30,-14,76,72,70,-34,98,32});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1});
param0.add(new int[]{26,68,73,76,14,19,56,80,17,7,15,64,99,98,21,21,72,12,14,10,44,82,25,42,46,86,79,43,91});
param0.add(new int[]{-90,-86,-84,-50,-30,-24,-12,-2,8,22,30,44,58,58,60,60,62,90});
param0.add(new int[]{0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,1,1});
param0.add(new int[]{2,2,29,31,34,39,48,50,56,61,66,66,69,73,88});
param0.add(new int[]{-98,48,-58,8,70,62,92,84,-58,-46,-26,-92,18,-88,40,-12,60,14,54,-64,88,52,-44,88,-46,-8,36,-22,28,-20,-50,58,-82,-44,-44,54,-86,40,10,0,-24,-84,-10,62,58,0,-88});
param0.add(new int[]{0,0,0,0,1,1});
param0.add(new int[]{56,30,33,5,67,35,22,54,36,55,94,89,40,65,29,76,17,14,14,49,40,44,35,69,63,2,81,78,19,67,12,14,68,30,82,85,12,2,94,33,85,75,97,31,69,31,85,26});
List<Integer> param1 = new ArrayList<>();
param1.add(23);
param1.add(36);
param1.add(11);
param1.add(23);
param1.add(9);
param1.add(12);
param1.add(9);
param1.add(40);
param1.add(5);
param1.add(46);
List<Integer> param2 = new ArrayList<>();
param2.add(37);
param2.add(35);
param2.add(9);
param2.add(27);
param2.add(16);
param2.add(15);
param2.add(12);
param2.add(29);
param2.add(5);
param2.add(47);
List<Integer> param3 = new ArrayList<>();
param3.add(44);
param3.add(34);
param3.add(13);
param3.add(26);
param3.add(10);
param3.add(18);
param3.add(10);
param3.add(24);
param3.add(5);
param3.add(47);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([2, 3, 4, 6, 8, 9, 9, 10, 11, 16, 19, 20, 21, 21, 21, 24, 24, 25, 28, 30, 30, 30, 32, 34, 35, 39, 41, 42, 49, 52, 57, 59, 61, 62, 66, 68, 71, 73, 76, 79, 83, 84, 85, 86, 87, 87],23,37,44,),
([92, 50, -84, 60, 32, -54, 84, -82, -42, -72, -64, -28, -48, 66, 92, -42, 42, -66, 52, -30, 48, 42, 36, -4, 64, 62, -16, 0, 20, 26, 78, 78, 12, -6, -30, -14, 76, 72, 70, -34, 98, 32],36,35,34,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],11,9,13,),
([26, 68, 73, 76, 14, 19, 56, 80, 17, 7, 15, 64, 99, 98, 21, 21, 72, 12, 14, 10, 44, 82, 25, 42, 46, 86, 79, 43, 91],23,27,26,),
([-90, -86, -84, -50, -30, -24, -12, -2, 8, 22, 30, 44, 58, 58, 60, 60, 62, 90],9,16,10,),
([0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1],12,15,18,),
([2, 2, 29, 31, 34, 39, 48, 50, 56, 61, 66, 66, 69, 73, 88],9,12,10,),
([-98, 48, -58, 8, 70, 62, 92, 84, -58, -46, -26, -92, 18, -88, 40, -12, 60, 14, 54, -64, 88, 52, -44, 88, -46, -8, 36, -22, 28, -20, -50, 58, -82, -44, -44, 54, -86, 40, 10, 0, -24, -84, -10, 62, 58, 0, -88],40,29,24,),
([0, 0, 0, 0, 1, 1],5,5,5,),
([56, 30, 33, 5, 67, 35, 22, 54, 36, 55, 94, 89, 40, 65, 29, 76, 17, 14, 14, 49, 40, 44, 35, 69, 63, 2, 81, 78, 19, 67, 12, 14, 68, 30, 82, 85, 12, 2, 94, 33, 85, 75, 97, 31, 69, 31, 85, 26],46,47,47,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{2,3,4,6,8,9,9,10,11,16,19,20,21,21,21,24,24,25,28,30,30,30,32,34,35,39,41,42,49,52,57,59,61,62,66,68,71,73,76,79,83,84,85,86,87,87},{92,50,-84,60,32,-54,84,-82,-42,-72,-64,-28,-48,66,92,-42,42,-66,52,-30,48,42,36,-4,64,62,-16,0,20,26,78,78,12,-6,-30,-14,76,72,70,-34,98,32},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{26,68,73,76,14,19,56,80,17,7,15,64,99,98,21,21,72,12,14,10,44,82,25,42,46,86,79,43,91},{-90,-86,-84,-50,-30,-24,-12,-2,8,22,30,44,58,58,60,60,62,90},{0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,1,1},{2,2,29,31,34,39,48,50,56,61,66,66,69,73,88},{-98,48,-58,8,70,62,92,84,-58,-46,-26,-92,18,-88,40,-12,60,14,54,-64,88,52,-44,88,-46,-8,36,-22,28,-20,-50,58,-82,-44,-44,54,-86,40,10,0,-24,-84,-10,62,58,0,-88},{0,0,0,0,1,1},{56,30,33,5,67,35,22,54,36,55,94,89,40,65,29,76,17,14,14,49,40,44,35,69,63,2,81,78,19,67,12,14,68,30,82,85,12,2,94,33,85,75,97,31,69,31,85,26}};
vector<int> param1 {23,36,11,23,9,12,9,40,5,46};
vector<int> param2 {37,35,9,27,16,15,12,29,5,47};
vector<int> param3 {44,34,13,26,10,18,10,24,5,47};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_1{
static int f_gold ( int ar [ ] , int n ) {
if ( n <= 4 ) return Arrays . stream ( ar ) . min ( ) . getAsInt ( ) ;
int [ ] sum = new int [ n ] ;
sum [ 0 ] = ar [ 0 ] ;
sum [ 1 ] = ar [ 1 ] ;
sum [ 2 ] = ar [ 2 ] ;
sum [ 3 ] = ar [ 3 ] ;
for ( int i = 4 ;
i < n ;
i ++ ) sum [ i ] = ar [ i ] + Arrays . stream ( Arrays . copyOfRange ( sum , i - 4 , i ) ) . min ( ) . getAsInt ( ) ;
return Arrays . stream ( Arrays . copyOfRange ( sum , n - 4 , n ) ) . min ( ) . getAsInt ( ) ;
}
| def f_gold ( ar , n ) :
if ( n <= 4 ) :
return min ( ar )
sum = [ 0 for i in range ( n ) ]
sum [ 0 ] = ar [ 0 ]
sum [ 1 ] = ar [ 1 ]
sum [ 2 ] = ar [ 2 ]
sum [ 3 ] = ar [ 3 ]
for i in range ( 4 , n ) :
sum [ i ] = ar [ i ] + min ( sum [ i - 4 : i ] )
return min ( sum [ n - 4 : n ] )
|
using namespace std;
int f_gold ( int ar [ ], int n ) {
if ( n <= 4 ) return * min_element ( ar, ar + n );
int sum [ n ];
sum [ 0 ] = ar [ 0 ];
sum [ 1 ] = ar [ 1 ];
sum [ 2 ] = ar [ 2 ];
sum [ 3 ] = ar [ 3 ];
for ( int i = 4;
i < n;
i ++ ) sum [ i ] = ar [ i ] + ( * min_element ( sum + i - 4, sum + i ) );
return * min_element ( sum + n - 4, sum + n );
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,4,9,26,31,31,33,35,40,45,48,52,57,60,69,75,82,89,90,92,95,97});
param0.add(new int[]{60,-68,30,-62,-8,48,-20,30,16,-60,-20});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{15,70,50,28,67,11,27,42,1,61,37,8,66,54,50,91,86,57,4});
param0.add(new int[]{-98,-92,-84,-80,-70,-58,-58,-48,-42,-14,-8,24,30,32,42,62,68,70,72,88});
param0.add(new int[]{1,1,1,1,0,1,0,1,1,1,0,1,1,1,0});
param0.add(new int[]{4,5,5,10,12,13,16,19,19,21,22,25,26,29,30,33,34,44,46,52,55,55,56,78,86,88,88,90,92});
param0.add(new int[]{40,-50,-96,78,82,-16,26,8,38,38,54,-24,88,96,-42,-84,-28,-32,-64,74,74,-10,-8,66,14,-78,56,-22,-90,66,-68});
param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{29,38,20,25,16,97,16,90,30,99});
List<Integer> param1 = new ArrayList<>();
param1.add(19);
param1.add(5);
param1.add(43);
param1.add(15);
param1.add(16);
param1.add(7);
param1.add(16);
param1.add(26);
param1.add(7);
param1.add(9);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([4, 4, 9, 26, 31, 31, 33, 35, 40, 45, 48, 52, 57, 60, 69, 75, 82, 89, 90, 92, 95, 97],19,),
([60, -68, 30, -62, -8, 48, -20, 30, 16, -60, -20],5,),
([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],43,),
([15, 70, 50, 28, 67, 11, 27, 42, 1, 61, 37, 8, 66, 54, 50, 91, 86, 57, 4],15,),
([-98, -92, -84, -80, -70, -58, -58, -48, -42, -14, -8, 24, 30, 32, 42, 62, 68, 70, 72, 88],16,),
([1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],7,),
([4, 5, 5, 10, 12, 13, 16, 19, 19, 21, 22, 25, 26, 29, 30, 33, 34, 44, 46, 52, 55, 55, 56, 78, 86, 88, 88, 90, 92],16,),
([40, -50, -96, 78, 82, -16, 26, 8, 38, 38, 54, -24, 88, 96, -42, -84, -28, -32, -64, 74, 74, -10, -8, 66, 14, -78, 56, -22, -90, 66, -68],26,),
([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],7,),
([29, 38, 20, 25, 16, 97, 16, 90, 30, 99],9,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{4,4,9,26,31,31,33,35,40,45,48,52,57,60,69,75,82,89,90,92,95,97},{60,-68,30,-62,-8,48,-20,30,16,-60,-20},{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},{15,70,50,28,67,11,27,42,1,61,37,8,66,54,50,91,86,57,4},{-98,-92,-84,-80,-70,-58,-58,-48,-42,-14,-8,24,30,32,42,62,68,70,72,88},{1,1,1,1,0,1,0,1,1,1,0,1,1,1,0},{4,5,5,10,12,13,16,19,19,21,22,25,26,29,30,33,34,44,46,52,55,55,56,78,86,88,88,90,92},{40,-50,-96,78,82,-16,26,8,38,38,54,-24,88,96,-42,-84,-28,-32,-64,74,74,-10,-8,66,14,-78,56,-22,-90,66,-68},{0,0,0,0,0,1,1,1,1,1,1,1},{29,38,20,25,16,97,16,90,30,99}};
vector<int> param1 {19,5,43,15,16,7,16,26,7,9};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X{
static int f_gold ( int [ ] arr1 , int [ ] arr2 , int m , int n , int x ) {
int count = 0 ;
for ( int i = 0 ;
i < m ;
i ++ ) for ( int j = 0 ;
j < n ;
j ++ ) if ( ( arr1 [ i ] + arr2 [ j ] ) == x ) count ++ ;
return count ;
}
| def f_gold ( arr1 , arr2 , m , n , x ) :
count = 0
for i in range ( m ) :
for j in range ( n ) :
if arr1 [ i ] + arr2 [ j ] == x :
count = count + 1
return count
|
using namespace std;
int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) {
int count = 0;
for ( int i = 0;
i < m;
i ++ ) for ( int j = 0;
j < n;
j ++ ) if ( ( arr1 [ i ] + arr2 [ j ] ) == x ) count ++;
return count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98});
param0.add(new int[]{50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50});
param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{88,14,29,87,86,58});
param0.add(new int[]{-98,-92,-88,-86,-82,-76,-72,-66,-56,-48,-34,-28,-28,-26,-20,-18,-18,-16,-16,-12,-4,0,6,12,16,20,22,30,34,34,36,56,58,62,64,80,82,94});
param0.add(new int[]{1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,0});
param0.add(new int[]{70,70,74});
param0.add(new int[]{-20,-12,-50,76,24,64,-22,-4,-68});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{68,75,51,45,73,95,48,53,70,41,65,47,46,43,79,29,50});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{1,1,9,14,17,23,26,31,33,36,53,60,71,75,76,84,87,88});
param1.add(new int[]{34,-6,-66,0,-6,82,60,-98,-8,60,-2,4,22,76});
param1.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{91,95,64,4,63,35});
param1.add(new int[]{-94,-90,-88,-84,-82,-78,-76,-72,-70,-58,-58,-46,-42,-40,-40,-32,-22,-20,-18,-12,-8,-6,6,6,18,20,34,46,60,62,66,72,72,76,76,78,92,98});
param1.add(new int[]{1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0});
param1.add(new int[]{15,55,84});
param1.add(new int[]{18,98,-88,86,72,-44,82,94,58});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{4,6,76,65,16,13,85,43,31,14,81,90,24,87,40,25,88});
List<Integer> param2 = new ArrayList<>();
param2.add(9);
param2.add(11);
param2.add(14);
param2.add(3);
param2.add(34);
param2.add(39);
param2.add(1);
param2.add(5);
param2.add(27);
param2.add(10);
List<Integer> param3 = new ArrayList<>();
param3.add(15);
param3.add(12);
param3.add(9);
param3.add(5);
param3.add(32);
param3.add(26);
param3.add(1);
param3.add(4);
param3.add(26);
param3.add(10);
List<Integer> param4 = new ArrayList<>();
param4.add(11);
param4.add(8);
param4.add(12);
param4.add(5);
param4.add(23);
param4.add(34);
param4.add(1);
param4.add(7);
param4.add(37);
param4.add(9);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([11, 13, 16, 23, 26, 28, 31, 34, 37, 39, 44, 48, 56, 59, 79, 91, 96, 98],[1, 1, 9, 14, 17, 23, 26, 31, 33, 36, 53, 60, 71, 75, 76, 84, 87, 88],9,15,11,),
([50, 14, -98, 14, 90, 36, 66, 44, 10, -98, -24, -36, -32, -50],[34, -6, -66, 0, -6, 82, 60, -98, -8, 60, -2, 4, 22, 76],11,12,8,),
([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,9,12,),
([88, 14, 29, 87, 86, 58],[91, 95, 64, 4, 63, 35],3,5,5,),
([-98, -92, -88, -86, -82, -76, -72, -66, -56, -48, -34, -28, -28, -26, -20, -18, -18, -16, -16, -12, -4, 0, 6, 12, 16, 20, 22, 30, 34, 34, 36, 56, 58, 62, 64, 80, 82, 94],[-94, -90, -88, -84, -82, -78, -76, -72, -70, -58, -58, -46, -42, -40, -40, -32, -22, -20, -18, -12, -8, -6, 6, 6, 18, 20, 34, 46, 60, 62, 66, 72, 72, 76, 76, 78, 92, 98],34,32,23,),
([1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0],[1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0],39,26,34,),
([70, 70, 74],[15, 55, 84],1,1,1,),
([-20, -12, -50, 76, 24, 64, -22, -4, -68],[18, 98, -88, 86, 72, -44, 82, 94, 58],5,4,7,),
([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],[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],27,26,37,),
([68, 75, 51, 45, 73, 95, 48, 53, 70, 41, 65, 47, 46, 43, 79, 29, 50],[4, 6, 76, 65, 16, 13, 85, 43, 31, 14, 81, 90, 24, 87, 40, 25, 88],10,10,9,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98},{50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{88,14,29,87,86,58},{-98,-92,-88,-86,-82,-76,-72,-66,-56,-48,-34,-28,-28,-26,-20,-18,-18,-16,-16,-12,-4,0,6,12,16,20,22,30,34,34,36,56,58,62,64,80,82,94},{1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,0},{70,70,74},{-20,-12,-50,76,24,64,-22,-4,-68},{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},{68,75,51,45,73,95,48,53,70,41,65,47,46,43,79,29,50}};
vector<vector<int>> param1 {{1,1,9,14,17,23,26,31,33,36,53,60,71,75,76,84,87,88},{34,-6,-66,0,-6,82,60,-98,-8,60,-2,4,22,76},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{91,95,64,4,63,35},{-94,-90,-88,-84,-82,-78,-76,-72,-70,-58,-58,-46,-42,-40,-40,-32,-22,-20,-18,-12,-8,-6,6,6,18,20,34,46,60,62,66,72,72,76,76,78,92,98},{1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0},{15,55,84},{18,98,-88,86,72,-44,82,94,58},{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},{4,6,76,65,16,13,85,43,31,14,81,90,24,87,40,25,88}};
vector<int> param2 {9,11,14,3,34,39,1,5,27,10};
vector<int> param3 {15,12,9,5,32,26,1,4,26,10};
vector<int> param4 {11,8,12,5,23,34,1,7,37,9};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT{
static boolean f_gold ( int num ) {
if ( num / 10 == 0 ) return true ;
while ( num != 0 ) {
if ( num / 10 == 0 ) return true ;
int digit1 = num % 10 ;
int digit2 = ( num / 10 ) % 10 ;
if ( Math . abs ( digit2 - digit1 ) > 1 ) return false ;
num = num / 10 ;
}
return true ;
}
| def f_gold ( num ) :
if ( num // 10 == 0 ) :
return True
while ( num != 0 ) :
if ( num // 10 == 0 ) :
return True
digit1 = num % 10
digit2 = ( num // 10 ) % 10
if ( abs ( digit2 - digit1 ) > 1 ) :
return False
num = num // 10
return True
|
using namespace std;
bool f_gold ( int num ) {
if ( num / 10 == 0 ) return true;
while ( num != 0 ) {
if ( num / 10 == 0 ) return true;
int digit1 = num % 10;
int digit2 = ( num / 10 ) % 10;
if ( abs ( digit2 - digit1 ) > 1 ) return false;
num = num / 10;
}
return true;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(67);
param0.add(77);
param0.add(35);
param0.add(79);
param0.add(45);
param0.add(22);
param0.add(68);
param0.add(17);
param0.add(5);
param0.add(85);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(67,),
(77,),
(35,),
(79,),
(45,),
(22,),
(68,),
(17,),
(5,),
(85,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {67,77,35,79,45,22,68,17,5,85};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
EFFICIENTLY_FIND_FIRST_REPEATED_CHARACTER_STRING_WITHOUT_USING_ADDITIONAL_DATA_STRUCTURE_ONE_TRAVERSAL |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class EFFICIENTLY_FIND_FIRST_REPEATED_CHARACTER_STRING_WITHOUT_USING_ADDITIONAL_DATA_STRUCTURE_ONE_TRAVERSAL{
static int f_gold ( String str ) {
int checker = 0 ;
for ( int i = 0 ;
i < str . length ( ) ;
++ i ) {
int val = ( str . charAt ( i ) - 'a' ) ;
if ( ( checker & ( 1 << val ) ) > 0 ) return i ;
checker |= ( 1 << val ) ;
}
return - 1 ;
}
| null |
using namespace std;
int f_gold ( string str ) {
int checker = 0;
for ( int i = 0;
i < str . length ( );
++ i ) {
int val = ( str [ i ] - 'a' );
if ( ( checker & ( 1 << val ) ) > 0 ) return i;
checker |= ( 1 << val );
}
return - 1;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("XFGfXTDgpIuerN");
param0.add("5621946166");
param0.add("11010110");
param0.add("xL");
param0.add("2575");
param0.add("0100010");
param0.add("SZmmQ");
param0.add("9735892999350");
param0.add("1001101101101");
param0.add("oEXDbOU");
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | null |
int main() {
int n_success = 0;
vector<string> param0 {"XFGfXTDgpIuerN","5621946166","11010110","xL","2575","0100010","SZmmQ","9735892999350","1001101101101","oEXDbOU"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
LONGEST_REPEATED_SUBSEQUENCE_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class LONGEST_REPEATED_SUBSEQUENCE_1{
static String f_gold ( String str ) {
int n = str . length ( ) ;
int [ ] [ ] dp = new int [ n + 1 ] [ n + 1 ] ;
for ( int i = 0 ;
i <= n ;
i ++ ) for ( int j = 0 ;
j <= n ;
j ++ ) dp [ i ] [ j ] = 0 ;
for ( int i = 1 ;
i <= n ;
i ++ ) for ( int j = 1 ;
j <= n ;
j ++ ) if ( str . charAt ( i - 1 ) == str . charAt ( j - 1 ) && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] ;
else dp [ i ] [ j ] = Math . max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) ;
String res = "" ;
int i = n , j = n ;
while ( i > 0 && j > 0 ) {
if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) {
res = res + str . charAt ( i - 1 ) ;
i -- ;
j -- ;
}
else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i -- ;
else j -- ;
}
String reverse = "" ;
for ( int k = res . length ( ) - 1 ;
k >= 0 ;
k -- ) {
reverse = reverse + res . charAt ( k ) ;
}
return reverse ;
}
| def f_gold ( str ) :
n = len ( str )
dp = [ [ 0 for i in range ( n + 1 ) ] for j in range ( n + 1 ) ]
for i in range ( 1 , n + 1 ) :
for j in range ( 1 , n + 1 ) :
if ( str [ i - 1 ] == str [ j - 1 ] and i != j ) :
dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]
else :
dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] )
res = ''
i = n
j = n
while ( i > 0 and j > 0 ) :
if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) :
res += str [ i - 1 ]
i -= 1
j -= 1
elif ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) :
i -= 1
else :
j -= 1
res = ''.join ( reversed ( res ) )
return res
|
using namespace std;
string f_gold ( string str ) {
int n = str . length ( );
int dp [ n + 1 ] [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) for ( int j = 0;
j <= n;
j ++ ) dp [ i ] [ j ] = 0;
for ( int i = 1;
i <= n;
i ++ ) for ( int j = 1;
j <= n;
j ++ ) if ( str [ i - 1 ] == str [ j - 1 ] && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ];
else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] );
string res = "";
int i = n, j = n;
while ( i > 0 && j > 0 ) {
if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) {
res = res + str [ i - 1 ];
i --;
j --;
}
else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i --;
else j --;
}
reverse ( res . begin ( ), res . end ( ) );
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("qnQxjoRx");
param0.add("27473733400077");
param0.add("000010111111");
param0.add("TNVwgrWSLu");
param0.add("9537");
param0.add("1100");
param0.add("lYcoiQfzN");
param0.add("52");
param0.add("00100001100");
param0.add("Rkxe");
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)).equals(f_gold(param0.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
('qnQxjoRx',),
('27473733400077',),
('000010111111',),
('TNVwgrWSLu',),
('9537',),
('1100',),
('lYcoiQfzN',),
('52',),
('00100001100',),
('Rkxe',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"qnQxjoRx","27473733400077","000010111111","TNVwgrWSLu","9537","1100","lYcoiQfzN","52","00100001100","Rkxe"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES{
static int f_gold ( int n ) {
int ans = 0 ;
for ( int length = 1 ;
length <= Math . sqrt ( n ) ;
++ length ) for ( int height = length ;
height * length <= n ;
++ height ) ans ++ ;
return ans ;
}
| import math
def f_gold ( n ) :
ans = 0
for length in range ( 1 , int ( math.sqrt ( n ) ) + 1 ) :
height = length
while ( height * length <= n ) :
ans += 1
height += 1
return ans
|
using namespace std;
int f_gold ( int n ) {
int ans = 0;
for ( int length = 1;
length <= sqrt ( n );
++ length ) for ( int height = length;
height * length <= n;
++ height ) ans ++;
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(34);
param0.add(49);
param0.add(41);
param0.add(17);
param0.add(67);
param0.add(38);
param0.add(59);
param0.add(64);
param0.add(61);
param0.add(58);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(34,),
(49,),
(41,),
(17,),
(67,),
(38,),
(59,),
(64,),
(61,),
(58,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {34,49,41,17,67,38,59,64,61,58};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
POSITION_ELEMENT_STABLE_SORT |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class POSITION_ELEMENT_STABLE_SORT{
static int f_gold ( int arr [ ] , int n , int idx ) {
int result = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] < arr [ idx ] ) result ++ ;
if ( arr [ i ] == arr [ idx ] && i < idx ) result ++ ;
}
return result ;
}
| def f_gold ( arr , n , idx ) :
result = 0
for i in range ( n ) :
if ( arr [ i ] < arr [ idx ] ) :
result += 1
if ( arr [ i ] == arr [ idx ] and i < idx ) :
result += 1
return result ;
|
using namespace std;
int f_gold ( int arr [ ], int n, int idx ) {
int result = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] < arr [ idx ] ) result ++;
if ( arr [ i ] == arr [ idx ] && i < idx ) result ++;
}
return result;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,8,9,12,15,16,18,28,28,31,33,36,36,37,40,41,44,44,46,50,50,50,52,52,54,55,60,61,65,68,71,75,75,78,81,84,87,89,90,92,94,97,97,98,98,99});
param0.add(new int[]{-16,86,94,-86,-38,64,96,-64,94,10,-10,-62,-50,-46,-62,-32,-4,72,14,36,74,-66,46,82,-44,-22,-26,16,-8,0,-90,94,-50,22,-82,8,92,-84,-34,-36,-66});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{66,8,30,84,36,96,45,63,23,23,14,34,86,51,18,97,21,39,96,70,28,96,78,68,88,66,13,24,74,94});
param0.add(new int[]{-94,-90,-86,-86,-72,-72,-58,-50,-32,-22,-18,-10,-4,-2,-2,0,0,6,14,22,22,36,36,40,44,58,60,70,70,76,82,82,84,88,96});
param0.add(new int[]{1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1});
param0.add(new int[]{3,5,6,7,8,10,17,20,20,26,27,27,27,32,32,38,40,44,45,45,45,45,47,50,57,57,57,58,62,63,63,67,68,73,75,76,77,79,79,80,85,88,89,89,89,94,96,98});
param0.add(new int[]{98,-92,18,-18,44,-88,-90,-66,-38,78,-22,-46,-20,64,-10,54});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{14,17});
List<Integer> param1 = new ArrayList<>();
param1.add(37);
param1.add(31);
param1.add(30);
param1.add(26);
param1.add(17);
param1.add(30);
param1.add(42);
param1.add(14);
param1.add(19);
param1.add(1);
List<Integer> param2 = new ArrayList<>();
param2.add(32);
param2.add(27);
param2.add(34);
param2.add(21);
param2.add(31);
param2.add(36);
param2.add(35);
param2.add(12);
param2.add(31);
param2.add(1);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([4, 8, 9, 12, 15, 16, 18, 28, 28, 31, 33, 36, 36, 37, 40, 41, 44, 44, 46, 50, 50, 50, 52, 52, 54, 55, 60, 61, 65, 68, 71, 75, 75, 78, 81, 84, 87, 89, 90, 92, 94, 97, 97, 98, 98, 99],37,32,),
([-16, 86, 94, -86, -38, 64, 96, -64, 94, 10, -10, -62, -50, -46, -62, -32, -4, 72, 14, 36, 74, -66, 46, 82, -44, -22, -26, 16, -8, 0, -90, 94, -50, 22, -82, 8, 92, -84, -34, -36, -66],31,27,),
([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],30,34,),
([66, 8, 30, 84, 36, 96, 45, 63, 23, 23, 14, 34, 86, 51, 18, 97, 21, 39, 96, 70, 28, 96, 78, 68, 88, 66, 13, 24, 74, 94],26,21,),
([-94, -90, -86, -86, -72, -72, -58, -50, -32, -22, -18, -10, -4, -2, -2, 0, 0, 6, 14, 22, 22, 36, 36, 40, 44, 58, 60, 70, 70, 76, 82, 82, 84, 88, 96],17,31,),
([1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1],30,36,),
([3, 5, 6, 7, 8, 10, 17, 20, 20, 26, 27, 27, 27, 32, 32, 38, 40, 44, 45, 45, 45, 45, 47, 50, 57, 57, 57, 58, 62, 63, 63, 67, 68, 73, 75, 76, 77, 79, 79, 80, 85, 88, 89, 89, 89, 94, 96, 98],42,35,),
([98, -92, 18, -18, 44, -88, -90, -66, -38, 78, -22, -46, -20, 64, -10, 54],14,12,),
([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],19,31,),
([14, 17],1,1,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{4,8,9,12,15,16,18,28,28,31,33,36,36,37,40,41,44,44,46,50,50,50,52,52,54,55,60,61,65,68,71,75,75,78,81,84,87,89,90,92,94,97,97,98,98,99},{-16,86,94,-86,-38,64,96,-64,94,10,-10,-62,-50,-46,-62,-32,-4,72,14,36,74,-66,46,82,-44,-22,-26,16,-8,0,-90,94,-50,22,-82,8,92,-84,-34,-36,-66},{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},{66,8,30,84,36,96,45,63,23,23,14,34,86,51,18,97,21,39,96,70,28,96,78,68,88,66,13,24,74,94},{-94,-90,-86,-86,-72,-72,-58,-50,-32,-22,-18,-10,-4,-2,-2,0,0,6,14,22,22,36,36,40,44,58,60,70,70,76,82,82,84,88,96},{1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1},{3,5,6,7,8,10,17,20,20,26,27,27,27,32,32,38,40,44,45,45,45,45,47,50,57,57,57,58,62,63,63,67,68,73,75,76,77,79,79,80,85,88,89,89,89,94,96,98},{98,-92,18,-18,44,-88,-90,-66,-38,78,-22,-46,-20,64,-10,54},{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},{14,17}};
vector<int> param1 {37,31,30,26,17,30,42,14,19,1};
vector<int> param2 {32,27,34,21,31,36,35,12,31,1};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NUMBER_SUBSTRINGS_DIVISIBLE_4_STRING_INTEGERS |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NUMBER_SUBSTRINGS_DIVISIBLE_4_STRING_INTEGERS{
static int f_gold ( String s ) {
int n = s . length ( ) ;
int count = 0 ;
for ( int i = 0 ;
i < n ;
++ i ) if ( s . charAt ( i ) == '4' || s . charAt ( i ) == '8' || s . charAt ( i ) == '0' ) count ++ ;
for ( int i = 0 ;
i < n - 1 ;
++ i ) {
int h = ( s . charAt ( i ) - '0' ) * 10 + ( s . charAt ( i + 1 ) - '0' ) ;
if ( h % 4 == 0 ) count = count + i + 1 ;
}
return count ;
}
| def f_gold ( s ) :
n = len ( s )
count = 0 ;
for i in range ( 0 , n , 1 ) :
if ( s [ i ] == '4' or s [ i ] == '8' or s [ i ] == '0' ) :
count += 1
for i in range ( 0 , n - 1 , 1 ) :
h = ( ord ( s [ i ] ) - ord ( '0' ) ) * 10 + ( ord ( s [ i + 1 ] ) - ord ( '0' ) )
if ( h % 4 == 0 ) :
count = count + i + 1
return count
|
using namespace std;
int f_gold ( char s [ ] ) {
int n = strlen ( s );
int count = 0;
for ( int i = 0;
i < n;
++ i ) if ( s [ i ] == '4' || s [ i ] == '8' || s [ i ] == '0' ) count ++;
for ( int i = 0;
i < n - 1;
++ i ) {
int h = ( s [ i ] - '0' ) * 10 + ( s [ i + 1 ] - '0' );
if ( h % 4 == 0 ) count = count + i + 1;
}
return count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("Qaq");
param0.add("9400761825850");
param0.add("0011001111");
param0.add("lasWqrLRq");
param0.add("5662");
param0.add("110");
param0.add(" tOYKf");
param0.add("6536991235305");
param0.add("11111");
param0.add("uZftT iDHcYiCt");
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
('Qaq',),
('9400761825850',),
('0011001111',),
('lasWqrLRq',),
('5662',),
('110',),
(' tOYKf',),
('6536991235305',),
('11111',),
('uZftT iDHcYiCt',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"Qaq","9400761825850","0011001111","lasWqrLRq","5662","110"," tOYKf","6536991235305","11111","uZftT iDHcYiCt"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front()) == f_gold(¶m0[i].front()))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
SQUARE_ROOT_OF_A_PERFECT_SQUARE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class SQUARE_ROOT_OF_A_PERFECT_SQUARE{
static float f_gold ( float n ) {
float x = n ;
float y = 1 ;
double e = 0.000001 ;
while ( x - y > e ) {
x = ( x + y ) / 2 ;
y = n / x ;
}
return x ;
}
| def f_gold ( n ) :
x = n
y = 1
e = 0.000001
while ( x - y > e ) :
x = ( x + y ) / 2
y = n / x
return x
| null |
public static void main(String args[]) {
int n_success = 0;
List<Float> param0 = new ArrayList<>();
param0.add(1763.655093333857F);
param0.add(-3544.737136289062F);
param0.add(7893.209433000695F);
param0.add(-3008.0331952533734F);
param0.add(6155.190186637041F);
param0.add(-5799.751467314729F);
param0.add(8234.151546380555F);
param0.add(-1829.5367705266551F);
param0.add(5778.227173218819F);
param0.add(-7785.473710863676F);
for(int i = 0; i < param0.size(); ++i)
{
if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(1763.655093333857,),
(-3544.737136289062,),
(7893.209433000695,),
(-3008.0331952533734,),
(6155.190186637041,),
(-5799.751467314729,),
(8234.151546380555,),
(-1829.5367705266551,),
(5778.227173218819,),
(-7785.473710863676,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001:
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
EFFICIENT_WAY_TO_MULTIPLY_WITH_7 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class EFFICIENT_WAY_TO_MULTIPLY_WITH_7{
static int f_gold ( int n ) {
return ( ( n << 3 ) - n ) ;
}
| def f_gold ( n ) :
return ( ( n << 3 ) - n )
|
using namespace std;
long f_gold ( long n ) {
return ( ( n << 3 ) - n );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(41);
param0.add(42);
param0.add(62);
param0.add(4);
param0.add(31);
param0.add(75);
param0.add(5);
param0.add(75);
param0.add(85);
param0.add(19);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(41,),
(42,),
(62,),
(4,),
(31,),
(75,),
(5,),
(75,),
(85,),
(19,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {41,42,62,4,31,75,5,75,85,19};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE{
static int f_gold ( int n ) {
int [ ] [ ] C = new int [ n + 1 ] [ n + 1 ] ;
for ( int i = 0 ;
i <= n ;
i ++ ) {
for ( int j = 0 ;
j <= Math . min ( i , n ) ;
j ++ ) {
if ( j == 0 || j == i ) C [ i ] [ j ] = 1 ;
else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ;
}
}
int maxvalue = 0 ;
for ( int i = 0 ;
i <= n ;
i ++ ) maxvalue = Math . max ( maxvalue , C [ n ] [ i ] ) ;
return maxvalue ;
}
| def f_gold ( n ) :
C = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ] ;
for i in range ( n + 1 ) :
for j in range ( min ( i , n ) + 1 ) :
if ( j == 0 or j == i ) :
C [ i ] [ j ] = 1 ;
else :
C [ i ] [ j ] = ( C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ) ;
maxvalue = 0 ;
for i in range ( n + 1 ) :
maxvalue = max ( maxvalue , C [ n ] [ i ] ) ;
return maxvalue ;
|
using namespace std;
int f_gold ( int n ) {
int C [ n + 1 ] [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) {
for ( int j = 0;
j <= min ( i, n );
j ++ ) {
if ( j == 0 || j == i ) C [ i ] [ j ] = 1;
else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
}
}
int maxvalue = 0;
for ( int i = 0;
i <= n;
i ++ ) maxvalue = max ( maxvalue, C [ n ] [ i ] );
return maxvalue;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(23);
param0.add(41);
param0.add(69);
param0.add(56);
param0.add(71);
param0.add(38);
param0.add(26);
param0.add(52);
param0.add(93);
param0.add(44);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(23,),
(41,),
(69,),
(56,),
(71,),
(38,),
(26,),
(52,),
(93,),
(44,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {23,41,69,56,71,38,26,52,93,44};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM{
static float f_gold ( float l , float b , float h ) {
float volume = ( l * b * h ) / 2 ;
return volume ;
}
| def f_gold ( l , b , h ) :
return ( ( l * b * h ) / 2 )
|
using namespace std;
float f_gold ( float l, float b, float h ) {
float volume = ( l * b * h ) / 2;
return volume;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Float> param0 = new ArrayList<>();
param0.add(8448.900678262902F);
param0.add(-1849.728957491451F);
param0.add(412.667844022232F);
param0.add(-5954.835911765373F);
param0.add(8437.913444665008F);
param0.add(-7183.181663518317F);
param0.add(2340.7905920227954F);
param0.add(-7281.157547371143F);
param0.add(471.3930826982504F);
param0.add(-7550.426360065503F);
List<Float> param1 = new ArrayList<>();
param1.add(8135.461799983198F);
param1.add(-4240.89241631363F);
param1.add(9798.083992381831F);
param1.add(-661.8872499003203F);
param1.add(8182.675681595904F);
param1.add(-6846.746446198541F);
param1.add(5479.00956987109F);
param1.add(-615.8705455524116F);
param1.add(1357.3753126091392F);
param1.add(-2693.2262997056355F);
List<Float> param2 = new ArrayList<>();
param2.add(6577.239053611328F);
param2.add(-9953.518310747193F);
param2.add(1449.9204200270522F);
param2.add(-8049.6051526695055F);
param2.add(9863.296545513396F);
param2.add(-971.2199894221352F);
param2.add(7073.449591910562F);
param2.add(-3343.0245192607968F);
param2.add(1907.815700915636F);
param2.add(-9110.64755244532F);
for(int i = 0; i < param0.size(); ++i)
{
if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i),param2.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i),param2.get(i))) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(8448.900678262902,8135.461799983198,6577.239053611328,),
(-1849.728957491451,-4240.89241631363,-9953.518310747193,),
(412.667844022232,9798.083992381831,1449.9204200270522,),
(-5954.835911765373,-661.8872499003203,-8049.6051526695055,),
(8437.913444665008,8182.675681595904,9863.296545513396,),
(-7183.181663518317,-6846.746446198541,-971.2199894221352,),
(2340.7905920227954,5479.00956987109,7073.449591910562,),
(-7281.157547371143,-615.8705455524116,-3343.0245192607968,),
(471.3930826982504,1357.3753126091392,1907.815700915636,),
(-7550.426360065503,-2693.2262997056355,-9110.64755244532,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001:
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<float> param0 {8448.900678262902F,-1849.728957491451F,412.667844022232F,-5954.835911765373F,8437.913444665008F,-7183.181663518317F,2340.7905920227954F,-7281.157547371143F,471.3930826982504F,-7550.426360065503F};
vector<float> param1 {8135.461799983198F,-4240.89241631363F,9798.083992381831F,-661.8872499003203F,8182.675681595904F,-6846.746446198541F,5479.00956987109F,-615.8705455524116F,1357.3753126091392F,-2693.2262997056355F};
vector<float> param2 {6577.239053611328F,-9953.518310747193F,1449.9204200270522F,-8049.6051526695055F,9863.296545513396F,-971.2199894221352F,7073.449591910562F,-3343.0245192607968F,1907.815700915636F,-9110.64755244532F};
for(int i = 0; i < param0.size(); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i],param2[i])) )/ (abs(f_filled(param0[i],param1[i],param2[i])) + 0.0000001)) < 0.001F)
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE{
static int f_gold ( int arr [ ] , int n ) {
if ( n <= 0 ) return 0 ;
int incl = arr [ 0 ] ;
int excl = 0 ;
for ( int i = 1 ;
i < n ;
i ++ ) {
int incl_new = arr [ i ] + Math . min ( excl , incl ) ;
int excl_new = incl ;
incl = incl_new ;
excl = excl_new ;
}
return Math . min ( incl , excl ) ;
}
| def f_gold(arr, n):
if (n <= 0):
return 0
incl = arr[0]
excl = 0
for i in range(1, n):
incl_new = arr[i] + min(excl, incl)
excl_new = incl
incl = incl_new
excl = excl_new
return min(incl, excl)
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
if ( n <= 0 ) return 0;
int incl = arr [ 0 ];
int excl = 0;
for ( int i = 1;
i < n;
i ++ ) {
int incl_new = arr [ i ] + min ( excl, incl );
int excl_new = incl;
incl = incl_new;
excl = excl_new;
}
return min ( incl, excl );
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,17,25,27,29,30,34,49,72,75,90,93,93,94});
param0.add(new int[]{-70,-32,62,0,-10,92,-94,-86,52,6,-26,-92,-10,70,-82,28,86,58,86,-58,84,-80,-18,-92,-34,6,34,36,70,-50,-6,-54,84,22,30,-96,-84,72,2,26,-20,4,48,-98,62,-28,-68});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{34,40,92,35,29,26,12,66,7,28,86,4,35,79,1,48,41,47,15,75,45,6,3,94,39,50,20,8,58,51,83,44,53,76,19,84,68,54,36,53});
param0.add(new int[]{-98,-98,-92,-92,-88,-82,-74,-70,-68,-68,-64,-60,-52,-52,-42,-42,-38,-36,-36,-34,-26,-24,-22,-12,-2,-2,4,6,44,44,48,54,62,62,64,74,78,82,86,86,90,90,94});
param0.add(new int[]{1,1,0,0,1,0,0,1,1,1});
param0.add(new int[]{9,15,19,29,30,39,40,61});
param0.add(new int[]{92,0,46,70,-60,-50,58,-56,8,-90,84,16,40,-62,50,78,26,-42,-40,98,-52,62,16,-62,-76,-70,-60,32,4,-68,52,-64,70,12,-10});
param0.add(new int[]{0,0,0,1,1,1,1});
param0.add(new int[]{32,96,63,93,53,1,22,19,50,74,6,94,81,85,4,86,88,75,94});
List<Integer> param1 = new ArrayList<>();
param1.add(8);
param1.add(36);
param1.add(21);
param1.add(29);
param1.add(36);
param1.add(5);
param1.add(4);
param1.add(21);
param1.add(5);
param1.add(18);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([5, 17, 25, 27, 29, 30, 34, 49, 72, 75, 90, 93, 93, 94], 8,),
([-70, -32, 62, 0, -10, 92, -94, -86, 52, 6, -26, -92, -10, 70, -82, 28, 86, 58, 86, -58, 84, -80, -18, -
92, -34, 6, 34, 36, 70, -50, -6, -54, 84, 22, 30, -96, -84, 72, 2, 26, -20, 4, 48, -98, 62, -28, -68], 36,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21,),
([34, 40, 92, 35, 29, 26, 12, 66, 7, 28, 86, 4, 35, 79, 1, 48, 41, 47, 15, 75, 45,
6, 3, 94, 39, 50, 20, 8, 58, 51, 83, 44, 53, 76, 19, 84, 68, 54, 36, 53], 29,),
([-98, -98, -92, -92, -88, -82, -74, -70, -68, -68, -64, -60, -52, -52, -42, -42, -38, -36, -36, -
34, -26, -24, -22, -12, -2, -2, 4, 6, 44, 44, 48, 54, 62, 62, 64, 74, 78, 82, 86, 86, 90, 90, 94], 36,),
([1, 1, 0, 0, 1, 0, 0, 1, 1, 1], 5,),
([9, 15, 19, 29, 30, 39, 40, 61], 4,),
([92, 0, 46, 70, -60, -50, 58, -56, 8, -90, 84, 16, 40, -62, 50, 78, 26, -42, -
40, 98, -52, 62, 16, -62, -76, -70, -60, 32, 4, -68, 52, -64, 70, 12, -10], 21,),
([0, 0, 0, 1, 1, 1, 1], 5,),
([32, 96, 63, 93, 53, 1, 22, 19, 50, 74,
6, 94, 81, 85, 4, 86, 88, 75, 94], 18,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success += 1
print("#Results: %i, %i" % (n_success, len(param)))
|
int main() {
int n_success = 0;
vector<vector<int>> param0 {{5,17,25,27,29,30,34,49,72,75,90,93,93,94},{-70,-32,62,0,-10,92,-94,-86,52,6,-26,-92,-10,70,-82,28,86,58,86,-58,84,-80,-18,-92,-34,6,34,36,70,-50,-6,-54,84,22,30,-96,-84,72,2,26,-20,4,48,-98,62,-28,-68},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{34,40,92,35,29,26,12,66,7,28,86,4,35,79,1,48,41,47,15,75,45,6,3,94,39,50,20,8,58,51,83,44,53,76,19,84,68,54,36,53},{-98,-98,-92,-92,-88,-82,-74,-70,-68,-68,-64,-60,-52,-52,-42,-42,-38,-36,-36,-34,-26,-24,-22,-12,-2,-2,4,6,44,44,48,54,62,62,64,74,78,82,86,86,90,90,94},{1,1,0,0,1,0,0,1,1,1},{9,15,19,29,30,39,40,61},{92,0,46,70,-60,-50,58,-56,8,-90,84,16,40,-62,50,78,26,-42,-40,98,-52,62,16,-62,-76,-70,-60,32,4,-68,52,-64,70,12,-10},{0,0,0,1,1,1,1},{32,96,63,93,53,1,22,19,50,74,6,94,81,85,4,86,88,75,94}};
vector<int> param1 {8,36,21,29,36,5,4,21,5,18};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON{
static double f_gold ( double side ) {
return ( 2 * ( Math . sqrt ( 3 ) ) * ( side * side ) ) ;
}
| import math
def f_gold ( side ) :
return ( 2 * ( math.sqrt ( 3 ) ) * ( side * side ) )
|
using namespace std;
double f_gold ( double side ) {
return ( 2 * ( sqrt ( 3 ) ) * ( side * side ) );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Double> param0 = new ArrayList<>();
param0.add(1449.255716877097);
param0.add(-8772.104874265995);
param0.add(2948.419328234334);
param0.add(-1184.220109553511);
param0.add(7422.825800698956);
param0.add(-5808.280006171851);
param0.add(829.8963781665169);
param0.add(-7368.438572511732);
param0.add(5572.033890611617);
param0.add(-3998.9441642787706);
for(int i = 0; i < param0.size(); ++i)
{
if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(1449.255716877097,),
(-8772.104874265995,),
(2948.419328234334,),
(-1184.220109553511,),
(7422.825800698956,),
(-5808.280006171851,),
(829.8963781665169,),
(-7368.438572511732,),
(5572.033890611617,),
(-3998.9441642787706,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001:
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<double> param0 {1449.255716877097,-8772.104874265995,2948.419328234334,-1184.220109553511,7422.825800698956,-5808.280006171851,829.8963781665169,-7368.438572511732,5572.033890611617,-3998.9441642787706};
for(int i = 0; i < param0.size(); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER{
static boolean f_gold ( String s , char c ) {
boolean oneSeen = false ;
int i = 0 , n = s . length ( ) ;
while ( i < n ) {
if ( s . charAt ( i ) == c ) {
if ( oneSeen == true ) return false ;
while ( i < n && s . charAt ( i ) == c ) i ++ ;
oneSeen = true ;
}
else i ++ ;
}
return true ;
}
| def f_gold ( s , c ) :
oneSeen = False
i = 0
n = len ( s )
while ( i < n ) :
if ( s [ i ] == c ) :
if ( oneSeen == True ) :
return False
while ( i < n and s [ i ] == c ) :
i = i + 1
oneSeen = True
else :
i = i + 1
return True
|
using namespace std;
bool f_gold ( string s, char c ) {
bool oneSeen = false;
int i = 0, n = s . length ( );
while ( i < n ) {
if ( s [ i ] == c ) {
if ( oneSeen == true ) return false;
while ( i < n && s [ i ] == c ) i ++;
oneSeen = true;
}
else i ++;
}
return true;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("gILrzLimS");
param0.add("307471222");
param0.add("110");
param0.add("GcAB");
param0.add("113");
param0.add("011110010");
param0.add("wcwob");
param0.add("74571582216153");
param0.add("100000011");
param0.add("ryPErkzY");
List<Character> param1 = new ArrayList<>();
param1.add('m');
param1.add('2');
param1.add('0');
param1.add('v');
param1.add('3');
param1.add('0');
param1.add('w');
param1.add('1');
param1.add('0');
param1.add('q');
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
('gILrzLimS','m',),
('307471222','2',),
('110','0',),
('GcAB','v',),
('113','3',),
('011110010','0',),
('wcwob','w',),
('74571582216153','1',),
('100000011','0',),
('ryPErkzY','q',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"gILrzLimS","307471222","110","GcAB","113","011110010","wcwob","74571582216153","100000011","ryPErkzY"};
vector<char> param1 {'m','2','0','v','3','0','w','1','0','q'};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO{
static long f_gold ( long a [ ] , int n ) {
Arrays . sort ( a ) ;
int i , j ;
Vector < Long > s = new Vector < > ( ) ;
for ( i = 0 , j = n - 1 ;
i < j ;
i ++ , j -- ) s . add ( ( a [ i ] + a [ j ] ) ) ;
long mini = Collections . min ( s ) ;
long maxi = Collections . max ( s ) ;
return Math . abs ( maxi - mini ) ;
}
| def f_gold ( a , n ) :
a.sort ( ) ;
s = [ ] ;
i = 0 ;
j = n - 1 ;
while ( i < j ) :
s.append ( ( a [ i ] + a [ j ] ) ) ;
i += 1 ;
j -= 1 ;
mini = min ( s ) ;
maxi = max ( s ) ;
return abs ( maxi - mini ) ;
| null |
public static void main(String args[]) {
int n_success = 0;
List<long [ ]> param0 = new ArrayList<>();
param0.add(new long[]{11L,12L,14L,15L,20L,21L,28L,28L,30L,33L,39L,39L,42L,43L,44L,45L,48L,53L,53L,58L,59L,67L,68L,70L,70L,72L,74L,76L,76L,81L,87L,91L});
param0.add(new long[]{28L,-42L,-14L,0L,-56L,42L,14L,52L,58L,58L,92L,-62L,-14L,-12L,-84L,-30L,-94L,-70L,18L,-44L,88L,-60L});
param0.add(new long[]{0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L});
param0.add(new long[]{90L,8L,24L,31L,70L,61L,78L,67L,49L,28L,31L,4L,64L,66L,21L,61L,6L,49L,10L,46L,34L,31L,48L,28L,78L,70L,44L,9L,38L,2L,4L,36L,76L,37L,32L,97L,46L,85L,76L});
param0.add(new long[]{-98L,-78L,-68L,-58L,-26L,-10L,32L,42L,90L,96L});
param0.add(new long[]{1L,0L,0L,1L,0L,1L,1L,0L,0L,1L,0L,1L,1L,1L,1L,0L,1L,1L,0L,1L,1L,0L,0L,0L,1L,0L,1L,0L,1L,0L,0L,0L,1L,1L,0L,1L});
param0.add(new long[]{8L,17L,23L,25L,29L,32L,35L,35L,52L,56L,57L,59L,70L,71L,77L,88L,96L});
param0.add(new long[]{62L,-10L,82L,18L,46L});
param0.add(new long[]{0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L});
param0.add(new long[]{42L,71L,12L,33L,3L,58L,60L,60L,5L,52L,46L,53L,43L,50L,98L,53L,16L,82L,39L,93L,70L,13L,93L,69L,7L,92L,76L,11L,61L,48L,27L,28L,20L,76L,44L,24L,52L,56L,21L,82L,49L,5L,61L,76L,67L});
List<Integer> param1 = new ArrayList<>();
param1.add(31);
param1.add(11);
param1.add(19);
param1.add(37);
param1.add(8);
param1.add(35);
param1.add(16);
param1.add(3);
param1.add(20);
param1.add(40);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([11, 12, 14, 15, 20, 21, 28, 28, 30, 33, 39, 39, 42, 43, 44, 45, 48, 53, 53, 58, 59, 67, 68, 70, 70, 72, 74, 76, 76, 81, 87, 91],31,),
([28, -42, -14, 0, -56, 42, 14, 52, 58, 58, 92, -62, -14, -12, -84, -30, -94, -70, 18, -44, 88, -60],11,),
([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],19,),
([90, 8, 24, 31, 70, 61, 78, 67, 49, 28, 31, 4, 64, 66, 21, 61, 6, 49, 10, 46, 34, 31, 48, 28, 78, 70, 44, 9, 38, 2, 4, 36, 76, 37, 32, 97, 46, 85, 76],37,),
([-98, -78, -68, -58, -26, -10, 32, 42, 90, 96],8,),
([1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1],35,),
([8, 17, 23, 25, 29, 32, 35, 35, 52, 56, 57, 59, 70, 71, 77, 88, 96],16,),
([62, -10, 82, 18, 46],3,),
([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],20,),
([42, 71, 12, 33, 3, 58, 60, 60, 5, 52, 46, 53, 43, 50, 98, 53, 16, 82, 39, 93, 70, 13, 93, 69, 7, 92, 76, 11, 61, 48, 27, 28, 20, 76, 44, 24, 52, 56, 21, 82, 49, 5, 61, 76, 67],40,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
PROGRAM_TO_CHECK_IF_A_MATRIX_IS_SYMMETRIC |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_TO_CHECK_IF_A_MATRIX_IS_SYMMETRIC{
static boolean f_gold ( int mat [ ] [ ] , int N ) {
for ( int i = 0 ;
i < N ;
i ++ ) for ( int j = 0 ;
j < N ;
j ++ ) if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) return false ;
return true ;
}
| def f_gold ( mat , N ) :
for i in range ( N ) :
for j in range ( N ) :
if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) :
return False
return True
| null |
public static void main(String args[]) {
int n_success = 0;
List<int [ ] [ ]> param0 = new ArrayList<>();
param0.add(new int[][]{new int[]{29}});
param0.add(new int[][]{new int[]{ 1, 3, 5 }, new int[]{ 3, 2, 4 }, new int[]{ 5, 4, 1 }});
param0.add(new int[][]{new int[]{ 1, 2, 5 }, new int[]{ 3, 2, 4 }, new int[]{ 5, 4, 1 }});
param0.add(new int[][]{new int[]{32,53,61,4,94,83,17,81,12,79,93,11,91,14,15},new int[]{13,34,5,70,47,93,43,97,24,44,49,93,33,2,34},new int[]{94,82,63,86,67,80,10,15,76,76,39,51,15,91,20},new int[]{71,90,63,91,53,14,13,78,84,44,96,39,66,80,82},new int[]{60,33,64,97,47,93,89,32,10,64,77,3,60,87,26},new int[]{69,81,93,32,34,95,76,38,85,22,30,53,84,86,2},new int[]{71,38,57,33,49,92,28,63,54,6,62,95,36,74,19},new int[]{6,34,8,6,41,89,15,22,4,73,86,56,18,24,99},new int[]{67,18,89,84,39,89,61,77,78,94,44,28,30,51,33},new int[]{82,64,52,28,73,14,69,99,54,49,7,44,60,1,51},new int[]{99,38,66,68,74,99,59,98,62,39,63,32,21,85,23},new int[]{15,1,29,94,19,33,88,70,10,46,47,55,18,71,10},new int[]{92,59,34,42,98,91,42,67,7,15,35,53,1,14,90},new int[]{22,84,62,36,99,16,63,6,22,7,95,17,80,50,59},new int[]{42,40,14,73,80,53,8,91,78,59,66,88,72,71,63}});
param0.add(new int[][]{new int[]{93,91,59,11,73,34,33,29,78,95,52,61,39,63,91,82,75,35,18,71,19,42,64},new int[]{92,7,2,46,32,22,94,78,67,73,52,15,70,89,48,40,60,4,21,67,60,67,39},new int[]{94,67,26,74,69,58,14,10,9,3,75,67,48,38,39,41,43,78,67,6,46,78,16},new int[]{25,44,27,86,54,56,75,43,59,83,83,80,94,72,94,56,8,51,29,14,12,13,12},new int[]{78,10,44,59,8,24,37,43,89,8,64,77,67,73,40,74,46,83,92,18,82,72,8},new int[]{59,36,96,21,3,88,16,83,55,22,22,77,12,60,92,72,9,84,79,68,24,48,45},new int[]{6,64,87,15,30,84,27,27,98,97,58,10,73,72,78,1,74,4,59,82,94,41,90},new int[]{43,14,29,73,37,22,88,99,36,95,58,15,61,7,99,91,42,98,25,64,44,6,4},new int[]{66,14,4,35,77,93,34,26,56,90,68,78,75,3,87,8,44,90,78,5,58,86,78},new int[]{12,67,94,20,3,33,77,18,75,26,7,90,3,1,17,12,73,81,82,23,91,2,27},new int[]{55,15,44,69,95,49,63,35,19,53,92,2,52,20,59,3,8,40,30,12,49,17,66},new int[]{23,39,27,57,19,44,66,32,33,43,23,14,80,57,98,57,58,62,40,44,47,84,46},new int[]{53,29,49,53,9,73,25,47,81,50,71,16,37,18,39,78,56,82,8,57,89,20,57},new int[]{1,88,13,75,52,97,30,81,57,5,22,51,79,74,1,46,79,42,42,93,64,21,79},new int[]{99,69,19,14,15,51,83,91,16,83,53,55,23,36,18,45,88,71,89,45,7,69,88},new int[]{84,85,20,74,87,46,33,15,34,79,5,9,91,64,60,28,9,50,36,9,31,45,55},new int[]{78,15,41,66,63,96,27,64,60,56,71,14,60,93,40,20,51,5,82,72,50,71,88},new int[]{60,86,20,27,20,6,8,79,22,35,42,77,92,20,93,69,3,27,69,60,20,23,96},new int[]{12,55,49,96,80,27,65,51,76,77,72,44,29,39,16,5,43,57,97,20,36,96,48},new int[]{50,2,12,39,53,63,12,34,34,12,17,6,30,86,37,87,80,26,48,40,31,46,66},new int[]{67,88,91,37,17,94,68,59,82,40,27,95,12,31,28,26,13,82,17,41,32,22,99},new int[]{80,50,3,22,59,95,16,66,40,56,86,56,78,14,62,69,27,47,80,68,87,74,95},new int[]{17,27,51,59,59,79,24,54,99,13,14,70,70,52,96,85,21,30,54,86,19,59,47}});
param0.add(new int[][]{new int[]{1,88,52,21,60,48,74,12,87,76,80,55,3,66,6,22,67,73,21,37,33,1,65,71,37,40,63,52,76,32,27,42,52},new int[]{29,46,66,46,83,25,99,65,57,28,18,63,18,24,51,29,19,31,95,86,29,20,66,68,46,19,7,42,16,52,33,39,43},new int[]{84,46,4,15,43,30,39,43,14,70,86,18,46,79,21,76,91,61,75,95,65,25,89,81,71,32,48,89,82,35,90,76,78},new int[]{8,22,76,32,46,13,33,1,92,67,80,50,32,10,1,71,47,7,62,52,68,4,57,89,5,71,55,67,57,99,75,76,39},new int[]{80,43,71,85,10,82,29,26,30,65,38,15,89,19,28,97,15,78,61,38,99,32,78,77,41,85,76,15,88,84,63,1,43},new int[]{14,2,8,11,20,44,59,17,12,84,74,21,67,4,88,54,27,95,74,68,76,79,90,34,1,59,52,45,18,73,50,34,54},new int[]{54,52,30,4,53,24,50,45,61,90,7,45,85,78,34,10,11,45,49,40,51,71,99,28,62,15,38,49,1,50,14,13,22},new int[]{57,85,41,37,82,73,95,5,31,65,86,57,15,90,29,54,41,91,34,85,76,35,55,98,33,42,87,8,83,99,91,30,84},new int[]{92,74,42,25,14,65,30,13,89,12,24,70,73,38,87,52,70,35,28,5,42,84,80,20,22,51,87,76,47,97,39,28,68},new int[]{47,72,21,48,50,49,76,62,35,80,72,5,76,90,37,73,41,92,40,58,72,2,50,86,94,80,48,24,91,33,70,94,42},new int[]{26,78,95,16,21,2,59,8,7,90,21,18,82,1,91,8,92,2,22,20,78,35,60,31,41,67,72,90,24,15,38,79,99},new int[]{38,81,95,66,5,2,2,90,38,37,10,91,72,74,99,24,24,95,4,40,14,26,12,27,6,27,14,22,49,20,3,73,80},new int[]{73,49,96,98,25,27,91,2,22,66,48,53,1,54,39,10,12,37,46,17,3,85,76,59,27,15,45,41,67,5,34,63,98},new int[]{85,13,89,14,82,61,3,3,45,96,18,32,96,44,93,37,99,27,40,24,56,36,99,6,71,78,17,61,27,44,70,3,39},new int[]{35,66,83,87,17,9,9,35,9,12,67,85,57,92,97,98,43,22,60,30,31,80,99,65,73,65,87,37,82,4,10,27,2},new int[]{55,68,40,97,8,15,61,7,94,24,20,55,5,7,2,74,77,21,3,53,14,53,80,63,54,72,24,78,50,6,88,93,26},new int[]{34,44,69,98,98,77,67,5,86,85,91,88,39,53,8,68,36,70,95,69,6,2,1,62,29,87,18,3,80,31,22,8,22},new int[]{77,29,80,10,46,34,56,59,33,78,96,23,15,25,26,12,64,19,49,19,96,74,91,23,56,63,52,64,18,99,50,13,66},new int[]{36,22,84,7,12,79,93,8,23,13,97,5,83,7,68,9,19,89,65,68,82,71,83,52,87,28,93,6,44,27,46,4,87},new int[]{30,45,58,62,54,24,96,75,30,90,80,57,53,70,89,84,10,1,44,59,11,76,20,76,60,44,16,79,62,90,56,75,3},new int[]{2,44,83,96,87,44,24,13,1,39,5,13,8,51,49,49,48,40,30,44,92,93,53,36,84,69,71,30,38,7,75,75,84},new int[]{33,79,68,51,10,38,40,3,24,2,23,51,59,42,19,8,26,82,44,48,73,36,9,97,11,41,62,88,24,32,33,81,90},new int[]{45,33,2,66,78,21,87,22,65,32,29,69,36,25,22,69,52,67,24,97,92,47,85,80,11,6,51,83,61,82,44,10,76},new int[]{33,64,15,76,50,5,1,38,98,12,30,11,73,44,46,71,81,52,63,26,27,97,39,5,73,87,94,36,1,52,8,1,74},new int[]{7,38,59,60,67,7,8,34,40,42,96,32,69,91,13,55,12,74,1,85,7,10,81,37,48,65,42,13,23,57,92,19,32},new int[]{10,82,8,16,35,58,81,48,48,23,26,55,23,50,23,54,56,45,71,12,22,17,77,48,78,71,50,83,59,39,71,60,91},new int[]{17,34,75,9,39,67,23,40,4,57,16,59,85,25,5,1,96,20,11,97,32,83,39,45,57,82,36,42,88,96,9,24,79},new int[]{47,46,86,98,59,10,2,42,7,1,9,42,26,79,57,22,87,3,11,56,86,62,40,78,16,98,5,53,72,66,11,45,62},new int[]{87,65,74,6,67,83,29,79,87,49,8,89,88,52,12,1,4,94,98,60,43,97,44,30,40,13,30,19,20,38,63,68,23},new int[]{89,11,31,76,41,98,57,30,80,96,82,8,95,36,77,82,62,35,27,6,64,74,37,47,44,71,80,66,43,57,47,89,90},new int[]{90,18,20,92,67,57,1,74,95,84,56,8,48,58,64,71,57,51,99,40,84,3,63,11,58,76,46,12,8,45,86,84,15},new int[]{49,31,46,94,40,31,20,2,6,78,26,97,87,89,37,92,99,71,59,66,64,17,91,48,66,12,80,32,18,62,16,5,24},new int[]{49,75,64,46,42,88,78,1,90,26,68,90,4,96,16,80,40,84,81,49,84,96,42,11,62,93,55,27,85,29,32,41,12}});
param0.add(new int[][]{new int[]{97,17,59,40,18,53,65,84,85,42,38,32,22,61,89,32,31,99,58,77,80,56,83,41,15,46,97,59,65,51,13,24,87,93,16,49,32,16,43,88,53,21,33,59,60},new int[]{27,29,33,50,32,46,28,51,26,48,58,47,63,47,70,19,79,81,98,65,19,67,81,46,78,75,80,54,94,91,82,87,49,27,56,44,75,77,44,23,90,42,64,34,99},new int[]{43,84,88,96,26,2,13,3,12,27,14,74,38,76,40,75,50,66,95,62,10,6,55,42,61,22,47,19,74,47,91,92,10,45,60,17,79,43,12,84,64,80,47,84,50},new int[]{27,22,91,13,59,69,81,98,22,94,67,71,15,71,3,29,6,49,91,65,54,34,58,8,89,15,38,11,73,27,77,76,11,58,35,44,57,87,21,28,7,77,95,35,81},new int[]{88,86,74,80,6,12,1,16,98,63,58,91,5,83,11,37,63,75,8,53,16,95,11,65,47,81,49,25,55,26,34,2,16,31,22,86,32,70,2,71,11,10,16,51,1},new int[]{35,39,74,59,99,77,78,76,44,3,38,75,98,25,87,72,64,27,50,4,62,88,60,63,13,31,64,14,84,86,76,67,96,5,96,76,92,91,87,68,69,45,9,9,93},new int[]{57,81,83,66,96,54,15,2,78,96,49,90,12,90,36,76,97,90,87,13,37,40,92,34,54,83,89,99,85,70,16,24,51,16,94,28,74,17,84,48,24,80,20,55,26},new int[]{29,22,20,96,29,87,57,98,76,83,17,86,10,82,69,1,90,89,77,39,46,12,20,6,18,2,73,33,54,1,75,22,68,21,29,20,69,51,27,97,18,22,41,37,18},new int[]{21,6,28,2,79,11,11,26,91,43,87,56,8,63,46,59,84,98,26,65,63,88,53,41,93,11,8,30,79,82,25,64,60,11,48,51,73,32,12,42,23,88,83,74,82},new int[]{15,94,47,98,42,39,13,42,23,45,22,60,27,52,69,11,40,6,67,32,74,40,20,18,98,82,2,13,56,46,62,77,47,59,90,64,12,12,12,23,18,24,47,91,70},new int[]{40,45,67,62,58,95,96,92,54,9,34,60,27,27,60,25,83,78,40,83,76,95,36,25,58,61,52,6,14,7,93,90,34,36,51,75,76,81,87,31,82,53,61,26,87},new int[]{50,8,23,75,95,19,22,41,81,49,57,91,31,17,17,98,99,11,84,60,4,58,3,72,36,43,83,20,5,90,86,55,26,50,74,88,52,96,61,89,15,53,34,16,47},new int[]{64,74,70,61,41,85,45,2,49,19,38,87,17,6,54,48,44,59,34,15,91,22,35,83,2,44,20,45,62,61,97,81,56,56,2,12,82,23,19,54,69,21,60,20,80},new int[]{6,59,90,96,99,23,54,18,42,85,48,13,28,14,94,37,99,47,53,41,40,22,35,77,9,80,77,18,53,73,8,19,80,75,43,92,32,19,7,24,23,7,40,79,23},new int[]{79,72,73,91,22,22,20,21,14,85,22,33,78,13,86,90,85,15,75,12,6,32,24,17,98,88,25,60,63,86,23,86,84,45,76,81,53,27,65,45,56,1,37,78,43},new int[]{90,67,47,22,16,72,11,25,17,50,89,84,15,7,22,32,89,15,10,5,81,6,3,31,43,72,33,23,43,12,10,33,13,48,6,24,27,92,63,99,24,55,10,20,22},new int[]{45,52,19,18,80,74,48,70,47,13,8,88,84,89,5,68,90,35,15,35,75,33,40,68,60,21,67,96,35,1,18,6,19,31,48,60,56,49,8,70,87,68,12,15,51},new int[]{68,10,30,46,76,42,39,8,59,61,70,81,87,50,7,97,53,7,96,93,30,77,54,38,82,30,85,30,18,62,98,29,49,45,51,20,31,47,83,13,77,45,70,57,87},new int[]{28,1,55,6,63,56,56,97,48,21,77,81,95,80,48,64,45,45,17,72,42,89,64,95,92,52,40,64,8,51,66,73,50,20,68,99,60,54,64,43,32,9,30,49,1},new int[]{49,96,37,62,18,86,55,83,16,85,49,64,57,39,68,15,12,80,64,93,89,77,20,34,19,75,93,92,19,82,49,29,20,28,8,40,46,56,99,69,41,89,84,71,28},new int[]{25,56,58,92,77,94,72,67,80,80,87,10,6,83,38,90,18,91,20,6,81,30,16,25,51,16,70,37,64,71,60,96,55,52,56,17,27,3,92,98,29,4,27,84,76},new int[]{99,74,14,56,22,24,90,11,84,72,29,73,38,70,92,90,9,45,26,89,52,6,21,60,59,21,91,11,20,17,98,51,64,55,86,16,85,77,98,54,54,56,7,96,13},new int[]{96,83,88,44,40,69,28,81,40,94,62,59,50,11,15,60,10,20,30,35,99,96,59,51,58,12,46,7,64,18,28,11,98,35,76,76,15,54,40,19,40,53,10,72,22},new int[]{21,20,69,1,27,36,33,90,63,14,86,32,11,93,93,74,65,49,84,94,34,61,56,95,39,50,30,14,35,25,53,56,29,40,65,53,99,64,21,81,14,10,74,1,12},new int[]{79,15,42,97,70,30,28,31,17,97,85,50,51,87,67,49,92,28,81,14,80,89,3,69,70,95,68,67,60,68,99,44,74,55,69,78,34,2,79,34,4,12,13,73,4},new int[]{31,44,56,6,71,62,82,94,22,78,12,48,46,72,25,42,75,55,25,80,81,54,92,68,98,26,6,52,85,64,58,57,72,68,75,34,2,83,39,67,73,95,76,12,73},new int[]{39,32,69,72,32,22,88,51,91,41,50,17,45,59,44,32,48,30,28,83,18,20,74,11,60,34,39,38,17,49,87,71,6,56,24,60,72,4,81,66,22,51,51,16,85},new int[]{40,8,71,64,71,4,25,59,70,82,79,85,16,55,24,11,71,42,3,41,22,26,4,16,63,17,19,79,7,66,55,45,87,72,1,17,39,8,57,85,50,55,26,95,53},new int[]{33,30,94,36,21,41,37,21,29,8,52,39,69,14,85,38,15,30,71,27,72,35,41,53,61,95,45,30,91,1,33,78,7,62,22,51,69,85,55,31,54,27,44,79,87},new int[]{60,53,17,94,36,66,2,97,20,10,69,58,81,47,63,39,62,82,60,73,74,32,63,39,18,24,2,16,79,51,84,54,56,62,71,82,89,77,60,75,72,91,20,64,98},new int[]{68,79,77,49,86,26,52,61,9,5,30,4,31,14,25,28,15,67,95,77,9,66,23,48,33,28,63,8,36,2,24,22,79,24,69,91,97,53,85,81,58,35,55,26,46},new int[]{25,85,11,24,78,24,73,2,6,25,81,3,5,32,48,55,93,36,36,25,56,28,35,13,79,60,27,75,6,56,27,42,94,97,38,55,19,86,13,68,6,29,94,89,61},new int[]{15,12,21,82,25,38,69,76,49,29,62,42,22,95,48,28,23,53,16,60,40,97,39,68,6,47,11,10,31,71,14,59,6,58,18,33,30,84,92,1,57,81,59,26,53},new int[]{18,24,18,39,79,36,90,32,84,70,91,72,39,86,37,38,71,73,34,98,28,63,73,30,41,95,8,8,78,9,98,25,9,64,3,96,27,74,66,82,59,40,24,23,41},new int[]{53,49,66,61,64,34,27,64,60,35,53,72,71,58,13,76,77,53,17,57,60,15,78,19,35,18,17,84,25,37,23,23,75,46,84,7,87,62,23,91,85,21,58,96,50},new int[]{28,66,93,9,35,61,68,86,23,6,84,69,12,59,65,39,41,3,42,43,85,66,96,29,47,92,97,26,15,45,90,73,61,85,20,49,27,65,9,58,51,38,84,19,44},new int[]{11,78,89,76,45,7,3,80,62,1,15,44,11,1,3,22,43,6,22,50,28,78,96,29,5,35,11,1,7,3,86,31,3,17,18,79,99,80,94,99,17,79,42,27,65},new int[]{30,30,69,65,4,11,58,13,10,88,84,18,87,42,99,44,62,91,79,24,30,65,41,67,24,32,63,4,98,1,21,8,46,12,1,22,78,89,28,72,64,40,89,55,87},new int[]{60,41,80,59,68,36,33,94,45,75,50,47,77,44,68,88,33,97,76,21,97,46,97,73,31,62,94,16,12,54,9,35,53,43,70,89,56,64,28,87,29,86,58,24,20},new int[]{27,97,19,90,38,60,3,23,59,91,91,74,24,56,52,41,66,98,22,66,28,88,38,86,67,58,37,2,57,87,77,79,97,45,53,77,84,7,77,39,68,63,46,91,96},new int[]{2,15,5,3,16,49,90,6,35,38,84,86,64,85,32,1,48,23,18,17,31,93,54,77,60,66,73,96,86,18,18,83,63,31,29,88,97,83,80,51,32,21,30,7,38},new int[]{12,59,92,14,71,17,23,77,20,5,6,13,3,53,31,3,8,71,50,71,75,88,59,21,20,93,74,49,80,74,38,33,69,59,12,8,70,87,48,67,38,93,34,4,7},new int[]{85,74,96,89,77,85,83,59,8,61,50,84,8,16,48,62,56,28,74,21,44,79,70,41,35,56,85,17,26,63,74,34,71,32,4,10,79,56,35,33,25,47,11,34,36},new int[]{17,12,80,97,26,74,13,82,85,87,87,36,69,45,79,88,12,83,97,89,38,77,88,67,76,66,20,40,34,22,15,97,66,35,98,91,31,77,53,94,90,88,57,65,38},new int[]{38,86,10,46,27,42,2,58,19,62,11,14,57,33,44,18,29,30,3,32,15,49,87,60,98,46,80,50,6,80,20,49,28,26,56,48,6,53,59,80,33,12,78,39,2}});
param0.add(new int[][]{new int[]{19,98,9,31,79,4,63,46,32,81,5,39,97,92,13,68,28,13,92,57,99,24,9,7,22,3,72,4,42,2,53,46,6,57,86,3,17,74,88,60,39,28,45,94},new int[]{92,4,82,39,3,65,97,16,46,94,40,55,97,36,60,95,36,36,47,48,10,22,28,36,32,13,34,63,65,80,91,22,31,48,93,22,71,55,40,4,78,43,81,65},new int[]{2,82,3,56,85,77,49,27,60,67,69,37,48,66,94,70,27,77,5,52,58,25,91,62,16,48,71,52,67,15,81,67,61,66,69,24,95,44,71,25,20,89,66,66},new int[]{10,50,70,11,93,30,85,27,42,36,45,97,27,56,37,70,39,8,76,47,67,54,9,43,12,40,3,97,77,12,37,7,70,41,4,87,4,67,38,27,11,93,93,37},new int[]{58,8,32,78,84,88,93,60,65,10,19,39,45,48,18,71,88,86,16,6,71,82,99,49,88,80,19,83,65,22,31,14,30,95,51,32,43,17,92,98,62,17,61,6},new int[]{93,9,31,30,59,73,10,64,33,3,93,53,41,78,15,10,80,97,92,39,24,79,13,83,11,13,40,59,96,54,61,90,59,80,17,13,13,15,11,1,35,82,44,58},new int[]{1,86,52,66,94,53,82,65,3,74,48,15,67,77,62,88,30,43,32,99,35,55,15,34,98,82,99,23,32,50,50,83,93,40,44,12,68,22,43,79,85,42,99,19},new int[]{72,79,4,25,51,60,37,26,73,44,55,50,31,70,25,60,6,19,5,69,59,54,5,49,20,54,77,73,78,13,97,48,87,94,63,82,82,43,78,12,39,91,57,93},new int[]{71,79,83,9,84,62,22,36,96,3,82,16,3,76,88,58,75,23,33,68,61,14,38,73,98,53,61,33,83,67,56,61,38,27,40,6,96,48,18,32,84,36,79,23},new int[]{14,85,46,3,7,17,68,58,50,99,70,96,99,46,59,22,72,91,28,2,59,54,66,63,27,7,12,8,9,86,18,92,38,34,70,95,15,61,68,5,87,77,61,27},new int[]{45,58,95,19,30,63,94,5,62,75,74,41,65,79,85,86,96,26,77,69,78,54,55,68,8,9,95,3,27,9,93,98,29,74,77,65,40,78,96,80,56,26,33,95},new int[]{72,25,97,94,1,1,27,68,37,24,44,88,6,39,65,93,88,77,92,15,64,31,86,76,17,26,77,53,41,45,81,26,51,92,38,50,42,42,32,85,9,80,5,38},new int[]{9,70,79,82,69,41,74,80,27,40,53,23,92,75,4,68,80,28,29,58,17,70,18,13,64,60,61,35,89,55,35,42,11,76,54,38,32,78,25,97,98,59,70,57},new int[]{41,4,7,99,19,31,20,21,25,12,98,17,96,1,79,65,63,25,71,34,44,70,1,79,77,21,77,40,17,17,76,34,39,75,14,79,87,4,33,25,41,86,32,1},new int[]{63,88,53,7,43,37,70,15,34,63,65,72,35,76,46,24,1,77,79,34,37,13,16,36,70,98,76,54,44,38,47,49,36,64,63,24,68,89,11,46,3,7,54,11},new int[]{65,41,55,59,26,54,14,47,16,12,93,59,32,10,93,83,55,73,89,19,39,9,17,91,8,87,55,77,41,8,13,77,55,81,20,69,25,16,43,82,59,73,35,10},new int[]{99,19,13,89,69,81,34,43,87,67,10,32,97,71,13,38,11,15,87,83,8,49,88,66,30,44,54,97,83,31,24,86,39,93,34,61,4,50,53,81,28,38,4,16},new int[]{42,43,64,31,79,9,68,83,34,88,11,35,28,92,11,38,98,15,61,8,65,24,50,10,17,78,1,11,41,3,17,64,75,88,33,32,25,91,47,43,81,81,57,40},new int[]{68,82,75,41,40,76,37,74,15,58,58,11,98,99,8,31,15,93,79,64,31,7,94,89,79,77,74,19,49,15,3,18,22,96,95,74,45,21,34,93,74,28,54,10},new int[]{32,78,32,52,30,56,72,19,22,88,28,41,43,69,73,72,59,56,82,40,77,70,16,18,42,81,2,82,64,11,55,2,2,57,18,86,16,27,17,54,17,6,97,13},new int[]{6,90,83,19,61,90,86,11,86,96,7,86,6,15,38,41,56,18,35,98,45,29,69,88,32,94,5,44,98,50,82,21,22,61,39,85,99,5,33,71,24,39,72,15},new int[]{70,5,87,48,20,76,21,86,89,12,66,30,7,58,18,60,18,92,48,34,72,83,6,45,60,71,84,24,93,92,69,17,62,33,62,6,3,74,54,11,87,46,4,7},new int[]{26,97,35,28,41,50,99,39,80,10,71,7,25,69,90,30,11,71,39,26,57,55,22,12,64,86,66,60,62,52,62,76,65,15,40,7,55,37,86,97,33,29,19,69},new int[]{14,9,5,35,85,28,45,2,6,31,32,75,59,14,74,59,1,55,31,59,8,66,99,95,12,31,99,96,81,57,8,19,53,11,57,69,59,28,2,11,64,18,47,53},new int[]{5,19,5,40,83,76,92,48,99,23,55,34,87,97,58,77,98,93,30,61,82,56,99,5,4,69,39,79,73,50,72,74,22,88,24,73,22,34,48,76,81,4,57,63},new int[]{30,65,97,91,78,4,35,33,51,12,68,98,78,2,91,95,33,91,45,56,28,98,30,34,1,52,13,82,40,65,9,70,72,72,88,49,25,26,26,40,34,8,2,82},new int[]{16,92,72,63,18,39,42,83,32,62,32,85,93,69,84,22,27,1,13,97,6,13,78,72,67,37,76,8,93,20,62,23,68,25,32,58,25,69,10,64,31,4,57,71},new int[]{34,21,83,7,98,58,33,42,53,85,55,50,38,81,46,81,15,8,49,53,37,83,93,38,97,28,61,97,7,99,72,7,59,21,25,67,32,48,55,75,85,96,66,23},new int[]{45,10,78,55,60,9,83,3,32,54,87,83,76,23,14,36,48,67,10,86,68,79,52,99,49,44,5,92,91,15,94,8,55,20,77,6,1,46,42,82,70,49,90,34},new int[]{57,17,89,63,61,59,92,79,4,91,33,20,21,41,74,44,32,64,37,61,26,22,40,59,50,77,96,73,39,16,98,74,88,10,45,90,34,63,68,93,86,89,11,84},new int[]{88,95,25,69,31,57,87,53,81,66,56,66,91,22,81,53,57,33,5,13,17,43,84,84,92,12,84,71,56,69,29,25,11,41,11,96,38,82,62,79,81,24,44,19},new int[]{37,5,4,1,94,17,43,50,30,64,82,36,1,69,82,29,81,85,66,36,62,20,83,54,82,13,47,75,97,28,55,43,44,21,94,53,47,96,87,25,96,41,31,13},new int[]{6,1,8,56,62,87,69,93,22,64,69,17,18,45,54,39,65,95,88,54,16,69,32,26,35,53,43,41,24,44,79,23,75,94,45,94,55,70,69,64,14,30,4,6},new int[]{39,18,51,56,89,57,59,61,17,97,38,76,81,89,37,17,91,31,14,53,36,86,5,40,70,69,88,22,14,25,84,65,49,35,52,92,29,58,72,82,31,21,6,9},new int[]{30,18,30,84,60,55,10,13,41,2,5,33,65,37,61,58,12,41,28,82,36,94,42,54,54,38,85,71,69,58,99,79,9,48,18,12,27,78,77,94,36,49,9,34},new int[]{76,50,89,50,22,5,15,18,77,15,89,98,66,21,87,81,61,4,48,1,7,61,53,95,35,21,60,76,5,3,59,76,10,46,50,62,59,94,17,56,44,19,18,26},new int[]{28,49,32,20,85,46,58,16,76,1,46,32,14,14,83,65,25,42,13,53,68,60,84,68,41,6,26,91,22,29,40,66,36,87,19,16,88,34,63,25,75,69,84,14},new int[]{21,90,44,52,79,85,80,75,48,78,85,62,80,2,42,66,28,5,8,73,81,83,42,26,95,98,93,74,58,11,97,95,22,54,93,41,85,40,12,16,43,26,94,87},new int[]{97,88,6,98,19,23,25,93,16,2,93,58,97,18,44,54,9,2,55,5,20,4,5,17,5,50,72,96,25,25,89,42,31,92,47,79,51,55,60,27,39,78,13,96},new int[]{35,48,14,36,53,39,5,72,10,2,95,39,25,34,79,56,81,22,33,70,58,82,30,63,67,95,12,10,62,63,36,56,6,31,33,74,63,38,26,16,24,24,73,25},new int[]{23,54,67,32,74,47,35,86,14,25,59,54,79,94,95,78,8,8,95,3,97,12,32,96,21,74,41,42,57,90,77,62,73,97,95,56,12,56,58,23,89,93,33,18},new int[]{41,12,62,58,4,13,31,22,39,58,30,34,95,6,90,49,45,77,93,50,26,39,86,52,4,35,5,28,21,73,10,55,33,40,5,73,81,33,81,70,91,91,78,5},new int[]{81,4,71,37,78,13,29,98,98,39,48,89,35,62,20,95,59,44,54,89,58,93,52,50,46,98,10,19,11,40,40,36,87,55,44,89,44,45,85,63,91,2,6,99},new int[]{73,20,55,97,47,93,27,1,13,67,65,84,58,90,76,70,50,9,55,36,20,10,10,31,84,89,45,31,9,88,4,45,24,78,72,91,53,94,78,40,58,82,77,29}});
param0.add(new int[][]{new int[]{91,36,24,57},new int[]{88,3,45,19},new int[]{49,9,86,22},new int[]{55,16,72,81}});
param0.add(new int[][]{new int[]{27,35,35,78,52,41,22,22,75,96,91,20,46,34,83,62,10,13,92,8,86,54,92,16,17,40,49,62,19,49,38,82,62,37,93,15,85},new int[]{61,56,7,36,86,37,70,40,78,17,1,44,66,42,45,46,55,21,5,84,41,86,40,87,65,13,88,89,92,68,23,4,40,61,58,98,84},new int[]{17,30,92,24,95,96,38,59,63,93,64,71,52,54,15,56,70,54,81,97,61,44,1,63,59,3,13,11,61,12,82,80,33,41,4,88,47},new int[]{46,54,71,9,83,93,70,36,58,86,86,38,43,67,25,78,5,18,28,30,70,95,18,25,34,72,92,71,63,98,25,65,59,66,98,96,63},new int[]{12,44,54,26,54,86,31,97,22,48,8,80,28,78,68,24,83,25,47,17,66,91,8,62,37,5,46,4,59,70,29,8,48,74,99,61,53},new int[]{74,64,16,76,25,79,64,78,60,70,67,27,17,89,35,69,62,94,82,84,27,44,81,63,98,56,8,57,76,61,99,3,47,14,45,79,39},new int[]{67,24,62,2,69,68,2,62,11,17,12,83,77,83,84,21,56,31,31,69,40,2,11,52,24,48,62,95,2,90,17,60,55,49,75,55,42},new int[]{77,90,94,20,72,64,84,75,28,75,73,36,27,6,28,13,87,47,11,85,39,24,75,45,90,48,42,84,59,29,68,82,46,58,12,32,95},new int[]{8,89,11,26,41,60,19,48,17,63,10,34,93,51,45,28,18,96,36,5,82,80,3,6,97,60,80,44,66,66,69,92,52,1,5,68,93},new int[]{66,79,5,59,95,26,14,41,75,83,74,52,42,81,82,60,89,15,47,33,95,37,47,36,70,46,52,72,75,26,29,2,24,18,33,85,86},new int[]{33,32,33,40,62,14,45,26,27,10,71,81,43,68,97,16,24,21,93,50,79,62,92,52,18,8,9,59,44,70,98,67,18,83,73,13,40},new int[]{69,47,24,37,44,46,44,75,60,74,3,17,51,5,35,82,91,90,57,31,77,60,80,50,22,80,72,32,18,33,64,45,38,30,64,42,13},new int[]{77,68,42,6,79,27,96,53,7,31,88,66,72,71,65,8,53,68,30,83,61,37,84,45,53,13,32,62,2,77,8,96,48,14,85,33,36},new int[]{85,59,70,69,48,30,28,41,76,58,41,11,6,20,91,29,73,48,71,85,82,15,2,97,75,53,55,70,13,44,58,17,41,25,69,14,29},new int[]{52,30,12,91,95,93,91,69,9,26,27,15,79,98,14,2,46,70,80,73,80,44,86,19,72,44,45,85,67,79,66,22,17,58,80,47,14},new int[]{41,69,55,21,80,31,32,80,9,37,9,21,56,8,24,80,95,20,5,50,2,67,58,96,89,99,30,15,93,2,70,93,22,70,93,62,81},new int[]{96,82,25,18,46,75,69,63,54,27,44,62,70,75,29,96,4,69,60,82,72,23,38,62,12,85,22,96,58,92,61,18,67,94,77,65,35},new int[]{39,26,17,50,32,22,39,89,32,88,59,8,44,30,77,23,64,77,30,70,94,98,17,88,73,54,19,31,25,97,38,55,50,37,35,96,60},new int[]{86,67,75,88,98,30,15,75,84,88,74,39,99,42,95,27,5,76,98,75,29,62,91,56,43,80,79,13,97,5,94,50,49,90,73,69,99},new int[]{55,59,1,67,9,26,66,92,20,90,14,2,21,59,19,46,15,32,36,78,35,9,98,95,25,41,44,74,98,49,55,15,66,62,26,42,35},new int[]{45,32,62,64,52,96,43,92,55,44,91,79,59,54,88,85,1,85,87,22,50,31,50,29,39,1,65,50,18,49,75,37,70,76,35,72,43},new int[]{65,43,66,35,34,42,80,8,6,40,68,23,63,14,89,58,36,34,76,21,45,58,15,45,17,50,88,55,92,31,31,85,97,10,66,53,11},new int[]{56,79,89,34,87,43,92,68,3,14,29,85,17,70,45,53,50,48,69,65,74,5,28,96,71,42,60,2,22,92,97,95,98,10,28,88,78},new int[]{36,61,2,51,34,35,43,11,32,38,47,81,85,95,5,64,86,53,29,1,30,26,86,10,13,25,15,1,75,44,35,13,19,48,12,73,84},new int[]{82,64,25,6,5,38,12,55,66,67,26,51,31,6,30,96,82,39,9,99,73,63,70,99,4,30,45,26,74,70,31,26,71,8,61,85,38},new int[]{48,62,97,16,3,62,56,67,99,87,12,88,55,13,15,7,24,13,19,67,5,50,74,64,48,49,84,80,63,7,98,34,79,5,57,74,42},new int[]{72,85,45,71,40,9,64,93,60,20,17,39,63,22,71,45,28,6,81,66,61,8,7,80,66,22,43,49,71,26,98,54,39,12,41,99,2},new int[]{52,93,84,53,55,19,26,37,13,87,25,58,47,23,3,51,78,79,35,78,17,6,58,84,48,10,14,27,68,83,52,51,45,66,57,27,47},new int[]{88,42,63,58,68,66,46,22,85,54,78,84,98,84,33,73,42,38,77,13,55,69,97,58,49,50,46,1,91,39,6,52,68,73,63,90,2},new int[]{61,24,64,5,65,50,55,35,71,4,50,85,73,90,58,1,20,75,32,13,28,10,2,5,71,97,71,66,14,85,18,14,13,83,21,30,35},new int[]{96,51,55,58,82,71,12,74,38,3,46,73,57,71,26,46,48,18,63,44,57,59,82,62,46,18,85,15,6,60,59,82,23,32,35,55,35},new int[]{2,24,90,62,90,44,4,22,51,16,56,30,66,37,18,19,94,9,31,82,69,74,86,49,40,80,23,94,60,10,75,92,30,25,27,72,74},new int[]{98,93,17,27,23,91,74,80,70,1,89,49,17,33,32,14,4,96,62,17,89,14,6,11,28,9,72,30,60,44,38,80,64,84,74,62,53},new int[]{99,7,63,10,21,94,70,34,12,75,55,68,87,33,33,14,2,3,52,18,35,68,8,71,37,44,26,11,57,81,69,77,20,99,82,14,77},new int[]{86,13,54,5,89,15,79,15,86,36,85,17,13,59,94,16,60,16,50,99,49,2,8,91,69,92,58,52,5,23,42,74,26,71,82,83,2},new int[]{89,44,88,67,64,70,91,85,18,33,46,80,57,85,66,51,45,2,39,3,80,28,28,97,31,44,20,11,11,39,6,64,63,60,63,31,38},new int[]{99,18,9,42,28,67,23,10,5,2,25,60,87,67,53,17,41,33,92,5,87,73,70,6,73,81,13,3,73,14,67,36,84,46,82,1,20}});
List<Integer> param1 = new ArrayList<>();
param1.add(0);
param1.add(3);
param1.add(3);
param1.add(13);
param1.add(12);
param1.add(22);
param1.add(34);
param1.add(37);
param1.add(3);
param1.add(36);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([[29]],0,),
([[ 1, 3, 5 ], [ 3, 2, 4 ], [ 5, 4, 1 ]], 3,),
([[ 1, 2, 5 ], [ 3, 2, 4 ], [ 5, 4, 1 ]], 3,),
([[37, 56, 39, 95, 78, 69, 89, 45, 66, 99, 20, 10, 6, 33, 78, 26, 86, 61, 78, 36, 62, 23, 80, 89, 83], [42, 75, 30, 64, 25, 95, 17, 90, 6, 11, 1, 77, 16, 75, 86, 96, 67, 27, 80, 27, 99, 2, 82, 48, 25], [36, 83, 89, 85, 38, 40, 12, 29, 71, 29, 96, 75, 37, 79, 90, 66, 62, 29, 68, 98, 99, 74, 98, 88, 94], [69, 5, 52, 10, 35, 63, 75, 55, 17, 45, 65, 56, 70, 52, 61, 94, 61, 35, 13, 51, 1, 23, 77, 34, 80], [64, 11, 91, 93, 65, 22, 41, 25, 7, 85, 26, 82, 97, 51, 24, 10, 13, 95, 18, 11, 58, 32, 21, 41, 60], [90, 46, 56, 8, 17, 36, 86, 73, 5, 56, 59, 14, 45, 75, 51, 58, 95, 71, 39, 85, 57, 29, 75, 13, 44], [40, 43, 89, 50, 56, 62, 55, 30, 28, 68, 41, 84, 12, 77, 90, 38, 53, 23, 42, 84, 67, 11, 94, 10, 77], [74, 31, 44, 37, 25, 93, 21, 15, 11, 98, 75, 45, 8, 98, 26, 21, 52, 50, 24, 96, 82, 26, 41, 51, 16], [41, 52, 57, 84, 51, 59, 79, 68, 40, 16, 76, 35, 26, 73, 80, 59, 79, 84, 3, 5, 40, 55, 77, 48, 93], [71, 53, 72, 27, 73, 96, 36, 36, 39, 75, 57, 36, 7, 21, 15, 46, 88, 47, 59, 61, 41, 54, 23, 73, 12], [8, 22, 50, 34, 84, 96, 13, 20, 8, 70, 99, 97, 25, 14, 97, 59, 51, 53, 16, 67, 38, 74, 45, 97, 16], [95, 25, 78, 52, 46, 8, 73, 56, 13, 78, 63, 15, 53, 55, 5, 39, 13, 67, 97, 19, 31, 96, 53, 66, 80], [5, 30, 49, 58, 18, 36, 38, 50, 49, 28, 56, 33, 2, 2, 32, 12, 39, 51, 6, 15, 96, 47, 45, 45, 15], [10, 79, 97, 99, 12, 35, 4, 10, 84, 43, 31, 31, 31, 20, 73, 77, 37, 59, 24, 89, 59, 94, 88, 73, 29], [74, 78, 86, 45, 12, 8, 60, 67, 26, 20, 81, 31, 77, 42, 50, 32, 6, 32, 32, 43, 32, 1, 11, 12, 21], [21, 10, 9, 12, 32, 85, 18, 50, 39, 69, 5, 71, 56, 78, 22, 97, 99, 93, 79, 31, 92, 18, 8, 33, 15], [7, 35, 36, 40, 77, 41, 11, 87, 51, 23, 46, 4, 42, 34, 46, 7, 37, 20, 99, 29, 97, 36, 71, 56, 96], [5, 57, 15, 64, 45, 54, 2, 56, 40, 1, 16, 6, 72, 80, 47, 76, 6, 48, 2, 75, 61, 11, 10, 98, 75], [98, 75, 99, 62, 8, 10, 96, 52, 95, 4, 3, 45, 30, 75, 47, 34, 67, 57, 21, 41, 75, 75, 88, 53, 99], [40, 77, 89, 69, 74, 98, 68, 89, 99, 22, 23, 24, 74, 67, 11, 60, 34, 16, 26, 43, 19, 28, 48, 52, 85], [81, 50, 42, 81, 54, 72, 87, 27, 47, 26, 83, 34, 15, 4, 1, 92, 40, 74, 92, 61, 36, 18, 3, 43, 46], [80, 28, 65, 52, 79, 12, 96, 25, 80, 36, 21, 10, 76, 78, 63, 51, 27, 18, 53, 55, 98, 75, 79, 5, 37], [52, 98, 60, 25, 33, 97, 15, 1, 38, 45, 7, 12, 68, 26, 10, 72, 50, 25, 96, 64, 54, 43, 27, 16, 92], [61, 86, 67, 38, 64, 43, 82, 14, 64, 95, 63, 92, 69, 49, 72, 52, 82, 23, 32, 48, 12, 58, 24, 3, 86], [2, 88, 8, 1, 46, 4, 72, 89, 32, 16, 31, 5, 43, 13, 8, 11, 67, 33, 4, 22, 58, 60, 98, 99, 81]],21,),
([[32, 53, 61, 4, 94, 83, 17, 81, 12, 79, 93, 11, 91, 14, 15], [13, 34, 5, 70, 47, 93, 43, 97, 24, 44, 49, 93, 33, 2, 34], [94, 82, 63, 86, 67, 80, 10, 15, 76, 76, 39, 51, 15, 91, 20], [71, 90, 63, 91, 53, 14, 13, 78, 84, 44, 96, 39, 66, 80, 82], [60, 33, 64, 97, 47, 93, 89, 32, 10, 64, 77, 3, 60, 87, 26], [69, 81, 93, 32, 34, 95, 76, 38, 85, 22, 30, 53, 84, 86, 2], [71, 38, 57, 33, 49, 92, 28, 63, 54, 6, 62, 95, 36, 74, 19], [6, 34, 8, 6, 41, 89, 15, 22, 4, 73, 86, 56, 18, 24, 99], [67, 18, 89, 84, 39, 89, 61, 77, 78, 94, 44, 28, 30, 51, 33], [82, 64, 52, 28, 73, 14, 69, 99, 54, 49, 7, 44, 60, 1, 51], [99, 38, 66, 68, 74, 99, 59, 98, 62, 39, 63, 32, 21, 85, 23], [15, 1, 29, 94, 19, 33, 88, 70, 10, 46, 47, 55, 18, 71, 10], [92, 59, 34, 42, 98, 91, 42, 67, 7, 15, 35, 53, 1, 14, 90], [22, 84, 62, 36, 99, 16, 63, 6, 22, 7, 95, 17, 80, 50, 59], [42, 40, 14, 73, 80, 53, 8, 91, 78, 59, 66, 88, 72, 71, 63]],13,),
([[93, 91, 59, 11, 73, 34, 33, 29, 78, 95, 52, 61, 39, 63, 91, 82, 75, 35, 18, 71, 19, 42, 64], [92, 7, 2, 46, 32, 22, 94, 78, 67, 73, 52, 15, 70, 89, 48, 40, 60, 4, 21, 67, 60, 67, 39], [94, 67, 26, 74, 69, 58, 14, 10, 9, 3, 75, 67, 48, 38, 39, 41, 43, 78, 67, 6, 46, 78, 16], [25, 44, 27, 86, 54, 56, 75, 43, 59, 83, 83, 80, 94, 72, 94, 56, 8, 51, 29, 14, 12, 13, 12], [78, 10, 44, 59, 8, 24, 37, 43, 89, 8, 64, 77, 67, 73, 40, 74, 46, 83, 92, 18, 82, 72, 8], [59, 36, 96, 21, 3, 88, 16, 83, 55, 22, 22, 77, 12, 60, 92, 72, 9, 84, 79, 68, 24, 48, 45], [6, 64, 87, 15, 30, 84, 27, 27, 98, 97, 58, 10, 73, 72, 78, 1, 74, 4, 59, 82, 94, 41, 90], [43, 14, 29, 73, 37, 22, 88, 99, 36, 95, 58, 15, 61, 7, 99, 91, 42, 98, 25, 64, 44, 6, 4], [66, 14, 4, 35, 77, 93, 34, 26, 56, 90, 68, 78, 75, 3, 87, 8, 44, 90, 78, 5, 58, 86, 78], [12, 67, 94, 20, 3, 33, 77, 18, 75, 26, 7, 90, 3, 1, 17, 12, 73, 81, 82, 23, 91, 2, 27], [55, 15, 44, 69, 95, 49, 63, 35, 19, 53, 92, 2, 52, 20, 59, 3, 8, 40, 30, 12, 49, 17, 66], [23, 39, 27, 57, 19, 44, 66, 32, 33, 43, 23, 14, 80, 57, 98, 57, 58, 62, 40, 44, 47, 84, 46], [53, 29, 49, 53, 9, 73, 25, 47, 81, 50, 71, 16, 37, 18, 39, 78, 56, 82, 8, 57, 89, 20, 57], [1, 88, 13, 75, 52, 97, 30, 81, 57, 5, 22, 51, 79, 74, 1, 46, 79, 42, 42, 93, 64, 21, 79], [99, 69, 19, 14, 15, 51, 83, 91, 16, 83, 53, 55, 23, 36, 18, 45, 88, 71, 89, 45, 7, 69, 88], [84, 85, 20, 74, 87, 46, 33, 15, 34, 79, 5, 9, 91, 64, 60, 28, 9, 50, 36, 9, 31, 45, 55], [78, 15, 41, 66, 63, 96, 27, 64, 60, 56, 71, 14, 60, 93, 40, 20, 51, 5, 82, 72, 50, 71, 88], [60, 86, 20, 27, 20, 6, 8, 79, 22, 35, 42, 77, 92, 20, 93, 69, 3, 27, 69, 60, 20, 23, 96], [12, 55, 49, 96, 80, 27, 65, 51, 76, 77, 72, 44, 29, 39, 16, 5, 43, 57, 97, 20, 36, 96, 48], [50, 2, 12, 39, 53, 63, 12, 34, 34, 12, 17, 6, 30, 86, 37, 87, 80, 26, 48, 40, 31, 46, 66], [67, 88, 91, 37, 17, 94, 68, 59, 82, 40, 27, 95, 12, 31, 28, 26, 13, 82, 17, 41, 32, 22, 99], [80, 50, 3, 22, 59, 95, 16, 66, 40, 56, 86, 56, 78, 14, 62, 69, 27, 47, 80, 68, 87, 74, 95], [17, 27, 51, 59, 59, 79, 24, 54, 99, 13, 14, 70, 70, 52, 96, 85, 21, 30, 54, 86, 19, 59, 47]],12,),
([[1, 88, 52, 21, 60, 48, 74, 12, 87, 76, 80, 55, 3, 66, 6, 22, 67, 73, 21, 37, 33, 1, 65, 71, 37, 40, 63, 52, 76, 32, 27, 42, 52], [29, 46, 66, 46, 83, 25, 99, 65, 57, 28, 18, 63, 18, 24, 51, 29, 19, 31, 95, 86, 29, 20, 66, 68, 46, 19, 7, 42, 16, 52, 33, 39, 43], [84, 46, 4, 15, 43, 30, 39, 43, 14, 70, 86, 18, 46, 79, 21, 76, 91, 61, 75, 95, 65, 25, 89, 81, 71, 32, 48, 89, 82, 35, 90, 76, 78], [8, 22, 76, 32, 46, 13, 33, 1, 92, 67, 80, 50, 32, 10, 1, 71, 47, 7, 62, 52, 68, 4, 57, 89, 5, 71, 55, 67, 57, 99, 75, 76, 39], [80, 43, 71, 85, 10, 82, 29, 26, 30, 65, 38, 15, 89, 19, 28, 97, 15, 78, 61, 38, 99, 32, 78, 77, 41, 85, 76, 15, 88, 84, 63, 1, 43], [14, 2, 8, 11, 20, 44, 59, 17, 12, 84, 74, 21, 67, 4, 88, 54, 27, 95, 74, 68, 76, 79, 90, 34, 1, 59, 52, 45, 18, 73, 50, 34, 54], [54, 52, 30, 4, 53, 24, 50, 45, 61, 90, 7, 45, 85, 78, 34, 10, 11, 45, 49, 40, 51, 71, 99, 28, 62, 15, 38, 49, 1, 50, 14, 13, 22], [57, 85, 41, 37, 82, 73, 95, 5, 31, 65, 86, 57, 15, 90, 29, 54, 41, 91, 34, 85, 76, 35, 55, 98, 33, 42, 87, 8, 83, 99, 91, 30, 84], [92, 74, 42, 25, 14, 65, 30, 13, 89, 12, 24, 70, 73, 38, 87, 52, 70, 35, 28, 5, 42, 84, 80, 20, 22, 51, 87, 76, 47, 97, 39, 28, 68], [47, 72, 21, 48, 50, 49, 76, 62, 35, 80, 72, 5, 76, 90, 37, 73, 41, 92, 40, 58, 72, 2, 50, 86, 94, 80, 48, 24, 91, 33, 70, 94, 42], [26, 78, 95, 16, 21, 2, 59, 8, 7, 90, 21, 18, 82, 1, 91, 8, 92, 2, 22, 20, 78, 35, 60, 31, 41, 67, 72, 90, 24, 15, 38, 79, 99], [38, 81, 95, 66, 5, 2, 2, 90, 38, 37, 10, 91, 72, 74, 99, 24, 24, 95, 4, 40, 14, 26, 12, 27, 6, 27, 14, 22, 49, 20, 3, 73, 80], [73, 49, 96, 98, 25, 27, 91, 2, 22, 66, 48, 53, 1, 54, 39, 10, 12, 37, 46, 17, 3, 85, 76, 59, 27, 15, 45, 41, 67, 5, 34, 63, 98], [85, 13, 89, 14, 82, 61, 3, 3, 45, 96, 18, 32, 96, 44, 93, 37, 99, 27, 40, 24, 56, 36, 99, 6, 71, 78, 17, 61, 27, 44, 70, 3, 39], [35, 66, 83, 87, 17, 9, 9, 35, 9, 12, 67, 85, 57, 92, 97, 98, 43, 22, 60, 30, 31, 80, 99, 65, 73, 65, 87, 37, 82, 4, 10, 27, 2], [55, 68, 40, 97, 8, 15, 61, 7, 94, 24, 20, 55, 5, 7, 2, 74, 77, 21, 3, 53, 14, 53, 80, 63, 54, 72, 24, 78, 50, 6, 88, 93, 26], [34, 44, 69, 98, 98, 77, 67, 5, 86, 85, 91, 88, 39, 53, 8, 68, 36, 70, 95, 69, 6, 2, 1, 62, 29, 87, 18, 3, 80, 31, 22, 8, 22], [77, 29, 80, 10, 46, 34, 56, 59, 33, 78, 96, 23, 15, 25, 26, 12, 64, 19, 49, 19, 96, 74, 91, 23, 56, 63, 52, 64, 18, 99, 50, 13, 66], [36, 22, 84, 7, 12, 79, 93, 8, 23, 13, 97, 5, 83, 7, 68, 9, 19, 89, 65, 68, 82, 71, 83, 52, 87, 28, 93, 6, 44, 27, 46, 4, 87], [30, 45, 58, 62, 54, 24, 96, 75, 30, 90, 80, 57, 53, 70, 89, 84, 10, 1, 44, 59, 11, 76, 20, 76, 60, 44, 16, 79, 62, 90, 56, 75, 3], [2, 44, 83, 96, 87, 44, 24, 13, 1, 39, 5, 13, 8, 51, 49, 49, 48, 40, 30, 44, 92, 93, 53, 36, 84, 69, 71, 30, 38, 7, 75, 75, 84], [33, 79, 68, 51, 10, 38, 40, 3, 24, 2, 23, 51, 59, 42, 19, 8, 26, 82, 44, 48, 73, 36, 9, 97, 11, 41, 62, 88, 24, 32, 33, 81, 90], [45, 33, 2, 66, 78, 21, 87, 22, 65, 32, 29, 69, 36, 25, 22, 69, 52, 67, 24, 97, 92, 47, 85, 80, 11, 6, 51, 83, 61, 82, 44, 10, 76], [33, 64, 15, 76, 50, 5, 1, 38, 98, 12, 30, 11, 73, 44, 46, 71, 81, 52, 63, 26, 27, 97, 39, 5, 73, 87, 94, 36, 1, 52, 8, 1, 74], [7, 38, 59, 60, 67, 7, 8, 34, 40, 42, 96, 32, 69, 91, 13, 55, 12, 74, 1, 85, 7, 10, 81, 37, 48, 65, 42, 13, 23, 57, 92, 19, 32], [10, 82, 8, 16, 35, 58, 81, 48, 48, 23, 26, 55, 23, 50, 23, 54, 56, 45, 71, 12, 22, 17, 77, 48, 78, 71, 50, 83, 59, 39, 71, 60, 91], [17, 34, 75, 9, 39, 67, 23, 40, 4, 57, 16, 59, 85, 25, 5, 1, 96, 20, 11, 97, 32, 83, 39, 45, 57, 82, 36, 42, 88, 96, 9, 24, 79], [47, 46, 86, 98, 59, 10, 2, 42, 7, 1, 9, 42, 26, 79, 57, 22, 87, 3, 11, 56, 86, 62, 40, 78, 16, 98, 5, 53, 72, 66, 11, 45, 62], [87, 65, 74, 6, 67, 83, 29, 79, 87, 49, 8, 89, 88, 52, 12, 1, 4, 94, 98, 60, 43, 97, 44, 30, 40, 13, 30, 19, 20, 38, 63, 68, 23], [89, 11, 31, 76, 41, 98, 57, 30, 80, 96, 82, 8, 95, 36, 77, 82, 62, 35, 27, 6, 64, 74, 37, 47, 44, 71, 80, 66, 43, 57, 47, 89, 90], [90, 18, 20, 92, 67, 57, 1, 74, 95, 84, 56, 8, 48, 58, 64, 71, 57, 51, 99, 40, 84, 3, 63, 11, 58, 76, 46, 12, 8, 45, 86, 84, 15], [49, 31, 46, 94, 40, 31, 20, 2, 6, 78, 26, 97, 87, 89, 37, 92, 99, 71, 59, 66, 64, 17, 91, 48, 66, 12, 80, 32, 18, 62, 16, 5, 24], [49, 75, 64, 46, 42, 88, 78, 1, 90, 26, 68, 90, 4, 96, 16, 80, 40, 84, 81, 49, 84, 96, 42, 11, 62, 93, 55, 27, 85, 29, 32, 41, 12]],22,),
([[97, 17, 59, 40, 18, 53, 65, 84, 85, 42, 38, 32, 22, 61, 89, 32, 31, 99, 58, 77, 80, 56, 83, 41, 15, 46, 97, 59, 65, 51, 13, 24, 87, 93, 16, 49, 32, 16, 43, 88, 53, 21, 33, 59, 60], [27, 29, 33, 50, 32, 46, 28, 51, 26, 48, 58, 47, 63, 47, 70, 19, 79, 81, 98, 65, 19, 67, 81, 46, 78, 75, 80, 54, 94, 91, 82, 87, 49, 27, 56, 44, 75, 77, 44, 23, 90, 42, 64, 34, 99], [43, 84, 88, 96, 26, 2, 13, 3, 12, 27, 14, 74, 38, 76, 40, 75, 50, 66, 95, 62, 10, 6, 55, 42, 61, 22, 47, 19, 74, 47, 91, 92, 10, 45, 60, 17, 79, 43, 12, 84, 64, 80, 47, 84, 50], [27, 22, 91, 13, 59, 69, 81, 98, 22, 94, 67, 71, 15, 71, 3, 29, 6, 49, 91, 65, 54, 34, 58, 8, 89, 15, 38, 11, 73, 27, 77, 76, 11, 58, 35, 44, 57, 87, 21, 28, 7, 77, 95, 35, 81], [88, 86, 74, 80, 6, 12, 1, 16, 98, 63, 58, 91, 5, 83, 11, 37, 63, 75, 8, 53, 16, 95, 11, 65, 47, 81, 49, 25, 55, 26, 34, 2, 16, 31, 22, 86, 32, 70, 2, 71, 11, 10, 16, 51, 1], [35, 39, 74, 59, 99, 77, 78, 76, 44, 3, 38, 75, 98, 25, 87, 72, 64, 27, 50, 4, 62, 88, 60, 63, 13, 31, 64, 14, 84, 86, 76, 67, 96, 5, 96, 76, 92, 91, 87, 68, 69, 45, 9, 9, 93], [57, 81, 83, 66, 96, 54, 15, 2, 78, 96, 49, 90, 12, 90, 36, 76, 97, 90, 87, 13, 37, 40, 92, 34, 54, 83, 89, 99, 85, 70, 16, 24, 51, 16, 94, 28, 74, 17, 84, 48, 24, 80, 20, 55, 26], [29, 22, 20, 96, 29, 87, 57, 98, 76, 83, 17, 86, 10, 82, 69, 1, 90, 89, 77, 39, 46, 12, 20, 6, 18, 2, 73, 33, 54, 1, 75, 22, 68, 21, 29, 20, 69, 51, 27, 97, 18, 22, 41, 37, 18], [21, 6, 28, 2, 79, 11, 11, 26, 91, 43, 87, 56, 8, 63, 46, 59, 84, 98, 26, 65, 63, 88, 53, 41, 93, 11, 8, 30, 79, 82, 25, 64, 60, 11, 48, 51, 73, 32, 12, 42, 23, 88, 83, 74, 82], [15, 94, 47, 98, 42, 39, 13, 42, 23, 45, 22, 60, 27, 52, 69, 11, 40, 6, 67, 32, 74, 40, 20, 18, 98, 82, 2, 13, 56, 46, 62, 77, 47, 59, 90, 64, 12, 12, 12, 23, 18, 24, 47, 91, 70], [40, 45, 67, 62, 58, 95, 96, 92, 54, 9, 34, 60, 27, 27, 60, 25, 83, 78, 40, 83, 76, 95, 36, 25, 58, 61, 52, 6, 14, 7, 93, 90, 34, 36, 51, 75, 76, 81, 87, 31, 82, 53, 61, 26, 87], [50, 8, 23, 75, 95, 19, 22, 41, 81, 49, 57, 91, 31, 17, 17, 98, 99, 11, 84, 60, 4, 58, 3, 72, 36, 43, 83, 20, 5, 90, 86, 55, 26, 50, 74, 88, 52, 96, 61, 89, 15, 53, 34, 16, 47], [64, 74, 70, 61, 41, 85, 45, 2, 49, 19, 38, 87, 17, 6, 54, 48, 44, 59, 34, 15, 91, 22, 35, 83, 2, 44, 20, 45, 62, 61, 97, 81, 56, 56, 2, 12, 82, 23, 19, 54, 69, 21, 60, 20, 80], [6, 59, 90, 96, 99, 23, 54, 18, 42, 85, 48, 13, 28, 14, 94, 37, 99, 47, 53, 41, 40, 22, 35, 77, 9, 80, 77, 18, 53, 73, 8, 19, 80, 75, 43, 92, 32, 19, 7, 24, 23, 7, 40, 79, 23], [79, 72, 73, 91, 22, 22, 20, 21, 14, 85, 22, 33, 78, 13, 86, 90, 85, 15, 75, 12, 6, 32, 24, 17, 98, 88, 25, 60, 63, 86, 23, 86, 84, 45, 76, 81, 53, 27, 65, 45, 56, 1, 37, 78, 43], [90, 67, 47, 22, 16, 72, 11, 25, 17, 50, 89, 84, 15, 7, 22, 32, 89, 15, 10, 5, 81, 6, 3, 31, 43, 72, 33, 23, 43, 12, 10, 33, 13, 48, 6, 24, 27, 92, 63, 99, 24, 55, 10, 20, 22], [45, 52, 19, 18, 80, 74, 48, 70, 47, 13, 8, 88, 84, 89, 5, 68, 90, 35, 15, 35, 75, 33, 40, 68, 60, 21, 67, 96, 35, 1, 18, 6, 19, 31, 48, 60, 56, 49, 8, 70, 87, 68, 12, 15, 51], [68, 10, 30, 46, 76, 42, 39, 8, 59, 61, 70, 81, 87, 50, 7, 97, 53, 7, 96, 93, 30, 77, 54, 38, 82, 30, 85, 30, 18, 62, 98, 29, 49, 45, 51, 20, 31, 47, 83, 13, 77, 45, 70, 57, 87], [28, 1, 55, 6, 63, 56, 56, 97, 48, 21, 77, 81, 95, 80, 48, 64, 45, 45, 17, 72, 42, 89, 64, 95, 92, 52, 40, 64, 8, 51, 66, 73, 50, 20, 68, 99, 60, 54, 64, 43, 32, 9, 30, 49, 1], [49, 96, 37, 62, 18, 86, 55, 83, 16, 85, 49, 64, 57, 39, 68, 15, 12, 80, 64, 93, 89, 77, 20, 34, 19, 75, 93, 92, 19, 82, 49, 29, 20, 28, 8, 40, 46, 56, 99, 69, 41, 89, 84, 71, 28], [25, 56, 58, 92, 77, 94, 72, 67, 80, 80, 87, 10, 6, 83, 38, 90, 18, 91, 20, 6, 81, 30, 16, 25, 51, 16, 70, 37, 64, 71, 60, 96, 55, 52, 56, 17, 27, 3, 92, 98, 29, 4, 27, 84, 76], [99, 74, 14, 56, 22, 24, 90, 11, 84, 72, 29, 73, 38, 70, 92, 90, 9, 45, 26, 89, 52, 6, 21, 60, 59, 21, 91, 11, 20, 17, 98, 51, 64, 55, 86, 16, 85, 77, 98, 54, 54, 56, 7, 96, 13], [96, 83, 88, 44, 40, 69, 28, 81, 40, 94, 62, 59, 50, 11, 15, 60, 10, 20, 30, 35, 99, 96, 59, 51, 58, 12, 46, 7, 64, 18, 28, 11, 98, 35, 76, 76, 15, 54, 40, 19, 40, 53, 10, 72, 22], [21, 20, 69, 1, 27, 36, 33, 90, 63, 14, 86, 32, 11, 93, 93, 74, 65, 49, 84, 94, 34, 61, 56, 95, 39, 50, 30, 14, 35, 25, 53, 56, 29, 40, 65, 53, 99, 64, 21, 81, 14, 10, 74, 1, 12], [79, 15, 42, 97, 70, 30, 28, 31, 17, 97, 85, 50, 51, 87, 67, 49, 92, 28, 81, 14, 80, 89, 3, 69, 70, 95, 68, 67, 60, 68, 99, 44, 74, 55, 69, 78, 34, 2, 79, 34, 4, 12, 13, 73, 4], [31, 44, 56, 6, 71, 62, 82, 94, 22, 78, 12, 48, 46, 72, 25, 42, 75, 55, 25, 80, 81, 54, 92, 68, 98, 26, 6, 52, 85, 64, 58, 57, 72, 68, 75, 34, 2, 83, 39, 67, 73, 95, 76, 12, 73], [39, 32, 69, 72, 32, 22, 88, 51, 91, 41, 50, 17, 45, 59, 44, 32, 48, 30, 28, 83, 18, 20, 74, 11, 60, 34, 39, 38, 17, 49, 87, 71, 6, 56, 24, 60, 72, 4, 81, 66, 22, 51, 51, 16, 85], [40, 8, 71, 64, 71, 4, 25, 59, 70, 82, 79, 85, 16, 55, 24, 11, 71, 42, 3, 41, 22, 26, 4, 16, 63, 17, 19, 79, 7, 66, 55, 45, 87, 72, 1, 17, 39, 8, 57, 85, 50, 55, 26, 95, 53], [33, 30, 94, 36, 21, 41, 37, 21, 29, 8, 52, 39, 69, 14, 85, 38, 15, 30, 71, 27, 72, 35, 41, 53, 61, 95, 45, 30, 91, 1, 33, 78, 7, 62, 22, 51, 69, 85, 55, 31, 54, 27, 44, 79, 87], [60, 53, 17, 94, 36, 66, 2, 97, 20, 10, 69, 58, 81, 47, 63, 39, 62, 82, 60, 73, 74, 32, 63, 39, 18, 24, 2, 16, 79, 51, 84, 54, 56, 62, 71, 82, 89, 77, 60, 75, 72, 91, 20, 64, 98], [68, 79, 77, 49, 86, 26, 52, 61, 9, 5, 30, 4, 31, 14, 25, 28, 15, 67, 95, 77, 9, 66, 23, 48, 33, 28, 63, 8, 36, 2, 24, 22, 79, 24, 69, 91, 97, 53, 85, 81, 58, 35, 55, 26, 46], [25, 85, 11, 24, 78, 24, 73, 2, 6, 25, 81, 3, 5, 32, 48, 55, 93, 36, 36, 25, 56, 28, 35, 13, 79, 60, 27, 75, 6, 56, 27, 42, 94, 97, 38, 55, 19, 86, 13, 68, 6, 29, 94, 89, 61], [15, 12, 21, 82, 25, 38, 69, 76, 49, 29, 62, 42, 22, 95, 48, 28, 23, 53, 16, 60, 40, 97, 39, 68, 6, 47, 11, 10, 31, 71, 14, 59, 6, 58, 18, 33, 30, 84, 92, 1, 57, 81, 59, 26, 53], [18, 24, 18, 39, 79, 36, 90, 32, 84, 70, 91, 72, 39, 86, 37, 38, 71, 73, 34, 98, 28, 63, 73, 30, 41, 95, 8, 8, 78, 9, 98, 25, 9, 64, 3, 96, 27, 74, 66, 82, 59, 40, 24, 23, 41], [53, 49, 66, 61, 64, 34, 27, 64, 60, 35, 53, 72, 71, 58, 13, 76, 77, 53, 17, 57, 60, 15, 78, 19, 35, 18, 17, 84, 25, 37, 23, 23, 75, 46, 84, 7, 87, 62, 23, 91, 85, 21, 58, 96, 50], [28, 66, 93, 9, 35, 61, 68, 86, 23, 6, 84, 69, 12, 59, 65, 39, 41, 3, 42, 43, 85, 66, 96, 29, 47, 92, 97, 26, 15, 45, 90, 73, 61, 85, 20, 49, 27, 65, 9, 58, 51, 38, 84, 19, 44], [11, 78, 89, 76, 45, 7, 3, 80, 62, 1, 15, 44, 11, 1, 3, 22, 43, 6, 22, 50, 28, 78, 96, 29, 5, 35, 11, 1, 7, 3, 86, 31, 3, 17, 18, 79, 99, 80, 94, 99, 17, 79, 42, 27, 65], [30, 30, 69, 65, 4, 11, 58, 13, 10, 88, 84, 18, 87, 42, 99, 44, 62, 91, 79, 24, 30, 65, 41, 67, 24, 32, 63, 4, 98, 1, 21, 8, 46, 12, 1, 22, 78, 89, 28, 72, 64, 40, 89, 55, 87], [60, 41, 80, 59, 68, 36, 33, 94, 45, 75, 50, 47, 77, 44, 68, 88, 33, 97, 76, 21, 97, 46, 97, 73, 31, 62, 94, 16, 12, 54, 9, 35, 53, 43, 70, 89, 56, 64, 28, 87, 29, 86, 58, 24, 20], [27, 97, 19, 90, 38, 60, 3, 23, 59, 91, 91, 74, 24, 56, 52, 41, 66, 98, 22, 66, 28, 88, 38, 86, 67, 58, 37, 2, 57, 87, 77, 79, 97, 45, 53, 77, 84, 7, 77, 39, 68, 63, 46, 91, 96], [2, 15, 5, 3, 16, 49, 90, 6, 35, 38, 84, 86, 64, 85, 32, 1, 48, 23, 18, 17, 31, 93, 54, 77, 60, 66, 73, 96, 86, 18, 18, 83, 63, 31, 29, 88, 97, 83, 80, 51, 32, 21, 30, 7, 38], [12, 59, 92, 14, 71, 17, 23, 77, 20, 5, 6, 13, 3, 53, 31, 3, 8, 71, 50, 71, 75, 88, 59, 21, 20, 93, 74, 49, 80, 74, 38, 33, 69, 59, 12, 8, 70, 87, 48, 67, 38, 93, 34, 4, 7], [85, 74, 96, 89, 77, 85, 83, 59, 8, 61, 50, 84, 8, 16, 48, 62, 56, 28, 74, 21, 44, 79, 70, 41, 35, 56, 85, 17, 26, 63, 74, 34, 71, 32, 4, 10, 79, 56, 35, 33, 25, 47, 11, 34, 36], [17, 12, 80, 97, 26, 74, 13, 82, 85, 87, 87, 36, 69, 45, 79, 88, 12, 83, 97, 89, 38, 77, 88, 67, 76, 66, 20, 40, 34, 22, 15, 97, 66, 35, 98, 91, 31, 77, 53, 94, 90, 88, 57, 65, 38], [38, 86, 10, 46, 27, 42, 2, 58, 19, 62, 11, 14, 57, 33, 44, 18, 29, 30, 3, 32, 15, 49, 87, 60, 98, 46, 80, 50, 6, 80, 20, 49, 28, 26, 56, 48, 6, 53, 59, 80, 33, 12, 78, 39, 2]],34,),
([[19, 98, 9, 31, 79, 4, 63, 46, 32, 81, 5, 39, 97, 92, 13, 68, 28, 13, 92, 57, 99, 24, 9, 7, 22, 3, 72, 4, 42, 2, 53, 46, 6, 57, 86, 3, 17, 74, 88, 60, 39, 28, 45, 94], [92, 4, 82, 39, 3, 65, 97, 16, 46, 94, 40, 55, 97, 36, 60, 95, 36, 36, 47, 48, 10, 22, 28, 36, 32, 13, 34, 63, 65, 80, 91, 22, 31, 48, 93, 22, 71, 55, 40, 4, 78, 43, 81, 65], [2, 82, 3, 56, 85, 77, 49, 27, 60, 67, 69, 37, 48, 66, 94, 70, 27, 77, 5, 52, 58, 25, 91, 62, 16, 48, 71, 52, 67, 15, 81, 67, 61, 66, 69, 24, 95, 44, 71, 25, 20, 89, 66, 66], [10, 50, 70, 11, 93, 30, 85, 27, 42, 36, 45, 97, 27, 56, 37, 70, 39, 8, 76, 47, 67, 54, 9, 43, 12, 40, 3, 97, 77, 12, 37, 7, 70, 41, 4, 87, 4, 67, 38, 27, 11, 93, 93, 37], [58, 8, 32, 78, 84, 88, 93, 60, 65, 10, 19, 39, 45, 48, 18, 71, 88, 86, 16, 6, 71, 82, 99, 49, 88, 80, 19, 83, 65, 22, 31, 14, 30, 95, 51, 32, 43, 17, 92, 98, 62, 17, 61, 6], [93, 9, 31, 30, 59, 73, 10, 64, 33, 3, 93, 53, 41, 78, 15, 10, 80, 97, 92, 39, 24, 79, 13, 83, 11, 13, 40, 59, 96, 54, 61, 90, 59, 80, 17, 13, 13, 15, 11, 1, 35, 82, 44, 58], [1, 86, 52, 66, 94, 53, 82, 65, 3, 74, 48, 15, 67, 77, 62, 88, 30, 43, 32, 99, 35, 55, 15, 34, 98, 82, 99, 23, 32, 50, 50, 83, 93, 40, 44, 12, 68, 22, 43, 79, 85, 42, 99, 19], [72, 79, 4, 25, 51, 60, 37, 26, 73, 44, 55, 50, 31, 70, 25, 60, 6, 19, 5, 69, 59, 54, 5, 49, 20, 54, 77, 73, 78, 13, 97, 48, 87, 94, 63, 82, 82, 43, 78, 12, 39, 91, 57, 93], [71, 79, 83, 9, 84, 62, 22, 36, 96, 3, 82, 16, 3, 76, 88, 58, 75, 23, 33, 68, 61, 14, 38, 73, 98, 53, 61, 33, 83, 67, 56, 61, 38, 27, 40, 6, 96, 48, 18, 32, 84, 36, 79, 23], [14, 85, 46, 3, 7, 17, 68, 58, 50, 99, 70, 96, 99, 46, 59, 22, 72, 91, 28, 2, 59, 54, 66, 63, 27, 7, 12, 8, 9, 86, 18, 92, 38, 34, 70, 95, 15, 61, 68, 5, 87, 77, 61, 27], [45, 58, 95, 19, 30, 63, 94, 5, 62, 75, 74, 41, 65, 79, 85, 86, 96, 26, 77, 69, 78, 54, 55, 68, 8, 9, 95, 3, 27, 9, 93, 98, 29, 74, 77, 65, 40, 78, 96, 80, 56, 26, 33, 95], [72, 25, 97, 94, 1, 1, 27, 68, 37, 24, 44, 88, 6, 39, 65, 93, 88, 77, 92, 15, 64, 31, 86, 76, 17, 26, 77, 53, 41, 45, 81, 26, 51, 92, 38, 50, 42, 42, 32, 85, 9, 80, 5, 38], [9, 70, 79, 82, 69, 41, 74, 80, 27, 40, 53, 23, 92, 75, 4, 68, 80, 28, 29, 58, 17, 70, 18, 13, 64, 60, 61, 35, 89, 55, 35, 42, 11, 76, 54, 38, 32, 78, 25, 97, 98, 59, 70, 57], [41, 4, 7, 99, 19, 31, 20, 21, 25, 12, 98, 17, 96, 1, 79, 65, 63, 25, 71, 34, 44, 70, 1, 79, 77, 21, 77, 40, 17, 17, 76, 34, 39, 75, 14, 79, 87, 4, 33, 25, 41, 86, 32, 1], [63, 88, 53, 7, 43, 37, 70, 15, 34, 63, 65, 72, 35, 76, 46, 24, 1, 77, 79, 34, 37, 13, 16, 36, 70, 98, 76, 54, 44, 38, 47, 49, 36, 64, 63, 24, 68, 89, 11, 46, 3, 7, 54, 11], [65, 41, 55, 59, 26, 54, 14, 47, 16, 12, 93, 59, 32, 10, 93, 83, 55, 73, 89, 19, 39, 9, 17, 91, 8, 87, 55, 77, 41, 8, 13, 77, 55, 81, 20, 69, 25, 16, 43, 82, 59, 73, 35, 10], [99, 19, 13, 89, 69, 81, 34, 43, 87, 67, 10, 32, 97, 71, 13, 38, 11, 15, 87, 83, 8, 49, 88, 66, 30, 44, 54, 97, 83, 31, 24, 86, 39, 93, 34, 61, 4, 50, 53, 81, 28, 38, 4, 16], [42, 43, 64, 31, 79, 9, 68, 83, 34, 88, 11, 35, 28, 92, 11, 38, 98, 15, 61, 8, 65, 24, 50, 10, 17, 78, 1, 11, 41, 3, 17, 64, 75, 88, 33, 32, 25, 91, 47, 43, 81, 81, 57, 40], [68, 82, 75, 41, 40, 76, 37, 74, 15, 58, 58, 11, 98, 99, 8, 31, 15, 93, 79, 64, 31, 7, 94, 89, 79, 77, 74, 19, 49, 15, 3, 18, 22, 96, 95, 74, 45, 21, 34, 93, 74, 28, 54, 10], [32, 78, 32, 52, 30, 56, 72, 19, 22, 88, 28, 41, 43, 69, 73, 72, 59, 56, 82, 40, 77, 70, 16, 18, 42, 81, 2, 82, 64, 11, 55, 2, 2, 57, 18, 86, 16, 27, 17, 54, 17, 6, 97, 13], [6, 90, 83, 19, 61, 90, 86, 11, 86, 96, 7, 86, 6, 15, 38, 41, 56, 18, 35, 98, 45, 29, 69, 88, 32, 94, 5, 44, 98, 50, 82, 21, 22, 61, 39, 85, 99, 5, 33, 71, 24, 39, 72, 15], [70, 5, 87, 48, 20, 76, 21, 86, 89, 12, 66, 30, 7, 58, 18, 60, 18, 92, 48, 34, 72, 83, 6, 45, 60, 71, 84, 24, 93, 92, 69, 17, 62, 33, 62, 6, 3, 74, 54, 11, 87, 46, 4, 7], [26, 97, 35, 28, 41, 50, 99, 39, 80, 10, 71, 7, 25, 69, 90, 30, 11, 71, 39, 26, 57, 55, 22, 12, 64, 86, 66, 60, 62, 52, 62, 76, 65, 15, 40, 7, 55, 37, 86, 97, 33, 29, 19, 69], [14, 9, 5, 35, 85, 28, 45, 2, 6, 31, 32, 75, 59, 14, 74, 59, 1, 55, 31, 59, 8, 66, 99, 95, 12, 31, 99, 96, 81, 57, 8, 19, 53, 11, 57, 69, 59, 28, 2, 11, 64, 18, 47, 53], [5, 19, 5, 40, 83, 76, 92, 48, 99, 23, 55, 34, 87, 97, 58, 77, 98, 93, 30, 61, 82, 56, 99, 5, 4, 69, 39, 79, 73, 50, 72, 74, 22, 88, 24, 73, 22, 34, 48, 76, 81, 4, 57, 63], [30, 65, 97, 91, 78, 4, 35, 33, 51, 12, 68, 98, 78, 2, 91, 95, 33, 91, 45, 56, 28, 98, 30, 34, 1, 52, 13, 82, 40, 65, 9, 70, 72, 72, 88, 49, 25, 26, 26, 40, 34, 8, 2, 82], [16, 92, 72, 63, 18, 39, 42, 83, 32, 62, 32, 85, 93, 69, 84, 22, 27, 1, 13, 97, 6, 13, 78, 72, 67, 37, 76, 8, 93, 20, 62, 23, 68, 25, 32, 58, 25, 69, 10, 64, 31, 4, 57, 71], [34, 21, 83, 7, 98, 58, 33, 42, 53, 85, 55, 50, 38, 81, 46, 81, 15, 8, 49, 53, 37, 83, 93, 38, 97, 28, 61, 97, 7, 99, 72, 7, 59, 21, 25, 67, 32, 48, 55, 75, 85, 96, 66, 23], [45, 10, 78, 55, 60, 9, 83, 3, 32, 54, 87, 83, 76, 23, 14, 36, 48, 67, 10, 86, 68, 79, 52, 99, 49, 44, 5, 92, 91, 15, 94, 8, 55, 20, 77, 6, 1, 46, 42, 82, 70, 49, 90, 34], [57, 17, 89, 63, 61, 59, 92, 79, 4, 91, 33, 20, 21, 41, 74, 44, 32, 64, 37, 61, 26, 22, 40, 59, 50, 77, 96, 73, 39, 16, 98, 74, 88, 10, 45, 90, 34, 63, 68, 93, 86, 89, 11, 84], [88, 95, 25, 69, 31, 57, 87, 53, 81, 66, 56, 66, 91, 22, 81, 53, 57, 33, 5, 13, 17, 43, 84, 84, 92, 12, 84, 71, 56, 69, 29, 25, 11, 41, 11, 96, 38, 82, 62, 79, 81, 24, 44, 19], [37, 5, 4, 1, 94, 17, 43, 50, 30, 64, 82, 36, 1, 69, 82, 29, 81, 85, 66, 36, 62, 20, 83, 54, 82, 13, 47, 75, 97, 28, 55, 43, 44, 21, 94, 53, 47, 96, 87, 25, 96, 41, 31, 13], [6, 1, 8, 56, 62, 87, 69, 93, 22, 64, 69, 17, 18, 45, 54, 39, 65, 95, 88, 54, 16, 69, 32, 26, 35, 53, 43, 41, 24, 44, 79, 23, 75, 94, 45, 94, 55, 70, 69, 64, 14, 30, 4, 6], [39, 18, 51, 56, 89, 57, 59, 61, 17, 97, 38, 76, 81, 89, 37, 17, 91, 31, 14, 53, 36, 86, 5, 40, 70, 69, 88, 22, 14, 25, 84, 65, 49, 35, 52, 92, 29, 58, 72, 82, 31, 21, 6, 9], [30, 18, 30, 84, 60, 55, 10, 13, 41, 2, 5, 33, 65, 37, 61, 58, 12, 41, 28, 82, 36, 94, 42, 54, 54, 38, 85, 71, 69, 58, 99, 79, 9, 48, 18, 12, 27, 78, 77, 94, 36, 49, 9, 34], [76, 50, 89, 50, 22, 5, 15, 18, 77, 15, 89, 98, 66, 21, 87, 81, 61, 4, 48, 1, 7, 61, 53, 95, 35, 21, 60, 76, 5, 3, 59, 76, 10, 46, 50, 62, 59, 94, 17, 56, 44, 19, 18, 26], [28, 49, 32, 20, 85, 46, 58, 16, 76, 1, 46, 32, 14, 14, 83, 65, 25, 42, 13, 53, 68, 60, 84, 68, 41, 6, 26, 91, 22, 29, 40, 66, 36, 87, 19, 16, 88, 34, 63, 25, 75, 69, 84, 14], [21, 90, 44, 52, 79, 85, 80, 75, 48, 78, 85, 62, 80, 2, 42, 66, 28, 5, 8, 73, 81, 83, 42, 26, 95, 98, 93, 74, 58, 11, 97, 95, 22, 54, 93, 41, 85, 40, 12, 16, 43, 26, 94, 87], [97, 88, 6, 98, 19, 23, 25, 93, 16, 2, 93, 58, 97, 18, 44, 54, 9, 2, 55, 5, 20, 4, 5, 17, 5, 50, 72, 96, 25, 25, 89, 42, 31, 92, 47, 79, 51, 55, 60, 27, 39, 78, 13, 96], [35, 48, 14, 36, 53, 39, 5, 72, 10, 2, 95, 39, 25, 34, 79, 56, 81, 22, 33, 70, 58, 82, 30, 63, 67, 95, 12, 10, 62, 63, 36, 56, 6, 31, 33, 74, 63, 38, 26, 16, 24, 24, 73, 25], [23, 54, 67, 32, 74, 47, 35, 86, 14, 25, 59, 54, 79, 94, 95, 78, 8, 8, 95, 3, 97, 12, 32, 96, 21, 74, 41, 42, 57, 90, 77, 62, 73, 97, 95, 56, 12, 56, 58, 23, 89, 93, 33, 18], [41, 12, 62, 58, 4, 13, 31, 22, 39, 58, 30, 34, 95, 6, 90, 49, 45, 77, 93, 50, 26, 39, 86, 52, 4, 35, 5, 28, 21, 73, 10, 55, 33, 40, 5, 73, 81, 33, 81, 70, 91, 91, 78, 5], [81, 4, 71, 37, 78, 13, 29, 98, 98, 39, 48, 89, 35, 62, 20, 95, 59, 44, 54, 89, 58, 93, 52, 50, 46, 98, 10, 19, 11, 40, 40, 36, 87, 55, 44, 89, 44, 45, 85, 63, 91, 2, 6, 99], [73, 20, 55, 97, 47, 93, 27, 1, 13, 67, 65, 84, 58, 90, 76, 70, 50, 9, 55, 36, 20, 10, 10, 31, 84, 89, 45, 31, 9, 88, 4, 45, 24, 78, 72, 91, 53, 94, 78, 40, 58, 82, 77, 29]],37,),
([[91, 36, 24, 57], [88, 3, 45, 19], [49, 9, 86, 22], [55, 16, 72, 81]],3,),
([[27, 35, 35, 78, 52, 41, 22, 22, 75, 96, 91, 20, 46, 34, 83, 62, 10, 13, 92, 8, 86, 54, 92, 16, 17, 40, 49, 62, 19, 49, 38, 82, 62, 37, 93, 15, 85], [61, 56, 7, 36, 86, 37, 70, 40, 78, 17, 1, 44, 66, 42, 45, 46, 55, 21, 5, 84, 41, 86, 40, 87, 65, 13, 88, 89, 92, 68, 23, 4, 40, 61, 58, 98, 84], [17, 30, 92, 24, 95, 96, 38, 59, 63, 93, 64, 71, 52, 54, 15, 56, 70, 54, 81, 97, 61, 44, 1, 63, 59, 3, 13, 11, 61, 12, 82, 80, 33, 41, 4, 88, 47], [46, 54, 71, 9, 83, 93, 70, 36, 58, 86, 86, 38, 43, 67, 25, 78, 5, 18, 28, 30, 70, 95, 18, 25, 34, 72, 92, 71, 63, 98, 25, 65, 59, 66, 98, 96, 63], [12, 44, 54, 26, 54, 86, 31, 97, 22, 48, 8, 80, 28, 78, 68, 24, 83, 25, 47, 17, 66, 91, 8, 62, 37, 5, 46, 4, 59, 70, 29, 8, 48, 74, 99, 61, 53], [74, 64, 16, 76, 25, 79, 64, 78, 60, 70, 67, 27, 17, 89, 35, 69, 62, 94, 82, 84, 27, 44, 81, 63, 98, 56, 8, 57, 76, 61, 99, 3, 47, 14, 45, 79, 39], [67, 24, 62, 2, 69, 68, 2, 62, 11, 17, 12, 83, 77, 83, 84, 21, 56, 31, 31, 69, 40, 2, 11, 52, 24, 48, 62, 95, 2, 90, 17, 60, 55, 49, 75, 55, 42], [77, 90, 94, 20, 72, 64, 84, 75, 28, 75, 73, 36, 27, 6, 28, 13, 87, 47, 11, 85, 39, 24, 75, 45, 90, 48, 42, 84, 59, 29, 68, 82, 46, 58, 12, 32, 95], [8, 89, 11, 26, 41, 60, 19, 48, 17, 63, 10, 34, 93, 51, 45, 28, 18, 96, 36, 5, 82, 80, 3, 6, 97, 60, 80, 44, 66, 66, 69, 92, 52, 1, 5, 68, 93], [66, 79, 5, 59, 95, 26, 14, 41, 75, 83, 74, 52, 42, 81, 82, 60, 89, 15, 47, 33, 95, 37, 47, 36, 70, 46, 52, 72, 75, 26, 29, 2, 24, 18, 33, 85, 86], [33, 32, 33, 40, 62, 14, 45, 26, 27, 10, 71, 81, 43, 68, 97, 16, 24, 21, 93, 50, 79, 62, 92, 52, 18, 8, 9, 59, 44, 70, 98, 67, 18, 83, 73, 13, 40], [69, 47, 24, 37, 44, 46, 44, 75, 60, 74, 3, 17, 51, 5, 35, 82, 91, 90, 57, 31, 77, 60, 80, 50, 22, 80, 72, 32, 18, 33, 64, 45, 38, 30, 64, 42, 13], [77, 68, 42, 6, 79, 27, 96, 53, 7, 31, 88, 66, 72, 71, 65, 8, 53, 68, 30, 83, 61, 37, 84, 45, 53, 13, 32, 62, 2, 77, 8, 96, 48, 14, 85, 33, 36], [85, 59, 70, 69, 48, 30, 28, 41, 76, 58, 41, 11, 6, 20, 91, 29, 73, 48, 71, 85, 82, 15, 2, 97, 75, 53, 55, 70, 13, 44, 58, 17, 41, 25, 69, 14, 29], [52, 30, 12, 91, 95, 93, 91, 69, 9, 26, 27, 15, 79, 98, 14, 2, 46, 70, 80, 73, 80, 44, 86, 19, 72, 44, 45, 85, 67, 79, 66, 22, 17, 58, 80, 47, 14], [41, 69, 55, 21, 80, 31, 32, 80, 9, 37, 9, 21, 56, 8, 24, 80, 95, 20, 5, 50, 2, 67, 58, 96, 89, 99, 30, 15, 93, 2, 70, 93, 22, 70, 93, 62, 81], [96, 82, 25, 18, 46, 75, 69, 63, 54, 27, 44, 62, 70, 75, 29, 96, 4, 69, 60, 82, 72, 23, 38, 62, 12, 85, 22, 96, 58, 92, 61, 18, 67, 94, 77, 65, 35], [39, 26, 17, 50, 32, 22, 39, 89, 32, 88, 59, 8, 44, 30, 77, 23, 64, 77, 30, 70, 94, 98, 17, 88, 73, 54, 19, 31, 25, 97, 38, 55, 50, 37, 35, 96, 60], [86, 67, 75, 88, 98, 30, 15, 75, 84, 88, 74, 39, 99, 42, 95, 27, 5, 76, 98, 75, 29, 62, 91, 56, 43, 80, 79, 13, 97, 5, 94, 50, 49, 90, 73, 69, 99], [55, 59, 1, 67, 9, 26, 66, 92, 20, 90, 14, 2, 21, 59, 19, 46, 15, 32, 36, 78, 35, 9, 98, 95, 25, 41, 44, 74, 98, 49, 55, 15, 66, 62, 26, 42, 35], [45, 32, 62, 64, 52, 96, 43, 92, 55, 44, 91, 79, 59, 54, 88, 85, 1, 85, 87, 22, 50, 31, 50, 29, 39, 1, 65, 50, 18, 49, 75, 37, 70, 76, 35, 72, 43], [65, 43, 66, 35, 34, 42, 80, 8, 6, 40, 68, 23, 63, 14, 89, 58, 36, 34, 76, 21, 45, 58, 15, 45, 17, 50, 88, 55, 92, 31, 31, 85, 97, 10, 66, 53, 11], [56, 79, 89, 34, 87, 43, 92, 68, 3, 14, 29, 85, 17, 70, 45, 53, 50, 48, 69, 65, 74, 5, 28, 96, 71, 42, 60, 2, 22, 92, 97, 95, 98, 10, 28, 88, 78], [36, 61, 2, 51, 34, 35, 43, 11, 32, 38, 47, 81, 85, 95, 5, 64, 86, 53, 29, 1, 30, 26, 86, 10, 13, 25, 15, 1, 75, 44, 35, 13, 19, 48, 12, 73, 84], [82, 64, 25, 6, 5, 38, 12, 55, 66, 67, 26, 51, 31, 6, 30, 96, 82, 39, 9, 99, 73, 63, 70, 99, 4, 30, 45, 26, 74, 70, 31, 26, 71, 8, 61, 85, 38], [48, 62, 97, 16, 3, 62, 56, 67, 99, 87, 12, 88, 55, 13, 15, 7, 24, 13, 19, 67, 5, 50, 74, 64, 48, 49, 84, 80, 63, 7, 98, 34, 79, 5, 57, 74, 42], [72, 85, 45, 71, 40, 9, 64, 93, 60, 20, 17, 39, 63, 22, 71, 45, 28, 6, 81, 66, 61, 8, 7, 80, 66, 22, 43, 49, 71, 26, 98, 54, 39, 12, 41, 99, 2], [52, 93, 84, 53, 55, 19, 26, 37, 13, 87, 25, 58, 47, 23, 3, 51, 78, 79, 35, 78, 17, 6, 58, 84, 48, 10, 14, 27, 68, 83, 52, 51, 45, 66, 57, 27, 47], [88, 42, 63, 58, 68, 66, 46, 22, 85, 54, 78, 84, 98, 84, 33, 73, 42, 38, 77, 13, 55, 69, 97, 58, 49, 50, 46, 1, 91, 39, 6, 52, 68, 73, 63, 90, 2], [61, 24, 64, 5, 65, 50, 55, 35, 71, 4, 50, 85, 73, 90, 58, 1, 20, 75, 32, 13, 28, 10, 2, 5, 71, 97, 71, 66, 14, 85, 18, 14, 13, 83, 21, 30, 35], [96, 51, 55, 58, 82, 71, 12, 74, 38, 3, 46, 73, 57, 71, 26, 46, 48, 18, 63, 44, 57, 59, 82, 62, 46, 18, 85, 15, 6, 60, 59, 82, 23, 32, 35, 55, 35], [2, 24, 90, 62, 90, 44, 4, 22, 51, 16, 56, 30, 66, 37, 18, 19, 94, 9, 31, 82, 69, 74, 86, 49, 40, 80, 23, 94, 60, 10, 75, 92, 30, 25, 27, 72, 74], [98, 93, 17, 27, 23, 91, 74, 80, 70, 1, 89, 49, 17, 33, 32, 14, 4, 96, 62, 17, 89, 14, 6, 11, 28, 9, 72, 30, 60, 44, 38, 80, 64, 84, 74, 62, 53], [99, 7, 63, 10, 21, 94, 70, 34, 12, 75, 55, 68, 87, 33, 33, 14, 2, 3, 52, 18, 35, 68, 8, 71, 37, 44, 26, 11, 57, 81, 69, 77, 20, 99, 82, 14, 77], [86, 13, 54, 5, 89, 15, 79, 15, 86, 36, 85, 17, 13, 59, 94, 16, 60, 16, 50, 99, 49, 2, 8, 91, 69, 92, 58, 52, 5, 23, 42, 74, 26, 71, 82, 83, 2], [89, 44, 88, 67, 64, 70, 91, 85, 18, 33, 46, 80, 57, 85, 66, 51, 45, 2, 39, 3, 80, 28, 28, 97, 31, 44, 20, 11, 11, 39, 6, 64, 63, 60, 63, 31, 38], [99, 18, 9, 42, 28, 67, 23, 10, 5, 2, 25, 60, 87, 67, 53, 17, 41, 33, 92, 5, 87, 73, 70, 6, 73, 81, 13, 3, 73, 14, 67, 36, 84, 46, 82, 1, 20]],36,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE{
static int f_gold ( int n ) {
int count = 0 , ans = 1 ;
while ( n % 2 == 0 ) {
count ++ ;
n /= 2 ;
}
if ( count % 2 == 1 ) ans *= 2 ;
for ( int i = 3 ;
i <= Math . sqrt ( n ) ;
i += 2 ) {
count = 0 ;
while ( n % i == 0 ) {
count ++ ;
n /= i ;
}
if ( count % 2 == 1 ) ans *= i ;
}
if ( n > 2 ) ans *= n ;
return ans ;
}
| import math
def f_gold ( n ) :
count = 0
ans = 1
while n % 2 == 0 :
count += 1
n //= 2
if count % 2 is not 0 :
ans *= 2
for i in range ( 3 , ( int ) ( math.sqrt ( n ) ) + 1 , 2 ) :
count = 0
while n % i == 0 :
count += 1
n //= i
if count % 2 is not 0 :
ans *= i
if n > 2 :
ans *= n
return ans
|
using namespace std;
int f_gold ( int n ) {
int count = 0, ans = 1;
while ( n % 2 == 0 ) {
count ++;
n /= 2;
}
if ( count % 2 ) ans *= 2;
for ( int i = 3;
i <= sqrt ( n );
i += 2 ) {
count = 0;
while ( n % i == 0 ) {
count ++;
n /= i;
}
if ( count % 2 ) ans *= i;
}
if ( n > 2 ) ans *= n;
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(95);
param0.add(48);
param0.add(3);
param0.add(10);
param0.add(82);
param0.add(1);
param0.add(77);
param0.add(99);
param0.add(23);
param0.add(61);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(95,),
(48,),
(3,),
(10,),
(82,),
(1,),
(77,),
(99,),
(23,),
(61,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {95,48,3,10,82,1,77,99,23,61};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_SUM_NON_REPEATING_DISTINCT_ELEMENTS_ARRAY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_SUM_NON_REPEATING_DISTINCT_ELEMENTS_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
int sum = 0 ;
HashSet < Integer > s = new HashSet < Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( ! s . contains ( arr [ i ] ) ) {
sum += arr [ i ] ;
s . add ( arr [ i ] ) ;
}
}
return sum ;
}
| def f_gold ( arr , n ) :
s = set ( )
sum = 0
for i in range ( n ) :
if arr [ i ] not in s :
s.add ( arr [ i ] )
for i in s :
sum = sum + i
return sum
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
int sum = 0;
unordered_set < int > s;
for ( int i = 0;
i < n;
i ++ ) {
if ( s . find ( arr [ i ] ) == s . end ( ) ) {
sum += arr [ i ];
s . insert ( arr [ i ] );
}
}
return sum;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,6,8,10,21,22,27,32,35,36,43,44,46,48,49,55,60,61,69,69,71,72,73,78,88,94});
param0.add(new int[]{80,94,16,-74,32,-64,-84,-66,-10});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{99,4,96,39,39,24,15,47,25,74,7,98,88,91,62,12,31,14,48,26,37,25,11,32,34,64,72,5,80,86,6});
param0.add(new int[]{-86,-84,-84,-78,-78,-76,-74,-68,-66,-64,-60,-60,-56,-50,-42,-42,-38,-34,-32,-22,-16,-14,-10,-6,-6,4,4,26,36,36,54,62,64,68,70,76,76,76,84,92,92,94,96});
param0.add(new int[]{1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1});
param0.add(new int[]{3,3,5,8,32,33,35,35,42,48,67,71,71,74,77,80,94,96,96,97});
param0.add(new int[]{-50,-18,-66,76,-54,96,98,26,42,64,-60});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{70,21,44,82,62,41,86});
List<Integer> param1 = new ArrayList<>();
param1.add(24);
param1.add(6);
param1.add(27);
param1.add(15);
param1.add(27);
param1.add(25);
param1.add(19);
param1.add(9);
param1.add(15);
param1.add(3);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([5, 6, 8, 10, 21, 22, 27, 32, 35, 36, 43, 44, 46, 48, 49, 55, 60, 61, 69, 69, 71, 72, 73, 78, 88, 94],24,),
([80, 94, 16, -74, 32, -64, -84, -66, -10],6,),
([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],27,),
([99, 4, 96, 39, 39, 24, 15, 47, 25, 74, 7, 98, 88, 91, 62, 12, 31, 14, 48, 26, 37, 25, 11, 32, 34, 64, 72, 5, 80, 86, 6],15,),
([-86, -84, -84, -78, -78, -76, -74, -68, -66, -64, -60, -60, -56, -50, -42, -42, -38, -34, -32, -22, -16, -14, -10, -6, -6, 4, 4, 26, 36, 36, 54, 62, 64, 68, 70, 76, 76, 76, 84, 92, 92, 94, 96],27,),
([1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1],25,),
([3, 3, 5, 8, 32, 33, 35, 35, 42, 48, 67, 71, 71, 74, 77, 80, 94, 96, 96, 97],19,),
([-50, -18, -66, 76, -54, 96, 98, 26, 42, 64, -60],9,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,),
([70, 21, 44, 82, 62, 41, 86],3,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{5,6,8,10,21,22,27,32,35,36,43,44,46,48,49,55,60,61,69,69,71,72,73,78,88,94},{80,94,16,-74,32,-64,-84,-66,-10},{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},{99,4,96,39,39,24,15,47,25,74,7,98,88,91,62,12,31,14,48,26,37,25,11,32,34,64,72,5,80,86,6},{-86,-84,-84,-78,-78,-76,-74,-68,-66,-64,-60,-60,-56,-50,-42,-42,-38,-34,-32,-22,-16,-14,-10,-6,-6,4,4,26,36,36,54,62,64,68,70,76,76,76,84,92,92,94,96},{1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1},{3,3,5,8,32,33,35,35,42,48,67,71,71,74,77,80,94,96,96,97},{-50,-18,-66,76,-54,96,98,26,42,64,-60},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{70,21,44,82,62,41,86}};
vector<int> param1 {24,6,27,15,27,25,19,9,15,3};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
C_PROGRAM_FACTORIAL_NUMBER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class C_PROGRAM_FACTORIAL_NUMBER{
static int f_gold ( int n ) {
if ( n == 0 ) return 1 ;
return n * f_gold ( n - 1 ) ;
}
| def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ;
|
using namespace std;
unsigned int f_gold ( unsigned int n ) {
if ( n == 0 ) return 1;
return n * f_gold ( n - 1 );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(84);
param0.add(41);
param0.add(5);
param0.add(38);
param0.add(79);
param0.add(80);
param0.add(64);
param0.add(62);
param0.add(24);
param0.add(12);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(84,),
(41,),
(5,),
(38,),
(79,),
(80,),
(64,),
(62,),
(24,),
(12,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {84,41,5,38,79,80,64,62,24,12};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_1{
static String f_gold ( String seq ) {
int n = seq . length ( ) ;
if ( n >= 9 ) return "-1" ;
char result [ ] = new char [ n + 1 ] ;
int count = 1 ;
for ( int i = 0 ;
i <= n ;
i ++ ) {
if ( i == n || seq . charAt ( i ) == 'I' ) {
for ( int j = i - 1 ;
j >= - 1 ;
j -- ) {
result [ j + 1 ] = ( char ) ( ( int ) '0' + count ++ ) ;
if ( j >= 0 && seq . charAt ( j ) == 'I' ) break ;
}
}
}
return new String ( result ) ;
}
| def f_gold ( seq ) :
n = len ( seq )
if ( n >= 9 ) :
return "-1"
result = [ None ] * ( n + 1 )
count = 1
for i in range ( n + 1 ) :
if ( i == n or seq [ i ] == 'I' ) :
for j in range ( i - 1 , - 2 , - 1 ) :
result [ j + 1 ] = int ( '0' + str ( count ) )
count += 1
if ( j >= 0 and seq [ j ] == 'I' ) :
break
return result
|
using namespace std;
string f_gold ( string seq ) {
int n = seq . length ( );
if ( n >= 9 ) return "-1";
string result ( n + 1, ' ' );
int count = 1;
for ( int i = 0;
i <= n;
i ++ ) {
if ( i == n || seq [ i ] == 'I' ) {
for ( int j = i - 1;
j >= - 1;
j -- ) {
result [ j + 1 ] = '0' + count ++;
if ( j >= 0 && seq [ j ] == 'I' ) break;
}
}
}
return result;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("D");
param0.add("I");
param0.add("DD");
param0.add("II");
param0.add("DIDI");
param0.add("IIDDD");
param0.add("DDIDDIID");
param0.add("176297");
param0.add("1");
param0.add("XHkhZq");
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)).equals(f_gold(param0.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
('D',),
('I',),
('DD',),
('II',),
('DIDI',),
('IIDDD',),
('DDIDDIID',),
('176297',),
('1',),
('XHkhZq',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"D","I","DD","II","DIDI","IIDDD","DDIDDIID","176297","1","XHkhZq"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS{
public static int f_gold ( int stack1 [ ] , int stack2 [ ] , int stack3 [ ] , int n1 , int n2 , int n3 ) {
int sum1 = 0 , sum2 = 0 , sum3 = 0 ;
for ( int i = 0 ;
i < n1 ;
i ++ ) sum1 += stack1 [ i ] ;
for ( int i = 0 ;
i < n2 ;
i ++ ) sum2 += stack2 [ i ] ;
for ( int i = 0 ;
i < n3 ;
i ++ ) sum3 += stack3 [ i ] ;
int top1 = 0 , top2 = 0 , top3 = 0 ;
int ans = 0 ;
while ( true ) {
if ( top1 == n1 || top2 == n2 || top3 == n3 ) return 0 ;
if ( sum1 == sum2 && sum2 == sum3 ) return sum1 ;
if ( sum1 >= sum2 && sum1 >= sum3 ) sum1 -= stack1 [ top1 ++ ] ;
else if ( sum2 >= sum3 && sum2 >= sum3 ) sum2 -= stack2 [ top2 ++ ] ;
else if ( sum3 >= sum2 && sum3 >= sum1 ) sum3 -= stack3 [ top3 ++ ] ;
}
}
| def f_gold ( stack1 , stack2 , stack3 , n1 , n2 , n3 ) :
sum1 , sum2 , sum3 = 0 , 0 , 0
for i in range ( n1 ) :
sum1 += stack1 [ i ]
for i in range ( n2 ) :
sum2 += stack2 [ i ]
for i in range ( n3 ) :
sum3 += stack3 [ i ]
top1 , top2 , top3 = 0 , 0 , 0
ans = 0
while ( 1 ) :
if ( top1 == n1 or top2 == n2 or top3 == n3 ) :
return 0
if ( sum1 == sum2 and sum2 == sum3 ) :
return sum1
if ( sum1 >= sum2 and sum1 >= sum3 ) :
sum1 -= stack1 [ top1 ]
top1 = top1 + 1
elif ( sum2 >= sum3 and sum2 >= sum3 ) :
sum2 -= stack2 [ top2 ]
top2 = top2 + 1
elif ( sum3 >= sum2 and sum3 >= sum1 ) :
sum3 -= stack3 [ top3 ]
top3 = top3 + 1
|
using namespace std;
int f_gold ( int stack1 [ ], int stack2 [ ], int stack3 [ ], int n1, int n2, int n3 ) {
int sum1 = 0, sum2 = 0, sum3 = 0;
for ( int i = 0;
i < n1;
i ++ ) sum1 += stack1 [ i ];
for ( int i = 0;
i < n2;
i ++ ) sum2 += stack2 [ i ];
for ( int i = 0;
i < n3;
i ++ ) sum3 += stack3 [ i ];
int top1 = 0, top2 = 0, top3 = 0;
int ans = 0;
while ( 1 ) {
if ( top1 == n1 || top2 == n2 || top3 == n3 ) return 0;
if ( sum1 == sum2 && sum2 == sum3 ) return sum1;
if ( sum1 >= sum2 && sum1 >= sum3 ) sum1 -= stack1 [ top1 ++ ];
else if ( sum2 >= sum3 && sum2 >= sum3 ) sum2 -= stack2 [ top2 ++ ];
else if ( sum3 >= sum2 && sum3 >= sum1 ) sum3 -= stack3 [ top3 ++ ];
}
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,10,11,24,27,33,34,36,36,40,42,43,52,58,67,69,77,86,86,88});
param0.add(new int[]{40,54,14,58,-64,-60,-98,-64,-52,30,0,-42,74,46,-14,76,84,74,-24,30,96,88,-98,82,44,-86,-92,-52,28,62});
param0.add(new int[]{0,0});
param0.add(new int[]{64,40,45,93,30,79,24,95,1,84,74,5,9,6,22,33,10,53,33,9,31,21,22,77,21,93,86,68,92,57,27,82,87,11,51,2,27,2,24,57,20,2,32,43});
param0.add(new int[]{-94,-50,-24,-12,-6,-6,8,26,28,44});
param0.add(new int[]{1,1,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,1});
param0.add(new int[]{3,3,4,5,9,18,21,22,25,27,28,33,35,39,39,43,57,58,59,63,65,65,72,77,78,78,80,80,88,92,99});
param0.add(new int[]{40,28,-84,-38,82,2,38,10,-10,20,-54,48,56,38,-98,68,-8,-30,-96,-16,28,94,-52,28,34,68,-46,44,-28,-52,-48,-14,-30,24,56,8,-30,-46,18,-68,86,-12});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{22,31,75,48,30,39,82,93,26,87,77,87,67,88,19,51,54,48,6,37,38,27});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{4,13,34,40,41,47,47,52,55,62,66,66,69,70,73,74,75,76,85,98});
param1.add(new int[]{24,34,-52,50,-8,-48,-28,68,-12,-26,0,6,-76,-94,-12,8,38,-88,30,98,-78,-54,-48,42,26,-76,4,46,26,60});
param1.add(new int[]{1,1});
param1.add(new int[]{48,85,55,12,24,26,88,76,15,34,23,61,2,99,11,37,65,74,92,96,68,50,67,98,89,17,62,18,51,61,41,41,90,64,89,51,48,95,9,86,28,54,64,35});
param1.add(new int[]{-96,-94,-86,-70,-52,-18,-6,20,52,52});
param1.add(new int[]{1,0,0,0,0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,1,0,1,1});
param1.add(new int[]{3,17,18,23,24,24,26,28,34,48,53,54,56,61,64,67,69,74,77,79,79,81,81,82,84,84,85,86,88,92,96});
param1.add(new int[]{26,24,-50,18,78,-90,62,88,-36,-96,78,6,-94,-2,-28,-38,66,72,-36,14,-48,-64,-24,82,92,-16,-26,-12,6,34,30,-46,48,-22,34,-64,4,-32,84,-20,32,-22});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{18,20,53,87,85,63,6,81,89,82,43,76,59,60,79,96,29,65,5,56,96,95});
List<int [ ]> param2 = new ArrayList<>();
param2.add(new int[]{6,8,10,12,14,29,41,52,53,54,55,66,69,73,77,77,78,80,90,99});
param2.add(new int[]{-8,-24,54,28,92,94,0,62,28,80,82,2,88,-4,-28,80,44,34,-98,36,28,76,-48,40,98,4,22,-36,-20,-70});
param2.add(new int[]{0,0});
param2.add(new int[]{99,77,11,20,33,91,5,68,75,67,37,70,59,26,2,62,6,97,95,38,46,89,29,61,27,93,26,74,98,85,91,92,40,97,58,44,20,57,65,62,65,26,74,58});
param2.add(new int[]{-70,-40,-22,4,12,12,38,54,72,74});
param2.add(new int[]{0,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,1,1,0,0,1,0});
param2.add(new int[]{1,3,5,8,15,16,27,27,27,28,29,30,32,35,36,37,44,47,57,65,69,70,70,76,76,83,85,87,88,90,92});
param2.add(new int[]{66,26,-90,-40,-52,-98,84,88,40,-92,30,28,32,92,18,-34,-42,64,-34,70,-72,28,44,34,76,-78,46,-48,20,54,-2,66,6,56,52,-98,-48,-70,-60,94,90,10});
param2.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1});
param2.add(new int[]{10,76,49,36,41,18,60,44,81,34,56,7,13,83,82,16,7,38,33,55,91,54});
List<Integer> param3 = new ArrayList<>();
param3.add(10);
param3.add(26);
param3.add(1);
param3.add(42);
param3.add(5);
param3.add(39);
param3.add(24);
param3.add(32);
param3.add(16);
param3.add(19);
List<Integer> param4 = new ArrayList<>();
param4.add(12);
param4.add(28);
param4.add(1);
param4.add(27);
param4.add(5);
param4.add(34);
param4.add(16);
param4.add(37);
param4.add(23);
param4.add(16);
List<Integer> param5 = new ArrayList<>();
param5.add(18);
param5.add(15);
param5.add(1);
param5.add(31);
param5.add(5);
param5.add(26);
param5.add(29);
param5.add(41);
param5.add(22);
param5.add(17);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([4, 10, 11, 24, 27, 33, 34, 36, 36, 40, 42, 43, 52, 58, 67, 69, 77, 86, 86, 88],[4, 13, 34, 40, 41, 47, 47, 52, 55, 62, 66, 66, 69, 70, 73, 74, 75, 76, 85, 98],[6, 8, 10, 12, 14, 29, 41, 52, 53, 54, 55, 66, 69, 73, 77, 77, 78, 80, 90, 99],10,12,18,),
([40, 54, 14, 58, -64, -60, -98, -64, -52, 30, 0, -42, 74, 46, -14, 76, 84, 74, -24, 30, 96, 88, -98, 82, 44, -86, -92, -52, 28, 62],[24, 34, -52, 50, -8, -48, -28, 68, -12, -26, 0, 6, -76, -94, -12, 8, 38, -88, 30, 98, -78, -54, -48, 42, 26, -76, 4, 46, 26, 60],[-8, -24, 54, 28, 92, 94, 0, 62, 28, 80, 82, 2, 88, -4, -28, 80, 44, 34, -98, 36, 28, 76, -48, 40, 98, 4, 22, -36, -20, -70],26,28,15,),
([0, 0],[1, 1],[0, 0],1,1,1,),
([64, 40, 45, 93, 30, 79, 24, 95, 1, 84, 74, 5, 9, 6, 22, 33, 10, 53, 33, 9, 31, 21, 22, 77, 21, 93, 86, 68, 92, 57, 27, 82, 87, 11, 51, 2, 27, 2, 24, 57, 20, 2, 32, 43],[48, 85, 55, 12, 24, 26, 88, 76, 15, 34, 23, 61, 2, 99, 11, 37, 65, 74, 92, 96, 68, 50, 67, 98, 89, 17, 62, 18, 51, 61, 41, 41, 90, 64, 89, 51, 48, 95, 9, 86, 28, 54, 64, 35],[99, 77, 11, 20, 33, 91, 5, 68, 75, 67, 37, 70, 59, 26, 2, 62, 6, 97, 95, 38, 46, 89, 29, 61, 27, 93, 26, 74, 98, 85, 91, 92, 40, 97, 58, 44, 20, 57, 65, 62, 65, 26, 74, 58],42,27,31,),
([-94, -50, -24, -12, -6, -6, 8, 26, 28, 44],[-96, -94, -86, -70, -52, -18, -6, 20, 52, 52],[-70, -40, -22, 4, 12, 12, 38, 54, 72, 74],5,5,5,),
([1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1],[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1],[0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0],39,34,26,),
([3, 3, 4, 5, 9, 18, 21, 22, 25, 27, 28, 33, 35, 39, 39, 43, 57, 58, 59, 63, 65, 65, 72, 77, 78, 78, 80, 80, 88, 92, 99],[3, 17, 18, 23, 24, 24, 26, 28, 34, 48, 53, 54, 56, 61, 64, 67, 69, 74, 77, 79, 79, 81, 81, 82, 84, 84, 85, 86, 88, 92, 96],[1, 3, 5, 8, 15, 16, 27, 27, 27, 28, 29, 30, 32, 35, 36, 37, 44, 47, 57, 65, 69, 70, 70, 76, 76, 83, 85, 87, 88, 90, 92],24,16,29,),
([40, 28, -84, -38, 82, 2, 38, 10, -10, 20, -54, 48, 56, 38, -98, 68, -8, -30, -96, -16, 28, 94, -52, 28, 34, 68, -46, 44, -28, -52, -48, -14, -30, 24, 56, 8, -30, -46, 18, -68, 86, -12],[26, 24, -50, 18, 78, -90, 62, 88, -36, -96, 78, 6, -94, -2, -28, -38, 66, 72, -36, 14, -48, -64, -24, 82, 92, -16, -26, -12, 6, 34, 30, -46, 48, -22, 34, -64, 4, -32, 84, -20, 32, -22],[66, 26, -90, -40, -52, -98, 84, 88, 40, -92, 30, 28, 32, 92, 18, -34, -42, 64, -34, 70, -72, 28, 44, 34, 76, -78, 46, -48, 20, 54, -2, 66, 6, 56, 52, -98, -48, -70, -60, 94, 90, 10],32,37,41,),
([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],[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],[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],16,23,22,),
([22, 31, 75, 48, 30, 39, 82, 93, 26, 87, 77, 87, 67, 88, 19, 51, 54, 48, 6, 37, 38, 27],[18, 20, 53, 87, 85, 63, 6, 81, 89, 82, 43, 76, 59, 60, 79, 96, 29, 65, 5, 56, 96, 95],[10, 76, 49, 36, 41, 18, 60, 44, 81, 34, 56, 7, 13, 83, 82, 16, 7, 38, 33, 55, 91, 54],19,16,17,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{4,10,11,24,27,33,34,36,36,40,42,43,52,58,67,69,77,86,86,88},{40,54,14,58,-64,-60,-98,-64,-52,30,0,-42,74,46,-14,76,84,74,-24,30,96,88,-98,82,44,-86,-92,-52,28,62},{0,0},{64,40,45,93,30,79,24,95,1,84,74,5,9,6,22,33,10,53,33,9,31,21,22,77,21,93,86,68,92,57,27,82,87,11,51,2,27,2,24,57,20,2,32,43},{-94,-50,-24,-12,-6,-6,8,26,28,44},{1,1,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,1},{3,3,4,5,9,18,21,22,25,27,28,33,35,39,39,43,57,58,59,63,65,65,72,77,78,78,80,80,88,92,99},{40,28,-84,-38,82,2,38,10,-10,20,-54,48,56,38,-98,68,-8,-30,-96,-16,28,94,-52,28,34,68,-46,44,-28,-52,-48,-14,-30,24,56,8,-30,-46,18,-68,86,-12},{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},{22,31,75,48,30,39,82,93,26,87,77,87,67,88,19,51,54,48,6,37,38,27}};
vector<vector<int>> param1 {{4,13,34,40,41,47,47,52,55,62,66,66,69,70,73,74,75,76,85,98},{24,34,-52,50,-8,-48,-28,68,-12,-26,0,6,-76,-94,-12,8,38,-88,30,98,-78,-54,-48,42,26,-76,4,46,26,60},{1,1},{48,85,55,12,24,26,88,76,15,34,23,61,2,99,11,37,65,74,92,96,68,50,67,98,89,17,62,18,51,61,41,41,90,64,89,51,48,95,9,86,28,54,64,35},{-96,-94,-86,-70,-52,-18,-6,20,52,52},{1,0,0,0,0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,1,0,1,1},{3,17,18,23,24,24,26,28,34,48,53,54,56,61,64,67,69,74,77,79,79,81,81,82,84,84,85,86,88,92,96},{26,24,-50,18,78,-90,62,88,-36,-96,78,6,-94,-2,-28,-38,66,72,-36,14,-48,-64,-24,82,92,-16,-26,-12,6,34,30,-46,48,-22,34,-64,4,-32,84,-20,32,-22},{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},{18,20,53,87,85,63,6,81,89,82,43,76,59,60,79,96,29,65,5,56,96,95}};
vector<vector<int>> param2 {{6,8,10,12,14,29,41,52,53,54,55,66,69,73,77,77,78,80,90,99},{-8,-24,54,28,92,94,0,62,28,80,82,2,88,-4,-28,80,44,34,-98,36,28,76,-48,40,98,4,22,-36,-20,-70},{0,0},{99,77,11,20,33,91,5,68,75,67,37,70,59,26,2,62,6,97,95,38,46,89,29,61,27,93,26,74,98,85,91,92,40,97,58,44,20,57,65,62,65,26,74,58},{-70,-40,-22,4,12,12,38,54,72,74},{0,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,1,1,0,0,1,0},{1,3,5,8,15,16,27,27,27,28,29,30,32,35,36,37,44,47,57,65,69,70,70,76,76,83,85,87,88,90,92},{66,26,-90,-40,-52,-98,84,88,40,-92,30,28,32,92,18,-34,-42,64,-34,70,-72,28,44,34,76,-78,46,-48,20,54,-2,66,6,56,52,-98,-48,-70,-60,94,90,10},{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},{10,76,49,36,41,18,60,44,81,34,56,7,13,83,82,16,7,38,33,55,91,54}};
vector<int> param3 {10,26,1,42,5,39,24,32,16,19};
vector<int> param4 {12,28,1,27,5,34,16,37,23,16};
vector<int> param5 {18,15,1,31,5,26,29,41,22,17};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER{
static int f_gold ( int N , int K ) {
int ans = 0 ;
for ( int i = 1 ;
i <= N ;
i ++ ) ans += ( i % K ) ;
return ans ;
}
| def f_gold ( N , K ) :
ans = 0 ;
for i in range ( 1 , N + 1 ) :
ans += ( i % K ) ;
return ans ;
|
using namespace std;
int f_gold ( int N, int K ) {
int ans = 0;
for ( int i = 1;
i <= N;
i ++ ) ans += ( i % K );
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(11);
param0.add(36);
param0.add(71);
param0.add(74);
param0.add(66);
param0.add(38);
param0.add(2);
param0.add(73);
param0.add(79);
param0.add(30);
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(69);
param1.add(28);
param1.add(1);
param1.add(84);
param1.add(14);
param1.add(11);
param1.add(87);
param1.add(11);
param1.add(55);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(11,5,),
(36,69,),
(71,28,),
(74,1,),
(66,84,),
(38,14,),
(2,11,),
(73,87,),
(79,11,),
(30,55,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {11,36,71,74,66,38,2,73,79,30};
vector<int> param1 {5,69,28,1,84,14,11,87,11,55};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MAXIMUM_NUMBER_CHARACTERS_TWO_CHARACTER_STRING |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_NUMBER_CHARACTERS_TWO_CHARACTER_STRING{
static int f_gold ( String str ) {
int n = str . length ( ) ;
int res = - 1 ;
for ( int i = 0 ;
i < n - 1 ;
i ++ ) for ( int j = i + 1 ;
j < n ;
j ++ ) if ( str . charAt ( i ) == str . charAt ( j ) ) res = Math . max ( res , Math . abs ( j - i - 1 ) ) ;
return res ;
}
| def f_gold ( str ) :
n = len ( str )
res = - 1
for i in range ( 0 , n - 1 ) :
for j in range ( i + 1 , n ) :
if ( str [ i ] == str [ j ] ) :
res = max ( res , abs ( j - i - 1 ) )
return res
|
using namespace std;
int f_gold ( string & str ) {
int n = str . length ( );
int res = - 1;
for ( int i = 0;
i < n - 1;
i ++ ) for ( int j = i + 1;
j < n;
j ++ ) if ( str [ i ] == str [ j ] ) res = max ( res, abs ( j - i - 1 ) );
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("cI");
param0.add("76478");
param0.add("1");
param0.add("tr");
param0.add("10");
param0.add("01");
param0.add("Rmhzp");
param0.add("5784080133917");
param0.add("1100");
param0.add("OK");
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
('cI',),
('76478',),
('1',),
('tr',),
('10',),
('01',),
('Rmhzp',),
('5784080133917',),
('1100',),
('OK',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"cI","76478","1","tr","10","01","Rmhzp","5784080133917","1100","OK"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
CHECK_ARRAY_MAJORITY_ELEMENT |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_ARRAY_MAJORITY_ELEMENT{
static boolean f_gold ( int a [ ] , int n ) {
HashMap < Integer , Integer > mp = new HashMap < Integer , Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) if ( mp . containsKey ( a [ i ] ) ) mp . put ( a [ i ] , mp . get ( a [ i ] ) + 1 ) ;
else mp . put ( a [ i ] , 1 ) ;
for ( Map . Entry < Integer , Integer > x : mp . entrySet ( ) ) if ( x . getValue ( ) >= n / 2 ) return true ;
return false ;
}
| null |
using namespace std;
bool f_gold ( int a [ ], int n ) {
unordered_map < int, int > mp;
for ( int i = 0;
i < n;
i ++ ) mp [ a [ i ] ] ++;
for ( auto x : mp ) if ( x . second >= n / 2 ) return true;
return false;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{6,14,20,26,32,33,34,35,35,49,51,55,57,64,64,68,70,72,74,77,78,78,78,80,91,91,94});
param0.add(new int[]{-14,-98,-36,68,-20,18,16,-50,66,98,12,-2,-68});
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});
param0.add(new int[]{29,96,94,67,87,65,27,21,60,49,73,85,9,17,72,3,73,69,95,3,30,88,54,94,40});
param0.add(new int[]{-86,-80,-76,-76,-74,-62,-62,-56,-48,-36,-28,-22,-18,-18,-18,-16,-14,-12,-6,-2,10,14,18,24,32,32,40,40,40,42,46,48,50,56,56,56,68,76,84,94,96,96});
param0.add(new int[]{0,1,1,1,0});
param0.add(new int[]{5,8,9,12,14,16,19,29,32,32,37,38,38,39,40,41,43,45,47,51,53,58,58,63,64,65,69,83,84,86,92,93,96,98});
param0.add(new int[]{-68,-50,-20,22,90,86,4,60,-88,82,-4,-54,36,-44,86});
param0.add(new int[]{0,0,0,0,1,1,1,1});
param0.add(new int[]{85,64,25,64,46,35,31,45,93,81,49,33,96,48,37});
List<Integer> param1 = new ArrayList<>();
param1.add(15);
param1.add(11);
param1.add(22);
param1.add(15);
param1.add(23);
param1.add(3);
param1.add(17);
param1.add(13);
param1.add(6);
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());
}
} | null |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{6,14,20,26,32,33,34,35,35,49,51,55,57,64,64,68,70,72,74,77,78,78,78,80,91,91,94},{-14,-98,-36,68,-20,18,16,-50,66,98,12,-2,-68},{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},{29,96,94,67,87,65,27,21,60,49,73,85,9,17,72,3,73,69,95,3,30,88,54,94,40},{-86,-80,-76,-76,-74,-62,-62,-56,-48,-36,-28,-22,-18,-18,-18,-16,-14,-12,-6,-2,10,14,18,24,32,32,40,40,40,42,46,48,50,56,56,56,68,76,84,94,96,96},{0,1,1,1,0},{5,8,9,12,14,16,19,29,32,32,37,38,38,39,40,41,43,45,47,51,53,58,58,63,64,65,69,83,84,86,92,93,96,98},{-68,-50,-20,22,90,86,4,60,-88,82,-4,-54,36,-44,86},{0,0,0,0,1,1,1,1},{85,64,25,64,46,35,31,45,93,81,49,33,96,48,37}};
vector<int> param1 {15,11,22,15,23,3,17,13,6,13};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW{
static int f_gold ( int a , int b ) {
return ( a + b ) / 2 ;
}
| from math import floor
def f_gold ( a , b ) :
return floor ( ( a + b ) / 2 )
|
using namespace std;
int f_gold ( int a, int b ) {
return ( a + b ) / 2;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(6);
param0.add(75);
param0.add(51);
param0.add(19);
param0.add(82);
param0.add(72);
param0.add(48);
param0.add(12);
param0.add(41);
List<Integer> param1 = new ArrayList<>();
param1.add(44);
param1.add(61);
param1.add(20);
param1.add(17);
param1.add(25);
param1.add(98);
param1.add(21);
param1.add(41);
param1.add(17);
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());
}
} |
if __name__ == '__main__':
param = [
(1,44,),
(6,61,),
(75,20,),
(51,17,),
(19,25,),
(82,98,),
(72,21,),
(48,41,),
(12,17,),
(41,80,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {1,6,75,51,19,82,72,48,12,41};
vector<int> param1 {44,61,20,17,25,98,21,41,17,80};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COST_BALANCE_PARANTHESES |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COST_BALANCE_PARANTHESES{
static int f_gold ( String s ) {
if ( s . length ( ) == 0 ) System . out . println ( 0 ) ;
int ans = 0 ;
int o = 0 , c = 0 ;
for ( int i = 0 ;
i < s . length ( ) ;
i ++ ) {
if ( s . charAt ( i ) == '(' ) o ++ ;
if ( s . charAt ( i ) == ')' ) c ++ ;
}
if ( o != c ) return - 1 ;
int [ ] a = new int [ s . length ( ) ] ;
if ( s . charAt ( 0 ) == '(' ) a [ 0 ] = 1 ;
else a [ 0 ] = - 1 ;
if ( a [ 0 ] < 0 ) ans += Math . abs ( a [ 0 ] ) ;
for ( int i = 1 ;
i < s . length ( ) ;
i ++ ) {
if ( s . charAt ( i ) == '(' ) a [ i ] = a [ i - 1 ] + 1 ;
else a [ i ] = a [ i - 1 ] - 1 ;
if ( a [ i ] < 0 ) ans += Math . abs ( a [ i ] ) ;
}
return ans ;
}
| def f_gold ( s ) :
if ( len ( s ) == 0 ) :
print ( 0 )
ans = 0
o = 0
c = 0
for i in range ( len ( s ) ) :
if ( s [ i ] == '(' ) :
o += 1
if ( s [ i ] == ')' ) :
c += 1
if ( o != c ) :
return - 1
a = [ 0 for i in range ( len ( s ) ) ]
if ( s [ 0 ] == '(' ) :
a [ 0 ] = 1
else :
a [ 0 ] = - 1
if ( a [ 0 ] < 0 ) :
ans += abs ( a [ 0 ] )
for i in range ( 1 , len ( s ) ) :
if ( s [ i ] == '(' ) :
a [ i ] = a [ i - 1 ] + 1
else :
a [ i ] = a [ i - 1 ] - 1
if ( a [ i ] < 0 ) :
ans += abs ( a [ i ] )
return ans
|
using namespace std;
int f_gold ( string s ) {
if ( s . length ( ) == 0 ) cout << 0 << endl;
int ans = 0;
int o = 0, c = 0;
for ( int i = 0;
i < s . length ( );
i ++ ) {
if ( s [ i ] == '(' ) o ++;
if ( s [ i ] == ')' ) c ++;
}
if ( o != c ) return - 1;
int a [ s . size ( ) ];
if ( s [ 0 ] == '(' ) a [ 0 ] = 1;
else a [ 0 ] = - 1;
if ( a [ 0 ] < 0 ) ans += abs ( a [ 0 ] );
for ( int i = 1;
i < s . length ( );
i ++ ) {
if ( s [ i ] == '(' ) a [ i ] = a [ i - 1 ] + 1;
else a [ i ] = a [ i - 1 ] - 1;
if ( a [ i ] < 0 ) ans += abs ( a [ i ] );
}
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("()");
param0.add("))((");
param0.add("())");
param0.add("(()");
param0.add("(()()())");
param0.add("))())(()(())");
param0.add("))(())((");
param0.add("49");
param0.add("00001111");
param0.add("KDahByG ");
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());
}
} |
if __name__ == '__main__':
param = [
('()',),
('))((',),
('())',),
('(()',),
('(()()())',),
('))())(()(())',),
('))(())((',),
('49',),
('00001111',),
('KDahByG ',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"()","))((","())","(()","(()()())","))())(()(())","))(())((","49","00001111","KDahByG "};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_FIND_SMALLEST_DIFFERENCE_ANGLES_TWO_PARTS_GIVEN_CIRCLE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_FIND_SMALLEST_DIFFERENCE_ANGLES_TWO_PARTS_GIVEN_CIRCLE{
public static int f_gold ( int arr [ ] , int n ) {
int l = 0 , sum = 0 , ans = 360 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
sum += arr [ i ] ;
while ( sum >= 180 ) {
ans = Math . min ( ans , 2 * Math . abs ( 180 - sum ) ) ;
sum -= arr [ l ] ;
l ++ ;
}
ans = Math . min ( ans , 2 * Math . abs ( 180 - sum ) ) ;
}
return ans ;
}
| def f_gold ( arr , n ) :
l = 0
_sum = 0
ans = 360
for i in range ( n ) :
_sum += arr [ i ]
while _sum >= 180 :
ans = min ( ans , 2 * abs ( 180 - _sum ) )
_sum -= arr [ l ]
l += 1
ans = min ( ans , 2 * abs ( 180 - _sum ) )
return ans
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
int l = 0, sum = 0, ans = 360;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
while ( sum >= 180 ) {
ans = min ( ans, 2 * abs ( 180 - sum ) );
sum -= arr [ l ];
l ++;
}
ans = min ( ans, 2 * abs ( 180 - sum ) );
}
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,4,5,5,13,14,14,16,19,20,30,31,32,33,35,38,38,42,44,44,48,48,52,58,60,64,65,66,68,69,70,70,71,72,73,79,81,83,83,84,86,87,88,88,91,92,95,95,98});
param0.add(new int[]{-56,88,-50,70,20,58,42,-56,-52,-78,98,20,-26,4,20,-66,-46,-58,74,74,-72,2,16,-78,-4,10,58,60,-46,-2,32,-96,24,-6,90,-64,-24,-38,26,66,-42,-86,48,92,28,6,-54,-6});
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});
param0.add(new int[]{52,67,62});
param0.add(new int[]{-56,-22,32,42,66});
param0.add(new int[]{1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0});
param0.add(new int[]{38,46,58,72});
param0.add(new int[]{16,62,90,40,30,-56,-92,-56,60,42,-64,92,-30,-70,42,-48,-54,54,48,94,-44,-46,10,48,22,-24,-62,34,60,24,-60,50,40,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,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{86,43,74,84,86,14,45,7,92,36,79,13,67,18,96,77,13,22,28,36,57,56,99,57,8,48,5,79,65,64,96,6,36,91,53,55,11,12,80,99,50,40,4,9,52,41});
List<Integer> param1 = new ArrayList<>();
param1.add(27);
param1.add(29);
param1.add(25);
param1.add(1);
param1.add(4);
param1.add(10);
param1.add(2);
param1.add(20);
param1.add(37);
param1.add(40);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([4, 4, 5, 5, 13, 14, 14, 16, 19, 20, 30, 31, 32, 33, 35, 38, 38, 42, 44, 44, 48, 48, 52, 58, 60, 64, 65, 66, 68, 69, 70, 70, 71, 72, 73, 79, 81, 83, 83, 84, 86, 87, 88, 88, 91, 92, 95, 95, 98],27,),
([-56, 88, -50, 70, 20, 58, 42, -56, -52, -78, 98, 20, -26, 4, 20, -66, -46, -58, 74, 74, -72, 2, 16, -78, -4, 10, 58, 60, -46, -2, 32, -96, 24, -6, 90, -64, -24, -38, 26, 66, -42, -86, 48, 92, 28, 6, -54, -6],29,),
([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],25,),
([52, 67, 62],1,),
([-56, -22, 32, 42, 66],4,),
([1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0],10,),
([38, 46, 58, 72],2,),
([16, 62, 90, 40, 30, -56, -92, -56, 60, 42, -64, 92, -30, -70, 42, -48, -54, 54, 48, 94, -44, -46, 10, 48, 22, -24, -62, 34, 60, 24, -60, 50, 40, 34],20,),
([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],37,),
([86, 43, 74, 84, 86, 14, 45, 7, 92, 36, 79, 13, 67, 18, 96, 77, 13, 22, 28, 36, 57, 56, 99, 57, 8, 48, 5, 79, 65, 64, 96, 6, 36, 91, 53, 55, 11, 12, 80, 99, 50, 40, 4, 9, 52, 41],40,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{4,4,5,5,13,14,14,16,19,20,30,31,32,33,35,38,38,42,44,44,48,48,52,58,60,64,65,66,68,69,70,70,71,72,73,79,81,83,83,84,86,87,88,88,91,92,95,95,98},{-56,88,-50,70,20,58,42,-56,-52,-78,98,20,-26,4,20,-66,-46,-58,74,74,-72,2,16,-78,-4,10,58,60,-46,-2,32,-96,24,-6,90,-64,-24,-38,26,66,-42,-86,48,92,28,6,-54,-6},{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},{52,67,62},{-56,-22,32,42,66},{1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0},{38,46,58,72},{16,62,90,40,30,-56,-92,-56,60,42,-64,92,-30,-70,42,-48,-54,54,48,94,-44,-46,10,48,22,-24,-62,34,60,24,-60,50,40,34},{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},{86,43,74,84,86,14,45,7,92,36,79,13,67,18,96,77,13,22,28,36,57,56,99,57,8,48,5,79,65,64,96,6,36,91,53,55,11,12,80,99,50,40,4,9,52,41}};
vector<int> param1 {27,29,25,1,4,10,2,20,37,40};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
WRITE_ONE_LINE_C_FUNCTION_TO_FIND_WHETHER_A_NO_IS_POWER_OF_TWO_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class WRITE_ONE_LINE_C_FUNCTION_TO_FIND_WHETHER_A_NO_IS_POWER_OF_TWO_1{
static boolean f_gold ( int x ) {
return x != 0 && ( ( x & ( x - 1 ) ) == 0 ) ;
}
| def f_gold ( x ) :
return ( x and ( not ( x & ( x - 1 ) ) ) )
| null |
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(2);
param0.add(8);
param0.add(1024);
param0.add(24);
param0.add(7);
param0.add(46);
param0.add(61);
param0.add(73);
param0.add(66);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(1,),
(2,),
(8,),
(1024,),
(24,),
(7,),
(46,),
(61,),
(73,),
(66,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
HARDY_RAMANUJAN_THEOREM |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class HARDY_RAMANUJAN_THEOREM{
static int f_gold ( int n ) {
int count = 0 ;
if ( n % 2 == 0 ) {
count ++ ;
while ( n % 2 == 0 ) n = n / 2 ;
}
for ( int i = 3 ;
i <= Math . sqrt ( n ) ;
i = i + 2 ) {
if ( n % i == 0 ) {
count ++ ;
while ( n % i == 0 ) n = n / i ;
}
}
if ( n > 2 ) count ++ ;
return count ;
}
| import math
def f_gold ( n ) :
count = 0
if ( n % 2 == 0 ) :
count = count + 1
while ( n % 2 == 0 ) :
n = int ( n / 2 )
i = 3
while ( i <= int ( math.sqrt ( n ) ) ) :
if ( n % i == 0 ) :
count = count + 1
while ( n % i == 0 ) :
n = int ( n / i )
i = i + 2
if ( n > 2 ) :
count = count + 1
return count
|
using namespace std;
int f_gold ( int n ) {
int count = 0;
if ( n % 2 == 0 ) {
count ++;
while ( n % 2 == 0 ) n = n / 2;
}
for ( int i = 3;
i <= sqrt ( n );
i = i + 2 ) {
if ( n % i == 0 ) {
count ++;
while ( n % i == 0 ) n = n / i;
}
}
if ( n > 2 ) count ++;
return count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(99);
param0.add(33);
param0.add(50);
param0.add(17);
param0.add(18);
param0.add(69);
param0.add(23);
param0.add(18);
param0.add(94);
param0.add(16);
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());
}
} |
if __name__ == '__main__':
param = [
(99,),
(33,),
(50,),
(17,),
(18,),
(69,),
(23,),
(18,),
(94,),
(16,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {99,33,50,17,18,69,23,18,94,16};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
GCD_ELEMENTS_GIVEN_RANGE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class GCD_ELEMENTS_GIVEN_RANGE{
static int f_gold ( int n , int m ) {
return ( n == m ) ? n : 1 ;
}
| def f_gold ( n , m ) :
return n if ( n == m ) else 1
|
using namespace std;
int f_gold ( int n, int m ) {
return ( n == m ) ? n : 1;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(57);
param0.add(22);
param0.add(17);
param0.add(74);
param0.add(93);
param0.add(56);
param0.add(5);
param0.add(5);
param0.add(9);
param0.add(98);
List<Integer> param1 = new ArrayList<>();
param1.add(57);
param1.add(22);
param1.add(17);
param1.add(74);
param1.add(22);
param1.add(54);
param1.add(33);
param1.add(68);
param1.add(75);
param1.add(21);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(57,57,),
(22,22,),
(17,17,),
(74,74,),
(93,22,),
(56,54,),
(5,33,),
(5,68,),
(9,75,),
(98,21,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {57,22,17,74,93,56,5,5,9,98};
vector<int> param1 {57,22,17,74,22,54,33,68,75,21};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_MINIMUM_SUM_FACTORS_NUMBER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_MINIMUM_SUM_FACTORS_NUMBER{
static int f_gold ( int num ) {
int sum = 0 ;
for ( int i = 2 ;
i * i <= num ;
i ++ ) {
while ( num % i == 0 ) {
sum += i ;
num /= i ;
}
}
sum += num ;
return sum ;
}
| def f_gold ( num ) :
sum = 0
i = 2
while ( i * i <= num ) :
while ( num % i == 0 ) :
sum += i
num /= i
i += 1
sum += num
return sum
|
using namespace std;
int f_gold ( int num ) {
int sum = 0;
for ( int i = 2;
i * i <= num;
i ++ ) {
while ( num % i == 0 ) {
sum += i;
num /= i;
}
}
sum += num;
return sum;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(83);
param0.add(88);
param0.add(60);
param0.add(6);
param0.add(26);
param0.add(98);
param0.add(38);
param0.add(90);
param0.add(76);
param0.add(66);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(83,),
(88,),
(60,),
(6,),
(26,),
(98,),
(38,),
(90,),
(76,),
(66,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {83,88,60,6,26,98,38,90,76,66};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP{
static double f_gold ( int n ) {
return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 ) ;
}
| def f_gold ( n ) :
return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 )
|
using namespace std;
double f_gold ( int n ) {
return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(46);
param0.add(5);
param0.add(44);
param0.add(15);
param0.add(72);
param0.add(2);
param0.add(86);
param0.add(17);
param0.add(30);
param0.add(42);
for(int i = 0; i < param0.size(); ++i)
{
if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(46,),
(5,),
(44,),
(15,),
(72,),
(2,),
(86,),
(17,),
(30,),
(42,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001:
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {46,5,44,15,72,2,86,17,30,42};
for(int i = 0; i < param0.size(); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
GOLD_MINE_PROBLEM |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class GOLD_MINE_PROBLEM{
static int f_gold ( int gold [ ] [ ] , int m , int n ) {
int goldTable [ ] [ ] = new int [ m ] [ n ] ;
for ( int [ ] rows : goldTable ) Arrays . fill ( rows , 0 ) ;
for ( int col = n - 1 ;
col >= 0 ;
col -- ) {
for ( int row = 0 ;
row < m ;
row ++ ) {
int right = ( col == n - 1 ) ? 0 : goldTable [ row ] [ col + 1 ] ;
int right_up = ( row == 0 || col == n - 1 ) ? 0 : goldTable [ row - 1 ] [ col + 1 ] ;
int right_down = ( row == m - 1 || col == n - 1 ) ? 0 : goldTable [ row + 1 ] [ col + 1 ] ;
goldTable [ row ] [ col ] = gold [ row ] [ col ] + Math . max ( right , Math . max ( right_up , right_down ) ) ;
;
}
}
int res = goldTable [ 0 ] [ 0 ] ;
for ( int i = 1 ;
i < m ;
i ++ ) res = Math . max ( res , goldTable [ i ] [ 0 ] ) ;
return res ;
}
| def f_gold ( gold , m , n ) :
goldTable = [ [ 0 for i in range ( n ) ] for j in range ( m ) ]
for col in range ( n - 1 , - 1 , - 1 ) :
for row in range ( m ) :
if ( col == n - 1 ) :
right = 0
else :
right = goldTable [ row ] [ col + 1 ]
if ( row == 0 or col == n - 1 ) :
right_up = 0
else :
right_up = goldTable [ row - 1 ] [ col + 1 ]
if ( row == m - 1 or col == n - 1 ) :
right_down = 0
else :
right_down = goldTable [ row + 1 ] [ col + 1 ]
goldTable [ row ] [ col ] = gold [ row ] [ col ] + max ( right , right_up , right_down )
res = goldTable [ 0 ] [ 0 ]
for i in range ( 1 , m ) :
res = max ( res , goldTable [ i ] [ 0 ] )
return res
| null |
public static void main(String args[]) {
int n_success = 0;
List<int [ ] [ ]> param0 = new ArrayList<>();
param0.add(new int[][]{new int[]{19,20,23,25,28,35,35,40,45,46,48,54,57,59,74,76,78,82,84,86,87,90,91,96},new int[]{9,13,17,20,26,27,42,46,48,62,67,69,72,73,76,77,82,83,86,93,95,95,98,98},new int[]{2,12,18,25,29,30,31,33,39,45,48,49,56,57,60,61,64,72,73,78,79,94,98,98},new int[]{2,3,10,15,20,22,23,23,27,29,36,40,42,46,48,53,53,60,60,70,73,78,98,98},new int[]{6,10,11,12,15,20,28,28,33,40,43,48,51,57,60,60,61,62,66,68,72,75,92,97},new int[]{2,11,12,14,15,19,21,26,30,35,36,36,46,51,56,63,69,74,82,88,89,89,89,94},new int[]{1,4,5,10,11,13,15,18,23,28,44,53,53,66,67,69,70,71,71,77,79,87,88,99},new int[]{2,2,5,7,7,8,9,17,26,30,35,39,41,43,49,63,64,65,70,70,80,89,96,99},new int[]{4,7,11,12,14,16,20,21,27,41,42,42,43,48,49,52,62,66,75,76,81,86,97,99},new int[]{1,12,13,15,17,19,26,34,47,47,47,48,51,52,53,60,61,63,64,74,77,82,87,93},new int[]{1,2,4,8,14,19,22,24,31,31,37,54,60,63,66,68,76,80,80,84,88,92,93,99},new int[]{1,2,3,6,7,9,11,19,25,27,35,36,45,52,57,57,86,88,89,89,93,94,97,99},new int[]{7,8,9,10,11,30,33,34,37,48,50,50,56,60,66,70,72,73,76,79,86,88,95,95},new int[]{1,4,5,5,6,11,26,27,32,36,43,47,47,47,50,56,56,66,76,78,78,94,97,99},new int[]{6,15,18,27,36,38,40,44,47,48,64,64,68,70,76,79,83,85,86,90,93,93,95,97},new int[]{1,4,4,10,11,12,16,19,20,22,22,23,35,49,51,58,66,66,68,76,77,81,86,94},new int[]{2,9,12,12,13,20,20,35,44,48,51,55,62,66,71,71,73,74,78,83,89,90,93,99},new int[]{9,15,20,24,25,31,32,35,36,49,50,51,52,55,58,63,79,79,85,89,90,96,98,99},new int[]{6,10,12,15,16,17,17,21,24,44,48,53,58,60,61,64,67,74,81,84,86,87,88,92},new int[]{7,10,14,20,21,27,30,30,31,34,36,37,39,45,55,55,63,64,66,82,88,88,94,95},new int[]{6,11,13,21,22,23,23,24,28,35,36,40,41,53,55,57,63,66,73,74,77,78,87,96},new int[]{4,17,19,23,25,38,42,45,50,57,61,62,62,62,62,64,75,78,79,79,82,85,86,93},new int[]{14,15,21,27,38,39,40,42,43,43,50,51,54,58,58,59,60,62,63,70,75,85,91,92},new int[]{6,7,11,12,20,30,40,41,41,44,47,51,52,53,59,75,76,77,84,87,91,93,95,97}});
param0.add(new int[][]{new int[]{38,12,92,-6,8},new int[]{80,66,-56,-54,-74},new int[]{36,6,52,-78,-92},new int[]{80,76,88,10,-30},new int[]{32,64,18,58,-2}});
param0.add(new int[][]{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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},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},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},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},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},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},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},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},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,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,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,1,1,1,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,1,1,1,1,1,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,1,1,1,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,1,1,1,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,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,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,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},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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}});
param0.add(new int[][]{new int[]{45,96,71},new int[]{87,80,90},new int[]{96,72,49}});
param0.add(new int[][]{new int[]{-98,-98,-92,-82,-80,-72,-70,-48,-38,-32,-32,-28,-16,-2,0,0,20,20,24,30,36,40,46,58,62,62,66,74,74,76,80,82},new int[]{-96,-94,-94,-88,-80,-64,-54,-48,-46,-44,-38,-36,-34,-32,-30,-30,-24,-16,2,8,26,36,36,40,48,52,78,80,80,80,88,94},new int[]{-98,-98,-92,-88,-88,-88,-62,-60,-46,-34,-24,-16,-14,8,10,16,18,20,30,44,48,48,50,54,54,70,70,76,78,82,84,94},new int[]{-94,-80,-76,-74,-66,-58,-48,-38,-26,-16,-12,-10,-8,-2,0,8,10,10,12,22,28,32,40,42,44,50,60,72,84,86,90,94},new int[]{-88,-72,-62,-46,-44,-44,-34,-30,-28,-28,-18,-18,-10,-6,-4,-2,2,8,8,22,32,34,38,46,54,54,54,76,76,80,84,86},new int[]{-94,-94,-82,-80,-78,-70,-58,-46,-36,-28,-10,-10,0,2,2,4,8,14,24,32,34,34,38,42,42,42,58,84,86,88,94,96},new int[]{-98,-96,-96,-88,-80,-68,-62,-54,-52,-28,-28,-26,-22,-12,-8,-4,2,8,16,16,28,30,32,38,54,58,66,70,74,76,96,98},new int[]{-86,-84,-80,-62,-62,-58,-52,-50,-42,-38,-36,-36,-28,-18,-4,10,14,38,40,46,46,48,54,72,72,74,84,86,86,88,90,96},new int[]{-78,-74,-66,-62,-48,-26,-18,-12,6,8,18,22,24,34,36,38,42,46,64,66,66,68,70,72,76,76,78,80,84,86,88,90},new int[]{-98,-98,-92,-84,-74,-70,-68,-50,-50,-48,-48,-36,-30,-6,-4,-4,-4,10,24,28,30,32,50,58,60,62,76,78,84,90,90,98},new int[]{-98,-96,-82,-78,-74,-62,-62,-60,-58,-56,-50,-42,-36,-32,-20,-4,0,2,6,14,16,26,26,42,46,70,70,72,78,82,86,90},new int[]{-86,-80,-80,-76,-70,-66,-58,-54,-50,-44,-42,-36,-32,-24,-22,-16,-8,-6,2,4,16,18,36,40,46,52,58,60,62,74,76,98},new int[]{-86,-78,-66,-64,-58,-52,-38,-32,-30,-28,-18,-18,-16,-10,-8,2,2,4,6,6,14,22,36,36,42,52,54,76,78,84,88,98},new int[]{-98,-94,-94,-74,-72,-52,-50,-38,-30,-26,-16,-14,-4,2,2,4,4,16,22,24,28,32,34,34,36,50,56,66,68,80,82,94},new int[]{-98,-90,-86,-78,-74,-72,-70,-58,-56,-52,-50,-44,-30,-24,-24,-2,0,6,20,32,40,40,46,48,50,58,64,74,84,90,90,90},new int[]{-98,-92,-86,-84,-82,-82,-78,-66,-64,-50,-40,-24,-24,-22,-22,-14,-12,-8,0,8,12,14,20,26,42,42,58,64,82,86,92,96},new int[]{-98,-90,-86,-76,-68,-64,-64,-64,-54,-54,-52,-44,-34,-34,-12,6,10,12,26,38,40,40,60,68,68,68,74,78,80,88,98,98},new int[]{-92,-92,-68,-60,-54,-52,-48,-46,-40,-36,-32,-30,-28,-24,-24,-18,-4,-2,2,28,32,38,42,46,60,62,72,78,80,82,82,90},new int[]{-98,-86,-80,-80,-76,-64,-62,-60,-50,-34,-22,-18,-14,-12,-12,-10,2,6,10,18,22,28,32,32,36,38,48,66,72,82,90,96},new int[]{-92,-90,-86,-84,-82,-78,-72,-72,-68,-68,-60,-46,-38,-30,-28,2,8,10,18,22,24,28,40,40,52,54,64,74,80,82,86,96},new int[]{-96,-86,-82,-82,-70,-70,-62,-62,-58,-58,-56,-56,-52,-52,-46,-42,-38,-34,-26,-24,-6,-6,-2,8,22,26,38,52,70,74,82,90},new int[]{-92,-70,-64,-62,-56,-54,-48,-42,-36,-22,-22,-20,-14,-14,-2,2,2,12,22,26,60,64,68,70,70,74,74,80,84,88,88,90},new int[]{-98,-98,-84,-84,-84,-80,-64,-60,-54,-54,-44,-34,-30,-18,-16,-14,2,8,10,28,30,32,50,58,62,62,64,72,78,78,82,88},new int[]{-96,-94,-86,-86,-60,-56,-52,-50,-34,-26,-14,-10,-6,-4,2,18,20,30,38,40,42,46,48,52,54,66,68,74,74,84,92,98},new int[]{-98,-96,-96,-94,-66,-50,-44,-44,-38,-30,-30,-22,-20,-18,-16,-14,-14,-4,-4,-2,2,22,30,42,52,54,60,70,80,84,92,96},new int[]{-96,-84,-80,-78,-76,-74,-68,-64,-60,-58,-54,-46,-26,-14,-14,-10,-2,4,10,10,12,26,28,28,38,40,42,42,50,82,88,88},new int[]{-90,-78,-78,-76,-76,-76,-64,-64,-62,-44,-40,-32,-28,-24,-10,4,24,28,30,44,58,60,62,72,74,76,76,78,80,82,82,90},new int[]{-88,-86,-72,-66,-60,-60,-58,-58,-54,-38,-32,-30,-16,-14,-10,-10,-6,0,8,12,16,20,22,26,30,34,36,44,52,64,66,88},new int[]{-98,-94,-92,-92,-88,-68,-64,-64,-62,-44,-44,-36,-32,-32,-24,-18,-16,-6,-6,6,8,14,20,26,28,36,38,40,56,56,66,84},new int[]{-98,-94,-92,-90,-58,-56,-44,-42,-40,-40,-36,-32,-32,-12,-10,-2,-2,-2,0,8,16,18,26,26,42,46,52,54,84,86,88,94},new int[]{-80,-78,-78,-70,-58,-56,-56,-36,-34,-32,-6,4,6,10,20,32,40,42,54,58,58,64,66,66,66,66,80,82,82,82,88,90},new int[]{-92,-90,-78,-74,-70,-50,-48,-46,-46,-40,-40,-36,-24,-22,-20,-10,-10,-8,-8,-4,6,14,20,32,38,46,46,48,60,68,68,74}});
param0.add(new int[][]{new int[]{1,0,0,1,0,1,0,1,1,1,0,0,1,1,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0},new int[]{1,1,0,1,1,0,0,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,0,0,1,0,1,0,0},new int[]{0,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1},new int[]{0,0,1,1,1,1,1,0,0,1,0,1,0,0,0,0,0,0,1,0,0,1,0,1,1,1,0,0,1},new int[]{1,0,0,0,0,1,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,1,0,0,0,0,1,1,1},new int[]{0,1,1,1,1,0,1,1,0,0,1,1,0,1,1,0,1,1,0,0,0,1,1,1,0,1,1,0,0},new int[]{0,0,1,0,1,1,1,1,0,0,1,1,1,1,0,1,1,0,0,1,0,0,0,1,1,0,0,0,0},new int[]{1,0,1,0,1,0,1,1,0,0,0,0,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,0},new int[]{0,1,0,0,0,0,0,1,1,1,1,1,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,1,1},new int[]{1,0,1,0,0,0,1,0,1,1,1,1,0,1,0,1,1,0,1,1,0,1,1,1,1,1,1,0,0},new int[]{0,1,0,1,1,0,1,0,0,0,1,1,0,0,0,0,1,1,0,1,0,1,1,1,0,1,0,0,0},new int[]{0,1,0,1,1,0,1,0,0,1,0,0,0,0,1,0,0,1,0,1,1,0,1,0,0,0,0,1,1},new int[]{0,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,0,1,1},new int[]{1,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,1,0,0},new int[]{0,1,0,0,0,0,1,0,1,0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,1,0,1,1,0},new int[]{0,1,1,0,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,1,0,1,0,0,1,1,0,0,1},new int[]{1,1,0,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,1,1},new int[]{0,1,0,1,0,1,1,1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,1,1,0,0,0,1,0},new int[]{0,1,0,0,0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,0,1,0,0,1,1},new int[]{0,1,0,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,1},new int[]{1,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,0,1,1,1,1,1,0,1,1,1,1,1},new int[]{0,0,0,1,0,1,1,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,0,0,1,1,0,1},new int[]{0,1,0,1,0,1,1,1,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,1,1,0,0},new int[]{0,0,0,0,0,1,1,1,1,1,0,1,1,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0},new int[]{0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1,1,1,0,0,1,0,1,0,0},new int[]{1,1,1,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,1,1,0,0,1,1,0},new int[]{0,1,0,0,1,0,0,1,0,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,0},new int[]{0,1,0,1,0,1,0,1,1,0,1,1,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,1},new int[]{0,1,1,1,0,1,0,0,0,0,1,1,1,1,1,1,0,1,0,1,1,1,0,1,0,0,1,1,1}});
param0.add(new int[][]{new int[]{13,26,41,59,89,95,99},new int[]{5,21,27,30,41,84,92},new int[]{6,46,75,76,95,96,97},new int[]{13,21,33,62,74,85,88},new int[]{2,3,15,25,56,73,97},new int[]{38,65,71,76,82,86,86},new int[]{2,28,32,51,73,77,90}});
param0.add(new int[][]{new int[]{10,-88,60,-18,-24,-72,-10,8,-12,16,-22,-94,12,-8,66,10,6,6,52,-6,-18,98,44,48,-38,-32,-84,-56,-52,-60,-6,-74,-54,76,-74,-36,-44,94,-52,74,14},new int[]{0,-12,-26,-24,-72,28,-72,-44,32,-28,-98,-64,-48,72,-74,-10,10,-44,30,-12,-26,-38,-14,72,-42,68,26,78,-6,-58,-70,74,24,-68,-22,48,14,86,-14,58,-52},new int[]{48,-18,34,-38,8,96,-22,14,-48,74,58,-70,-30,-40,-12,-90,8,-98,-56,60,46,38,-82,32,-24,-68,-92,72,2,-96,-96,72,38,38,12,-18,-36,-94,-68,-32,54},new int[]{-28,4,-84,-68,-56,-60,-12,82,2,14,-2,62,42,36,56,-12,-30,-72,-70,10,96,-84,-44,64,2,70,-78,-62,-48,-94,48,28,-78,64,-4,80,-34,4,68,-18,-48},new int[]{-38,0,34,28,80,-36,-4,52,-86,84,44,16,34,8,-38,-80,-62,-78,62,50,98,-88,-40,-66,-16,-20,-34,-84,48,-28,-4,-10,34,-10,52,-58,-92,-46,14,-86,66},new int[]{-8,-56,-18,64,-64,-82,14,-60,-4,-32,-52,-70,62,56,-58,-26,-32,84,88,28,-34,-56,12,56,54,92,-90,8,84,18,12,40,-80,-24,66,-22,-14,76,-46,-18,10},new int[]{-22,-34,-92,-58,-6,-26,26,30,-92,82,12,-60,-60,-10,24,78,-78,50,-6,10,-32,-10,-6,72,-90,-54,-32,-88,-86,30,70,-4,84,-40,-52,32,-46,-92,-18,-92,-16},new int[]{-78,0,56,-10,14,64,84,-6,-32,-54,42,-22,26,-94,32,54,-32,20,-76,6,-68,-72,-54,32,14,-36,-2,-74,44,76,28,-34,20,84,56,-60,-6,30,-4,36,54},new int[]{90,-48,-22,20,26,48,-64,88,20,46,-86,-92,2,24,-4,4,-36,-12,28,-38,-84,48,-46,-30,68,-8,-30,-10,-2,64,-4,-30,48,2,96,26,-76,-26,14,-94,86},new int[]{-92,-66,-14,94,-92,-2,30,-8,88,34,-52,60,52,-10,-18,28,2,94,-12,62,-48,30,22,-26,70,-84,-4,82,-42,32,62,30,-54,80,-34,32,-94,-8,-40,-28,32},new int[]{-28,26,2,86,-74,8,-38,84,-6,18,-38,48,-60,36,-58,12,-76,62,-4,-14,-18,-74,-56,-16,48,74,-46,12,-42,-18,62,18,98,-80,-92,22,-80,-74,10,-72,-88},new int[]{12,54,48,60,32,-74,54,50,32,-38,96,20,72,-32,76,-30,96,58,-2,40,12,72,94,82,70,74,-90,-82,-2,6,2,-18,-34,-58,-66,12,72,68,-76,-42,-4},new int[]{-60,-30,70,42,-52,4,32,20,-40,-34,26,-74,36,-10,-16,0,16,-66,4,-46,-54,-50,-76,52,-4,-96,60,-62,82,8,56,70,32,-44,-68,-8,-10,-42,44,84,28},new int[]{-8,94,98,78,38,8,22,-6,96,-8,48,26,-22,12,-46,92,80,12,62,4,80,-20,16,-28,70,-88,44,68,22,8,6,84,98,4,-68,-44,-4,94,40,38,32},new int[]{54,80,-38,14,-36,-96,28,-86,-36,-42,34,22,16,8,22,36,-24,-32,78,36,12,-10,-50,8,56,-74,-92,-64,-74,86,28,38,48,20,82,60,-10,32,-60,58,-52},new int[]{6,18,-12,-80,-42,-12,-34,-38,16,42,98,6,40,-28,90,76,94,-36,74,0,-52,-52,24,0,78,44,2,-94,72,96,8,64,-40,-42,-2,-80,52,-86,58,-72,-10},new int[]{-2,-38,56,24,44,50,58,-56,96,-96,56,-72,-86,68,58,-32,48,24,-68,-66,64,0,-82,-14,30,4,-8,-8,22,-38,-4,-78,-50,90,-72,-2,-66,50,-60,26,-10},new int[]{42,-54,82,-20,-94,32,6,-58,62,86,66,-10,0,78,-14,66,-74,38,-42,-2,-42,-66,-52,-38,38,32,-16,78,80,40,-98,-98,-62,-36,18,8,12,-20,94,-92,52},new int[]{48,-80,76,-36,90,6,-30,-22,10,-6,42,-86,-52,84,-86,-12,-92,-72,78,28,-98,38,80,76,18,64,66,-8,-6,-66,-92,86,-26,-98,-88,62,82,-8,-34,-64,44},new int[]{-26,-28,92,-82,-36,-24,-58,32,44,-70,2,-72,54,-64,58,92,-36,-14,-22,-70,-30,-10,-84,-22,82,88,-18,24,-18,-22,4,72,28,-46,48,-14,92,24,-82,92,40},new int[]{-32,-60,-32,72,98,-96,34,-86,-92,-4,-52,-52,18,-56,-36,-34,-22,-28,72,54,-20,-42,64,0,26,34,-20,-6,-80,-48,22,12,-58,2,58,-2,-34,92,-34,32,40},new int[]{70,60,-76,-54,-76,56,-78,44,42,-78,-40,12,50,46,48,-12,62,-46,-4,-62,24,-10,54,76,22,4,26,96,-82,-88,-72,48,-18,16,-22,48,0,-32,82,76,96},new int[]{38,-80,-92,14,2,-92,62,98,-34,-30,-32,-32,72,-12,-12,30,-24,-76,-58,-24,-80,48,-22,54,-80,64,-90,-26,56,-46,18,-70,96,86,68,-72,52,28,-98,-42,90},new int[]{-20,-66,94,20,14,-82,94,60,92,46,-86,18,-44,42,96,40,90,-96,-10,44,-54,-50,10,-48,78,66,-62,42,-88,-58,80,36,-20,70,82,-12,-90,14,-94,8,90},new int[]{40,54,2,12,-98,-96,48,-10,-64,-16,22,98,-98,76,-28,76,66,56,-10,-34,44,14,86,94,50,-18,-76,-46,30,94,42,-70,-72,-48,48,-88,94,50,84,-64,24},new int[]{-14,-96,94,-42,94,52,58,62,46,14,-28,-68,42,-80,70,-44,-94,-66,54,-60,-58,30,40,-30,78,-76,-40,24,98,6,-42,72,20,64,-84,-30,84,-34,-16,-86,70},new int[]{-20,-66,90,0,58,-12,-14,-98,-68,-12,82,0,60,94,-10,96,62,-66,-22,84,-20,-56,-60,98,-18,96,10,48,2,52,-64,-70,8,-88,-20,-50,56,-10,72,-30,-68},new int[]{-32,66,70,82,-30,24,58,0,-80,-96,18,-44,82,76,-10,34,-34,38,-30,-88,-68,2,16,4,-22,36,58,-56,48,70,46,24,-86,-94,2,6,-70,-68,-82,-20,30},new int[]{44,90,0,98,94,-34,-8,66,80,-98,32,-26,96,-98,14,22,74,-62,-4,-52,44,-62,-6,26,86,-18,88,-20,4,72,-10,4,34,4,-36,-76,8,80,-84,-50,14},new int[]{40,-16,96,22,-26,18,-18,78,-72,-84,-10,-42,18,4,26,0,70,-84,84,-68,54,-16,-34,32,-28,86,-8,40,90,-92,-78,16,-78,84,-8,-28,-12,-44,10,-10,-42},new int[]{98,72,68,-4,68,68,66,34,52,-58,12,2,-62,64,-40,42,60,-88,-72,-20,-46,46,94,32,-72,-92,-56,-98,-64,66,-70,-42,-44,-88,-92,10,50,-26,-40,-70,84},new int[]{-58,84,-40,-16,-72,10,-26,76,-72,-14,50,16,6,6,-8,-82,96,-80,-70,46,66,-46,96,68,-50,54,4,-32,32,62,-80,36,88,88,74,-22,-80,8,98,62,-42},new int[]{50,-68,82,-28,72,-78,82,-84,80,-2,-94,-46,-16,16,-64,-12,-38,-84,98,-68,-74,14,88,-66,-50,58,98,70,-34,-4,86,28,60,-34,-52,-22,12,40,98,42,66},new int[]{90,-58,-18,-70,-12,-86,2,26,70,-76,80,-38,68,-30,-62,-2,0,88,-62,-44,84,32,98,28,-42,80,28,80,-70,2,80,74,92,72,56,-14,28,-52,-28,-50,0},new int[]{-52,-46,30,6,-10,76,60,-34,-38,-58,12,58,-50,82,-40,-16,14,94,84,-22,-36,22,14,84,-38,62,70,-34,-30,-18,46,-82,-18,96,-14,-58,16,96,-76,-60,50},new int[]{68,74,10,-20,14,-62,-70,-86,-36,90,44,-12,74,-4,-34,-16,84,-66,-20,86,52,88,6,64,60,4,-10,-90,-48,82,-26,14,36,-44,38,34,-86,-80,90,8,-70},new int[]{-60,56,-54,10,-82,66,14,-16,-46,-88,96,-58,4,44,74,32,22,44,94,48,-96,-74,-2,-90,32,62,36,56,-10,10,84,-64,54,-32,-42,36,-32,14,-86,-98,10},new int[]{98,-62,76,-38,36,20,72,-18,2,-18,-66,16,-66,28,-8,-44,98,-12,12,-94,38,38,-6,-40,66,-34,16,-96,-60,24,-50,96,-58,-26,74,-48,72,-26,-38,28,82},new int[]{-60,-62,24,-74,72,22,56,78,-56,-10,86,-60,54,-92,18,36,-26,66,-18,54,50,-70,-10,20,-4,-6,-34,80,-76,-10,76,-72,-6,-44,-64,88,78,78,-8,-26,2},new int[]{-28,-98,-50,18,8,-16,16,58,4,28,14,76,96,56,56,-86,14,-56,74,-28,-34,30,74,30,72,18,42,-64,-94,54,-14,-42,80,40,-94,-36,-32,-70,18,-26,86},new int[]{28,6,-82,6,-2,-26,6,-66,-20,-36,6,6,70,4,-96,42,-66,-44,-42,26,12,-52,90,54,-82,-30,38,-64,-80,-70,36,-16,-44,-80,-44,-76,94,-18,90,-14,62}});
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,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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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},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},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},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},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},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},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},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},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},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},new int[]{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},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},new int[]{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},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},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},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},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},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},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}});
param0.add(new int[][]{new int[]{44,4,10,70,98,8,30,72,6,11,85,86,72,96,67,39,45,63,4,28,55,81,74,7,4,44,53,90,89,35,89,32,96,28,44,61,74,13,9,83,96,41},new int[]{37,10,41,26,61,21,58,58,72,3,73,43,21,47,6,30,57,35,16,37,18,23,23,32,15,19,29,67,65,16,65,93,8,44,46,21,24,30,62,52,66,88},new int[]{48,53,60,92,35,91,92,46,56,39,30,31,66,24,96,54,1,90,31,47,52,45,70,82,83,27,22,99,67,23,53,82,34,52,88,7,36,7,20,55,92,44},new int[]{15,75,94,97,21,37,45,50,71,64,60,49,51,86,79,90,53,93,93,13,95,51,28,66,16,10,7,2,85,27,80,37,76,33,86,30,6,62,5,45,42,47},new int[]{75,93,35,92,77,7,89,76,43,9,90,10,6,80,34,24,18,30,58,84,68,71,93,58,41,52,28,75,86,86,80,84,82,64,50,89,99,59,44,83,94,89},new int[]{95,1,40,3,34,69,24,99,58,29,36,11,78,80,91,71,68,69,35,93,34,61,45,33,48,30,41,95,56,99,5,27,95,14,99,69,48,94,11,27,92,54},new int[]{70,19,36,19,31,78,14,51,61,28,8,10,31,2,25,61,46,55,77,21,41,5,21,32,23,99,71,46,76,66,37,2,21,65,36,48,71,52,90,89,68,24},new int[]{43,40,64,15,67,6,20,61,69,51,86,95,92,70,1,32,21,80,63,30,86,4,47,21,33,66,2,75,8,78,19,51,44,66,12,58,14,20,39,66,94,78},new int[]{8,25,73,3,51,70,51,36,34,46,16,28,20,75,18,35,35,71,31,80,24,1,96,30,17,64,69,55,24,48,82,85,67,70,15,94,13,33,12,25,49,65},new int[]{33,90,55,35,6,30,47,12,2,60,80,80,6,68,39,35,98,13,44,94,20,13,15,50,7,52,12,8,24,18,83,69,30,76,32,89,55,20,58,85,80,50},new int[]{49,80,37,60,53,38,14,60,2,17,88,15,25,87,3,2,88,8,64,5,44,47,13,79,2,2,74,77,58,40,1,80,74,2,83,42,26,89,62,66,20,77},new int[]{37,13,42,49,21,7,26,39,14,58,12,97,52,45,77,25,66,58,30,48,59,46,90,37,94,3,78,66,70,46,95,26,49,88,8,90,13,87,47,89,65,82},new int[]{81,55,21,50,64,12,37,28,27,83,52,29,83,43,56,14,60,25,61,48,56,6,16,47,56,71,70,40,17,85,65,8,24,31,6,4,87,31,24,78,85,37},new int[]{51,46,97,80,73,46,45,93,4,43,96,96,48,1,62,85,3,70,61,81,37,45,72,35,78,12,98,56,84,77,99,96,87,42,98,97,27,30,66,45,84,41},new int[]{42,41,8,68,6,28,57,24,59,93,39,20,19,59,78,8,92,61,11,3,27,94,77,66,48,31,18,70,60,36,27,39,72,87,56,48,8,6,35,38,37,40},new int[]{50,45,75,68,22,7,84,74,30,34,15,44,30,44,49,65,79,93,63,54,72,89,58,29,47,50,77,44,52,57,45,34,31,26,29,54,44,93,38,37,53,82},new int[]{11,86,90,17,22,44,73,54,25,58,21,27,22,91,26,66,74,66,3,27,51,19,90,60,7,51,93,54,29,19,23,2,35,29,48,87,76,66,14,99,98,51},new int[]{34,39,88,97,99,84,14,8,36,56,69,57,94,68,91,62,40,96,10,73,65,35,94,91,80,67,37,95,6,5,23,69,22,81,22,58,83,13,25,6,38,28},new int[]{60,88,74,42,42,39,2,10,57,59,94,79,92,39,59,31,63,44,17,99,3,55,2,87,95,90,47,60,72,17,17,35,39,63,70,74,76,25,55,72,13,30},new int[]{26,27,43,37,21,26,8,65,66,33,15,82,43,40,15,68,74,1,98,49,51,9,47,21,79,67,21,11,28,73,7,96,33,44,61,30,75,95,90,43,64,89},new int[]{91,13,86,21,29,24,34,68,24,3,60,92,92,80,82,52,95,13,12,59,36,78,6,9,1,3,61,93,86,80,31,16,59,11,6,23,77,7,10,1,32,30},new int[]{6,21,11,79,3,77,25,52,32,39,92,63,3,32,18,15,66,53,96,93,74,79,31,36,80,27,12,46,72,27,98,83,44,21,36,15,47,41,18,96,91,60},new int[]{59,98,10,37,12,91,48,77,14,59,12,22,91,25,36,83,31,4,31,5,38,25,44,67,49,27,7,28,19,82,35,13,55,70,49,48,73,78,36,98,97,82},new int[]{10,87,31,78,38,14,99,81,87,49,60,53,57,82,90,77,82,35,60,82,85,13,67,21,70,45,88,13,25,9,85,60,63,50,50,39,44,32,51,73,74,87},new int[]{40,34,76,93,84,22,2,73,95,42,26,92,88,20,50,14,74,41,34,75,10,47,89,41,15,32,74,48,82,8,22,70,25,34,19,63,79,76,82,15,98,53},new int[]{27,19,98,30,57,58,79,13,31,61,75,33,54,9,25,2,24,64,66,67,73,59,30,44,89,35,71,55,90,66,44,10,92,36,8,23,83,75,17,39,96,75},new int[]{52,31,79,97,85,46,67,50,41,3,57,48,53,58,55,42,24,33,86,27,84,28,1,46,40,73,78,41,33,99,73,57,18,69,32,47,91,3,82,80,9,43},new int[]{17,60,74,21,61,90,72,18,45,86,72,78,14,98,43,65,4,22,34,18,45,38,83,38,50,40,30,60,64,25,69,6,57,10,52,59,69,17,80,65,94,97},new int[]{47,37,33,49,55,83,4,9,79,24,17,48,58,49,44,19,16,44,99,6,45,78,61,85,88,12,20,30,12,37,2,84,47,97,42,74,34,1,34,28,19,18},new int[]{26,28,6,93,27,1,49,32,83,36,36,16,34,96,27,50,7,43,86,42,20,37,70,87,33,8,93,55,80,4,66,73,13,11,79,99,4,42,17,74,12,34},new int[]{64,93,72,63,99,8,97,99,29,45,61,42,95,14,47,56,86,2,81,92,36,13,20,7,96,62,79,84,33,36,91,35,42,2,83,4,37,98,92,39,89,14},new int[]{86,77,25,50,14,29,32,86,57,7,72,95,48,51,61,20,77,2,9,11,21,64,52,41,64,6,45,64,55,2,90,45,30,23,47,53,9,71,83,36,62,67},new int[]{47,65,75,96,24,18,98,80,13,63,88,51,47,72,12,54,88,77,13,77,19,56,81,25,77,62,44,43,61,5,35,21,35,38,21,52,41,86,90,16,26,87},new int[]{20,80,16,44,45,38,52,99,63,14,90,84,89,82,50,4,72,94,28,26,3,54,58,83,31,34,20,16,96,33,34,9,55,89,42,16,18,87,13,85,69,64},new int[]{44,71,35,81,66,4,4,29,53,73,52,99,69,54,69,38,48,8,94,31,13,3,16,8,3,54,31,58,96,17,36,15,27,16,22,56,54,27,11,40,34,5},new int[]{58,93,26,73,54,22,32,35,83,44,18,78,17,58,28,47,51,75,40,69,50,13,84,18,59,50,42,74,56,82,77,43,12,99,82,77,10,2,25,59,50,36},new int[]{83,23,64,92,61,47,43,4,67,92,18,18,54,58,50,2,86,69,47,99,7,50,48,45,35,20,39,63,29,9,84,21,69,28,91,13,68,91,51,90,22,46},new int[]{45,28,67,44,26,98,95,8,43,23,52,77,46,34,72,56,74,59,77,94,7,50,30,18,73,97,42,34,46,52,5,96,40,10,63,51,93,16,14,65,63,65},new int[]{77,24,8,94,47,10,20,15,39,49,71,92,76,2,71,85,45,87,41,32,38,70,79,12,30,44,22,95,89,21,51,88,35,33,66,9,65,64,26,72,19,35},new int[]{44,43,19,41,45,85,10,54,79,21,81,17,16,29,60,68,85,90,89,68,92,61,98,92,21,49,10,19,7,29,51,31,57,60,7,86,21,88,7,54,15,1},new int[]{98,10,52,61,26,89,45,10,22,36,45,71,26,57,41,10,98,19,58,24,12,50,76,67,3,94,43,71,42,14,80,24,74,33,68,51,47,55,99,65,39,22},new int[]{43,92,79,13,74,41,76,42,6,47,97,39,98,48,54,81,97,90,74,95,60,47,98,50,25,33,97,27,70,51,32,41,54,18,87,1,91,81,59,64,30,88}});
List<Integer> param1 = new ArrayList<>();
param1.add(23);
param1.add(2);
param1.add(33);
param1.add(1);
param1.add(29);
param1.add(23);
param1.add(4);
param1.add(32);
param1.add(18);
param1.add(30);
List<Integer> param2 = new ArrayList<>();
param2.add(21);
param2.add(3);
param2.add(35);
param2.add(1);
param2.add(31);
param2.add(17);
param2.add(4);
param2.add(36);
param2.add(23);
param2.add(29);
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());
}
} |
if __name__ == '__main__':
param = [
([[19, 20, 23, 25, 28, 35, 35, 40, 45, 46, 48, 54, 57, 59, 74, 76, 78, 82, 84, 86, 87, 90, 91, 96], [9, 13, 17, 20, 26, 27, 42, 46, 48, 62, 67, 69, 72, 73, 76, 77, 82, 83, 86, 93, 95, 95, 98, 98], [2, 12, 18, 25, 29, 30, 31, 33, 39, 45, 48, 49, 56, 57, 60, 61, 64, 72, 73, 78, 79, 94, 98, 98], [2, 3, 10, 15, 20, 22, 23, 23, 27, 29, 36, 40, 42, 46, 48, 53, 53, 60, 60, 70, 73, 78, 98, 98], [6, 10, 11, 12, 15, 20, 28, 28, 33, 40, 43, 48, 51, 57, 60, 60, 61, 62, 66, 68, 72, 75, 92, 97], [2, 11, 12, 14, 15, 19, 21, 26, 30, 35, 36, 36, 46, 51, 56, 63, 69, 74, 82, 88, 89, 89, 89, 94], [1, 4, 5, 10, 11, 13, 15, 18, 23, 28, 44, 53, 53, 66, 67, 69, 70, 71, 71, 77, 79, 87, 88, 99], [2, 2, 5, 7, 7, 8, 9, 17, 26, 30, 35, 39, 41, 43, 49, 63, 64, 65, 70, 70, 80, 89, 96, 99], [4, 7, 11, 12, 14, 16, 20, 21, 27, 41, 42, 42, 43, 48, 49, 52, 62, 66, 75, 76, 81, 86, 97, 99], [1, 12, 13, 15, 17, 19, 26, 34, 47, 47, 47, 48, 51, 52, 53, 60, 61, 63, 64, 74, 77, 82, 87, 93], [1, 2, 4, 8, 14, 19, 22, 24, 31, 31, 37, 54, 60, 63, 66, 68, 76, 80, 80, 84, 88, 92, 93, 99], [1, 2, 3, 6, 7, 9, 11, 19, 25, 27, 35, 36, 45, 52, 57, 57, 86, 88, 89, 89, 93, 94, 97, 99], [7, 8, 9, 10, 11, 30, 33, 34, 37, 48, 50, 50, 56, 60, 66, 70, 72, 73, 76, 79, 86, 88, 95, 95], [1, 4, 5, 5, 6, 11, 26, 27, 32, 36, 43, 47, 47, 47, 50, 56, 56, 66, 76, 78, 78, 94, 97, 99], [6, 15, 18, 27, 36, 38, 40, 44, 47, 48, 64, 64, 68, 70, 76, 79, 83, 85, 86, 90, 93, 93, 95, 97], [1, 4, 4, 10, 11, 12, 16, 19, 20, 22, 22, 23, 35, 49, 51, 58, 66, 66, 68, 76, 77, 81, 86, 94], [2, 9, 12, 12, 13, 20, 20, 35, 44, 48, 51, 55, 62, 66, 71, 71, 73, 74, 78, 83, 89, 90, 93, 99], [9, 15, 20, 24, 25, 31, 32, 35, 36, 49, 50, 51, 52, 55, 58, 63, 79, 79, 85, 89, 90, 96, 98, 99], [6, 10, 12, 15, 16, 17, 17, 21, 24, 44, 48, 53, 58, 60, 61, 64, 67, 74, 81, 84, 86, 87, 88, 92], [7, 10, 14, 20, 21, 27, 30, 30, 31, 34, 36, 37, 39, 45, 55, 55, 63, 64, 66, 82, 88, 88, 94, 95], [6, 11, 13, 21, 22, 23, 23, 24, 28, 35, 36, 40, 41, 53, 55, 57, 63, 66, 73, 74, 77, 78, 87, 96], [4, 17, 19, 23, 25, 38, 42, 45, 50, 57, 61, 62, 62, 62, 62, 64, 75, 78, 79, 79, 82, 85, 86, 93], [14, 15, 21, 27, 38, 39, 40, 42, 43, 43, 50, 51, 54, 58, 58, 59, 60, 62, 63, 70, 75, 85, 91, 92], [6, 7, 11, 12, 20, 30, 40, 41, 41, 44, 47, 51, 52, 53, 59, 75, 76, 77, 84, 87, 91, 93, 95, 97]],23,21,),
([[38, 12, 92, -6, 8], [80, 66, -56, -54, -74], [36, 6, 52, -78, -92], [80, 76, 88, 10, -30], [32, 64, 18, 58, -2]],2,3,),
([[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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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]],33,35,),
([[45, 96, 71], [87, 80, 90], [96, 72, 49]],1,1,),
([[-98, -98, -92, -82, -80, -72, -70, -48, -38, -32, -32, -28, -16, -2, 0, 0, 20, 20, 24, 30, 36, 40, 46, 58, 62, 62, 66, 74, 74, 76, 80, 82], [-96, -94, -94, -88, -80, -64, -54, -48, -46, -44, -38, -36, -34, -32, -30, -30, -24, -16, 2, 8, 26, 36, 36, 40, 48, 52, 78, 80, 80, 80, 88, 94], [-98, -98, -92, -88, -88, -88, -62, -60, -46, -34, -24, -16, -14, 8, 10, 16, 18, 20, 30, 44, 48, 48, 50, 54, 54, 70, 70, 76, 78, 82, 84, 94], [-94, -80, -76, -74, -66, -58, -48, -38, -26, -16, -12, -10, -8, -2, 0, 8, 10, 10, 12, 22, 28, 32, 40, 42, 44, 50, 60, 72, 84, 86, 90, 94], [-88, -72, -62, -46, -44, -44, -34, -30, -28, -28, -18, -18, -10, -6, -4, -2, 2, 8, 8, 22, 32, 34, 38, 46, 54, 54, 54, 76, 76, 80, 84, 86], [-94, -94, -82, -80, -78, -70, -58, -46, -36, -28, -10, -10, 0, 2, 2, 4, 8, 14, 24, 32, 34, 34, 38, 42, 42, 42, 58, 84, 86, 88, 94, 96], [-98, -96, -96, -88, -80, -68, -62, -54, -52, -28, -28, -26, -22, -12, -8, -4, 2, 8, 16, 16, 28, 30, 32, 38, 54, 58, 66, 70, 74, 76, 96, 98], [-86, -84, -80, -62, -62, -58, -52, -50, -42, -38, -36, -36, -28, -18, -4, 10, 14, 38, 40, 46, 46, 48, 54, 72, 72, 74, 84, 86, 86, 88, 90, 96], [-78, -74, -66, -62, -48, -26, -18, -12, 6, 8, 18, 22, 24, 34, 36, 38, 42, 46, 64, 66, 66, 68, 70, 72, 76, 76, 78, 80, 84, 86, 88, 90], [-98, -98, -92, -84, -74, -70, -68, -50, -50, -48, -48, -36, -30, -6, -4, -4, -4, 10, 24, 28, 30, 32, 50, 58, 60, 62, 76, 78, 84, 90, 90, 98], [-98, -96, -82, -78, -74, -62, -62, -60, -58, -56, -50, -42, -36, -32, -20, -4, 0, 2, 6, 14, 16, 26, 26, 42, 46, 70, 70, 72, 78, 82, 86, 90], [-86, -80, -80, -76, -70, -66, -58, -54, -50, -44, -42, -36, -32, -24, -22, -16, -8, -6, 2, 4, 16, 18, 36, 40, 46, 52, 58, 60, 62, 74, 76, 98], [-86, -78, -66, -64, -58, -52, -38, -32, -30, -28, -18, -18, -16, -10, -8, 2, 2, 4, 6, 6, 14, 22, 36, 36, 42, 52, 54, 76, 78, 84, 88, 98], [-98, -94, -94, -74, -72, -52, -50, -38, -30, -26, -16, -14, -4, 2, 2, 4, 4, 16, 22, 24, 28, 32, 34, 34, 36, 50, 56, 66, 68, 80, 82, 94], [-98, -90, -86, -78, -74, -72, -70, -58, -56, -52, -50, -44, -30, -24, -24, -2, 0, 6, 20, 32, 40, 40, 46, 48, 50, 58, 64, 74, 84, 90, 90, 90], [-98, -92, -86, -84, -82, -82, -78, -66, -64, -50, -40, -24, -24, -22, -22, -14, -12, -8, 0, 8, 12, 14, 20, 26, 42, 42, 58, 64, 82, 86, 92, 96], [-98, -90, -86, -76, -68, -64, -64, -64, -54, -54, -52, -44, -34, -34, -12, 6, 10, 12, 26, 38, 40, 40, 60, 68, 68, 68, 74, 78, 80, 88, 98, 98], [-92, -92, -68, -60, -54, -52, -48, -46, -40, -36, -32, -30, -28, -24, -24, -18, -4, -2, 2, 28, 32, 38, 42, 46, 60, 62, 72, 78, 80, 82, 82, 90], [-98, -86, -80, -80, -76, -64, -62, -60, -50, -34, -22, -18, -14, -12, -12, -10, 2, 6, 10, 18, 22, 28, 32, 32, 36, 38, 48, 66, 72, 82, 90, 96], [-92, -90, -86, -84, -82, -78, -72, -72, -68, -68, -60, -46, -38, -30, -28, 2, 8, 10, 18, 22, 24, 28, 40, 40, 52, 54, 64, 74, 80, 82, 86, 96], [-96, -86, -82, -82, -70, -70, -62, -62, -58, -58, -56, -56, -52, -52, -46, -42, -38, -34, -26, -24, -6, -6, -2, 8, 22, 26, 38, 52, 70, 74, 82, 90], [-92, -70, -64, -62, -56, -54, -48, -42, -36, -22, -22, -20, -14, -14, -2, 2, 2, 12, 22, 26, 60, 64, 68, 70, 70, 74, 74, 80, 84, 88, 88, 90], [-98, -98, -84, -84, -84, -80, -64, -60, -54, -54, -44, -34, -30, -18, -16, -14, 2, 8, 10, 28, 30, 32, 50, 58, 62, 62, 64, 72, 78, 78, 82, 88], [-96, -94, -86, -86, -60, -56, -52, -50, -34, -26, -14, -10, -6, -4, 2, 18, 20, 30, 38, 40, 42, 46, 48, 52, 54, 66, 68, 74, 74, 84, 92, 98], [-98, -96, -96, -94, -66, -50, -44, -44, -38, -30, -30, -22, -20, -18, -16, -14, -14, -4, -4, -2, 2, 22, 30, 42, 52, 54, 60, 70, 80, 84, 92, 96], [-96, -84, -80, -78, -76, -74, -68, -64, -60, -58, -54, -46, -26, -14, -14, -10, -2, 4, 10, 10, 12, 26, 28, 28, 38, 40, 42, 42, 50, 82, 88, 88], [-90, -78, -78, -76, -76, -76, -64, -64, -62, -44, -40, -32, -28, -24, -10, 4, 24, 28, 30, 44, 58, 60, 62, 72, 74, 76, 76, 78, 80, 82, 82, 90], [-88, -86, -72, -66, -60, -60, -58, -58, -54, -38, -32, -30, -16, -14, -10, -10, -6, 0, 8, 12, 16, 20, 22, 26, 30, 34, 36, 44, 52, 64, 66, 88], [-98, -94, -92, -92, -88, -68, -64, -64, -62, -44, -44, -36, -32, -32, -24, -18, -16, -6, -6, 6, 8, 14, 20, 26, 28, 36, 38, 40, 56, 56, 66, 84], [-98, -94, -92, -90, -58, -56, -44, -42, -40, -40, -36, -32, -32, -12, -10, -2, -2, -2, 0, 8, 16, 18, 26, 26, 42, 46, 52, 54, 84, 86, 88, 94], [-80, -78, -78, -70, -58, -56, -56, -36, -34, -32, -6, 4, 6, 10, 20, 32, 40, 42, 54, 58, 58, 64, 66, 66, 66, 66, 80, 82, 82, 82, 88, 90], [-92, -90, -78, -74, -70, -50, -48, -46, -46, -40, -40, -36, -24, -22, -20, -10, -10, -8, -8, -4, 6, 14, 20, 32, 38, 46, 46, 48, 60, 68, 68, 74]],29,31,),
([[1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1]],23,17,),
([[13, 26, 41, 59, 89, 95, 99], [5, 21, 27, 30, 41, 84, 92], [6, 46, 75, 76, 95, 96, 97], [13, 21, 33, 62, 74, 85, 88], [2, 3, 15, 25, 56, 73, 97], [38, 65, 71, 76, 82, 86, 86], [2, 28, 32, 51, 73, 77, 90]],4,4,),
([[10, -88, 60, -18, -24, -72, -10, 8, -12, 16, -22, -94, 12, -8, 66, 10, 6, 6, 52, -6, -18, 98, 44, 48, -38, -32, -84, -56, -52, -60, -6, -74, -54, 76, -74, -36, -44, 94, -52, 74, 14], [0, -12, -26, -24, -72, 28, -72, -44, 32, -28, -98, -64, -48, 72, -74, -10, 10, -44, 30, -12, -26, -38, -14, 72, -42, 68, 26, 78, -6, -58, -70, 74, 24, -68, -22, 48, 14, 86, -14, 58, -52], [48, -18, 34, -38, 8, 96, -22, 14, -48, 74, 58, -70, -30, -40, -12, -90, 8, -98, -56, 60, 46, 38, -82, 32, -24, -68, -92, 72, 2, -96, -96, 72, 38, 38, 12, -18, -36, -94, -68, -32, 54], [-28, 4, -84, -68, -56, -60, -12, 82, 2, 14, -2, 62, 42, 36, 56, -12, -30, -72, -70, 10, 96, -84, -44, 64, 2, 70, -78, -62, -48, -94, 48, 28, -78, 64, -4, 80, -34, 4, 68, -18, -48], [-38, 0, 34, 28, 80, -36, -4, 52, -86, 84, 44, 16, 34, 8, -38, -80, -62, -78, 62, 50, 98, -88, -40, -66, -16, -20, -34, -84, 48, -28, -4, -10, 34, -10, 52, -58, -92, -46, 14, -86, 66], [-8, -56, -18, 64, -64, -82, 14, -60, -4, -32, -52, -70, 62, 56, -58, -26, -32, 84, 88, 28, -34, -56, 12, 56, 54, 92, -90, 8, 84, 18, 12, 40, -80, -24, 66, -22, -14, 76, -46, -18, 10], [-22, -34, -92, -58, -6, -26, 26, 30, -92, 82, 12, -60, -60, -10, 24, 78, -78, 50, -6, 10, -32, -10, -6, 72, -90, -54, -32, -88, -86, 30, 70, -4, 84, -40, -52, 32, -46, -92, -18, -92, -16], [-78, 0, 56, -10, 14, 64, 84, -6, -32, -54, 42, -22, 26, -94, 32, 54, -32, 20, -76, 6, -68, -72, -54, 32, 14, -36, -2, -74, 44, 76, 28, -34, 20, 84, 56, -60, -6, 30, -4, 36, 54], [90, -48, -22, 20, 26, 48, -64, 88, 20, 46, -86, -92, 2, 24, -4, 4, -36, -12, 28, -38, -84, 48, -46, -30, 68, -8, -30, -10, -2, 64, -4, -30, 48, 2, 96, 26, -76, -26, 14, -94, 86], [-92, -66, -14, 94, -92, -2, 30, -8, 88, 34, -52, 60, 52, -10, -18, 28, 2, 94, -12, 62, -48, 30, 22, -26, 70, -84, -4, 82, -42, 32, 62, 30, -54, 80, -34, 32, -94, -8, -40, -28, 32], [-28, 26, 2, 86, -74, 8, -38, 84, -6, 18, -38, 48, -60, 36, -58, 12, -76, 62, -4, -14, -18, -74, -56, -16, 48, 74, -46, 12, -42, -18, 62, 18, 98, -80, -92, 22, -80, -74, 10, -72, -88], [12, 54, 48, 60, 32, -74, 54, 50, 32, -38, 96, 20, 72, -32, 76, -30, 96, 58, -2, 40, 12, 72, 94, 82, 70, 74, -90, -82, -2, 6, 2, -18, -34, -58, -66, 12, 72, 68, -76, -42, -4], [-60, -30, 70, 42, -52, 4, 32, 20, -40, -34, 26, -74, 36, -10, -16, 0, 16, -66, 4, -46, -54, -50, -76, 52, -4, -96, 60, -62, 82, 8, 56, 70, 32, -44, -68, -8, -10, -42, 44, 84, 28], [-8, 94, 98, 78, 38, 8, 22, -6, 96, -8, 48, 26, -22, 12, -46, 92, 80, 12, 62, 4, 80, -20, 16, -28, 70, -88, 44, 68, 22, 8, 6, 84, 98, 4, -68, -44, -4, 94, 40, 38, 32], [54, 80, -38, 14, -36, -96, 28, -86, -36, -42, 34, 22, 16, 8, 22, 36, -24, -32, 78, 36, 12, -10, -50, 8, 56, -74, -92, -64, -74, 86, 28, 38, 48, 20, 82, 60, -10, 32, -60, 58, -52], [6, 18, -12, -80, -42, -12, -34, -38, 16, 42, 98, 6, 40, -28, 90, 76, 94, -36, 74, 0, -52, -52, 24, 0, 78, 44, 2, -94, 72, 96, 8, 64, -40, -42, -2, -80, 52, -86, 58, -72, -10], [-2, -38, 56, 24, 44, 50, 58, -56, 96, -96, 56, -72, -86, 68, 58, -32, 48, 24, -68, -66, 64, 0, -82, -14, 30, 4, -8, -8, 22, -38, -4, -78, -50, 90, -72, -2, -66, 50, -60, 26, -10], [42, -54, 82, -20, -94, 32, 6, -58, 62, 86, 66, -10, 0, 78, -14, 66, -74, 38, -42, -2, -42, -66, -52, -38, 38, 32, -16, 78, 80, 40, -98, -98, -62, -36, 18, 8, 12, -20, 94, -92, 52], [48, -80, 76, -36, 90, 6, -30, -22, 10, -6, 42, -86, -52, 84, -86, -12, -92, -72, 78, 28, -98, 38, 80, 76, 18, 64, 66, -8, -6, -66, -92, 86, -26, -98, -88, 62, 82, -8, -34, -64, 44], [-26, -28, 92, -82, -36, -24, -58, 32, 44, -70, 2, -72, 54, -64, 58, 92, -36, -14, -22, -70, -30, -10, -84, -22, 82, 88, -18, 24, -18, -22, 4, 72, 28, -46, 48, -14, 92, 24, -82, 92, 40], [-32, -60, -32, 72, 98, -96, 34, -86, -92, -4, -52, -52, 18, -56, -36, -34, -22, -28, 72, 54, -20, -42, 64, 0, 26, 34, -20, -6, -80, -48, 22, 12, -58, 2, 58, -2, -34, 92, -34, 32, 40], [70, 60, -76, -54, -76, 56, -78, 44, 42, -78, -40, 12, 50, 46, 48, -12, 62, -46, -4, -62, 24, -10, 54, 76, 22, 4, 26, 96, -82, -88, -72, 48, -18, 16, -22, 48, 0, -32, 82, 76, 96], [38, -80, -92, 14, 2, -92, 62, 98, -34, -30, -32, -32, 72, -12, -12, 30, -24, -76, -58, -24, -80, 48, -22, 54, -80, 64, -90, -26, 56, -46, 18, -70, 96, 86, 68, -72, 52, 28, -98, -42, 90], [-20, -66, 94, 20, 14, -82, 94, 60, 92, 46, -86, 18, -44, 42, 96, 40, 90, -96, -10, 44, -54, -50, 10, -48, 78, 66, -62, 42, -88, -58, 80, 36, -20, 70, 82, -12, -90, 14, -94, 8, 90], [40, 54, 2, 12, -98, -96, 48, -10, -64, -16, 22, 98, -98, 76, -28, 76, 66, 56, -10, -34, 44, 14, 86, 94, 50, -18, -76, -46, 30, 94, 42, -70, -72, -48, 48, -88, 94, 50, 84, -64, 24], [-14, -96, 94, -42, 94, 52, 58, 62, 46, 14, -28, -68, 42, -80, 70, -44, -94, -66, 54, -60, -58, 30, 40, -30, 78, -76, -40, 24, 98, 6, -42, 72, 20, 64, -84, -30, 84, -34, -16, -86, 70], [-20, -66, 90, 0, 58, -12, -14, -98, -68, -12, 82, 0, 60, 94, -10, 96, 62, -66, -22, 84, -20, -56, -60, 98, -18, 96, 10, 48, 2, 52, -64, -70, 8, -88, -20, -50, 56, -10, 72, -30, -68], [-32, 66, 70, 82, -30, 24, 58, 0, -80, -96, 18, -44, 82, 76, -10, 34, -34, 38, -30, -88, -68, 2, 16, 4, -22, 36, 58, -56, 48, 70, 46, 24, -86, -94, 2, 6, -70, -68, -82, -20, 30], [44, 90, 0, 98, 94, -34, -8, 66, 80, -98, 32, -26, 96, -98, 14, 22, 74, -62, -4, -52, 44, -62, -6, 26, 86, -18, 88, -20, 4, 72, -10, 4, 34, 4, -36, -76, 8, 80, -84, -50, 14], [40, -16, 96, 22, -26, 18, -18, 78, -72, -84, -10, -42, 18, 4, 26, 0, 70, -84, 84, -68, 54, -16, -34, 32, -28, 86, -8, 40, 90, -92, -78, 16, -78, 84, -8, -28, -12, -44, 10, -10, -42], [98, 72, 68, -4, 68, 68, 66, 34, 52, -58, 12, 2, -62, 64, -40, 42, 60, -88, -72, -20, -46, 46, 94, 32, -72, -92, -56, -98, -64, 66, -70, -42, -44, -88, -92, 10, 50, -26, -40, -70, 84], [-58, 84, -40, -16, -72, 10, -26, 76, -72, -14, 50, 16, 6, 6, -8, -82, 96, -80, -70, 46, 66, -46, 96, 68, -50, 54, 4, -32, 32, 62, -80, 36, 88, 88, 74, -22, -80, 8, 98, 62, -42], [50, -68, 82, -28, 72, -78, 82, -84, 80, -2, -94, -46, -16, 16, -64, -12, -38, -84, 98, -68, -74, 14, 88, -66, -50, 58, 98, 70, -34, -4, 86, 28, 60, -34, -52, -22, 12, 40, 98, 42, 66], [90, -58, -18, -70, -12, -86, 2, 26, 70, -76, 80, -38, 68, -30, -62, -2, 0, 88, -62, -44, 84, 32, 98, 28, -42, 80, 28, 80, -70, 2, 80, 74, 92, 72, 56, -14, 28, -52, -28, -50, 0], [-52, -46, 30, 6, -10, 76, 60, -34, -38, -58, 12, 58, -50, 82, -40, -16, 14, 94, 84, -22, -36, 22, 14, 84, -38, 62, 70, -34, -30, -18, 46, -82, -18, 96, -14, -58, 16, 96, -76, -60, 50], [68, 74, 10, -20, 14, -62, -70, -86, -36, 90, 44, -12, 74, -4, -34, -16, 84, -66, -20, 86, 52, 88, 6, 64, 60, 4, -10, -90, -48, 82, -26, 14, 36, -44, 38, 34, -86, -80, 90, 8, -70], [-60, 56, -54, 10, -82, 66, 14, -16, -46, -88, 96, -58, 4, 44, 74, 32, 22, 44, 94, 48, -96, -74, -2, -90, 32, 62, 36, 56, -10, 10, 84, -64, 54, -32, -42, 36, -32, 14, -86, -98, 10], [98, -62, 76, -38, 36, 20, 72, -18, 2, -18, -66, 16, -66, 28, -8, -44, 98, -12, 12, -94, 38, 38, -6, -40, 66, -34, 16, -96, -60, 24, -50, 96, -58, -26, 74, -48, 72, -26, -38, 28, 82], [-60, -62, 24, -74, 72, 22, 56, 78, -56, -10, 86, -60, 54, -92, 18, 36, -26, 66, -18, 54, 50, -70, -10, 20, -4, -6, -34, 80, -76, -10, 76, -72, -6, -44, -64, 88, 78, 78, -8, -26, 2], [-28, -98, -50, 18, 8, -16, 16, 58, 4, 28, 14, 76, 96, 56, 56, -86, 14, -56, 74, -28, -34, 30, 74, 30, 72, 18, 42, -64, -94, 54, -14, -42, 80, 40, -94, -36, -32, -70, 18, -26, 86], [28, 6, -82, 6, -2, -26, 6, -66, -20, -36, 6, 6, 70, 4, -96, 42, -66, -44, -42, 26, 12, -52, 90, 54, -82, -30, 38, -64, -80, -70, 36, -16, -44, -80, -44, -76, 94, -18, 90, -14, 62]],32,36,),
([[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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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]],18,23,),
([[44, 4, 10, 70, 98, 8, 30, 72, 6, 11, 85, 86, 72, 96, 67, 39, 45, 63, 4, 28, 55, 81, 74, 7, 4, 44, 53, 90, 89, 35, 89, 32, 96, 28, 44, 61, 74, 13, 9, 83, 96, 41], [37, 10, 41, 26, 61, 21, 58, 58, 72, 3, 73, 43, 21, 47, 6, 30, 57, 35, 16, 37, 18, 23, 23, 32, 15, 19, 29, 67, 65, 16, 65, 93, 8, 44, 46, 21, 24, 30, 62, 52, 66, 88], [48, 53, 60, 92, 35, 91, 92, 46, 56, 39, 30, 31, 66, 24, 96, 54, 1, 90, 31, 47, 52, 45, 70, 82, 83, 27, 22, 99, 67, 23, 53, 82, 34, 52, 88, 7, 36, 7, 20, 55, 92, 44], [15, 75, 94, 97, 21, 37, 45, 50, 71, 64, 60, 49, 51, 86, 79, 90, 53, 93, 93, 13, 95, 51, 28, 66, 16, 10, 7, 2, 85, 27, 80, 37, 76, 33, 86, 30, 6, 62, 5, 45, 42, 47], [75, 93, 35, 92, 77, 7, 89, 76, 43, 9, 90, 10, 6, 80, 34, 24, 18, 30, 58, 84, 68, 71, 93, 58, 41, 52, 28, 75, 86, 86, 80, 84, 82, 64, 50, 89, 99, 59, 44, 83, 94, 89], [95, 1, 40, 3, 34, 69, 24, 99, 58, 29, 36, 11, 78, 80, 91, 71, 68, 69, 35, 93, 34, 61, 45, 33, 48, 30, 41, 95, 56, 99, 5, 27, 95, 14, 99, 69, 48, 94, 11, 27, 92, 54], [70, 19, 36, 19, 31, 78, 14, 51, 61, 28, 8, 10, 31, 2, 25, 61, 46, 55, 77, 21, 41, 5, 21, 32, 23, 99, 71, 46, 76, 66, 37, 2, 21, 65, 36, 48, 71, 52, 90, 89, 68, 24], [43, 40, 64, 15, 67, 6, 20, 61, 69, 51, 86, 95, 92, 70, 1, 32, 21, 80, 63, 30, 86, 4, 47, 21, 33, 66, 2, 75, 8, 78, 19, 51, 44, 66, 12, 58, 14, 20, 39, 66, 94, 78], [8, 25, 73, 3, 51, 70, 51, 36, 34, 46, 16, 28, 20, 75, 18, 35, 35, 71, 31, 80, 24, 1, 96, 30, 17, 64, 69, 55, 24, 48, 82, 85, 67, 70, 15, 94, 13, 33, 12, 25, 49, 65], [33, 90, 55, 35, 6, 30, 47, 12, 2, 60, 80, 80, 6, 68, 39, 35, 98, 13, 44, 94, 20, 13, 15, 50, 7, 52, 12, 8, 24, 18, 83, 69, 30, 76, 32, 89, 55, 20, 58, 85, 80, 50], [49, 80, 37, 60, 53, 38, 14, 60, 2, 17, 88, 15, 25, 87, 3, 2, 88, 8, 64, 5, 44, 47, 13, 79, 2, 2, 74, 77, 58, 40, 1, 80, 74, 2, 83, 42, 26, 89, 62, 66, 20, 77], [37, 13, 42, 49, 21, 7, 26, 39, 14, 58, 12, 97, 52, 45, 77, 25, 66, 58, 30, 48, 59, 46, 90, 37, 94, 3, 78, 66, 70, 46, 95, 26, 49, 88, 8, 90, 13, 87, 47, 89, 65, 82], [81, 55, 21, 50, 64, 12, 37, 28, 27, 83, 52, 29, 83, 43, 56, 14, 60, 25, 61, 48, 56, 6, 16, 47, 56, 71, 70, 40, 17, 85, 65, 8, 24, 31, 6, 4, 87, 31, 24, 78, 85, 37], [51, 46, 97, 80, 73, 46, 45, 93, 4, 43, 96, 96, 48, 1, 62, 85, 3, 70, 61, 81, 37, 45, 72, 35, 78, 12, 98, 56, 84, 77, 99, 96, 87, 42, 98, 97, 27, 30, 66, 45, 84, 41], [42, 41, 8, 68, 6, 28, 57, 24, 59, 93, 39, 20, 19, 59, 78, 8, 92, 61, 11, 3, 27, 94, 77, 66, 48, 31, 18, 70, 60, 36, 27, 39, 72, 87, 56, 48, 8, 6, 35, 38, 37, 40], [50, 45, 75, 68, 22, 7, 84, 74, 30, 34, 15, 44, 30, 44, 49, 65, 79, 93, 63, 54, 72, 89, 58, 29, 47, 50, 77, 44, 52, 57, 45, 34, 31, 26, 29, 54, 44, 93, 38, 37, 53, 82], [11, 86, 90, 17, 22, 44, 73, 54, 25, 58, 21, 27, 22, 91, 26, 66, 74, 66, 3, 27, 51, 19, 90, 60, 7, 51, 93, 54, 29, 19, 23, 2, 35, 29, 48, 87, 76, 66, 14, 99, 98, 51], [34, 39, 88, 97, 99, 84, 14, 8, 36, 56, 69, 57, 94, 68, 91, 62, 40, 96, 10, 73, 65, 35, 94, 91, 80, 67, 37, 95, 6, 5, 23, 69, 22, 81, 22, 58, 83, 13, 25, 6, 38, 28], [60, 88, 74, 42, 42, 39, 2, 10, 57, 59, 94, 79, 92, 39, 59, 31, 63, 44, 17, 99, 3, 55, 2, 87, 95, 90, 47, 60, 72, 17, 17, 35, 39, 63, 70, 74, 76, 25, 55, 72, 13, 30], [26, 27, 43, 37, 21, 26, 8, 65, 66, 33, 15, 82, 43, 40, 15, 68, 74, 1, 98, 49, 51, 9, 47, 21, 79, 67, 21, 11, 28, 73, 7, 96, 33, 44, 61, 30, 75, 95, 90, 43, 64, 89], [91, 13, 86, 21, 29, 24, 34, 68, 24, 3, 60, 92, 92, 80, 82, 52, 95, 13, 12, 59, 36, 78, 6, 9, 1, 3, 61, 93, 86, 80, 31, 16, 59, 11, 6, 23, 77, 7, 10, 1, 32, 30], [6, 21, 11, 79, 3, 77, 25, 52, 32, 39, 92, 63, 3, 32, 18, 15, 66, 53, 96, 93, 74, 79, 31, 36, 80, 27, 12, 46, 72, 27, 98, 83, 44, 21, 36, 15, 47, 41, 18, 96, 91, 60], [59, 98, 10, 37, 12, 91, 48, 77, 14, 59, 12, 22, 91, 25, 36, 83, 31, 4, 31, 5, 38, 25, 44, 67, 49, 27, 7, 28, 19, 82, 35, 13, 55, 70, 49, 48, 73, 78, 36, 98, 97, 82], [10, 87, 31, 78, 38, 14, 99, 81, 87, 49, 60, 53, 57, 82, 90, 77, 82, 35, 60, 82, 85, 13, 67, 21, 70, 45, 88, 13, 25, 9, 85, 60, 63, 50, 50, 39, 44, 32, 51, 73, 74, 87], [40, 34, 76, 93, 84, 22, 2, 73, 95, 42, 26, 92, 88, 20, 50, 14, 74, 41, 34, 75, 10, 47, 89, 41, 15, 32, 74, 48, 82, 8, 22, 70, 25, 34, 19, 63, 79, 76, 82, 15, 98, 53], [27, 19, 98, 30, 57, 58, 79, 13, 31, 61, 75, 33, 54, 9, 25, 2, 24, 64, 66, 67, 73, 59, 30, 44, 89, 35, 71, 55, 90, 66, 44, 10, 92, 36, 8, 23, 83, 75, 17, 39, 96, 75], [52, 31, 79, 97, 85, 46, 67, 50, 41, 3, 57, 48, 53, 58, 55, 42, 24, 33, 86, 27, 84, 28, 1, 46, 40, 73, 78, 41, 33, 99, 73, 57, 18, 69, 32, 47, 91, 3, 82, 80, 9, 43], [17, 60, 74, 21, 61, 90, 72, 18, 45, 86, 72, 78, 14, 98, 43, 65, 4, 22, 34, 18, 45, 38, 83, 38, 50, 40, 30, 60, 64, 25, 69, 6, 57, 10, 52, 59, 69, 17, 80, 65, 94, 97], [47, 37, 33, 49, 55, 83, 4, 9, 79, 24, 17, 48, 58, 49, 44, 19, 16, 44, 99, 6, 45, 78, 61, 85, 88, 12, 20, 30, 12, 37, 2, 84, 47, 97, 42, 74, 34, 1, 34, 28, 19, 18], [26, 28, 6, 93, 27, 1, 49, 32, 83, 36, 36, 16, 34, 96, 27, 50, 7, 43, 86, 42, 20, 37, 70, 87, 33, 8, 93, 55, 80, 4, 66, 73, 13, 11, 79, 99, 4, 42, 17, 74, 12, 34], [64, 93, 72, 63, 99, 8, 97, 99, 29, 45, 61, 42, 95, 14, 47, 56, 86, 2, 81, 92, 36, 13, 20, 7, 96, 62, 79, 84, 33, 36, 91, 35, 42, 2, 83, 4, 37, 98, 92, 39, 89, 14], [86, 77, 25, 50, 14, 29, 32, 86, 57, 7, 72, 95, 48, 51, 61, 20, 77, 2, 9, 11, 21, 64, 52, 41, 64, 6, 45, 64, 55, 2, 90, 45, 30, 23, 47, 53, 9, 71, 83, 36, 62, 67], [47, 65, 75, 96, 24, 18, 98, 80, 13, 63, 88, 51, 47, 72, 12, 54, 88, 77, 13, 77, 19, 56, 81, 25, 77, 62, 44, 43, 61, 5, 35, 21, 35, 38, 21, 52, 41, 86, 90, 16, 26, 87], [20, 80, 16, 44, 45, 38, 52, 99, 63, 14, 90, 84, 89, 82, 50, 4, 72, 94, 28, 26, 3, 54, 58, 83, 31, 34, 20, 16, 96, 33, 34, 9, 55, 89, 42, 16, 18, 87, 13, 85, 69, 64], [44, 71, 35, 81, 66, 4, 4, 29, 53, 73, 52, 99, 69, 54, 69, 38, 48, 8, 94, 31, 13, 3, 16, 8, 3, 54, 31, 58, 96, 17, 36, 15, 27, 16, 22, 56, 54, 27, 11, 40, 34, 5], [58, 93, 26, 73, 54, 22, 32, 35, 83, 44, 18, 78, 17, 58, 28, 47, 51, 75, 40, 69, 50, 13, 84, 18, 59, 50, 42, 74, 56, 82, 77, 43, 12, 99, 82, 77, 10, 2, 25, 59, 50, 36], [83, 23, 64, 92, 61, 47, 43, 4, 67, 92, 18, 18, 54, 58, 50, 2, 86, 69, 47, 99, 7, 50, 48, 45, 35, 20, 39, 63, 29, 9, 84, 21, 69, 28, 91, 13, 68, 91, 51, 90, 22, 46], [45, 28, 67, 44, 26, 98, 95, 8, 43, 23, 52, 77, 46, 34, 72, 56, 74, 59, 77, 94, 7, 50, 30, 18, 73, 97, 42, 34, 46, 52, 5, 96, 40, 10, 63, 51, 93, 16, 14, 65, 63, 65], [77, 24, 8, 94, 47, 10, 20, 15, 39, 49, 71, 92, 76, 2, 71, 85, 45, 87, 41, 32, 38, 70, 79, 12, 30, 44, 22, 95, 89, 21, 51, 88, 35, 33, 66, 9, 65, 64, 26, 72, 19, 35], [44, 43, 19, 41, 45, 85, 10, 54, 79, 21, 81, 17, 16, 29, 60, 68, 85, 90, 89, 68, 92, 61, 98, 92, 21, 49, 10, 19, 7, 29, 51, 31, 57, 60, 7, 86, 21, 88, 7, 54, 15, 1], [98, 10, 52, 61, 26, 89, 45, 10, 22, 36, 45, 71, 26, 57, 41, 10, 98, 19, 58, 24, 12, 50, 76, 67, 3, 94, 43, 71, 42, 14, 80, 24, 74, 33, 68, 51, 47, 55, 99, 65, 39, 22], [43, 92, 79, 13, 74, 41, 76, 42, 6, 47, 97, 39, 98, 48, 54, 81, 97, 90, 74, 95, 60, 47, 98, 50, 25, 33, 97, 27, 70, 51, 32, 41, 54, 18, 87, 1, 91, 81, 59, 64, 30, 88]],30,29,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER{
static int f_gold ( int num ) {
int result = 0 ;
for ( int i = 2 ;
i <= Math . sqrt ( num ) ;
i ++ ) {
if ( num % i == 0 ) {
if ( i == ( num / i ) ) result += i ;
else result += ( i + num / i ) ;
}
}
return ( result + 1 ) ;
}
| import math
def f_gold ( num ) :
result = 0
i = 2
while i <= ( math.sqrt ( num ) ) :
if ( num % i == 0 ) :
if ( i == ( num / i ) ) :
result = result + i ;
else :
result = result + ( i + num / i ) ;
i = i + 1
return ( result + 1 ) ;
|
using namespace std;
int f_gold ( int num ) {
int result = 0;
for ( int i = 2;
i <= sqrt ( num );
i ++ ) {
if ( num % i == 0 ) {
if ( i == ( num / i ) ) result += i;
else result += ( i + num / i );
}
}
return ( result + 1 );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(2);
param0.add(57);
param0.add(28);
param0.add(43);
param0.add(38);
param0.add(29);
param0.add(45);
param0.add(47);
param0.add(44);
param0.add(3);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(2,),
(57,),
(28,),
(43,),
(38,),
(29,),
(45,),
(47,),
(44,),
(3,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {2,57,28,43,38,29,45,47,44,3};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNTS_PATHS_POINT_REACH_ORIGIN_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNTS_PATHS_POINT_REACH_ORIGIN_1{
static int f_gold ( int n , int m ) {
int dp [ ] [ ] = new int [ n + 1 ] [ m + 1 ] ;
for ( int i = 0 ;
i <= n ;
i ++ ) dp [ i ] [ 0 ] = 1 ;
for ( int i = 0 ;
i <= m ;
i ++ ) dp [ 0 ] [ i ] = 1 ;
for ( int i = 1 ;
i <= n ;
i ++ ) for ( int j = 1 ;
j <= m ;
j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ] ;
return dp [ n ] [ m ] ;
}
| null |
using namespace std;
int f_gold ( int n, int m ) {
int dp [ n + 1 ] [ m + 1 ];
for ( int i = 0;
i <= n;
i ++ ) dp [ i ] [ 0 ] = 1;
for ( int i = 0;
i <= m;
i ++ ) dp [ 0 ] [ i ] = 1;
for ( int i = 1;
i <= n;
i ++ ) for ( int j = 1;
j <= m;
j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ];
return dp [ n ] [ m ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(55);
param0.add(74);
param0.add(76);
param0.add(6);
param0.add(2);
param0.add(36);
param0.add(40);
param0.add(14);
param0.add(42);
param0.add(62);
List<Integer> param1 = new ArrayList<>();
param1.add(30);
param1.add(15);
param1.add(57);
param1.add(90);
param1.add(64);
param1.add(1);
param1.add(71);
param1.add(56);
param1.add(4);
param1.add(12);
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());
}
} | null |
int main() {
int n_success = 0;
vector<int> param0 {55,74,76,6,2,36,40,14,42,62};
vector<int> param1 {30,15,57,90,64,1,71,56,4,12};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NEWMAN_CONWAY_SEQUENCE_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NEWMAN_CONWAY_SEQUENCE_1{
static int f_gold ( int n ) {
int f [ ] = new int [ n + 1 ] ;
f [ 0 ] = 0 ;
f [ 1 ] = 1 ;
f [ 2 ] = 1 ;
int i ;
for ( i = 3 ;
i <= n ;
i ++ ) f [ i ] = f [ f [ i - 1 ] ] + f [ i - f [ i - 1 ] ] ;
return f [ n ] ;
}
| null |
using namespace std;
int f_gold ( int n ) {
int f [ n + 1 ];
int i;
f [ 0 ] = 0;
f [ 1 ] = 1;
f [ 2 ] = 1;
for ( i = 3;
i <= n;
i ++ ) f [ i ] = f [ f [ i - 1 ] ] + f [ i - f [ i - 1 ] ];
return f [ n ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(39);
param0.add(93);
param0.add(3);
param0.add(28);
param0.add(23);
param0.add(95);
param0.add(41);
param0.add(31);
param0.add(46);
param0.add(29);
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());
}
} | null |
int main() {
int n_success = 0;
vector<int> param0 {39,93,3,28,23,95,41,31,46,29};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_WAYS_DIVIDE_CIRCLE_USING_N_NON_INTERSECTING_CHORDS |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_WAYS_DIVIDE_CIRCLE_USING_N_NON_INTERSECTING_CHORDS{
static int f_gold ( int A ) {
int n = 2 * A ;
int [ ] dpArray = new int [ n + 1 ] ;
dpArray [ 0 ] = 1 ;
dpArray [ 2 ] = 1 ;
for ( int i = 4 ;
i <= n ;
i += 2 ) {
for ( int j = 0 ;
j < i - 1 ;
j += 2 ) {
dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] ) ;
}
}
return dpArray [ n ] ;
}
| def f_gold ( A ) :
n = 2 * A
dpArray = [ 0 ] * ( n + 1 )
dpArray [ 0 ] = 1
dpArray [ 2 ] = 1
for i in range ( 4 , n + 1 , 2 ) :
for j in range ( 0 , i - 1 , 2 ) :
dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] )
return int ( dpArray [ n ] )
|
using namespace std;
int f_gold ( int A ) {
int n = 2 * A;
int dpArray [ n + 1 ] = {
0 };
dpArray [ 0 ] = 1;
dpArray [ 2 ] = 1;
for ( int i = 4;
i <= n;
i += 2 ) {
for ( int j = 0;
j < i - 1;
j += 2 ) {
dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] );
}
}
return dpArray [ n ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(32);
param0.add(52);
param0.add(52);
param0.add(32);
param0.add(73);
param0.add(31);
param0.add(29);
param0.add(75);
param0.add(39);
param0.add(49);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(32,),
(52,),
(52,),
(32,),
(73,),
(31,),
(29,),
(75,),
(39,),
(49,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {32,52,52,32,73,31,29,75,39,49};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_SUM_UNIQUE_SUB_ARRAY_SUM_GIVEN_ARRAY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_SUM_UNIQUE_SUB_ARRAY_SUM_GIVEN_ARRAY{
static int f_gold ( int [ ] arr , int n ) {
int res = 0 ;
HashMap < Integer , Integer > m = new HashMap < Integer , Integer > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
int sum = 0 ;
for ( int j = i ;
j < n ;
j ++ ) {
sum += arr [ j ] ;
if ( m . containsKey ( sum ) ) {
m . put ( sum , m . get ( sum ) + 1 ) ;
}
else {
m . put ( sum , 1 ) ;
}
}
}
for ( Map . Entry < Integer , Integer > x : m . entrySet ( ) ) if ( x . getValue ( ) == 1 ) res += x . getKey ( ) ;
return res ;
}
| def f_gold ( arr , n ) :
res = 0
m = dict ( )
for i in range ( n ) :
Sum = 0
for j in range ( i , n ) :
Sum += arr [ j ]
m [ Sum ] = m.get ( Sum , 0 ) + 1
for x in m :
if m [ x ] == 1 :
res += x
return res
|
using namespace std;
long long int f_gold ( int arr [ ], int n ) {
int res = 0;
unordered_map < int, int > m;
for ( int i = 0;
i < n;
i ++ ) {
int sum = 0;
for ( int j = i;
j < n;
j ++ ) {
sum += arr [ j ];
m [ sum ] ++;
}
}
for ( auto x : m ) if ( x . second == 1 ) res += x . first;
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{7,24,34,35,36,40,49,51,53,74,78});
param0.add(new int[]{-34,60,32});
param0.add(new int[]{0});
param0.add(new int[]{80,64,10,82,14,75,51,91,1,25,98,22,36,27,21,31,93,6,52,91,80,8,62,95,10,71,40,80,35,86,85,26,74,72,64,88,4,71,4,16});
param0.add(new int[]{-94,-46,-36,-24,-22,0,10,14,34,34,90,92,98});
param0.add(new int[]{1,0,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,1});
param0.add(new int[]{19,20,20,24,25,33,43,47,57,61,61,64,65,71,72,73,75,82,90,93,95});
param0.add(new int[]{-6,56,58,-36,70,-92,30,58,-40,98,80,-96,-4,-88,34,76,40,-32,-94,-26,8,72,-56,-96,-88,-24,36,14,-88,-32,90,4,-88,28,18});
param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{91,51,15,78,55,3,10,24,42,84,66,78,10,41,21,53,69,57,20,22,50,72,8,80,12,91,29,95,38,74,95,26,10,57,51,25,49,74,15,42,99,21,27});
List<Integer> param1 = new ArrayList<>();
param1.add(9);
param1.add(2);
param1.add(0);
param1.add(31);
param1.add(9);
param1.add(21);
param1.add(15);
param1.add(24);
param1.add(11);
param1.add(36);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([7, 24, 34, 35, 36, 40, 49, 51, 53, 74, 78],9,),
([-34, 60, 32],2,),
([0],0,),
([80, 64, 10, 82, 14, 75, 51, 91, 1, 25, 98, 22, 36, 27, 21, 31, 93, 6, 52, 91, 80, 8, 62, 95, 10, 71, 40, 80, 35, 86, 85, 26, 74, 72, 64, 88, 4, 71, 4, 16],31,),
([-94, -46, -36, -24, -22, 0, 10, 14, 34, 34, 90, 92, 98],9,),
([1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1],21,),
([19, 20, 20, 24, 25, 33, 43, 47, 57, 61, 61, 64, 65, 71, 72, 73, 75, 82, 90, 93, 95],15,),
([-6, 56, 58, -36, 70, -92, 30, 58, -40, 98, 80, -96, -4, -88, 34, 76, 40, -32, -94, -26, 8, 72, -56, -96, -88, -24, 36, 14, -88, -32, 90, 4, -88, 28, 18],24,),
([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,),
([91, 51, 15, 78, 55, 3, 10, 24, 42, 84, 66, 78, 10, 41, 21, 53, 69, 57, 20, 22, 50, 72, 8, 80, 12, 91, 29, 95, 38, 74, 95, 26, 10, 57, 51, 25, 49, 74, 15, 42, 99, 21, 27],36,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{7,24,34,35,36,40,49,51,53,74,78},{-34,60,32},{0},{80,64,10,82,14,75,51,91,1,25,98,22,36,27,21,31,93,6,52,91,80,8,62,95,10,71,40,80,35,86,85,26,74,72,64,88,4,71,4,16},{-94,-46,-36,-24,-22,0,10,14,34,34,90,92,98},{1,0,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,1},{19,20,20,24,25,33,43,47,57,61,61,64,65,71,72,73,75,82,90,93,95},{-6,56,58,-36,70,-92,30,58,-40,98,80,-96,-4,-88,34,76,40,-32,-94,-26,8,72,-56,-96,-88,-24,36,14,-88,-32,90,4,-88,28,18},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{91,51,15,78,55,3,10,24,42,84,66,78,10,41,21,53,69,57,20,22,50,72,8,80,12,91,29,95,38,74,95,26,10,57,51,25,49,74,15,42,99,21,27}};
vector<int> param1 {9,2,0,31,9,21,15,24,11,36};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES{
static int f_gold ( int n ) {
int DP [ ] = new int [ n + 1 ] ;
DP [ 0 ] = 0 ;
DP [ 1 ] = 1 ;
for ( int i = 2 ;
i <= n ;
i ++ ) {
if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ] ;
else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ] ;
}
return DP [ n ] ;
}
| def f_gold ( n ) :
DP = [ 0 ] * ( n + 1 )
DP [ 0 ] = 0
DP [ 1 ] = 1
for i in range ( 2 , n + 1 ) :
if ( int ( i % 2 ) == 0 ) :
DP [ i ] = DP [ int ( i / 2 ) ]
else :
DP [ i ] = ( DP [ int ( ( i - 1 ) / 2 ) ] + DP [ int ( ( i + 1 ) / 2 ) ] )
return DP [ n ]
|
using namespace std;
int f_gold ( int n ) {
int DP [ n + 1 ];
DP [ 0 ] = 0;
DP [ 1 ] = 1;
for ( int i = 2;
i <= n;
i ++ ) {
if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ];
else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ];
}
return DP [ n ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(37);
param0.add(24);
param0.add(13);
param0.add(56);
param0.add(26);
param0.add(67);
param0.add(82);
param0.add(60);
param0.add(64);
param0.add(65);
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());
}
} |
if __name__ == '__main__':
param = [
(37,),
(24,),
(13,),
(56,),
(26,),
(67,),
(82,),
(60,),
(64,),
(65,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {37,24,13,56,26,67,82,60,64,65};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING{
static int f_gold ( int n ) {
int res [ ] = new int [ n + 1 ] ;
res [ 0 ] = 0 ;
res [ 1 ] = 1 ;
for ( int i = 2 ;
i <= n ;
i ++ ) res [ i ] = Math . max ( i , ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) ) ;
return res [ n ] ;
}
| def f_gold ( n ) :
res = list ( )
res.append ( 0 )
res.append ( 1 )
i = 2
while i < n + 1 :
res.append ( max ( i , ( res [ int ( i / 2 ) ] + res [ int ( i / 3 ) ] + res [ int ( i / 4 ) ] + res [ int ( i / 5 ) ] ) ) )
i = i + 1
return res [ n ]
|
using namespace std;
int f_gold ( int n ) {
int res [ n + 1 ];
res [ 0 ] = 0;
res [ 1 ] = 1;
for ( int i = 2;
i <= n;
i ++ ) res [ i ] = max ( i, ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) );
return res [ n ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(3);
param0.add(19);
param0.add(39);
param0.add(89);
param0.add(96);
param0.add(68);
param0.add(48);
param0.add(5);
param0.add(3);
param0.add(4);
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());
}
} |
if __name__ == '__main__':
param = [
(3,),
(19,),
(39,),
(89,),
(96,),
(68,),
(48,),
(5,),
(3,),
(4,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {3,19,39,89,96,68,48,5,3,4};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NEXT_POWER_OF_2_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NEXT_POWER_OF_2_1{
static int f_gold ( int n ) {
int p = 1 ;
if ( n > 0 && ( n & ( n - 1 ) ) == 0 ) return n ;
while ( p < n ) p <<= 1 ;
return p ;
}
| def f_gold ( n ) :
p = 1
if ( n and not ( n & ( n - 1 ) ) ) :
return n
while ( p < n ) :
p <<= 1
return p ;
|
using namespace std;
unsigned int f_gold ( unsigned int n ) {
unsigned int p = 1;
if ( n && ! ( n & ( n - 1 ) ) ) return n;
while ( p < n ) p <<= 1;
return p;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(8);
param0.add(79);
param0.add(31);
param0.add(63);
param0.add(18);
param0.add(2);
param0.add(6);
param0.add(85);
param0.add(29);
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());
}
} |
if __name__ == '__main__':
param = [
(8,),
(79,),
(31,),
(63,),
(18,),
(2,),
(6,),
(85,),
(29,),
(8,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {8,79,31,63,18,2,6,85,29,8};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_PAIRS_DIFFERENCE_EQUAL_K |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_PAIRS_DIFFERENCE_EQUAL_K{
static int f_gold ( int arr [ ] , int n , int k ) {
int count = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = i + 1 ;
j < n ;
j ++ ) if ( arr [ i ] - arr [ j ] == k || arr [ j ] - arr [ i ] == k ) count ++ ;
}
return count ;
}
| def f_gold ( arr , n , k ) :
count = 0
for i in range ( 0 , n ) :
for j in range ( i + 1 , n ) :
if arr [ i ] - arr [ j ] == k or arr [ j ] - arr [ i ] == k :
count += 1
return count
|
using namespace std;
int f_gold ( int arr [ ], int n, int k ) {
int count = 0;
for ( int i = 0;
i < n;
i ++ ) {
for ( int j = i + 1;
j < n;
j ++ ) if ( arr [ i ] - arr [ j ] == k || arr [ j ] - arr [ i ] == k ) count ++;
}
return count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{9,14,17,19,22,23,23,27,30,31,34,37,37,39,39,42,57,61,68,73,77,79,91,96,97});
param0.add(new int[]{-78,-42,28,-88,18,-52});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1});
param0.add(new int[]{8,46,57,28,80,2,75,57,83,45,32,49,77,30,94,33,23,29,35,81,85});
param0.add(new int[]{-90,-72,-72,-62,-62,-54,-54,-52,-48,-38,-22,-22,-22,-12,-12,-8,-8,-8,-6,-6,-2,6,12,26,26,28,28,38,40,48,52,52,58,60,68,70,72,76,76,76,92});
param0.add(new int[]{0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1,0,1,0,0,1,0,0,1,0,1});
param0.add(new int[]{3,13,19,23,27,32,49,52,54,57,58,58,63,67,68,68,69,70,75,80,86,90,91,95});
param0.add(new int[]{-56,40,-66,42,8,-40,-8,-42});
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});
param0.add(new int[]{99,12,90,10,86,86,81,19,1,1,98,82,34,39,34,1,54,47,39,82,21,50,82,41,98,47,88,46,72,28,28,29,60,87,92,53,93,29,74,75,11,32,48,47,85,16,20});
List<Integer> param1 = new ArrayList<>();
param1.add(19);
param1.add(3);
param1.add(16);
param1.add(15);
param1.add(22);
param1.add(45);
param1.add(19);
param1.add(7);
param1.add(16);
param1.add(24);
List<Integer> param2 = new ArrayList<>();
param2.add(19);
param2.add(4);
param2.add(14);
param2.add(11);
param2.add(25);
param2.add(39);
param2.add(21);
param2.add(6);
param2.add(28);
param2.add(45);
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());
}
} |
if __name__ == '__main__':
param = [
([9, 14, 17, 19, 22, 23, 23, 27, 30, 31, 34, 37, 37, 39, 39, 42, 57, 61, 68, 73, 77, 79, 91, 96, 97],19,19,),
([-78, -42, 28, -88, 18, -52],3,4,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],16,14,),
([8, 46, 57, 28, 80, 2, 75, 57, 83, 45, 32, 49, 77, 30, 94, 33, 23, 29, 35, 81, 85],15,11,),
([-90, -72, -72, -62, -62, -54, -54, -52, -48, -38, -22, -22, -22, -12, -12, -8, -8, -8, -6, -6, -2, 6, 12, 26, 26, 28, 28, 38, 40, 48, 52, 52, 58, 60, 68, 70, 72, 76, 76, 76, 92],22,25,),
([0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1],45,39,),
([3, 13, 19, 23, 27, 32, 49, 52, 54, 57, 58, 58, 63, 67, 68, 68, 69, 70, 75, 80, 86, 90, 91, 95],19,21,),
([-56, 40, -66, 42, 8, -40, -8, -42],7,6,),
([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],16,28,),
([99, 12, 90, 10, 86, 86, 81, 19, 1, 1, 98, 82, 34, 39, 34, 1, 54, 47, 39, 82, 21, 50, 82, 41, 98, 47, 88, 46, 72, 28, 28, 29, 60, 87, 92, 53, 93, 29, 74, 75, 11, 32, 48, 47, 85, 16, 20],24,45,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{9,14,17,19,22,23,23,27,30,31,34,37,37,39,39,42,57,61,68,73,77,79,91,96,97},{-78,-42,28,-88,18,-52},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{8,46,57,28,80,2,75,57,83,45,32,49,77,30,94,33,23,29,35,81,85},{-90,-72,-72,-62,-62,-54,-54,-52,-48,-38,-22,-22,-22,-12,-12,-8,-8,-8,-6,-6,-2,6,12,26,26,28,28,38,40,48,52,52,58,60,68,70,72,76,76,76,92},{0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1,0,1,0,0,1,0,0,1,0,1},{3,13,19,23,27,32,49,52,54,57,58,58,63,67,68,68,69,70,75,80,86,90,91,95},{-56,40,-66,42,8,-40,-8,-42},{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},{99,12,90,10,86,86,81,19,1,1,98,82,34,39,34,1,54,47,39,82,21,50,82,41,98,47,88,46,72,28,28,29,60,87,92,53,93,29,74,75,11,32,48,47,85,16,20}};
vector<int> param1 {19,3,16,15,22,45,19,7,16,24};
vector<int> param2 {19,4,14,11,25,39,21,6,28,45};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION{
static int f_gold ( int n ) {
int table [ ] = new int [ n + 1 ] ;
for ( int i = 0 ;
i <= n ;
i ++ ) table [ i ] = n - i ;
for ( int i = n ;
i >= 1 ;
i -- ) {
if ( ! ( i % 2 > 0 ) ) table [ i / 2 ] = Math . min ( table [ i ] + 1 , table [ i / 2 ] ) ;
if ( ! ( i % 3 > 0 ) ) table [ i / 3 ] = Math . min ( table [ i ] + 1 , table [ i / 3 ] ) ;
}
return table [ 1 ] ;
}
| def f_gold ( n ) :
table = [ 0 ] * ( n + 1 )
for i in range ( n + 1 ) :
table [ i ] = n - i
for i in range ( n , 0 , - 1 ) :
if ( not ( i % 2 ) ) :
table [ i // 2 ] = min ( table [ i ] + 1 , table [ i // 2 ] )
if ( not ( i % 3 ) ) :
table [ i // 3 ] = min ( table [ i ] + 1 , table [ i // 3 ] )
return table [ 1 ]
|
using namespace std;
int f_gold ( int n ) {
int table [ n + 1 ];
for ( int i = 0;
i <= n;
i ++ ) table [ i ] = n - i;
for ( int i = n;
i >= 1;
i -- ) {
if ( ! ( i % 2 ) ) table [ i / 2 ] = min ( table [ i ] + 1, table [ i / 2 ] );
if ( ! ( i % 3 ) ) table [ i / 3 ] = min ( table [ i ] + 1, table [ i / 3 ] );
}
return table [ 1 ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(59);
param0.add(7);
param0.add(90);
param0.add(78);
param0.add(49);
param0.add(15);
param0.add(45);
param0.add(56);
param0.add(7);
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());
}
} |
if __name__ == '__main__':
param = [
(59,),
(7,),
(90,),
(78,),
(49,),
(15,),
(45,),
(56,),
(7,),
(70,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {59,7,90,78,49,15,45,56,7,70};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_1{
static int f_gold ( int n ) {
int res = 1 , i ;
for ( i = 2 ;
i <= n ;
i ++ ) res *= i ;
return res ;
}
| def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ;
|
using namespace std;
unsigned int f_gold ( unsigned int n ) {
int res = 1, i;
for ( i = 2;
i <= n;
i ++ ) res *= i;
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(57);
param0.add(28);
param0.add(23);
param0.add(79);
param0.add(52);
param0.add(42);
param0.add(79);
param0.add(77);
param0.add(99);
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());
}
} |
if __name__ == '__main__':
param = [
(57,),
(28,),
(23,),
(79,),
(52,),
(42,),
(79,),
(77,),
(99,),
(70,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {57,28,23,79,52,42,79,77,99,70};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MAXIMUM_DIFFERENCE_BETWEEN_FREQUENCY_OF_TWO_ELEMENTS_SUCH_THAT_ELEMENT_HAVING_GREATER_FREQUENCY_IS_ALSO_GREATER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_DIFFERENCE_BETWEEN_FREQUENCY_OF_TWO_ELEMENTS_SUCH_THAT_ELEMENT_HAVING_GREATER_FREQUENCY_IS_ALSO_GREATER{
static int f_gold ( int arr [ ] , int n ) {
Map < Integer , Integer > freq = new HashMap < > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) freq . put ( arr [ i ] , freq . get ( arr [ i ] ) == null ? 1 : freq . get ( arr [ i ] ) + 1 ) ;
int ans = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = 0 ;
j < n ;
j ++ ) {
if ( freq . get ( arr [ i ] ) > freq . get ( arr [ j ] ) && arr [ i ] > arr [ j ] ) ans = Math . max ( ans , freq . get ( arr [ i ] ) - freq . get ( arr [ j ] ) ) ;
else if ( freq . get ( arr [ i ] ) < freq . get ( arr [ j ] ) && arr [ i ] < arr [ j ] ) ans = Math . max ( ans , freq . get ( arr [ j ] ) - freq . get ( arr [ i ] ) ) ;
}
}
return ans ;
}
| null |
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > freq;
for ( int i = 0;
i < n;
i ++ ) freq [ arr [ i ] ] ++;
int ans = 0;
for ( int i = 0;
i < n;
i ++ ) {
for ( int j = 0;
j < n;
j ++ ) {
if ( freq [ arr [ i ] ] > freq [ arr [ j ] ] && arr [ i ] > arr [ j ] ) ans = max ( ans, freq [ arr [ i ] ] - freq [ arr [ j ] ] );
else if ( freq [ arr [ i ] ] < freq [ arr [ j ] ] && arr [ i ] < arr [ j ] ) ans = max ( ans, freq [ arr [ j ] ] - freq [ arr [ i ] ] );
}
}
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{6,6,16,22,33,37,46,49,50,51,65,82,94});
param0.add(new int[]{-4,-16,92,-28,-44,50,54,24,-28,-32,20,-94,-78,-20,26,90,-90,10,36,-52,60,-96,-64,-34,10,-12,86,78,32,-46,92,-66,18,-78,-28,14,-26,26,4,16,-96,86,-50});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{98,54,41,62,95,18,74,57,37,90,35,45,10,14,90,88,58,8,85,58,97,59,13,94,40,3,89,62,45,90,8,31,93,5,40,78,43,75,79,74,17,38,62});
param0.add(new int[]{-88,-78,-76,-66,-56,-54,-54,-52,-34,-24,2,58,76,78});
param0.add(new int[]{1,1,1,1,1,0,0,1,0,0,1,0,1,1,0});
param0.add(new int[]{8,43,44,86});
param0.add(new int[]{54,92,-46,6,-38});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{54,47,56,2,23,40,15,18,31,48,53,77,83,29,62,86});
List<Integer> param1 = new ArrayList<>();
param1.add(9);
param1.add(25);
param1.add(35);
param1.add(40);
param1.add(8);
param1.add(12);
param1.add(2);
param1.add(4);
param1.add(12);
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());
}
} | null |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{6,6,16,22,33,37,46,49,50,51,65,82,94},{-4,-16,92,-28,-44,50,54,24,-28,-32,20,-94,-78,-20,26,90,-90,10,36,-52,60,-96,-64,-34,10,-12,86,78,32,-46,92,-66,18,-78,-28,14,-26,26,4,16,-96,86,-50},{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},{98,54,41,62,95,18,74,57,37,90,35,45,10,14,90,88,58,8,85,58,97,59,13,94,40,3,89,62,45,90,8,31,93,5,40,78,43,75,79,74,17,38,62},{-88,-78,-76,-66,-56,-54,-54,-52,-34,-24,2,58,76,78},{1,1,1,1,1,0,0,1,0,0,1,0,1,1,0},{8,43,44,86},{54,92,-46,6,-38},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{54,47,56,2,23,40,15,18,31,48,53,77,83,29,62,86}};
vector<int> param1 {9,25,35,40,8,12,2,4,12,9};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PYTHAGOREAN_QUADRUPLE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PYTHAGOREAN_QUADRUPLE{
static Boolean f_gold ( int a , int b , int c , int d ) {
int sum = a * a + b * b + c * c ;
if ( d * d == sum ) return true ;
else return false ;
}
| def f_gold ( a , b , c , d ) :
sum = a * a + b * b + c * c ;
if ( d * d == sum ) :
return True
else :
return False
|
using namespace std;
bool f_gold ( int a, int b, int c, int d ) {
int sum = a * a + b * b + c * c;
if ( d * d == sum ) return true;
else return false;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(3);
param0.add(0);
param0.add(-1);
param0.add(82);
param0.add(14);
param0.add(6);
param0.add(13);
param0.add(96);
param0.add(70);
List<Integer> param1 = new ArrayList<>();
param1.add(1);
param1.add(2);
param1.add(0);
param1.add(-1);
param1.add(79);
param1.add(57);
param1.add(96);
param1.add(7);
param1.add(65);
param1.add(33);
List<Integer> param2 = new ArrayList<>();
param2.add(1);
param2.add(5);
param2.add(0);
param2.add(-1);
param2.add(6);
param2.add(35);
param2.add(45);
param2.add(3);
param2.add(72);
param2.add(6);
List<Integer> param3 = new ArrayList<>();
param3.add(3);
param3.add(38);
param3.add(0);
param3.add(1);
param3.add(59);
param3.add(29);
param3.add(75);
param3.add(63);
param3.add(93);
param3.add(2);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)).equals(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());
}
}
|
if __name__ == '__main__':
param = [
(1,1,1,3,),
(3,2,5,38,),
(0,0,0,0,),
(-1,-1,-1,1,),
(82,79,6,59,),
(14,57,35,29,),
(6,96,45,75,),
(13,7,3,63,),
(96,65,72,93,),
(70,33,6,2,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param)))
|
int main() {
int n_success = 0;
vector<int> param0 {1,3,0,-1,82,14,6,13,96,70};
vector<int> param1 {1,2,0,-1,79,57,96,7,65,33};
vector<int> param2 {1,5,0,-1,6,35,45,3,72,6};
vector<int> param3 {3,38,0,1,59,29,75,63,93,2};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
}
|
PROGRAM_CHECK_PLUS_PERFECT_NUMBER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_CHECK_PLUS_PERFECT_NUMBER{
static boolean f_gold ( int x ) {
int temp = x ;
int n = 0 ;
while ( x != 0 ) {
x /= 10 ;
n ++ ;
}
x = temp ;
int sum = 0 ;
while ( x != 0 ) {
sum += Math . pow ( x % 10 , n ) ;
x /= 10 ;
}
return ( sum == temp ) ;
}
| import math
def f_gold ( x ) :
temp = x
n = 0
while ( x != 0 ) :
x = x // 10
n = n + 1
x = temp
sm = 0
while ( x != 0 ) :
sm = sm + ( int ) ( math.pow ( x % 10 , n ) )
x = x // 10
return ( sm == temp )
|
using namespace std;
bool f_gold ( int x ) {
int temp = x;
int n = 0;
while ( x != 0 ) {
x /= 10;
n ++;
}
x = temp;
int sum = 0;
while ( x != 0 ) {
sum += pow ( x % 10, n );
x /= 10;
}
return ( sum == temp );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(371);
param0.add(9474);
param0.add(85);
param0.add(35);
param0.add(54);
param0.add(17);
param0.add(97);
param0.add(63);
param0.add(12);
param0.add(43);
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());
}
}
|
if __name__ == '__main__':
param = [
(371,),
(9474,),
(85,),
(35,),
(54,),
(17,),
(97,),
(63,),
(12,),
(43,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param)))
|
int main() {
int n_success = 0;
vector<int> param0 {371,9474,85,35,54,17,97,63,12,43};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
}
|
MAXIMUM_SUBARRAY_SUM_ARRAY_CREATED_REPEATED_CONCATENATION |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_SUBARRAY_SUM_ARRAY_CREATED_REPEATED_CONCATENATION{
static int f_gold ( int a [ ] , int n , int k ) {
int max_so_far = 0 ;
int INT_MIN , max_ending_here = 0 ;
for ( int i = 0 ;
i < n * k ;
i ++ ) {
max_ending_here = max_ending_here + a [ i % n ] ;
if ( max_so_far < max_ending_here ) max_so_far = max_ending_here ;
if ( max_ending_here < 0 ) max_ending_here = 0 ;
}
return max_so_far ;
}
| def f_gold ( a , n , k ) :
max_so_far = - 2147483648
max_ending_here = 0
for i in range ( n * k ) :
max_ending_here = max_ending_here + a [ i % n ]
if ( max_so_far < max_ending_here ) :
max_so_far = max_ending_here
if ( max_ending_here < 0 ) :
max_ending_here = 0
return max_so_far
|
using namespace std;
int f_gold ( int a [ ], int n, int k ) {
int max_so_far = INT_MIN, max_ending_here = 0;
for ( int i = 0;
i < n * k;
i ++ ) {
max_ending_here = max_ending_here + a [ i % n ];
if ( max_so_far < max_ending_here ) max_so_far = max_ending_here;
if ( max_ending_here < 0 ) max_ending_here = 0;
}
return max_so_far;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,6,12,20,23,28,33,37,47,51,53,56,63,65,65,68,69,76,76,78,83});
param0.add(new int[]{68,10,52,-44,34,-4,-34,2,50,-60,50,94,-98,-98,-44,-36,-4,-62,-2,-92,-70,-48,-78,-10,94});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{71,59,21,82,73,29,30,25,21,10,85,22,60,43,49,20,34,39,69,6,44,27,50,33,57,29,65,18,68,56,50,28});
param0.add(new int[]{-84,-74,-74,-56,-54,-48,-48,-46,-42,-34,-32,-30,-18,-16,-16,6,12,20,24,26,30,32,34,42,42,42,44,46,46,50,50,62,72,78,90});
param0.add(new int[]{0,1,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,1,0});
param0.add(new int[]{3,7,11,11,26,60,68,71,77,91,95});
param0.add(new int[]{28,48,-86,-52,6,4,30,18,-32,60,-2,16,-88,-36});
param0.add(new int[]{1});
param0.add(new int[]{76});
List<Integer> param1 = new ArrayList<>();
param1.add(18);
param1.add(22);
param1.add(34);
param1.add(23);
param1.add(17);
param1.add(16);
param1.add(8);
param1.add(8);
param1.add(0);
param1.add(0);
List<Integer> param2 = new ArrayList<>();
param2.add(20);
param2.add(22);
param2.add(29);
param2.add(30);
param2.add(23);
param2.add(25);
param2.add(10);
param2.add(11);
param2.add(0);
param2.add(0);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([5, 6, 12, 20, 23, 28, 33, 37, 47, 51, 53, 56, 63, 65, 65, 68, 69, 76, 76, 78, 83],18,20,),
([68, 10, 52, -44, 34, -4, -34, 2, 50, -60, 50, 94, -98, -98, -44, -36, -4, -62, -2, -92, -70, -48, -78, -10, 94],22,22,),
([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],34,29,),
([71, 59, 21, 82, 73, 29, 30, 25, 21, 10, 85, 22, 60, 43, 49, 20, 34, 39, 69, 6, 44, 27, 50, 33, 57, 29, 65, 18, 68, 56, 50, 28],23,30,),
([-84, -74, -74, -56, -54, -48, -48, -46, -42, -34, -32, -30, -18, -16, -16, 6, 12, 20, 24, 26, 30, 32, 34, 42, 42, 42, 44, 46, 46, 50, 50, 62, 72, 78, 90],17,23,),
([0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0],16,25,),
([3, 7, 11, 11, 26, 60, 68, 71, 77, 91, 95],8,10,),
([28, 48, -86, -52, 6, 4, 30, 18, -32, 60, -2, 16, -88, -36],8,11,),
([1],0,0,),
([76],0,0,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{5,6,12,20,23,28,33,37,47,51,53,56,63,65,65,68,69,76,76,78,83},{68,10,52,-44,34,-4,-34,2,50,-60,50,94,-98,-98,-44,-36,-4,-62,-2,-92,-70,-48,-78,-10,94},{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},{71,59,21,82,73,29,30,25,21,10,85,22,60,43,49,20,34,39,69,6,44,27,50,33,57,29,65,18,68,56,50,28},{-84,-74,-74,-56,-54,-48,-48,-46,-42,-34,-32,-30,-18,-16,-16,6,12,20,24,26,30,32,34,42,42,42,44,46,46,50,50,62,72,78,90},{0,1,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,1,0},{3,7,11,11,26,60,68,71,77,91,95},{28,48,-86,-52,6,4,30,18,-32,60,-2,16,-88,-36},{1},{76}};
vector<int> param1 {18,22,34,23,17,16,8,8,0,0};
vector<int> param2 {20,22,29,30,23,25,10,11,0,0};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1{
static boolean f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n ) {
int i = 0 ;
int j = 0 ;
for ( i = 0 ;
i < n ;
i ++ ) {
for ( j = 0 ;
j < m ;
j ++ ) if ( arr2 [ i ] == arr1 [ j ] ) break ;
if ( j == m ) return false ;
}
return true ;
}
| def f_gold ( arr1 , arr2 , m , n ) :
i = 0
j = 0
for i in range ( n ) :
for j in range ( m ) :
if ( arr2 [ i ] == arr1 [ j ] ) :
break
if ( j == m ) :
return 0
return 1
|
using namespace std;
bool f_gold ( int arr1 [ ], int arr2 [ ], int m, int n ) {
int i = 0;
int j = 0;
for ( i = 0;
i < n;
i ++ ) {
for ( j = 0;
j < m;
j ++ ) {
if ( arr2 [ i ] == arr1 [ j ] ) break;
}
if ( j == m ) return 0;
}
return 1;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96});
param0.add(new int[]{12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-76});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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[]{94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56});
param0.add(new int[]{-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98});
param0.add(new int[]{1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1});
param0.add(new int[]{6,8,11,13,14,26,26,41,48,70,82,83,84,88,96});
param0.add(new int[]{-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30});
param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{10,13,17,63});
param1.add(new int[]{12, -18, 44});
param1.add(new int[]{0,0,0});
param1.add(new int[]{80,58,32,2});
param1.add(new int[]{-99,-90,-90,-86});
param1.add(new int[]{0,0,1,1});
param1.add(new int[]{1,9,12,16});
param1.add(new int[]{-76,-54,4,78});
param1.add(new int[]{0,1,0,1});
param1.add(new int[]{93,5,9,13});
List<Integer> param2 = new ArrayList<>();
param2.add(29);
param2.add(46);
param2.add(34);
param2.add(17);
param2.add(23);
param2.add(10);
param2.add(10);
param2.add(27);
param2.add(10);
param2.add(19);
List<Integer> param3 = new ArrayList<>();
param3.add(4);
param3.add(3);
param3.add(3);
param3.add(4);
param3.add(4);
param3.add(4);
param3.add(4);
param3.add(4);
param3.add(4);
param3.add(4);
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());
}
} |
if __name__ == '__main__':
param = [
([7, 10, 10, 10, 13, 17, 23, 24, 25, 28, 30, 33, 37, 49, 49, 50, 57, 60, 60, 63, 63, 64, 65, 65, 72, 81, 84, 85, 85, 94, 96],
[10,13,17,63],29,4,),
([12, 30, -94, -92, -62, -18, -56, 44, -50, -92, 6, 2, 56, -90, 0, 0, 18, 86, -58, 58, -54, 62, -94, 94, 0, 8, 82, -68, -88, -18, 8, -80, -42, 18, 62, -8, 56, -76, -42, 56, 44, -2, -20, 62, -14, 74, -86, -76],
[12, -18, 44],46,3,),
([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],
[0,0,0],34,3,),
([94, 26, 32, 20, 46, 55, 9, 51, 57, 80, 45, 38, 68, 12, 90, 10, 80, 65, 12, 52, 51, 86, 64, 57, 93, 19, 30, 92, 85, 82, 24, 26, 36, 56],
[80,58,32,2],17,4,),
([-98, -90, -86, -86, -84, -84, -82, -80, -78, -72, -70, -68, -66, -64, -52, -52, -50, -38, -28, -26, -24, -14, -8, 16, 26, 26, 28, 34, 36, 40, 42, 44, 44, 46, 50, 60, 68, 78, 80, 86, 90, 92, 98],
[-99,-90,-90,-86],23,4,),
([1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1],
[0,0,1,1],10,4,),
([6, 8, 11, 13, 14, 26, 26, 41, 48, 70, 82, 83, 84, 88, 96],
[1,9,12,16],10,4,),
([-88, 80, 62, 76, 48, 92, 18, -94, -62, 98, -46, -50, 70, 32, 68, -54, 26, 16, 94, 0, -84, 2, -16, 88, 26, -38, 18, 64, 90, 80, 76, 2, 14, -90, 50, 4, 76, 30],
[-76,-54,4,78],27,4,),
([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],
[0,1,0,1],10,4,),
([54, 44, 97, 92, 13, 54, 27, 8, 43, 70, 77, 84, 55, 64, 5, 59, 27, 19, 65, 68, 66, 26, 33, 38, 7],
[93,5,9,13],19,4,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96},{12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-76},{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},{94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56},{-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98},{1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1},{6,8,11,13,14,26,26,41,48,70,82,83,84,88,96},{-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30},{0,0,0,0,0,1,1,1,1,1,1,1},{54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7}};
vector<vector<int>> param1 {
{10,13,17,63},
{12, -18, 44},
{0,0,0},
{80,58,32,2},
{-99,-90,-90,-86},
{0,0,1,1},
{1,9,12,16},
{-76,-54,4,78},
{0,1,0,1},
{93,5,9,13}};
vector<int> param2 {29,46,34,17,23,10,10,27,10,19};
vector<int> param3 {4,3,3,4,4,4,4,4,4,4};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NUMBER_SUBARRAYS_SUM_EXACTLY_EQUAL_K |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NUMBER_SUBARRAYS_SUM_EXACTLY_EQUAL_K{
static int f_gold ( int arr [ ] , int n , int sum ) {
HashMap < Integer , Integer > prevSum = new HashMap < > ( ) ;
int res = 0 ;
int currsum = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
currsum += arr [ i ] ;
if ( currsum == sum ) res ++ ;
if ( prevSum . containsKey ( currsum - sum ) ) res += prevSum . get ( currsum - sum ) ;
Integer count = prevSum . get ( currsum ) ;
if ( count == null ) prevSum . put ( currsum , 1 ) ;
else prevSum . put ( currsum , count + 1 ) ;
}
return res ;
}
| null |
using namespace std;
int f_gold ( int arr [ ], int n, int sum ) {
unordered_map < int, int > prevSum;
int res = 0;
int currsum = 0;
for ( int i = 0;
i < n;
i ++ ) {
currsum += arr [ i ];
if ( currsum == sum ) res ++;
if ( prevSum . find ( currsum - sum ) != prevSum . end ( ) ) res += ( prevSum [ currsum - sum ] );
prevSum [ currsum ] ++;
}
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{9,18,27,52,70,91});
param0.add(new int[]{60,-88,-48,90,-28,20,18,34,-58,76,-78,-18,68,-48,8,34,60,-34,-10,32,78,-84,-22,54,-18,-82,-70,-58,-20,-76,88,-30,-6,68});
param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1});
param0.add(new int[]{67,39,22,32,59,44,86,26,46,60,99,12,32,46,16,22,45,85,21,92,77,50,65,23,93,26,23,20,32,83,60,22,11,45,99,31,72});
param0.add(new int[]{-86,-84,-82,-82,-28,-12,4,24,62,72});
param0.add(new int[]{1,0,0,1,0,1,1,1,0,1,1,1,0,0,1,1,1,1});
param0.add(new int[]{8,20,25,27,28,28,30,31,32,36,39,41,51,53,53,54,56,58,59,77,78,85,88,92,99});
param0.add(new int[]{60,40,-96,-76,-34,-18,38,-62,50,56,64,-94,-50,50,-80,42,-66,-42,68,70,78,-18,-24,-48,-92,64,14,24,-94,-98,18,44,-58});
param0.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1});
param0.add(new int[]{73,52,37,80,4,26,3,76,32,79,31,32,8,87,42,50,51});
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(32);
param1.add(11);
param1.add(25);
param1.add(7);
param1.add(16);
param1.add(13);
param1.add(22);
param1.add(11);
param1.add(8);
List<Integer> param2 = new ArrayList<>();
param2.add(4);
param2.add(30);
param2.add(11);
param2.add(25);
param2.add(5);
param2.add(13);
param2.add(18);
param2.add(17);
param2.add(8);
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());
}
} | null |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{9,18,27,52,70,91},{60,-88,-48,90,-28,20,18,34,-58,76,-78,-18,68,-48,8,34,60,-34,-10,32,78,-84,-22,54,-18,-82,-70,-58,-20,-76,88,-30,-6,68},{0,0,0,0,0,0,0,0,1,1,1,1},{67,39,22,32,59,44,86,26,46,60,99,12,32,46,16,22,45,85,21,92,77,50,65,23,93,26,23,20,32,83,60,22,11,45,99,31,72},{-86,-84,-82,-82,-28,-12,4,24,62,72},{1,0,0,1,0,1,1,1,0,1,1,1,0,0,1,1,1,1},{8,20,25,27,28,28,30,31,32,36,39,41,51,53,53,54,56,58,59,77,78,85,88,92,99},{60,40,-96,-76,-34,-18,38,-62,50,56,64,-94,-50,50,-80,42,-66,-42,68,70,78,-18,-24,-48,-92,64,14,24,-94,-98,18,44,-58},{0,0,0,0,1,1,1,1,1,1,1,1},{73,52,37,80,4,26,3,76,32,79,31,32,8,87,42,50,51}};
vector<int> param1 {5,32,11,25,7,16,13,22,11,8};
vector<int> param2 {4,30,11,25,5,13,18,17,8,14};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_PAIR_MAXIMUM_GCD_ARRAY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_PAIR_MAXIMUM_GCD_ARRAY{
public static int f_gold ( int arr [ ] , int n ) {
int high = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) high = Math . max ( high , arr [ i ] ) ;
int divisors [ ] = new int [ high + 1 ] ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = 1 ;
j <= Math . sqrt ( arr [ i ] ) ;
j ++ ) {
if ( arr [ i ] % j == 0 ) {
divisors [ j ] ++ ;
if ( j != arr [ i ] / j ) divisors [ arr [ i ] / j ] ++ ;
}
}
}
for ( int i = high ;
i >= 1 ;
i -- ) if ( divisors [ i ] > 1 ) return i ;
return 1 ;
}
| null |
using namespace std;
int f_gold ( int arr [ ], int n ) {
int high = 0;
for ( int i = 0;
i < n;
i ++ ) high = max ( high, arr [ i ] );
int divisors [ high + 1 ] = {
0 };
for ( int i = 0;
i < n;
i ++ ) {
for ( int j = 1;
j <= sqrt ( arr [ i ] );
j ++ ) {
if ( arr [ i ] % j == 0 ) {
divisors [ j ] ++;
if ( j != arr [ i ] / j ) divisors [ arr [ i ] / j ] ++;
}
}
}
for ( int i = high;
i >= 1;
i -- ) if ( divisors [ i ] > 1 ) return i;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{3,3,8,10,12,13,14,16,16,19,20,21,25,29,33,35,35,35,35,36,38,41,42,45,45,45,46,48,51,52,53,55,56,57,58,62,69,73,73,76,76,80,89,91,92,93,93,96});
param0.add(new int[]{12,52,-66,50,50,-78,-14,26,56,74,8,-58,58,-66,-58,-12,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,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[]{23,98,12,45,83,85,30,92,26,12,38,20,86,52,71,20,56,78,10,34,86,55,99,84,26,2,1,89,60,26,16,37,98,11,73,42,36,60,28});
param0.add(new int[]{-98,-84,-80,-72,-66,-64,-52,-36,-28,-18,-12,-12,-4,8,12,40,42,56,68,70,90,94});
param0.add(new int[]{1,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,0,0,1,0,1});
param0.add(new int[]{3,5,6,7,8,9,11,13,18,20,24,25,26,27,36,41,41,45,48,48,49,65,69,70,85,90,99,99});
param0.add(new int[]{80,-26,-38,-40,22,-28,0,-36,70,-32,38,58,76,-42,38,92,68,-70,36,-62,24,-84,42,4,0,8,-36,98,-84,82,-70,-12,6,-82,-20,-68,48,-12,42,18,58,-14,94,84});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{36,60,45,76,43,71,10,18,52,52,53,73,48,95,13,50,97,30,73,13,18,34,51});
List<Integer> param1 = new ArrayList<>();
param1.add(45);
param1.add(11);
param1.add(26);
param1.add(28);
param1.add(17);
param1.add(14);
param1.add(20);
param1.add(39);
param1.add(26);
param1.add(22);
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());
}
} | null |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{3,3,8,10,12,13,14,16,16,19,20,21,25,29,33,35,35,35,35,36,38,41,42,45,45,45,46,48,51,52,53,55,56,57,58,62,69,73,73,76,76,80,89,91,92,93,93,96},{12,52,-66,50,50,-78,-14,26,56,74,8,-58,58,-66,-58,-12,80},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{23,98,12,45,83,85,30,92,26,12,38,20,86,52,71,20,56,78,10,34,86,55,99,84,26,2,1,89,60,26,16,37,98,11,73,42,36,60,28},{-98,-84,-80,-72,-66,-64,-52,-36,-28,-18,-12,-12,-4,8,12,40,42,56,68,70,90,94},{1,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,0,0,1,0,1},{3,5,6,7,8,9,11,13,18,20,24,25,26,27,36,41,41,45,48,48,49,65,69,70,85,90,99,99},{80,-26,-38,-40,22,-28,0,-36,70,-32,38,58,76,-42,38,92,68,-70,36,-62,24,-84,42,4,0,8,-36,98,-84,82,-70,-12,6,-82,-20,-68,48,-12,42,18,58,-14,94,84},{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},{36,60,45,76,43,71,10,18,52,52,53,73,48,95,13,50,97,30,73,13,18,34,51}};
vector<int> param1 {45,11,26,28,17,14,20,39,26,22};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY{
static int f_gold ( Integer arr [ ] , int n ) {
Arrays . sort ( arr , Collections . reverseOrder ( ) ) ;
int [ ] dimension = {
0 , 0 };
for ( int i = 0 , j = 0 ;
i < n - 1 && j < 2 ;
i ++ ) if ( arr [ i ] == arr [ i + 1 ] ) dimension [ j ++ ] = arr [ i ++ ] ;
return ( dimension [ 0 ] * dimension [ 1 ] ) ;
}
| def f_gold ( arr , n ) :
arr.sort ( reverse = True )
dimension = [ 0 , 0 ]
i = 0
j = 0
while ( i < n - 1 and j < 2 ) :
if ( arr [ i ] == arr [ i + 1 ] ) :
dimension [ j ] = arr [ i ]
j += 1
i += 1
i += 1
return ( dimension [ 0 ] * dimension [ 1 ] )
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
sort ( arr, arr + n, greater < int > ( ) );
int dimension [ 2 ] = {
0, 0 };
for ( int i = 0, j = 0;
i < n - 1 && j < 2;
i ++ ) if ( arr [ i ] == arr [ i + 1 ] ) dimension [ j ++ ] = arr [ i ++ ];
return ( dimension [ 0 ] * dimension [ 1 ] );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer [ ]> param0 = new ArrayList<>();
param0.add(new Integer[]{1,5,6,8,9,11,12,14,16,17,24,25,36,40,44,47,49,51,51,52,67,68,72,74,81,82,83,84,92,95,95,96,99});
param0.add(new Integer[]{-54,-82,-92,-32});
param0.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1});
param0.add(new Integer[]{16,62,17,15,26,45,2,17,65,94,96,30,68,44,96,60,99});
param0.add(new Integer[]{-88,-82,-78,-52,-50,-42,-34,-28,16,46,54,56,66,66,74,82,82,94,98});
param0.add(new Integer[]{0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,1,1,1,0});
param0.add(new Integer[]{1,6,8,8,8,10,13,14,14,23,24,25,27,28,29,30,33,38,43,44,49,52,56,58,62,63,64,65,65,68,75,85,85,87,93,96,97});
param0.add(new Integer[]{-90,-56,16,32,78,-20,76,-90,-68,-70,54,50,60,-64,78,-6,-92,6,16,70});
param0.add(new Integer[]{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 Integer[]{55,51,90,10,14,5,57,22,75,29,7,18,31,43,84,35,71,94,4,51,94,30,94,53,82});
List<Integer> param1 = new ArrayList<>();
param1.add(27);
param1.add(2);
param1.add(15);
param1.add(8);
param1.add(15);
param1.add(18);
param1.add(20);
param1.add(19);
param1.add(30);
param1.add(22);
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());
}
} |
if __name__ == '__main__':
param = [
([1, 5, 6, 8, 9, 11, 12, 14, 16, 17, 24, 25, 36, 40, 44, 47, 49, 51, 51, 52, 67, 68, 72, 74, 81, 82, 83, 84, 92, 95, 95, 96, 99],27,),
([-54, -82, -92, -32],2,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],15,),
([16, 62, 17, 15, 26, 45, 2, 17, 65, 94, 96, 30, 68, 44, 96, 60, 99],8,),
([-88, -82, -78, -52, -50, -42, -34, -28, 16, 46, 54, 56, 66, 66, 74, 82, 82, 94, 98],15,),
([0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0],18,),
([1, 6, 8, 8, 8, 10, 13, 14, 14, 23, 24, 25, 27, 28, 29, 30, 33, 38, 43, 44, 49, 52, 56, 58, 62, 63, 64, 65, 65, 68, 75, 85, 85, 87, 93, 96, 97],20,),
([-90, -56, 16, 32, 78, -20, 76, -90, -68, -70, 54, 50, 60, -64, 78, -6, -92, 6, 16, 70],19,),
([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],30,),
([55, 51, 90, 10, 14, 5, 57, 22, 75, 29, 7, 18, 31, 43, 84, 35, 71, 94, 4, 51, 94, 30, 94, 53, 82],22,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{1,5,6,8,9,11,12,14,16,17,24,25,36,40,44,47,49,51,51,52,67,68,72,74,81,82,83,84,92,95,95,96,99},{-54,-82,-92,-32},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{16,62,17,15,26,45,2,17,65,94,96,30,68,44,96,60,99},{-88,-82,-78,-52,-50,-42,-34,-28,16,46,54,56,66,66,74,82,82,94,98},{0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,1,1,1,0},{1,6,8,8,8,10,13,14,14,23,24,25,27,28,29,30,33,38,43,44,49,52,56,58,62,63,64,65,65,68,75,85,85,87,93,96,97},{-90,-56,16,32,78,-20,76,-90,-68,-70,54,50,60,-64,78,-6,-92,6,16,70},{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},{55,51,90,10,14,5,57,22,75,29,7,18,31,43,84,35,71,94,4,51,94,30,94,53,82}};
vector<int> param1 {27,2,15,8,15,18,20,19,30,22};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1{
static int f_gold ( int arr [ ] , int n ) {
int neg = 0 , pos = 0 ;
int sum = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
sum += arr [ i ] ;
if ( arr [ i ] < 0 ) neg ++ ;
else pos ++ ;
}
return ( sum / Math . abs ( neg - pos ) ) ;
}
| def f_gold ( arr , n ) :
neg = 0
pos = 0
sum = 0
for i in range ( 0 , n ) :
sum += arr [ i ]
if ( arr [ i ] < 0 ) :
neg += 1
else :
pos += 1
return ( sum / abs ( neg - pos ) )
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
int neg = 0, pos = 0;
int sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ];
if ( arr [ i ] < 0 ) neg ++;
else pos ++;
}
return ( sum / abs ( neg - pos ) );
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{49,98});
param0.add(new int[]{82,66,-68,24,-10});
param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{56,3,18,5,20,56,47,29,60,98,60,40,42,2,54,56,91,8,93,14,31,27,61,49,23,12,71});
param0.add(new int[]{-94,-94,-92,-86,-50,-48,-6,8,28,40,44,58,62,72,94});
param0.add(new int[]{0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,1});
param0.add(new int[]{16,56,56});
param0.add(new int[]{74,-90,-92,30,-18,66,-66,22});
param0.add(new int[]{0,0,0,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{21,64,82,78,30,34,35});
List<Integer> param1 = new ArrayList<>();
param1.add(1);
param1.add(2);
param1.add(8);
param1.add(25);
param1.add(12);
param1.add(36);
param1.add(1);
param1.add(5);
param1.add(7);
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());
}
} |
if __name__ == '__main__':
param = [
([49, 98],1,),
([82, 66, -68, 24, -10],2,),
([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],8,),
([56, 3, 18, 5, 20, 56, 47, 29, 60, 98, 60, 40, 42, 2, 54, 56, 91, 8, 93, 14, 31, 27, 61, 49, 23, 12, 71],25,),
([-94, -94, -92, -86, -50, -48, -6, 8, 28, 40, 44, 58, 62, 72, 94],12,),
([0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1],36,),
([16, 56, 56],1,),
([74, -90, -92, 30, -18, 66, -66, 22],5,),
([0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],7,),
([21, 64, 82, 78, 30, 34, 35],5,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{49,98},{82,66,-68,24,-10},{0,0,0,0,0,0,0,1,1,1,1,1,1,1},{56,3,18,5,20,56,47,29,60,98,60,40,42,2,54,56,91,8,93,14,31,27,61,49,23,12,71},{-94,-94,-92,-86,-50,-48,-6,8,28,40,44,58,62,72,94},{0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,1},{16,56,56},{74,-90,-92,30,-18,66,-66,22},{0,0,0,1,1,1,1,1,1,1,1,1,1,1},{21,64,82,78,30,34,35}};
vector<int> param1 {1,2,8,25,12,36,1,5,7,5};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN |
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{
public static int f_gold ( int n ) {
int count = 0 ;
for ( int curr = 1 ;
;
curr ++ ) {
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 ;
}
}
| import itertools
def f_gold ( n ) :
count = 0
for curr in itertools.count ( ) :
sum = 0
x = curr
while ( x ) :
sum = sum + x % 10
x = x // 10
if ( sum == 10 ) :
count = count + 1
if ( count == n ) :
return curr
return - 1
|
using namespace std;
int f_gold ( int n ) {
int count = 0;
for ( int curr = 1;
;
curr ++ ) {
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;
}
return - 1;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(37);
param0.add(13);
param0.add(51);
param0.add(69);
param0.add(76);
param0.add(10);
param0.add(97);
param0.add(40);
param0.add(69);
param0.add(4);
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());
}
} |
if __name__ == '__main__':
param = [
(37,),
(13,),
(51,),
(69,),
(76,),
(10,),
(97,),
(40,),
(69,),
(4,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {37,13,51,69,76,10,97,40,69,4};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_COST_SORT_MATRIX_NUMBERS_0_N2_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_COST_SORT_MATRIX_NUMBERS_0_N2_1{
public static int f_gold ( int mat [ ] [ ] , int n ) {
int i_des , j_des , q ;
int tot_energy = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = 0 ;
j < n ;
j ++ ) {
q = mat [ i ] [ j ] / n ;
i_des = q ;
j_des = mat [ i ] [ j ] - ( n * q ) ;
tot_energy += Math . abs ( i_des - i ) + Math . abs ( j_des - j ) ;
}
}
return tot_energy ;
}
| def f_gold ( mat , n ) :
tot_energy = 0
for i in range ( n ) :
for j in range ( n ) :
q = mat [ i ] [ j ] // n
i_des = q
j_des = mat [ i ] [ j ] - ( n * q )
tot_energy += ( abs ( i_des - i ) + abs ( j_des - j ) )
return tot_energy
| null |
public static void main(String args[]) {
int n_success = 0;
List<int [ ] [ ]> param0 = new ArrayList<>();
param0.add(new int[][]{new int[]{4,7,10,11,14,22,27,43,45,47,48,48,49,49,51,54,56,57,59,62,63,64,66,79,82,83,87,96,97,97,98},new int[]{1,1,10,13,14,18,31,33,35,37,37,42,43,44,46,54,60,61,63,63,67,67,74,76,81,83,88,91,91,96,97},new int[]{2,3,4,10,11,13,17,27,30,35,35,38,39,44,47,52,52,60,61,65,68,69,71,75,76,76,85,93,94,94,98},new int[]{3,5,5,19,22,23,24,24,27,31,31,32,32,44,46,50,52,54,55,57,58,59,61,61,68,72,76,78,79,85,98},new int[]{7,10,14,15,21,28,30,31,40,46,51,51,52,54,57,58,58,64,67,68,68,71,72,76,79,80,85,88,88,91,93},new int[]{2,5,18,21,21,25,28,31,33,34,37,38,42,45,47,56,64,70,71,75,76,78,78,81,84,88,90,91,98,98,99},new int[]{10,11,14,17,18,22,27,35,36,37,46,53,55,59,59,64,66,66,66,69,69,73,73,74,74,85,86,87,89,93,99},new int[]{11,13,13,14,17,18,19,19,21,25,25,29,36,36,42,43,45,49,57,61,64,65,71,75,84,84,89,94,94,95,98},new int[]{1,1,2,2,10,10,21,22,23,24,24,29,34,40,46,48,49,49,50,60,73,73,75,80,81,85,86,93,96,97,99},new int[]{1,2,10,15,16,18,19,21,23,25,29,29,31,31,32,38,42,43,48,51,54,56,63,74,74,74,88,88,94,94,94},new int[]{19,24,25,27,29,33,34,35,36,37,37,44,45,50,51,51,52,54,59,59,66,69,70,75,77,80,81,84,97,99,99},new int[]{1,2,5,5,7,12,17,19,20,38,44,45,47,48,51,55,59,61,61,64,65,67,74,76,76,77,79,83,86,92,92},new int[]{3,5,5,12,18,23,25,38,38,48,49,57,61,63,67,70,71,75,75,77,78,79,80,80,84,87,92,92,95,96,98},new int[]{1,3,3,5,7,8,9,13,17,21,23,36,38,39,39,41,45,57,71,72,72,73,76,79,80,82,83,87,89,97,99},new int[]{9,10,13,14,14,16,17,23,26,27,28,31,32,38,38,43,45,50,51,52,52,64,66,68,71,78,85,85,85,91,91},new int[]{1,2,2,3,10,12,13,15,15,21,25,26,28,34,45,45,46,46,49,49,52,55,57,61,62,63,70,72,73,84,86},new int[]{5,5,8,13,16,18,21,25,29,33,35,36,39,45,46,47,49,58,66,68,70,71,77,80,83,83,86,87,94,97,98},new int[]{5,9,17,20,24,27,27,27,28,30,32,32,35,39,40,43,45,52,55,56,63,71,76,78,81,86,90,95,97,98,98},new int[]{1,6,6,7,15,22,29,33,38,38,42,42,44,45,53,59,61,62,62,72,75,76,77,77,80,81,89,96,96,97,99},new int[]{3,4,4,10,11,12,16,17,32,33,33,36,40,40,42,42,44,45,47,52,53,56,59,62,64,67,80,80,89,90,94},new int[]{2,3,8,9,15,19,20,21,22,23,23,24,24,28,28,32,36,40,43,46,54,55,65,71,76,83,86,93,93,96,97},new int[]{2,3,3,4,8,11,13,14,18,19,20,22,35,39,45,60,61,64,66,69,70,70,72,72,74,75,79,83,87,90,97},new int[]{19,21,22,23,24,28,30,30,32,41,42,54,56,60,62,65,71,72,72,73,75,75,78,84,85,85,85,85,87,89,92},new int[]{6,7,10,11,11,16,17,20,20,23,31,33,34,36,38,42,44,48,56,57,58,63,64,69,69,70,72,81,85,89,91},new int[]{9,11,13,18,21,22,24,26,26,30,35,42,51,53,55,55,58,58,59,59,61,63,67,75,79,88,88,92,96,98,99},new int[]{9,12,14,17,21,21,32,35,38,39,41,43,45,45,45,55,57,57,63,67,71,72,74,75,76,77,78,83,83,85,97},new int[]{3,4,13,17,20,22,28,32,36,38,39,39,52,56,60,60,61,61,62,64,65,69,71,73,82,88,91,96,96,97,99},new int[]{2,2,13,14,15,19,25,32,33,34,37,38,41,45,45,53,57,59,59,60,68,71,78,80,81,84,93,93,95,99,99},new int[]{5,16,17,18,18,24,27,27,32,35,41,41,49,51,56,60,60,62,67,67,71,78,78,79,82,89,92,92,95,97,98},new int[]{6,7,9,10,10,12,16,19,19,26,28,31,32,33,41,43,46,47,48,49,51,52,58,66,75,75,76,78,81,88,91},new int[]{8,13,18,19,22,26,26,26,27,30,30,32,33,35,35,38,45,53,57,60,63,63,65,71,77,79,81,91,96,98,99}});
param0.add(new int[][]{new int[]{-40}});
param0.add(new int[][]{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,1,1,1},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,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,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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,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,1,1,1,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,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,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,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},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,1},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,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,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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,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,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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,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,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},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,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,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},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,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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},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},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,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,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},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,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,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},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,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,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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,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,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},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,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,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},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},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},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,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,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},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,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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}});
param0.add(new int[][]{new int[]{3,86,3,43,83,22,69,67,38,82,99,59,27,2,8,84,60,93,75,37,65,79,43,69,7,42,44,77,24,58},new int[]{88,63,93,78,89,63,23,39,60,17,94,68,16,76,31,4,66,91,57,98,95,83,22,79,50,34,84,59,59,39},new int[]{37,36,42,78,47,20,40,18,7,56,4,26,25,64,34,28,88,46,21,45,70,75,24,29,79,7,81,32,65,87},new int[]{90,25,86,26,59,67,24,74,37,68,78,5,7,15,63,20,59,90,58,50,82,19,37,64,81,74,62,3,28,87},new int[]{81,75,25,44,42,86,92,29,11,50,77,77,99,69,3,49,89,35,59,95,85,51,36,72,29,74,55,72,58,16},new int[]{82,37,70,98,69,84,29,36,49,94,64,72,17,95,83,51,16,65,89,21,14,4,75,99,39,60,18,65,69,6},new int[]{88,1,88,12,21,19,37,85,43,80,65,79,97,12,45,12,38,62,53,21,86,67,99,12,38,83,30,32,27,29},new int[]{42,25,24,59,60,38,34,96,84,77,14,97,14,1,89,95,62,57,96,59,65,52,72,70,69,36,79,34,68,33},new int[]{69,92,20,1,71,47,28,33,29,80,55,67,17,82,82,68,18,24,51,49,71,62,69,36,97,39,22,97,3,63},new int[]{63,34,94,31,49,43,90,61,1,55,45,29,28,13,44,26,45,14,92,96,9,39,83,53,34,59,73,52,9,28},new int[]{30,46,18,73,90,38,8,49,75,15,39,10,96,85,32,53,4,93,86,7,95,87,95,59,65,22,77,79,66,30},new int[]{92,28,99,32,90,28,2,97,76,97,38,39,77,84,88,19,34,23,81,81,73,13,91,68,6,21,44,30,16,2},new int[]{76,7,20,53,71,29,57,33,32,53,44,25,76,28,91,15,28,14,63,78,75,49,81,93,82,45,59,81,85,97},new int[]{98,10,23,21,48,22,4,43,13,24,69,62,61,11,61,95,89,31,10,77,93,41,45,32,8,42,50,15,57,10},new int[]{85,90,37,19,60,33,71,96,9,10,52,20,73,67,83,18,62,19,17,43,32,15,92,47,59,83,15,45,95,90},new int[]{38,86,16,5,83,44,46,23,96,75,76,15,8,58,29,81,52,30,87,45,62,82,74,69,57,99,60,13,57,92},new int[]{75,52,45,6,41,30,93,17,76,53,20,13,65,38,14,51,83,93,55,83,19,81,70,57,37,95,48,52,25,86},new int[]{75,79,14,80,61,82,79,70,35,31,66,47,8,2,30,96,22,94,68,59,20,29,98,14,95,33,63,72,3,1},new int[]{43,21,47,66,48,27,51,75,20,87,71,98,93,4,59,22,76,65,7,38,21,26,36,86,28,78,62,98,40,5},new int[]{46,57,64,58,2,92,98,82,40,87,80,96,62,53,92,27,74,38,40,72,8,81,64,25,75,54,70,91,95,42},new int[]{97,97,58,63,90,72,76,74,96,96,16,43,65,97,48,95,36,16,57,38,21,11,99,39,67,61,76,89,25,83},new int[]{1,5,93,79,76,93,81,74,11,6,74,49,86,23,82,24,33,65,2,49,74,6,14,11,82,32,34,41,78,5},new int[]{82,67,38,85,78,83,2,93,39,17,51,17,97,99,35,98,82,84,29,68,91,86,49,16,2,50,10,34,18,45},new int[]{71,44,54,31,93,84,28,82,87,53,89,45,97,23,74,76,35,4,71,92,35,68,53,2,8,38,95,68,18,6},new int[]{37,28,49,99,51,64,10,80,69,45,85,58,41,56,39,67,3,77,35,75,46,44,38,70,75,19,21,91,43,78},new int[]{68,31,36,20,86,37,17,3,10,68,61,59,95,80,73,52,96,23,54,33,45,74,55,83,60,55,88,59,77,9},new int[]{55,81,74,8,73,6,86,64,38,76,80,62,64,11,62,72,95,22,27,57,83,85,60,36,76,28,78,24,25,80},new int[]{85,85,15,8,23,92,30,74,79,90,62,20,96,61,46,80,40,7,51,27,28,43,83,39,94,10,49,98,27,84},new int[]{91,70,64,86,70,85,54,69,14,67,43,22,9,91,10,84,93,3,5,87,59,54,59,82,8,73,22,33,53,64},new int[]{82,37,42,38,4,98,16,82,47,87,9,34,36,92,10,72,87,72,22,40,12,96,12,30,41,18,33,37,27,45}});
param0.add(new int[][]{new int[]{-96,-90,-78,-74,-70,-60,-52,-50,-48,-46,-32,-20,-20,-10,-6,-4,4,4,6,8,8,24,32,48,48,58,86,92,98},new int[]{-68,-60,-58,-54,-40,-38,-22,-16,-16,-16,-12,0,4,4,30,30,42,46,48,48,50,52,52,52,66,68,76,78,96},new int[]{-92,-90,-86,-70,-60,-58,-48,-46,-46,-36,-34,-14,-14,-10,-2,12,44,46,52,54,66,70,70,74,76,80,86,90,98},new int[]{-98,-88,-78,-78,-74,-72,-68,-66,-66,-58,-36,-32,-26,-22,-6,-6,8,8,18,20,22,28,34,60,70,70,70,80,90},new int[]{-98,-96,-96,-88,-86,-86,-72,-66,-64,-62,-54,-52,-52,-46,-42,-22,-20,-14,-10,-4,8,14,22,64,74,78,88,96,96},new int[]{-98,-82,-78,-58,-54,-54,-52,-52,-46,-46,-40,-40,-28,-26,-4,0,8,8,12,14,50,52,62,66,68,70,78,94,96},new int[]{-94,-90,-80,-78,-74,-72,-70,-54,-52,-46,-40,-38,-28,-22,-22,-20,16,16,18,18,20,24,44,46,50,58,64,70,76},new int[]{-96,-94,-92,-86,-80,-80,-76,-76,-72,-68,-52,-32,-26,-18,-14,-10,-2,0,4,10,12,18,22,30,44,70,76,78,82},new int[]{-90,-88,-68,-66,-46,-40,-40,-30,-30,-26,-22,-18,-6,-4,-4,6,8,10,10,16,20,20,26,28,36,58,82,90,98},new int[]{-90,-86,-84,-84,-82,-66,-60,-40,-32,-22,-14,4,6,20,22,22,32,34,34,52,58,60,66,70,76,80,88,92,96},new int[]{-96,-90,-80,-80,-66,-66,-46,-36,-36,-28,-20,-10,-4,0,14,20,24,26,32,38,38,44,60,70,70,76,78,86,94},new int[]{-94,-82,-80,-72,-70,-60,-46,-46,-38,-36,-26,-24,-18,-12,-4,18,26,34,38,44,46,50,52,64,68,72,80,80,96},new int[]{-98,-94,-92,-84,-76,-66,-62,-44,-36,-34,-32,-22,2,4,8,18,18,18,18,32,36,42,52,58,70,80,86,94,98},new int[]{-98,-96,-92,-82,-74,-72,-72,-28,-2,0,4,20,32,32,34,34,36,38,50,52,58,60,62,62,80,84,88,88,90},new int[]{-74,-74,-70,-66,-54,-50,-42,-40,-36,-16,-14,-14,-12,-10,-8,-4,10,18,28,58,60,68,68,74,76,84,86,96,98},new int[]{-98,-96,-90,-56,-54,-46,-42,-36,-34,-26,-26,-6,0,2,12,14,24,24,40,50,60,64,64,70,76,78,80,88,90},new int[]{-92,-92,-84,-80,-80,-64,-56,-50,-44,-42,-32,-18,-16,-14,14,24,26,26,30,36,44,46,46,50,56,64,86,86,86},new int[]{-96,-94,-94,-88,-86,-74,-62,-62,-44,-40,-30,-28,-24,-20,14,20,22,40,52,52,56,58,60,60,62,62,84,96,98},new int[]{-98,-92,-92,-54,-54,-50,-48,-48,-40,-40,-30,-26,-24,-12,-6,0,18,24,24,26,26,36,44,48,66,74,86,88,94},new int[]{-98,-98,-94,-90,-88,-80,-76,-68,-60,-58,-56,-42,-38,-28,-26,-4,0,20,22,28,36,50,56,56,60,60,68,86,86},new int[]{-94,-84,-62,-42,-36,-36,-28,-26,-24,-20,-14,-10,0,16,20,22,30,34,40,52,56,56,62,66,76,82,84,92,98},new int[]{-98,-92,-86,-86,-78,-76,-58,-58,-54,-50,-40,-26,-10,-6,0,18,20,24,24,24,38,42,46,54,64,76,80,90,96},new int[]{-86,-84,-78,-76,-66,-62,-60,-56,-46,-32,-22,-18,-18,-10,-2,4,10,14,28,36,42,42,56,60,62,68,74,82,88},new int[]{-98,-98,-76,-72,-64,-64,-62,-60,-48,-44,-42,-36,-36,-30,-24,-12,-8,2,12,16,36,42,44,60,66,68,84,86,88},new int[]{-96,-96,-94,-94,-92,-90,-62,-50,-48,-48,-48,-44,-24,-22,-8,-8,-6,-6,0,16,48,54,54,58,64,74,74,78,88},new int[]{-98,-96,-84,-74,-54,-52,-40,-34,-24,-16,-14,-10,-6,-6,-4,12,16,18,46,46,48,48,56,62,64,78,82,86,90},new int[]{-86,-86,-72,-66,-62,-48,-44,-38,-26,-22,-20,-12,-4,8,10,14,18,30,30,32,42,62,66,70,70,78,84,94,98},new int[]{-98,-88,-82,-80,-68,-68,-68,-66,-64,-52,-50,-46,-44,-42,-36,-34,-2,-2,4,10,26,42,44,62,66,68,76,82,98},new int[]{-98,-92,-88,-88,-86,-62,-50,-46,-32,-28,-20,-4,-2,0,12,20,34,38,42,60,64,64,64,66,66,72,74,88,98}});
param0.add(new int[][]{new int[]{1,1,1,1,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0},new int[]{1,1,0,1,0,1,0,1,0,1,1,0,1,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1},new int[]{1,1,0,0,0,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,0,0,0,0,0,1,1,1,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1},new int[]{1,1,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,1,0,1,0,1,1,1,1,0,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0},new int[]{0,0,1,1,0,1,0,0,0,0,1,1,0,1,0,0,1,0,1,1,1,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,1,1,0,0,0,1,0},new int[]{0,1,0,1,0,1,1,0,0,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,1,1,0,0,1,0,1,1,0,1},new int[]{1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,1,0,0,0,1,0,1,0,1,0,0,1,1,0,1,1,0,1,0},new int[]{1,1,0,1,0,1,0,0,0,1,0,0,0,1,1,0,0,0,1,1,0,1,1,0,1,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,0,0,0},new int[]{1,0,1,0,0,0,1,1,0,0,1,1,1,1,0,0,1,0,0,1,1,0,0,0,1,1,0,1,0,1,0,1,0,0,1,1,0,1,0,1,0,0,1},new int[]{0,0,0,0,1,0,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,0,1,0,0,1,0,0,0,1,1,0},new int[]{0,0,1,0,1,0,1,1,1,1,0,1,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,0,1,0,1,1,1,1,1,0},new int[]{1,0,0,1,0,0,1,0,0,1,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,0,0},new int[]{0,0,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,1,0,0,1,0,0,1,1,1,1,0,1},new int[]{0,1,0,0,1,0,0,1,1,1,0,1,0,0,1,1,1,0,1,1,0,0,1,0,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,0,1},new int[]{0,1,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,1,0,0,1,1,1,0,0,1,0,1,0,1,0},new int[]{0,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,1,1},new int[]{1,1,0,0,1,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,1,1,0,1,0,1,0,1,1,1},new int[]{1,1,0,0,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,1,1,1,0,0,0,1,1,1,1,0,1,1,0,0,0,1},new int[]{0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1},new int[]{0,1,0,1,0,1,1,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0},new int[]{0,1,0,1,1,1,1,1,0,1,1,1,0,0,1,0,0,1,0,1,0,1,0,1,1,1,0,0,0,1,0,0,1,0,1,1,0,0,0,1,1,1,1},new int[]{1,0,1,0,1,0,1,0,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,0,0,0,1,0,0,0,1,1,1,0,1,0,1,1,1,0,0,0},new int[]{1,0,1,0,1,1,0,0,1,1,0,0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,1,0},new int[]{0,1,0,1,0,0,0,0,1,1,0,0,1,0,0,1,0,1,0,0,0,1,1,0,0,1,0,1,1,0,1,0,0,0,1,1,1,1,0,0,0,1,1},new int[]{1,1,0,0,1,1,0,0,0,1,1,0,1,0,0,0,1,0,0,1,1,0,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0,1,1,0,0,0,0},new int[]{1,0,1,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,1,1,0,0,1,1,1,1,0,1,1,1,1,0,0,1,0,1,1,1,1,0,1,1},new int[]{1,1,0,1,1,1,1,0,1,1,0,1,0,1,1,0,1,0,0,0,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,1,1,0,1,0,0},new int[]{1,0,1,0,1,0,0,0,0,0,1,1,1,0,1,1,0,1,1,0,0,1,0,0,0,1,0,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1},new int[]{0,1,1,1,0,1,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,0,1,0,1,1,1,1,1,0,1,1,0,0,0,1,1,1,0,1,1,0,0},new int[]{1,1,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1,0},new int[]{1,0,0,1,1,1,1,0,1,0,1,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,1,0,0,1,1,1,1,1,0,0,1},new int[]{1,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0,0,0,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,1,1,0,1,1,0,1,0,0,0},new int[]{1,1,1,0,1,1,0,0,1,0,1,0,1,0,0,0,1,1,0,0,0,1,1,1,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1},new int[]{1,0,0,0,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,1,1,1,1,0,0,0,0,0,1,0,0,1,1,0,0,1,0,1},new int[]{0,1,1,1,1,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,1,1,0,1},new int[]{1,0,0,1,1,1,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,1,0,0,0,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0},new int[]{0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,1,0,1,1,0,0,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0},new int[]{1,0,1,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,1,0,1,1,0,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,0,1,0,1},new int[]{1,0,0,0,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,1,0,1,0,0,1,0,1,1,0},new int[]{1,1,1,1,0,0,0,1,0,0,0,1,0,1,1,1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0},new int[]{1,1,1,0,0,1,0,1,1,0,1,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0,0,0,0,1,1,1,1,0,1,1,1,0,1,1,1,0,1},new int[]{1,1,0,1,1,1,0,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,1,1,1,1,0,0,0,1,1,0,1,1},new int[]{1,1,0,1,1,1,0,0,1,0,1,1,1,1,1,0,1,0,0,1,0,0,0,1,1,0,1,1,1,0,0,1,0,1,1,1,0,0,1,0,0,0,0}});
param0.add(new int[][]{new int[]{12,22,56,63,69},new int[]{8,8,12,57,95},new int[]{40,55,59,65,72},new int[]{2,22,40,72,83},new int[]{2,4,12,31,38}});
param0.add(new int[][]{new int[]{-92,-36,84,62,-94,-74,20,20,92},new int[]{52,-40,-98,-32,58,80,-60,46,80},new int[]{8,8,0,-48,-86,48,-38,-96,92},new int[]{18,-68,-74,92,-70,-36,-32,-16,-16},new int[]{-70,-26,32,-58,82,22,-12,96,-44},new int[]{-68,-54,-94,-84,-68,-70,-30,-76,-52},new int[]{-68,64,68,80,30,12,-82,20,-58},new int[]{-38,-88,24,28,-98,56,-62,-46,98},new int[]{28,-82,-32,74,-94,38,-12,-46,-6}});
param0.add(new int[][]{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},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},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},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},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},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},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},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},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},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},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},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},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},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},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},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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},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},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},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},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},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},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},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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},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},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},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},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},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}});
param0.add(new int[][]{new int[]{78,96,83,94,61,52,86,42,64,39,8,48,87,31,77,72,9,9,3,83,2,79,20,84,50,85,32,15,14,70,7,19,43,6,71,16},new int[]{35,5,20,49,27,85,22,1,99,13,57,86,70,34,34,11,50,22,60,58,31,45,64,3,74,95,85,46,32,94,13,90,94,56,25,94},new int[]{52,7,25,18,38,42,26,83,41,20,38,29,71,38,99,53,76,61,98,56,74,46,62,1,1,98,7,36,87,66,77,52,81,27,44,54},new int[]{12,17,86,71,29,39,95,71,53,32,65,93,66,62,97,63,99,48,33,7,28,20,68,98,45,92,9,94,29,43,24,99,9,99,39,88},new int[]{25,71,58,33,26,76,27,56,55,60,28,36,10,18,71,98,61,83,18,62,43,57,23,61,43,34,66,76,25,82,73,79,76,13,6,31},new int[]{79,36,81,72,22,53,90,82,99,10,42,11,36,80,30,95,90,71,57,62,38,97,73,47,66,15,59,62,26,7,25,93,35,24,4,19},new int[]{49,55,96,83,54,53,41,35,52,83,46,58,50,48,53,41,69,36,93,27,7,42,95,90,7,29,93,23,43,18,78,13,70,18,19,91},new int[]{74,42,96,90,95,25,48,8,19,48,59,79,64,90,67,76,33,60,25,32,92,12,38,12,52,73,84,62,72,82,76,30,95,15,22,30},new int[]{61,90,92,47,62,34,56,90,12,81,48,3,37,43,78,41,42,78,22,35,36,98,77,70,22,32,88,22,66,64,81,88,63,67,48,51},new int[]{39,21,32,61,54,32,98,87,66,71,31,81,68,3,60,67,1,71,24,64,52,99,25,85,60,3,17,93,61,74,44,27,74,42,70,22},new int[]{98,61,8,13,47,31,11,99,47,3,21,28,67,3,35,67,71,32,85,62,6,94,99,41,34,7,81,22,74,15,78,48,86,38,54,21},new int[]{57,49,87,34,93,5,91,89,46,63,13,89,59,56,67,24,12,57,96,66,44,32,90,23,14,10,28,12,66,74,17,4,82,92,27,62},new int[]{3,62,20,85,22,98,38,68,57,37,98,22,82,34,65,99,61,66,8,36,92,50,12,73,64,4,61,31,25,2,59,68,47,28,86,93},new int[]{28,6,38,36,93,72,39,55,30,76,96,54,5,73,15,14,12,74,65,44,94,91,6,33,42,87,35,81,57,10,11,33,86,73,89,94},new int[]{8,10,9,84,30,9,35,86,49,37,43,23,43,13,36,82,61,34,12,73,4,70,32,17,34,35,64,80,19,50,58,77,44,66,1,46},new int[]{99,72,9,61,48,92,58,68,33,52,8,47,14,9,13,2,11,49,3,64,60,95,64,59,36,52,10,50,86,9,31,80,31,91,9,25},new int[]{74,65,81,28,88,58,49,92,17,14,31,27,61,52,15,40,33,38,28,92,71,56,34,49,2,55,33,3,3,61,66,95,79,62,79,91},new int[]{47,87,29,43,72,14,76,93,41,18,65,2,17,20,48,59,97,43,94,59,61,79,71,54,93,8,86,4,73,10,66,98,29,48,11,72},new int[]{32,79,33,43,27,60,73,55,27,84,4,97,39,5,25,23,98,1,7,4,48,47,34,79,17,89,87,8,37,22,80,21,81,74,73,31},new int[]{97,59,19,17,65,65,21,37,30,76,41,86,84,30,33,32,38,7,30,56,19,80,86,62,47,19,45,80,16,82,44,27,7,38,6,30},new int[]{64,83,75,9,41,8,61,89,61,49,40,67,75,27,80,9,30,12,99,20,93,42,99,88,76,1,56,10,34,41,50,97,66,62,52,49},new int[]{64,54,22,65,92,84,27,42,10,69,67,18,75,24,38,71,52,79,18,38,70,94,91,77,38,74,91,3,1,85,82,1,52,40,44,60},new int[]{83,17,61,43,30,62,60,35,39,95,91,71,2,50,7,32,51,44,24,18,66,87,62,3,92,87,77,1,25,46,77,15,59,46,88,86},new int[]{83,66,34,2,59,29,65,98,55,93,66,26,75,36,64,60,45,19,75,40,16,34,52,25,8,52,29,39,92,17,70,29,42,33,23,80},new int[]{22,11,32,56,48,20,32,33,49,59,13,53,79,4,33,11,6,71,86,14,98,61,20,80,2,53,68,9,50,26,73,20,87,60,96,99},new int[]{96,64,95,64,34,73,24,52,46,28,94,82,26,1,74,47,14,48,5,33,65,84,72,21,10,60,69,65,57,16,73,2,28,42,14,44},new int[]{57,72,10,97,89,71,74,20,5,82,52,86,39,67,93,19,81,53,21,72,64,6,61,47,89,54,72,47,18,97,53,48,75,65,99,33},new int[]{61,22,43,17,71,62,73,94,48,51,85,46,41,66,31,43,7,29,3,61,28,62,56,34,61,59,49,38,14,33,64,94,14,27,42,28},new int[]{93,66,93,79,99,47,2,8,26,82,73,3,5,43,80,74,29,94,11,16,31,89,16,74,95,87,43,15,77,80,57,27,92,74,6,69},new int[]{64,88,68,15,45,85,22,39,62,24,92,7,61,69,51,32,81,81,62,68,39,26,38,97,62,70,84,80,42,3,60,89,2,61,39,90},new int[]{29,39,6,62,21,87,37,64,88,68,5,75,96,72,37,39,23,97,58,57,81,74,72,91,58,52,68,47,64,46,60,60,65,31,65,46},new int[]{81,39,17,69,41,21,62,88,29,31,3,73,28,99,30,39,48,28,52,62,57,5,9,5,24,77,22,2,44,74,59,68,37,65,94,34},new int[]{47,49,70,54,77,78,41,1,63,45,9,34,18,74,57,70,75,86,67,5,35,92,10,40,59,83,29,16,37,16,80,4,95,26,23,17},new int[]{80,56,23,61,92,5,29,39,82,8,30,80,66,62,31,20,63,75,65,80,63,89,14,22,45,81,9,97,99,5,41,96,24,90,98,67},new int[]{50,69,72,14,34,42,75,83,23,33,14,49,59,98,29,44,87,18,79,26,32,33,63,53,37,1,71,66,12,30,46,69,6,45,45,18},new int[]{21,55,93,44,14,50,63,41,47,23,15,25,63,19,31,63,76,32,79,18,47,93,98,43,79,60,43,8,15,94,56,34,41,74,75,15}});
List<Integer> param1 = new ArrayList<>();
param1.add(15);
param1.add(0);
param1.add(25);
param1.add(29);
param1.add(16);
param1.add(35);
param1.add(4);
param1.add(4);
param1.add(35);
param1.add(29);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([[4, 7, 10, 11, 14, 22, 27, 43, 45, 47, 48, 48, 49, 49, 51, 54, 56, 57, 59, 62, 63, 64, 66, 79, 82, 83, 87, 96, 97, 97, 98], [1, 1, 10, 13, 14, 18, 31, 33, 35, 37, 37, 42, 43, 44, 46, 54, 60, 61, 63, 63, 67, 67, 74, 76, 81, 83, 88, 91, 91, 96, 97], [2, 3, 4, 10, 11, 13, 17, 27, 30, 35, 35, 38, 39, 44, 47, 52, 52, 60, 61, 65, 68, 69, 71, 75, 76, 76, 85, 93, 94, 94, 98], [3, 5, 5, 19, 22, 23, 24, 24, 27, 31, 31, 32, 32, 44, 46, 50, 52, 54, 55, 57, 58, 59, 61, 61, 68, 72, 76, 78, 79, 85, 98], [7, 10, 14, 15, 21, 28, 30, 31, 40, 46, 51, 51, 52, 54, 57, 58, 58, 64, 67, 68, 68, 71, 72, 76, 79, 80, 85, 88, 88, 91, 93], [2, 5, 18, 21, 21, 25, 28, 31, 33, 34, 37, 38, 42, 45, 47, 56, 64, 70, 71, 75, 76, 78, 78, 81, 84, 88, 90, 91, 98, 98, 99], [10, 11, 14, 17, 18, 22, 27, 35, 36, 37, 46, 53, 55, 59, 59, 64, 66, 66, 66, 69, 69, 73, 73, 74, 74, 85, 86, 87, 89, 93, 99], [11, 13, 13, 14, 17, 18, 19, 19, 21, 25, 25, 29, 36, 36, 42, 43, 45, 49, 57, 61, 64, 65, 71, 75, 84, 84, 89, 94, 94, 95, 98], [1, 1, 2, 2, 10, 10, 21, 22, 23, 24, 24, 29, 34, 40, 46, 48, 49, 49, 50, 60, 73, 73, 75, 80, 81, 85, 86, 93, 96, 97, 99], [1, 2, 10, 15, 16, 18, 19, 21, 23, 25, 29, 29, 31, 31, 32, 38, 42, 43, 48, 51, 54, 56, 63, 74, 74, 74, 88, 88, 94, 94, 94], [19, 24, 25, 27, 29, 33, 34, 35, 36, 37, 37, 44, 45, 50, 51, 51, 52, 54, 59, 59, 66, 69, 70, 75, 77, 80, 81, 84, 97, 99, 99], [1, 2, 5, 5, 7, 12, 17, 19, 20, 38, 44, 45, 47, 48, 51, 55, 59, 61, 61, 64, 65, 67, 74, 76, 76, 77, 79, 83, 86, 92, 92], [3, 5, 5, 12, 18, 23, 25, 38, 38, 48, 49, 57, 61, 63, 67, 70, 71, 75, 75, 77, 78, 79, 80, 80, 84, 87, 92, 92, 95, 96, 98], [1, 3, 3, 5, 7, 8, 9, 13, 17, 21, 23, 36, 38, 39, 39, 41, 45, 57, 71, 72, 72, 73, 76, 79, 80, 82, 83, 87, 89, 97, 99], [9, 10, 13, 14, 14, 16, 17, 23, 26, 27, 28, 31, 32, 38, 38, 43, 45, 50, 51, 52, 52, 64, 66, 68, 71, 78, 85, 85, 85, 91, 91], [1, 2, 2, 3, 10, 12, 13, 15, 15, 21, 25, 26, 28, 34, 45, 45, 46, 46, 49, 49, 52, 55, 57, 61, 62, 63, 70, 72, 73, 84, 86], [5, 5, 8, 13, 16, 18, 21, 25, 29, 33, 35, 36, 39, 45, 46, 47, 49, 58, 66, 68, 70, 71, 77, 80, 83, 83, 86, 87, 94, 97, 98], [5, 9, 17, 20, 24, 27, 27, 27, 28, 30, 32, 32, 35, 39, 40, 43, 45, 52, 55, 56, 63, 71, 76, 78, 81, 86, 90, 95, 97, 98, 98], [1, 6, 6, 7, 15, 22, 29, 33, 38, 38, 42, 42, 44, 45, 53, 59, 61, 62, 62, 72, 75, 76, 77, 77, 80, 81, 89, 96, 96, 97, 99], [3, 4, 4, 10, 11, 12, 16, 17, 32, 33, 33, 36, 40, 40, 42, 42, 44, 45, 47, 52, 53, 56, 59, 62, 64, 67, 80, 80, 89, 90, 94], [2, 3, 8, 9, 15, 19, 20, 21, 22, 23, 23, 24, 24, 28, 28, 32, 36, 40, 43, 46, 54, 55, 65, 71, 76, 83, 86, 93, 93, 96, 97], [2, 3, 3, 4, 8, 11, 13, 14, 18, 19, 20, 22, 35, 39, 45, 60, 61, 64, 66, 69, 70, 70, 72, 72, 74, 75, 79, 83, 87, 90, 97], [19, 21, 22, 23, 24, 28, 30, 30, 32, 41, 42, 54, 56, 60, 62, 65, 71, 72, 72, 73, 75, 75, 78, 84, 85, 85, 85, 85, 87, 89, 92], [6, 7, 10, 11, 11, 16, 17, 20, 20, 23, 31, 33, 34, 36, 38, 42, 44, 48, 56, 57, 58, 63, 64, 69, 69, 70, 72, 81, 85, 89, 91], [9, 11, 13, 18, 21, 22, 24, 26, 26, 30, 35, 42, 51, 53, 55, 55, 58, 58, 59, 59, 61, 63, 67, 75, 79, 88, 88, 92, 96, 98, 99], [9, 12, 14, 17, 21, 21, 32, 35, 38, 39, 41, 43, 45, 45, 45, 55, 57, 57, 63, 67, 71, 72, 74, 75, 76, 77, 78, 83, 83, 85, 97], [3, 4, 13, 17, 20, 22, 28, 32, 36, 38, 39, 39, 52, 56, 60, 60, 61, 61, 62, 64, 65, 69, 71, 73, 82, 88, 91, 96, 96, 97, 99], [2, 2, 13, 14, 15, 19, 25, 32, 33, 34, 37, 38, 41, 45, 45, 53, 57, 59, 59, 60, 68, 71, 78, 80, 81, 84, 93, 93, 95, 99, 99], [5, 16, 17, 18, 18, 24, 27, 27, 32, 35, 41, 41, 49, 51, 56, 60, 60, 62, 67, 67, 71, 78, 78, 79, 82, 89, 92, 92, 95, 97, 98], [6, 7, 9, 10, 10, 12, 16, 19, 19, 26, 28, 31, 32, 33, 41, 43, 46, 47, 48, 49, 51, 52, 58, 66, 75, 75, 76, 78, 81, 88, 91], [8, 13, 18, 19, 22, 26, 26, 26, 27, 30, 30, 32, 33, 35, 35, 38, 45, 53, 57, 60, 63, 63, 65, 71, 77, 79, 81, 91, 96, 98, 99]],15,),
([[-40]],0,),
([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [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], [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], [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, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [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, 1], [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], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [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], [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, 1], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 1], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 1], [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], [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], [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], [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]],25,),
([[3, 86, 3, 43, 83, 22, 69, 67, 38, 82, 99, 59, 27, 2, 8, 84, 60, 93, 75, 37, 65, 79, 43, 69, 7, 42, 44, 77, 24, 58], [88, 63, 93, 78, 89, 63, 23, 39, 60, 17, 94, 68, 16, 76, 31, 4, 66, 91, 57, 98, 95, 83, 22, 79, 50, 34, 84, 59, 59, 39], [37, 36, 42, 78, 47, 20, 40, 18, 7, 56, 4, 26, 25, 64, 34, 28, 88, 46, 21, 45, 70, 75, 24, 29, 79, 7, 81, 32, 65, 87], [90, 25, 86, 26, 59, 67, 24, 74, 37, 68, 78, 5, 7, 15, 63, 20, 59, 90, 58, 50, 82, 19, 37, 64, 81, 74, 62, 3, 28, 87], [81, 75, 25, 44, 42, 86, 92, 29, 11, 50, 77, 77, 99, 69, 3, 49, 89, 35, 59, 95, 85, 51, 36, 72, 29, 74, 55, 72, 58, 16], [82, 37, 70, 98, 69, 84, 29, 36, 49, 94, 64, 72, 17, 95, 83, 51, 16, 65, 89, 21, 14, 4, 75, 99, 39, 60, 18, 65, 69, 6], [88, 1, 88, 12, 21, 19, 37, 85, 43, 80, 65, 79, 97, 12, 45, 12, 38, 62, 53, 21, 86, 67, 99, 12, 38, 83, 30, 32, 27, 29], [42, 25, 24, 59, 60, 38, 34, 96, 84, 77, 14, 97, 14, 1, 89, 95, 62, 57, 96, 59, 65, 52, 72, 70, 69, 36, 79, 34, 68, 33], [69, 92, 20, 1, 71, 47, 28, 33, 29, 80, 55, 67, 17, 82, 82, 68, 18, 24, 51, 49, 71, 62, 69, 36, 97, 39, 22, 97, 3, 63], [63, 34, 94, 31, 49, 43, 90, 61, 1, 55, 45, 29, 28, 13, 44, 26, 45, 14, 92, 96, 9, 39, 83, 53, 34, 59, 73, 52, 9, 28], [30, 46, 18, 73, 90, 38, 8, 49, 75, 15, 39, 10, 96, 85, 32, 53, 4, 93, 86, 7, 95, 87, 95, 59, 65, 22, 77, 79, 66, 30], [92, 28, 99, 32, 90, 28, 2, 97, 76, 97, 38, 39, 77, 84, 88, 19, 34, 23, 81, 81, 73, 13, 91, 68, 6, 21, 44, 30, 16, 2], [76, 7, 20, 53, 71, 29, 57, 33, 32, 53, 44, 25, 76, 28, 91, 15, 28, 14, 63, 78, 75, 49, 81, 93, 82, 45, 59, 81, 85, 97], [98, 10, 23, 21, 48, 22, 4, 43, 13, 24, 69, 62, 61, 11, 61, 95, 89, 31, 10, 77, 93, 41, 45, 32, 8, 42, 50, 15, 57, 10], [85, 90, 37, 19, 60, 33, 71, 96, 9, 10, 52, 20, 73, 67, 83, 18, 62, 19, 17, 43, 32, 15, 92, 47, 59, 83, 15, 45, 95, 90], [38, 86, 16, 5, 83, 44, 46, 23, 96, 75, 76, 15, 8, 58, 29, 81, 52, 30, 87, 45, 62, 82, 74, 69, 57, 99, 60, 13, 57, 92], [75, 52, 45, 6, 41, 30, 93, 17, 76, 53, 20, 13, 65, 38, 14, 51, 83, 93, 55, 83, 19, 81, 70, 57, 37, 95, 48, 52, 25, 86], [75, 79, 14, 80, 61, 82, 79, 70, 35, 31, 66, 47, 8, 2, 30, 96, 22, 94, 68, 59, 20, 29, 98, 14, 95, 33, 63, 72, 3, 1], [43, 21, 47, 66, 48, 27, 51, 75, 20, 87, 71, 98, 93, 4, 59, 22, 76, 65, 7, 38, 21, 26, 36, 86, 28, 78, 62, 98, 40, 5], [46, 57, 64, 58, 2, 92, 98, 82, 40, 87, 80, 96, 62, 53, 92, 27, 74, 38, 40, 72, 8, 81, 64, 25, 75, 54, 70, 91, 95, 42], [97, 97, 58, 63, 90, 72, 76, 74, 96, 96, 16, 43, 65, 97, 48, 95, 36, 16, 57, 38, 21, 11, 99, 39, 67, 61, 76, 89, 25, 83], [1, 5, 93, 79, 76, 93, 81, 74, 11, 6, 74, 49, 86, 23, 82, 24, 33, 65, 2, 49, 74, 6, 14, 11, 82, 32, 34, 41, 78, 5], [82, 67, 38, 85, 78, 83, 2, 93, 39, 17, 51, 17, 97, 99, 35, 98, 82, 84, 29, 68, 91, 86, 49, 16, 2, 50, 10, 34, 18, 45], [71, 44, 54, 31, 93, 84, 28, 82, 87, 53, 89, 45, 97, 23, 74, 76, 35, 4, 71, 92, 35, 68, 53, 2, 8, 38, 95, 68, 18, 6], [37, 28, 49, 99, 51, 64, 10, 80, 69, 45, 85, 58, 41, 56, 39, 67, 3, 77, 35, 75, 46, 44, 38, 70, 75, 19, 21, 91, 43, 78], [68, 31, 36, 20, 86, 37, 17, 3, 10, 68, 61, 59, 95, 80, 73, 52, 96, 23, 54, 33, 45, 74, 55, 83, 60, 55, 88, 59, 77, 9], [55, 81, 74, 8, 73, 6, 86, 64, 38, 76, 80, 62, 64, 11, 62, 72, 95, 22, 27, 57, 83, 85, 60, 36, 76, 28, 78, 24, 25, 80], [85, 85, 15, 8, 23, 92, 30, 74, 79, 90, 62, 20, 96, 61, 46, 80, 40, 7, 51, 27, 28, 43, 83, 39, 94, 10, 49, 98, 27, 84], [91, 70, 64, 86, 70, 85, 54, 69, 14, 67, 43, 22, 9, 91, 10, 84, 93, 3, 5, 87, 59, 54, 59, 82, 8, 73, 22, 33, 53, 64], [82, 37, 42, 38, 4, 98, 16, 82, 47, 87, 9, 34, 36, 92, 10, 72, 87, 72, 22, 40, 12, 96, 12, 30, 41, 18, 33, 37, 27, 45]],29,),
([[-96, -90, -78, -74, -70, -60, -52, -50, -48, -46, -32, -20, -20, -10, -6, -4, 4, 4, 6, 8, 8, 24, 32, 48, 48, 58, 86, 92, 98], [-68, -60, -58, -54, -40, -38, -22, -16, -16, -16, -12, 0, 4, 4, 30, 30, 42, 46, 48, 48, 50, 52, 52, 52, 66, 68, 76, 78, 96], [-92, -90, -86, -70, -60, -58, -48, -46, -46, -36, -34, -14, -14, -10, -2, 12, 44, 46, 52, 54, 66, 70, 70, 74, 76, 80, 86, 90, 98], [-98, -88, -78, -78, -74, -72, -68, -66, -66, -58, -36, -32, -26, -22, -6, -6, 8, 8, 18, 20, 22, 28, 34, 60, 70, 70, 70, 80, 90], [-98, -96, -96, -88, -86, -86, -72, -66, -64, -62, -54, -52, -52, -46, -42, -22, -20, -14, -10, -4, 8, 14, 22, 64, 74, 78, 88, 96, 96], [-98, -82, -78, -58, -54, -54, -52, -52, -46, -46, -40, -40, -28, -26, -4, 0, 8, 8, 12, 14, 50, 52, 62, 66, 68, 70, 78, 94, 96], [-94, -90, -80, -78, -74, -72, -70, -54, -52, -46, -40, -38, -28, -22, -22, -20, 16, 16, 18, 18, 20, 24, 44, 46, 50, 58, 64, 70, 76], [-96, -94, -92, -86, -80, -80, -76, -76, -72, -68, -52, -32, -26, -18, -14, -10, -2, 0, 4, 10, 12, 18, 22, 30, 44, 70, 76, 78, 82], [-90, -88, -68, -66, -46, -40, -40, -30, -30, -26, -22, -18, -6, -4, -4, 6, 8, 10, 10, 16, 20, 20, 26, 28, 36, 58, 82, 90, 98], [-90, -86, -84, -84, -82, -66, -60, -40, -32, -22, -14, 4, 6, 20, 22, 22, 32, 34, 34, 52, 58, 60, 66, 70, 76, 80, 88, 92, 96], [-96, -90, -80, -80, -66, -66, -46, -36, -36, -28, -20, -10, -4, 0, 14, 20, 24, 26, 32, 38, 38, 44, 60, 70, 70, 76, 78, 86, 94], [-94, -82, -80, -72, -70, -60, -46, -46, -38, -36, -26, -24, -18, -12, -4, 18, 26, 34, 38, 44, 46, 50, 52, 64, 68, 72, 80, 80, 96], [-98, -94, -92, -84, -76, -66, -62, -44, -36, -34, -32, -22, 2, 4, 8, 18, 18, 18, 18, 32, 36, 42, 52, 58, 70, 80, 86, 94, 98], [-98, -96, -92, -82, -74, -72, -72, -28, -2, 0, 4, 20, 32, 32, 34, 34, 36, 38, 50, 52, 58, 60, 62, 62, 80, 84, 88, 88, 90], [-74, -74, -70, -66, -54, -50, -42, -40, -36, -16, -14, -14, -12, -10, -8, -4, 10, 18, 28, 58, 60, 68, 68, 74, 76, 84, 86, 96, 98], [-98, -96, -90, -56, -54, -46, -42, -36, -34, -26, -26, -6, 0, 2, 12, 14, 24, 24, 40, 50, 60, 64, 64, 70, 76, 78, 80, 88, 90], [-92, -92, -84, -80, -80, -64, -56, -50, -44, -42, -32, -18, -16, -14, 14, 24, 26, 26, 30, 36, 44, 46, 46, 50, 56, 64, 86, 86, 86], [-96, -94, -94, -88, -86, -74, -62, -62, -44, -40, -30, -28, -24, -20, 14, 20, 22, 40, 52, 52, 56, 58, 60, 60, 62, 62, 84, 96, 98], [-98, -92, -92, -54, -54, -50, -48, -48, -40, -40, -30, -26, -24, -12, -6, 0, 18, 24, 24, 26, 26, 36, 44, 48, 66, 74, 86, 88, 94], [-98, -98, -94, -90, -88, -80, -76, -68, -60, -58, -56, -42, -38, -28, -26, -4, 0, 20, 22, 28, 36, 50, 56, 56, 60, 60, 68, 86, 86], [-94, -84, -62, -42, -36, -36, -28, -26, -24, -20, -14, -10, 0, 16, 20, 22, 30, 34, 40, 52, 56, 56, 62, 66, 76, 82, 84, 92, 98], [-98, -92, -86, -86, -78, -76, -58, -58, -54, -50, -40, -26, -10, -6, 0, 18, 20, 24, 24, 24, 38, 42, 46, 54, 64, 76, 80, 90, 96], [-86, -84, -78, -76, -66, -62, -60, -56, -46, -32, -22, -18, -18, -10, -2, 4, 10, 14, 28, 36, 42, 42, 56, 60, 62, 68, 74, 82, 88], [-98, -98, -76, -72, -64, -64, -62, -60, -48, -44, -42, -36, -36, -30, -24, -12, -8, 2, 12, 16, 36, 42, 44, 60, 66, 68, 84, 86, 88], [-96, -96, -94, -94, -92, -90, -62, -50, -48, -48, -48, -44, -24, -22, -8, -8, -6, -6, 0, 16, 48, 54, 54, 58, 64, 74, 74, 78, 88], [-98, -96, -84, -74, -54, -52, -40, -34, -24, -16, -14, -10, -6, -6, -4, 12, 16, 18, 46, 46, 48, 48, 56, 62, 64, 78, 82, 86, 90], [-86, -86, -72, -66, -62, -48, -44, -38, -26, -22, -20, -12, -4, 8, 10, 14, 18, 30, 30, 32, 42, 62, 66, 70, 70, 78, 84, 94, 98], [-98, -88, -82, -80, -68, -68, -68, -66, -64, -52, -50, -46, -44, -42, -36, -34, -2, -2, 4, 10, 26, 42, 44, 62, 66, 68, 76, 82, 98], [-98, -92, -88, -88, -86, -62, -50, -46, -32, -28, -20, -4, -2, 0, 12, 20, 34, 38, 42, 60, 64, 64, 64, 66, 66, 72, 74, 88, 98]],16,),
([[1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0], [0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0], [1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0], [1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0], [1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1], [1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0], [1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0]],35,),
([[12, 22, 56, 63, 69], [8, 8, 12, 57, 95], [40, 55, 59, 65, 72], [2, 22, 40, 72, 83], [2, 4, 12, 31, 38]],4,),
([[-92, -36, 84, 62, -94, -74, 20, 20, 92], [52, -40, -98, -32, 58, 80, -60, 46, 80], [8, 8, 0, -48, -86, 48, -38, -96, 92], [18, -68, -74, 92, -70, -36, -32, -16, -16], [-70, -26, 32, -58, 82, 22, -12, 96, -44], [-68, -54, -94, -84, -68, -70, -30, -76, -52], [-68, 64, 68, 80, 30, 12, -82, 20, -58], [-38, -88, 24, 28, -98, 56, -62, -46, 98], [28, -82, -32, 74, -94, 38, -12, -46, -6]],4,),
([[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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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], [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]],35,),
([[78, 96, 83, 94, 61, 52, 86, 42, 64, 39, 8, 48, 87, 31, 77, 72, 9, 9, 3, 83, 2, 79, 20, 84, 50, 85, 32, 15, 14, 70, 7, 19, 43, 6, 71, 16], [35, 5, 20, 49, 27, 85, 22, 1, 99, 13, 57, 86, 70, 34, 34, 11, 50, 22, 60, 58, 31, 45, 64, 3, 74, 95, 85, 46, 32, 94, 13, 90, 94, 56, 25, 94], [52, 7, 25, 18, 38, 42, 26, 83, 41, 20, 38, 29, 71, 38, 99, 53, 76, 61, 98, 56, 74, 46, 62, 1, 1, 98, 7, 36, 87, 66, 77, 52, 81, 27, 44, 54], [12, 17, 86, 71, 29, 39, 95, 71, 53, 32, 65, 93, 66, 62, 97, 63, 99, 48, 33, 7, 28, 20, 68, 98, 45, 92, 9, 94, 29, 43, 24, 99, 9, 99, 39, 88], [25, 71, 58, 33, 26, 76, 27, 56, 55, 60, 28, 36, 10, 18, 71, 98, 61, 83, 18, 62, 43, 57, 23, 61, 43, 34, 66, 76, 25, 82, 73, 79, 76, 13, 6, 31], [79, 36, 81, 72, 22, 53, 90, 82, 99, 10, 42, 11, 36, 80, 30, 95, 90, 71, 57, 62, 38, 97, 73, 47, 66, 15, 59, 62, 26, 7, 25, 93, 35, 24, 4, 19], [49, 55, 96, 83, 54, 53, 41, 35, 52, 83, 46, 58, 50, 48, 53, 41, 69, 36, 93, 27, 7, 42, 95, 90, 7, 29, 93, 23, 43, 18, 78, 13, 70, 18, 19, 91], [74, 42, 96, 90, 95, 25, 48, 8, 19, 48, 59, 79, 64, 90, 67, 76, 33, 60, 25, 32, 92, 12, 38, 12, 52, 73, 84, 62, 72, 82, 76, 30, 95, 15, 22, 30], [61, 90, 92, 47, 62, 34, 56, 90, 12, 81, 48, 3, 37, 43, 78, 41, 42, 78, 22, 35, 36, 98, 77, 70, 22, 32, 88, 22, 66, 64, 81, 88, 63, 67, 48, 51], [39, 21, 32, 61, 54, 32, 98, 87, 66, 71, 31, 81, 68, 3, 60, 67, 1, 71, 24, 64, 52, 99, 25, 85, 60, 3, 17, 93, 61, 74, 44, 27, 74, 42, 70, 22], [98, 61, 8, 13, 47, 31, 11, 99, 47, 3, 21, 28, 67, 3, 35, 67, 71, 32, 85, 62, 6, 94, 99, 41, 34, 7, 81, 22, 74, 15, 78, 48, 86, 38, 54, 21], [57, 49, 87, 34, 93, 5, 91, 89, 46, 63, 13, 89, 59, 56, 67, 24, 12, 57, 96, 66, 44, 32, 90, 23, 14, 10, 28, 12, 66, 74, 17, 4, 82, 92, 27, 62], [3, 62, 20, 85, 22, 98, 38, 68, 57, 37, 98, 22, 82, 34, 65, 99, 61, 66, 8, 36, 92, 50, 12, 73, 64, 4, 61, 31, 25, 2, 59, 68, 47, 28, 86, 93], [28, 6, 38, 36, 93, 72, 39, 55, 30, 76, 96, 54, 5, 73, 15, 14, 12, 74, 65, 44, 94, 91, 6, 33, 42, 87, 35, 81, 57, 10, 11, 33, 86, 73, 89, 94], [8, 10, 9, 84, 30, 9, 35, 86, 49, 37, 43, 23, 43, 13, 36, 82, 61, 34, 12, 73, 4, 70, 32, 17, 34, 35, 64, 80, 19, 50, 58, 77, 44, 66, 1, 46], [99, 72, 9, 61, 48, 92, 58, 68, 33, 52, 8, 47, 14, 9, 13, 2, 11, 49, 3, 64, 60, 95, 64, 59, 36, 52, 10, 50, 86, 9, 31, 80, 31, 91, 9, 25], [74, 65, 81, 28, 88, 58, 49, 92, 17, 14, 31, 27, 61, 52, 15, 40, 33, 38, 28, 92, 71, 56, 34, 49, 2, 55, 33, 3, 3, 61, 66, 95, 79, 62, 79, 91], [47, 87, 29, 43, 72, 14, 76, 93, 41, 18, 65, 2, 17, 20, 48, 59, 97, 43, 94, 59, 61, 79, 71, 54, 93, 8, 86, 4, 73, 10, 66, 98, 29, 48, 11, 72], [32, 79, 33, 43, 27, 60, 73, 55, 27, 84, 4, 97, 39, 5, 25, 23, 98, 1, 7, 4, 48, 47, 34, 79, 17, 89, 87, 8, 37, 22, 80, 21, 81, 74, 73, 31], [97, 59, 19, 17, 65, 65, 21, 37, 30, 76, 41, 86, 84, 30, 33, 32, 38, 7, 30, 56, 19, 80, 86, 62, 47, 19, 45, 80, 16, 82, 44, 27, 7, 38, 6, 30], [64, 83, 75, 9, 41, 8, 61, 89, 61, 49, 40, 67, 75, 27, 80, 9, 30, 12, 99, 20, 93, 42, 99, 88, 76, 1, 56, 10, 34, 41, 50, 97, 66, 62, 52, 49], [64, 54, 22, 65, 92, 84, 27, 42, 10, 69, 67, 18, 75, 24, 38, 71, 52, 79, 18, 38, 70, 94, 91, 77, 38, 74, 91, 3, 1, 85, 82, 1, 52, 40, 44, 60], [83, 17, 61, 43, 30, 62, 60, 35, 39, 95, 91, 71, 2, 50, 7, 32, 51, 44, 24, 18, 66, 87, 62, 3, 92, 87, 77, 1, 25, 46, 77, 15, 59, 46, 88, 86], [83, 66, 34, 2, 59, 29, 65, 98, 55, 93, 66, 26, 75, 36, 64, 60, 45, 19, 75, 40, 16, 34, 52, 25, 8, 52, 29, 39, 92, 17, 70, 29, 42, 33, 23, 80], [22, 11, 32, 56, 48, 20, 32, 33, 49, 59, 13, 53, 79, 4, 33, 11, 6, 71, 86, 14, 98, 61, 20, 80, 2, 53, 68, 9, 50, 26, 73, 20, 87, 60, 96, 99], [96, 64, 95, 64, 34, 73, 24, 52, 46, 28, 94, 82, 26, 1, 74, 47, 14, 48, 5, 33, 65, 84, 72, 21, 10, 60, 69, 65, 57, 16, 73, 2, 28, 42, 14, 44], [57, 72, 10, 97, 89, 71, 74, 20, 5, 82, 52, 86, 39, 67, 93, 19, 81, 53, 21, 72, 64, 6, 61, 47, 89, 54, 72, 47, 18, 97, 53, 48, 75, 65, 99, 33], [61, 22, 43, 17, 71, 62, 73, 94, 48, 51, 85, 46, 41, 66, 31, 43, 7, 29, 3, 61, 28, 62, 56, 34, 61, 59, 49, 38, 14, 33, 64, 94, 14, 27, 42, 28], [93, 66, 93, 79, 99, 47, 2, 8, 26, 82, 73, 3, 5, 43, 80, 74, 29, 94, 11, 16, 31, 89, 16, 74, 95, 87, 43, 15, 77, 80, 57, 27, 92, 74, 6, 69], [64, 88, 68, 15, 45, 85, 22, 39, 62, 24, 92, 7, 61, 69, 51, 32, 81, 81, 62, 68, 39, 26, 38, 97, 62, 70, 84, 80, 42, 3, 60, 89, 2, 61, 39, 90], [29, 39, 6, 62, 21, 87, 37, 64, 88, 68, 5, 75, 96, 72, 37, 39, 23, 97, 58, 57, 81, 74, 72, 91, 58, 52, 68, 47, 64, 46, 60, 60, 65, 31, 65, 46], [81, 39, 17, 69, 41, 21, 62, 88, 29, 31, 3, 73, 28, 99, 30, 39, 48, 28, 52, 62, 57, 5, 9, 5, 24, 77, 22, 2, 44, 74, 59, 68, 37, 65, 94, 34], [47, 49, 70, 54, 77, 78, 41, 1, 63, 45, 9, 34, 18, 74, 57, 70, 75, 86, 67, 5, 35, 92, 10, 40, 59, 83, 29, 16, 37, 16, 80, 4, 95, 26, 23, 17], [80, 56, 23, 61, 92, 5, 29, 39, 82, 8, 30, 80, 66, 62, 31, 20, 63, 75, 65, 80, 63, 89, 14, 22, 45, 81, 9, 97, 99, 5, 41, 96, 24, 90, 98, 67], [50, 69, 72, 14, 34, 42, 75, 83, 23, 33, 14, 49, 59, 98, 29, 44, 87, 18, 79, 26, 32, 33, 63, 53, 37, 1, 71, 66, 12, 30, 46, 69, 6, 45, 45, 18], [21, 55, 93, 44, 14, 50, 63, 41, 47, 23, 15, 25, 63, 19, 31, 63, 76, 32, 79, 18, 47, 93, 98, 43, 79, 60, 43, 8, 15, 94, 56, 34, 41, 74, 75, 15]],29,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
SUM_OF_ALL_SUBSTRINGS_OF_A_STRING_REPRESENTING_A_NUMBER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class SUM_OF_ALL_SUBSTRINGS_OF_A_STRING_REPRESENTING_A_NUMBER{
public static int f_gold ( String num ) {
int n = num . length ( ) ;
int sumofdigit [ ] = new int [ n ] ;
sumofdigit [ 0 ] = num . charAt ( 0 ) - '0' ;
int res = sumofdigit [ 0 ] ;
for ( int i = 1 ;
i < n ;
i ++ ) {
int numi = num . charAt ( i ) - '0' ;
sumofdigit [ i ] = ( i + 1 ) * numi + 10 * sumofdigit [ i - 1 ] ;
res += sumofdigit [ i ] ;
}
return res ;
}
| null | null |
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("rA");
param0.add("552541909988");
param0.add("000110001");
param0.add("s wXTz");
param0.add("4");
param0.add("0001");
param0.add("EdZPQyLD F");
param0.add("926277661");
param0.add("1010110");
param0.add("RfLyITyEE");
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());
}
} | null | null |
LOWER_CASE_UPPER_CASE_INTERESTING_FACT |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class LOWER_CASE_UPPER_CASE_INTERESTING_FACT{
static String f_gold ( char [ ] in ) {
for ( int i = 0 ;
i < in . length ;
i ++ ) {
if ( 'a' <= in [ i ] & in [ i ] <= 'z' ) {
in [ i ] = ( char ) ( in [ i ] - 'a' + 'A' ) ;
}
}
return String . valueOf ( in ) ;
}
| null | null |
public static void main(String args[]) {
int n_success = 0;
List<char [ ]> param0 = new ArrayList<>();
param0.add(new char[]{'B','N','O','p','t'});
param0.add(new char[]{'2','8','2','7','3','3','1','2','1','4','1','0','8','1','0','1','1','8','2','9','2','0','6','3','0','4','2','3','3','4','6','7','1','3','6','6','0','5','5','3'});
param0.add(new char[]{'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[]{'i','N','F','z','A','Y','v','o','p','t',' ','R','X','D','L','p','J','N','R','m','L','m','s','R','O','G','T','L','m','F','e','B','O','w','e','a','N','T','Z','j','r','n','n'});
param0.add(new char[]{'0','0','1','1','2','2','2','3','3','4','4','4','5','5','6','6','7','8','8','8','8','9','9','9'});
param0.add(new char[]{'1','1','0','0','1','1'});
param0.add(new char[]{' ','A','G','G','H','I','M','M','Q','R','S','U','W','X','Y','a','a','b','b','c','d','e','e','f','h','h','h','i','j','s','s','t','v','w','w','w','y'});
param0.add(new char[]{'5','0','4','9','6','8','2','5','8','7','5','2','4','7','9','7','8','6','9','2','0','1','0','7'});
param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'});
param0.add(new char[]{'X','g','S','C','q','E','L','v'});
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)).equals(f_gold(param0.get(i))))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} | null | null |
NUMBER_TRIANGLES_N_MOVES |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NUMBER_TRIANGLES_N_MOVES{
public static int f_gold ( int n ) {
int [ ] answer = new int [ n + 1 ] ;
answer [ 0 ] = 1 ;
for ( int i = 1 ;
i <= n ;
i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2 ;
return answer [ n ] ;
}
| def f_gold ( n ) :
answer = [ None ] * ( n + 1 ) ;
answer [ 0 ] = 1 ;
i = 1
while i <= n :
answer [ i ] = answer [ i - 1 ] * 3 + 2 ;
i = i + 1
return answer [ n ] ;
|
using namespace std;
int f_gold ( int n ) {
int answer [ n + 1 ] = {
0 };
answer [ 0 ] = 1;
for ( int i = 1;
i <= n;
i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2;
return answer [ n ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(33);
param0.add(72);
param0.add(81);
param0.add(93);
param0.add(8);
param0.add(76);
param0.add(97);
param0.add(91);
param0.add(61);
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());
}
} |
if __name__ == '__main__':
param = [
(33,),
(72,),
(81,),
(93,),
(8,),
(76,),
(97,),
(91,),
(61,),
(6,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {33,72,81,93,8,76,97,91,61,6};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES_1{
static int f_gold ( int price [ ] , int n , int k ) {
int profit [ ] [ ] = new int [ k + 1 ] [ n + 1 ] ;
for ( int i = 0 ;
i <= k ;
i ++ ) profit [ i ] [ 0 ] = 0 ;
for ( int j = 0 ;
j <= n ;
j ++ ) profit [ 0 ] [ j ] = 0 ;
for ( int i = 1 ;
i <= k ;
i ++ ) {
int prevDiff = Integer . MIN_VALUE ;
for ( int j = 1 ;
j < n ;
j ++ ) {
prevDiff = Math . max ( prevDiff , profit [ i - 1 ] [ j - 1 ] - price [ j - 1 ] ) ;
profit [ i ] [ j ] = Math . max ( profit [ i ] [ j - 1 ] , price [ j ] + prevDiff ) ;
}
}
return profit [ k ] [ n - 1 ] ;
}
| def f_gold ( price , n , k ) :
profit = [ [ 0 for i in range ( n + 1 ) ] for j in range ( k + 1 ) ]
for i in range ( 1 , k + 1 ) :
prevDiff = float ( '-inf' )
for j in range ( 1 , n ) :
prevDiff = max ( prevDiff , profit [ i - 1 ] [ j - 1 ] - price [ j - 1 ] )
profit [ i ] [ j ] = max ( profit [ i ] [ j - 1 ] , price [ j ] + prevDiff )
return profit [ k ] [ n - 1 ]
|
using namespace std;
int f_gold ( int price [ ], int n, int k ) {
int profit [ k + 1 ] [ n + 1 ];
for ( int i = 0;
i <= k;
i ++ ) profit [ i ] [ 0 ] = 0;
for ( int j = 0;
j <= n;
j ++ ) profit [ 0 ] [ j ] = 0;
for ( int i = 1;
i <= k;
i ++ ) {
int prevDiff = INT_MIN;
for ( int j = 1;
j < n;
j ++ ) {
prevDiff = max ( prevDiff, profit [ i - 1 ] [ j - 1 ] - price [ j - 1 ] );
profit [ i ] [ j ] = max ( profit [ i ] [ j - 1 ], price [ j ] + prevDiff );
}
}
return profit [ k ] [ n - 1 ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{3,6,16,16,19,37,47,49,74,77,86,96});
param0.add(new int[]{-6,-70,-26,78,98,-72,48,-94,-38,52,-50,58,84,16,-74,32,-44,-50,68,-48,28,94,-26,-96,-42,96,-24,42,-70,10,-16,-32,98,38,-2,26,-26,-78,44,-72,-56,-22});
param0.add(new int[]{0,0,0,0,0,0,0,1,1,1});
param0.add(new int[]{22,12,58,70});
param0.add(new int[]{-96,-96,-94,-92,-90,-88,-88,-84,-78,-76,-72,-72,-68,-62,-54,-52,-52,-36,-34,-32,-26,-20,-6,-4,-4,4,8,10,14,16,32,32,32,34,42,46,50,60,62,64,64,72,74,76,76,78,90,92,96});
param0.add(new int[]{1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,0});
param0.add(new int[]{2,4,7,11,20,24,25,27,29,33,33,36,36,41,44,45,47,54,65,66,67,75,78,82,85,90});
param0.add(new int[]{56,2,-10,-44,68,10,-32,-2,-68,12,-34,-36,0,40,-16,-36,92,8,-40,-10,46,98,76,-2,98,-20,6,68,32,-26,-12,70,16,-34,-50,-76,-34,-18,0,-44,-76,58});
param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1});
param0.add(new int[]{78,39,2,76,20,21,3,21,32,80,28,89,51,2,88,19,99,71,68,38,8,76,48,81,90,71,31});
List<Integer> param1 = new ArrayList<>();
param1.add(6);
param1.add(31);
param1.add(7);
param1.add(3);
param1.add(30);
param1.add(14);
param1.add(15);
param1.add(24);
param1.add(10);
param1.add(14);
List<Integer> param2 = new ArrayList<>();
param2.add(6);
param2.add(32);
param2.add(8);
param2.add(2);
param2.add(36);
param2.add(13);
param2.add(22);
param2.add(35);
param2.add(8);
param2.add(24);
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());
}
} |
if __name__ == '__main__':
param = [
([3, 6, 16, 16, 19, 37, 47, 49, 74, 77, 86, 96],6,6,),
([-6, -70, -26, 78, 98, -72, 48, -94, -38, 52, -50, 58, 84, 16, -74, 32, -44, -50, 68, -48, 28, 94, -26, -96, -42, 96, -24, 42, -70, 10, -16, -32, 98, 38, -2, 26, -26, -78, 44, -72, -56, -22],31,32,),
([0, 0, 0, 0, 0, 0, 0, 1, 1, 1],7,8,),
([22, 12, 58, 70],3,2,),
([-96, -96, -94, -92, -90, -88, -88, -84, -78, -76, -72, -72, -68, -62, -54, -52, -52, -36, -34, -32, -26, -20, -6, -4, -4, 4, 8, 10, 14, 16, 32, 32, 32, 34, 42, 46, 50, 60, 62, 64, 64, 72, 74, 76, 76, 78, 90, 92, 96],30,36,),
([1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0],14,13,),
([2, 4, 7, 11, 20, 24, 25, 27, 29, 33, 33, 36, 36, 41, 44, 45, 47, 54, 65, 66, 67, 75, 78, 82, 85, 90],15,22,),
([56, 2, -10, -44, 68, 10, -32, -2, -68, 12, -34, -36, 0, 40, -16, -36, 92, 8, -40, -10, 46, 98, 76, -2, 98, -20, 6, 68, 32, -26, -12, 70, 16, -34, -50, -76, -34, -18, 0, -44, -76, 58],24,35,),
([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],10,8,),
([78, 39, 2, 76, 20, 21, 3, 21, 32, 80, 28, 89, 51, 2, 88, 19, 99, 71, 68, 38, 8, 76, 48, 81, 90, 71, 31],14,24,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{3,6,16,16,19,37,47,49,74,77,86,96},{-6,-70,-26,78,98,-72,48,-94,-38,52,-50,58,84,16,-74,32,-44,-50,68,-48,28,94,-26,-96,-42,96,-24,42,-70,10,-16,-32,98,38,-2,26,-26,-78,44,-72,-56,-22},{0,0,0,0,0,0,0,1,1,1},{22,12,58,70},{-96,-96,-94,-92,-90,-88,-88,-84,-78,-76,-72,-72,-68,-62,-54,-52,-52,-36,-34,-32,-26,-20,-6,-4,-4,4,8,10,14,16,32,32,32,34,42,46,50,60,62,64,64,72,74,76,76,78,90,92,96},{1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,0},{2,4,7,11,20,24,25,27,29,33,33,36,36,41,44,45,47,54,65,66,67,75,78,82,85,90},{56,2,-10,-44,68,10,-32,-2,-68,12,-34,-36,0,40,-16,-36,92,8,-40,-10,46,98,76,-2,98,-20,6,68,32,-26,-12,70,16,-34,-50,-76,-34,-18,0,-44,-76,58},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{78,39,2,76,20,21,3,21,32,80,28,89,51,2,88,19,99,71,68,38,8,76,48,81,90,71,31}};
vector<int> param1 {6,31,7,3,30,14,15,24,10,14};
vector<int> param2 {6,32,8,2,36,13,22,35,8,24};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_SUBARRAYS_TOTAL_DISTINCT_ELEMENTS_ORIGINAL_ARRAY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_SUBARRAYS_TOTAL_DISTINCT_ELEMENTS_ORIGINAL_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
HashMap < Integer , Integer > vis = new HashMap < Integer , Integer > ( ) {
@ Override public Integer get ( Object key ) {
if ( ! containsKey ( key ) ) return 0 ;
return super . get ( key ) ;
}
};
for ( int i = 0 ;
i < n ;
++ i ) vis . put ( arr [ i ] , 1 ) ;
int k = vis . size ( ) ;
vis . clear ( ) ;
int ans = 0 , right = 0 , window = 0 ;
for ( int left = 0 ;
left < n ;
++ left ) {
while ( right < n && window < k ) {
vis . put ( arr [ right ] , vis . get ( arr [ right ] ) + 1 ) ;
if ( vis . get ( arr [ right ] ) == 1 ) ++ window ;
++ right ;
}
if ( window == k ) ans += ( n - right + 1 ) ;
vis . put ( arr [ left ] , vis . get ( arr [ left ] ) - 1 ) ;
if ( vis . get ( arr [ left ] ) == 0 ) -- window ;
}
return ans ;
}
| def f_gold(arr, n):
vis = dict()
for i in range(n):
vis[arr[i]] = 1
k = len(vis)
vid = dict()
ans = 0
right = 0
window = 0
for left in range(n):
while (right < n and window < k):
if arr[right] in vid.keys():
vid[arr[right]] += 1
else:
vid[arr[right]] = 1
if (vid[arr[right]] == 1):
window += 1
right += 1
if (window == k):
ans += (n - right + 1)
vid[arr[left]] -= 1
if (vid[arr[left]] == 0):
window -= 1
return ans
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > vis;
for ( int i = 0;
i < n;
++ i ) vis [ arr [ i ] ] = 1;
int k = vis . size ( );
vis . clear ( );
int ans = 0, right = 0, window = 0;
for ( int left = 0;
left < n;
++ left ) {
while ( right < n && window < k ) {
++ vis [ arr [ right ] ];
if ( vis [ arr [ right ] ] == 1 ) ++ window;
++ right;
}
if ( window == k ) ans += ( n - right + 1 );
-- vis [ arr [ left ] ];
if ( vis [ arr [ left ] ] == 0 ) -- window;
}
return ans;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{13,39,49,52,53,69,72,79,83,96});
param0.add(new int[]{-98,-98,22,-10,-28,0,56,72,36,88,96,22,90,74,-60,-64,0,2,-42,0,94,-82,-74});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{35,23,41,58,66,92,3,33,78,70,80,86,21,21,74,19});
param0.add(new int[]{-98,-80,-52,-10,4,76});
param0.add(new int[]{1,0,0,0,1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,0,1,0,1,1,1,0,0,0,1,1,0,1,1,1,1});
param0.add(new int[]{2,7,10,17,26,36,37,85,87,88});
param0.add(new int[]{64,-2,-94,-84,-48,86});
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});
param0.add(new int[]{91,49,94,81,64,5,13,70,82,9,80,82});
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(20);
param1.add(26);
param1.add(12);
param1.add(3);
param1.add(36);
param1.add(8);
param1.add(5);
param1.add(20);
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());
}
} |
if __name__ == '__main__':
param = [
([13, 39, 49, 52, 53, 69, 72, 79, 83, 96], 5,),
([-98, -98, 22, -10, -28, 0, 56, 72, 36, 88, 96, 22,
90, 74, -60, -64, 0, 2, -42, 0, 94, -82, -74], 20,),
([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], 26,),
([35, 23, 41, 58, 66, 92, 3, 33, 78, 70, 80, 86, 21, 21, 74, 19], 12,),
([-98, -80, -52, -10, 4, 76], 3,),
([1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1,
1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1], 36,),
([2, 7, 10, 17, 26, 36, 37, 85, 87, 88], 8,),
([64, -2, -94, -84, -48, 86], 5,),
([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], 20,),
([91, 49, 94, 81, 64, 5, 13, 70, 82, 9, 80, 82], 9,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success += 1
print("#Results: %i, %i" % (n_success, len(param)))
|
int main() {
int n_success = 0;
vector<vector<int>> param0 {{13,39,49,52,53,69,72,79,83,96},{-98,-98,22,-10,-28,0,56,72,36,88,96,22,90,74,-60,-64,0,2,-42,0,94,-82,-74},{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},{35,23,41,58,66,92,3,33,78,70,80,86,21,21,74,19},{-98,-80,-52,-10,4,76},{1,0,0,0,1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,0,1,0,1,1,1,0,0,0,1,1,0,1,1,1,1},{2,7,10,17,26,36,37,85,87,88},{64,-2,-94,-84,-48,86},{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},{91,49,94,81,64,5,13,70,82,9,80,82}};
vector<int> param1 {5,20,26,12,3,36,8,5,20,9};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_REPETITIVE_ELEMENT_1_N_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_REPETITIVE_ELEMENT_1_N_1{
static int f_gold ( int [ ] arr , int n ) {
int sum = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) sum += arr [ i ] ;
return sum - ( ( ( n - 1 ) * n ) / 2 ) ;
}
| def f_gold ( arr , n ) :
return sum ( arr ) - ( ( ( n - 1 ) * n ) // 2 )
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
return accumulate ( arr, arr + n, 0 ) - ( ( n - 1 ) * n / 2 );
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,8,27,34,39,42,43,54,72});
param0.add(new int[]{-38,-66,-38,-48,-96,74,-32,-62,-34,-32,-88,-12,-8,-4});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1});
param0.add(new int[]{88,86,23,81,76,16,94,64,59,50,71,62,10,89,73,64,65,96,83,40,99,40,77,33,14,62,6,89,74,96,93,29,15,93,9,58,98,76,23,23,70,99});
param0.add(new int[]{-96,-94,-82,-64,-56,-40,-36,-34,-32,-24,-24,-22,-20,-20,-20,-18,-18,-12,-10,-6,16,20,20,22,26,30,36,46,46,50,50,52,64,64,64,68,72,74,76,92,96,98});
param0.add(new int[]{0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1});
param0.add(new int[]{2,6,7,13,19,23,37,39,42,42,43,45,52,53,55,56,59,63,66,71,76,85,86,89,92,94,96,99});
param0.add(new int[]{52,-56,-12,78,6,32,0,36,34,-54,-74,-32});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{10,42,50,5,74,81,30,76,6,34,86,4,77,71,96,22,34,50,35,16,60,11,21,38});
List<Integer> param1 = new ArrayList<>();
param1.add(5);
param1.add(9);
param1.add(8);
param1.add(31);
param1.add(28);
param1.add(25);
param1.add(27);
param1.add(11);
param1.add(15);
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());
}
} |
if __name__ == '__main__':
param = [
([4, 8, 27, 34, 39, 42, 43, 54, 72],5,),
([-38, -66, -38, -48, -96, 74, -32, -62, -34, -32, -88, -12, -8, -4],9,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],8,),
([88, 86, 23, 81, 76, 16, 94, 64, 59, 50, 71, 62, 10, 89, 73, 64, 65, 96, 83, 40, 99, 40, 77, 33, 14, 62, 6, 89, 74, 96, 93, 29, 15, 93, 9, 58, 98, 76, 23, 23, 70, 99],31,),
([-96, -94, -82, -64, -56, -40, -36, -34, -32, -24, -24, -22, -20, -20, -20, -18, -18, -12, -10, -6, 16, 20, 20, 22, 26, 30, 36, 46, 46, 50, 50, 52, 64, 64, 64, 68, 72, 74, 76, 92, 96, 98],28,),
([0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1],25,),
([2, 6, 7, 13, 19, 23, 37, 39, 42, 42, 43, 45, 52, 53, 55, 56, 59, 63, 66, 71, 76, 85, 86, 89, 92, 94, 96, 99],27,),
([52, -56, -12, 78, 6, 32, 0, 36, 34, -54, -74, -32],11,),
([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],15,),
([10, 42, 50, 5, 74, 81, 30, 76, 6, 34, 86, 4, 77, 71, 96, 22, 34, 50, 35, 16, 60, 11, 21, 38],13,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{4,8,27,34,39,42,43,54,72},{-38,-66,-38,-48,-96,74,-32,-62,-34,-32,-88,-12,-8,-4},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},{88,86,23,81,76,16,94,64,59,50,71,62,10,89,73,64,65,96,83,40,99,40,77,33,14,62,6,89,74,96,93,29,15,93,9,58,98,76,23,23,70,99},{-96,-94,-82,-64,-56,-40,-36,-34,-32,-24,-24,-22,-20,-20,-20,-18,-18,-12,-10,-6,16,20,20,22,26,30,36,46,46,50,50,52,64,64,64,68,72,74,76,92,96,98},{0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1},{2,6,7,13,19,23,37,39,42,42,43,45,52,53,55,56,59,63,66,71,76,85,86,89,92,94,96,99},{52,-56,-12,78,6,32,0,36,34,-54,-74,-32},{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},{10,42,50,5,74,81,30,76,6,34,86,4,77,71,96,22,34,50,35,16,60,11,21,38}};
vector<int> param1 {5,9,8,31,28,25,27,11,15,13};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS{
static int f_gold ( int m , int n ) {
if ( m < n ) return 0 ;
if ( n == 0 ) return 1 ;
return f_gold ( m - 1 , n ) + f_gold ( m / 2 , n - 1 ) ;
}
| def f_gold(m, n):
if m < n:
return 0
if n == 0:
return 1
res = (f_gold(m - 1, n) + f_gold(m // 2, n - 1))
return res
|
using namespace std;
int f_gold ( int m, int n ) {
if ( m < n ) return 0;
if ( n == 0 ) return 1;
return f_gold ( m - 1, n ) + f_gold ( m / 2, n - 1 );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(38);
param0.add(39);
param0.add(24);
param0.add(90);
param0.add(44);
param0.add(49);
param0.add(58);
param0.add(97);
param0.add(99);
param0.add(19);
List<Integer> param1 = new ArrayList<>();
param1.add(34);
param1.add(29);
param1.add(99);
param1.add(23);
param1.add(2);
param1.add(70);
param1.add(84);
param1.add(34);
param1.add(72);
param1.add(67);
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());
}
} |
if __name__ == '__main__':
param = [
(38, 34,),
(39, 29,),
(24, 99,),
(90, 23,),
(44, 2,),
(49, 70,),
(58, 84,),
(97, 34,),
(99, 72,),
(19, 67,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success += 1
print("#Results: %i, %i" % (n_success, len(param)))
|
int main() {
int n_success = 0;
vector<int> param0 {38,39,24,90,44,49,58,97,99,19};
vector<int> param1 {34,29,99,23,2,70,84,34,72,67};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY_1{
static int f_gold ( int arr [ ] , int n ) {
Set < Integer > s = new HashSet < > ( ) ;
int first = 0 , second = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( ! s . contains ( arr [ i ] ) ) {
s . add ( arr [ i ] ) ;
continue ;
}
if ( arr [ i ] > first ) {
second = first ;
first = arr [ i ] ;
}
else if ( arr [ i ] > second ) second = arr [ i ] ;
}
return ( first * second ) ;
}
| def f_gold ( arr , n ) :
s = [ ]
first = 0
second = 0
for i in range ( n ) :
if arr [ i ] not in s :
s.append ( arr [ i ] )
continue
if ( arr [ i ] > first ) :
second = first
first = arr [ i ]
elif ( arr [ i ] > second ) :
second = arr [ i ]
return ( first * second )
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_set < int > s;
int first = 0, second = 0;
for ( int i = 0;
i < n;
i ++ ) {
if ( s . find ( arr [ i ] ) == s . end ( ) ) {
s . insert ( arr [ i ] );
continue;
}
if ( arr [ i ] > first ) {
second = first;
first = arr [ i ];
}
else if ( arr [ i ] > second ) second = arr [ i ];
}
return ( first * second );
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,6,7,8,12,13,14,15,18,18,19,19,26,26,32,32,33,34,34,36,41,43,47,47,51,51,52,53,55,56,57,60,61,71,74,75,76,77,79,87,87,87,90,95,98,99});
param0.add(new int[]{-64,-72,6,-62,54,14,28,60,-96,14,-32,-2,80,8,-56,68,86,64,86,-12,82});
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});
param0.add(new int[]{99,7,14,50,94,24,79,13,19,29,22,2,77,36,38,18,51,15,99,52,17,77,22,54});
param0.add(new int[]{-96,-92,-86,-84,-84,-80,-70,-70,-68,-64,-64,-48,-46,-24,-22,-20,-8,-8,0,0,4,8,8,22,28,36,46,50,52,54,60,62,66,70,80,84,86,94,96,96});
param0.add(new int[]{1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,1});
param0.add(new int[]{98});
param0.add(new int[]{-88,-24,8,20,-46,60,24,26,98,82,-30,16,22,-28,84,12,34,14,-18,-38,-94,-24,6,4,-52,-48,84});
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});
param0.add(new int[]{6,30,47,97,20,16,68,34,1,77,48,8,22,68});
List<Integer> param1 = new ArrayList<>();
param1.add(37);
param1.add(12);
param1.add(27);
param1.add(15);
param1.add(25);
param1.add(12);
param1.add(0);
param1.add(21);
param1.add(21);
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());
}
} |
if __name__ == '__main__':
param = [
([4, 6, 7, 8, 12, 13, 14, 15, 18, 18, 19, 19, 26, 26, 32, 32, 33, 34, 34, 36, 41, 43, 47, 47, 51, 51, 52, 53, 55, 56, 57, 60, 61, 71, 74, 75, 76, 77, 79, 87, 87, 87, 90, 95, 98, 99],37,),
([-64, -72, 6, -62, 54, 14, 28, 60, -96, 14, -32, -2, 80, 8, -56, 68, 86, 64, 86, -12, 82],12,),
([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],27,),
([99, 7, 14, 50, 94, 24, 79, 13, 19, 29, 22, 2, 77, 36, 38, 18, 51, 15, 99, 52, 17, 77, 22, 54],15,),
([-96, -92, -86, -84, -84, -80, -70, -70, -68, -64, -64, -48, -46, -24, -22, -20, -8, -8, 0, 0, 4, 8, 8, 22, 28, 36, 46, 50, 52, 54, 60, 62, 66, 70, 80, 84, 86, 94, 96, 96],25,),
([1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1],12,),
([98],0,),
([-88, -24, 8, 20, -46, 60, 24, 26, 98, 82, -30, 16, 22, -28, 84, 12, 34, 14, -18, -38, -94, -24, 6, 4, -52, -48, 84],21,),
([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],21,),
([6, 30, 47, 97, 20, 16, 68, 34, 1, 77, 48, 8, 22, 68],8,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{4,6,7,8,12,13,14,15,18,18,19,19,26,26,32,32,33,34,34,36,41,43,47,47,51,51,52,53,55,56,57,60,61,71,74,75,76,77,79,87,87,87,90,95,98,99},{-64,-72,6,-62,54,14,28,60,-96,14,-32,-2,80,8,-56,68,86,64,86,-12,82},{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},{99,7,14,50,94,24,79,13,19,29,22,2,77,36,38,18,51,15,99,52,17,77,22,54},{-96,-92,-86,-84,-84,-80,-70,-70,-68,-64,-64,-48,-46,-24,-22,-20,-8,-8,0,0,4,8,8,22,28,36,46,50,52,54,60,62,66,70,80,84,86,94,96,96},{1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,1},{98},{-88,-24,8,20,-46,60,24,26,98,82,-30,16,22,-28,84,12,34,14,-18,-38,-94,-24,6,4,-52,-48,84},{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},{6,30,47,97,20,16,68,34,1,77,48,8,22,68}};
vector<int> param1 {37,12,27,15,25,12,0,21,21,8};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION{
static int f_gold ( int N , int insert , int remove , int copy ) {
if ( N == 0 ) return 0 ;
if ( N == 1 ) return insert ;
int dp [ ] = new int [ N + 1 ] ;
for ( int i = 1 ;
i <= N ;
i ++ ) {
if ( i % 2 == 0 ) dp [ i ] = Math . min ( dp [ i - 1 ] + insert , dp [ i / 2 ] + copy ) ;
else dp [ i ] = Math . min ( dp [ i - 1 ] + insert , dp [ ( i + 1 ) / 2 ] + copy + remove ) ;
}
return dp [ N ] ;
}
| def f_gold ( N , insrt , remov , cpy ) :
if N == 0 :
return 0
if N == 1 :
return insrt
dp = [ 0 ] * ( N + 1 )
for i in range ( 1 , N + 1 ) :
if i % 2 == 0 :
dp [ i ] = min ( dp [ i - 1 ] + insrt , dp [ i // 2 ] + cpy )
else :
dp [ i ] = min ( dp [ i - 1 ] + insrt , dp [ ( i + 1 ) // 2 ] + cpy + remov )
return dp [ N ]
|
using namespace std;
int f_gold ( int N, int insert, int remove, int copy ) {
if ( N == 0 ) return 0;
if ( N == 1 ) return insert;
int dp [ N + 1 ];
memset ( dp, 0, sizeof ( dp ) );
for ( int i = 1;
i <= N;
i ++ ) {
if ( i % 2 == 0 ) dp [ i ] = min ( dp [ i - 1 ] + insert, dp [ i / 2 ] + copy );
else dp [ i ] = min ( dp [ i - 1 ] + insert, dp [ ( i + 1 ) / 2 ] + copy + remove );
}
return dp [ N ];
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(59);
param0.add(66);
param0.add(98);
param0.add(63);
param0.add(99);
param0.add(45);
param0.add(60);
param0.add(11);
param0.add(96);
param0.add(54);
List<Integer> param1 = new ArrayList<>();
param1.add(75);
param1.add(68);
param1.add(55);
param1.add(4);
param1.add(37);
param1.add(28);
param1.add(53);
param1.add(96);
param1.add(95);
param1.add(6);
List<Integer> param2 = new ArrayList<>();
param2.add(12);
param2.add(32);
param2.add(69);
param2.add(41);
param2.add(98);
param2.add(59);
param2.add(40);
param2.add(50);
param2.add(48);
param2.add(50);
List<Integer> param3 = new ArrayList<>();
param3.add(45);
param3.add(41);
param3.add(5);
param3.add(12);
param3.add(55);
param3.add(7);
param3.add(52);
param3.add(50);
param3.add(84);
param3.add(82);
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());
}
} |
if __name__ == '__main__':
param = [
(59,75,12,45,),
(66,68,32,41,),
(98,55,69,5,),
(63,4,41,12,),
(99,37,98,55,),
(45,28,59,7,),
(60,53,40,52,),
(11,96,50,50,),
(96,95,48,84,),
(54,6,50,82,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {59,66,98,63,99,45,60,11,96,54};
vector<int> param1 {75,68,55,4,37,28,53,96,95,6};
vector<int> param2 {12,32,69,41,98,59,40,50,48,50};
vector<int> param3 {45,41,5,12,55,7,52,50,84,82};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
POSSIBLE_FORM_TRIANGLE_ARRAY_VALUES |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class POSSIBLE_FORM_TRIANGLE_ARRAY_VALUES{
static boolean f_gold ( int [ ] arr , int N ) {
if ( N < 3 ) return false ;
Arrays . sort ( arr ) ;
for ( int i = 0 ;
i < N - 2 ;
i ++ ) if ( arr [ i ] + arr [ i + 1 ] > arr [ i + 2 ] ) return true ;
return false ;
}
| def f_gold ( arr , N ) :
if N < 3 :
return False
arr.sort ( )
for i in range ( N - 2 ) :
if arr [ i ] + arr [ i + 1 ] > arr [ i + 2 ] :
return True
|
using namespace std;
bool f_gold ( int arr [ ], int N ) {
if ( N < 3 ) return false;
sort ( arr, arr + N );
for ( int i = 0;
i < N - 2;
i ++ ) if ( arr [ i ] + arr [ i + 1 ] > arr [ i + 2 ] ) return true;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,6,8,10,14,15,16,19,21,26,26,26,28,29,30,33,33,35,36,36,41,44,45,45,45,49,51,54,57,59,61,64,68,70,70,72,73,74,76,78,87,89,89,91,92,93,94,95,97});
param0.add(new int[]{50,-58,-44,90,18,-26,-74,-46,96,32,72,46,-90,86,-10,82,-72,86,-64,-96,-12,-14,-36,16,38,56,54,10,74,-86,-64,-56,30,-50,46,4,88,-94,-4,-78,22,-78});
param0.add(new int[]{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[]{80,24,41,90,24,95});
param0.add(new int[]{-90,-88,-84,-82,-82,-80,-70,-66,-62,-60,-60,-48,-46,-44,-42,-20,-16,-4,18,26,28,32,36,46,60,62,68,72,78,98});
param0.add(new int[]{0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,1,1,0,0});
param0.add(new int[]{3,9,14,16,16,26,30,31,32,37,42,42,43,49,51,56,64,69,76,77,77,79,85,88,89,91,94,95});
param0.add(new int[]{-60,-90,-30,-42,80,-66,94,60,-68,-74,-50,42,-38,-34,-84,-58,30,98,-52,6,-60,-60});
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});
param0.add(new int[]{24,80,16,31,5,31,66,1,13,77,88,40,34,15,90,46,8,26,39,52,22,33,3,30,49,51,69,50,39,59});
List<Integer> param1 = new ArrayList<>();
param1.add(25);
param1.add(23);
param1.add(10);
param1.add(4);
param1.add(21);
param1.add(25);
param1.add(19);
param1.add(11);
param1.add(18);
param1.add(23);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([2, 6, 8, 10, 14, 15, 16, 19, 21, 26, 26, 26, 28, 29, 30, 33, 33, 35, 36, 36, 41, 44, 45, 45, 45, 49, 51, 54, 57, 59, 61, 64, 68, 70, 70, 72, 73, 74, 76, 78, 87, 89, 89, 91, 92, 93, 94, 95, 97],25,),
([50, -58, -44, 90, 18, -26, -74, -46, 96, 32, 72, 46, -90, 86, -10, 82, -72, 86, -64, -96, -12, -14, -36, 16, 38, 56, 54, 10, 74, -86, -64, -56, 30, -50, 46, 4, 88, -94, -4, -78, 22, -78],23,),
([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],10,),
([80, 24, 41, 90, 24, 95],4,),
([-90, -88, -84, -82, -82, -80, -70, -66, -62, -60, -60, -48, -46, -44, -42, -20, -16, -4, 18, 26, 28, 32, 36, 46, 60, 62, 68, 72, 78, 98],21,),
([0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0],25,),
([3, 9, 14, 16, 16, 26, 30, 31, 32, 37, 42, 42, 43, 49, 51, 56, 64, 69, 76, 77, 77, 79, 85, 88, 89, 91, 94, 95],19,),
([-60, -90, -30, -42, 80, -66, 94, 60, -68, -74, -50, 42, -38, -34, -84, -58, 30, 98, -52, 6, -60, -60],11,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],18,),
([24, 80, 16, 31, 5, 31, 66, 1, 13, 77, 88, 40, 34, 15, 90, 46, 8, 26, 39, 52, 22, 33, 3, 30, 49, 51, 69, 50, 39, 59],23,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{2,6,8,10,14,15,16,19,21,26,26,26,28,29,30,33,33,35,36,36,41,44,45,45,45,49,51,54,57,59,61,64,68,70,70,72,73,74,76,78,87,89,89,91,92,93,94,95,97},{50,-58,-44,90,18,-26,-74,-46,96,32,72,46,-90,86,-10,82,-72,86,-64,-96,-12,-14,-36,16,38,56,54,10,74,-86,-64,-56,30,-50,46,4,88,-94,-4,-78,22,-78},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{80,24,41,90,24,95},{-90,-88,-84,-82,-82,-80,-70,-66,-62,-60,-60,-48,-46,-44,-42,-20,-16,-4,18,26,28,32,36,46,60,62,68,72,78,98},{0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,1,1,0,0},{3,9,14,16,16,26,30,31,32,37,42,42,43,49,51,56,64,69,76,77,77,79,85,88,89,91,94,95},{-60,-90,-30,-42,80,-66,94,60,-68,-74,-50,42,-38,-34,-84,-58,30,98,-52,6,-60,-60},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{24,80,16,31,5,31,66,1,13,77,88,40,34,15,90,46,8,26,39,52,22,33,3,30,49,51,69,50,39,59}};
vector<int> param1 {25,23,10,4,21,25,19,11,18,23};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
GOOGLE_CASE_GIVEN_SENTENCE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class GOOGLE_CASE_GIVEN_SENTENCE{
static String f_gold ( String s ) {
int n = s . length ( ) ;
String s1 = "" ;
s1 = s1 + Character . toLowerCase ( s . charAt ( 0 ) ) ;
for ( int i = 1 ;
i < n ;
i ++ ) {
if ( s . charAt ( i ) == ' ' && i < n ) {
s1 = s1 + " " + Character . toLowerCase ( s . charAt ( i + 1 ) ) ;
i ++ ;
}
else s1 = s1 + Character . toUpperCase ( s . charAt ( i ) ) ;
}
return s1 ;
}
| def f_gold(s):
n = len(s)
s1 = ""
s1 = s1 + s[0].lower()
i = 1
while i < n:
if (s[i] == ' ' and i <= n):
s1 = s1 + " " + (s[i + 1]).lower()
i = i + 1
else:
s1 = s1 + (s[i]).upper()
i = i + 1
return s1
|
using namespace std;
string f_gold ( string s ) {
int n = s . length ( );
s [ 0 ] = tolower ( s [ 0 ] );
for ( int i = 1;
i < n;
i ++ ) {
if ( s [ i ] == ' ' && i < n ) {
s [ i + 1 ] = tolower ( s [ i + 1 ] );
i ++;
}
else s [ i ] = toupper ( s [ i ] );
}
return s;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("TEYndweqZA");
param0.add("01865");
param0.add("11001100");
param0.add("CzwznJmQet");
param0.add("318305446");
param0.add("0000001111110");
param0.add("yzT");
param0.add("38630230");
param0.add("01101");
param0.add("zoizI");
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());
}
} |
if __name__ == '__main__':
param = [
('TEYndweqZA',),
('01865',),
('11001100',),
('CzwznJmQet',),
('318305446',),
('0000001111110',),
('yzT',),
('38630230',),
('01101',),
('zoizI',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success += 1
print("#Results: %i, %i" % (n_success, len(param)))
|
int main() {
int n_success = 0;
vector<string> param0 {"TEYndweqZA","01865","11001100","CzwznJmQet","318305446","0000001111110","yzT","38630230","01101","zoizI"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_BINARY_DECIMAL_CONVERSION_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_BINARY_DECIMAL_CONVERSION_1{
static int f_gold ( String n ) {
String num = n ;
int dec_value = 0 ;
int base = 1 ;
int len = num . length ( ) ;
for ( int i = len - 1 ;
i >= 0 ;
i -- ) {
if ( num . charAt ( i ) == '1' ) dec_value += base ;
base = base * 2 ;
}
return dec_value ;
}
| def f_gold ( n ) :
num = n ;
dec_value = 0 ;
base1 = 1 ;
len1 = len ( num ) ;
for i in range ( len1 - 1 , - 1 , - 1 ) :
if ( num [ i ] == '1' ) :
dec_value += base1 ;
base1 = base1 * 2 ;
return dec_value ;
|
using namespace std;
int f_gold ( string n ) {
string num = n;
int dec_value = 0;
int base = 1;
int len = num . length ( );
for ( int i = len - 1;
i >= 0;
i -- ) {
if ( num [ i ] == '1' ) dec_value += base;
base = base * 2;
}
return dec_value;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("uEmIAgF");
param0.add("753310137");
param0.add("010011010");
param0.add("kNi");
param0.add("04562016903312");
param0.add("000111101");
param0.add("bk");
param0.add("9");
param0.add("1");
param0.add("XxT nXLlk");
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());
}
} |
if __name__ == '__main__':
param = [
('uEmIAgF',),
('753310137',),
('010011010',),
('kNi',),
('04562016903312',),
('000111101',),
('bk',),
('9',),
('1',),
('XxT nXLlk',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"uEmIAgF","753310137","010011010","kNi","04562016903312","000111101","bk","9","1","XxT nXLlk"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_COST_MAKE_ARRAY_SIZE_1_REMOVING_LARGER_PAIRS |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_COST_MAKE_ARRAY_SIZE_1_REMOVING_LARGER_PAIRS{
static int f_gold ( int [ ] a , int n ) {
int min = a [ 0 ] ;
for ( int i = 1 ;
i < a . length ;
i ++ ) {
if ( a [ i ] < min ) min = a [ i ] ;
}
return ( n - 1 ) * min ;
}
| def f_gold ( a , n ) :
return ( ( n - 1 ) * min ( a ) )
|
using namespace std;
int f_gold ( int a [ ], int n ) {
return ( n - 1 ) * ( * min_element ( a, a + n ) );
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,2,3,4,7,8,10,10,16,20,22,22,23,23,23,27,29,32,35,39,41,46,51,53,54,59,59,60,61,69,70,70,79,79,81,84,90,91,98});
param0.add(new int[]{-6,10});
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[]{20,61,92,45,75,26,83,5,85,27,39,88,36,39,83,41,56,77,39,69,72,98,39,15,29,69,64,92,96,49,59,62,53,82,40,37,29,41});
param0.add(new int[]{-88,-60,-60,-58,-56,-56,-46,-44,-40,-38,-32,-28,-22,-18,-12,-4,-2,10,24,24,28,38,42,46,54,64,72,74,78,96,96});
param0.add(new int[]{0,1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,1,1,1,1,1,1,0,1,0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1});
param0.add(new int[]{1,4,6,9,10,12,17,17,18,21,22,26,26,31,32,33,34,39,42,43,45,46,48,50,53,53,54,55,60,61,62,63,63,64,70,70,70,71,71,78,86,88,91,92,95,95,96,97,99});
param0.add(new int[]{-42,44,-80,-60,48,66,54,-76,26,-74,-10,46,-50,42,-26,-24,-14,36,-2,-26,16,-10,20,-88,-78});
param0.add(new int[]{0,0,0,0,1,1,1,1,1,1});
param0.add(new int[]{65,32,66,82,86,98,15,33,57,3,73,45,90,82,33,99,44,76,50,89,5,7,64});
List<Integer> param1 = new ArrayList<>();
param1.add(25);
param1.add(1);
param1.add(15);
param1.add(23);
param1.add(26);
param1.add(39);
param1.add(28);
param1.add(19);
param1.add(5);
param1.add(22);
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());
}
} |
if __name__ == '__main__':
param = [
([1, 2, 3, 4, 7, 8, 10, 10, 16, 20, 22, 22, 23, 23, 23, 27, 29, 32, 35, 39, 41, 46, 51, 53, 54, 59, 59, 60, 61, 69, 70, 70, 79, 79, 81, 84, 90, 91, 98],25,),
([-6, 10],1,),
([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,),
([20, 61, 92, 45, 75, 26, 83, 5, 85, 27, 39, 88, 36, 39, 83, 41, 56, 77, 39, 69, 72, 98, 39, 15, 29, 69, 64, 92, 96, 49, 59, 62, 53, 82, 40, 37, 29, 41],23,),
([-88, -60, -60, -58, -56, -56, -46, -44, -40, -38, -32, -28, -22, -18, -12, -4, -2, 10, 24, 24, 28, 38, 42, 46, 54, 64, 72, 74, 78, 96, 96],26,),
([0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1],39,),
([1, 4, 6, 9, 10, 12, 17, 17, 18, 21, 22, 26, 26, 31, 32, 33, 34, 39, 42, 43, 45, 46, 48, 50, 53, 53, 54, 55, 60, 61, 62, 63, 63, 64, 70, 70, 70, 71, 71, 78, 86, 88, 91, 92, 95, 95, 96, 97, 99],28,),
([-42, 44, -80, -60, 48, 66, 54, -76, 26, -74, -10, 46, -50, 42, -26, -24, -14, 36, -2, -26, 16, -10, 20, -88, -78],19,),
([0, 0, 0, 0, 1, 1, 1, 1, 1, 1],5,),
([65, 32, 66, 82, 86, 98, 15, 33, 57, 3, 73, 45, 90, 82, 33, 99, 44, 76, 50, 89, 5, 7, 64],22,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{1,2,3,4,7,8,10,10,16,20,22,22,23,23,23,27,29,32,35,39,41,46,51,53,54,59,59,60,61,69,70,70,79,79,81,84,90,91,98},{-6,10},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{20,61,92,45,75,26,83,5,85,27,39,88,36,39,83,41,56,77,39,69,72,98,39,15,29,69,64,92,96,49,59,62,53,82,40,37,29,41},{-88,-60,-60,-58,-56,-56,-46,-44,-40,-38,-32,-28,-22,-18,-12,-4,-2,10,24,24,28,38,42,46,54,64,72,74,78,96,96},{0,1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,1,1,1,1,1,1,0,1,0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1},{1,4,6,9,10,12,17,17,18,21,22,26,26,31,32,33,34,39,42,43,45,46,48,50,53,53,54,55,60,61,62,63,63,64,70,70,70,71,71,78,86,88,91,92,95,95,96,97,99},{-42,44,-80,-60,48,66,54,-76,26,-74,-10,46,-50,42,-26,-24,-14,36,-2,-26,16,-10,20,-88,-78},{0,0,0,0,1,1,1,1,1,1},{65,32,66,82,86,98,15,33,57,3,73,45,90,82,33,99,44,76,50,89,5,7,64}};
vector<int> param1 {25,1,15,23,26,39,28,19,5,22};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MULTIPLY_LARGE_INTEGERS_UNDER_LARGE_MODULO |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MULTIPLY_LARGE_INTEGERS_UNDER_LARGE_MODULO{
static long f_gold ( long a , long b , long mod ) {
long res = 0 ;
a %= mod ;
while ( b > 0 ) {
if ( ( b & 1 ) > 0 ) {
res = ( res + a ) % mod ;
}
a = ( 2 * a ) % mod ;
b >>= 1 ;
}
return res ;
}
| def f_gold ( a , b , mod ) :
res = 0 ;
a = a % mod ;
while ( b ) :
if ( b & 1 ) :
res = ( res + a ) % mod ;
a = ( 2 * a ) % mod ;
b >>= 1 ;
return res ;
|
using namespace std;
long long f_gold ( long long a, long long b, long long mod ) {
long long res = 0;
a %= mod;
while ( b ) {
if ( b & 1 ) res = ( res + a ) % mod;
a = ( 2 * a ) % mod;
b >>= 1;
}
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Long> param0 = new ArrayList<>();
param0.add(60L);
param0.add(46L);
param0.add(4L);
param0.add(67L);
param0.add(93L);
param0.add(89L);
param0.add(8L);
param0.add(53L);
param0.add(96L);
param0.add(38L);
List<Long> param1 = new ArrayList<>();
param1.add(24L);
param1.add(43L);
param1.add(50L);
param1.add(1L);
param1.add(35L);
param1.add(97L);
param1.add(78L);
param1.add(73L);
param1.add(92L);
param1.add(64L);
List<Long> param2 = new ArrayList<>();
param2.add(58L);
param2.add(29L);
param2.add(71L);
param2.add(66L);
param2.add(73L);
param2.add(8L);
param2.add(55L);
param2.add(22L);
param2.add(83L);
param2.add(83L);
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());
}
} |
if __name__ == '__main__':
param = [
(60,24,58,),
(46,43,29,),
(4,50,71,),
(67,1,66,),
(93,35,73,),
(89,97,8,),
(8,78,55,),
(53,73,22,),
(96,92,83,),
(38,64,83,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<long> param0 {60,46,4,67,93,89,8,53,96,38};
vector<long> param1 {24,43,50,1,35,97,78,73,92,64};
vector<long> param2 {58,29,71,66,73,8,55,22,83,83};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NUMBER_DAYS_TANK_WILL_BECOME_EMPTY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NUMBER_DAYS_TANK_WILL_BECOME_EMPTY{
static int f_gold ( int C , int l ) {
if ( l >= C ) return C ;
double eq_root = ( Math . sqrt ( 1 + 8 * ( C - l ) ) - 1 ) / 2 ;
return ( int ) ( Math . ceil ( eq_root ) + l ) ;
}
| import math
def f_gold ( C , l ) :
if ( l >= C ) : return C
eq_root = ( math.sqrt ( 1 + 8 * ( C - l ) ) - 1 ) / 2
return math.ceil ( eq_root ) + l
|
using namespace std;
int f_gold ( int C, int l ) {
if ( l >= C ) return C;
double eq_root = ( std :: sqrt ( 1 + 8 * ( C - l ) ) - 1 ) / 2;
return std :: ceil ( eq_root ) + l;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(91);
param0.add(99);
param0.add(11);
param0.add(23);
param0.add(12);
param0.add(1);
param0.add(18);
param0.add(14);
param0.add(13);
param0.add(36);
List<Integer> param1 = new ArrayList<>();
param1.add(29);
param1.add(55);
param1.add(56);
param1.add(56);
param1.add(97);
param1.add(64);
param1.add(5);
param1.add(37);
param1.add(55);
param1.add(99);
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());
}
} |
if __name__ == '__main__':
param = [
(91,29,),
(99,55,),
(11,56,),
(23,56,),
(12,97,),
(1,64,),
(18,5,),
(14,37,),
(13,55,),
(36,99,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {91,99,11,23,12,1,18,14,13,36};
vector<int> param1 {29,55,56,56,97,64,5,37,55,99};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_FOR_DEADLOCK_FREE_CONDITION_IN_OPERATING_SYSTEM |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_FOR_DEADLOCK_FREE_CONDITION_IN_OPERATING_SYSTEM{
static int f_gold ( int process , int need ) {
int minResources = 0 ;
minResources = process * ( need - 1 ) + 1 ;
return minResources ;
}
| def f_gold ( process , need ) :
minResources = 0
minResources = process * ( need - 1 ) + 1
return minResources
|
using namespace std;
int f_gold ( int process, int need ) {
int minResources = 0;
minResources = process * ( need - 1 ) + 1;
return minResources;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(38);
param0.add(82);
param0.add(2);
param0.add(38);
param0.add(31);
param0.add(80);
param0.add(11);
param0.add(2);
param0.add(26);
param0.add(37);
List<Integer> param1 = new ArrayList<>();
param1.add(37);
param1.add(3);
param1.add(26);
param1.add(72);
param1.add(85);
param1.add(73);
param1.add(9);
param1.add(31);
param1.add(59);
param1.add(67);
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());
}
} |
if __name__ == '__main__':
param = [
(38,37,),
(82,3,),
(2,26,),
(38,72,),
(31,85,),
(80,73,),
(11,9,),
(2,31,),
(26,59,),
(37,67,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {38,82,2,38,31,80,11,2,26,37};
vector<int> param1 {37,3,26,72,85,73,9,31,59,67};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
LONGEST_SUBARRAY_COUNT_1S_ONE_COUNT_0S |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class LONGEST_SUBARRAY_COUNT_1S_ONE_COUNT_0S{
static int f_gold ( int arr [ ] , int n ) {
HashMap < Integer , Integer > um = new HashMap < Integer , Integer > ( ) ;
int sum = 0 , maxLen = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
sum += arr [ i ] == 0 ? - 1 : 1 ;
if ( sum == 1 ) maxLen = i + 1 ;
else if ( ! um . containsKey ( sum ) ) um . put ( sum , i ) ;
if ( um . containsKey ( sum - 1 ) ) {
if ( maxLen < ( i - um . get ( sum - 1 ) ) ) maxLen = i - um . get ( sum - 1 ) ;
}
}
return maxLen ;
}
| def f_gold ( arr , n ) :
um = { i : 0 for i in range ( 10 ) }
sum = 0
maxLen = 0
for i in range ( n ) :
if arr [ i ] == 0 :
sum += - 1
else :
sum += 1
if ( sum == 1 ) :
maxLen = i + 1
elif ( sum not in um ) :
um [ sum ] = i
if ( ( sum - 1 ) in um ) :
if ( maxLen < ( i - um [ sum - 1 ] ) ) :
maxLen = i - um [ sum - 1 ]
return maxLen
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > um;
int sum = 0, maxLen = 0;
for ( int i = 0;
i < n;
i ++ ) {
sum += arr [ i ] == 0 ? - 1 : 1;
if ( sum == 1 ) maxLen = i + 1;
else if ( um . find ( sum ) == um . end ( ) ) um [ sum ] = i;
if ( um . find ( sum - 1 ) != um . end ( ) ) {
if ( maxLen < ( i - um [ sum - 1 ] ) ) maxLen = i - um [ sum - 1 ];
}
}
return maxLen;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{6,10,31,35});
param0.add(new int[]{4,88,-72,28,-54,32,-34});
param0.add(new int[]{0,0,0,1,1,1,1,1,1});
param0.add(new int[]{39,22,15,10,34,87,46,83,74,77,61,90,43,67,64,72,92,52,68,53,67,32,82,76,76,47,74,47,8,80,85,58,75});
param0.add(new int[]{-82,-58,-50,-30,-14,-4,-2,-2,0,22,36,58,70,80,80,82,84,90});
param0.add(new int[]{1,0,1,0,0,1,1,1,0,0,1});
param0.add(new int[]{4,11,17,21,21,22,30,31,36,37,39,40,45,46,47,48,52,53,53,60,60,65,66,66,67,67,87,88,91,97});
param0.add(new int[]{-4,-60,-78,-50,64,18,0,76,12,86,-22});
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});
param0.add(new int[]{4,39,50,37,71,66,55,34,1,41,34,99,69,31});
List<Integer> param1 = new ArrayList<>();
param1.add(2);
param1.add(6);
param1.add(4);
param1.add(26);
param1.add(14);
param1.add(7);
param1.add(29);
param1.add(7);
param1.add(17);
param1.add(11);
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());
}
} |
if __name__ == '__main__':
param = [
([6, 10, 31, 35],2,),
([4, 88, -72, 28, -54, 32, -34],6,),
([0, 0, 0, 1, 1, 1, 1, 1, 1],4,),
([39, 22, 15, 10, 34, 87, 46, 83, 74, 77, 61, 90, 43, 67, 64, 72, 92, 52, 68, 53, 67, 32, 82, 76, 76, 47, 74, 47, 8, 80, 85, 58, 75],26,),
([-82, -58, -50, -30, -14, -4, -2, -2, 0, 22, 36, 58, 70, 80, 80, 82, 84, 90],14,),
([1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1],7,),
([4, 11, 17, 21, 21, 22, 30, 31, 36, 37, 39, 40, 45, 46, 47, 48, 52, 53, 53, 60, 60, 65, 66, 66, 67, 67, 87, 88, 91, 97],29,),
([-4, -60, -78, -50, 64, 18, 0, 76, 12, 86, -22],7,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],17,),
([4, 39, 50, 37, 71, 66, 55, 34, 1, 41, 34, 99, 69, 31],11,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{6,10,31,35},{4,88,-72,28,-54,32,-34},{0,0,0,1,1,1,1,1,1},{39,22,15,10,34,87,46,83,74,77,61,90,43,67,64,72,92,52,68,53,67,32,82,76,76,47,74,47,8,80,85,58,75},{-82,-58,-50,-30,-14,-4,-2,-2,0,22,36,58,70,80,80,82,84,90},{1,0,1,0,0,1,1,1,0,0,1},{4,11,17,21,21,22,30,31,36,37,39,40,45,46,47,48,52,53,53,60,60,65,66,66,67,67,87,88,91,97},{-4,-60,-78,-50,64,18,0,76,12,86,-22},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{4,39,50,37,71,66,55,34,1,41,34,99,69,31}};
vector<int> param1 {2,6,4,26,14,7,29,7,17,11};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NEXT_POWER_OF_2 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NEXT_POWER_OF_2{
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 ;
}
| def f_gold ( n ) :
count = 0 ;
if ( n and not ( n & ( n - 1 ) ) ) :
return n
while ( n != 0 ) :
n >>= 1
count += 1
return 1 << count ;
|
using namespace std;
unsigned int f_gold ( unsigned int n ) {
unsigned count = 0;
if ( n && ! ( n & ( n - 1 ) ) ) return n;
while ( n != 0 ) {
n >>= 1;
count += 1;
}
return 1 << count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(74);
param0.add(70);
param0.add(85);
param0.add(78);
param0.add(71);
param0.add(32);
param0.add(97);
param0.add(90);
param0.add(64);
param0.add(48);
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());
}
} |
if __name__ == '__main__':
param = [
(74,),
(70,),
(85,),
(78,),
(71,),
(32,),
(97,),
(90,),
(64,),
(48,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {74,70,85,78,71,32,97,90,64,48};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING{
static int f_gold ( String str ) {
int res = str . charAt ( 0 ) - '0' ;
for ( int i = 1 ;
i < str . length ( ) ;
i ++ ) {
if ( str . charAt ( i ) == '0' || str . charAt ( i ) == '1' || res < 2 ) res += ( str . charAt ( i ) - '0' ) ;
else res *= ( str . charAt ( i ) - '0' ) ;
}
return res ;
}
| def f_gold ( str ) :
res = ord ( str [ 0 ] ) - 48
for i in range ( 1 , len ( str ) ) :
if ( str [ i ] == '0' or str [ i ] == '1' or res < 2 ) :
res += ord ( str [ i ] ) - 48
else :
res *= ord ( str [ i ] ) - 48
return res
|
using namespace std;
int f_gold ( string str ) {
int res = str [ 0 ] - '0';
for ( int i = 1;
i < str . length ( );
i ++ ) {
if ( str [ i ] == '0' || str [ i ] == '1' || res < 2 ) res += ( str [ i ] - '0' );
else res *= ( str [ i ] - '0' );
}
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("pR");
param0.add("9518");
param0.add("1");
param0.add("nNMCIXUCpRMmvO");
param0.add("3170487");
param0.add("0100101010");
param0.add("Z rONcUqWb");
param0.add("00419297");
param0.add("00");
param0.add("r");
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());
}
} |
if __name__ == '__main__':
param = [
('pR',),
('9518',),
('1',),
('nNMCIXUCpRMmvO',),
('3170487',),
('0100101010',),
('Z rONcUqWb',),
('00419297',),
('00',),
('r',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"pR","9518","1","nNMCIXUCpRMmvO","3170487","0100101010","Z rONcUqWb","00419297","00","r"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_CHECK_ISBN |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_CHECK_ISBN{
static boolean f_gold ( String isbn ) {
int n = isbn . length ( ) ;
if ( n != 10 ) return false ;
int sum = 0 ;
for ( int i = 0 ;
i < 9 ;
i ++ ) {
int digit = isbn . charAt ( i ) - '0' ;
if ( 0 > digit || 9 < digit ) return false ;
sum += ( digit * ( 10 - i ) ) ;
}
char last = isbn . charAt ( 9 ) ;
if ( last != 'X' && ( last < '0' || last > '9' ) ) return false ;
sum += ( ( last == 'X' ) ? 10 : ( last - '0' ) ) ;
return ( sum % 11 == 0 ) ;
}
| null |
using namespace std;
bool f_gold ( string & isbn ) {
int n = isbn . length ( );
if ( n != 10 ) return false;
int sum = 0;
for ( int i = 0;
i < 9;
i ++ ) {
int digit = isbn [ i ] - '0';
if ( 0 > digit || 9 < digit ) return false;
sum += ( digit * ( 10 - i ) );
}
char last = isbn [ 9 ];
if ( last != 'X' && ( last < '0' || last > '9' ) ) return false;
sum += ( ( last == 'X' ) ? 10 : ( last - '0' ) );
return ( sum % 11 == 0 );
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("007462542X");
param0.add("0112112425");
param0.add("0545010225");
param0.add("0552527408");
param0.add("424519151311");
param0.add("101011");
param0.add("9780552527408");
param0.add("2290344397");
param0.add("1473226406");
param0.add("DDdguSGiRr");
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());
}
} | null |
int main() {
int n_success = 0;
vector<string> param0 {"007462542X","0112112425","0545010225","0552527408","424519151311","101011","9780552527408","2290344397","1473226406","DDdguSGiRr"};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_1{
static int f_gold ( int arr [ ] , int n ) {
int result = 0 ;
HashSet < Integer > Hash = new HashSet < > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
Hash . add ( arr [ i ] ) ;
}
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = i + 1 ;
j < n ;
j ++ ) {
int product = arr [ i ] * arr [ j ] ;
if ( Hash . contains ( product ) ) {
result ++ ;
}
}
}
return result ;
}
| def f_gold ( arr , n ) :
result = 0
Hash = set ( )
for i in range ( n ) :
Hash.add ( arr [ i ] )
for i in range ( n ) :
for j in range ( i + 1 , n ) :
product = arr [ i ] * arr [ j ]
if product in ( Hash ) :
result += 1
return result
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
int result = 0;
set < int > Hash;
for ( int i = 0;
i < n;
i ++ ) Hash . insert ( arr [ i ] );
for ( int i = 0;
i < n;
i ++ ) {
for ( int j = i + 1;
j < n;
j ++ ) {
int product = arr [ i ] * arr [ j ];
if ( Hash . find ( product ) != Hash . end ( ) ) result ++;
}
}
return result;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{7,10,17,17,18,20,27,28,29,29,31,32,41,43,45,46,63,66,69,69,70,75,87,95});
param0.add(new int[]{-60});
param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{52,83,36,57,93,11,32,91,52});
param0.add(new int[]{-98,-94,-90,-88,-76,-76,-64,-62,-60,-50,-46,-32,-24,-22,-20,-16,-4,-2,6,10,20,28,30,32,34,38,40,42,54,64,72,76,82,82,86,92,92,98,98});
param0.add(new int[]{0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,0,1,0,1,1,1,0,1,1,0});
param0.add(new int[]{2,3,10,12,15,23,26,28,29,30,31,31,33,33,35,41,45,48,50,50,53,53,56,65,66,67,68,68,72,72,75,76,79,82,90,94,94,95,97,99});
param0.add(new int[]{14,36,-54,-54});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1});
param0.add(new int[]{5,69,37,80,21,98,70,70,74,95,6,67,44,55,52,89,84,99,65,52});
List<Integer> param1 = new ArrayList<>();
param1.add(17);
param1.add(0);
param1.add(9);
param1.add(8);
param1.add(22);
param1.add(42);
param1.add(35);
param1.add(3);
param1.add(12);
param1.add(12);
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());
}
} |
if __name__ == '__main__':
param = [
([7, 10, 17, 17, 18, 20, 27, 28, 29, 29, 31, 32, 41, 43, 45, 46, 63, 66, 69, 69, 70, 75, 87, 95],17,),
([-60],0,),
([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],9,),
([52, 83, 36, 57, 93, 11, 32, 91, 52],8,),
([-98, -94, -90, -88, -76, -76, -64, -62, -60, -50, -46, -32, -24, -22, -20, -16, -4, -2, 6, 10, 20, 28, 30, 32, 34, 38, 40, 42, 54, 64, 72, 76, 82, 82, 86, 92, 92, 98, 98],22,),
([0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0],42,),
([2, 3, 10, 12, 15, 23, 26, 28, 29, 30, 31, 31, 33, 33, 35, 41, 45, 48, 50, 50, 53, 53, 56, 65, 66, 67, 68, 68, 72, 72, 75, 76, 79, 82, 90, 94, 94, 95, 97, 99],35,),
([14, 36, -54, -54],3,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],12,),
([5, 69, 37, 80, 21, 98, 70, 70, 74, 95, 6, 67, 44, 55, 52, 89, 84, 99, 65, 52],12,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{7,10,17,17,18,20,27,28,29,29,31,32,41,43,45,46,63,66,69,69,70,75,87,95},{-60},{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{52,83,36,57,93,11,32,91,52},{-98,-94,-90,-88,-76,-76,-64,-62,-60,-50,-46,-32,-24,-22,-20,-16,-4,-2,6,10,20,28,30,32,34,38,40,42,54,64,72,76,82,82,86,92,92,98,98},{0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,0,1,0,1,1,1,0,1,1,0},{2,3,10,12,15,23,26,28,29,30,31,31,33,33,35,41,45,48,50,50,53,53,56,65,66,67,68,68,72,72,75,76,79,82,90,94,94,95,97,99},{14,36,-54,-54},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},{5,69,37,80,21,98,70,70,74,95,6,67,44,55,52,89,84,99,65,52}};
vector<int> param1 {17,0,9,8,22,42,35,3,12,12};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1 |
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_1{
static int f_gold ( int arr [ ] , int n ) {
int invcount = 0 ;
for ( int i = 0 ;
i < n - 1 ;
i ++ ) {
int small = 0 ;
for ( int j = i + 1 ;
j < n ;
j ++ ) if ( arr [ i ] > arr [ j ] ) small ++ ;
int great = 0 ;
for ( int j = i - 1 ;
j >= 0 ;
j -- ) if ( arr [ i ] < arr [ j ] ) great ++ ;
invcount += great * small ;
}
return invcount ;
}
| def f_gold ( arr , n ) :
invcount = 0
for i in range ( 1 , n - 1 ) :
small = 0
for j in range ( i + 1 , n ) :
if ( arr [ i ] > arr [ j ] ) :
small += 1
great = 0 ;
for j in range ( i - 1 , - 1 , - 1 ) :
if ( arr [ i ] < arr [ j ] ) :
great += 1
invcount += great * small
return invcount
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
int invcount = 0;
for ( int i = 1;
i < n - 1;
i ++ ) {
int small = 0;
for ( int j = i + 1;
j < n;
j ++ ) if ( arr [ i ] > arr [ j ] ) small ++;
int great = 0;
for ( int j = i - 1;
j >= 0;
j -- ) if ( arr [ i ] < arr [ j ] ) great ++;
invcount += great * small;
}
return invcount;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{4,75,89});
param0.add(new int[]{84,-66,-52,34,-28,-6,20,22,-78,-26,14,24,-92,-18,32,-94,-64,-38,56,4,-10,58,-66,-58,-10,-8,-62,-60,-26});
param0.add(new int[]{0,0,0,1,1,1,1,1});
param0.add(new int[]{18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68});
param0.add(new int[]{-94,-86,-84,-84,-82,-66,-62,-58,-52,-48,-44,-40,-38,-32,-22,-22,-22,-14,-8,-6,-6,0,2,20,20,26,32,32,52,56,66,74,76,80,80,86,88,94});
param0.add(new int[]{0,1,1,0,0,0,0,0,1,0,0});
param0.add(new int[]{4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93});
param0.add(new int[]{80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52});
param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58});
List<Integer> param1 = new ArrayList<>();
param1.add(1);
param1.add(26);
param1.add(7);
param1.add(17);
param1.add(34);
param1.add(9);
param1.add(19);
param1.add(10);
param1.add(7);
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());
}
} |
if __name__ == '__main__':
param = [
([4, 75, 89],1,),
([84, -66, -52, 34, -28, -6, 20, 22, -78, -26, 14, 24, -92, -18, 32, -94, -64, -38, 56, 4, -10, 58, -66, -58, -10, -8, -62, -60, -26],26,),
([0, 0, 0, 1, 1, 1, 1, 1],7,),
([18, 7, 43, 57, 94, 37, 38, 41, 59, 64, 97, 29, 51, 37, 64, 91, 42, 83, 13, 22, 68],17,),
([-94, -86, -84, -84, -82, -66, -62, -58, -52, -48, -44, -40, -38, -32, -22, -22, -22, -14, -8, -6, -6, 0, 2, 20, 20, 26, 32, 32, 52, 56, 66, 74, 76, 80, 80, 86, 88, 94],34,),
([0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0],9,),
([4, 8, 15, 19, 24, 31, 33, 36, 38, 45, 45, 52, 54, 65, 73, 75, 83, 84, 90, 92, 93],19,),
([80, -30, -44, 76, -96, 2, 22, -30, 36, -6, 88, -60, -90, -52, 78, 90, -52],10,),
([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],7,),
([74, 71, 28, 45, 14, 31, 17, 10, 82, 27, 45, 73, 93, 87, 57, 58],10,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{4,75,89},{84,-66,-52,34,-28,-6,20,22,-78,-26,14,24,-92,-18,32,-94,-64,-38,56,4,-10,58,-66,-58,-10,-8,-62,-60,-26},{0,0,0,1,1,1,1,1},{18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68},{-94,-86,-84,-84,-82,-66,-62,-58,-52,-48,-44,-40,-38,-32,-22,-22,-22,-14,-8,-6,-6,0,2,20,20,26,32,32,52,56,66,74,76,80,80,86,88,94},{0,1,1,0,0,0,0,0,1,0,0},{4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93},{80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58}};
vector<int> param1 {1,26,7,17,34,9,19,10,7,10};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_INDEX_0_REPLACED_1_GET_LONGEST_CONTINUOUS_SEQUENCE_1S_BINARY_ARRAY |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_INDEX_0_REPLACED_1_GET_LONGEST_CONTINUOUS_SEQUENCE_1S_BINARY_ARRAY{
static int f_gold ( int arr [ ] , int n ) {
int max_count = 0 ;
int max_index = 0 ;
int prev_zero = - 1 ;
int prev_prev_zero = - 1 ;
for ( int curr = 0 ;
curr < n ;
++ curr ) {
if ( arr [ curr ] == 0 ) {
if ( curr - prev_prev_zero > max_count ) {
max_count = curr - prev_prev_zero ;
max_index = prev_zero ;
}
prev_prev_zero = prev_zero ;
prev_zero = curr ;
}
}
if ( n - prev_prev_zero > max_count ) max_index = prev_zero ;
return max_index ;
}
| def f_gold ( arr , n ) :
max_count = 0
max_index = 0
prev_zero = - 1
prev_prev_zero = - 1
for curr in range ( n ) :
if ( arr [ curr ] == 0 ) :
if ( curr - prev_prev_zero > max_count ) :
max_count = curr - prev_prev_zero
max_index = prev_zero
prev_prev_zero = prev_zero
prev_zero = curr
if ( n - prev_prev_zero > max_count ) :
max_index = prev_zero
return max_index
| null |
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,8,9,13,13,19,19,21,21,24,28,28,29,29,29,32,34,38,39,43,45,46,57,59,62,63,67,67,68,69,70,70,71,72,74,74,76,78,79,81,90,90,95,96,98});
param0.add(new int[]{28,92,-16,0,6,12,-88,42,-48,72,2,-38,80,82,96,32,-42,-38,62,-76,20,-10,2,-48,4,88,-24,-72,32,-42,-48,-62,38});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{70,83,9,51,11,81,27,26,37,46});
param0.add(new int[]{50,88});
param0.add(new int[]{0,1,0,1,1,1,0,0,0,1,1,0,1});
param0.add(new int[]{96});
param0.add(new int[]{18,78,14,60,-12,-86,32,74,74,96,58,28,-42,28,-18,-58,-82,-58,22,6,2,-6,-4,-98});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{58,22,15,85,8,74,93,76,44,51,43,93,20,51,52,35,17,13,96,82,23,51,44,18,45,79,66,48,16,31,62,99,46,66,53,89,87,2,87,20,30});
List<Integer> param1 = new ArrayList<>();
param1.add(36);
param1.add(20);
param1.add(39);
param1.add(7);
param1.add(1);
param1.add(6);
param1.add(0);
param1.add(21);
param1.add(19);
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());
}
} |
if __name__ == '__main__':
param = [
([2, 8, 9, 13, 13, 19, 19, 21, 21, 24, 28, 28, 29, 29, 29, 32, 34, 38, 39, 43, 45, 46, 57, 59, 62, 63, 67, 67, 68, 69, 70, 70, 71, 72, 74, 74, 76, 78, 79, 81, 90, 90, 95, 96, 98],36,),
([28, 92, -16, 0, 6, 12, -88, 42, -48, 72, 2, -38, 80, 82, 96, 32, -42, -38, 62, -76, 20, -10, 2, -48, 4, 88, -24, -72, 32, -42, -48, -62, 38],20,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],39,),
([70, 83, 9, 51, 11, 81, 27, 26, 37, 46],7,),
([50, 88],1,),
([0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1],6,),
([96],0,),
([18, 78, 14, 60, -12, -86, 32, 74, 74, 96, 58, 28, -42, 28, -18, -58, -82, -58, 22, 6, 2, -6, -4, -98],21,),
([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],19,),
([58, 22, 15, 85, 8, 74, 93, 76, 44, 51, 43, 93, 20, 51, 52, 35, 17, 13, 96, 82, 23, 51, 44, 18, 45, 79, 66, 48, 16, 31, 62, 99, 46, 66, 53, 89, 87, 2, 87, 20, 30],24,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE{
public static int f_gold ( int arr [ ] , int n ) {
int [ ] lioes = new int [ n ] ;
int maxLen = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) lioes [ i ] = 1 ;
for ( int i = 1 ;
i < n ;
i ++ ) for ( int j = 0 ;
j < i ;
j ++ ) if ( arr [ i ] > arr [ j ] && ( arr [ i ] + arr [ j ] ) % 2 != 0 && lioes [ i ] < lioes [ j ] + 1 ) lioes [ i ] = lioes [ j ] + 1 ;
for ( int i = 0 ;
i < n ;
i ++ ) if ( maxLen < lioes [ i ] ) maxLen = lioes [ i ] ;
return maxLen ;
}
| def f_gold ( arr , n ) :
lioes = list ( )
maxLen = 0
for i in range ( n ) :
lioes.append ( 1 )
i = 1
for i in range ( n ) :
for j in range ( i ) :
if ( arr [ i ] > arr [ j ] and ( arr [ i ] + arr [ j ] ) % 2 != 0 and lioes [ i ] < lioes [ j ] + 1 ) :
lioes [ i ] = lioes [ j ] + 1
for i in range ( n ) :
if maxLen < lioes [ i ] :
maxLen = lioes [ i ]
return maxLen
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
int lioes [ n ];
int maxLen = 0;
for ( int i = 0;
i < n;
i ++ ) lioes [ i ] = 1;
for ( int i = 1;
i < n;
i ++ ) for ( int j = 0;
j < i;
j ++ ) if ( arr [ i ] > arr [ j ] && ( arr [ i ] + arr [ j ] ) % 2 != 0 && lioes [ i ] < lioes [ j ] + 1 ) lioes [ i ] = lioes [ j ] + 1;
for ( int i = 0;
i < n;
i ++ ) if ( maxLen < lioes [ i ] ) maxLen = lioes [ i ];
return maxLen;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{7,8,9,16,16,27,32,33,35,35,39,39,41,42,44,47,48,50,56,59,66,69,70,73,74,76,78,87,87,89,94,96,96,98,98});
param0.add(new int[]{40,76,-54,-92,-28,-96,8,60,28,-38,-62,-40,-16,16,52,28,70,-56,-50,46,68,-16,-56,46,42,70,52,-34,86,-32,-50,64,36,54,20,82,84});
param0.add(new int[]{0,0,0,0,1,1,1});
param0.add(new int[]{15,19,87,44,15,48,21,85,90,30,88,95,48,92,29,52,46,46,7,23,96,97,43});
param0.add(new int[]{-98,-96,-94,-94,-94,-80,-80,-78,-64,-62,-62,-46,-42,-38,-36,-36,-34,-32,-20,-18,-16,-12,-8,-4,-4,-2,-2,2,6,12,34,40,42,44,46,46,50,54,58,58,70,72,72,76,78,86});
param0.add(new int[]{0,0,1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,0,1,0,0,0,1,0,0,1});
param0.add(new int[]{6,7,19,36,44,63,68,72,83});
param0.add(new int[]{-64,12,56,50,94,6,0,70,-70,46,-84,-64,4,76,28,94,-8,24,76,64,-62,-34});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{71,57,20,8,90,69,15,62,45,14,65,20,48,9});
List<Integer> param1 = new ArrayList<>();
param1.add(32);
param1.add(25);
param1.add(4);
param1.add(19);
param1.add(33);
param1.add(13);
param1.add(8);
param1.add(15);
param1.add(21);
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());
}
} |
if __name__ == '__main__':
param = [
([7, 8, 9, 16, 16, 27, 32, 33, 35, 35, 39, 39, 41, 42, 44, 47, 48, 50, 56, 59, 66, 69, 70, 73, 74, 76, 78, 87, 87, 89, 94, 96, 96, 98, 98],32,),
([40, 76, -54, -92, -28, -96, 8, 60, 28, -38, -62, -40, -16, 16, 52, 28, 70, -56, -50, 46, 68, -16, -56, 46, 42, 70, 52, -34, 86, -32, -50, 64, 36, 54, 20, 82, 84],25,),
([0, 0, 0, 0, 1, 1, 1],4,),
([15, 19, 87, 44, 15, 48, 21, 85, 90, 30, 88, 95, 48, 92, 29, 52, 46, 46, 7, 23, 96, 97, 43],19,),
([-98, -96, -94, -94, -94, -80, -80, -78, -64, -62, -62, -46, -42, -38, -36, -36, -34, -32, -20, -18, -16, -12, -8, -4, -4, -2, -2, 2, 6, 12, 34, 40, 42, 44, 46, 46, 50, 54, 58, 58, 70, 72, 72, 76, 78, 86],33,),
([0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1],13,),
([6, 7, 19, 36, 44, 63, 68, 72, 83],8,),
([-64, 12, 56, 50, 94, 6, 0, 70, -70, 46, -84, -64, 4, 76, 28, 94, -8, 24, 76, 64, -62, -34],15,),
([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],21,),
([71, 57, 20, 8, 90, 69, 15, 62, 45, 14, 65, 20, 48, 9],10,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{7,8,9,16,16,27,32,33,35,35,39,39,41,42,44,47,48,50,56,59,66,69,70,73,74,76,78,87,87,89,94,96,96,98,98},{40,76,-54,-92,-28,-96,8,60,28,-38,-62,-40,-16,16,52,28,70,-56,-50,46,68,-16,-56,46,42,70,52,-34,86,-32,-50,64,36,54,20,82,84},{0,0,0,0,1,1,1},{15,19,87,44,15,48,21,85,90,30,88,95,48,92,29,52,46,46,7,23,96,97,43},{-98,-96,-94,-94,-94,-80,-80,-78,-64,-62,-62,-46,-42,-38,-36,-36,-34,-32,-20,-18,-16,-12,-8,-4,-4,-2,-2,2,6,12,34,40,42,44,46,46,50,54,58,58,70,72,72,76,78,86},{0,0,1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,0,1,0,0,0,1,0,0,1},{6,7,19,36,44,63,68,72,83},{-64,12,56,50,94,6,0,70,-70,46,-84,-64,4,76,28,94,-8,24,76,64,-62,-34},{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},{71,57,20,8,90,69,15,62,45,14,65,20,48,9}};
vector<int> param1 {32,25,4,19,33,13,8,15,21,10};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS{
static int f_gold ( int weight [ ] , int n , int c ) {
int res = 0 , bin_rem = c ;
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( weight [ i ] > bin_rem ) {
res ++ ;
bin_rem = c - weight [ i ] ;
}
else bin_rem -= weight [ i ] ;
}
return res ;
}
| null |
using namespace std;
int f_gold ( int weight [ ], int n, int c ) {
int res = 0, bin_rem = c;
for ( int i = 0;
i < n;
i ++ ) {
if ( weight [ i ] > bin_rem ) {
res ++;
bin_rem = c - weight [ i ];
}
else bin_rem -= weight [ i ];
}
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{6,12,14,16,19,24,29,31,33,34,41,43,47,53,53,59,64,70,70,71,72,73,74,80,81,89,90});
param0.add(new int[]{-88,-26,70,-92,96,84,-24,-18,84,62,-72,42,72,2,30,86});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{51,7,6,24,19,83,9,36,40,93,24,48,63,69,53,54,42,45,90,14,29,6,7,37,53,18,87,38,59,1,68,44,47,35,87,91,60,90,52,8,80,41,3,96});
param0.add(new int[]{-98,-90,-78,-48,-36,-20,2,8,16,40,54,54,60,92});
param0.add(new int[]{1,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0});
param0.add(new int[]{8,14,16,35,40,45,54,57,58,59,87,88,93,95,97});
param0.add(new int[]{-46,-6,60,-88,10,94,-12,-64,-68,-76,-60,-10,28,18,86,88,80,-56,94,-6,-42,72,-10,54,-82,-52,-70,-28,-74,82,-12,42,44,56,52,-28,22,62,-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,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{48,57,21,82,99});
List<Integer> param1 = new ArrayList<>();
param1.add(21);
param1.add(11);
param1.add(27);
param1.add(26);
param1.add(11);
param1.add(32);
param1.add(11);
param1.add(19);
param1.add(26);
param1.add(4);
List<Integer> param2 = new ArrayList<>();
param2.add(16);
param2.add(14);
param2.add(23);
param2.add(41);
param2.add(7);
param2.add(28);
param2.add(12);
param2.add(38);
param2.add(23);
param2.add(2);
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());
}
} | null |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{6,12,14,16,19,24,29,31,33,34,41,43,47,53,53,59,64,70,70,71,72,73,74,80,81,89,90},{-88,-26,70,-92,96,84,-24,-18,84,62,-72,42,72,2,30,86},{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},{51,7,6,24,19,83,9,36,40,93,24,48,63,69,53,54,42,45,90,14,29,6,7,37,53,18,87,38,59,1,68,44,47,35,87,91,60,90,52,8,80,41,3,96},{-98,-90,-78,-48,-36,-20,2,8,16,40,54,54,60,92},{1,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0},{8,14,16,35,40,45,54,57,58,59,87,88,93,95,97},{-46,-6,60,-88,10,94,-12,-64,-68,-76,-60,-10,28,18,86,88,80,-56,94,-6,-42,72,-10,54,-82,-52,-70,-28,-74,82,-12,42,44,56,52,-28,22,62,-20},{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},{48,57,21,82,99}};
vector<int> param1 {21,11,27,26,11,32,11,19,26,4};
vector<int> param2 {16,14,23,41,7,28,12,38,23,2};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
PROGRAM_BINARY_DECIMAL_CONVERSION |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class PROGRAM_BINARY_DECIMAL_CONVERSION{
static int f_gold ( int n ) {
int num = n ;
int dec_value = 0 ;
int base = 1 ;
int temp = num ;
while ( temp > 0 ) {
int last_digit = temp % 10 ;
temp = temp / 10 ;
dec_value += last_digit * base ;
base = base * 2 ;
}
return dec_value ;
}
| def f_gold ( n ) :
num = n ;
dec_value = 0 ;
base = 1 ;
temp = num ;
while ( temp ) :
last_digit = temp % 10 ;
temp = int ( temp / 10 ) ;
dec_value += last_digit * base ;
base = base * 2 ;
return dec_value ;
|
using namespace std;
int f_gold ( int n ) {
int num = n;
int dec_value = 0;
int base = 1;
int temp = num;
while ( temp ) {
int last_digit = temp % 10;
temp = temp / 10;
dec_value += last_digit * base;
base = base * 2;
}
return dec_value;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(70);
param0.add(95);
param0.add(41);
param0.add(97);
param0.add(8);
param0.add(16);
param0.add(41);
param0.add(57);
param0.add(81);
param0.add(78);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(70,),
(95,),
(41,),
(97,),
(8,),
(16,),
(41,),
(57,),
(81,),
(78,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {70,95,41,97,8,16,41,57,81,78};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_NATURAL_NUMBERS_WHOSE_PERMUTATION_GREATER_NUMBER |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_NATURAL_NUMBERS_WHOSE_PERMUTATION_GREATER_NUMBER{
static int f_gold ( int n ) {
int result = 0 ;
for ( int i = 1 ;
i <= 9 ;
i ++ ) {
Stack < Integer > s = new Stack < > ( ) ;
if ( i <= n ) {
s . push ( i ) ;
result ++ ;
}
while ( ! s . empty ( ) ) {
int tp = s . peek ( ) ;
s . pop ( ) ;
for ( int j = tp % 10 ;
j <= 9 ;
j ++ ) {
int x = tp * 10 + j ;
if ( x <= n ) {
s . push ( x ) ;
result ++ ;
}
}
}
}
return result ;
}
| def f_gold ( n ) :
result = 0
for i in range ( 1 , 10 ) :
s = [ ]
if ( i <= n ) :
s.append ( i )
result += 1
while len ( s ) != 0 :
tp = s [ - 1 ]
s.pop ( )
for j in range ( tp % 10 , 10 ) :
x = tp * 10 + j
if ( x <= n ) :
s.append ( x )
result += 1
return result
|
using namespace std;
int f_gold ( int n ) {
int result = 0;
for ( int i = 1;
i <= 9;
i ++ ) {
stack < int > s;
if ( i <= n ) {
s . push ( i );
result ++;
}
while ( ! s . empty ( ) ) {
int tp = s . top ( );
s . pop ( );
for ( int j = tp % 10;
j <= 9;
j ++ ) {
int x = tp * 10 + j;
if ( x <= n ) {
s . push ( x );
result ++;
}
}
}
}
return result;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(69);
param0.add(72);
param0.add(88);
param0.add(7);
param0.add(66);
param0.add(34);
param0.add(23);
param0.add(37);
param0.add(33);
param0.add(21);
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());
}
} |
if __name__ == '__main__':
param = [
(69,),
(72,),
(88,),
(7,),
(66,),
(34,),
(23,),
(37,),
(33,),
(21,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {69,72,88,7,66,34,23,37,33,21};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
MINIMUM_ROTATIONS_UNLOCK_CIRCULAR_LOCK |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class MINIMUM_ROTATIONS_UNLOCK_CIRCULAR_LOCK{
static int f_gold ( int input , int unlock_code ) {
int rotation = 0 ;
int input_digit , code_digit ;
while ( input > 0 || unlock_code > 0 ) {
input_digit = input % 10 ;
code_digit = unlock_code % 10 ;
rotation += Math . min ( Math . abs ( input_digit - code_digit ) , 10 - Math . abs ( input_digit - code_digit ) ) ;
input /= 10 ;
unlock_code /= 10 ;
}
return rotation ;
}
| def f_gold ( input , unlock_code ) :
rotation = 0 ;
while ( input > 0 or unlock_code > 0 ) :
input_digit = input % 10 ;
code_digit = unlock_code % 10 ;
rotation += min ( abs ( input_digit - code_digit ) , 10 - abs ( input_digit - code_digit ) ) ;
input = int ( input / 10 ) ;
unlock_code = int ( unlock_code / 10 ) ;
return rotation ;
|
using namespace std;
int f_gold ( int input, int unlock_code ) {
int rotation = 0;
int input_digit, code_digit;
while ( input || unlock_code ) {
input_digit = input % 10;
code_digit = unlock_code % 10;
rotation += min ( abs ( input_digit - code_digit ), 10 - abs ( input_digit - code_digit ) );
input /= 10;
unlock_code /= 10;
}
return rotation;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(71);
param0.add(90);
param0.add(28);
param0.add(41);
param0.add(32);
param0.add(39);
param0.add(33);
param0.add(89);
param0.add(50);
param0.add(92);
List<Integer> param1 = new ArrayList<>();
param1.add(46);
param1.add(65);
param1.add(84);
param1.add(23);
param1.add(58);
param1.add(82);
param1.add(58);
param1.add(32);
param1.add(51);
param1.add(77);
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());
}
} |
if __name__ == '__main__':
param = [
(71,46,),
(90,65,),
(28,84,),
(41,23,),
(32,58,),
(39,82,),
(33,58,),
(89,32,),
(50,51,),
(92,77,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {71,90,28,41,32,39,33,89,50,92};
vector<int> param1 {46,65,84,23,58,82,58,32,51,77};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_THE_MISSING_NUMBER_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_THE_MISSING_NUMBER_1{
static int f_gold ( int a [ ] , int n ) {
int total = 1 ;
for ( int i = 2 ;
i <= ( n + 1 ) ;
i ++ ) {
total += i ;
total -= a [ i - 2 ] ;
}
return total ;
}
| def f_gold ( a , n ) :
i , total = 0 , 1
for i in range ( 2 , n + 2 ) :
total += i
total -= a [ i - 2 ]
return total
|
using namespace std;
int f_gold ( int a [ ], int n ) {
int i, total = 1;
for ( i = 2;
i <= ( n + 1 );
i ++ ) {
total += i;
total -= a [ i - 2 ];
}
return total;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{13,27,46,59,62,82,92});
param0.add(new int[]{22,86,-64,-20,-56,-16,86,42,72,-90,10,42,56,8,50,24,-34,0,-78,64,18,20,-84,-22,90,-20,86,26,-54,0,90,-48,4,88,18,-64,-22,-74,48,-36,-86,-24,88,-64,68,62,92});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{55,89,56,85,26,4,91,91,3,77,63,59,76,90,1,94,44,70,8,54,3,91,29,95,28,75,20});
param0.add(new int[]{-94,-84,-80,-78,-66,-62,-54,-52,-26,-8,-8,-6,4,4,8,14,26,58,60,62,62,76,78,86,92});
param0.add(new int[]{1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0});
param0.add(new int[]{1,2,7,7,9,14,23,29,31,31,35,35,38,41,44,49,49,50,51,54,55,56,57,63,67,69,73,79,79,80,86,88,93});
param0.add(new int[]{78,-48,16,22,-16,34,56,-20,-62,-82,-74,-40,20,-24,-46,64,66,-76,58,-84,96,76,86,-32,46});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{73,76,25,59,40,85,90,38,13,97,93,99,45,7});
List<Integer> param1 = new ArrayList<>();
param1.add(6);
param1.add(38);
param1.add(15);
param1.add(22);
param1.add(18);
param1.add(25);
param1.add(24);
param1.add(12);
param1.add(29);
param1.add(12);
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());
}
} |
if __name__ == '__main__':
param = [
([13, 27, 46, 59, 62, 82, 92],6,),
([22, 86, -64, -20, -56, -16, 86, 42, 72, -90, 10, 42, 56, 8, 50, 24, -34, 0, -78, 64, 18, 20, -84, -22, 90, -20, 86, 26, -54, 0, 90, -48, 4, 88, 18, -64, -22, -74, 48, -36, -86, -24, 88, -64, 68, 62, 92],38,),
([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,),
([55, 89, 56, 85, 26, 4, 91, 91, 3, 77, 63, 59, 76, 90, 1, 94, 44, 70, 8, 54, 3, 91, 29, 95, 28, 75, 20],22,),
([-94, -84, -80, -78, -66, -62, -54, -52, -26, -8, -8, -6, 4, 4, 8, 14, 26, 58, 60, 62, 62, 76, 78, 86, 92],18,),
([1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],25,),
([1, 2, 7, 7, 9, 14, 23, 29, 31, 31, 35, 35, 38, 41, 44, 49, 49, 50, 51, 54, 55, 56, 57, 63, 67, 69, 73, 79, 79, 80, 86, 88, 93],24,),
([78, -48, 16, 22, -16, 34, 56, -20, -62, -82, -74, -40, 20, -24, -46, 64, 66, -76, 58, -84, 96, 76, 86, -32, 46],12,),
([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],29,),
([73, 76, 25, 59, 40, 85, 90, 38, 13, 97, 93, 99, 45, 7],12,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{13,27,46,59,62,82,92},{22,86,-64,-20,-56,-16,86,42,72,-90,10,42,56,8,50,24,-34,0,-78,64,18,20,-84,-22,90,-20,86,26,-54,0,90,-48,4,88,18,-64,-22,-74,48,-36,-86,-24,88,-64,68,62,92},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{55,89,56,85,26,4,91,91,3,77,63,59,76,90,1,94,44,70,8,54,3,91,29,95,28,75,20},{-94,-84,-80,-78,-66,-62,-54,-52,-26,-8,-8,-6,4,4,8,14,26,58,60,62,62,76,78,86,92},{1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0},{1,2,7,7,9,14,23,29,31,31,35,35,38,41,44,49,49,50,51,54,55,56,57,63,67,69,73,79,79,80,86,88,93},{78,-48,16,22,-16,34,56,-20,-62,-82,-74,-40,20,-24,-46,64,66,-76,58,-84,96,76,86,-32,46},{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},{73,76,25,59,40,85,90,38,13,97,93,99,45,7}};
vector<int> param1 {6,38,15,22,18,25,24,12,29,12};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
LOWER_INSERTION_POINT |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class LOWER_INSERTION_POINT{
static int f_gold ( int arr [ ] , int n , int X ) {
if ( X < arr [ 0 ] ) return 0 ;
else if ( X > arr [ n - 1 ] ) return n ;
int lowerPnt = 0 ;
int i = 1 ;
while ( i < n && arr [ i ] < X ) {
lowerPnt = i ;
i = i * 2 ;
}
while ( lowerPnt < n && arr [ lowerPnt ] < X ) lowerPnt ++ ;
return lowerPnt ;
}
| def f_gold ( arr , n , X ) :
if ( X < arr [ 0 ] ) :
return 0 ;
elif ( X > arr [ n - 1 ] ) :
return n
lowerPnt = 0
i = 1
while ( i < n and arr [ i ] < X ) :
lowerPnt = i
i = i * 2
while ( lowerPnt < n and arr [ lowerPnt ] < X ) :
lowerPnt += 1
return lowerPnt
|
using namespace std;
int f_gold ( int arr [ ], int n, int X ) {
if ( X < arr [ 0 ] ) return 0;
else if ( X > arr [ n - 1 ] ) return n;
int lowerPnt = 0;
int i = 1;
while ( i < n && arr [ i ] < X ) {
lowerPnt = i;
i = i * 2;
}
while ( lowerPnt < n && arr [ lowerPnt ] < X ) lowerPnt ++;
return lowerPnt;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{1,2,5,5,16,16,20,26,32,35,39,39,41,44,48,48,51,59,59,62,66,66,70,74,75,78,80,86,86,96});
param0.add(new int[]{-76,80,-6,-2,50,72,84,-56,70,8,48,6,-24,-50,-72});
param0.add(new int[]{0,0,0,0,0,1,1,1,1});
param0.add(new int[]{74,65,84,71});
param0.add(new int[]{-96,-92,-90,-86,-84,-76,-76,-62,-58,-54,-50,-50,-44,-42,-38,-34,-14,-8,6,12,24,38,40,50,62,84,86,92});
param0.add(new int[]{1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,0,0,0,1,1,1,1});
param0.add(new int[]{6,10,14,14,16,19,23,23,25,26,29,34,42,42,43,45,47,49,50,51,51,56,59,65,69,72,75,78,79,80,82,82,82,84,85,91,98});
param0.add(new int[]{-90,-2,22,-2,58,-2,96,38,36,-66,-98,22,-80,-32,22,0,-34,-16,82,76,12,84,66,8,32,18,-98,-10});
param0.add(new int[]{0,0,0,1,1,1,1});
param0.add(new int[]{85,59,22,52,93,14,42,71,69,15,52,78,35,61,92,90,70,48,47,72,74,46,22,74,83,32,14,24,18,27,18,68,29,31});
List<Integer> param1 = new ArrayList<>();
param1.add(17);
param1.add(14);
param1.add(8);
param1.add(2);
param1.add(19);
param1.add(12);
param1.add(31);
param1.add(22);
param1.add(3);
param1.add(19);
List<Integer> param2 = new ArrayList<>();
param2.add(29);
param2.add(9);
param2.add(4);
param2.add(3);
param2.add(19);
param2.add(17);
param2.add(24);
param2.add(16);
param2.add(5);
param2.add(33);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
([1, 2, 5, 5, 16, 16, 20, 26, 32, 35, 39, 39, 41, 44, 48, 48, 51, 59, 59, 62, 66, 66, 70, 74, 75, 78, 80, 86, 86, 96],17,29,),
([-76, 80, -6, -2, 50, 72, 84, -56, 70, 8, 48, 6, -24, -50, -72],14,9,),
([0, 0, 0, 0, 0, 1, 1, 1, 1],8,4,),
([74, 65, 84, 71],2,3,),
([-96, -92, -90, -86, -84, -76, -76, -62, -58, -54, -50, -50, -44, -42, -38, -34, -14, -8, 6, 12, 24, 38, 40, 50, 62, 84, 86, 92],19,19,),
([1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1],12,17,),
([6, 10, 14, 14, 16, 19, 23, 23, 25, 26, 29, 34, 42, 42, 43, 45, 47, 49, 50, 51, 51, 56, 59, 65, 69, 72, 75, 78, 79, 80, 82, 82, 82, 84, 85, 91, 98],31,24,),
([-90, -2, 22, -2, 58, -2, 96, 38, 36, -66, -98, 22, -80, -32, 22, 0, -34, -16, 82, 76, 12, 84, 66, 8, 32, 18, -98, -10],22,16,),
([0, 0, 0, 1, 1, 1, 1],3,5,),
([85, 59, 22, 52, 93, 14, 42, 71, 69, 15, 52, 78, 35, 61, 92, 90, 70, 48, 47, 72, 74, 46, 22, 74, 83, 32, 14, 24, 18, 27, 18, 68, 29, 31],19,33,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{1,2,5,5,16,16,20,26,32,35,39,39,41,44,48,48,51,59,59,62,66,66,70,74,75,78,80,86,86,96},{-76,80,-6,-2,50,72,84,-56,70,8,48,6,-24,-50,-72},{0,0,0,0,0,1,1,1,1},{74,65,84,71},{-96,-92,-90,-86,-84,-76,-76,-62,-58,-54,-50,-50,-44,-42,-38,-34,-14,-8,6,12,24,38,40,50,62,84,86,92},{1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,0,0,0,1,1,1,1},{6,10,14,14,16,19,23,23,25,26,29,34,42,42,43,45,47,49,50,51,51,56,59,65,69,72,75,78,79,80,82,82,82,84,85,91,98},{-90,-2,22,-2,58,-2,96,38,36,-66,-98,22,-80,-32,22,0,-34,-16,82,76,12,84,66,8,32,18,-98,-10},{0,0,0,1,1,1,1},{85,59,22,52,93,14,42,71,69,15,52,78,35,61,92,90,70,48,47,72,74,46,22,74,83,32,14,24,18,27,18,68,29,31}};
vector<int> param1 {17,14,8,2,19,12,31,22,3,19};
vector<int> param2 {29,9,4,3,19,17,24,16,5,33};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX_1 |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX_1{
static int f_gold ( int M [ ] [ ] , int n , int m ) {
int count = 0 ;
int i = 0 ;
int j = m - 1 ;
while ( j >= 0 && i < n ) {
if ( M [ i ] [ j ] < 0 ) {
count += j + 1 ;
i += 1 ;
}
else j -= 1 ;
}
return count ;
}
| def f_gold ( M , n , m ) :
count = 0
i = 0
j = m - 1
while j >= 0 and i < n :
if M [ i ] [ j ] < 0 :
count += ( j + 1 )
i += 1
else :
j -= 1
return count
| null |
public static void main(String args[]) {
int n_success = 0;
List<int [ ] [ ]> param0 = new ArrayList<>();
param0.add(new int[][]{new int[]{76,39,83,83,24,11,7,97,81,52,7,81,68,25,14,54,69,12,53,38,94,77,75,28,38,92,47,46,86},new int[]{63,95,96,14,82,98,75,5,72,27,71,62,15,55,63,37,10,2,68,98,15,21,25,83,84,46,93,23,87},new int[]{47,23,49,53,26,14,50,50,5,3,2,28,69,14,47,82,78,48,89,84,32,28,71,20,99,66,4,54,23},new int[]{43,37,14,20,36,19,4,97,53,42,12,69,48,60,31,29,97,86,21,69,78,61,23,20,99,51,51,38,72},new int[]{92,40,87,23,98,25,84,79,98,94,8,33,86,21,30,52,51,53,38,72,38,79,54,5,35,45,81,61,92},new int[]{49,92,94,43,1,28,43,39,50,96,28,32,35,47,6,20,90,38,92,11,98,36,51,72,7,63,92,20,10},new int[]{31,26,58,16,98,43,79,88,47,23,1,63,48,54,51,1,21,74,94,8,74,80,86,96,55,36,73,62,68},new int[]{32,70,24,22,91,36,67,12,17,23,45,57,51,47,3,52,44,39,56,87,35,48,26,36,91,8,67,86,25},new int[]{27,80,9,11,42,7,77,83,95,92,36,23,28,3,32,75,37,88,78,53,38,12,29,25,63,3,83,85,40},new int[]{15,14,11,3,1,50,70,72,85,66,75,41,2,74,5,97,53,77,69,22,69,99,93,24,22,98,83,3,59},new int[]{94,54,92,22,14,71,92,18,52,75,66,32,23,84,86,46,16,15,60,27,66,14,77,1,16,93,68,9,75},new int[]{72,91,27,73,33,29,78,40,83,75,56,74,48,40,92,94,72,62,57,59,70,2,18,71,28,53,15,87,22},new int[]{83,76,75,55,3,52,29,64,9,85,89,13,62,82,63,57,25,59,6,18,6,67,22,2,24,42,52,5,18},new int[]{72,95,58,66,69,95,23,13,77,86,34,74,75,97,90,10,47,54,23,37,46,85,81,39,82,11,98,6,11},new int[]{95,58,35,92,80,58,58,82,23,29,43,20,27,55,41,52,35,29,40,13,34,52,11,21,39,56,9,67,39},new int[]{5,8,27,88,80,32,94,82,25,43,35,62,26,93,70,18,22,54,71,38,85,61,95,67,58,53,11,34,65},new int[]{72,84,81,42,42,98,74,18,93,39,48,88,29,82,95,13,9,63,17,54,47,10,8,47,34,87,65,32,15},new int[]{12,36,98,64,88,77,1,70,87,33,46,30,37,89,99,60,28,57,74,11,80,57,66,51,25,7,93,90,37},new int[]{80,99,88,26,88,80,98,61,42,1,91,2,7,68,1,4,48,2,61,7,69,70,15,76,72,22,83,16,42},new int[]{47,6,71,29,60,14,18,74,48,85,14,55,34,63,45,24,7,55,69,45,72,76,54,46,89,97,27,35,21},new int[]{81,95,80,69,92,74,94,2,70,70,27,61,46,1,77,6,95,72,18,25,47,48,49,43,89,10,54,74,54},new int[]{94,67,23,93,87,73,68,38,43,64,35,72,72,34,30,81,12,32,8,20,62,36,63,88,98,13,7,57,66},new int[]{40,20,92,48,43,19,36,78,87,17,45,35,7,36,27,38,83,33,64,41,50,37,62,39,74,74,73,14,94},new int[]{97,4,66,99,57,66,42,6,32,64,44,1,34,41,86,3,78,43,7,19,68,3,31,83,50,47,86,16,87},new int[]{61,18,41,10,33,56,90,62,32,52,66,56,16,12,15,5,79,47,33,44,92,2,23,63,57,5,85,23,87},new int[]{41,81,24,64,1,60,10,50,76,4,24,45,63,64,25,14,4,4,35,20,61,11,8,45,30,33,32,56,11},new int[]{82,93,72,31,22,62,63,61,93,62,7,17,43,39,9,68,76,15,92,60,4,16,49,68,38,61,18,45,1},new int[]{3,44,78,74,33,97,37,73,10,21,68,84,77,42,44,42,18,95,32,16,56,83,19,15,61,72,55,80,99},new int[]{9,4,61,31,73,79,37,60,13,36,92,62,20,6,79,82,59,67,12,43,70,65,33,16,70,36,51,38,61}});
param0.add(new int[][]{new int[]{17,56},new int[]{68,34}});
param0.add(new int[][]{new int[]{63,21,24,76,7,94,21,23,39,45,23,2,16,42,23,6,15,37,47,64,18,55,99,5,74,66,9,82,40,13,2,14,34,11,47,56},new int[]{20,30,34,53,49,37,11,29,58,85,94,81,88,50,61,5,72,5,58,86,98,77,72,35,2,53,11,29,84,27,25,40,90,52,69,90},new int[]{10,24,96,55,26,55,47,7,75,42,43,29,46,78,74,32,16,82,42,42,59,78,68,82,32,31,8,27,18,7,22,70,27,9,86,83},new int[]{91,89,31,11,33,34,47,34,18,39,82,4,92,89,8,89,83,24,56,46,92,50,76,20,58,69,17,98,97,37,38,76,1,87,2,97},new int[]{64,35,17,29,96,12,57,8,12,47,65,48,97,10,26,4,70,28,10,79,81,82,60,70,44,59,83,75,29,19,27,74,4,6,67,67},new int[]{54,41,10,15,57,80,50,86,25,2,45,7,37,77,55,72,37,94,93,69,6,79,95,73,68,77,47,80,77,55,38,80,7,90,60,92},new int[]{56,85,53,32,16,26,43,24,24,7,47,52,99,90,76,35,63,2,48,36,63,23,14,69,65,22,90,87,5,22,35,86,19,72,97,6},new int[]{30,68,46,51,93,74,58,6,79,93,31,6,81,16,29,31,1,26,82,1,51,71,89,85,39,93,6,4,22,96,94,61,58,4,40,89},new int[]{57,39,35,96,86,55,55,45,51,20,67,50,39,73,73,64,92,49,89,73,45,87,46,73,45,27,23,91,49,99,21,2,16,76,14,8},new int[]{26,56,59,26,75,99,7,86,47,8,90,8,36,52,76,62,21,39,12,8,9,63,29,41,7,77,28,93,51,11,87,60,65,4,28,65},new int[]{82,47,44,19,27,71,36,9,13,48,5,87,29,74,88,64,77,94,82,54,14,42,93,63,9,76,70,63,19,81,19,78,94,41,52,18},new int[]{25,55,1,99,50,76,42,89,35,3,55,35,26,99,47,50,74,90,61,61,12,49,87,98,81,44,46,77,13,77,75,73,19,36,14,53},new int[]{77,73,1,49,66,56,54,46,6,62,67,94,83,41,65,66,22,67,66,30,57,71,19,65,33,29,72,72,90,19,82,50,89,75,81,9},new int[]{50,61,36,63,82,74,2,12,79,88,25,21,75,81,25,74,68,81,24,98,49,99,35,2,69,34,57,35,85,35,98,1,83,52,32,98},new int[]{58,19,70,53,75,93,19,63,29,73,69,63,30,84,56,7,48,45,41,53,20,44,97,53,85,6,35,93,74,81,58,98,93,31,7,30},new int[]{35,59,63,40,37,2,79,35,70,50,29,78,5,15,34,50,76,60,39,23,67,80,62,26,51,64,83,59,78,56,52,45,5,85,56,62},new int[]{18,97,81,30,57,26,64,52,52,21,18,67,49,69,40,5,25,96,19,67,15,31,52,35,43,97,74,60,85,54,58,91,13,3,2,69},new int[]{79,23,13,11,51,54,53,5,37,75,81,14,13,38,93,40,42,23,81,49,83,86,99,96,96,23,68,60,91,48,7,24,58,3,54,80},new int[]{80,93,37,66,75,96,96,8,17,64,40,74,41,44,41,93,38,38,77,31,49,76,23,90,1,80,70,30,13,81,44,31,71,75,33,83},new int[]{9,7,91,42,85,39,95,24,78,52,37,76,64,75,65,23,91,47,98,55,66,72,14,52,12,99,80,54,8,87,56,60,39,80,2,79},new int[]{64,11,70,65,36,63,89,63,15,62,56,23,43,31,3,79,36,75,69,92,64,67,48,44,72,64,84,74,48,99,53,84,83,38,43,51},new int[]{50,14,8,82,83,80,14,3,37,24,75,34,29,36,87,16,76,79,64,35,50,39,88,13,72,91,60,28,71,95,68,50,76,55,68,3},new int[]{54,55,22,6,97,76,3,9,29,33,54,68,89,35,36,72,34,43,29,34,56,23,65,2,86,80,78,69,12,66,52,47,34,61,54,82},new int[]{70,76,28,63,71,56,43,38,9,46,20,12,81,36,1,48,77,22,57,51,74,63,18,75,50,59,8,63,35,27,79,66,69,81,11,33},new int[]{38,24,37,49,70,31,11,2,30,34,86,1,3,48,71,41,23,11,4,65,16,42,48,38,9,12,50,9,17,60,58,82,90,88,82,72},new int[]{61,89,15,40,61,85,26,9,67,62,73,28,7,76,13,89,28,43,41,36,95,17,25,26,59,66,83,35,8,46,86,20,49,29,73,74},new int[]{11,42,44,98,98,9,24,16,58,43,28,68,57,44,94,50,37,31,44,18,50,27,50,10,25,54,43,31,38,84,20,21,91,30,63,89},new int[]{71,27,83,1,75,71,77,29,69,12,45,59,82,5,30,40,74,16,69,51,99,97,93,30,61,3,23,1,84,31,69,27,27,79,66,46},new int[]{46,15,23,88,71,27,77,24,69,23,36,95,67,69,15,38,27,8,69,18,82,61,28,14,43,73,46,99,41,4,66,32,88,27,21,67},new int[]{59,42,75,62,2,89,77,88,8,39,42,63,89,52,41,69,38,54,64,11,8,82,10,16,72,88,16,25,75,81,8,18,50,63,78,32},new int[]{94,64,54,48,64,92,80,19,47,75,25,48,79,9,84,59,4,9,98,23,99,90,4,42,55,41,5,99,9,19,19,70,8,41,21,32},new int[]{36,34,6,11,51,7,72,53,85,49,55,96,96,42,22,69,44,32,30,1,31,90,51,7,54,43,80,66,43,53,68,5,1,97,88,14},new int[]{87,13,21,98,41,36,79,99,44,55,94,65,2,35,28,88,14,42,28,15,27,62,72,98,79,59,58,34,64,53,18,36,59,23,76,66},new int[]{77,16,17,9,27,67,43,78,57,38,50,27,4,30,8,68,18,36,4,57,90,29,37,56,3,95,8,75,75,49,63,10,34,20,67,11},new int[]{76,91,51,58,73,99,42,93,3,65,79,51,51,67,90,62,45,50,67,61,17,90,85,22,85,3,3,17,65,80,89,68,59,78,16,82},new int[]{8,66,57,91,66,68,17,15,33,36,37,62,36,39,99,57,15,97,46,15,47,20,87,63,88,86,66,1,46,4,78,80,34,91,17,93}});
param0.add(new int[][]{new int[]{96,91,61,55},new int[]{60,18,48,25},new int[]{94,72,84,54},new int[]{10,62,23,79}});
param0.add(new int[][]{new int[]{68,61,12,7,49,65,57,32,57,95,64,17,77,59},new int[]{38,7,47,21,69,36,79,82,23,27,76,37,43,52},new int[]{37,95,8,88,57,73,4,52,75,99,7,55,78,23},new int[]{45,1,5,89,89,71,96,27,86,75,49,30,91,78},new int[]{90,64,33,88,19,95,21,5,74,90,65,86,8,53},new int[]{96,14,83,29,23,39,48,68,97,68,97,60,19,66},new int[]{92,85,40,36,18,94,53,75,6,72,63,98,1,87},new int[]{31,50,24,38,46,2,24,76,34,76,45,59,90,90},new int[]{65,98,95,65,4,82,85,58,1,68,69,73,3,10},new int[]{39,44,93,64,97,19,21,52,70,73,19,85,83,96},new int[]{49,48,54,77,37,82,64,93,13,76,14,4,14,57},new int[]{67,85,12,23,33,66,19,41,19,2,30,95,84,7},new int[]{35,38,97,53,61,25,80,94,77,49,86,6,12,71},new int[]{39,32,7,19,13,24,26,48,79,47,13,2,48,7}});
param0.add(new int[][]{new int[]{52,24,47,92,56,78,13,64,21,58},new int[]{97,6,75,14,88,68,7,23,39,50},new int[]{17,67,52,78,74,63,61,47,65,66},new int[]{45,47,94,50,82,16,11,94,83,61},new int[]{91,81,3,52,62,85,27,82,83,58},new int[]{90,5,40,91,76,16,88,65,94,47},new int[]{63,83,38,72,5,18,89,42,39,14},new int[]{23,18,89,8,80,67,23,35,69,14},new int[]{83,83,45,73,40,8,26,90,27,38},new int[]{36,11,82,87,50,1,24,90,52,78}});
param0.add(new int[][]{new int[]{75,18,92,72,81,98,29,53,45,28,6,37,39,3,30,17,77,29,56,43,6,97,35,89,22,24},new int[]{53,29,83,34,63,60,11,35,84,27,50,21,52,63,46,47,43,6,43,37,56,89,44,49,78,82},new int[]{39,2,47,28,17,17,92,70,8,27,34,58,41,7,54,95,65,86,74,37,59,41,38,36,10,17},new int[]{53,9,95,28,34,19,32,19,70,79,45,66,16,66,21,19,57,75,68,47,68,38,16,42,10,80},new int[]{2,3,13,81,70,71,94,52,44,16,80,55,96,16,88,7,67,84,9,49,73,93,59,14,59,27},new int[]{11,21,30,54,74,52,72,38,99,55,14,77,9,6,61,52,64,18,43,94,82,54,68,73,63,84},new int[]{97,16,69,54,41,92,65,23,93,53,95,60,47,17,42,3,22,57,56,96,61,87,77,63,21,28},new int[]{76,21,99,51,78,19,19,13,89,44,89,25,76,73,71,23,48,99,7,36,26,48,38,80,58,81},new int[]{16,46,97,92,29,56,53,79,77,95,13,99,55,33,65,16,73,78,38,10,2,86,31,35,24,55},new int[]{14,4,76,13,89,59,80,74,13,94,38,79,59,93,42,5,12,69,25,49,86,78,3,50,54,24},new int[]{63,2,29,74,80,37,35,2,28,54,39,61,7,88,66,91,4,29,37,33,25,17,66,45,51,47},new int[]{54,95,80,2,12,35,23,77,37,57,61,66,12,68,23,10,78,48,67,86,9,82,98,39,78,26},new int[]{75,36,19,34,54,70,36,97,26,87,62,3,42,18,71,53,60,39,32,72,8,28,79,9,84,26},new int[]{6,65,24,64,86,49,78,92,53,43,12,21,74,31,1,8,16,1,84,26,36,58,26,46,62,96},new int[]{12,67,58,42,70,74,31,70,79,96,72,22,92,4,70,16,18,86,95,73,36,21,20,47,74,64},new int[]{26,18,42,4,41,72,81,27,96,79,45,26,39,22,36,87,15,54,64,3,74,22,40,43,98,1},new int[]{12,52,15,36,80,80,75,48,5,76,62,12,18,1,3,21,7,37,35,9,72,23,63,69,63,71},new int[]{76,16,82,3,77,42,65,35,17,15,20,60,98,3,29,46,75,36,15,54,40,86,81,21,12,28},new int[]{32,59,65,75,40,20,82,40,73,44,78,26,9,25,92,93,32,84,8,76,34,7,49,5,42,10},new int[]{23,67,12,62,81,87,63,39,2,41,27,49,19,43,16,44,24,95,69,49,34,23,73,52,18,40},new int[]{90,90,98,56,40,54,31,92,32,50,25,89,8,38,88,90,81,52,56,87,38,87,78,69,99,91},new int[]{54,5,15,40,9,85,32,81,37,2,13,78,55,79,73,64,16,14,55,39,32,21,79,82,17,79},new int[]{92,99,79,3,52,68,58,99,51,8,28,42,77,42,19,98,38,63,31,69,53,93,81,36,99,89},new int[]{73,90,89,34,63,28,69,64,87,82,63,50,50,54,47,73,94,5,93,30,34,7,84,56,97,87},new int[]{74,49,31,66,24,68,50,25,36,23,38,21,39,44,40,60,43,98,47,88,96,1,56,14,73,51},new int[]{76,57,45,67,84,5,52,43,40,81,99,42,83,39,3,79,43,64,52,27,21,67,16,11,81,33}});
param0.add(new int[][]{new int[]{45,38,43,11,2,77,3,59,58,22,6,65,13,43,52,15},new int[]{69,16,25,44,58,94,54,33,96,27,86,41,25,86,66,95},new int[]{59,30,24,88,58,3,79,72,44,79,74,38,88,50,67,63},new int[]{77,66,59,16,29,18,24,81,6,78,40,14,23,20,86,90},new int[]{54,62,50,48,35,34,91,85,64,72,50,41,27,83,70,30},new int[]{78,37,23,81,90,53,11,37,80,30,45,86,9,7,6,14},new int[]{75,66,60,75,3,95,96,17,49,70,85,94,90,17,48,13},new int[]{8,50,36,13,18,84,71,19,77,3,97,76,35,1,9,5},new int[]{7,7,26,74,17,90,16,84,96,49,25,45,33,65,73,19},new int[]{85,24,39,8,23,16,31,84,43,16,92,73,2,72,69,58},new int[]{7,72,1,48,82,42,84,66,11,35,70,72,80,47,71,46},new int[]{92,19,1,42,4,55,31,93,38,92,22,87,40,35,10,58},new int[]{28,30,44,35,39,15,99,79,2,52,67,96,41,34,68,88},new int[]{41,84,68,59,71,64,79,76,52,26,16,25,89,11,39,97},new int[]{76,74,93,51,9,19,66,31,38,44,41,77,61,85,72,60},new int[]{18,97,93,70,18,8,55,92,63,45,19,53,78,37,76,32}});
param0.add(new int[][]{new int[]{88,45,19,4,98,22,59,11,85,88,3,46,20,27,14,92,24,45,89,7,84,55,54,65,95,92,10,97,41},new int[]{50,92,97,19,60,78,38,90,54,69,35,95,78,27,7,19,31,16,26,23,39,21,39,4,69,3,95,4,48},new int[]{50,96,8,79,99,92,99,70,68,51,29,3,56,9,98,2,24,79,37,27,86,34,31,74,23,48,78,9,70},new int[]{62,93,53,48,89,17,47,17,46,31,63,63,2,25,59,59,30,55,95,32,73,54,31,7,59,42,7,45,13},new int[]{64,8,35,71,49,38,83,47,7,70,53,16,96,33,97,62,87,5,16,96,26,66,73,24,97,46,77,71,43},new int[]{80,43,36,54,65,85,9,88,43,53,6,27,75,32,51,36,88,79,2,45,46,59,73,78,12,66,84,64,54},new int[]{61,5,44,80,52,38,85,41,91,64,3,59,12,10,83,6,91,4,17,63,78,86,61,80,60,81,16,91,56},new int[]{58,25,51,21,69,32,68,5,93,92,79,17,83,60,21,11,6,60,42,13,75,59,60,70,8,92,58,12,63},new int[]{56,42,60,3,1,3,21,66,11,14,77,77,76,43,64,14,71,54,9,52,92,84,21,92,35,97,18,99,4},new int[]{17,46,28,48,45,50,85,2,73,1,26,8,95,42,53,40,45,94,30,37,61,16,44,25,36,9,56,36,90},new int[]{90,32,51,10,22,17,53,22,37,32,43,40,26,42,29,45,70,53,56,28,58,6,83,70,40,90,75,81,28},new int[]{20,70,17,6,63,59,87,3,22,17,88,45,12,86,98,42,51,52,35,3,47,93,5,46,59,37,93,36,75},new int[]{76,66,33,20,53,44,81,5,12,13,78,27,82,94,6,2,97,60,13,27,51,59,34,22,60,35,16,55,66},new int[]{79,89,28,6,35,23,55,27,71,89,97,7,20,41,48,97,23,83,17,9,59,34,49,66,63,47,28,59,24},new int[]{98,48,63,80,29,81,60,76,22,46,71,98,18,44,14,90,12,54,29,27,23,2,88,65,75,76,69,22,34},new int[]{98,19,77,51,45,43,39,81,9,82,38,43,39,62,83,94,66,4,69,14,84,13,96,71,18,7,91,2,25},new int[]{49,42,78,9,52,81,43,29,96,56,71,95,52,63,70,23,58,8,50,91,74,19,54,89,28,86,8,71,26},new int[]{9,42,86,62,16,55,89,70,37,4,73,48,25,75,24,55,32,84,3,27,46,63,79,61,2,88,26,64,46},new int[]{14,23,36,97,88,37,26,53,96,91,10,62,34,5,45,5,25,12,17,42,47,64,63,28,70,26,67,98,12},new int[]{16,54,94,32,17,6,35,73,50,74,39,45,31,30,7,13,44,56,30,33,40,82,85,52,46,29,81,31,99},new int[]{69,62,61,40,63,96,52,95,16,74,74,3,49,76,88,90,76,26,33,40,75,83,11,38,7,66,57,45,33},new int[]{62,48,8,10,28,79,60,78,26,82,13,16,52,99,15,67,53,15,81,12,77,83,84,61,44,40,94,66,24},new int[]{51,76,56,42,98,20,96,37,32,41,28,55,65,43,98,24,28,26,64,69,48,24,3,74,68,48,8,24,7},new int[]{48,84,58,83,45,84,81,27,9,37,36,80,93,90,2,43,28,54,34,5,64,33,56,20,99,99,49,29,69},new int[]{19,80,60,22,1,42,35,37,14,46,87,12,70,25,54,80,13,6,98,15,24,77,80,20,54,4,22,74,5},new int[]{80,3,20,93,99,9,88,6,72,99,6,93,69,27,90,62,41,38,4,21,21,33,57,91,96,10,40,8,23},new int[]{56,44,68,36,33,58,79,25,13,72,51,37,92,30,62,23,13,57,87,49,3,49,95,68,36,6,78,21,58},new int[]{60,9,7,99,19,48,62,8,43,71,83,35,51,79,4,59,79,39,5,91,35,77,51,30,84,92,72,16,27},new int[]{22,58,62,3,99,42,88,86,42,55,9,55,61,36,11,47,19,21,82,82,35,66,70,28,59,27,75,36,5}});
param0.add(new int[][]{new int[]{9,7,25,16,34,78,18,20,43,67,73,98,45,20,73,51,62,62,20,32,55,72,60,15,48,49,38,83,25,87,12,93,97,52,41,90},new int[]{38,97,57,14,10,64,43,72,64,96,44,32,55,79,34,45,74,76,96,77,63,97,2,63,38,96,98,22,76,9,43,4,23,56,43,99},new int[]{3,97,67,53,94,92,93,81,15,34,6,20,66,44,12,13,43,15,48,16,70,83,54,58,47,3,71,44,71,10,63,49,83,4,81,63},new int[]{98,64,37,36,59,47,49,30,46,75,67,61,91,63,46,20,2,85,61,40,74,60,34,40,56,21,11,26,66,5,21,21,64,37,29,84},new int[]{37,20,33,63,35,85,36,86,14,55,97,56,17,52,5,73,33,92,24,97,39,94,11,44,24,45,85,39,99,65,19,76,68,82,51,18},new int[]{67,46,51,73,35,35,13,67,60,46,88,85,97,91,11,54,15,66,39,26,12,85,95,79,63,94,36,20,87,54,51,26,10,35,6,7},new int[]{45,34,15,72,77,92,77,99,7,44,49,49,93,4,20,27,46,7,44,29,4,4,12,89,60,54,63,70,32,78,44,24,68,96,58,47},new int[]{60,71,69,9,88,29,85,97,98,87,55,81,24,93,93,95,83,88,65,64,55,68,65,19,53,16,55,62,95,2,79,49,99,89,29,48},new int[]{60,6,9,20,64,81,54,76,46,22,62,52,82,31,52,76,45,66,22,56,88,32,66,80,35,54,7,15,71,89,77,77,38,89,48,22},new int[]{30,66,22,51,19,60,8,27,62,66,35,94,87,14,92,45,7,78,26,82,23,80,11,95,23,99,81,11,20,64,10,13,51,64,94,22},new int[]{76,49,78,72,98,66,77,69,15,17,31,64,89,99,98,14,28,5,72,47,46,11,99,60,62,17,67,36,33,81,14,74,90,36,88,14},new int[]{90,77,53,61,18,38,48,55,35,41,70,12,70,48,93,43,68,50,11,55,78,95,21,25,40,16,86,91,26,70,69,89,53,61,7,22},new int[]{91,94,52,73,87,70,24,63,86,9,37,46,17,28,27,20,47,93,56,81,7,84,81,68,1,14,49,27,89,42,16,27,67,83,96,73},new int[]{84,24,54,47,63,22,42,38,4,66,52,18,29,94,15,88,69,22,91,83,51,55,6,4,37,38,72,5,55,12,75,34,68,8,68,30},new int[]{47,74,37,48,80,45,51,19,54,94,80,28,95,20,62,37,43,4,1,80,46,99,3,93,62,32,25,16,33,83,38,13,1,88,48,1},new int[]{89,58,76,95,72,66,44,24,16,51,72,66,36,15,88,33,69,84,76,16,93,99,80,56,11,13,7,63,12,38,56,6,92,11,42,48},new int[]{6,8,64,4,14,59,32,2,52,18,28,32,54,56,54,64,59,19,51,27,22,63,15,95,34,73,25,35,68,97,32,52,49,99,93,60},new int[]{93,53,88,70,7,70,92,72,16,59,72,86,45,9,43,52,74,58,93,76,34,94,47,83,37,15,2,36,14,59,52,9,45,94,60,75},new int[]{26,28,26,4,14,74,59,73,21,49,64,64,53,20,2,99,26,39,24,58,33,10,17,21,5,76,95,61,23,77,22,34,75,51,44,91},new int[]{19,37,44,78,43,76,54,24,80,72,53,94,66,82,32,80,89,20,64,40,22,93,94,95,20,8,62,36,70,1,75,57,77,23,20,69},new int[]{70,58,27,59,1,90,89,23,36,85,92,45,2,93,65,10,10,83,13,85,91,33,4,80,63,76,17,80,10,6,6,7,61,63,48,43},new int[]{14,15,86,46,44,37,56,36,34,12,32,30,32,35,28,68,51,72,62,15,53,58,90,22,87,34,36,24,99,95,66,14,38,72,43,39},new int[]{44,35,36,39,97,34,36,19,18,46,71,90,12,87,18,95,7,53,89,20,7,50,24,37,10,25,45,1,95,87,88,22,4,92,56,34},new int[]{38,84,92,22,76,71,16,58,49,39,92,60,31,32,94,48,38,42,88,15,1,94,13,32,17,75,19,73,42,97,31,68,34,16,10,28},new int[]{57,76,12,77,28,88,31,36,11,40,78,4,16,57,41,61,88,70,52,57,59,57,79,78,83,97,53,87,80,74,45,2,80,65,78,80},new int[]{47,70,68,66,93,33,73,43,6,64,36,19,81,73,1,55,39,48,13,30,80,41,8,40,14,48,7,49,19,31,95,64,57,88,97,47},new int[]{71,54,34,95,21,31,85,67,94,53,28,79,51,18,19,89,21,1,41,65,63,85,71,18,90,13,55,30,12,55,31,6,6,91,43,19},new int[]{31,93,54,82,24,21,43,77,96,18,60,68,37,7,58,10,53,80,83,36,86,76,41,12,4,51,45,7,32,2,33,48,67,65,12,10},new int[]{61,57,43,48,47,9,29,42,21,67,86,56,3,61,83,5,84,77,41,12,56,79,92,33,10,35,11,60,29,73,58,78,24,11,26,76},new int[]{18,74,87,74,1,61,24,37,27,86,48,91,62,91,29,8,72,26,48,9,49,54,93,17,33,1,57,1,61,21,30,41,33,37,17,51},new int[]{64,66,69,5,27,17,30,72,51,88,42,66,61,58,77,87,43,64,84,64,27,19,58,11,17,14,67,21,29,45,42,63,48,54,26,78},new int[]{79,62,86,3,12,45,84,16,55,93,24,93,59,12,92,2,61,9,92,97,31,15,48,33,51,49,55,48,1,9,66,83,24,54,23,56},new int[]{63,57,5,89,37,4,46,26,70,75,85,39,56,6,39,43,55,93,87,15,98,77,61,25,15,52,58,86,66,57,22,66,54,46,9,36},new int[]{83,65,45,2,10,81,87,31,76,58,50,57,18,89,93,30,78,35,88,75,77,26,98,75,53,68,43,49,99,98,88,13,12,97,93,9},new int[]{59,15,73,29,52,78,11,30,13,1,57,69,53,53,34,33,90,85,60,76,97,42,73,98,95,64,28,78,39,91,94,27,49,48,22,58},new int[]{24,52,10,2,94,13,6,27,89,82,28,99,30,20,34,12,58,96,50,51,34,85,89,72,28,77,50,23,26,27,96,55,72,66,38,77}});
List<Integer> param1 = new ArrayList<>();
param1.add(27);
param1.add(1);
param1.add(35);
param1.add(3);
param1.add(13);
param1.add(8);
param1.add(18);
param1.add(11);
param1.add(16);
param1.add(27);
List<Integer> param2 = new ArrayList<>();
param2.add(27);
param2.add(1);
param2.add(28);
param2.add(2);
param2.add(13);
param2.add(8);
param2.add(15);
param2.add(11);
param2.add(15);
param2.add(25);
for(int i =0; i < param0.size(); ++i ){
for(int j =0; j < param0.get(i).length; ++j ){
Arrays.sort(param0.get(i)[j]);
for(int k =0; k < param0.get(i)[j].length; ++k){
param0.get(i)[j][k]-=50;
}
}
}
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());
}
} |
if __name__ == '__main__':
param = [
([[76, 39, 83, 83, 24, 11, 7, 97, 81, 52, 7, 81, 68, 25, 14, 54, 69, 12, 53, 38, 94, 77, 75, 28, 38, 92, 47, 46, 86], [63, 95, 96, 14, 82, 98, 75, 5, 72, 27, 71, 62, 15, 55, 63, 37, 10, 2, 68, 98, 15, 21, 25, 83, 84, 46, 93, 23, 87], [47, 23, 49, 53, 26, 14, 50, 50, 5, 3, 2, 28, 69, 14, 47, 82, 78, 48, 89, 84, 32, 28, 71, 20, 99, 66, 4, 54, 23], [43, 37, 14, 20, 36, 19, 4, 97, 53, 42, 12, 69, 48, 60, 31, 29, 97, 86, 21, 69, 78, 61, 23, 20, 99, 51, 51, 38, 72], [92, 40, 87, 23, 98, 25, 84, 79, 98, 94, 8, 33, 86, 21, 30, 52, 51, 53, 38, 72, 38, 79, 54, 5, 35, 45, 81, 61, 92], [49, 92, 94, 43, 1, 28, 43, 39, 50, 96, 28, 32, 35, 47, 6, 20, 90, 38, 92, 11, 98, 36, 51, 72, 7, 63, 92, 20, 10], [31, 26, 58, 16, 98, 43, 79, 88, 47, 23, 1, 63, 48, 54, 51, 1, 21, 74, 94, 8, 74, 80, 86, 96, 55, 36, 73, 62, 68], [32, 70, 24, 22, 91, 36, 67, 12, 17, 23, 45, 57, 51, 47, 3, 52, 44, 39, 56, 87, 35, 48, 26, 36, 91, 8, 67, 86, 25], [27, 80, 9, 11, 42, 7, 77, 83, 95, 92, 36, 23, 28, 3, 32, 75, 37, 88, 78, 53, 38, 12, 29, 25, 63, 3, 83, 85, 40], [15, 14, 11, 3, 1, 50, 70, 72, 85, 66, 75, 41, 2, 74, 5, 97, 53, 77, 69, 22, 69, 99, 93, 24, 22, 98, 83, 3, 59], [94, 54, 92, 22, 14, 71, 92, 18, 52, 75, 66, 32, 23, 84, 86, 46, 16, 15, 60, 27, 66, 14, 77, 1, 16, 93, 68, 9, 75], [72, 91, 27, 73, 33, 29, 78, 40, 83, 75, 56, 74, 48, 40, 92, 94, 72, 62, 57, 59, 70, 2, 18, 71, 28, 53, 15, 87, 22], [83, 76, 75, 55, 3, 52, 29, 64, 9, 85, 89, 13, 62, 82, 63, 57, 25, 59, 6, 18, 6, 67, 22, 2, 24, 42, 52, 5, 18], [72, 95, 58, 66, 69, 95, 23, 13, 77, 86, 34, 74, 75, 97, 90, 10, 47, 54, 23, 37, 46, 85, 81, 39, 82, 11, 98, 6, 11], [95, 58, 35, 92, 80, 58, 58, 82, 23, 29, 43, 20, 27, 55, 41, 52, 35, 29, 40, 13, 34, 52, 11, 21, 39, 56, 9, 67, 39], [5, 8, 27, 88, 80, 32, 94, 82, 25, 43, 35, 62, 26, 93, 70, 18, 22, 54, 71, 38, 85, 61, 95, 67, 58, 53, 11, 34, 65], [72, 84, 81, 42, 42, 98, 74, 18, 93, 39, 48, 88, 29, 82, 95, 13, 9, 63, 17, 54, 47, 10, 8, 47, 34, 87, 65, 32, 15], [12, 36, 98, 64, 88, 77, 1, 70, 87, 33, 46, 30, 37, 89, 99, 60, 28, 57, 74, 11, 80, 57, 66, 51, 25, 7, 93, 90, 37], [80, 99, 88, 26, 88, 80, 98, 61, 42, 1, 91, 2, 7, 68, 1, 4, 48, 2, 61, 7, 69, 70, 15, 76, 72, 22, 83, 16, 42], [47, 6, 71, 29, 60, 14, 18, 74, 48, 85, 14, 55, 34, 63, 45, 24, 7, 55, 69, 45, 72, 76, 54, 46, 89, 97, 27, 35, 21], [81, 95, 80, 69, 92, 74, 94, 2, 70, 70, 27, 61, 46, 1, 77, 6, 95, 72, 18, 25, 47, 48, 49, 43, 89, 10, 54, 74, 54], [94, 67, 23, 93, 87, 73, 68, 38, 43, 64, 35, 72, 72, 34, 30, 81, 12, 32, 8, 20, 62, 36, 63, 88, 98, 13, 7, 57, 66], [40, 20, 92, 48, 43, 19, 36, 78, 87, 17, 45, 35, 7, 36, 27, 38, 83, 33, 64, 41, 50, 37, 62, 39, 74, 74, 73, 14, 94], [97, 4, 66, 99, 57, 66, 42, 6, 32, 64, 44, 1, 34, 41, 86, 3, 78, 43, 7, 19, 68, 3, 31, 83, 50, 47, 86, 16, 87], [61, 18, 41, 10, 33, 56, 90, 62, 32, 52, 66, 56, 16, 12, 15, 5, 79, 47, 33, 44, 92, 2, 23, 63, 57, 5, 85, 23, 87], [41, 81, 24, 64, 1, 60, 10, 50, 76, 4, 24, 45, 63, 64, 25, 14, 4, 4, 35, 20, 61, 11, 8, 45, 30, 33, 32, 56, 11], [82, 93, 72, 31, 22, 62, 63, 61, 93, 62, 7, 17, 43, 39, 9, 68, 76, 15, 92, 60, 4, 16, 49, 68, 38, 61, 18, 45, 1], [3, 44, 78, 74, 33, 97, 37, 73, 10, 21, 68, 84, 77, 42, 44, 42, 18, 95, 32, 16, 56, 83, 19, 15, 61, 72, 55, 80, 99], [9, 4, 61, 31, 73, 79, 37, 60, 13, 36, 92, 62, 20, 6, 79, 82, 59, 67, 12, 43, 70, 65, 33, 16, 70, 36, 51, 38, 61]],27,27,),
([[17, 56], [68, 34]],1,1,),
([[63, 21, 24, 76, 7, 94, 21, 23, 39, 45, 23, 2, 16, 42, 23, 6, 15, 37, 47, 64, 18, 55, 99, 5, 74, 66, 9, 82, 40, 13, 2, 14, 34, 11, 47, 56], [20, 30, 34, 53, 49, 37, 11, 29, 58, 85, 94, 81, 88, 50, 61, 5, 72, 5, 58, 86, 98, 77, 72, 35, 2, 53, 11, 29, 84, 27, 25, 40, 90, 52, 69, 90], [10, 24, 96, 55, 26, 55, 47, 7, 75, 42, 43, 29, 46, 78, 74, 32, 16, 82, 42, 42, 59, 78, 68, 82, 32, 31, 8, 27, 18, 7, 22, 70, 27, 9, 86, 83], [91, 89, 31, 11, 33, 34, 47, 34, 18, 39, 82, 4, 92, 89, 8, 89, 83, 24, 56, 46, 92, 50, 76, 20, 58, 69, 17, 98, 97, 37, 38, 76, 1, 87, 2, 97], [64, 35, 17, 29, 96, 12, 57, 8, 12, 47, 65, 48, 97, 10, 26, 4, 70, 28, 10, 79, 81, 82, 60, 70, 44, 59, 83, 75, 29, 19, 27, 74, 4, 6, 67, 67], [54, 41, 10, 15, 57, 80, 50, 86, 25, 2, 45, 7, 37, 77, 55, 72, 37, 94, 93, 69, 6, 79, 95, 73, 68, 77, 47, 80, 77, 55, 38, 80, 7, 90, 60, 92], [56, 85, 53, 32, 16, 26, 43, 24, 24, 7, 47, 52, 99, 90, 76, 35, 63, 2, 48, 36, 63, 23, 14, 69, 65, 22, 90, 87, 5, 22, 35, 86, 19, 72, 97, 6], [30, 68, 46, 51, 93, 74, 58, 6, 79, 93, 31, 6, 81, 16, 29, 31, 1, 26, 82, 1, 51, 71, 89, 85, 39, 93, 6, 4, 22, 96, 94, 61, 58, 4, 40, 89], [57, 39, 35, 96, 86, 55, 55, 45, 51, 20, 67, 50, 39, 73, 73, 64, 92, 49, 89, 73, 45, 87, 46, 73, 45, 27, 23, 91, 49, 99, 21, 2, 16, 76, 14, 8], [26, 56, 59, 26, 75, 99, 7, 86, 47, 8, 90, 8, 36, 52, 76, 62, 21, 39, 12, 8, 9, 63, 29, 41, 7, 77, 28, 93, 51, 11, 87, 60, 65, 4, 28, 65], [82, 47, 44, 19, 27, 71, 36, 9, 13, 48, 5, 87, 29, 74, 88, 64, 77, 94, 82, 54, 14, 42, 93, 63, 9, 76, 70, 63, 19, 81, 19, 78, 94, 41, 52, 18], [25, 55, 1, 99, 50, 76, 42, 89, 35, 3, 55, 35, 26, 99, 47, 50, 74, 90, 61, 61, 12, 49, 87, 98, 81, 44, 46, 77, 13, 77, 75, 73, 19, 36, 14, 53], [77, 73, 1, 49, 66, 56, 54, 46, 6, 62, 67, 94, 83, 41, 65, 66, 22, 67, 66, 30, 57, 71, 19, 65, 33, 29, 72, 72, 90, 19, 82, 50, 89, 75, 81, 9], [50, 61, 36, 63, 82, 74, 2, 12, 79, 88, 25, 21, 75, 81, 25, 74, 68, 81, 24, 98, 49, 99, 35, 2, 69, 34, 57, 35, 85, 35, 98, 1, 83, 52, 32, 98], [58, 19, 70, 53, 75, 93, 19, 63, 29, 73, 69, 63, 30, 84, 56, 7, 48, 45, 41, 53, 20, 44, 97, 53, 85, 6, 35, 93, 74, 81, 58, 98, 93, 31, 7, 30], [35, 59, 63, 40, 37, 2, 79, 35, 70, 50, 29, 78, 5, 15, 34, 50, 76, 60, 39, 23, 67, 80, 62, 26, 51, 64, 83, 59, 78, 56, 52, 45, 5, 85, 56, 62], [18, 97, 81, 30, 57, 26, 64, 52, 52, 21, 18, 67, 49, 69, 40, 5, 25, 96, 19, 67, 15, 31, 52, 35, 43, 97, 74, 60, 85, 54, 58, 91, 13, 3, 2, 69], [79, 23, 13, 11, 51, 54, 53, 5, 37, 75, 81, 14, 13, 38, 93, 40, 42, 23, 81, 49, 83, 86, 99, 96, 96, 23, 68, 60, 91, 48, 7, 24, 58, 3, 54, 80], [80, 93, 37, 66, 75, 96, 96, 8, 17, 64, 40, 74, 41, 44, 41, 93, 38, 38, 77, 31, 49, 76, 23, 90, 1, 80, 70, 30, 13, 81, 44, 31, 71, 75, 33, 83], [9, 7, 91, 42, 85, 39, 95, 24, 78, 52, 37, 76, 64, 75, 65, 23, 91, 47, 98, 55, 66, 72, 14, 52, 12, 99, 80, 54, 8, 87, 56, 60, 39, 80, 2, 79], [64, 11, 70, 65, 36, 63, 89, 63, 15, 62, 56, 23, 43, 31, 3, 79, 36, 75, 69, 92, 64, 67, 48, 44, 72, 64, 84, 74, 48, 99, 53, 84, 83, 38, 43, 51], [50, 14, 8, 82, 83, 80, 14, 3, 37, 24, 75, 34, 29, 36, 87, 16, 76, 79, 64, 35, 50, 39, 88, 13, 72, 91, 60, 28, 71, 95, 68, 50, 76, 55, 68, 3], [54, 55, 22, 6, 97, 76, 3, 9, 29, 33, 54, 68, 89, 35, 36, 72, 34, 43, 29, 34, 56, 23, 65, 2, 86, 80, 78, 69, 12, 66, 52, 47, 34, 61, 54, 82], [70, 76, 28, 63, 71, 56, 43, 38, 9, 46, 20, 12, 81, 36, 1, 48, 77, 22, 57, 51, 74, 63, 18, 75, 50, 59, 8, 63, 35, 27, 79, 66, 69, 81, 11, 33], [38, 24, 37, 49, 70, 31, 11, 2, 30, 34, 86, 1, 3, 48, 71, 41, 23, 11, 4, 65, 16, 42, 48, 38, 9, 12, 50, 9, 17, 60, 58, 82, 90, 88, 82, 72], [61, 89, 15, 40, 61, 85, 26, 9, 67, 62, 73, 28, 7, 76, 13, 89, 28, 43, 41, 36, 95, 17, 25, 26, 59, 66, 83, 35, 8, 46, 86, 20, 49, 29, 73, 74], [11, 42, 44, 98, 98, 9, 24, 16, 58, 43, 28, 68, 57, 44, 94, 50, 37, 31, 44, 18, 50, 27, 50, 10, 25, 54, 43, 31, 38, 84, 20, 21, 91, 30, 63, 89], [71, 27, 83, 1, 75, 71, 77, 29, 69, 12, 45, 59, 82, 5, 30, 40, 74, 16, 69, 51, 99, 97, 93, 30, 61, 3, 23, 1, 84, 31, 69, 27, 27, 79, 66, 46], [46, 15, 23, 88, 71, 27, 77, 24, 69, 23, 36, 95, 67, 69, 15, 38, 27, 8, 69, 18, 82, 61, 28, 14, 43, 73, 46, 99, 41, 4, 66, 32, 88, 27, 21, 67], [59, 42, 75, 62, 2, 89, 77, 88, 8, 39, 42, 63, 89, 52, 41, 69, 38, 54, 64, 11, 8, 82, 10, 16, 72, 88, 16, 25, 75, 81, 8, 18, 50, 63, 78, 32], [94, 64, 54, 48, 64, 92, 80, 19, 47, 75, 25, 48, 79, 9, 84, 59, 4, 9, 98, 23, 99, 90, 4, 42, 55, 41, 5, 99, 9, 19, 19, 70, 8, 41, 21, 32], [36, 34, 6, 11, 51, 7, 72, 53, 85, 49, 55, 96, 96, 42, 22, 69, 44, 32, 30, 1, 31, 90, 51, 7, 54, 43, 80, 66, 43, 53, 68, 5, 1, 97, 88, 14], [87, 13, 21, 98, 41, 36, 79, 99, 44, 55, 94, 65, 2, 35, 28, 88, 14, 42, 28, 15, 27, 62, 72, 98, 79, 59, 58, 34, 64, 53, 18, 36, 59, 23, 76, 66], [77, 16, 17, 9, 27, 67, 43, 78, 57, 38, 50, 27, 4, 30, 8, 68, 18, 36, 4, 57, 90, 29, 37, 56, 3, 95, 8, 75, 75, 49, 63, 10, 34, 20, 67, 11], [76, 91, 51, 58, 73, 99, 42, 93, 3, 65, 79, 51, 51, 67, 90, 62, 45, 50, 67, 61, 17, 90, 85, 22, 85, 3, 3, 17, 65, 80, 89, 68, 59, 78, 16, 82], [8, 66, 57, 91, 66, 68, 17, 15, 33, 36, 37, 62, 36, 39, 99, 57, 15, 97, 46, 15, 47, 20, 87, 63, 88, 86, 66, 1, 46, 4, 78, 80, 34, 91, 17, 93]],35,28,),
([[96, 91, 61, 55], [60, 18, 48, 25], [94, 72, 84, 54], [10, 62, 23, 79]],3,2,),
([[68, 61, 12, 7, 49, 65, 57, 32, 57, 95, 64, 17, 77, 59], [38, 7, 47, 21, 69, 36, 79, 82, 23, 27, 76, 37, 43, 52], [37, 95, 8, 88, 57, 73, 4, 52, 75, 99, 7, 55, 78, 23], [45, 1, 5, 89, 89, 71, 96, 27, 86, 75, 49, 30, 91, 78], [90, 64, 33, 88, 19, 95, 21, 5, 74, 90, 65, 86, 8, 53], [96, 14, 83, 29, 23, 39, 48, 68, 97, 68, 97, 60, 19, 66], [92, 85, 40, 36, 18, 94, 53, 75, 6, 72, 63, 98, 1, 87], [31, 50, 24, 38, 46, 2, 24, 76, 34, 76, 45, 59, 90, 90], [65, 98, 95, 65, 4, 82, 85, 58, 1, 68, 69, 73, 3, 10], [39, 44, 93, 64, 97, 19, 21, 52, 70, 73, 19, 85, 83, 96], [49, 48, 54, 77, 37, 82, 64, 93, 13, 76, 14, 4, 14, 57], [67, 85, 12, 23, 33, 66, 19, 41, 19, 2, 30, 95, 84, 7], [35, 38, 97, 53, 61, 25, 80, 94, 77, 49, 86, 6, 12, 71], [39, 32, 7, 19, 13, 24, 26, 48, 79, 47, 13, 2, 48, 7]],13,13,),
([[52, 24, 47, 92, 56, 78, 13, 64, 21, 58], [97, 6, 75, 14, 88, 68, 7, 23, 39, 50], [17, 67, 52, 78, 74, 63, 61, 47, 65, 66], [45, 47, 94, 50, 82, 16, 11, 94, 83, 61], [91, 81, 3, 52, 62, 85, 27, 82, 83, 58], [90, 5, 40, 91, 76, 16, 88, 65, 94, 47], [63, 83, 38, 72, 5, 18, 89, 42, 39, 14], [23, 18, 89, 8, 80, 67, 23, 35, 69, 14], [83, 83, 45, 73, 40, 8, 26, 90, 27, 38], [36, 11, 82, 87, 50, 1, 24, 90, 52, 78]],8,8,),
([[75, 18, 92, 72, 81, 98, 29, 53, 45, 28, 6, 37, 39, 3, 30, 17, 77, 29, 56, 43, 6, 97, 35, 89, 22, 24], [53, 29, 83, 34, 63, 60, 11, 35, 84, 27, 50, 21, 52, 63, 46, 47, 43, 6, 43, 37, 56, 89, 44, 49, 78, 82], [39, 2, 47, 28, 17, 17, 92, 70, 8, 27, 34, 58, 41, 7, 54, 95, 65, 86, 74, 37, 59, 41, 38, 36, 10, 17], [53, 9, 95, 28, 34, 19, 32, 19, 70, 79, 45, 66, 16, 66, 21, 19, 57, 75, 68, 47, 68, 38, 16, 42, 10, 80], [2, 3, 13, 81, 70, 71, 94, 52, 44, 16, 80, 55, 96, 16, 88, 7, 67, 84, 9, 49, 73, 93, 59, 14, 59, 27], [11, 21, 30, 54, 74, 52, 72, 38, 99, 55, 14, 77, 9, 6, 61, 52, 64, 18, 43, 94, 82, 54, 68, 73, 63, 84], [97, 16, 69, 54, 41, 92, 65, 23, 93, 53, 95, 60, 47, 17, 42, 3, 22, 57, 56, 96, 61, 87, 77, 63, 21, 28], [76, 21, 99, 51, 78, 19, 19, 13, 89, 44, 89, 25, 76, 73, 71, 23, 48, 99, 7, 36, 26, 48, 38, 80, 58, 81], [16, 46, 97, 92, 29, 56, 53, 79, 77, 95, 13, 99, 55, 33, 65, 16, 73, 78, 38, 10, 2, 86, 31, 35, 24, 55], [14, 4, 76, 13, 89, 59, 80, 74, 13, 94, 38, 79, 59, 93, 42, 5, 12, 69, 25, 49, 86, 78, 3, 50, 54, 24], [63, 2, 29, 74, 80, 37, 35, 2, 28, 54, 39, 61, 7, 88, 66, 91, 4, 29, 37, 33, 25, 17, 66, 45, 51, 47], [54, 95, 80, 2, 12, 35, 23, 77, 37, 57, 61, 66, 12, 68, 23, 10, 78, 48, 67, 86, 9, 82, 98, 39, 78, 26], [75, 36, 19, 34, 54, 70, 36, 97, 26, 87, 62, 3, 42, 18, 71, 53, 60, 39, 32, 72, 8, 28, 79, 9, 84, 26], [6, 65, 24, 64, 86, 49, 78, 92, 53, 43, 12, 21, 74, 31, 1, 8, 16, 1, 84, 26, 36, 58, 26, 46, 62, 96], [12, 67, 58, 42, 70, 74, 31, 70, 79, 96, 72, 22, 92, 4, 70, 16, 18, 86, 95, 73, 36, 21, 20, 47, 74, 64], [26, 18, 42, 4, 41, 72, 81, 27, 96, 79, 45, 26, 39, 22, 36, 87, 15, 54, 64, 3, 74, 22, 40, 43, 98, 1], [12, 52, 15, 36, 80, 80, 75, 48, 5, 76, 62, 12, 18, 1, 3, 21, 7, 37, 35, 9, 72, 23, 63, 69, 63, 71], [76, 16, 82, 3, 77, 42, 65, 35, 17, 15, 20, 60, 98, 3, 29, 46, 75, 36, 15, 54, 40, 86, 81, 21, 12, 28], [32, 59, 65, 75, 40, 20, 82, 40, 73, 44, 78, 26, 9, 25, 92, 93, 32, 84, 8, 76, 34, 7, 49, 5, 42, 10], [23, 67, 12, 62, 81, 87, 63, 39, 2, 41, 27, 49, 19, 43, 16, 44, 24, 95, 69, 49, 34, 23, 73, 52, 18, 40], [90, 90, 98, 56, 40, 54, 31, 92, 32, 50, 25, 89, 8, 38, 88, 90, 81, 52, 56, 87, 38, 87, 78, 69, 99, 91], [54, 5, 15, 40, 9, 85, 32, 81, 37, 2, 13, 78, 55, 79, 73, 64, 16, 14, 55, 39, 32, 21, 79, 82, 17, 79], [92, 99, 79, 3, 52, 68, 58, 99, 51, 8, 28, 42, 77, 42, 19, 98, 38, 63, 31, 69, 53, 93, 81, 36, 99, 89], [73, 90, 89, 34, 63, 28, 69, 64, 87, 82, 63, 50, 50, 54, 47, 73, 94, 5, 93, 30, 34, 7, 84, 56, 97, 87], [74, 49, 31, 66, 24, 68, 50, 25, 36, 23, 38, 21, 39, 44, 40, 60, 43, 98, 47, 88, 96, 1, 56, 14, 73, 51], [76, 57, 45, 67, 84, 5, 52, 43, 40, 81, 99, 42, 83, 39, 3, 79, 43, 64, 52, 27, 21, 67, 16, 11, 81, 33]],18,15,),
([[45, 38, 43, 11, 2, 77, 3, 59, 58, 22, 6, 65, 13, 43, 52, 15], [69, 16, 25, 44, 58, 94, 54, 33, 96, 27, 86, 41, 25, 86, 66, 95], [59, 30, 24, 88, 58, 3, 79, 72, 44, 79, 74, 38, 88, 50, 67, 63], [77, 66, 59, 16, 29, 18, 24, 81, 6, 78, 40, 14, 23, 20, 86, 90], [54, 62, 50, 48, 35, 34, 91, 85, 64, 72, 50, 41, 27, 83, 70, 30], [78, 37, 23, 81, 90, 53, 11, 37, 80, 30, 45, 86, 9, 7, 6, 14], [75, 66, 60, 75, 3, 95, 96, 17, 49, 70, 85, 94, 90, 17, 48, 13], [8, 50, 36, 13, 18, 84, 71, 19, 77, 3, 97, 76, 35, 1, 9, 5], [7, 7, 26, 74, 17, 90, 16, 84, 96, 49, 25, 45, 33, 65, 73, 19], [85, 24, 39, 8, 23, 16, 31, 84, 43, 16, 92, 73, 2, 72, 69, 58], [7, 72, 1, 48, 82, 42, 84, 66, 11, 35, 70, 72, 80, 47, 71, 46], [92, 19, 1, 42, 4, 55, 31, 93, 38, 92, 22, 87, 40, 35, 10, 58], [28, 30, 44, 35, 39, 15, 99, 79, 2, 52, 67, 96, 41, 34, 68, 88], [41, 84, 68, 59, 71, 64, 79, 76, 52, 26, 16, 25, 89, 11, 39, 97], [76, 74, 93, 51, 9, 19, 66, 31, 38, 44, 41, 77, 61, 85, 72, 60], [18, 97, 93, 70, 18, 8, 55, 92, 63, 45, 19, 53, 78, 37, 76, 32]],11,11,),
([[88, 45, 19, 4, 98, 22, 59, 11, 85, 88, 3, 46, 20, 27, 14, 92, 24, 45, 89, 7, 84, 55, 54, 65, 95, 92, 10, 97, 41], [50, 92, 97, 19, 60, 78, 38, 90, 54, 69, 35, 95, 78, 27, 7, 19, 31, 16, 26, 23, 39, 21, 39, 4, 69, 3, 95, 4, 48], [50, 96, 8, 79, 99, 92, 99, 70, 68, 51, 29, 3, 56, 9, 98, 2, 24, 79, 37, 27, 86, 34, 31, 74, 23, 48, 78, 9, 70], [62, 93, 53, 48, 89, 17, 47, 17, 46, 31, 63, 63, 2, 25, 59, 59, 30, 55, 95, 32, 73, 54, 31, 7, 59, 42, 7, 45, 13], [64, 8, 35, 71, 49, 38, 83, 47, 7, 70, 53, 16, 96, 33, 97, 62, 87, 5, 16, 96, 26, 66, 73, 24, 97, 46, 77, 71, 43], [80, 43, 36, 54, 65, 85, 9, 88, 43, 53, 6, 27, 75, 32, 51, 36, 88, 79, 2, 45, 46, 59, 73, 78, 12, 66, 84, 64, 54], [61, 5, 44, 80, 52, 38, 85, 41, 91, 64, 3, 59, 12, 10, 83, 6, 91, 4, 17, 63, 78, 86, 61, 80, 60, 81, 16, 91, 56], [58, 25, 51, 21, 69, 32, 68, 5, 93, 92, 79, 17, 83, 60, 21, 11, 6, 60, 42, 13, 75, 59, 60, 70, 8, 92, 58, 12, 63], [56, 42, 60, 3, 1, 3, 21, 66, 11, 14, 77, 77, 76, 43, 64, 14, 71, 54, 9, 52, 92, 84, 21, 92, 35, 97, 18, 99, 4], [17, 46, 28, 48, 45, 50, 85, 2, 73, 1, 26, 8, 95, 42, 53, 40, 45, 94, 30, 37, 61, 16, 44, 25, 36, 9, 56, 36, 90], [90, 32, 51, 10, 22, 17, 53, 22, 37, 32, 43, 40, 26, 42, 29, 45, 70, 53, 56, 28, 58, 6, 83, 70, 40, 90, 75, 81, 28], [20, 70, 17, 6, 63, 59, 87, 3, 22, 17, 88, 45, 12, 86, 98, 42, 51, 52, 35, 3, 47, 93, 5, 46, 59, 37, 93, 36, 75], [76, 66, 33, 20, 53, 44, 81, 5, 12, 13, 78, 27, 82, 94, 6, 2, 97, 60, 13, 27, 51, 59, 34, 22, 60, 35, 16, 55, 66], [79, 89, 28, 6, 35, 23, 55, 27, 71, 89, 97, 7, 20, 41, 48, 97, 23, 83, 17, 9, 59, 34, 49, 66, 63, 47, 28, 59, 24], [98, 48, 63, 80, 29, 81, 60, 76, 22, 46, 71, 98, 18, 44, 14, 90, 12, 54, 29, 27, 23, 2, 88, 65, 75, 76, 69, 22, 34], [98, 19, 77, 51, 45, 43, 39, 81, 9, 82, 38, 43, 39, 62, 83, 94, 66, 4, 69, 14, 84, 13, 96, 71, 18, 7, 91, 2, 25], [49, 42, 78, 9, 52, 81, 43, 29, 96, 56, 71, 95, 52, 63, 70, 23, 58, 8, 50, 91, 74, 19, 54, 89, 28, 86, 8, 71, 26], [9, 42, 86, 62, 16, 55, 89, 70, 37, 4, 73, 48, 25, 75, 24, 55, 32, 84, 3, 27, 46, 63, 79, 61, 2, 88, 26, 64, 46], [14, 23, 36, 97, 88, 37, 26, 53, 96, 91, 10, 62, 34, 5, 45, 5, 25, 12, 17, 42, 47, 64, 63, 28, 70, 26, 67, 98, 12], [16, 54, 94, 32, 17, 6, 35, 73, 50, 74, 39, 45, 31, 30, 7, 13, 44, 56, 30, 33, 40, 82, 85, 52, 46, 29, 81, 31, 99], [69, 62, 61, 40, 63, 96, 52, 95, 16, 74, 74, 3, 49, 76, 88, 90, 76, 26, 33, 40, 75, 83, 11, 38, 7, 66, 57, 45, 33], [62, 48, 8, 10, 28, 79, 60, 78, 26, 82, 13, 16, 52, 99, 15, 67, 53, 15, 81, 12, 77, 83, 84, 61, 44, 40, 94, 66, 24], [51, 76, 56, 42, 98, 20, 96, 37, 32, 41, 28, 55, 65, 43, 98, 24, 28, 26, 64, 69, 48, 24, 3, 74, 68, 48, 8, 24, 7], [48, 84, 58, 83, 45, 84, 81, 27, 9, 37, 36, 80, 93, 90, 2, 43, 28, 54, 34, 5, 64, 33, 56, 20, 99, 99, 49, 29, 69], [19, 80, 60, 22, 1, 42, 35, 37, 14, 46, 87, 12, 70, 25, 54, 80, 13, 6, 98, 15, 24, 77, 80, 20, 54, 4, 22, 74, 5], [80, 3, 20, 93, 99, 9, 88, 6, 72, 99, 6, 93, 69, 27, 90, 62, 41, 38, 4, 21, 21, 33, 57, 91, 96, 10, 40, 8, 23], [56, 44, 68, 36, 33, 58, 79, 25, 13, 72, 51, 37, 92, 30, 62, 23, 13, 57, 87, 49, 3, 49, 95, 68, 36, 6, 78, 21, 58], [60, 9, 7, 99, 19, 48, 62, 8, 43, 71, 83, 35, 51, 79, 4, 59, 79, 39, 5, 91, 35, 77, 51, 30, 84, 92, 72, 16, 27], [22, 58, 62, 3, 99, 42, 88, 86, 42, 55, 9, 55, 61, 36, 11, 47, 19, 21, 82, 82, 35, 66, 70, 28, 59, 27, 75, 36, 5]],16,15,),
([[9, 7, 25, 16, 34, 78, 18, 20, 43, 67, 73, 98, 45, 20, 73, 51, 62, 62, 20, 32, 55, 72, 60, 15, 48, 49, 38, 83, 25, 87, 12, 93, 97, 52, 41, 90], [38, 97, 57, 14, 10, 64, 43, 72, 64, 96, 44, 32, 55, 79, 34, 45, 74, 76, 96, 77, 63, 97, 2, 63, 38, 96, 98, 22, 76, 9, 43, 4, 23, 56, 43, 99], [3, 97, 67, 53, 94, 92, 93, 81, 15, 34, 6, 20, 66, 44, 12, 13, 43, 15, 48, 16, 70, 83, 54, 58, 47, 3, 71, 44, 71, 10, 63, 49, 83, 4, 81, 63], [98, 64, 37, 36, 59, 47, 49, 30, 46, 75, 67, 61, 91, 63, 46, 20, 2, 85, 61, 40, 74, 60, 34, 40, 56, 21, 11, 26, 66, 5, 21, 21, 64, 37, 29, 84], [37, 20, 33, 63, 35, 85, 36, 86, 14, 55, 97, 56, 17, 52, 5, 73, 33, 92, 24, 97, 39, 94, 11, 44, 24, 45, 85, 39, 99, 65, 19, 76, 68, 82, 51, 18], [67, 46, 51, 73, 35, 35, 13, 67, 60, 46, 88, 85, 97, 91, 11, 54, 15, 66, 39, 26, 12, 85, 95, 79, 63, 94, 36, 20, 87, 54, 51, 26, 10, 35, 6, 7], [45, 34, 15, 72, 77, 92, 77, 99, 7, 44, 49, 49, 93, 4, 20, 27, 46, 7, 44, 29, 4, 4, 12, 89, 60, 54, 63, 70, 32, 78, 44, 24, 68, 96, 58, 47], [60, 71, 69, 9, 88, 29, 85, 97, 98, 87, 55, 81, 24, 93, 93, 95, 83, 88, 65, 64, 55, 68, 65, 19, 53, 16, 55, 62, 95, 2, 79, 49, 99, 89, 29, 48], [60, 6, 9, 20, 64, 81, 54, 76, 46, 22, 62, 52, 82, 31, 52, 76, 45, 66, 22, 56, 88, 32, 66, 80, 35, 54, 7, 15, 71, 89, 77, 77, 38, 89, 48, 22], [30, 66, 22, 51, 19, 60, 8, 27, 62, 66, 35, 94, 87, 14, 92, 45, 7, 78, 26, 82, 23, 80, 11, 95, 23, 99, 81, 11, 20, 64, 10, 13, 51, 64, 94, 22], [76, 49, 78, 72, 98, 66, 77, 69, 15, 17, 31, 64, 89, 99, 98, 14, 28, 5, 72, 47, 46, 11, 99, 60, 62, 17, 67, 36, 33, 81, 14, 74, 90, 36, 88, 14], [90, 77, 53, 61, 18, 38, 48, 55, 35, 41, 70, 12, 70, 48, 93, 43, 68, 50, 11, 55, 78, 95, 21, 25, 40, 16, 86, 91, 26, 70, 69, 89, 53, 61, 7, 22], [91, 94, 52, 73, 87, 70, 24, 63, 86, 9, 37, 46, 17, 28, 27, 20, 47, 93, 56, 81, 7, 84, 81, 68, 1, 14, 49, 27, 89, 42, 16, 27, 67, 83, 96, 73], [84, 24, 54, 47, 63, 22, 42, 38, 4, 66, 52, 18, 29, 94, 15, 88, 69, 22, 91, 83, 51, 55, 6, 4, 37, 38, 72, 5, 55, 12, 75, 34, 68, 8, 68, 30], [47, 74, 37, 48, 80, 45, 51, 19, 54, 94, 80, 28, 95, 20, 62, 37, 43, 4, 1, 80, 46, 99, 3, 93, 62, 32, 25, 16, 33, 83, 38, 13, 1, 88, 48, 1], [89, 58, 76, 95, 72, 66, 44, 24, 16, 51, 72, 66, 36, 15, 88, 33, 69, 84, 76, 16, 93, 99, 80, 56, 11, 13, 7, 63, 12, 38, 56, 6, 92, 11, 42, 48], [6, 8, 64, 4, 14, 59, 32, 2, 52, 18, 28, 32, 54, 56, 54, 64, 59, 19, 51, 27, 22, 63, 15, 95, 34, 73, 25, 35, 68, 97, 32, 52, 49, 99, 93, 60], [93, 53, 88, 70, 7, 70, 92, 72, 16, 59, 72, 86, 45, 9, 43, 52, 74, 58, 93, 76, 34, 94, 47, 83, 37, 15, 2, 36, 14, 59, 52, 9, 45, 94, 60, 75], [26, 28, 26, 4, 14, 74, 59, 73, 21, 49, 64, 64, 53, 20, 2, 99, 26, 39, 24, 58, 33, 10, 17, 21, 5, 76, 95, 61, 23, 77, 22, 34, 75, 51, 44, 91], [19, 37, 44, 78, 43, 76, 54, 24, 80, 72, 53, 94, 66, 82, 32, 80, 89, 20, 64, 40, 22, 93, 94, 95, 20, 8, 62, 36, 70, 1, 75, 57, 77, 23, 20, 69], [70, 58, 27, 59, 1, 90, 89, 23, 36, 85, 92, 45, 2, 93, 65, 10, 10, 83, 13, 85, 91, 33, 4, 80, 63, 76, 17, 80, 10, 6, 6, 7, 61, 63, 48, 43], [14, 15, 86, 46, 44, 37, 56, 36, 34, 12, 32, 30, 32, 35, 28, 68, 51, 72, 62, 15, 53, 58, 90, 22, 87, 34, 36, 24, 99, 95, 66, 14, 38, 72, 43, 39], [44, 35, 36, 39, 97, 34, 36, 19, 18, 46, 71, 90, 12, 87, 18, 95, 7, 53, 89, 20, 7, 50, 24, 37, 10, 25, 45, 1, 95, 87, 88, 22, 4, 92, 56, 34], [38, 84, 92, 22, 76, 71, 16, 58, 49, 39, 92, 60, 31, 32, 94, 48, 38, 42, 88, 15, 1, 94, 13, 32, 17, 75, 19, 73, 42, 97, 31, 68, 34, 16, 10, 28], [57, 76, 12, 77, 28, 88, 31, 36, 11, 40, 78, 4, 16, 57, 41, 61, 88, 70, 52, 57, 59, 57, 79, 78, 83, 97, 53, 87, 80, 74, 45, 2, 80, 65, 78, 80], [47, 70, 68, 66, 93, 33, 73, 43, 6, 64, 36, 19, 81, 73, 1, 55, 39, 48, 13, 30, 80, 41, 8, 40, 14, 48, 7, 49, 19, 31, 95, 64, 57, 88, 97, 47], [71, 54, 34, 95, 21, 31, 85, 67, 94, 53, 28, 79, 51, 18, 19, 89, 21, 1, 41, 65, 63, 85, 71, 18, 90, 13, 55, 30, 12, 55, 31, 6, 6, 91, 43, 19], [31, 93, 54, 82, 24, 21, 43, 77, 96, 18, 60, 68, 37, 7, 58, 10, 53, 80, 83, 36, 86, 76, 41, 12, 4, 51, 45, 7, 32, 2, 33, 48, 67, 65, 12, 10], [61, 57, 43, 48, 47, 9, 29, 42, 21, 67, 86, 56, 3, 61, 83, 5, 84, 77, 41, 12, 56, 79, 92, 33, 10, 35, 11, 60, 29, 73, 58, 78, 24, 11, 26, 76], [18, 74, 87, 74, 1, 61, 24, 37, 27, 86, 48, 91, 62, 91, 29, 8, 72, 26, 48, 9, 49, 54, 93, 17, 33, 1, 57, 1, 61, 21, 30, 41, 33, 37, 17, 51], [64, 66, 69, 5, 27, 17, 30, 72, 51, 88, 42, 66, 61, 58, 77, 87, 43, 64, 84, 64, 27, 19, 58, 11, 17, 14, 67, 21, 29, 45, 42, 63, 48, 54, 26, 78], [79, 62, 86, 3, 12, 45, 84, 16, 55, 93, 24, 93, 59, 12, 92, 2, 61, 9, 92, 97, 31, 15, 48, 33, 51, 49, 55, 48, 1, 9, 66, 83, 24, 54, 23, 56], [63, 57, 5, 89, 37, 4, 46, 26, 70, 75, 85, 39, 56, 6, 39, 43, 55, 93, 87, 15, 98, 77, 61, 25, 15, 52, 58, 86, 66, 57, 22, 66, 54, 46, 9, 36], [83, 65, 45, 2, 10, 81, 87, 31, 76, 58, 50, 57, 18, 89, 93, 30, 78, 35, 88, 75, 77, 26, 98, 75, 53, 68, 43, 49, 99, 98, 88, 13, 12, 97, 93, 9], [59, 15, 73, 29, 52, 78, 11, 30, 13, 1, 57, 69, 53, 53, 34, 33, 90, 85, 60, 76, 97, 42, 73, 98, 95, 64, 28, 78, 39, 91, 94, 27, 49, 48, 22, 58], [24, 52, 10, 2, 94, 13, 6, 27, 89, 82, 28, 99, 30, 20, 34, 12, 58, 96, 50, 51, 34, 85, 89, 72, 28, 77, 50, 23, 26, 27, 96, 55, 72, 66, 38, 77]],27,25,)
]
for i, p_set in enumerate(param):
param[i] = list(param[i])
param[i][0] = [[e - 50 for e in sorted(l)] for l in p_set[0]]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) | null |
COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S{
static int f_gold ( int arr [ ] , int n ) {
Map < Integer , Integer > um = new HashMap < > ( ) ;
int curr_sum = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
curr_sum += ( arr [ i ] == 0 ) ? - 1 : arr [ i ] ;
um . put ( curr_sum , um . get ( curr_sum ) == null ? 1 : um . get ( curr_sum ) + 1 ) ;
}
int count = 0 ;
for ( Map . Entry < Integer , Integer > itr : um . entrySet ( ) ) {
if ( itr . getValue ( ) > 1 ) count += ( ( itr . getValue ( ) * ( itr . getValue ( ) - 1 ) ) / 2 ) ;
}
if ( um . containsKey ( 0 ) ) count += um . get ( 0 ) ;
return count ;
}
| def f_gold ( arr , n ) :
um = dict ( )
curr_sum = 0
for i in range ( n ) :
curr_sum += ( - 1 if ( arr [ i ] == 0 ) else arr [ i ] )
if um.get ( curr_sum ) :
um [ curr_sum ] += 1
else :
um [ curr_sum ] = 1
count = 0
for itr in um :
if um [ itr ] > 1 :
count += ( ( um [ itr ] * int ( um [ itr ] - 1 ) ) / 2 )
if um.get ( 0 ) :
count += um [ 0 ]
return int ( count )
|
using namespace std;
int f_gold ( int arr [ ], int n ) {
unordered_map < int, int > um;
int curr_sum = 0;
for ( int i = 0;
i < n;
i ++ ) {
curr_sum += ( arr [ i ] == 0 ) ? - 1 : arr [ i ];
um [ curr_sum ] ++;
}
int count = 0;
for ( auto itr = um . begin ( );
itr != um . end ( );
itr ++ ) {
if ( itr -> second > 1 ) count += ( ( itr -> second * ( itr -> second - 1 ) ) / 2 );
}
if ( um . find ( 0 ) != um . end ( ) ) count += um [ 0 ];
return count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,12,18,19,19,20,20,21,25,29,38,54,54,71,72,72,74,75,77,78,80,80,81,84,97,97});
param0.add(new int[]{10,70,24,-38,32,-68,88,-28,-24,-70,-64,50,-30,64,54,-6,18,-30,-30,-62,-10,94,-54,-22,-88,96,22,26,-92,-40,-76,46,36,30,24,-52,0});
param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1});
param0.add(new int[]{66,50,17,15,86,84,87,24,81,23,71,31,13,72,58,19,29,28,40,14,48,48,81,4,52,88,54,56,10,12,58,55,7,66,15,73,22,2,20,27,57,56,56,31,9,55});
param0.add(new int[]{-98,-62,-60,16,78,82});
param0.add(new int[]{1,0,1});
param0.add(new int[]{2,31,34,64});
param0.add(new int[]{-70,90,-10,-64,-76,-74,-12,-44,-48,-54,76,-78,8,0,0,78,-28,6,98,-84,60,60,2,48,-96,-28,-78,-76,-56,-26,-60,50,44,34,-90,80,-30,-98,62,36,-46,-72});
param0.add(new int[]{1,1,1});
param0.add(new int[]{37,70,80,61,86,10,17,98,54,89,87,84,11,55,3,52,4,90,98,31,20,62,71,58,58,6,92,5,99,99,72,40,82,54,23,19,85,91,62,98,62,72,93,74});
List<Integer> param1 = new ArrayList<>();
param1.add(24);
param1.add(24);
param1.add(11);
param1.add(40);
param1.add(5);
param1.add(2);
param1.add(2);
param1.add(25);
param1.add(1);
param1.add(27);
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());
}
} |
if __name__ == '__main__':
param = [
([2, 12, 18, 19, 19, 20, 20, 21, 25, 29, 38, 54, 54, 71, 72, 72, 74, 75, 77, 78, 80, 80, 81, 84, 97, 97],24,),
([10, 70, 24, -38, 32, -68, 88, -28, -24, -70, -64, 50, -30, 64, 54, -6, 18, -30, -30, -62, -10, 94, -54, -22, -88, 96, 22, 26, -92, -40, -76, 46, 36, 30, 24, -52, 0],24,),
([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],11,),
([66, 50, 17, 15, 86, 84, 87, 24, 81, 23, 71, 31, 13, 72, 58, 19, 29, 28, 40, 14, 48, 48, 81, 4, 52, 88, 54, 56, 10, 12, 58, 55, 7, 66, 15, 73, 22, 2, 20, 27, 57, 56, 56, 31, 9, 55],40,),
([-98, -62, -60, 16, 78, 82],5,),
([1, 0, 1],2,),
([2, 31, 34, 64],2,),
([-70, 90, -10, -64, -76, -74, -12, -44, -48, -54, 76, -78, 8, 0, 0, 78, -28, 6, 98, -84, 60, 60, 2, 48, -96, -28, -78, -76, -56, -26, -60, 50, 44, 34, -90, 80, -30, -98, 62, 36, -46, -72],25,),
([1, 1, 1],1,),
([37, 70, 80, 61, 86, 10, 17, 98, 54, 89, 87, 84, 11, 55, 3, 52, 4, 90, 98, 31, 20, 62, 71, 58, 58, 6, 92, 5, 99, 99, 72, 40, 82, 54, 23, 19, 85, 91, 62, 98, 62, 72, 93, 74],27,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{2,12,18,19,19,20,20,21,25,29,38,54,54,71,72,72,74,75,77,78,80,80,81,84,97,97},{10,70,24,-38,32,-68,88,-28,-24,-70,-64,50,-30,64,54,-6,18,-30,-30,-62,-10,94,-54,-22,-88,96,22,26,-92,-40,-76,46,36,30,24,-52,0},{0,0,0,0,0,0,0,0,1,1,1,1,1,1},{66,50,17,15,86,84,87,24,81,23,71,31,13,72,58,19,29,28,40,14,48,48,81,4,52,88,54,56,10,12,58,55,7,66,15,73,22,2,20,27,57,56,56,31,9,55},{-98,-62,-60,16,78,82},{1,0,1},{2,31,34,64},{-70,90,-10,-64,-76,-74,-12,-44,-48,-54,76,-78,8,0,0,78,-28,6,98,-84,60,60,2,48,-96,-28,-78,-76,-56,-26,-60,50,44,34,-90,80,-30,-98,62,36,-46,-72},{1,1,1},{37,70,80,61,86,10,17,98,54,89,87,84,11,55,3,52,4,90,98,31,20,62,71,58,58,6,92,5,99,99,72,40,82,54,23,19,85,91,62,98,62,72,93,74}};
vector<int> param1 {24,24,11,40,5,2,2,25,1,27};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME{
static int f_gold ( int n ) {
if ( n <= 1 ) return n ;
int a = 0 , b = 1 , c = 1 ;
int res = 1 ;
while ( c < n ) {
c = a + b ;
res ++ ;
a = b ;
b = c ;
}
return res ;
}
| def f_gold ( n ) :
if ( n <= 1 ) :
return n
a = 0
b = 1
c = 1
res = 1
while ( c < n ) :
c = a + b
res = res + 1
a = b
b = c
return res
|
using namespace std;
int f_gold ( int n ) {
if ( n <= 1 ) return n;
int a = 0, b = 1, c = 1;
int res = 1;
while ( c < n ) {
c = a + b;
res ++;
a = b;
b = c;
}
return res;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(5);
param0.add(19);
param0.add(7);
param0.add(94);
param0.add(58);
param0.add(65);
param0.add(69);
param0.add(96);
param0.add(80);
param0.add(14);
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());
}
} |
if __name__ == '__main__':
param = [
(5,),
(19,),
(7,),
(94,),
(58,),
(65,),
(69,),
(96,),
(80,),
(14,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {5,19,7,94,58,65,69,96,80,14};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
POSITIVE_ELEMENTS_EVEN_NEGATIVE_ODD_POSITIONS |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
class POSITIVE_ELEMENTS_EVEN_NEGATIVE_ODD_POSITIONS{
static void f_gold ( int a [ ] , int size ) {
int positive = 0 , negative = 1 , temp ;
while ( true ) {
while ( positive < size && a [ positive ] >= 0 ) positive += 2 ;
while ( negative < size && a [ negative ] <= 0 ) negative += 2 ;
if ( positive < size && negative < size ) {
temp = a [ positive ] ;
a [ positive ] = a [ negative ] ;
a [ negative ] = temp ;
}
else break ;
}
}
| def f_gold ( a , size ) :
positive = 0
negative = 1
while ( True ) :
while ( positive < size and a [ positive ] >= 0 ) :
positive = positive + 2
while ( negative < size and a [ negative ] <= 0 ) :
negative = negative + 2
if ( positive < size and negative < size ) :
temp = a [ positive ]
a [ positive ] = a [ negative ]
a [ negative ] = temp
else :
break
|
using namespace std;
void f_gold ( int a [ ], int size ) {
int positive = 0, negative = 1;
while ( true ) {
while ( positive < size && a [ positive ] >= 0 ) positive += 2;
while ( negative < size && a [ negative ] <= 0 ) negative += 2;
if ( positive < size && negative < size ) swap ( a [ positive ], a [ negative ] );
else break;
}
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93});
param0.add(new int[]{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97});
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});
param0.add(new int[]{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94});
param0.add(new int[]{-98,-94,-7,-3,1,11,11,83,88});
param0.add(new int[]{0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0});
param0.add(new int[]{8,35,37,38,39,46,49,54});
param0.add(new int[]{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54});
param0.add(new int[]{0,0,0,0,0,0,0,0,1,1});
param0.add(new int[]{62,36,39,53,90,78,56,1,56,4,30});
List<Integer> param1 = new ArrayList<>();
param1.add(15);
param1.add(15);
param1.add(40);
param1.add(10);
param1.add(7);
param1.add(35);
param1.add(6);
param1.add(21);
param1.add(5);
param1.add(8);
List<int [ ]> filled_function_param0 = new ArrayList<>();
filled_function_param0.add(new int[]{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93});
filled_function_param0.add(new int[]{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97});
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,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[]{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94});
filled_function_param0.add(new int[]{-98,-94,-7,-3,1,11,11,83,88});
filled_function_param0.add(new int[]{0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0});
filled_function_param0.add(new int[]{8,35,37,38,39,46,49,54});
filled_function_param0.add(new int[]{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54});
filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,1,1});
filled_function_param0.add(new int[]{62,36,39,53,90,78,56,1,56,4,30});
List<Integer> filled_function_param1 = new ArrayList<>();
filled_function_param1.add(15);
filled_function_param1.add(15);
filled_function_param1.add(40);
filled_function_param1.add(10);
filled_function_param1.add(7);
filled_function_param1.add(35);
filled_function_param1.add(6);
filled_function_param1.add(21);
filled_function_param1.add(5);
filled_function_param1.add(8);
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());
}
} |
if __name__ == '__main__':
param = [
([8, 11, 18, 23, 24, 28, 28, 34, 35, 42, 44, 53, 57, 65, 71, 72, 76, 78, 82, 82, 85, 86, 92, 93],15,),
([0, -95, -51, -2, -70, -28, 3, -37, 75, -74, 85, -63, -93, 27, 68, -8, 67, 90, 3, -47, 32, 8, 12, 53, -93, 56, 97],15,),
([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],40,),
([28, 85, 78, 33, 10, 83, 30, 22, 3, 82, 75, 48, 2, 76, 54, 6, 40, 93, 94],10,),
([-98, -94, -7, -3, 1, 11, 11, 83, 88],7,),
([0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0],35,),
([8, 35, 37, 38, 39, 46, 49, 54],6,),
([-60, -66, -4, -21, 27, -83, 61, 75, 10, -48, 18, -91, -67, 88, 13, 49, 86, -15, 97, -90, -94, 15, 21, 41, -35, -80, -43, -54],21,),
([0, 0, 0, 0, 0, 0, 0, 0, 1, 1],5,),
([62, 36, 39, 53, 90, 78, 56, 1, 56, 4, 30],8,)
]
filled_function_param = [
([8, 11, 18, 23, 24, 28, 28, 34, 35, 42, 44, 53, 57, 65, 71, 72, 76, 78, 82, 82, 85, 86, 92, 93],15,),
([0, -95, -51, -2, -70, -28, 3, -37, 75, -74, 85, -63, -93, 27, 68, -8, 67, 90, 3, -47, 32, 8, 12, 53, -93, 56, 97],15,),
([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],40,),
([28, 85, 78, 33, 10, 83, 30, 22, 3, 82, 75, 48, 2, 76, 54, 6, 40, 93, 94],10,),
([-98, -94, -7, -3, 1, 11, 11, 83, 88],7,),
([0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0],35,),
([8, 35, 37, 38, 39, 46, 49, 54],6,),
([-60, -66, -4, -21, 27, -83, 61, 75, 10, -48, 18, -91, -67, 88, 13, 49, 86, -15, 97, -90, -94, 15, 21, 41, -35, -80, -43, -54],21,),
([0, 0, 0, 0, 0, 0, 0, 0, 1, 1],5,),
([62, 36, 39, 53, 90, 78, 56, 1, 56, 4, 30],8,)
]
n_success = 0
for i, parameters_set in enumerate(param):
f_filled(*(filled_function_param[i]))
f_gold(*parameters_set)
if parameters_set == filled_function_param[i]:
n_success+=1
print("#Results: %i, %i" % (n_success, len(param)))
|
int main() {
int n_success = 0;
vector<vector<int>> param0 {{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93},{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97},{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},{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94},{-98,-94,-7,-3,1,11,11,83,88},{0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0},{8,35,37,38,39,46,49,54},{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54},{0,0,0,0,0,0,0,0,1,1},{62,36,39,53,90,78,56,1,56,4,30}};
vector<int> param1 {15,15,40,10,7,35,6,21,5,8};
vector<vector<int>> filled_function_param0 {{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93},{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97},{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},{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94},{-98,-94,-7,-3,1,11,11,83,88},{0,0,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0},{8,35,37,38,39,46,49,54},{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54},{0,0,0,0,0,0,0,0,1,1},{62,36,39,53,90,78,56,1,56,4,30}};
vector<int> filled_function_param1 {15,15,40,10,7,35,6,21,5,8};
for(int i = 0; i < param0.size(); ++i)
{
f_filled(&filled_function_param0[i].front(),filled_function_param1[i]);
f_gold(¶m0[i].front(),param1[i]);
if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i])
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING{
static int f_gold ( String s ) {
int n = s . length ( ) ;
int [ ] auxArr = new int [ n ] ;
if ( s . charAt ( 0 ) == '1' ) auxArr [ 0 ] = 1 ;
for ( int i = 1 ;
i < n ;
i ++ ) {
if ( s . charAt ( i ) == '1' ) auxArr [ i ] = auxArr [ i - 1 ] + 1 ;
else auxArr [ i ] = auxArr [ i - 1 ] ;
}
int count = 0 ;
for ( int i = n - 1 ;
i >= 0 ;
i -- ) if ( s . charAt ( i ) == '1' ) count += auxArr [ i ] ;
return count ;
}
| def f_gold ( s ) :
n = len ( s )
auxArr = [ 0 for i in range ( n ) ]
if ( s [ 0 ] == '1' ) :
auxArr [ 0 ] = 1
for i in range ( 0 , n ) :
if ( s [ i ] == '1' ) :
auxArr [ i ] = auxArr [ i - 1 ] + 1
else :
auxArr [ i ] = auxArr [ i - 1 ]
count = 0
for i in range ( n - 1 , - 1 , - 1 ) :
if ( s [ i ] == '1' ) :
count += auxArr [ i ]
return count
|
using namespace std;
int f_gold ( string s ) {
int n = s . length ( );
int auxArr [ n ] = {
0 };
if ( s [ 0 ] == '1' ) auxArr [ 0 ] = 1;
for ( int i = 1;
i < n;
i ++ ) {
if ( s [ i ] == '1' ) auxArr [ i ] = auxArr [ i - 1 ] + 1;
else auxArr [ i ] = auxArr [ i - 1 ];
}
int count = 0;
for ( int i = n - 1;
i >= 0;
i -- ) if ( s [ i ] == '1' ) count += auxArr [ i ];
return count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<String> param0 = new ArrayList<>();
param0.add("OGiOkJF");
param0.add("517376");
param0.add("11");
param0.add("Ze");
param0.add("8763644247018");
param0.add("00111010001");
param0.add("HGwkBKUOVu");
param0.add("652");
param0.add("101000011110");
param0.add("kvdpG ");
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());
}
} |
if __name__ == '__main__':
param = [
('OGiOkJF',),
('517376',),
('11',),
('Ze',),
('8763644247018',),
('00111010001',),
('HGwkBKUOVu',),
('652',),
('101000011110',),
('kvdpG ',)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<string> param0 {"OGiOkJF","517376","11","Ze","8763644247018","00111010001","HGwkBKUOVu","652","101000011110","kvdpG "};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
EVEN_FIBONACCI_NUMBERS_SUM |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class EVEN_FIBONACCI_NUMBERS_SUM{
static int f_gold ( int limit ) {
if ( limit < 2 ) return 0 ;
long ef1 = 0 , ef2 = 2 ;
long sum = ef1 + ef2 ;
while ( ef2 <= limit ) {
long ef3 = 4 * ef2 + ef1 ;
if ( ef3 > limit ) break ;
ef1 = ef2 ;
ef2 = ef3 ;
sum += ef2 ;
}
return ( int ) sum ;
}
| def f_gold ( limit ) :
if ( limit < 2 ) :
return 0
ef1 = 0
ef2 = 2
sm = ef1 + ef2
while ( ef2 <= limit ) :
ef3 = 4 * ef2 + ef1
if ( ef3 > limit ) :
break
ef1 = ef2
ef2 = ef3
sm = sm + ef2
return sm
|
using namespace std;
int f_gold ( int limit ) {
if ( limit < 2 ) return 0;
long long int ef1 = 0, ef2 = 2;
long long int sum = ef1 + ef2;
while ( ef2 <= limit ) {
long long int ef3 = 4 * ef2 + ef1;
if ( ef3 > limit ) break;
ef1 = ef2;
ef2 = ef3;
sum += ef2;
}
return sum;
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(67);
param0.add(89);
param0.add(12);
param0.add(94);
param0.add(96);
param0.add(25);
param0.add(49);
param0.add(8);
param0.add(33);
param0.add(59);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i)) == f_gold(param0.get(i)))
{
n_success+=1;
}
}
System.out.println("#Results:" + n_success + ", " + param0.size());
}
} |
if __name__ == '__main__':
param = [
(67,),
(89,),
(12,),
(94,),
(96,),
(25,),
(49,),
(8,),
(33,),
(59,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {67,89,12,94,96,25,49,8,33,59};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED{
static boolean f_gold ( int arr [ ] , int n ) {
int max = Integer . MIN_VALUE ;
int min = Integer . MAX_VALUE ;
for ( int i = 0 ;
i < n ;
i ++ ) {
max = Math . max ( max , arr [ i ] ) ;
min = Math . min ( min , arr [ i ] ) ;
}
int m = max - min + 1 ;
if ( m > n ) return false ;
boolean visited [ ] = new boolean [ n ] ;
for ( int i = 0 ;
i < n ;
i ++ ) visited [ arr [ i ] - min ] = true ;
for ( int i = 0 ;
i < m ;
i ++ ) if ( visited [ i ] == false ) return false ;
return true ;
}
| def f_gold ( arr , n ) :
max1 = max ( arr )
min1 = min ( arr )
m = max1 - min1 + 1
if ( m > n ) :
return False
visited = [ 0 ] * m
for i in range ( 0 , n ) :
visited [ arr [ i ] - min1 ] = True
for i in range ( 0 , m ) :
if ( visited [ i ] == False ) :
return False
return True
|
using namespace std;
bool f_gold ( int arr [ ], int n ) {
int max = * max_element ( arr, arr + n );
int min = * min_element ( arr, arr + n );
int m = max - min + 1;
if ( m > n ) return false;
bool visited [ m ];
memset ( visited, false, sizeof ( visited ) );
for ( int i = 0;
i < n;
i ++ ) visited [ arr [ i ] - min ] = true;
for ( int i = 0;
i < m;
i ++ ) if ( visited [ i ] == false ) return false;
return true;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{2,4,19,25,65,72,75,83,90,92});
param0.add(new int[]{46,2,28,-44,74,-36,-8,30,-96,60,52,-58,16,-38,78,38,-28,16,26,-42,48,40,6,72});
param0.add(new int[]{0,1,1,1});
param0.add(new int[]{50,21,9,29,86,2,82,49,34,18,77,83,44,67,85,58,15,85,22,3,39,67,42,37,6,35,18,57,41,32,39,30,41,68,84,36,64,36});
param0.add(new int[]{-92,-82,-80,-78,-66,-66,-62,-58,-54,-52,-48,-30,-26,-22,-20,-20,-18,-14,-2,12,20,24,26,26,28,28,32,36,42,48,50,52,56,64,70,72,72,80,82,84,86,92});
param0.add(new int[]{1,0,0,1,0,0,1,0,0,1,1,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,0,0,1,0,1,0,0,0,0});
param0.add(new int[]{18,19,21,23,30,33,38,40,45,56,63,68,93,96});
param0.add(new int[]{20,-90,-42,48,18,-46,82,-12,-88,82,62,24,20,64,-68,-34,-38,8,-54,-20,-92,34,-90,78,18,8,-6,10,98,-24,72,-92,76,-22,12,-44,2,68,-72,42,34,20,-48});
param0.add(new int[]{0,0,0,0,0,1,1,1,1});
param0.add(new int[]{81,25,50,48,35,38,49,21,47,94,94,55,23,45,92,23,93,33,64,9,90,64,81,17,2,73,8,7,35,36,72});
List<Integer> param1 = new ArrayList<>();
param1.add(8);
param1.add(14);
param1.add(2);
param1.add(23);
param1.add(26);
param1.add(43);
param1.add(8);
param1.add(34);
param1.add(8);
param1.add(27);
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());
}
} |
if __name__ == '__main__':
param = [
([2, 4, 19, 25, 65, 72, 75, 83, 90, 92],8,),
([46, 2, 28, -44, 74, -36, -8, 30, -96, 60, 52, -58, 16, -38, 78, 38, -28, 16, 26, -42, 48, 40, 6, 72],14,),
([0, 1, 1, 1],2,),
([50, 21, 9, 29, 86, 2, 82, 49, 34, 18, 77, 83, 44, 67, 85, 58, 15, 85, 22, 3, 39, 67, 42, 37, 6, 35, 18, 57, 41, 32, 39, 30, 41, 68, 84, 36, 64, 36],23,),
([-92, -82, -80, -78, -66, -66, -62, -58, -54, -52, -48, -30, -26, -22, -20, -20, -18, -14, -2, 12, 20, 24, 26, 26, 28, 28, 32, 36, 42, 48, 50, 52, 56, 64, 70, 72, 72, 80, 82, 84, 86, 92],26,),
([1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0],43,),
([18, 19, 21, 23, 30, 33, 38, 40, 45, 56, 63, 68, 93, 96],8,),
([20, -90, -42, 48, 18, -46, 82, -12, -88, 82, 62, 24, 20, 64, -68, -34, -38, 8, -54, -20, -92, 34, -90, 78, 18, 8, -6, 10, 98, -24, 72, -92, 76, -22, 12, -44, 2, 68, -72, 42, 34, 20, -48],34,),
([0, 0, 0, 0, 0, 1, 1, 1, 1],8,),
([81, 25, 50, 48, 35, 38, 49, 21, 47, 94, 94, 55, 23, 45, 92, 23, 93, 33, 64, 9, 90, 64, 81, 17, 2, 73, 8, 7, 35, 36, 72],27,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{2,4,19,25,65,72,75,83,90,92},{46,2,28,-44,74,-36,-8,30,-96,60,52,-58,16,-38,78,38,-28,16,26,-42,48,40,6,72},{0,1,1,1},{50,21,9,29,86,2,82,49,34,18,77,83,44,67,85,58,15,85,22,3,39,67,42,37,6,35,18,57,41,32,39,30,41,68,84,36,64,36},{-92,-82,-80,-78,-66,-66,-62,-58,-54,-52,-48,-30,-26,-22,-20,-20,-18,-14,-2,12,20,24,26,26,28,28,32,36,42,48,50,52,56,64,70,72,72,80,82,84,86,92},{1,0,0,1,0,0,1,0,0,1,1,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,1,0,0,1,0,1,0,0,0,0},{18,19,21,23,30,33,38,40,45,56,63,68,93,96},{20,-90,-42,48,18,-46,82,-12,-88,82,62,24,20,64,-68,-34,-38,8,-54,-20,-92,34,-90,78,18,8,-6,10,98,-24,72,-92,76,-22,12,-44,2,68,-72,42,34,20,-48},{0,0,0,0,0,1,1,1,1},{81,25,50,48,35,38,49,21,47,94,94,55,23,45,92,23,93,33,64,9,90,64,81,17,2,73,8,7,35,36,72}};
vector<int> param1 {8,14,2,23,26,43,8,34,8,27};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING{
static int f_gold ( int arr [ ] , int n , int x ) {
for ( int i = 0 ;
i < n ;
i ++ ) {
if ( arr [ i ] == x ) return i ;
}
return - 1 ;
}
| null |
using namespace std;
int f_gold ( int arr [ ], int n, int x ) {
for ( int i = 0;
i < n;
i ++ ) {
if ( arr [ i ] == x ) return i;
}
return - 1;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{3,15,15,15,16,17,23,23,33,33,40,43,55,56,63,66,69,76,79,88,99});
param0.add(new int[]{78,-64,-20,12,96,54,16,50,-20,96,-22,-84,54,-66,-16,-78,-78,90,-46,-70,-72,12,96,-86,42,-80,8,-2,70,4,70});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{73,60,4,59,75,39,39,30,66,11,90,80,46,59,52,14,63,70,75,73,65,88,45,64,66,91,67,25,60,74,33,23,94,76,60,78,72});
param0.add(new int[]{-92,-88,-68,-64,-62,-56,-50,-48,-48,-38,-18,-16,-14,-8,-8,2,4,10,10,10,36,38,46,50,52,62,72,74,80,84,86,90,92,94,96});
param0.add(new int[]{1,0,0,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,0,0,1,1,0,1,0,0});
param0.add(new int[]{7,8,8,10,13,18,18,19,20,25,32,33,34,38,44,44,46,46,46,47,48,50,53,56,56,57,57,57,57,59,60,61,63,63,64,70,71,74,74,81,82,83,84,90,92,93});
param0.add(new int[]{-82,74,-94,68,-10,-8,-46,-4,50,-60,-70,-74,-18,50,62,-76,-50,-58,-36,-16,-36,78,12,56,-14,-48,40,22,0,16,72,-78,46,8,-50,-78,28,20,-56});
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[]{88,89,66,28,75,81,29,26,21,39,58,94,48,85});
List<Integer> param1 = new ArrayList<>();
param1.add(20);
param1.add(17);
param1.add(12);
param1.add(20);
param1.add(33);
param1.add(33);
param1.add(41);
param1.add(26);
param1.add(16);
param1.add(9);
List<Integer> param2 = new ArrayList<>();
param2.add(15);
param2.add(29);
param2.add(17);
param2.add(28);
param2.add(20);
param2.add(26);
param2.add(44);
param2.add(31);
param2.add(18);
param2.add(10);
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());
}
} | null |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{3,15,15,15,16,17,23,23,33,33,40,43,55,56,63,66,69,76,79,88,99},{78,-64,-20,12,96,54,16,50,-20,96,-22,-84,54,-66,-16,-78,-78,90,-46,-70,-72,12,96,-86,42,-80,8,-2,70,4,70},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{73,60,4,59,75,39,39,30,66,11,90,80,46,59,52,14,63,70,75,73,65,88,45,64,66,91,67,25,60,74,33,23,94,76,60,78,72},{-92,-88,-68,-64,-62,-56,-50,-48,-48,-38,-18,-16,-14,-8,-8,2,4,10,10,10,36,38,46,50,52,62,72,74,80,84,86,90,92,94,96},{1,0,0,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,0,0,1,1,0,1,0,0},{7,8,8,10,13,18,18,19,20,25,32,33,34,38,44,44,46,46,46,47,48,50,53,56,56,57,57,57,57,59,60,61,63,63,64,70,71,74,74,81,82,83,84,90,92,93},{-82,74,-94,68,-10,-8,-46,-4,50,-60,-70,-74,-18,50,62,-76,-50,-58,-36,-16,-36,78,12,56,-14,-48,40,22,0,16,72,-78,46,8,-50,-78,28,20,-56},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{88,89,66,28,75,81,29,26,21,39,58,94,48,85}};
vector<int> param1 {20,17,12,20,33,33,41,26,16,9};
vector<int> param2 {15,29,17,28,20,26,44,31,18,10};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_2 |
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_2{
static int f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n , int x ) {
int count = 0 ;
int l = 0 , r = n - 1 ;
while ( l < m && r >= 0 ) {
if ( ( arr1 [ l ] + arr2 [ r ] ) == x ) {
l ++ ;
r -- ;
count ++ ;
}
else if ( ( arr1 [ l ] + arr2 [ r ] ) < x ) l ++ ;
else r -- ;
}
return count ;
}
| def f_gold ( arr1 , arr2 , m , n , x ) :
count , l , r = 0 , 0 , n - 1
while ( l < m and r >= 0 ) :
if ( ( arr1 [ l ] + arr2 [ r ] ) == x ) :
l += 1
r -= 1
count += 1
elif ( ( arr1 [ l ] + arr2 [ r ] ) < x ) :
l += 1
else :
r -= 1
return count
|
using namespace std;
int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) {
int count = 0;
int l = 0, r = n - 1;
while ( l < m && r >= 0 ) {
if ( ( arr1 [ l ] + arr2 [ r ] ) == x ) {
l ++;
r --;
count ++;
}
else if ( ( arr1 [ l ] + arr2 [ r ] ) < x ) l ++;
else r --;
}
return count;
}
|
public static void main(String args[]) {
int n_success = 0;
List<int [ ]> param0 = new ArrayList<>();
param0.add(new int[]{5,5,7,10,14,14,17,21,32,34,37,40,40,40,46,46,50,50,51,55,57,62,65,67,67,69,70,70,72,73,76,77,77,78,84,85,85,86,87,88,88,89,89,90,93,99});
param0.add(new int[]{-84,52,-34,96,16,92,-64,-74});
param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param0.add(new int[]{60,92,42,83,55,76,29,62});
param0.add(new int[]{-94,-94,-58,-40,-40,-26,-24,-22,-22,-22,-2,0,4,8,12,16,16,18,22,32,42,44,50,58,64,78,80,90});
param0.add(new int[]{0,0,1,1,1,0,0,1,1,1});
param0.add(new int[]{1,5,7,7,7,14,15,16,17,18,18,19,20,25,27,31,36,42,47,51,56,56,56,58,58,59,63,63,63,65,66,67,76,83,93,94,97});
param0.add(new int[]{78,-74,52,56,-8,92,14,56,-72,-92,32,-94,-26,-8,-66,72,-24,36,-84,-4,-68,14,78,40,-82,-10,16,56,6,-16,30,24,-32});
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});
param0.add(new int[]{17,50,65,4,19,10,45,70,76,81,28,97,55,70,38,2,40,67,36,33,6,85,25});
List<int [ ]> param1 = new ArrayList<>();
param1.add(new int[]{2,5,8,8,10,12,13,15,17,18,20,20,21,27,28,31,34,37,40,46,48,52,53,54,54,58,59,60,66,68,68,69,70,71,72,73,77,77,80,84,84,92,92,95,97,97});
param1.add(new int[]{-22,26,-12,-54,66,86,38,76});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,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[]{71,2,74,42,80,71,26,76});
param1.add(new int[]{-86,-84,-78,-76,-72,-70,-62,-58,-54,-54,-50,-46,-44,-40,-30,-28,-16,-10,10,36,36,48,70,84,84,90,94,98});
param1.add(new int[]{1,1,1,0,1,1,0,0,0,0});
param1.add(new int[]{2,3,7,8,9,10,17,18,21,28,29,29,33,35,46,47,47,49,49,49,53,56,58,59,59,60,65,67,70,78,81,85,85,87,90,92,96});
param1.add(new int[]{-74,22,-14,-2,36,86,-70,-20,-76,-84,-40,-36,42,22,-60,-94,-18,8,-14,-42,-68,62,-60,2,40,-66,68,96,70,98,-38,-74,-92});
param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1});
param1.add(new int[]{78,92,65,23,7,94,18,4,2,53,31,58,98,18,46,16,17,92,80,92,43,70,50});
List<Integer> param2 = new ArrayList<>();
param2.add(28);
param2.add(6);
param2.add(37);
param2.add(4);
param2.add(17);
param2.add(5);
param2.add(28);
param2.add(16);
param2.add(25);
param2.add(16);
List<Integer> param3 = new ArrayList<>();
param3.add(29);
param3.add(5);
param3.add(26);
param3.add(7);
param3.add(27);
param3.add(8);
param3.add(34);
param3.add(30);
param3.add(33);
param3.add(22);
List<Integer> param4 = new ArrayList<>();
param4.add(23);
param4.add(7);
param4.add(42);
param4.add(7);
param4.add(17);
param4.add(9);
param4.add(31);
param4.add(24);
param4.add(33);
param4.add(22);
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),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());
}
} |
if __name__ == '__main__':
param = [
([5, 5, 7, 10, 14, 14, 17, 21, 32, 34, 37, 40, 40, 40, 46, 46, 50, 50, 51, 55, 57, 62, 65, 67, 67, 69, 70, 70, 72, 73, 76, 77, 77, 78, 84, 85, 85, 86, 87, 88, 88, 89, 89, 90, 93, 99],[2, 5, 8, 8, 10, 12, 13, 15, 17, 18, 20, 20, 21, 27, 28, 31, 34, 37, 40, 46, 48, 52, 53, 54, 54, 58, 59, 60, 66, 68, 68, 69, 70, 71, 72, 73, 77, 77, 80, 84, 84, 92, 92, 95, 97, 97],28,29,23,),
([-84, 52, -34, 96, 16, 92, -64, -74],[-22, 26, -12, -54, 66, 86, 38, 76],6,5,7,),
([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],[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, 1, 1, 1],37,26,42,),
([60, 92, 42, 83, 55, 76, 29, 62],[71, 2, 74, 42, 80, 71, 26, 76],4,7,7,),
([-94, -94, -58, -40, -40, -26, -24, -22, -22, -22, -2, 0, 4, 8, 12, 16, 16, 18, 22, 32, 42, 44, 50, 58, 64, 78, 80, 90],[-86, -84, -78, -76, -72, -70, -62, -58, -54, -54, -50, -46, -44, -40, -30, -28, -16, -10, 10, 36, 36, 48, 70, 84, 84, 90, 94, 98],17,27,17,),
([0, 0, 1, 1, 1, 0, 0, 1, 1, 1],[1, 1, 1, 0, 1, 1, 0, 0, 0, 0],5,8,9,),
([1, 5, 7, 7, 7, 14, 15, 16, 17, 18, 18, 19, 20, 25, 27, 31, 36, 42, 47, 51, 56, 56, 56, 58, 58, 59, 63, 63, 63, 65, 66, 67, 76, 83, 93, 94, 97],[2, 3, 7, 8, 9, 10, 17, 18, 21, 28, 29, 29, 33, 35, 46, 47, 47, 49, 49, 49, 53, 56, 58, 59, 59, 60, 65, 67, 70, 78, 81, 85, 85, 87, 90, 92, 96],28,34,31,),
([78, -74, 52, 56, -8, 92, 14, 56, -72, -92, 32, -94, -26, -8, -66, 72, -24, 36, -84, -4, -68, 14, 78, 40, -82, -10, 16, 56, 6, -16, 30, 24, -32],[-74, 22, -14, -2, 36, 86, -70, -20, -76, -84, -40, -36, 42, 22, -60, -94, -18, 8, -14, -42, -68, 62, -60, 2, 40, -66, 68, 96, 70, 98, -38, -74, -92],16,30,24,),
([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],[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],25,33,33,),
([17, 50, 65, 4, 19, 10, 45, 70, 76, 81, 28, 97, 55, 70, 38, 2, 40, 67, 36, 33, 6, 85, 25],[78, 92, 65, 23, 7, 94, 18, 4, 2, 53, 31, 58, 98, 18, 46, 16, 17, 92, 80, 92, 43, 70, 50],16,22,22,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<vector<int>> param0 {{5,5,7,10,14,14,17,21,32,34,37,40,40,40,46,46,50,50,51,55,57,62,65,67,67,69,70,70,72,73,76,77,77,78,84,85,85,86,87,88,88,89,89,90,93,99},{-84,52,-34,96,16,92,-64,-74},{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},{60,92,42,83,55,76,29,62},{-94,-94,-58,-40,-40,-26,-24,-22,-22,-22,-2,0,4,8,12,16,16,18,22,32,42,44,50,58,64,78,80,90},{0,0,1,1,1,0,0,1,1,1},{1,5,7,7,7,14,15,16,17,18,18,19,20,25,27,31,36,42,47,51,56,56,56,58,58,59,63,63,63,65,66,67,76,83,93,94,97},{78,-74,52,56,-8,92,14,56,-72,-92,32,-94,-26,-8,-66,72,-24,36,-84,-4,-68,14,78,40,-82,-10,16,56,6,-16,30,24,-32},{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},{17,50,65,4,19,10,45,70,76,81,28,97,55,70,38,2,40,67,36,33,6,85,25}};
vector<vector<int>> param1 {{2,5,8,8,10,12,13,15,17,18,20,20,21,27,28,31,34,37,40,46,48,52,53,54,54,58,59,60,66,68,68,69,70,71,72,73,77,77,80,84,84,92,92,95,97,97},{-22,26,-12,-54,66,86,38,76},{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,1,1,1},{71,2,74,42,80,71,26,76},{-86,-84,-78,-76,-72,-70,-62,-58,-54,-54,-50,-46,-44,-40,-30,-28,-16,-10,10,36,36,48,70,84,84,90,94,98},{1,1,1,0,1,1,0,0,0,0},{2,3,7,8,9,10,17,18,21,28,29,29,33,35,46,47,47,49,49,49,53,56,58,59,59,60,65,67,70,78,81,85,85,87,90,92,96},{-74,22,-14,-2,36,86,-70,-20,-76,-84,-40,-36,42,22,-60,-94,-18,8,-14,-42,-68,62,-60,2,40,-66,68,96,70,98,-38,-74,-92},{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},{78,92,65,23,7,94,18,4,2,53,31,58,98,18,46,16,17,92,80,92,43,70,50}};
vector<int> param2 {28,6,37,4,17,5,28,16,25,16};
vector<int> param3 {29,5,26,7,27,8,34,30,33,22};
vector<int> param4 {23,7,42,7,17,9,31,24,33,22};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |
CHECK_LINE_PASSES_ORIGIN |
import java.util. *;
import java.util.stream.*;
import java.lang.*;
import javafx.util.Pair;
public class CHECK_LINE_PASSES_ORIGIN{
static boolean f_gold ( int x1 , int y1 , int x2 , int y2 ) {
return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) ) ;
}
| def f_gold ( x1 , y1 , x2 , y2 ) :
return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) )
|
using namespace std;
bool f_gold ( int x1, int y1, int x2, int y2 ) {
return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) );
}
|
public static void main(String args[]) {
int n_success = 0;
List<Integer> param0 = new ArrayList<>();
param0.add(1);
param0.add(10);
param0.add(0);
param0.add(1);
param0.add(82);
param0.add(78);
param0.add(13);
param0.add(18);
param0.add(42);
param0.add(29);
List<Integer> param1 = new ArrayList<>();
param1.add(28);
param1.add(0);
param1.add(1);
param1.add(1);
param1.add(86);
param1.add(86);
param1.add(46);
param1.add(29);
param1.add(35);
param1.add(17);
List<Integer> param2 = new ArrayList<>();
param2.add(2);
param2.add(20);
param2.add(0);
param2.add(10);
param2.add(19);
param2.add(11);
param2.add(33);
param2.add(95);
param2.add(25);
param2.add(45);
List<Integer> param3 = new ArrayList<>();
param3.add(56);
param3.add(0);
param3.add(17);
param3.add(10);
param3.add(4);
param3.add(6);
param3.add(33);
param3.add(12);
param3.add(36);
param3.add(35);
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());
}
} |
if __name__ == '__main__':
param = [
(1,28,2,56,),
(10,0,20,0,),
(0,1,0,17,),
(1,1,10,10,),
(82,86,19,4,),
(78,86,11,6,),
(13,46,33,33,),
(18,29,95,12,),
(42,35,25,36,),
(29,17,45,35,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param))) |
int main() {
int n_success = 0;
vector<int> param0 {1,10,0,1,82,78,13,18,42,29};
vector<int> param1 {28,0,1,1,86,86,46,29,35,17};
vector<int> param2 {2,20,0,10,19,11,33,95,25,45};
vector<int> param3 {56,0,17,10,4,6,33,12,36,35};
for(int i = 0; i < param0.size(); ++i)
{
if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))
{
n_success+=1;
}
}
cout << "#Results:" << " " << n_success << ", " << param0.size();
return 0;
} |