simple Bipertite graph problem...
1) make 2 sets of vertex for each sub-graph or graph
2) take the minimum vertices from each of those sets & sum it
3) check how many vertices has no adjacent (help the king to find the minimum number of guards needed to guard all the junctions and streets of his ...
Search found 4 matches
- Fri Mar 04, 2011 2:36 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11080 - Place the Guards
- Replies: 40
- Views: 18322
- Fri Mar 04, 2011 4:48 am
- Forum: Volume 7 (700-799)
- Topic: 796 - Critical Links
- Replies: 54
- Views: 32106
Re: 796 - Critical Links
still im getting WA.
why???????
pls help me!!!!!
here is my algo...
first i find tree edge.
then i marked a vertex with back edge vertex's dfn.
if a vertex or its ancestor has back edge then it has no critical link
else it has critical link
here is my code....
#include<cstdio> //WA
#include ...
why???????
pls help me!!!!!
here is my algo...
first i find tree edge.
then i marked a vertex with back edge vertex's dfn.
if a vertex or its ancestor has back edge then it has no critical link
else it has critical link
here is my code....
#include<cstdio> //WA
#include ...
- Fri Feb 11, 2011 8:57 am
- Forum: Volume 6 (600-699)
- Topic: 657 - The die is cast
- Replies: 46
- Views: 30395
WA 657 why?
i use 2 simple DFSs for '*' and 'X'.I've passed all the inputs of board.can anybody give me more critical inputs?
Here is my code....
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
#define MAX 60
char a[MAX][MAX];
bool print(long M,long N)
{long I,J;
for(I=0;I<=M ...
Here is my code....
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
#define MAX 60
char a[MAX][MAX];
bool print(long M,long N)
{long I,J;
for(I=0;I<=M ...
- Sun Nov 07, 2010 8:49 am
- Forum: Volume 101 (10100-10199)
- Topic: 10102 - The path in the colored field
- Replies: 34
- Views: 17216
TLE-10102
i cant understand why im getting TLE? pls help me.
#include<stdio.h>
#define MAX 10000
#define INF 32767
int main()
{
char ch;
int M,I,J,K,L,D,R,C,max,min,cord1[MAX][2],cord3[MAX][2];
/*
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
*/
while( scanf("%d",&M)==1 ...
#include<stdio.h>
#define MAX 10000
#define INF 32767
int main()
{
char ch;
int M,I,J,K,L,D,R,C,max,min,cord1[MAX][2],cord3[MAX][2];
/*
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
*/
while( scanf("%d",&M)==1 ...