Search found 21 matches

by renato_ferreira
Tue Aug 14, 2007 9:07 pm
Forum: Volume 6 (600-699)
Topic: 624 - CD
Replies: 77
Views: 32499

Thank you very much, Jan! AC!
by renato_ferreira
Tue Aug 14, 2007 1:09 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 34981

Thank you very much, AC!
by renato_ferreira
Tue Aug 14, 2007 12:10 am
Forum: Volume 6 (600-699)
Topic: 624 - CD
Replies: 77
Views: 32499

If there are more then one answer, can I print anyone of then?
Im getting WA, and I can't find the error.

Code: Select all

AC
Thank you.
by renato_ferreira
Mon Aug 13, 2007 9:14 pm
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 34981

Can I say that if a vertex is on the queue, it don't need to go again?
Because I tried to do it, and got WA.
by renato_ferreira
Sun Aug 12, 2007 11:12 pm
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 34981

I can change the code to work for the inputs, but I get TLE. How can I optimize this code?

Code: Select all

AC
Thank you.
by renato_ferreira
Sun Aug 12, 2007 9:06 pm
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 34981

I changed my code, but got WA in 0.189.

Code: Select all

AC
Thank you.
by renato_ferreira
Sun Aug 12, 2007 6:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 34981

But I got WA, no TLE... :(
by renato_ferreira
Sun Aug 12, 2007 1:18 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 34981

I try to use BFS, but I got WA. Can anyone help me?

Code: Select all

AC
Thank you.
by renato_ferreira
Mon Jul 30, 2007 4:52 pm
Forum: Volume 106 (10600-10699)
Topic: 10600 - ACM Contest and Blackout
Replies: 34
Views: 12820

Hi, I am getting WA for this problem, but my code is right for the inputs. #include <stdio.h> #define INF 2100100100 #define MAXVERTICES 500 #define MAXARESTAS MAXVERTICES * MAXVERTICES typedef struct { int u, v, c; } Aresta; typedef enum { FALSE = 0, TRUE } boolean; int pai[MAXVERTICES], rank[MAXVE...
by renato_ferreira
Wed Jul 18, 2007 12:19 am
Forum: Volume 109 (10900-10999)
Topic: 10959 - The Party, Part I
Replies: 37
Views: 17939

Thank you very much! I got AC! :D :D
by renato_ferreira
Tue Jul 17, 2007 6:39 pm
Forum: Volume 109 (10900-10999)
Topic: 10959 - The Party, Part I
Replies: 37
Views: 17939

Hello, I don't know why I'm getting WA... My algotithm:

1 - Make a graph with no edges.
2 - Read the input of the dances and make the edges.
3 - Find the Shortest Path from the vertex 0 for all other vertices.

Is that correct? Thank you.
by renato_ferreira
Tue Jul 17, 2007 4:38 pm
Forum: Volume 109 (10900-10999)
Topic: 10959 - The Party, Part I
Replies: 37
Views: 17939

Can anyone help me to find the wrong? My code is right for all inputs for this problem... :(
by renato_ferreira
Tue Jul 17, 2007 12:05 am
Forum: Volume 109 (10900-10999)
Topic: 10959 - The Party, Part I
Replies: 37
Views: 17939

Hello, I cant find the error of this code, but I get WA.

Code: Select all

AC
Thank you.
by renato_ferreira
Wed Jul 04, 2007 11:20 pm
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 20895

Hello, I need to optimize this code (TLE), but I have no idea how to do this, can you help me? #include <stdio.h> int max = -9999, matriz[101][101], lado; void busca(int altura, int largura); int main() { int valor, i, j; scanf("%d", &lado); for (i = 0; i < lado; i++) { for (j = 0; j < lado ; j++) {...
by renato_ferreira
Mon Jul 02, 2007 9:01 pm
Forum: Volume 101 (10100-10199)
Topic: 10158 - War
Replies: 23
Views: 9010

Now I got RE (Signal 11) :( :( #include <stdio.h> int *pai, *rank, *flag, pessoas; void MakeSet(int x); int FindSet(int x); void Union(int x, int y); void Separa(int x, int y); int main() { int comando, n1, n2, i; scanf("%d", &pessoas); pai = calloc(pessoas, sizeof(int)); rank = calloc(pessoas, size...

Go to advanced search