Skip to content
Snippets Groups Projects
Commit ef45f0c3 authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

Add Trie, problems, and change structure

parent 424f21b5
No related branches found
No related tags found
No related merge requests found
Showing
with 9 additions and 3 deletions
# Implementações de algoritmos e resoluções de problemas; estudo, treino e consulta para programação competitiva (maratona de programação) # Implementações de algoritmos e resoluções de problemas
Os algoritmos estão classificados por area de estudo e todos eles estão listados nas Issues. Estudo, treino e consulta para programação competitiva (maratona de programação)
Os algoritmos estão classificados por categorias e todos eles estão listados nas Issues.
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
typedef pair<double,double> dd; typedef pair<double,double> dd;
// The three points are a counter-clockwise turn if cross > 0, clockwise if // The three points are a counter-clockwise turn if cross > 0, clockwise if
// cross < 0, and collinear if cross = 0 // cross < 0, and collinear if cross = 0
double cross(dd a, dd b, dd c) { double cross(dd a, dd b, dd c) {
......
...@@ -9,9 +9,14 @@ vector<int> graph[MAX]; ...@@ -9,9 +9,14 @@ vector<int> graph[MAX];
int cont[MAX], parent[MAX]; int cont[MAX], parent[MAX];
int low[MAX], L[MAX]; int low[MAX], L[MAX];
// Answer vector with bridges (edges)
vector<ii> bridges; vector<ii> bridges;
// Answer vector with articulations (vertices)
vector<int> articulations; vector<int> articulations;
// Finds all articulations and bridges in the graph // Finds all articulations and bridges in the graph
void dfs(int x) { void dfs(int x) {
int child = 0; int child = 0;
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
* Complexity (Space): O(n) * Complexity (Space): O(n)
*/ */
// Returns vector of primes less than or equal to n // Returns vector of primes less than or equal to n
vector<int> sieve(int n) { vector<int> sieve(int n) {
vector<int> primes; vector<int> primes;
......
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment