Page **2** of **2**

Posted: **Sat Oct 01, 2005 4:44 pm**

by **kp**

misof wrote:kp wrote:I see...

Does anybody know how to use

such routines as printf("%.2f") in PASCAL?

I believe Format() is restricted ?!

var x : double;

x := 1.2345;

writeln(x:0:2); { 0 is the total # of chars (if non-zero, aligns right), 2 is the # of decimal places }

Thanks, but that's exactly what I'am doing...

BTW, I figured out one more thing. Code:

x:= 130.125;

writeln(x:0:2);

gives 130.13 if compiled with Delphi (my native compiler)

but gives 130.12 if compiled with FreePascal

So, what I see is not what I get

Will try to get AC...

Posted: **Sat Oct 01, 2005 5:49 pm**

by **kp**

FINALLY...

Thanks to misof, Cho and little joey.

My mistake was pretty stuppid:

while reading vertexes of polygon I assumed

that some of them might be on one line and

tried to delete useless vertexes "on the fly", but I did it not properly.

Posted: **Tue Oct 04, 2005 8:46 am**

by **ImLazy**

My output for Cho's test data (I just talk about the valid ones in his test input) is a little different with Misof's, some of them are 0.01 more than Misof's. Maybe my algorithm loses precision. But still I get AC. This means the test input of the online judge is not very strict in precision, I think.

Posted: **Tue Jun 06, 2006 2:45 pm**

by **shanto86**

I can't find mistake in this code. can anyone please help?

Posted: **Tue Jun 06, 2006 2:46 pm**

by **shanto86**

I think it is too strange! i don't know what i changed but it got AC!

Posted: **Tue Aug 22, 2006 1:50 pm**

by **DJWS**

Thanks to pervious people.

Test data you supply are very useful.

Here is test case #27 you metioned:

Code: Select all

```
9
18 2
19 18
14 19
6 19
3 18
2 7
2 6
15 2
7 1
1
3 6
```

Here is output:

I made mistake about array manipulation. (I just forgot to mod N somewhere)

This test data should verify that.

Hope this helps.

--

DJWS, a newbie in programming

Posted: **Tue Sep 19, 2006 11:33 am**

by **hank**

ImLazy wrote:My output for Cho's test data (I just talk about the valid ones in his test input) is a little different with Misof's, some of them are 0.01 more than Misof's. Maybe my algorithm loses precision. But still I get AC. This means the test input of the online judge is not very strict in precision, I think.

Yes. My output for Cho's test data is also a little different.

But i got AC too.

Posted: **Sat Mar 08, 2008 7:41 am**

by **Anindya**

Can anybody help me on this problem?

I have tried every i/o posted in this forum & passed them all.

I can't find any error in my codes.

Can any one give me some test cases?