Search found 1 match

by dipdeb
Thu Jun 05, 2014 8:36 am
Forum: Volume 117 (11700-11799)
Topic: 11749 - Poor Trade Advisor
Replies: 10
Views: 5302

uva 11749 why wa????

#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
int ar[1000005],br[1000005],cr[1000005],graph[505][505];
int visited[505],n,m,temp;

void dfs(int i){
for(int j=1;j<=n;j++){
if(graph[i][j]&&!visited[j]){
visited[j]=1;
temp++;
dfs(j ...

Go to advanced search