Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
#include
using namespace std; const int maxk=1e5+10; int n, m; vector
graph[maxk]; vector
art; int low_link[maxk]; int dist[maxk]; bool visited[maxk]; int current_time=0; void dfs(int node, int parent=-1){ visited[node]=true; low_link[node]=current_time; dist[node]=current_time; current_time++; int children = 0; for(int i=0; i<(int)graph[node].size(); i++){ int sosed=graph[node][i]; if(sosed!=parent){ if(visited[sosed]==true){ low_link[node]=min(low_link[node], dist[sosed]); } else{ dfs(sosed, node); low_link[node]=min(low_link[node], low_link[sosed]); if(parent!=-1 and low_link[sosed]>=dist[node]){ art.push_back(node); } children++; } } } if(parent == -1 and children > 1) { art.push_back(node); } } void articulation_points(){ for(int i=0; i
>n>>m; if(n == 0 and m == 0) { break; } for(int i=0; i
>a>>b; a--; b--; graph[a].push_back(b); graph[b].push_back(a); } current_time=0; articulation_points(); cout<
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)