Hi everybody, i want to know if there is a way to see code submitted during past srms ? thanks in advance ...
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 142 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
Hi everybody, i want to know if there is a way to see code submitted during past srms ? thanks in advance ...
Hello everyone .
Is there anyone who can explain to me the 5th method of resolution of LCA mentioned on amd's blog ? I did not understand the relation between A' and B and P and how to fill Table P.
I did not understand also the advantage of making A a binary sequence?
I know this is very simple for most of you but I have already some days stuck and the topcoder tutorial is the same as that of amd ...
About tarjan's algorithm, is it necessary to know what is a Akermann function?
Thanks in advance ...
Hi everyone , I wanted to learn aho — Corasick algorithm but the problem that the tutorials found on google are not detailed ...
For example I want to know why we look for the suffix -link of each node and how this algorithm works ...
thanks in advance
hello everyone , I want to know if a tree has a single centroid because I encounter some cases where I find 2 centroids...
thanks in advance ...
Hi everyone ... I don't why my BridgeFinding code gives a wrong anwser for graph :
6 7 -- > n , m
1 2 -- > edge : u -- v
2 3
1 3
3 4
4 6
4 6
4 5
The problem that i don't know why it takes edge 4 -- 6 as a bridge
code :
#include<bits/stdc++.h>
#define read_fast ios_base::sync_with_stdio(0) , cin.tie(0)
#define ll long long int
#define pb push_back
#define mp make_pair
using namespace std ;
int n , m , dfs_Count ;
int dfs_num [ 1010 ] , dfs_low [ 1010 ] , dfs_par [ 1010 ] ;
vector < int > adj [ 1010 ] ;
void Bridge ( int u )
{
dfs_low [ u ] = dfs_num [ u ] = ++ dfs_Count ;
for ( int i = 0 ; i < adj [ u ] . size() ; i ++ )
{
int j = adj [ u ][ i ] ;
if ( ! dfs_num [ j ] )
{
dfs_par [ j ] = u ;
Bridge ( j ) ;
if ( dfs_low [ j ] > dfs_num [ u ] )
{
cout << u << " " << j << '\n' ;
}
dfs_low [ u ] = min ( dfs_low [ u ] , dfs_low [ j ] ) ;
}
else if ( j != dfs_par [ u ] )
dfs_low [ u ] = min ( dfs_low [ u ] , dfs_num [ j ] ) ;
}
return ;
}
int main()
{
read_fast ;
cin >> n >> m ;
for ( int i = 0 ; i < m ; i ++ )
{
int a , b ;
cin >> a >> b ;
adj [ a ] . pb ( b ) ;
adj [ b ] . pb ( a ) ;
}
Bridge ( 1 ) ;
return 0 ;
}
Thanks in advance
| Название |
|---|


