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 <fstream> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
#define forn(i, j, n) for (int i = j; i < (int)n; i++) | |
#define forr(i, j, n) for (int i = j; i >= (int)n; i--) |
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 <fstream> | |
#include <iostream> | |
#include <set> | |
#include <vector> | |
using namespace std; | |
#define forn(i, j, n) for (int i = j; i < (int)n; i++) | |
#define endl '\n' |
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> | |
using namespace std; | |
#define forn(i, j, n) for (int i = j; i < (int)n; i++) | |
#define endl '\n' | |
#define pb push_back |
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 <sstream> | |
#include <string> | |
#include "day08_machine.h" | |
using namespace std; | |
#define endl '\n' | |
#define pb push_back |
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 <sstream> | |
#include <string> | |
#include <unordered_map> | |
#include <vector> | |
using namespace std; | |
#define endl '\n' | |
#define pb push_back | |
#define forn(i, n) for (int i = 0; i < (int)n; i++) |
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 <set> | |
using namespace std; | |
#define endl "\n" | |
int main() { | |
string line; | |
int part1_answer=0, part2_answer=0; |
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 <queue> | |
using namespace std; | |
int process(string&); | |
int main() { | |
string pass; | |
priority_queue<int> ids; |
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 <regex> | |
#include <map> | |
using namespace std; | |
const string BYR = "byr:"; | |
const string IYR = "iyr:"; | |
const string EYR = "eyr:"; |
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 <fstream> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
typedef long long ll; | |
typedef pair<int, int> pii; | |
const char TREE = '#'; |
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> // imports | |
#include <string> | |
#include <map> | |
using namespace std; | |
// Problema: https://codeforces.com/problemset/problem/1397/A | |
int main() { | |
int t, n; | |
string word; |