This file contains hidden or 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
{ | |
const castedScores = scores.map((score) => parseInt(score || 0, 10)); | |
const max = castedScores[1] > castedScores[2] ? castedScores[1] : castedScores[2]; | |
const score = castedScores[0]+max; | |
const sum_palco = castedScores[1] + castedScores[2]; | |
return [score, sum_palco, castedScores[3]*-1]; | |
} |
This file contains hidden or 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
9a0238df-e627-412b-a34b-229ea07cc9e4 | |
9a023979-a634-4d57-9d17-41e8ce9ae6d4 |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
774885.547 9006514.407 721.816 | |
774878.682 9006514.353 721.728 | |
774878.682 9006512.775 721.606 | |
774878.682 9006436.881 711.349 | |
774878.682 9006415.46 710.451 | |
774878.682 9006411.414 710.425 | |
774878.682 9006257.665 710.972 | |
774878.682 9006217.295 715.482 | |
774878.682 9006170.704 718.001 |
This file contains hidden or 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
/* | |
* File: segue_linha.c | |
* Date: | |
* Description: | |
* Author: | |
* Modifications: | |
*/ | |
/* | |
* You may need to add include files like <webots/distance_sensor.h> or |
This file contains hidden or 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
/* | |
* File: segue_linha.c | |
* Date: | |
* Description: | |
* Author: | |
* Modifications: | |
*/ | |
/* | |
* You may need to add include files like <webots/distance_sensor.h> or |
This file contains hidden or 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
const pessoa = {}; | |
const fila = [{nome: "Otacilio Maia", idade: "24"}]; | |
pessoa.nome = "Antônio fakersom"; | |
pessoa.idade = "42"; | |
pessoa.frase = "JavaScript é super legal"; | |
fila.push(pessoa); | |
fila[0].frase = "E tudo faz sentido"; |
This file contains hidden or 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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* <h2><center>© Copyright (c) 2020 STMicroelectronics. | |
* All rights reserved.</center></h2> |
This file contains hidden or 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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* <h2><center>© Copyright (c) 2020 STMicroelectronics. | |
* All rights reserved.</center></h2> |
This file contains hidden or 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
# Veja a descrição do problema em https://www.thehuxley.com/problem/790 | |
def mochila(capacidade, lista_pesos, lista_valores, tamanho_lista): | |
matriz_solucao = [[0 for x in range(capacidade + 1)] | |
for x in range(tamanho_lista + 1)] | |
for item in range(tamanho_lista + 1): | |
for peso in range(capacidade + 1): | |
if item == 0 or peso == 0: | |
matriz_solucao[item][peso] = 0 | |
elif lista_pesos[item-1] <= peso: |
This file contains hidden or 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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* <h2><center>© Copyright (c) 2020 STMicroelectronics. | |
* All rights reserved.</center></h2> |
NewerOlder