Skip to content

Instantly share code, notes, and snippets.

View filipegl's full-sized avatar
🎯
Focusing

Filipe Gomes filipegl

🎯
Focusing
  • Campina Grande - PB, Brasil
View GitHub Profile
@filipegl
filipegl / .cpp
Last active December 4, 2019 00:22
Dark Roads - 1152 - URI
#include <stdio.h>
#include <string>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
int custo;
int pai[200000];
@filipegl
filipegl / rand.hs
Created April 30, 2019 03:42
Introdução a aleatoriedade em haskell
import System.Random
soma_um :: Int -> Int
soma_um n = n+1
main = do
aleatorio <- randomRIO (1,50::Int) -- tipo de RandomRIO vai ser IO Int. O tipo de aleatorio vai ser Int.
print aleatorio
g <- getStdGen --getStdGen eh um gerador aleatorio
print $ take 10 (randomRs (1, 50::Int) g)