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
#include <stdio.h> | |
void qsort(void *v[], int esq, int dir, | |
int(*comp)(void *, void *)) | |
{ | |
int i, ultimo; | |
void troca(void * v[], int i, int j); | |
if(esq >= dir) | |
return; |
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
using namespace std; | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> | |
#include <climits> | |
#include <cstdlib> |
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
/* | |
ALGORITMO DE DISJOINT SET - (C++11) | |
*/ | |
#include <iostream> | |
#include <unordered_map> | |
using namespace std; | |
class Disjoint_set |
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
/* | |
BINARY SEARCH ALGORITHM - C++ | |
ALGORITMO DE PESQUISA BINÁRIA - C++ | |
*/ | |
#include <iostream> //cin, cout | |
#include <vector> //vector<> | |
#include <algorithm> //sort() | |
using namespace std; |
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
#Requer plugin NppExec | |
MinGW(G++) | |
#--------script------------------------------------------------------------------------ | |
npp_save | |
g++ -Wall -std=gnu++14 -O3 -o $(NAME_PART) $(CURRENT_DIRECTORY)\$(FILE_NAME) | |
cmd /c " $(CURRENT_DIRECTORY)\$(NAME_PART).exe" | |
#--------------------------------------------------------------------------------------- |
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
/* | |
CRIPTOGRAFIA XOR SIMPLES EM C++ Moderno | |
*/ | |
#include <iostream> //cout & cin | |
#include <fstream> //ifstream & ofstream | |
#include <memory> //unique_ptr | |
using namespace std; |
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
''' | |
ALGORITMO GULOSO - TROCO MÍNIMO (CURSO PYTHON 300) DIRIGIDO POR MARCOS CASTRO | |
''' | |
global moedas | |
moedas = [100,50,25,10,5,1] | |
def troco_min(valor, total=0): | |
for i in range(len(moedas)): |
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
/** | |
C++ Binary File(Array C style) | |
*/ | |
#include <iostream> | |
#include <fstream> | |
using namespace std; |
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
// Para quem não entendeu as dificuldades | |
// com signals e slots: | |
// revendo fundamentos... | |
#include <iostream> | |
#include <list> | |
#include <algorithm> | |
#include <functional> |
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
#include <QtCore> | |
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
QCryptographicHash md5gen(QCryptographicHash::Md5); /*MD4, SHA1, SHA256, SHA512 ...*/ | |
QFile file(argv[1]); //filename | |
file.open(QIODevice::ReadOnly); | |
md5gen.addData(file.readAll()); |
OlderNewer