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 <stdbool.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define MAX(a, b) ((a > b) ? a : b) | |
| typedef struct node_t node_t; | |
| struct node_t { | |
| int value; |
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 <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct node_t node_t; | |
| struct node_t { | |
| int value; | |
| node_t *parent; | |
| node_t *left; | |
| node_t *right; |
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
| #!/bin/bash | |
| # Tom Hale, 2016. MIT Licence. | |
| # Print out 256 colours, with each number printed in its corresponding colour | |
| # See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163 | |
| set -eu # Fail on errors or undeclared variables | |
| printable_colours=256 |
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
| //Author: techid2000 | |
| #include <bits/stdc++.h> | |
| #pragma region ◄ Helper ► | |
| #define foru(i, a, b) for(int i = a; i <= b; ++i) | |
| #define ford(i, a, b) for(int i = a; i >= b; --i) | |
| #define rep(i,a) for(int i = 0; i < a; i++) | |
| #define minheap(x) x,vector<x>,greater<x> | |
| #define X first | |
| #define Y second | |
| #define watch(x) cerr << #x << " = " << x << '\n' |