Skip to content

Instantly share code, notes, and snippets.

View micaelgomes's full-sized avatar
🔭
Building something...

Micael M. Gomes micaelgomes

🔭
Building something...
View GitHub Profile
#include <iostream>
#include "reader.h"
#include "gurobi_c++.h"
using namespace std;
int main()
{
int disciplinas, dias, salas, horarios;
vector<vector<int>> disp_salas, pref_horario;
@micaelgomes
micaelgomes / geometry.c
Created November 7, 2019 14:49
Algoritmos de geometria computacional
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
/**
* @code a função retorna o produto vetorial entre dois vetores
* @param vetA vetor de coordenadas em Rˆ3
function drawSpirograph(ctx,R,r,O) {
var x1 = R-O;
var y1 = 0;
var i = 1;
ctx.beginPath();
ctx.moveTo(x1,y1);
do {
if (i>20000) break;
var x2 = (R+r)*Math.cos(i*Math.PI/72) - (r+O)*Math.cos(((R+r)/r)*(i*Math.PI/72))
#include <vector>
#include <queue>
#include <stack>
#include <climits>
#include <iostream>
using namespace std;
#define INFINITO INT_MAX
#include <vector>
#include <queue>
#include <stack>
#include <iostream>
#include <climits>
using namespace std;
template <class PESO>
class Graph {
@micaelgomes
micaelgomes / graph.cpp
Last active April 13, 2020 19:13
BFS, DFS and Dijkstra.
#include <vector>
#include <queue>
#include <stack>
#include <iostream>
#include <climits>
using namespace std;
template <class PESO>
class Graph {
#include <iostream>
#include <stdio.h>
using namespace std;
void coinChange(int *coins, int sizeMoedas, int *table, int n){
for(int i=0; i<=n; i++)
table[i] = 0;
table[0] = 1;
#include <iostream>
#include <string>
#include <string.h>
#include <stdio.h>
using namespace std;
int memo[1001][1001];
int max(int a, int b){
#include <iostream>
#include <string>
#include <string.h>
#include <stdio.h>
using namespace std;
/**
* @return a > b
*/
@micaelgomes
micaelgomes / bash_read.c
Created April 16, 2019 19:39
Start work in my bash. this file can read user commands from terminal.
/**
*
*/
#include <stdlib.h>
#include <stdio.h>
#define TRUE 1
void shell_loop(){