it's weird, but.. I wrote a solution, which gives answers in line with what is given here: http://www.cut-the-knot.org/ctk/Generat ... tml#change
For every amount of money between 0.01 and 2.00 inclusive it gives an answer in unnoticeable time. And it terminates when the input is either 0, 0. , 0.00, negative or just EOF. Despite that I get TLE
Thus here come my questions:
1. is my TLE related to the amount of data which is fed to the submited solutions ? If so, then my solution needs better algorithm. But lookign at the timings achieved by AC solutions it doesn't seem so :/
2. Maybe the input data format is wrong, and my solution awaits for data which never comes - leading to TLE ?
I have compiled and tested my program under gcc 2.95.3 and 3.4.6
thanks in advance
Wojtek
PS: my test generating script:
- Code: Select all
#!/usr/bin/php
<?php
for ($i = 0.01; $i <= 2.0; $i += 0.01)
printf ("%.2f\n", $i);
printf ("0\n");
?>
