Search found 6 matches

by Tommy Wu
Sat Mar 29, 2008 6:52 am
Forum: Bugs and suggestions
Topic: 724 - Reverse
Replies: 3
Views: 2265

724 - Reverse

I think that the judge for this problem has a bug.

A big number of my friends submit the following code which is obviously deserve to get WA but it got AC.

code(in C++):

main(){}

code (in C) (Is this code able to avoid compile error?)

#include<stdio.h>
#include<stdlib.h>
int main()
{
freopen ...
by Tommy Wu
Tue Sep 11, 2007 7:05 am
Forum: Bugs and suggestions
Topic: 785 - Grid Coloring
Replies: 2
Views: 2256

785 - Grid Coloring

I submitted the code which got AC in the previous system.
But I got wrong answer this time!!
How come it would happen?

Is the problem has been rejudged?
by Tommy Wu
Sat Jul 07, 2007 6:59 am
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 6652

Your code fails the follow inputs:

10
2 84
84 66
66 8
8 410
410 8
8 96
96 10
10 200
200 10
10 2
10
2 64
64 8
8 55
55 333
333 44
44 887
887 554
554 1
1 226
226 33
0

Output should be:

Case 1: (((A1 x A2) x A3) x (A4 x (A5 x (A6 x (A7 x (A8 x (A9 x A10)))))))
Case 2: ((A1 x (A2 x (A3 x (A4 x (A5 ...
by Tommy Wu
Mon Apr 30, 2007 12:18 pm
Forum: Volume 111 (11100-11199)
Topic: 11138 - Nuts and Bolts
Replies: 9
Views: 6890

I know that this problem is a Maximum-Bipartite-Matching problem.
But can it be implemented by the Edmonds-Karp's algorithm?

I used Edmonds-Karp's algorithm and got a TLE a few hours ago...


Sorry for my poor English grammar.
by Tommy Wu
Tue Jan 30, 2007 11:35 am
Forum: Volume 110 (11000-11099)
Topic: 11003 - Boxes
Replies: 29
Views: 21602


#include <stdio.h>

struct DATA {
int weight;
int carry;
}box[1000];

int lis[1000][2];//[][0]:amount [][1]: carry

int main() {
int i,j,N,tmp,max;
while (scanf("%d",&N) && N) {
for (i=max=0; i<N; i++)
scanf("%d %d",&box[i].weight,&box[i].carry);
lis[0][1]=box[0].carry;
for (i=0; i<N; i ...
by Tommy Wu
Sun Jan 28, 2007 9:34 am
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 18777

paulmcvn wrote:Sorry, you're right!

Just notice the case when there's one last number in A.
Sorry for my lack of knowledge, but would you explain what is "one last number in A"?

Thanks.

Sorry for my poor English grammar.

Go to advanced search