This file contains 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> | |
using namespace std; | |
template <typename T> struct S { | |
private: | |
T val; | |
public: |
This file contains 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> | |
int ga[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512}; | |
void f(int array[], int size) { | |
int la[10]; | |
for (int i = 0; i < size; i++) { | |
la[i] = array[i]; |
This file contains 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 "std_lib_facilities.h" | |
template<typename T, typename A = allocator<T>> | |
class our_vector { | |
A alloc; | |
size_t sz; | |
T* elem; | |
size_t space; | |
public: |
This file contains 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 <string> | |
using namespace std; | |
void printRules() { | |
cout << "Rules:\n" | |
<< " * The player who has three horizontally adjacent pieces, loses\n" | |
<< " * The player who has three vertically adjacent pieces, loses\n" | |
<< " * The player who has three diagonally adjacent pieces, loses\n" |