This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python Solution | |
def powers_of_two(N): | |
""" | |
This function generates my proposed tactical N sets of numbers made of powers of 2 | |
and the remaining N-30 numbers will be the last N numbers before 10**9 inclusive. | |
As N is always 100, this fuction is always performed without problems | |
""" | |
A = [2**i for i in range(30)] + [10**9 - n for n in range(N-30)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Kotlin solution | |
fun powers_of_two(N:Int):MutableList<Long> { | |
/* | |
This function generates a tactical N set of numbers made of powers of 2 | |
and the remaining N-30 numbers will be the last N numbers before 10**9 inclusive. | |
As N is always 100, this fuction is always performed without problems | |
*/ | |
var A = mutableListOf<Long>() // Open empty list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code Jam Individual Problem - Equal Sum - Carolina Garma | |
// Prev knowledge: binary representation, partitions | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace GoogleJam | |
{ | |
class EqualSum |
NewerOlder