10195 - The Knights Of The Round Table

All about problems in Volume 101. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

sohel
Guru
Posts: 856
Joined: Thu Jan 30, 2003 5:50 am
Location: New York

Post by sohel »

seems to be correct..
.. but watch out for outputs like -0.000.

J&Jewel
New poster
Posts: 50
Joined: Thu Jul 31, 2003 10:43 am
Location: Daffodil University,Dhaka,Bangladesh
Contact:

Post by J&Jewel »

Thanks I get Ac..
I hate Wrong Answer!

asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

10195

Post by asif_rahman0 »

Here is my code.Plz tell me where is the mistakes?
#include<stdio.h>
#include<math.h>

void main()
{
double a,b,c,S,r;
while(1)
{
scanf("%lf %lf %lf",&a,&b,&c);
if(feof(stdin))
break;
S=(a+b+c)/2;
r = sqrt((S-a)*(S-b)*(S-c)/S);
printf("The radius of the round table is: %.3lf",r);
}
}

asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

10195

Post by asif_rahman0 »

Here is my code.Plz tell me where is the mistakes?
#include<stdio.h>
#include<math.h>

void main()
{
double a,b,c,S,r;
while(1)
{
scanf("%lf %lf %lf",&a,&b,&c);
if(feof(stdin))
break;
S=(a+b+c)/2;
r = sqrt((S-a)*(S-b)*(S-c)/S);
printf("The radius of the round table is: %.3lf",r);
}
}

Sanny
Learning poster
Posts: 78
Joined: Sat Feb 14, 2004 3:59 pm
Location: BUET
Contact:

Post by Sanny »

If any of the sides are zero, the area should be zero.

J&Jewel
New poster
Posts: 50
Joined: Thu Jul 31, 2003 10:43 am
Location: Daffodil University,Dhaka,Bangladesh
Contact:

Post by J&Jewel »

to....asif
If s=0 then divide error should be occur.....( )/s.
so if s=0 then just print 0.000

I hope u get accepted.
I hate Wrong Answer!

Rocky
Experienced poster
Posts: 124
Joined: Thu Oct 14, 2004 9:05 am
Contact:

About 10195

Post by Rocky »

That's The Main Case Of This Problem.
I Think Now You Get AC ASiF.

Jemerson
Learning poster
Posts: 59
Joined: Mon Feb 02, 2004 11:19 pm
Contact:

10195 - Java WA HEEEEELLLPPP

Post by Jemerson »

#JAVA

Code: Select all

 Accepted
Guess im facing precision errors, can anyone please check it?

Thanx
[/quote]

smilitude
Experienced poster
Posts: 137
Joined: Fri Jul 01, 2005 12:21 am

10195 WA WA WA

Post by smilitude »

I dont know, why I am getting so glorious WAs( :evil: )in this FALTOO problem.
If you know, why this GLORIOUS thing is happening to me... plz let me know...

Code: Select all

cut
[code]
Last edited by smilitude on Wed Oct 12, 2005 2:51 am, edited 1 time in total.
fahim
#include <smile.h>

kwedeer
New poster
Posts: 44
Joined: Thu Dec 15, 2005 11:28 pm

Post by kwedeer »

why I am reciving WA? Any idea, please? All seems to be perfect and task seems to be pretty simple...

Here is my code:

Code: Select all

program Prg10195(input, output);

{$APPTYPE CONSOLE}

uses
  SysUtils;
{simple use of triangle formula???}
var  
  a,b,c,S,res: double;
  resp: string;
begin
    {
  AssignFile(Input, 'in10__.txt');
  Reset(Input);
  AssignFile(Output, 'out10__.txt');
  Rewrite(Output);}
  while (not Eof) do begin
    read(a);
    read(b);
    read(c);
    if ((a=0.0) or
        (b=0.0) or
        (c=0.0)) then begin
      res:=0.0;
    end else begin
      S:=((a+b+c)/2.0);
      res:=sqrt(( (S-a)*(S-b)*(S-c) )/S);
    end;
    resp:=Format('The radius of the round table is: %.3f', [res]);
    writeln(resp);
  end;
end.
Thanx for any hint in advance!

kwedeer
New poster
Posts: 44
Joined: Thu Dec 15, 2005 11:28 pm

Post by kwedeer »

Is any established procedure (in the sense of usual quality management practices in software development industry) how to overcome this case - I have code (OK, pretty small - but this is not a issue here) that conforms to all imaginable test cases and it is rejected by judge... OK - usual advice here was - to publish code... I did - but no any feedbacj till now...

I can sey n-time pleaz, pleaz, pleaz - with hope - that it can help...

:((((((((((((((((((

Debashis Maitra
Learning poster
Posts: 62
Joined: Sun Jul 09, 2006 8:31 am
Location: University of Dhaka
Contact:

Why WA

Post by Debashis Maitra »

Why WA

Code: Select all


      removed
Last edited by Debashis Maitra on Fri Dec 08, 2006 6:28 pm, edited 2 times in total.
Akash chhoyar swopno
Dream to touch the sky

helloneo
Guru
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea

Post by helloneo »

your formula is wrong..
check it again.. :D

Debashis Maitra
Learning poster
Posts: 62
Joined: Sun Jul 09, 2006 8:31 am
Location: University of Dhaka
Contact:

Post by Debashis Maitra »

thanx
helloneo
Akash chhoyar swopno
Dream to touch the sky

starrynight
New poster
Posts: 7
Joined: Mon Mar 05, 2007 3:24 pm

10195--CE

Post by starrynight »

int main()
{
double a ,b ,c ,r ,s ,s2 ,area;

while (scanf("%lf %lf %lf",&a,&b,&c) != EOF)
{

s = ( a + b + c ) / 2.0;
area = sqrt(s * (s-a) * (s-b) * (s-c));
s2 = a + b + c;
r = 2.0 * area * (1.0 / s2);
printf("The radius of the round table is: %.3lf\n",r);



}

return 0;
}

i wrote this in C!
who can tell me why i got a CE?
thx :D

Post Reply

Return to “Volume 101 (10100-10199)”