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; | |
vector<int>FirstNumber; | |
vector<int>SecondNumber; | |
vector<int>ResultNumber; | |
struct node { | |
node *next; | |
int value; | |
node() { |
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
// Jair Said Hernandez Reyes. | |
// Segment Tree + Lazy Propagation. | |
// In General we have f(x) = a where a is the answer for every sub segment on tree, in this case f(x) = st[x]. | |
// We also need a G(x) = R where G is a function that takes any n E Nodes and indicates what to do next, in this particular case G = lazy. | |
// G actually works as a flag. | |
// notice that we need to create function that handles transitions | |
#include<bits/stdc++.h> | |
using namespace std; | |
#define ll long long |
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
// Simple Dijkstra Seen from Destination to all vertex v in the set of V. | |
// Jair Said Hernández Reyes. | |
#include<bits/stdc++.h> | |
using namespace std; | |
#define ll long long | |
#define vi vector<ll> | |
#define ii pair<ll, ll> | |
#define vii vector<ii> | |
#define oo 100000000000 | |
ll T, N, M, E, D, TLE, W, X, Y; |
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
// Jair Said Hernández Reyes. | |
// Dijkstra over an implicit Graph | |
#include<bits/stdc++.h> | |
using namespace std; | |
#define INF (1 << 30) | |
#define ll long long | |
#define ii pair<int, int> | |
#define iii pair<int, ii> | |
#define pb push_back | |
#define MAXN 1050 |
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
//Jair Said Hernandez Reyes | |
// BFS Multi-Sourcing. | |
#include<bits/stdc++.h> | |
using namespace std; | |
#define INF (1 << 30) | |
#define ll long long | |
#define pb push_back | |
#define MAXN 1050 | |
ll CC, N , M; | |
pair<int, int> joe; |
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
// Hernandez Reyes Jair Said. | |
// BFS on implicit graph where the coordinates are on R3 (3D). | |
#include<bits/stdc++.h> | |
using namespace std; | |
#define INF (1 << 30) | |
#define ll long long | |
#define pb push_back | |
#define MAXN 400 | |
ll L, R, C; | |
char mat[MAXN][MAXN][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
//Hernández Reyes Jair Said UVa 429 Sol. | |
// Graph Theory - Simple BFS w/Map. | |
#include<bits/stdc++.h> | |
#define ll long long | |
#define pb push_back | |
#define INF (int)(1<<30) | |
#define MAXN 10000 | |
using namespace std; | |
map<string, int>mapa; | |
vector<int>A[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
// Jair Said Hernández Reyes. Uva 534 Solution. | |
#include<bits/stdc++.h> | |
using namespace std; | |
#define ll long long | |
#define MAXN 500000 | |
ll root[MAXN]; | |
ll N, many; | |
double X, Y; | |
struct edge{ | |
ll u; |
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
// Rare Order UVa - Jair Said Hernández Reyes. | |
#include <bits/stdc++.h> | |
using namespace std; | |
#define ll long long | |
#define salto "\n" | |
#define pb push_back | |
#define mp make_pair | |
string in, a, b, c, d; | |
vector<ll>G[10000]; | |
vector<ll>T; |
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
// Jair Said Hernández Reyes. | |
#include <bits/stdc++.h> | |
using namespace std; | |
#define ll long long | |
#define salto "\n" | |
#define pb push_back | |
#define mp make_pair | |
ll N, E, x , y, many, feasible; | |
ll color[10000], in[10000]; | |
vector<ll>G[10000]; |
NewerOlder