Search found 2 matches

by MarioYC
Sun Oct 05, 2008 6:16 pm
Forum: Volume 115 (11500-11599)
Topic: 11504 - Dominos
Replies: 55
Views: 20772

Re: 11504 - Dominos

Hi. I've been trying to solve this problem, but when I try the test cases in Waterloo's web page, my code gives an answer only for the two firt cases. First, I find all the connected components and then I see if a connected component affects ano...
by MarioYC
Thu Aug 07, 2008 3:00 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 36571

Re: 10000 - Longest Path

Hi, I'm getting wrong answer with this code, could you tell me what's my mistake? #include<iostream> #include<queue> #include<map> using namespace std; int n,s; int longest; int destiny; int visited[101]; vector< vector<int> > L(101); void bfs(){ queue< pair<int,int> > Q; Q.push(make_pair(s,0)); pai...

Go to advanced search