Answer:
Yes
Step-by-step explanation:
One way to prove it is by trying out all the possible combinations and see if the resulting set of numbers contains all the numbers from 1 to 40. You could code a program to do it omitting unnecessary calculations like those involving -27.
Proof that it is possible:
1 = 1
2 = 3-1
3 = 3
4 = 3+1
5 = 9-3-1
6 = 9-3
7 = 9-3+1
8 = 9-1
9 = 9
10 = 9+1
11 = 9+3-1
12 = 9+3
13 = 9+3+1
14 = 27-9-3-1
15 = 27-9-3
16 = 27-9-3+1
17 = 27-9-1
18 = 27-9
19 = 27-9+1
20 = 27-9+3-1
21 = 27-9+3
22 = 27-9+3+1
23 = 27-3-1
24 = 27-3
25 = 27-3+1
26 = 27-1
27 = 27
28 = 27+1
29 = 27+3-1
30 = 27+3
31 = 27+3+1
32 = 27+9-3-1
33 = 27+9-3
34 = 27+9-3+1
35 = 27+9-1
36 = 27+9
37 = 27+9+1
38 = 27+9+3-1
39 = 27+9+3
40 = 27+9+3+1