Search found 7 matches

by AdamP
Tue May 10, 2005 6:36 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 29169

I got OJ to accept my code, however I'm getting WA. My code checks out for all of the sample data, it even tests for a case when there are 0 students, outputting that 0.000% are above average. Are there any other strange cases that I need to account for?
by AdamP
Tue May 10, 2005 5:41 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 29169

Yeah, still saying .c

I triple checked everything and still am getting the error =( is there a way to format the output w/o using the fixed function?

Here are the compiler error messages:

03553475_24.c: In function `int main()':
03553475_24.c:42: `fixed' undeclared (first use this function ...
by AdamP
Tue May 10, 2005 1:28 am
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 77076

10055 C++ WA

#include <iomanip.h>
#include <iostream.h>

int main ()
{
long double hashmat, other, difference;

while(cin >> hashmat >> other)
{
difference = hashmat - other;

if(difference < 0)
cout << (difference * -1) << endl;
else
cout << difference << endl;
}
}

The program works for all the Sample ...
by AdamP
Mon May 09, 2005 10:09 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 29169

CDiMa -

I tried to submit it again making sure I selected C++ as the type of code. I'm still getting the same compile error.

Is there another library I need to include?I'm only using

<iomanip.h>
<iostream.h>

Thanks
by AdamP
Sun May 08, 2005 4:34 am
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 29169

I'm getting a compile error when I run my program... here's the error

In order to get the right precision of the output I am using the "fixed" function found in the iomanip.h library. However the OJ doesn't like it, so I get a compile error, here's my code that's giving me an error and the error ...
by AdamP
Sat May 07, 2005 6:04 pm
Forum: Volume 107 (10700-10799)
Topic: 10763 - Foreign Exchange
Replies: 45
Views: 24742

thanks dan
by AdamP
Sat May 07, 2005 5:27 am
Forum: Volume 107 (10700-10799)
Topic: 10763 - Foreign Exchange
Replies: 45
Views: 24742

10763 help!

Trying to do the foreign exchange problem

I figured to read in the home and target destinations as 2 seperate arrays, sort them, then compare the results.

Ex:
3
1 2
2 3
3 1
YES

homeArray = {1, 2, 3}
targetArray = {3, 2, 1}

I sort them using merge sort and compare the elements in each, so ...

Go to advanced search