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> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fstream> | |
#include <queue> | |
#include <ctime> | |
#include <algorithm> | |
using namespace std; |
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 random | |
import math | |
import numpy as np | |
seed = 1 | |
boost = 20 | |
maxIter = 50 | |
numCities = 15 | |
mu, sigma = 500, 200 | |
demand = np.random.normal(mu,sigma,numCities) |
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 random | |
import math | |
seed = 1 | |
boost = 5 | |
iter = 3 | |
numCities = 4 | |
maxDistance = 40000 | |
upperX = 24000 | |
upperY = 32000 |
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> | |
struct node | |
{ | |
char c; | |
struct node* left, *right; | |
}; | |
struct node* createNode(char c) |
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 <math.h> | |
#include <limits.h> | |
unsigned int prevTwo(unsigned int x) // bit twiddling | |
{ | |
unsigned int y = x; | |
x--; | |
x |= x >> 1; | |
x |= x >> 2; |
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> | |
#include <math.h> | |
using namespace std; | |
#define MOD 1000000007 | |
unsigned long long power(unsigned long long num, int p) { |
NewerOlder