Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALGO(G,s,B,C)
- L=VUOTO
- INIT(G)
- for each b in B do
- if(c1[b]=bianco)then
- dfs_visit(G,b,c1)
- for each c in C do
- c2[c]=nero
- if(c1[s]=nero)then
- dfs_visit(G,s,c2)
- if(c2[v]=nero)then
- L = L u {v}
- return L
- --- VS soluzione nostra
- INIT(G,C) <- dove C viene colorato tutto di nero
- L=VUOTO
- GT=TRASPOSTO(G)
- DFS_VISIT(GT,s,c1)
- DFS_VISIT(G,s,c2)
- for each b in B do
- if(c1[b]=nero && c2[b]=nero)then
- L = L u {b}
- return L
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement