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
TEMPLATE = app | |
CONFIG += console c++11 | |
CONFIG -= app_bundle | |
CONFIG -= qt | |
LIBS += -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio | |
SOURCES += main.cpp |
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 <iostream> | |
#include <vector> | |
using namespace std; | |
string completar(string letra){ | |
return letra + ((letra == "x") ? "z" : "x"); | |
} | |
vector<string> preparar_texto(string texto){ | |
vector<string> cifrado; |
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 <iostream> | |
using namespace std; | |
const char * COPAS = "\xe2\x99\xa5"; | |
const char * OUROS = "\xe2\x99\xa6"; | |
const char * PAUS = "\xe2\x99\xa3"; | |
const char * ESPADAS = "\xe2\x99\xa0"; | |
int main(){ | |
cout << "Copas " << COPAS << endl; |
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
#ifndef POO_H | |
#define POO_H | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
#include <map> | |
namespace poo { | |
template <class T> |
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
var input = document.createElement("input"); | |
input.setAttribute('type', 'text'); | |
let idiv = document.createElement("div"); | |
idiv.id = 'block'; | |
idiv.className = 'block'; | |
function exec(){ | |
idiv.innerHTML = input.value + "<br/>" + idiv.innerHTML; | |
input.value = ""; |
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 <iostream> | |
#include <vector> | |
using namespace std; | |
namespace aluno{ | |
struct DcNode{ | |
string key; //resposta | |
string value;//pergunta ou afirmacao |
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Run tests", | |
"type": "shell", | |
"command": "./main", | |
"windows": { | |
"command": ".\\scripts\\test.cmd" |
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 <stdlib.h> //rand srand | |
#include <time.h>//time | |
#define SWAP(x, y) do { typeof(x) SWAP = x; x = y; y = SWAP; } while (0) //gcc only | |
void quick(int * vet, int C, int F){ | |
if(C >= F) return; | |
int i = C, j = F, pivo = vet[(i + j)/2]; | |
while(i <= j){ | |
while (vet[i] < pivo) i++; |
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
all: | |
gcc -Wall ./create_lab.c -o lab && ./lab 20 80 |
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
# Para o run passe o nome do comando executável e o nome da pasta que contem os testes | |
# Ex: O nome do executavel é 'calculadora' e a pasta que contem os testes no formato .in .sol é 'testes' | |
# make run cmd=calculadora folder=testes | |
# Para gerar o vpl a usando os testes da pasta 'testes' faça | |
# make vpl folder=testes | |
# Se o modelo dos arquivos de entrada e saída forem in1, out1, in2, out2, você deve usar os comandos | |
# make run2 cmd=executavel folder=testes | |
# make vpl2 folder=testes |