Skip to content

Instantly share code, notes, and snippets.

View mikea's full-sized avatar

Mike Aizatsky mikea

View GitHub Profile
// setup
int status = 0;
do {
// preconditions
status = doSomething();
if (status) break;
status = doSomethingElse();
if (status) break;
#include <stdio.h>
#include <time.h>
typedef unsigned int uint32;
typedef long long int64;
template<typename F, typename V>
V collision_point(const F& f, V x) {
V slow = x;
V fast = f(x);