Search found 36 matches

by Zaspire
Tue Nov 14, 2006 8:50 pm
Forum: Volume 4 (400-499)
Topic: 478 - Points in Figures: Rectangles, Circles, Triangles
Replies: 44
Views: 16084

478 Help Please!

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 ...
by Zaspire
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.

Code: Select all

#define delta(x,y) 2*sqrt(rad[x]*rad[y])
Why with prev I got WA?????
by Zaspire
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*/
by Zaspire
Sun Sep 10, 2006 4:48 pm
Forum: C++
Topic: starting with c++
Replies: 3
Views: 2812

I think the best IDE is Visual Studio 2005.
You can get it(express edition) for free from Microsoft.com
by Zaspire
Sat Sep 09, 2006 4:32 pm
Forum: C++
Topic: compiler version support for C++
Replies: 3
Views: 2582

I think no.
by Zaspire
Sat Sep 09, 2006 10:39 am
Forum: C++
Topic: compiler version support for C++
Replies: 3
Views: 2582

g++ (version 2.95)
by Zaspire
Fri Sep 08, 2006 8:32 pm
Forum: C++
Topic: Programming parallel algorithms
Replies: 2
Views: 2243

Very bad :cry:
On my computer (Duron 800 WinXp) Pipeline speed up my programm(-10%)
by Zaspire
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?
by Zaspire
Mon Aug 28, 2006 10:08 am
Forum: C++
Topic: how I can read until eoln in c++?
Replies: 5
Views: 5369

You can simple get line and then use std::istringstream
by Zaspire
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 :P

Code: Select all

if (abs(res)<0.0001) printf("0.000\n");
A get AC. But Why :o ?
if abs(res)<0.0001 the output must be 0.000, But it's wrong?
by Zaspire
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

I like Math, DP and Decoding problem, :D But I'am trying to solve all kinds of the problems.
by Zaspire
Mon Aug 21, 2006 11:27 am
Forum: Volume 3 (300-399)
Topic: 378 - Intersecting Lines
Replies: 48
Views: 24062

May be you need some correct in you code:
int x1,y1,x2,y2,x3,y3,x4,y4
if(fabs((c1/b1)-(c2/b2))<0.001)
by Zaspire
Mon Aug 21, 2006 10:31 am
Forum: Off topic (General chit-chat)
Topic: What game do you like best?
Replies: 17
Views: 66021

Super Mario :D
NFSMW
by Zaspire
Sat Aug 19, 2006 1:39 pm
Forum: Volume 7 (700-799)
Topic: 739 - Soundex Indexing
Replies: 39
Views: 18000

I don't initializing memory(out).
That why WA.
by Zaspire
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 ...

Go to advanced search