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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| void part1() | |
| { | |
| int result = 0; | |
| void* fh = fopen("input.txt", "r"); |
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> | |
| #include <string.h> | |
| #include <stdbool.h> | |
| long min(long a, long b) { if (a < b) return a; return b; } | |
| long max(long a, long b) { if (a > b) return a; return b; } | |
| struct Node | |
| { |
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> | |
| #include <string.h> | |
| // Poor man's enum | |
| const int FREE = 1; | |
| const int ROLL = 2; | |
| struct Node | |
| { |
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> | |
| #include <string.h> | |
| int joltage_p1(char *str) | |
| { | |
| const int len = strlen(str); | |
| char *c1base = str; | |
| int c2base = 1; |
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> | |
| #include <stdbool.h> | |
| struct range | |
| { | |
| long from; | |
| long to; | |
| }; |
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> | |
| void brute() | |
| { | |
| char* buf = malloc(16); | |
| void* file = fopen("sample.txt", "r"); | |
| if (!file) return; | |
| int dial = 50; |
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 <iostream> | |
| #include <vector> | |
| #include <fstream> | |
| #include <algorithm> | |
| std::vector<int> read() | |
| { | |
| std::vector<int> result; | |
| std::ifstream file("1.txt"); |
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 <gtest/gtest.h> | |
| TEST(Lib1, EnTest) | |
| { | |
| ASSERT_EQ(15, 15); | |
| } |
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
| /* LIBRARY 1 */ | |
| include <stdio.h> | |
| #include <gtest/gtest.h> | |
| TEST(Lib1, EnTest) | |
| { | |
| ASSERT_EQ(15, 15); | |
| } | |
| /* LIBRARY 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 <memory> | |
| #include <fstream> | |
| #include <vector> | |
| #include <sstream> | |
| class Dictionary | |
| { |
NewerOlder