Search found 10 matches

by james299
Thu Aug 11, 2005 4:06 am
Forum: Volume 7 (700-799)
Topic: 762 - We Ship Cheap
Replies: 51
Views: 29441

annoying...

I tried to solve this problem , after a lot of WA I got a very tricky input.
:(
Try this :

Code: Select all

0
AA BB
output :

Code: Select all

No route
I didn't expect such input so my code won't get AC.
Just after I made a little change, AC now.

Hope it could help.
:wink:
by james299
Fri Aug 05, 2005 4:13 pm
Forum: Volume 5 (500-599)
Topic: 531 - Compromise
Replies: 73
Views: 36961

531 WA ?!

Hi! This problem bothers me .... :(

I use DP to solve this LCS question.
1. I read input interrupt by '#'.
2. Apply DP approach by use two table to store the length and the position of two equal string.
3. Then accord to the table to reconstruct the LCS string.

Although there are several issue ...
by james299
Sat Jul 30, 2005 6:14 pm
Forum: Volume 107 (10700-10799)
Topic: 10718 - Bit Mask
Replies: 29
Views: 14491

I find what's wrong in my code. And AC now :D .

My judger for upper and lower limits are both wrong when difference is one.

Input

Code: Select all

127 50 60
My output

Code: Select all

51
But should be

Code: Select all

50
:wink: Good luck!
by james299
Fri Jul 29, 2005 4:57 pm
Forum: Volume 108 (10800-10899)
Topic: 10875 - Big Math
Replies: 27
Views: 9354

Hi ! Raj Ariyan

Actually! I really don't have any clue about what's wrong with it.
The only information I got is "Runtime Error" without showing "SIGSEGV"(NullPointerException) or "SIGFPE"(FloatingPointException)

BTW, my size for operators is 50 ,for numbers is 1000.
And I do some assert to make ...
by james299
Fri Jul 29, 2005 3:50 pm
Forum: Volume 108 (10800-10899)
Topic: 10875 - Big Math
Replies: 27
Views: 9354

Hi! Raj Ariyan

Raj Ariyan said :
in this type of problem, in my opinion, if u writing n'th line code then u must be sure that 1 to n-1 lines are perfect and bug free. I mean for proceed one line u have to sure that upto this line alls code are error free.


Thanks for your suggestion.
So I try to ...
by james299
Fri Jul 29, 2005 6:27 am
Forum: Volume 107 (10700-10799)
Topic: 10730 - Antiarithmetic?
Replies: 21
Views: 11257

I'm confused!

Hi! :)
The problem statement says

For example, the sequence (2, 0, 1, 4, 3) is an antiarithmetic permutation of 5. The sequence (0, 5, 4, 3, 1, 2) is not an antiarithmetic permutation as its first, fifth and sixth term (0, 1, 2) form an arithmetic progression; and so do its second, forth and ...
by james299
Fri Jul 29, 2005 4:55 am
Forum: Volume 107 (10700-10799)
Topic: 10718 - Bit Mask
Replies: 29
Views: 14491

hi ! :)
I got WA, and i can't figure it out.

1. I translate N,L,U to binary bit.
2. I use a temp array to store the reslut.
3. First, I copy the data from U to temp, and from leading bit to decide following two case.

if(U ==0&&N ==0)

I check if I changed the value and it wouldn't exceed the ...
by james299
Fri Jul 29, 2005 2:56 am
Forum: Volume 108 (10800-10899)
Topic: 10875 - Big Math
Replies: 27
Views: 9354

Thanks for your reply :D

Have u check this type of input. Like 0-2 = -2, i mean start with 0 but not only have one digit. 0 follows with some operation.

I didn't, now I correct this error in my code.


2. And for each case I can sure no extra space at each end of line.

But I removed the ...
by james299
Tue Jul 26, 2005 6:14 pm
Forum: Volume 108 (10800-10899)
Topic: 10875 - Big Math
Replies: 27
Views: 9354

hi!
I try to solve the prob but I got several WA, and I don't know why.

I check TISARKER and misof said.

1. I use long long int to proceed the compute, that is, my code can handle prob's input data without overflow.(array size is 1000)
2. And for each case I can sure no extra space at each end of ...
by james299
Tue Jul 26, 2005 9:27 am
Forum: Volume 108 (10800-10899)
Topic: 10821 - Constructing BST
Replies: 10
Views: 5772

Wrong Answer

hi !
I'm trying to solve this problem .
I use the alog just like what Dreamer#1 did, but I got WA for serveral times.And now I can't find out what's wrong with my code.
1. I check the input N & H, if N is over 2^H-1 or less than H, and print impossible.
2. And I use recursion to build the tree.
3 ...

Go to advanced search