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 <deque> | |
| #include <iostream> | |
| #include <iomanip> | |
| #include <random> | |
| #include <sstream> | |
| #include <string> | |
| #include <utility> | |
| #include <vector> | |
| struct Cell { //represents one cell in the minefield |
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
| // g++ -o FFT FFT.cpp -Wall -O3 | |
| #include <algorithm> | |
| #include <cmath> | |
| #include <complex> | |
| #include <iostream> | |
| #include <iterator> | |
| #include <type_traits> | |
| #include <vector> | |
| 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
| /* while there are tokens to be read: | |
| read a token. | |
| if the token is a number, then push it to the output queue. | |
| if the token is an operator, then: | |
| while ((there is an operator at the top of the operator stack with | |
| greater precedence) or (the operator at the top of the operator stack has | |
| equal precedence and | |
| the operator is left associative)) and | |
| (the operator at the top of the stack is not a left bracket): | |
| pop operators from the operator stack, onto the output queue. |
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
| // g++ -o parser main.cpp parser.h parser.cpp -O3 -Wall -fpie | |
| #include <iomanip> | |
| #include <iostream> | |
| #include <string> | |
| #include <sstream> | |
| #include "parser.h" | |
| 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
| #ifndef BINARY_HEAP_HPP | |
| #define BINARY_HEAP_HPP | |
| #include <algorithm> | |
| #include <functional> | |
| #include <initializer_list> | |
| #include <iostream> | |
| #include <stack> | |
| #include <type_traits> | |
| #include <vector> |
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
| // based on https://users.cs.fiu.edu/~weiss/dsaa_c++4/code/AvlTree.h | |
| #ifndef AVL_TREE_HEADER_MAIN | |
| #define AVL_TREE_HEADER_MAIN | |
| #include <algorithm> | |
| #include <initializer_list> | |
| #include <iostream> | |
| #include <iterator> | |
| #include <memory> |
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 <array> | |
| #include <iostream> | |
| #include <string> | |
| #include <utility> | |
| //print instructions | |
| void instructions(const std::array<std::array<char, 3> ,3>& board) | |
| { | |
| std::cout << "Choose a cell numbered from 1 to 9 as below\n and play\n\n"; |
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
| #ifndef DYNAMIC_BITSET_HEADER | |
| #define DYNAMIC_BITSET_HEADER | |
| #include <algorithm> | |
| #include <functional> | |
| #include <iterator> | |
| #include <numeric> | |
| #include <stdexcept> | |
| #include <string> | |
| #include <sstream> |
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
| cmake_minimum_required(VERSION 2.8.11) | |
| project(Qt5App) | |
| # | |
| # Qt5 support | |
| # | |
| # general overview: | |
| # * [Modern CMake with Qt and Boost](http://www.kdab.com/modern-cmake-with-qt-and-boost/) | |
| # * [Using CMake with Qt 5](http://www.kdab.com/using-cmake-with-qt-5/) |
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
| /*16 | |
| 1 4 | |
| 2 4 | |
| 3 4 | |
| 4 5 | |
| 5 6 | |
| 6 7 | |
| 7 8 | |
| 7 9 | |
| 6 10 |