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
| """ | |
| Sistema de Precificação Adaptativa | |
| Ajusta o preço de um produto a cada hora com base na demanda, | |
| comparando vendas recentes com a média histórica. | |
| """ | |
| import json | |
| import time | |
| import random | |
| import logging |
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
| from collections import defaultdict | |
| import heapq | |
| from functools import lru_cache | |
| graph_edges = [ | |
| ("V1","V2","a1"), ("V2","V3","a2"), ("V3","V4","a3"), ("V4","V5","a4"), | |
| ("V1","V6","a5"), ("V2","V7","a6"), ("V3","V8","a7"), ("V4","V9","a8"), | |
| ("V5","V10","a9"), ("V6","V7","a10"), ("V7","V8","a11"), ("V8","V9","a12"), | |
| ("V9","V10","a13"), ("V6","V15","a14"), ("V7","V11","a15"), ("V11","V12","a16"), | |
| ("V10","V12","a17"), ("V11","V13","a18"), ("V13","V14","a19"), ("V12","V14","a20"), |
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
| using System; | |
| namespace Kruskal | |
| { | |
| class Grafo | |
| { | |
| class Aresta : IComparable<Aresta> |
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
| using System; | |
| namespace Kruskal | |
| { | |
| class Grafo | |
| { | |
| class Aresta : IComparable<Aresta> |
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
| using System; | |
| namespace Dijkstra | |
| { | |
| class Dijkstra | |
| { | |
| //Mantem a mesma complexidade, pois é utilizada uma matriz 3D para representar o tempo e a distancia. | |
| //O codigo faz as mesmas coisas, mas com funções distintas para ambos. |
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
| import sys | |
| class Grafo(): | |
| def __init__(self, vertices): | |
| self.V = vertices | |
| self.grafo = [[0 for coluna in range(vertices)] | |
| for linha in range(vertices)] | |
| def printSolucao(self, dist): |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| namespace Grafos | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace Prova | |
| { | |
| class Program | |
| { |
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
| name = input('Infrome o nome d@ ginasta: ') | |
| nota1 = input('Informe a nota do primeiro jurado:') | |
| menor_nota = 0 | |
| maior_nota = 0 | |
| maior_nota = 0 | |
| menor_nota = 999999999999999 | |
| total = 0 | |
| total2 = 0 | |
| maior_menor = 0 | |
| media = 0 |
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
| price0 = 0 | |
| price1 = 0 | |
| price2 = 0 | |
| price3 = 0 | |
| price4 = 0 | |
| price5 = 0 | |
| half_price = 0 | |
| price_final = 0 | |
| code_food = 0 | |
| motoboy = 0 |
NewerOlder