Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Time Exceeded. And the exit code of your program is -9, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
0 839 975 959 -6 829 794 -12 -8 749 -16 -4 -10 954 767 -17 -16 -18 789 854 -25 -22 786 -26 745 853 -27 -35 -26 -18 -35 -26 -17 -27 -23 913 761 -21 -29 -21 -32 -36 -9 -36 -36 -25 -39 -24 -39 -33 -25 -45 -40 -33 -31 -54 -35 -36 -62 -50 -28 -37 -39 -41 -46 -50 -46 -62 -63 -41 -38 -67 -70 -53 -72 -81 -71 -53 -77 -82 -61 -47 -86 -57 -64 -95 -70 -73 -71 -77 -89 -86 -97 -94 -46 -77 -77 -77 -93 -99 -84 -100 -52 -83 -82 -90 -78 -81 -81 -95 -105 -89 -101 -100 -103 -91 -94 -99 -97 -107 -113 -98 -102 -103 -86 -114 -85 -104 -105 -93 -112 -106 -101 -122 -100 -102 -120 -106 -124 -109 -122 -112 -114 -85 -106 -114 -119 -122 -124 -119 -128 -124 -111 -128 -132 -129 -128 -106 -137 -132 -132 -135 -130 -141 -131 -146 -133 -135 -147 -145 -135 -140 -146 -140 -154 -126 -149 -130 -151 -157 -158 -144 -161 -155 -148 -143 -150 -159 -138 -161 -165 -154 -162 -144 -140 -171 -167 -171 -169 -168 -162 -169 -178 -178 -185 -159 -176 -169 -188 -187 -179 -188 -168 -194 -177 -193 -178 -204 -169 -195 -192 -190 -213 -202 -201 -195 -179 -158 -197 -217
JOJ Answer
-117 784 -23 -177 798 -121 -46 749 811 824 833 -9 772 1094 -88 839 -80 863 -142 -209 -143 -31 -33 875 -81 -214 -19 843 -19 842 779 925 1358 904 -16 -54 765 803 -49 839 1073 -93 847 956 -18 -129 -56 -45 -102 852 -58 -95 -11 928 2009 913 927 -42 -140 825 934 897 763 -92 -66 858 750 966 -13 818 -38 801 912 896 -104 821 807 -57 750 843 -19 -100 -70 848 -73 -10 -57 796 813 761 871 -54 800 801 -16 783 925 -129 821 -43 -81 916 -18 897 1024 919 -13 -28 -160 1003 986 756 808 -65 898 1542 959 -45 750 946 -27 -53 840 884 -66 889 -22 -71 -60 -38 852 837 912 833 -136 -38 -99 -78 -89 -153 972 -78 -64 923 -102 814 837 776 895 -18 763 -95 -19 886 766 773 -97 993 -128 804 794 -65 -112 836 -170 803 -215 811 950 -139 776 -88 798 1246 804 -96 788 795 -85 -198 -78 823 -164 1092 -103 805 984 989 -128 749 -31 756 782 864 -65 750 910 909 859 -114 1011 -76 796 936 923 -91 -43 862 -12 806 -78 780 969 837 824 786 916 924 -79 769 1170 856 1071 -49 -37 873 827 -43 1942 -120 932 -161 980 -72 854 796 -172 -14 852 -83 1476 -100 831 922 -25