837 - Light and Transparencies
Moderator: Board moderators
837 - Light and Transparencies
I have tested my programs with other inputs such as the following:
3
3
2.0 2.0 9.0 2.0 0.9
13.5 2.0 4.0 8.5 0.7
17.0 10.0 7.0 8.5 0.8
8
6.0 2.0 24.0 2.0 0.9
5.5 2.0 22.0 8.5 0.7
9.0 10.0 18.0 8.5 0.8
16.0 2.0 16.0 2.0 0.9
8.5 2.0 15.0 8.5 0.7
4.0 10.0 11.0 8.5 0.8
2.2 2.0 5.0 2.0 0.9
90.5 2.0 1.0 8.5 0.7
2
1.0 2.0 2.0 2.0 0.9
4.5 2.0 6.0 8.5 0.7
and it gives 'logically' correct answers (which is the following:)
7
-inf 2.000 1.000
2.000 4.000 0.900
4.000 7.000 0.630
7.000 9.000 0.504
9.000 13.500 0.560
13.500 17.000 0.800
17.000 +inf 1.000
17
-inf 1.000 1.000
1.000 2.200 0.700
2.200 4.000 0.630
4.000 5.000 0.504
5.000 5.500 0.560
5.500 6.000 0.392
6.000 8.500 0.353
8.500 9.000 0.247
9.000 11.000 0.198
11.000 15.000 0.247
15.000 16.000 0.353
16.000 16.000 0.318
16.000 18.000 0.318
18.000 22.000 0.441
22.000 24.000 0.630
24.000 90.500 0.700
90.500 +inf 1.000
5
-inf 1.000 1.000
1.000 2.000 0.900
2.000 4.500 1.000
4.500 6.000 0.700
6.000 +inf 1.000
yet I keep on getting WA all the time...
could somebody check on this?
3
3
2.0 2.0 9.0 2.0 0.9
13.5 2.0 4.0 8.5 0.7
17.0 10.0 7.0 8.5 0.8
8
6.0 2.0 24.0 2.0 0.9
5.5 2.0 22.0 8.5 0.7
9.0 10.0 18.0 8.5 0.8
16.0 2.0 16.0 2.0 0.9
8.5 2.0 15.0 8.5 0.7
4.0 10.0 11.0 8.5 0.8
2.2 2.0 5.0 2.0 0.9
90.5 2.0 1.0 8.5 0.7
2
1.0 2.0 2.0 2.0 0.9
4.5 2.0 6.0 8.5 0.7
and it gives 'logically' correct answers (which is the following:)
7
-inf 2.000 1.000
2.000 4.000 0.900
4.000 7.000 0.630
7.000 9.000 0.504
9.000 13.500 0.560
13.500 17.000 0.800
17.000 +inf 1.000
17
-inf 1.000 1.000
1.000 2.200 0.700
2.200 4.000 0.630
4.000 5.000 0.504
5.000 5.500 0.560
5.500 6.000 0.392
6.000 8.500 0.353
8.500 9.000 0.247
9.000 11.000 0.198
11.000 15.000 0.247
15.000 16.000 0.353
16.000 16.000 0.318
16.000 18.000 0.318
18.000 22.000 0.441
22.000 24.000 0.630
24.000 90.500 0.700
90.500 +inf 1.000
5
-inf 1.000 1.000
1.000 2.000 0.900
2.000 4.500 1.000
4.500 6.000 0.700
6.000 +inf 1.000
yet I keep on getting WA all the time...
could somebody check on this?
I have similar problems
I have the same problem than you. We should think of more test cases, I suppose. For instance, I think that the solution for the second case you propose is wrong. Mine is:
15
-inf 1.000 1.000
1.000 2.200 0.700
2.200 4.000 0.630
4.000 5.000 0.504
5.000 5.500 0.560
5.500 6.000 0.392
6.000 8.500 0.353
8.500 9.000 0.247
9.000 11.000 0.198
11.000 15.000 0.247
15.000 18.000 0.353
18.000 22.000 0.441
22.000 24.000 0.630
24.000 90.500 0.700
90.500 +inf 1.000
This is because I think that segments with x1 = x2 should be ignored.
Regards,
UAMike
15
-inf 1.000 1.000
1.000 2.200 0.700
2.200 4.000 0.630
4.000 5.000 0.504
5.000 5.500 0.560
5.500 6.000 0.392
6.000 8.500 0.353
8.500 9.000 0.247
9.000 11.000 0.198
11.000 15.000 0.247
15.000 18.000 0.353
18.000 22.000 0.441
22.000 24.000 0.630
24.000 90.500 0.700
90.500 +inf 1.000
This is because I think that segments with x1 = x2 should be ignored.
Regards,
UAMike
837 - Light and Transparencies
I tried following test cases, and failed with "Wrong Answer".
Input:
5
1
-0.3 3.0 1.5 3.0 1.0
1
-0.3 3.0 1.5 3.0 0.8
2
-0.3 3.0 1.5 3.0 1.0
2.0 3.0 -0.0 3.0 0.7
2
-0.3 3.0 1.5 3.0 1.0
2.0 3.0 -0.0 3.0 0.7
4
1 3.0 2 3.0 0.9
2 3.0 4 3.0 0.9
3 3.0 5 3.0 0.9
4 3.0 6 3.0 1.0
output:
1
-inf +inf 1.000
3
-inf -0.300 1.000
-0.300 1.500 0.800
1.500 +inf 1.000
3
-inf 0.000 1.000
0.000 2.000 0.700
2.000 +inf 1.000
3
-inf 0.000 1.000
0.000 2.000 0.700
2.000 +inf 1.000
5
-inf 1.000 1.000
1.000 3.000 0.900
3.000 4.000 0.810
4.000 5.000 0.900
5.000 +inf 1.000
Could somebody help me check it?
If interested, please paste your test cases on the board. Thanks very much.
Input:
5
1
-0.3 3.0 1.5 3.0 1.0
1
-0.3 3.0 1.5 3.0 0.8
2
-0.3 3.0 1.5 3.0 1.0
2.0 3.0 -0.0 3.0 0.7
2
-0.3 3.0 1.5 3.0 1.0
2.0 3.0 -0.0 3.0 0.7
4
1 3.0 2 3.0 0.9
2 3.0 4 3.0 0.9
3 3.0 5 3.0 0.9
4 3.0 6 3.0 1.0
output:
1
-inf +inf 1.000
3
-inf -0.300 1.000
-0.300 1.500 0.800
1.500 +inf 1.000
3
-inf 0.000 1.000
0.000 2.000 0.700
2.000 +inf 1.000
3
-inf 0.000 1.000
0.000 2.000 0.700
2.000 +inf 1.000
5
-inf 1.000 1.000
1.000 3.000 0.900
3.000 4.000 0.810
4.000 5.000 0.900
5.000 +inf 1.000
Could somebody help me check it?
If interested, please paste your test cases on the board. Thanks very much.
p837 - Just 1 question
So, anyone can tell me this:
When the input is(for example):
1
2.0 2.0 4.0 2.0 1.0
The output has to be:
1
-inf +inf 1.000
or can be:
3
-inf 2.000 1.000
2.000 4.000 1.000
4.000 +inf 1.000
When the input is(for example):
1
2.0 2.0 4.0 2.0 1.0
The output has to be:
1
-inf +inf 1.000
or can be:
3
-inf 2.000 1.000
2.000 4.000 1.000
4.000 +inf 1.000
The transparency coefficients could be zero (I think). There are then some special cases. I think I handle zero coefficients but I've got wrong answer, too. And I have a question: Which is the correct answer for this input:
Input:
1
1
1 3 2 3 1
Ouput1:
1
-inf +inf 1.000
Output2:
3
-inf 1.000 1.000
1.000 2.000 1.000
2.000 +inf 1.000
Input:
1
1
1 3 2 3 1
Ouput1:
1
-inf +inf 1.000
Output2:
3
-inf 1.000 1.000
1.000 2.000 1.000
2.000 +inf 1.000
having finally solved this, the correct reply to the input above is:
3
-inf -0.300 1.000
-0.300 1.500 1.000
1.500 +inf 1.000
3
-inf -0.300 1.000
-0.300 1.500 0.800
1.500 +inf 1.000
5
-inf -0.300 1.000
-0.300 0.000 1.000
0.000 1.500 0.700
1.500 2.000 0.700
2.000 +inf 1.000
5
-inf -0.300 1.000
-0.300 0.000 1.000
0.000 1.500 0.700
1.500 2.000 0.700
2.000 +inf 1.000
7
-inf 1.000 1.000
1.000 2.000 0.900
2.000 3.000 0.900
3.000 4.000 0.810
4.000 5.000 0.900
5.000 6.000 1.000
6.000 +inf 1.000
3
-inf -0.300 1.000
-0.300 1.500 1.000
1.500 +inf 1.000
3
-inf -0.300 1.000
-0.300 1.500 0.800
1.500 +inf 1.000
5
-inf -0.300 1.000
-0.300 0.000 1.000
0.000 1.500 0.700
1.500 2.000 0.700
2.000 +inf 1.000
5
-inf -0.300 1.000
-0.300 0.000 1.000
0.000 1.500 0.700
1.500 2.000 0.700
2.000 +inf 1.000
7
-inf 1.000 1.000
1.000 2.000 0.900
2.000 3.000 0.900
3.000 4.000 0.810
4.000 5.000 0.900
5.000 6.000 1.000
6.000 +inf 1.000
-
- New poster
- Posts: 19
- Joined: Sun Aug 17, 2003 10:40 pm
hmmm
hi there could anyone tell me wich is the output for :
is ...
Or it should be the following ?
Code: Select all
5
1 1 3 1 0.2
2 2 4 2 0
3 3 6 3 0.7
5 4 6 4 0.6
7 5 8 5 0.1
Code: Select all
10
-inf 1.000 1.000
1.000 2.000 0.200
2.000 3.000 0.000
3.000 3.000 0.000
3.000 4.000 0.000
4.000 5.000 0.700
5.000 6.000 0.420
6.000 7.000 1.000
7.000 8.000 0.100
8.000 +inf 1.000
Code: Select all
8
-inf 1.000 1.000
1.000 2.000 0.200
2.000 4.000 0.000
4.000 5.000 0.700
5.000 6.000 0.420
6.000 7.000 1.000
7.000 8.000 0.100
8.000 +inf 1.000
-
- New poster
- Posts: 1
- Joined: Fri Jul 23, 2010 5:25 pm
Re: 837 - Light and Transparencies
The outputs of two consecutive cases will be separated by a blank line.
So, the final case does not have a blank line.
So, the final case does not have a blank line.