so it's like the second way i've tried to solve,
makin a topological sort then a dfs where each spanning tree root is a light that must be turn on..
like this..
REMOVED AFTER AC;
@edit..
can't believe this, I was making the worst mistake ¬¬'
my output was..
printf("%d\n", answer );
instead ...
Search found 5 matches
- Fri Jan 29, 2010 6:17 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11770 - Lighting Away
- Replies: 27
- Views: 14053
- Fri Jan 29, 2010 2:26 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11770 - Lighting Away
- Replies: 27
- Views: 14053
Re: WA in problem 11770
I've tried to solve this one using two different approaches,
first one, finding the number of strongly connected components that don't have in-arcs from other scc;
and the other making kind of a topological sort, adding the vertices in a list as they're discovered in a dfs, then, each root of a ...
first one, finding the number of strongly connected components that don't have in-arcs from other scc;
and the other making kind of a topological sort, adding the vertices in a list as they're discovered in a dfs, then, each root of a ...
- Thu May 28, 2009 7:00 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10267 - Graphical Editor
- Replies: 190
- Views: 77933
Re: 10267 - Graphical Editor
well guys, after take a look in some previous posts I could fix the RTE I was receiving,
but now WA is chasing me.
Maybe somebody could find what I'm doing wrong.
#include <stdio.h>
#include <stdlib.h>
void newTable( char x[][252] ){
int i, j;
for(i = 0; i<252; i++){
for( j = 0; j<252; j ...
but now WA is chasing me.
Maybe somebody could find what I'm doing wrong.
#include <stdio.h>
#include <stdlib.h>
void newTable( char x[][252] ){
int i, j;
for(i = 0; i<252; i++){
for( j = 0; j<252; j ...
- Tue May 26, 2009 9:02 pm
- Forum: Volume 7 (700-799)
- Topic: 706 - LCD Display
- Replies: 221
- Views: 65893
Re: 706 - LC-Display
A tip is look the way data input is made.
blank lines between the test cases can generate a WA.
blank lines between the test cases can generate a WA.
- Thu May 14, 2009 4:20 pm
- Forum: Volume 7 (700-799)
- Topic: 706 - LCD Display
- Replies: 221
- Views: 65893
Re: 706 - LC-Display
well, I think it's allright with my code.
tried all I could but still get WA.
some tips ?
tried all I could but still get WA.
some tips ?
Code: Select all
REMOVED AFTER AC.