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
#include <stdio.h> | |
#include <string> | |
#include <iostream> | |
#include <cstdio> | |
#include <cstring> | |
#include <cstdlib> | |
int custo; | |
int pai[200000]; |
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 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) |