Search found 4 matches

by Fr3eM4n
Sat Feb 18, 2006 9:45 pm
Forum: C
Topic: Random Sentence from a File
Replies: 2
Views: 2659

my advice is to use fgets() to read lines of input. And you can use it's return value to see if the the read was successfull or not.
http://www.cplusplus.com/ref/cstdio/fgets.html
by Fr3eM4n
Tue Nov 22, 2005 8:45 pm
Forum: Algorithms
Topic: !!Help needed on Greedy Algorithm!!
Replies: 2
Views: 2554

i am looking for the same thing too.
if anyone has a list of DP problems, please post it here
by Fr3eM4n
Fri Nov 18, 2005 1:10 pm
Forum: Volume 109 (10900-10999)
Topic: 10946 - You want what filled?
Replies: 38
Views: 17549

:) yes, helped me a lot. thank you.

the bug was in the fill function.. i didn't checked if (x > m || y > n)
and after several tests, fill() counted some chars outside the map (map was not reinitialized each test case)
by Fr3eM4n
Wed Nov 16, 2005 3:58 pm
Forum: Volume 109 (10900-10999)
Topic: 10946 - You want what filled?
Replies: 38
Views: 17549

can't find out why i get WA... can someone help ? #include <stdio.h> #define isL(x) ((x) >= 'A' && (x) <= 'Z') #define isBetter(p1,p2) (sol1[p1] > sol1[p2] || (sol1[p1] == sol1[p2] && sol2[p1] < sol2[p2])) #define NMAX 55 int n, m; char map[NMAX][NMAX]; char u[NMAX][NMAX]; int soln; int sol1[NMAX*NM...

Go to advanced search