Search found 2 matches

by VarunGupta
Tue Jul 15, 2008 3:08 pm
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 70846

Re: 10137 - The Trip

Some of the test cases can be ambiguous. eg.
3
6.17
5.00
4.03

In this case the average comes to be 5.066666...
Now, if we round it of to 5.06 the answer comes to be $1.09 and if the average is rounded to 5.07, answer will be $1.11. But $1.10 is the answer is listed in the test cases posted above ...
by VarunGupta
Thu Jul 03, 2008 12:58 pm
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 70846

Re: 10137 - The Trip

I tested following code on my local machine for given and some other test cases but received "Wrong Answer" response from the Online Judge,

#include <iostream>
#include <vector>

using namespace std;

int main()
{
int n;
while(cin >> n)
{
if (n == 0)
{
break;
}
float av, s = 0.00, rs = 0 ...

Go to advanced search