You can read in character by character to check.

Does your code work for the following input

Code: Select all

```
-47534985748395743925734895374598347589345734895734895764
```

**Moderator:** Board moderators

There are no illegal characters!!!

You can read in character by character to check.

Does your code work for the following input

Notice there is no lower bound on n in the problem statement.

You can read in character by character to check.

Does your code work for the following input

Code: Select all

```
-47534985748395743925734895374598347589345734895734895764
```

This means that the entire area of the haxagon must be covered by the parallelograms!

In otherwords, sum of the area of the parallelograms = area of hexagon.

If you make no parallelograms, the total area of them sum to 0,

which is not equal to the area of the hexagon. In english, dissect actually

means cut ... and

exist after the cutting... the hexagon becomes n parallelograms.

If you make 0 parallelograms, then the hexagon still exist!!!

2) If the first non-space character is "-", then your should return 0.

You know that it is negative. The problem says "

Thanks. Got it!!!baodog wrote:1) The problem says "dissect/divide a regular hexagoninton parallelograms of equal area", not make.

This means that the entire area of the haxagon must be covered by the parallelograms!

In otherwords, sum of the area of the parallelograms = area of hexagon.

If you make no parallelograms, the total area of them sum to 0,

which is not equal to the area of the hexagon. In english, dissect actually

means cut ... andintomeans that the hexagon must no longer

exist after the cutting... the hexagon becomes n parallelograms.

If you make 0 parallelograms, then the hexagon still exist!!!

2) If the first non-space character is "-", then your should return 0.

You know that it is negative. The problem says "otherwisereturn 0".

Well, then I can saybaodog wrote:There are no illegal characters!!!

You can read in character by character to check.

Does your code work for the following inputNotice there is no lower bound on n in the problem statement.Code: Select all

`-47534985748395743925734895374598347589345734895734895764`

Code: Select all

`-10000000 ... 700000000 characters`

Of course there is no lower bound on n!!!

Ami ekhono shopno dekhi...

HomePage

HomePage

the time limit of 6 seconds. There are countless problems

in the archive that says "a number of inputs" or "read in a text".

It is assumed they can be read in within the time limit, and

many more where numerical precision is not specified (double, float

, or infinite?).

For practical purposes, it's impossible to even submit

such a large test file by email to the archive.

In c/c++ gets(), fread() are faster functions. So, a dataset can be made where your scanf() will time out in reading but gets() won't.

And of course this is not the proper way to set judge data. The reason is you shouldn't trick people in reading the dataset. A good problem can have tricks, and of course the tricks should make sense.

For this problem you can say that for n = 0 the answer is 0. And yes, its a nice trick cause we have to dissect the hexagon (you described already). But I am sorry to say that the negative integers are clearly non-sense for this problem. May be you should think a while, I am sure that you will come up to this conclusion, too.

And of course this is not the proper way to set judge data. The reason is you shouldn't trick people in reading the dataset. A good problem can have tricks, and of course the tricks should make sense.

For this problem you can say that for n = 0 the answer is 0. And yes, its a nice trick cause we have to dissect the hexagon (you described already). But I am sorry to say that the negative integers are clearly non-sense for this problem. May be you should think a while, I am sure that you will come up to this conclusion, too.

Ami ekhono shopno dekhi...

HomePage

HomePage

Of course, the real story is that I was watching football and drinking beer after work when I made the dataset... but that's another story.