## Search found 13 matches

Thu Apr 26, 2007 7:32 am
Forum: Volume 109 (10900-10999)
Topic: 10935 - Throwing cards away I
Replies: 15
Views: 10124
I thought I've tried that one - printing a new line after each problem - but it didn't work. But then, after seeing your post, I try printing a new line again, and it worked!

Thanks, Rocky.
Wed Apr 25, 2007 10:26 am
Forum: Volume 109 (10900-10999)
Topic: 10935 - Throwing cards away I
Replies: 15
Views: 10124
Can anyone help me? I get PE. I've tried handling the output if the input is n = 1.

Here's my code:

Code: Select all

``````      Code removed after Accepted.
``````
Thanks.
Sat Dec 23, 2006 5:38 am
Forum: Volume 104 (10400-10499)
Topic: 10499 - The Land of Justice
Replies: 51
Views: 19861
Ok, thanx. I didn't notice the range of the output..
Sat Dec 23, 2006 4:47 am
Forum: Volume 104 (10400-10499)
Topic: 10499 - The Land of Justice
Replies: 51
Views: 19861
Ok, thanx, but if 0 < N < 2^31, isn't it enough if I use long int?
Tue Dec 12, 2006 6:27 pm
Forum: Volume 108 (10800-10899)
Topic: 10812 - Beat the Spread!
Replies: 35
Views: 18378
Got it! Thanx a lot, Jan
Mon Dec 11, 2006 8:48 am
Forum: Volume 104 (10400-10499)
Topic: 10499 - The Land of Justice
Replies: 51
Views: 19861
I've made it the same, I guess, but still get WA with this code:

Code: Select all

``````
Removed after AC

``````
Can anyone tell me where the mistake is?
Thanx.
Mon Dec 11, 2006 5:30 am
Forum: Volume 108 (10800-10899)
Topic: 10812 - Beat the Spread!
Replies: 35
Views: 18378
I still don't get it. I've tried all possible corrections, but none get AC. I suppose that both the sum & difference must be either even or odd. I still get WA. e.g.: 1. 15 12 (Odd & Even) x + y = 15 x - y = 12 ------------- + x = (15 - 12) / 2 (doesn't fulfil) 2. 14 11 (Even & Odd) x + y = 14 x - y...
Wed Dec 06, 2006 9:01 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 21163
I found out that the last code I posted was already correct. Since I read the topic from the other posts saying the testcase

Code: Select all

``````1
429496295
``````
will ouput

Code: Select all

``````3 12574247521
``````
, I thought my code was wrong. I just realize that it's not a valid input.
Thanx, Jan and Joy.
Mon Dec 04, 2006 9:43 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 41497

### Re: 10013 WA

I've tried using:

Code: Select all

``````2

4
0 4
4 2
6 8
3 7

3
3 0
7 9
2 8
``````
Ur code gives the output:

Code: Select all

``````num tests 2
4750
470
``````
Expected output:

Code: Select all

``````4750

470
``````
Mon Dec 04, 2006 8:46 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 21163
Still don't get it. After changing the %ld with %lu (unsigned long), for the input: 1 429496295 I get: 11 2893333982 And, using long long (%lld, right?), I get: 15 1266996621 Shouldn't it be: 3 12574247521 ?? Here's the new code: Deleted after AC Anything wrong with the algorithm?
Mon Dec 04, 2006 7:48 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 21163
Ok, thanx. I'll post in the same thread next time
Sat Dec 02, 2006 4:30 pm
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 21163
I don't catch it, if the data will yield a palindrome that is not greater than 4,294,967,295, shouldn't it be enough with unsigned long?? And, if s is used to store the string of the unsigned long, 11 should be enough, isn't it? Btw, I've tried using long long and changing s to s[110], but the outpu...
Sat Dec 02, 2006 8:06 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 21163

### 10018 - WA

I still get WA with this code:

Code: Select all

``````Deleted after AC
``````
Can anyone help?
Thanx.