Code: Select all

```
#include <stdio.h>
Thanks to every one
I cut the code after AC
```

**Moderator:** Board moderators

Code: Select all

```
dr=((double)tr/(double)co)+0.5000001;
dg=((double)tg/(double)co)+0.5000001;
db=((double)tb/(double)co)+0.5000001;
r=dr;
g=dg;
b=db;
```

Maybe you got AC. But if not is the case, you must read your onCircle function, the line

Code: Select all

```
long d = (p.x-c.x)*(p.x-c.x) + (p.y-c.y)*(p.x-c.y);
```

Code: Select all

```
long d = (p.x-c.x)*(p.x-c.x) + (p.y-c.y)*(p.y-c.y);
```

Greetings!

Time to post some I/O

Can anyone please post some critical Input/Output for this problem?

Is this I/O good?:

Input:
Output:
Thanks in advance!

Time to post some I/O

Can anyone please post some critical Input/Output for this problem?

Is this I/O good?:

Input:

Code: Select all

```
3
1 1
SQUARE 0 0 5 0 0 0
0 5
3 3
CIRCLE 0 0 5 10 10 10
SQUARE 1 1 5 255 10 10
CIRCLE 5 5 3 0 0 0
5 6
6 5
8 5
3 9
CIRCLE 0 0 7 255 0 0
SQUARE 2 -1 6 0 0 255
CIRCLE 4 7 4 0 255 0
2 8
1 5
6 4
3 4
4 0
7 2
0 0
3 -1
20 20
```

Code: Select all

```
Case 1:
(0, 0, 0)
Case 2:
(0, 0, 0)
(0, 0, 0)
(0, 0, 0)
Case 3:
(0, 255, 0)
(128, 128, 0)
(0, 128, 128)
(85, 85, 85)
(128, 0, 128)
(0, 0, 255)
(255, 0, 0)
(0, 0, 0)
(255, 255, 255)
```

Thanks Suman!

Now I need some critical input to test the precission of my code

Keep posting!

Now I need some critical input to test the precission of my code

Remember blank lines are only between test cases, maybe you are printing one extra line at the end of the output.sumankar wrote:My code (AC/PE)

Keep posting!

Code: Select all

```
r = (int)(((double)r+0.5)/(double)k );
g = (int)(((double)g+0.5)/(double)k);
b = (int)(((double)b+0.5)/(double)k);
```

Code: Select all

```
r = (int)(((double)r)/(double)k + 0.5);
g = (int)(((double)g)/(double)k + 0.5);
b = (int)(((double)b)/(double)k + 0.5);
```

Regards,

Suman.

I'll have to post my code to see if anyone can help me, because I am using:

unsigned int r, g, b, divisor;
and got WA, after your example, changed it to:
and still WA

Maybe the reading of the data?

unsigned int r, g, b, divisor;

Code: Select all

```
r = (double(r) / divisor) + .5;
g = (double(g) / divisor) + .5;
b = (double(b) / divisor) + .5;
```

Code: Select all

```
r = (double(r) / double(divisor)) + .5;
g = (double(g) / double(divisor)) + .5;
b = (double(b) / double(divisor)) + .5;
```

Maybe the reading of the data?

Code: Select all

`Code posted below.`

Last edited by _.B._ on Tue Mar 15, 2005 5:21 am, edited 1 time in total.

NOTE: Thanks sumankar. Changed code: added borde = false, but still WA

Greetings!

Here's part of my code for this problem. Any ideas?

Greetings!

Here's part of my code for this problem. Any ideas?

Code: Select all

`Code posted below.`

Last edited by _.B._ on Tue Mar 15, 2005 5:22 am, edited 3 times in total.