Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <fstream> | |
#include <iostream> | |
#include <random> | |
#include <set> | |
#include <string> | |
#include <tuple> | |
// Birth/death events | |
// If birth: time, +1, 0 | |
// If death: time, -1, birthday |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <map> | |
#include <random> | |
#include <tuple> | |
#include <vector> | |
std::random_device rd; | |
std::mt19937 gen(rd()); | |
typedef std::vector<std::string> pattern; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <iterator> | |
#include <numeric> | |
#include <queue> | |
#include <string> | |
#include <vector> | |
bool notblocked(const std::string& str, char c) { | |
int L = str.size(); | |
if (L < 2) return true; |
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 <algorithm> | |
#include <cmath> | |
#include <iostream> | |
#include <random> | |
#include <string> | |
#include <vector> | |
// RGB values | |
// Add arithmetic operations to take means squared deviations | |
struct rgb { |
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
primes = [2, 3, 5, 7] | |
parent = [-1, -1, -1, -1] | |
digits = [1, 3, 7, 9] | |
def isprime(N): | |
i = 2 | |
while i * i <= N: | |
if N % i == 0: | |
return False | |
i += 1 |