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 <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); | |
| } |
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 <string> | |
| #include <vector> | |
| using namespace std; | |
| class Student { | |
| public: | |
| string fName_, sName_; | |
| int id_, grade_; |
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 <map> | |
| #include <vector> | |
| #include <string> | |
| #include <fstream> | |
| #include <sstream> | |
| #include <streambuf> | |
| using namespace std; | |
| // TODO: Make dataIx a char* |
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> | |
| using namespace std; | |
| class Node { | |
| private: | |
| bool hasValue_; | |
| int value_; | |
| Node *left_; | |
| Node *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
| main = do | |
| print $ map writeNumber [1..100] | |
| writeNumber :: Int -> String | |
| writeNumber n | |
| | n == 0 = "" | |
| | n == 1 = "one" | |
| | n == 2 = "two" |
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
| 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 } |
NewerOlder