Try this :

Code: Select all

```
0
AA BB
```

Code: Select all

`No route`

Just after I made a little change, AC now.

Hope it could help.

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

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

Try this :
output :
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.

Try this :

Code: Select all

```
0
AA BB
```

Code: Select all

`No route`

Just after I made a little change, AC now.

Hope it could help.

- Fri Aug 05, 2005 4:13 pm
- Forum: Volume 5 (500-599)
- Topic: 531 - Compromise
- Replies:
**73** - Views:
**25716**

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 on 53...

- Sat Jul 30, 2005 6:14 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10718 - Bit Mask
- Replies:
**29** - Views:
**9154**

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

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

Input

My output

But should be

Good luck!

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

Input

Code: Select all

`127 50 60`

Code: Select all

`51`

Code: Select all

`50`

- Fri Jul 29, 2005 4:57 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10875 - Big Math
- Replies:
**27** - Views:
**5075**

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 sur...

- Fri Jul 29, 2005 3:50 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10875 - Big Math
- Replies:
**27** - Views:
**5075**

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 rewr...

- Fri Jul 29, 2005 6:27 am
- Forum: Volume 107 (10700-10799)
- Topic: 10730 - Antiarithmetic?
- Replies:
**21** - Views:
**7297**

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 fifth t...

- Fri Jul 29, 2005 4:55 am
- Forum: Volume 107 (10700-10799)
- Topic: 10718 - Bit Mask
- Replies:
**29** - Views:
**9154**

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 limit(up...

- Fri Jul 29, 2005 2:56 am
- Forum: Volume 108 (10800-10899)
- Topic: 10875 - Big Math
- Replies:
**27** - Views:
**5075**

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 last space of ...

- Tue Jul 26, 2005 6:14 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10875 - Big Math
- Replies:
**27** - Views:
**5075**

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 li...

- Tue Jul 26, 2005 9:27 am
- Forum: Volume 108 (10800-10899)
- Topic: 10821 - Constructing BST
- Replies:
**10** - Views:
**4457**

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. I...