Cody

# Problem 1875. GJam: 2013 China Event: Cannon Angle

Solution 457739

Submitted on 18 Jun 2014
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
%% tic vd=[249 6326 ]; exp=44.5948575; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

2   Fail
%% vd=[77 41 ]; exp=1.9429163; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

3   Fail
%% vd=[28 11 ]; exp=3.9516039; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

4   Fail
%% vd=[105 21 ]; exp=0.5347917; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

5   Fail
%% vd=[147 51 ]; exp=0.6626633; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

6   Fail
%% vd=[300 3210 ]; exp=10.2293872; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

7   Fail
%% vd=[219 61 ]; exp=0.3570850; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

8   Fail
%% vd=[240 41 ]; exp=0.1998405; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

9   Fail
%% vd=[179 3269 ]; exp=44.5041154; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

10   Fail
%% vd=[300 3480 ]; exp=11.1338133; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

11   Fail
%% vd=[102 81 ]; exp=2.1878908; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

12   Fail
%% vd=[121 51 ]; exp=0.9781434; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

13   Fail
%% vd=[138 31 ]; exp=0.4570257; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

14   Fail
%% vd=[210 4500 ]; exp=45.0000000; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

15   Fail
%% vd=[192 3761 ]; exp=44.4745779; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

16   Fail
%% vd=[37 41 ]; exp=8.5337735; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

17   Fail
%% vd=[32 41 ]; exp=11.5514232; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

18   Fail
%% vd=[199 81 ]; exp=0.5742839; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

19   Fail
%% vd=[300 3360 ]; exp=10.7304643; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

20   Fail
%% vd=[233 71 ]; exp=0.3671784; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

21   Fail
%% vd=[266 81 ]; exp=0.3214027; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

22   Fail
%% vd=[27 21 ]; exp=8.1988972; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

23   Fail
%% vd=[279 21 ]; exp=0.0757408; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

24   Fail
%% vd=[300 5230 ]; exp=17.3572961; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

25   Fail
%% vd=[279 51 ]; exp=0.1839431; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

26   Fail
%% vd=[218 21 ]; exp=0.1240585; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

27   Fail
%% vd=[300 7690 ]; exp=28.4309587; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

28   Fail
%% vd=[89 31 ]; exp=1.0990234; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

29   Fail
%% vd=[141 2028 ]; exp=44.2618026; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

30   Fail
%% vd=[178 81 ]; exp=0.7178094; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

31   Fail
%% vd=[132 71 ]; exp=1.1443126; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

32   Fail
%% vd=[300 690 ]; exp=2.1544417; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

33   Fail
%% vd=[300 6970 ]; exp=24.6861041; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

34   Fail
%% vd=[41 1 ]; exp=0.1670142; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

35   Fail
%% vd=[123 21 ]; exp=0.3897097; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

36   Fail
%% vd=[48 61 ]; exp=7.5190650; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

37   Fail
%% vd=[77 81 ]; exp=3.8470546; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

38   Fail
%% vd=[152 71 ]; exp=0.8628902; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

39   Fail
%% vd=[267 11 ]; exp=0.0433201; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

40   Fail
%% vd=[164 21 ]; exp=0.2192071; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

41   Fail
%% vd=[300 4310 ]; exp=13.9947943; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

42   Fail
%% vd=[256 71 ]; exp=0.3041622; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

43   Fail
%% vd=[192 41 ]; exp=0.3122545; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

44   Fail
%% vd=[300 7110 ]; exp=25.3662790; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

45   Fail
%% vd=[98 31 ]; exp=0.9063600; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

46   Fail
%% vd=[286 21 ]; exp=0.0720786; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

47   Fail
%% vd=[44 91 ]; exp=13.7142226; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

48   Fail
%% vd=[300 8360 ]; exp=32.7741901; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

49   Fail
%% vd=[300 5060 ]; exp=16.7170592; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

50   Fail
%% vd=[194 81 ]; exp=0.6042720; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

51   Fail
%% vd=[96 61 ]; exp=1.8595639; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

52   Fail
%% vd=[190 1 ]; exp=0.0077770; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

53   Fail
%% vd=[237 51 ]; exp=0.2549165; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

54   Fail
%% vd=[52 31 ]; exp=3.2254600; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

55   Fail
%% vd=[250 71 ]; exp=0.3189378; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

56   Fail
%% vd=[29 61 ]; exp=22.6508544; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

57   Fail
%% vd=[300 4030 ]; exp=13.0143792; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

58   Fail
%% vd=[39 31 ]; exp=5.7607904; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

59   Fail
%% vd=[62 61 ]; exp=4.4733355; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

60   Fail
%% vd=[246 61 ]; exp=0.2829993; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

61   Fail
%% vd=[86 51 ]; exp=1.9374169; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

62   Fail
%% vd=[252 91 ]; exp=0.4023216; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

63   Fail
%% vd=[275 11 ]; exp=0.0408363; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

64   Fail
%% vd=[49 81 ]; exp=9.6529702; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

65   Fail
%% vd=[127 11 ]; exp=0.1914728; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

66   Fail
%% vd=[223 61 ]; exp=0.3443890; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

67   Fail
%% vd=[160 21 ]; exp=0.2303047; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

68   Fail
%% vd=[196 31 ]; exp=0.2265546; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

69   Fail
%% vd=[55 91 ]; exp=8.5730698; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

70   Fail
%% vd=[110 1234 ]; exp=44.0395169; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

71   Fail
%% vd=[274 61 ]; exp=0.2281140; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

72   Fail
%% vd=[300 6800 ]; exp=23.8846446; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

73   Fail
%% vd=[300 3310 ]; exp=10.5630642; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

74   Fail
%% vd=[44 31 ]; exp=4.5141266; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

75   Fail
%% vd=[295 1 ]; exp=0.0032261; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

76   Fail
%% vd=[64 11 ]; exp=0.7540525; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

77   Fail
%% vd=[240 21 ]; exp=0.1023567; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

78   Fail
%% vd=[91 21 ]; exp=0.7120327; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

79   Fail
%% vd=[300 1870 ]; exp=5.8744286; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

80   Fail
%% vd=[300 1730 ]; exp=5.4290641; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

81   Fail
%% vd=[259 51 ]; exp=0.2134486; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

82   Fail
%% vd=[51 91 ]; exp=10.0258563; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

83   Fail
%% vd=[300 4200 ]; exp=13.6075829; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

84   Fail
%% vd=[262 81 ]; exp=0.3312919; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

85   Fail
%% vd=[74 81 ]; exp=4.1674764; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

86   Fail
%% vd=[88 81 ]; exp=2.9417237; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

87   Fail
%% vd=[255 91 ]; exp=0.3929103; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

88   Fail
%% vd=[72 41 ]; exp=2.2226617; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

89   Fail
%% vd=[300 7900 ]; exp=29.6707716; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

90   Fail
%% vd=[300 1620 ]; exp=5.0800699; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

91   Fail
%% vd=[253 71 ]; exp=0.3114186; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

92   Fail
%% vd=[265 91 ]; exp=0.3638145; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

93   Fail
%% vd=[248 1 ]; exp=0.0045647; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

94   Fail
%% vd=[300 6090 ]; exp=20.7696393; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

95   Fail
%% vd=[158 71 ]; exp=0.7985813; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

96   Fail
%% vd=[300 2170 ]; exp=6.8338053; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

97   Fail
%% vd=[300 1500 ]; exp=4.7002140; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

98   Fail
%% vd=[163 31 ]; exp=0.3275780; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

99   Fail
%% vd=[139 31 ]; exp=0.4504729; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

100   Fail
%% vd=[271 21 ]; exp=0.0802786; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

101   Fail
%% vd=[113 41 ]; exp=0.9016072; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

102   Fail
%% vd=[156 81 ]; exp=0.9346125; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

103   Fail
%% vd=[100 61 ]; exp=1.7135925; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

104   Fail
%% vd=[85 91 ]; exp=3.5451226; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

105   Fail
%% vd=[43 61 ]; exp=9.4316060; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

106   Fail
%% vd=[57 61 ]; exp=5.3012744; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

107   Fail
%% vd=[136 61 ]; exp=0.9260755; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

108   Fail
%% vd=[300 5200 ]; exp=17.2436039; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

109   Fail
%% vd=[159 71 ]; exp=0.7885653; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

110   Fail
%% vd=[86 61 ]; exp=2.3180653; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

111   Fail
%% vd=[300 8140 ]; exp=31.2094004; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

112   Fail
%% vd=[300 5190 ]; exp=17.2057754; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

113   Fail
%% vd=[259 6845 ]; exp=45.0000000; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

114   Fail
%% vd=[300 6570 ]; exp=22.8379951; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

115   Fail
%% vd=[285 71 ]; exp=0.2454102; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

116   Fail
%% vd=[300 6460 ]; exp=22.3511092; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

117   Fail
%% vd=[75 573 ]; exp=43.3260450; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

118   Fail
%% vd=[46 41 ]; exp=5.4730826; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

119   Fail
%% vd=[52 21 ]; exp=2.1824862; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

120   Fail
%% vd=[300 5950 ]; exp=20.1913108; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

121   Fail
%% vd=[68 91 ]; exp=5.5599659; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

122   Fail
%% vd=[64 21 ]; exp=1.4399949; theta=Cannon(vd(1),vd(2)); assert(abs(theta-exp)<2e-6)

Error: Assertion failed.

123   Fail