Skip to content

Instantly share code, notes, and snippets.

View andrey-malets's full-sized avatar

Andrey Malets andrey-malets

  • Yandex, Ural State University
  • Yekaterinburg
View GitHub Profile
#include <iostream>
#include <vector>
template<class It> typename It::value_type sum(It begin, It end) {
typename It::value_type res = 0;
while (begin != end)
res += *begin++;
return res;
}
#include <array>
#include <cassert>
#include <random>
#include <unistd.h>
int main(int ac, char* av[]) {
std::mt19937_64 e;
if (ac == 2) {
e.seed(std::stoi(av[1]));
#!/usr/bin/env bash
set -ex
PLATFORM=${PLATFORM:?no platform, available: mac, linux}
CLANG_PATH=${CLANG_PATH:?no clang path, need some compiler}
CLEANUP=${CLEANUP:-true}
CWD=$( (cd $(dirname "$0") && pwd) )
DC=$CWD