## Search found 143 matches

Mon Nov 14, 2005 1:37 pm
Forum: Volume 109 (10900-10999)
Topic: 10975 - Dueue's Quiz
Replies: 39
Views: 16051
little joey wrote:Yes, duplicates occur in the dictionary, but they should be printed only once in the output.
Wow... I 'accidentally' handled such case without knowing it I was so lucky....
Mon Nov 14, 2005 1:31 pm
Forum: Algorithms
Topic: Flood Fill problem
Replies: 8
Views: 5888

### Re: Flood Fill problem

Btw, which problem that use floodfill function to solved/finished the problem? I need some... thanx for advance... Some problems that can be solved using flood fill: 352 - The Seasonal War 469 - Wetlands of Florida 572 - Oil Deposits 657 - The die is cast 776 - Monkeys in a Regular Forest 782 - Con...
Sun Nov 13, 2005 6:06 pm
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 13872
I think that you should change your input reading method. You can read one line using gets(). I have changed your code using gets() and it was not OLE anymore.

Hope it helps
Sun Nov 13, 2005 10:35 am
Forum: Volume 109 (10900-10999)
Topic: 10973 - Triangle Counting
Replies: 31
Views: 12783
Wei-Ming Chen wrote:I used bool[3001][3001], is this too big?
No, my solution also uses such array.
Sun Nov 13, 2005 8:49 am
Forum: Volume 109 (10900-10999)
Topic: 10960 - The Party, Part II
Replies: 4
Views: 2161
I haven't looked at your code, but:
kp wrote:Also I implemented various features like trim() to correct
input (just in case).
I didn't check for the input validity, so I think the judge input should be correct (at least it works well with scanf() and gets() in C).
Sat Nov 12, 2005 10:19 pm
Forum: Volume 109 (10900-10999)
Topic: 10960 - The Party, Part II
Replies: 4
Views: 2161

### Re: 10960 - The Party, Part II

I've got it AC. Now, I will answer my own questions (hopefully some of you will find them useful :D ). May I assume that in the input, the persons will always be represented as consecutive letters starting from 'A'? May I assume that in the input, the items will always be represented as consecutive ...
Sat Nov 12, 2005 8:06 pm
Forum: Volume 109 (10900-10999)
Topic: 10946 - You want what filled?
Replies: 38
Views: 17630
Roby wrote:But the new question is.. how to make floodFill function iteratively?
We can convert recursive floodfill into iterative by using BFS
Sat Nov 12, 2005 7:54 pm
Forum: Volume 2 (200-299)
Topic: 294 - Divisors
Replies: 91
Views: 22719
If number only has 1 divisor, should i output "bla bla bla has 1 divisor" or "bla bla bla has 1 divisors" According to the problem description: Print the text 'Between L and H, P has a maximum of D divisors.', where L, H, P, and D are the numbers as defined above. I think the output should still be...
Sat Nov 12, 2005 7:48 pm
Forum: Volume 109 (10900-10999)
Topic: 10960 - The Party, Part II
Replies: 4
Views: 2161

### 10960 - The Party, Part II

I've tried this problem, and got WA over and over. I have several questions as follow: May I assume that in the input, the persons will always be represented as consecutive letters starting from 'A'? May I assume that in the input, the items will always be represented as consecutive integers startin...
Sat Nov 12, 2005 7:15 pm
Forum: Volume 109 (10900-10999)
Topic: 10975 - Dueue's Quiz
Replies: 39
Views: 16051
My output is: Test Case #1 Query #1 a 72 Query #2 bb 40 bbb 16 Query #3 I count a single character as 8 occurences (just like the 'madam' example), therefore I get 72 for the input 'a'. Btw, oops... :oops: I forgot to check for multiple words in the list, but fortunately maybe there is no such case ...
Fri Nov 11, 2005 2:32 pm
Forum: Volume 8 (800-899)
Topic: 836 - Largest Submatrix
Replies: 19
Views: 8620
Here is the hint: Let sum[row][col] be the summation of all elements from the top left corner of the matrix (0,0) up to the (row, col) position. If you want to count the summation of elements between position (x1,y1) and (x2,y2) where x1<x2 and y1<y2, then you only need to calculate sum[x2][y2]-sum[...
Fri Nov 11, 2005 7:41 am
Forum: Volume 8 (800-899)
Topic: 836 - Largest Submatrix
Replies: 19
Views: 8620

### Re: 836 - Largest Submatrix

Roby wrote:Any idea how to solve this problem?
Is there something related to floodfill + math method to solve this one?
I don't know about how to solve this problem using floodfill+math, but you can try to use the same algorithm as problem 108 (Maximum Sum).
Tue Oct 25, 2005 7:03 pm
Forum: Volume 109 (10900-10999)
Topic: 10941 - Words adjustment
Replies: 19
Views: 5955
And I'd like to ask, are there empty lines in the input? I use scanf(" %s",...) to read words, could this be a problem? From the problem description: All words use only lowercase letters and contain between 1 and 1000 characters. I think empty string should not be possible. Besides, I also used sca...
Mon Oct 24, 2005 9:03 am
Forum: Volume 109 (10900-10999)
Topic: 10941 - Words adjustment
Replies: 19
Views: 5955
Hi, does anyone know the time limit of this problem during the contest?

Thu Aug 25, 2005 10:12 pm
Forum: Volume 104 (10400-10499)