Skip to content

Instantly share code, notes, and snippets.

#include <algorithm>
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
bool sortfunc(pair<int, int> p1, pair<int, int> p2){
return pow(p1.first, 2) + pow(p1.second, 2) <
pow(p2.first, 2) + pow(p2.second, 2);
}
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Student {
public:
string fName_, sName_;
int id_, grade_;
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include <streambuf>
using namespace std;
// TODO: Make dataIx a char*
#include <iostream>
using namespace std;
class Node {
private:
bool hasValue_;
int value_;
Node *left_;
Node *right_;
main = do
print $ map writeNumber [1..100]
writeNumber :: Int -> String
writeNumber n
| n == 0 = ""
| n == 1 = "one"
| n == 2 = "two"
import Control.Monad
import Data.Char
import Data.Maybe
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
data State = State { code :: [Char], codeIndex :: Int
, memory :: [Int], memIndex :: Int
, input :: [Char], brackets :: Map Int Int }