Can you tell me what I'm doing wrong ?
1. Normalizing all weights Wi = Wi / Sum(Wi=1..n).
2. Sorting of weights.
3. Recursively find solution with summary weigh 0.49..0.51.
I've got WA.
Maybe I should print bigger or smaller solution ?
Should I sort numbers of rocks in answer ?
Search found 5 matches
- Tue Sep 21, 2004 8:25 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10715 - Cat
- Replies: 11
- Views: 8363
- Fri Feb 20, 2004 12:06 pm
- Forum: C++
- Topic: End of Line in C/C++
- Replies: 3
- Views: 3166
- Mon Jan 05, 2004 10:14 am
- Forum: C++
- Topic: End of Line in C/C++
- Replies: 3
- Views: 3166
End of Line in C/C++
Hello!
Can you tell me, how can I check if there is EOLN (End Of LiNe (like in Pascal)) while reading from input.
Something like:
[pascal]
While Not EOLN(input) do
read(i);
[/pascal]
Can you tell me, how can I check if there is EOLN (End Of LiNe (like in Pascal)) while reading from input.
Something like:
[pascal]
While Not EOLN(input) do
read(i);
[/pascal]
- Thu Oct 02, 2003 1:04 pm
- Forum: Pascal
- Topic: Sorting in Pascal
- Replies: 2
- Views: 6797
- Wed Sep 17, 2003 11:02 am
- Forum: Pascal
- Topic: Sorting in Pascal
- Replies: 2
- Views: 6797
Sorting in Pascal
Hello!
Could you tell me if there is any function for sorting array
(Like qsort in C)
Could you tell me if there is any function for sorting array
(Like qsort in C)