Search found 1 match

by binitam
Fri Jul 13, 2012 8:46 pm
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 40183

Re: 336 WA

#include<iostream> #include<vector> #include<queue> using namespace std; int main() { int nc,nEdge,a,b,i,root,ttl,cases=1; while(1) { vector<int>edges[10000]; cin>>nc; if(nc==0)break; for(i=0;i<nc;i++) { cin>>a>>b; if(a==0&&b==0)break; edges[a].push_back(b); edges[b].push_back(a); } while(1) { int ...

Go to advanced search