Maybe anyone want to look at me code and try to find my mistake ? If anyone want - I send him/her my code

I don't want to post source on board ....
Regards
DM
Moderator: Board moderators
Code: Select all
5
2 2
2 0
0 0
0 2
1 3
5
0 0
2 0
2 2
1 3
0 2
5
1 3
0 2
0 0
2 0
2 2
7
0 0
0 3
1 4
2 3
4 4
4 1
2 1
7
0 0
2 1
4 1
4 4
2 3
1 4
0 3
25
9 7
4 5
10 10
8 10
7 9
6 9
5 10
4 7
3 8
2 8
0 10
2 6
1 5
2 4
0 3
3 2
2 1
5 0
4 2
6 4
6 2
7 5
7 1
8 0
10 1
25
9 7
10 1
8 0
7 1
7 5
6 2
6 4
4 2
5 0
2 1
3 2
0 3
2 4
1 5
2 6
0 10
2 8
3 8
4 7
5 10
6 9
7 9
8 10
10 10
4 5
3
4 1
3 4
1 2
3
4 1
1 2
3 4
32
0 0
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
11 121
12 144
13 169
14 196
15 225
16 256
17 289
18 324
19 361
20 400
21 441
22 484
23 529
24 576
25 625
26 676
27 729
28 784
29 841
30 900
31 961
20
12 144
13 169
14 196
15 225
16 256
17 289
18 324
19 361
20 324
21 441
22 324
23 529
24 324
25 625
26 324
27 729
28 784
29 841
30 900
31 961
63
0 0
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
11 121
12 144
13 169
14 196
15 225
16 256
17 289
18 324
19 361
20 400
21 441
22 484
23 529
24 576
25 625
26 676
27 729
28 784
29 841
30 900
31 961
32 900
33 841
34 784
35 729
36 676
37 625
38 576
39 529
40 484
41 441
42 400
43 361
44 324
45 289
46 256
47 225
48 196
49 169
50 144
51 121
52 100
53 81
54 64
55 49
56 36
57 25
58 16
59 9
60 4
61 1
62 0
0
Best regards.Tile #1
Wasted Space = 0.00 %
Tile #2
Wasted Space = 0.00 %
Tile #3
Wasted Space = 0.00 %
Tile #4
Wasted Space = 18.52 %
Tile #5
Wasted Space = 18.52 %
Tile #6
Wasted Space = 42.78 %
Tile #7
Wasted Space = 42.78 %
Tile #8
Wasted Space = 0.00 %
Tile #9
Wasted Space = 0.00 %
Tile #10
Wasted Space = 0.00 %
Tile #11
Wasted Space = 50.61 %
Tile #12
Wasted Space = 33.30 %
Code: Select all
04823365_24.c:136746872: sorry, not implemented: use of `method_call_expr' in template
04823365_24.c:136746872: sorry, not implemented: use of `exact_div_expr' in template
04823365_24.c: In function `class vector<int,allocator<int> > convex_hull<int>(const vector<pair<int,int>,allocator<pair<int,int> > > &)':
04823365_24.c:55: instantiated from here
04823365_24.c:136746872: invalid catch parameter
04823365_24.c:136746872: confused by earlier errors, bailing out
10065.cc wrote:Code removed after resolving the problem. Thanks.
Changing all typedefed PII to pair<int,int> didn't help. It gets the same compile errors. (I've edited my previous post so there is the modified (though bad) code.)Krzysztof Duleba wrote:Internal compiler error, nothing to see here folks, move along.
Seriously, change typedef pair<int,int> PII to a define or don't use it at all in definition of P if you want to avoid this problem with g++ 2.95.
Thanks for your help. Yes, __typeof(2) caused the CE. Fortunately __typeof(int(2)) works, so I've changed REP(i,2) to REP(i,int(2)) in my code to get compiled at OJ.Krzysztof Duleba wrote:This is a very cool code, removing pretty much everything completely changes how the compiler behaves, so when I initially refactored it to make it more readable I accidentally made it work
g++ 2.95 is not perfect, nor is it's implemention of templates and __typeof, especially on literals. It seems that the best long-term solution for you to avoid ICEs it either to change the implementation of REP or to always make sure that in templates you call __typeof on variables, not on literals.