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
import System.Environment | |
import Data.List | |
type Elemento = String | |
type Par = (Elemento, Elemento) | |
type Custo = Int | |
type Aresta = (Par, Custo) | |
type Grafo = [Aresta] |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
# Entrada | |
lado = int(raw_input('Lado: ')) | |
if lado % 2 == 0 or lado <= 0: |
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
x | y | |
---|---|---|
20 | 1.79 | |
41.5 | 3.49 | |
100 | 5.99 | |
110 | 4.99 |
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
#!/usr/bin/env python3 | |
''' | |
http://dojopuzzles.com/problemas/exibe/matriz-espiral/ | |
''' | |
from enum import Enum | |
from math import log10 | |
from os import linesep |
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
\version "2.18.2" | |
\language "portugues" | |
\header { | |
dedication = ##f | |
title = "Escala de Dó Maior" | |
subtitle = ##f | |
subsubtitle = ##f | |
instrument = ##f | |
composer = ##f |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
CC=gcc | |
CFLAGS=-O3 | |
.PHONY: all clean | |
all: dados.csv | |
numeros.txt: numeros.py | |
python3 $< | |
dados.csv: run.sh numeros.txt iterativo recursivo |
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
window = 14 | |
for line in open(0): | |
chars = [-1 for _ in range(256)] | |
equal = -1 | |
for i, c in enumerate(ord(c) for c in line): | |
if chars[c] > equal: | |
equal = chars[c] | |
else: | |
if i - equal == window: | |
print(i + 1) |
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
entrada = [[int(b) for b in a.rstrip()] for a in open('8/input')] | |
visivel = set() | |
for i in range(len(entrada)): | |
m = -1 | |
for j in range(len(entrada[i])): | |
a = entrada[i][j] | |
if a > m: | |
visivel.add((i, j)) | |
m = a | |
if m == 9: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.