## Search found 19 matches

Sat Nov 13, 2004 4:03 pm
Forum: Volume 100 (10000-10099)
Topic: 10021 - Cube in the labirint
Replies: 17
Views: 3990
Hi...
I can tell you that moving the cube on the board may be simulated. For the algo, I think a BFS is the solution
Fri Oct 08, 2004 12:39 am
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30967
In this problem we are talking about simple graph which does not have same endpoints for more than one edge, and also does not have edges with the same endpoint.
what does it mean?
Is the graph directed?
Thu Oct 07, 2004 3:24 pm
Forum: Volume 100 (10000-10099)
Topic: 10021 - Cube in the labirint
Replies: 17
Views: 3990
Yeeeess...I've solved it. And lastly got AC. 4 ms and 420 k memory. Some explanations: - a cell can be repeated more than once - it is preferably to use a BFS (Bradth First Search) in Labirint: that means you must search in all four directions simultaneously to get to final destination in small amou...
Thu Oct 07, 2004 9:02 am
Forum: Volume 100 (10000-10099)
Topic: 10021 - Cube in the labirint
Replies: 17
Views: 3990
I think that a cell can be repeated. So the input: 1 3 2 1 1 2 2 may give an answer like that: 6 otherwise "No solution". But if I do a DF traversal then I'll get TLE. Here is my DFS code: #include <stdio.h> #include <memory.h> /* die faces */ #define UP 0 #define DOWN 1 #define LEFT 2 #define RIGHT...
Wed Oct 06, 2004 11:20 pm
Forum: Volume 100 (10000-10099)
Topic: 10021 - Cube in the labirint
Replies: 17
Views: 3990

### 10021 - How to solve?

How can I solve this problem?
I've tried DFS first, then BFS, but WA. It seems a cell can be visited more than once. So it would go for TLE, in't it?
Thu Sep 30, 2004 11:23 am
Forum: Volume 100 (10000-10099)
Topic: 10010 - Where's Waldorf?
Replies: 42
Views: 18695
EVRIKAAAA!

I have found the answer: "A word matches a straight, uninterrupted line of letters in the grid."
Thu Sep 30, 2004 10:32 am
Forum: Volume 100 (10000-10099)
Topic: 10010 - Where's Waldorf?
Replies: 42
Views: 18695
Thu Sep 30, 2004 10:23 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 41559
Oh... I've forgot
Delete the line
printf("\n")
before while(i<n) from your source code and you'll get a clean AC.
Thu Sep 30, 2004 10:10 am
Forum: Volume 100 (10000-10099)
Topic: 10014 - Simple calculations
Replies: 34
Views: 8838
Mon Sep 27, 2004 12:48 am
Forum: Volume 101 (10100-10199)
Topic: 10101 - Bangla Numbers
Replies: 122
Views: 29290
Thank you very much, tan_Yui.
Sun Sep 26, 2004 10:08 pm
Forum: Volume 100 (10000-10099)
Topic: 10014 - Simple calculations
Replies: 34
Views: 8838
Man man man What happened? Are you new to acm.uva.es problemset? Some key explanations: - this problem requires multiple input - revise your code, see that csum variable is not initialized after first calculation process - the line "printf("%.2f",a1); " must be transformed into "printf("%.2f%s",a1, ...
Sun Sep 26, 2004 2:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 41559
Probable you must not put a blank line after last case e.g printf("\n\n").
You can write in this way:

while(i < n)
{
/* ...... */
if(i == n)
printf("\n");
else
printf("\n\n");
}
Sun Sep 26, 2004 1:07 pm
Forum: Volume 100 (10000-10099)
Topic: 10010 - Where's Waldorf?
Replies: 42
Views: 18695

### 10010 Where the hell is Waldorf? I can't find it!!!

Hye... I am very disappointed. I submitted this problem 20 times and I've got WA for all. Is there some treaky inputs? Please, people, help me with this easy problem. Look a little at my code: #include <stdio.h> #include <ctype.h> int m, n; /* num of line & columns */ char grid[60][60]; char viz[60]...
Sun Sep 26, 2004 1:17 am
Forum: Volume 102 (10200-10299)
Topic: 10299 - Relatives
Replies: 57
Views: 14674

### Solved...

Lastly I've solved this problem. I've got TLE because of square() function which was evaluated every step in the for() loop. Also the above code would give WA even if we improve it. Problem solution is easy as PI, because it's pure mathematic: For a number n = p1^a1 * p2^a2 * . . . * pn^an, where p1...
Sat Sep 25, 2004 7:16 pm
Forum: Volume 102 (10200-10299)
Topic: 10299 - Relatives
Replies: 57
Views: 14674