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> | |
| 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; | |
| } |
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 <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])); |
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
| #!/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 |
OlderNewer