Search found 4 matches

by Terro
Mon Sep 03, 2007 3:23 pm
Forum: Volume 103 (10300-10399)
Topic: 10382 - Watering Grass
Replies: 29
Views: 17132

Jan wrote:Check the following files...

Input
Ouput
Hope these help.
I've been really confused. I checked my program using these datas just now. It worked well. But I still got a WA.
So what should I exactly do?
by Terro
Sun Sep 02, 2007 10:29 am
Forum: Volume 103 (10300-10399)
Topic: 10382 - Watering Grass
Replies: 29
Views: 17132

Jan wrote:Try the cases.

Input:

Code: Select all

2 26 6
4 10
16 14
10 6 37
20 4
19 20
19 2
8 4
7 19
7 14
3 17
1 19
18 1
15 19
Output:

Code: Select all

2
2
Hope these help.
Really thanks for your datas. It just helped me find a mistake. But I still get WA. I've been very confused. Could you please give me some advice? Thanks a lot.
by Terro
Sat Sep 01, 2007 5:16 pm
Forum: Volume 103 (10300-10399)
Topic: 10382 - Watering Grass
Replies: 29
Views: 17132

I havent checked why you are getting RTE but I can say that your code isnt correct. Check the case

Input:
12 28 15
1 10
5 19
19 3
5 6
6 2
8 2
12 16
3 8
17 12
5 3
14 13
3 2
Output:
-1
Hope it helps.

Thanks a lot.
I've modified my program. And I didn't get RE. But after modifying, I got WA ...
by Terro
Sat Sep 01, 2007 3:44 pm
Forum: Volume 103 (10300-10399)
Topic: 10382 - Watering Grass
Replies: 29
Views: 17132

why runtime error?

A strange problem:
My program can run well when inputting the sample data and the data from Jan. But when I submit, I got a Runtime Error:

Your program has died with signal 11 (SIGSEGV). Meaning:
Invalid memory reference

Here is my program:
#include <iostream>
#include <cmath>
#include <cstdlib ...

Go to advanced search