This file contains 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
/* | |
* ALGORITHM: Depth-First Search (DFS) | |
* | |
* @author Michael Serrato <mikebsg01@gmail.com> | |
*/ | |
#include <iostream> | |
#include <algorithm> | |
#include <cctype> | |
#include <vector> | |
#include <deque> |
This file contains 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
/* | |
* PROGRAM: Binary Search Tree (Data Structure) | |
* | |
* @author Serrato Guerrero Michael Brandon <mikebsg01@gmail.com> | |
*/ | |
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
struct Nodo { |
This file contains 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
/* | |
* PROGRAM: OPEN HASH TABLE | |
* | |
* @author Serrato Guerrero Michael Brandon <mikebsg01@gmail.com> | |
*/ | |
#include <stdio.h> | |
#include <malloc.h> | |
/* ------------------------------- E S T R U C T U R A S ------------------------------- */ | |
struct pair { |
This file contains 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
/* | |
* ALGORITHM: MAX-HEAP SORT | |
* | |
* @author Serrato Guerrero Michael Brandon <mikebsg01@gmail.com> | |
*/ | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <sstream> | |
using namespace std; |
This file contains 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 <bits/stdc++.h> | |
#define X first | |
#define Y second | |
using namespace std; | |
int N; | |
double answer = 0; | |
struct NODO { | |
int prefix = 0; | |
NODO* hijos[30]; | |
}; |
This file contains 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 <bits/stdc++.h> | |
#define pb push_back | |
#define MAXN 1000005 | |
using namespace std; | |
typedef long long int lli; | |
lli N, M; | |
lli P, Q; | |
char A[MAXN]; | |
char B[MAXN]; |
This file contains 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 <bits/stdc++.h> | |
#define optimize ios_base::sync_with_stdio(0);cin.tie(0) | |
#define sz size | |
using namespace std; | |
typedef long long int lli; | |
lli A, N; | |
string cad; | |
int digits[4005]; | |
lli izq[40005]; | |
lli der[40005]; |
This file contains 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 <cstdio> | |
#include <cstring> | |
#include <algorithm> | |
#include <vector> | |
#define all(v) v.begin(), v.end() | |
#define ver(x) cout<<#x<<": "<<x<<"\n"; | |
#define verP(x) cout<<#x<<": "<<*x<<"\n"; | |
#define name(x) cout<<#x<<" \n"; | |
#define MAXSZ 16000002 |
This file contains 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 <cstdio> | |
#include <algorithm> | |
#include <vector> | |
#define all(v) v.begin(), v.end() | |
#define ver(x) cout<<#x<<": "<<x<<"\n"; | |
#define verP(x) cout<<#x<<": "<<*x<<"\n"; | |
#define name(x) cout<<#x<<" \n"; | |
#define MAXSZ 16000002 | |
using namespace std; |
This file contains 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 <bits/stdc++.h> | |
using namespace std; | |
typedef long long int lli; | |
int N; | |
lli sum = 0; | |
lli x,m,y,a,b; | |
int main(){ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
int i; |