I got WA! Help Please
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define PE 0.000001
class Shape
{
public:
virtual void read()=NULL;
virtual bool Contain(double x,double y)=NULL;
};
class Rectangle:Shape
{
double lx,ly,rx,ry;
public:
void read()
{
scanf("%lf %lf %lf %lf",&lx ...
Search found 36 matches
- Tue Nov 14, 2006 8:50 pm
- Forum: Volume 4 (400-499)
- Topic: 478 - Points in Figures: Rectangles, Circles, Triangles
- Replies: 44
- Views: 16084
- Fri Nov 03, 2006 12:17 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10012 - How Big Is It?
- Replies: 26
- Views: 15829
I only correct my formula to simply one and get AC.
Why with prev I got WA?????
Code: Select all
#define delta(x,y) 2*sqrt(rad[x]*rad[y])
- Thu Nov 02, 2006 10:46 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10012 - How Big Is It?
- Replies: 26
- Views: 15829
10012
I read all post before, and i pass all test. But WA. WHY? Help please!
Code: Select all
/* CUT*/
#define delta(x,y) sqrt((rad[x]+rad[y])*(rad[x]+rad[y])-abs(rad[x]-rad[y])*abs(rad[x]-rad[y]))
/*CUT*/
- Sun Sep 10, 2006 4:48 pm
- Forum: C++
- Topic: starting with c++
- Replies: 3
- Views: 2812
- Sat Sep 09, 2006 4:32 pm
- Forum: C++
- Topic: compiler version support for C++
- Replies: 3
- Views: 2582
- Sat Sep 09, 2006 10:39 am
- Forum: C++
- Topic: compiler version support for C++
- Replies: 3
- Views: 2582
- Fri Sep 08, 2006 8:32 pm
- Forum: C++
- Topic: Programming parallel algorithms
- Replies: 2
- Views: 2243
- Fri Sep 08, 2006 7:02 pm
- Forum: C++
- Topic: Programming parallel algorithms
- Replies: 2
- Views: 2243
Programming parallel algorithms
How Can I use threads in OJ?
- Mon Aug 28, 2006 10:08 am
- Forum: C++
- Topic: how I can read until eoln in c++?
- Replies: 5
- Views: 5369
- Mon Aug 28, 2006 10:01 am
- Forum: Volume 110 (11000-11099)
- Topic: 11070 - The Good Old Times
- Replies: 42
- Views: 21190
I corect my program and it's work with 1/.5 but still get WA.
After that I simple remove line
A get AC. But Why
?
if abs(res)<0.0001 the output must be 0.000, But it's wrong?
After that I simple remove line

Code: Select all
if (abs(res)<0.0001) printf("0.000\n");

if abs(res)<0.0001 the output must be 0.000, But it's wrong?
- Tue Aug 22, 2006 4:08 pm
- Forum: Off topic (General chit-chat)
- Topic: What kinds of problems do you solve most ?
- Replies: 25
- Views: 81380
- Mon Aug 21, 2006 11:27 am
- Forum: Volume 3 (300-399)
- Topic: 378 - Intersecting Lines
- Replies: 48
- Views: 24062
- Mon Aug 21, 2006 10:31 am
- Forum: Off topic (General chit-chat)
- Topic: What game do you like best?
- Replies: 17
- Views: 66021
- Sat Aug 19, 2006 1:39 pm
- Forum: Volume 7 (700-799)
- Topic: 739 - Soundex Indexing
- Replies: 39
- Views: 18000
- Sat Aug 19, 2006 1:08 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11070 - The Good Old Times
- Replies: 42
- Views: 21190
Help please
I get WA many times. Why? Help please!
#include <stdio.h>
#include <math.h>
double work(char *t1,int size)
{
if (*t1=='+') return work(t1+1,size-1);
double res=0;
for (int i=size-1;i>0;i--)
{
if (t1[i]=='+'||t1[i]=='-')
if (t1[i-1]!='/'&&t1[i-1]!='*')
{
res=work(t1,i);
if (t1[i ...
#include <stdio.h>
#include <math.h>
double work(char *t1,int size)
{
if (*t1=='+') return work(t1+1,size-1);
double res=0;
for (int i=size-1;i>0;i--)
{
if (t1[i]=='+'||t1[i]=='-')
if (t1[i-1]!='/'&&t1[i-1]!='*')
{
res=work(t1,i);
if (t1[i ...