## Search found 834 matches

Fri Aug 02, 2019 2:26 pm
Forum: Volume 105 (10500-10599)
Topic: 10554 - Calories from Fat
Replies: 6
Views: 2864

### Re: 10554 - Calories from Fat

I have found problem - it was related to rounding ...

Example case:

Code: Select all

``````20g 16% 36C 47% 80C
-
-
``````
Result is exactly 22.5% - rounding to nearest integer can be painful
Thu Aug 01, 2019 11:14 am
Forum: Volume 105 (10500-10599)
Topic: 10554 - Calories from Fat
Replies: 6
Views: 2864

### Re: 10554 - Calories from Fat

Could anyone post more test cases ? I am almost sure that my algorithm is correct, but I am getting WA :( Idea of algorithm is: 1. convert grams to calories; 2. convert percents to calories; 3. when the whole dataset is read, sum up every type of ingridients and count percentage for fat I have teste...
Mon Feb 06, 2017 10:22 pm
Forum: Volume 1 (100-199)
Topic: 189 - Pascal Program Lengths
Replies: 12
Views: 2360

### Re: 189 - Pascal Program Lengths

Never mind, I found my silly mistake in parsing identifiers
Mon Feb 06, 2017 12:14 am
Forum: Volume 1 (100-199)
Topic: 189 - Pascal Program Lengths
Replies: 12
Views: 2360

### Re: 189 - Pascal Program Lengths

Could anyone help me with any tricky input ?
I have got Wrong Answer with 0.000 time and I have passed all cases posted in this thread ...
Fri Sep 02, 2016 9:06 pm
Forum: Volume 119 (11900-11999)
Topic: 11953 - Battleships
Replies: 23
Views: 6117

### Re: 11953 - Battleships

According to problem statement your case is incorrect.
Ships can be placed only horizontally or vertically, but look at bolded places - there are incorrectly placed ships.
8
@@@..@..
.....x..
..x..xx@
x..@x...
x.@x.xx.
.......x
Tue May 10, 2016 9:06 pm
Forum: Volume 7 (700-799)
Topic: 789 - Indexing
Replies: 3
Views: 2584

### Re: 789 - Indexing

Any hints on this problem ?

I checked if my output is sorted correctly (if not I should got RTE - it did not happen).

WHat should be a correct output if input looks like :

T
T.
.T.
T

??
T 3 or T 1 2 3?
Wed May 11, 2011 9:30 am
Forum: Volume 106 (10600-10699)
Replies: 11
Views: 6851

### Re: 10614 - Dreadful Vectors

Finally I got it
It's a simple parsing problem, but I must use long int (instead of int) to get Accepted
Thu Apr 21, 2011 2:14 pm
Forum: Volume 2 (200-299)
Topic: 266 - Stamping Out Stamps
Replies: 18
Views: 10079

Hmm, I got the same output as you :) But I got WA anyway ... so I don't know if your output is correct :( Could anyone help me with this problem ?? I use following algorithm (DP): for each stamp value (starting from highest value) I search for: 1. stamp with exact value => end 2. check every possibi...
Sat Apr 16, 2011 6:37 pm
Forum: Volume 6 (600-699)
Topic: 698 - Index
Replies: 21
Views: 8263

### Re: 698 - Index

All tricky tests were posted before I think.
Crytial thing is write to output even duplicated words in index (this was my mistake).
Thu Apr 14, 2011 7:27 am
Forum: Volume 8 (800-899)
Topic: 827 - Buddy Memory Allocator
Replies: 6
Views: 6307

### Re: 827 - Buddy Memory Allocator

I think, that specification of problem is a bit misleading. Consider this two sentences: 1. Whenever possible, an unnallocated buddy is merged with a companion buddy in order to form a larger free block. 2. Notice that, whenever there is a request that corresponds to a block of size s, your program ...
Sun Apr 03, 2011 2:44 pm
Forum: Volume 110 (11000-11099)
Topic: 11027 - Palindromic Permutation
Replies: 18
Views: 10932

### Re: 11027 - Palindromic Permutation

Very good sample Sohel :):)
I must rethink problem and found my mistake :)

BTW. I was very surprised, because I tested this code with many samples and miss samples, which leads to something like "aabb" as four last symbols to consider. :)
Sun Apr 03, 2011 12:58 am
Forum: Volume 110 (11000-11099)
Topic: 11027 - Palindromic Permutation
Replies: 18
Views: 10932

### Re: 11027 - Palindromic Permutation

I past through all samples in this topic, but I still get WA - I can't imagine why :(

Could anyone post more I/O ? Maybe empty strings are allowed in this problem ?

Best regards
DM

Below is my code:

Code: Select all

``````Deleted after got Accepted
``````
Thu Mar 31, 2011 1:09 pm
Forum: Volume 103 (10300-10399)
Topic: 10367 - Equations
Replies: 1
Views: 2219

### Re: 10367 - Equations

I have got Wrong Answer with my code, but I can't find mistake

Could anyone post me some I/O ?

Maybe I miss some special cases ?
Could anyone help me ... ?

NEVER MIND: I finally got Accepted I forgot about printing empty line between cases :-/
Sun Mar 27, 2011 1:05 am
Forum: Volume 102 (10200-10299)
Topic: 10212 - The Last Non-zero Digit.
Replies: 63
Views: 30558

### Re: 10212 - The Last Non Zero Digit

Finally I got it solved :)

I got 4,3s time (in the middle of all users, which solved this problem).
My only mistake was improper handling of integer overflow :(:(

Best regards
DM
Sat Mar 26, 2011 7:17 pm
Forum: Volume 101 (10100-10199)
Topic: 10157 - Expressions
Replies: 23
Views: 12056

### Re: 10157 - Expressions

Could anyone tell me if my IO is correct ??

Input:

Code: Select all

``````32 2
32 4
32 6
32 8
32 10
32 12
32 14
32 16
32 18
32 20
32 22
``````
Output:

Code: Select all

``````1
4782969
15411789
24623433
25725681
19567089
11434365
5285745
1961825
587305
141165
``````
Thank you all for help :)