diff --git a/CodeJam2014/.classpath b/CodeJam2014/.classpath new file mode 100644 index 0000000..f0f78fc --- /dev/null +++ b/CodeJam2014/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/CodeJam2014/.project b/CodeJam2014/.project new file mode 100644 index 0000000..93a1567 --- /dev/null +++ b/CodeJam2014/.project @@ -0,0 +1,17 @@ + + + CodeJam2014 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/CodeJam2014/.settings/org.eclipse.jdt.core.prefs b/CodeJam2014/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8000cd6 --- /dev/null +++ b/CodeJam2014/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/CodeJam2014/Output.op b/CodeJam2014/Output.op new file mode 100644 index 0000000..e966f19 --- /dev/null +++ b/CodeJam2014/Output.op @@ -0,0 +1,100 @@ +Case #1: 26693.474863443684 +Case #2: 228.50440147802922 +Case #3: 192.30334 +Case #4: 23605.836811034475 +Case #5: 92.5 +Case #6: 4892.14 +Case #7: 3824.236038948276 +Case #8: 4243.69897554173 +Case #9: 5040.482426704243 +Case #10: 24197.507703234274 +Case #11: 3133.2440610104304 +Case #12: 421.620495 +Case #13: 71.390575 +Case #14: 69.76488058427103 +Case #15: 0.6627485051602314 +Case #16: 297.1161194282322 +Case #17: 448.5848921083958 +Case #18: 1607.0 +Case #19: 24314.455590861635 +Case #20: 3750.0 +Case #21: 134.08607 +Case #22: 27843.954793052337 +Case #23: 29.00982703210465 +Case #24: 3631.0 +Case #25: 23563.754660649884 +Case #26: 28250.544476823583 +Case #27: 23870.22138034242 +Case #28: 144.64725 +Case #29: 27918.115185402203 +Case #30: 26043.370003325348 +Case #31: 22890.85138808052 +Case #32: 1047.681065731024 +Case #33: 60.6480339630439 +Case #34: 355.91925135135136 +Case #35: 22639.257076759503 +Case #36: 2003.6849419890307 +Case #37: 25967.674833746074 +Case #38: 50.965 +Case #39: 25462.19339657641 +Case #40: 25723.029569676706 +Case #41: 20.826956501632527 +Case #42: 2130.9704554161826 +Case #43: 82.58914378728888 +Case #44: 23.202 +Case #45: 0.6484622243230193 +Case #46: 58.51 +Case #47: 5988.0 +Case #48: 24808.51734981645 +Case #49: 27772.43708025068 +Case #50: 583.2 +Case #51: 176.7285436922696 +Case #52: 24126.23970532954 +Case #53: 3183.0 +Case #54: 25448.96093326246 +Case #55: 1958.575330242585 +Case #56: 24031.57014323717 +Case #57: 26.38139671418522 +Case #58: 25287.91573602189 +Case #59: 86.82569956159577 +Case #60: 177.35755798926755 +Case #61: 2515.0 +Case #62: 24183.506846987773 +Case #63: 24038.426220802205 +Case #64: 17.043305 +Case #65: 0.6629296870263496 +Case #66: 306.53031188118814 +Case #67: 24044.969685683645 +Case #68: 26509.648707528984 +Case #69: 237.5 +Case #70: 25168.56192779317 +Case #71: 140.81198799104143 +Case #72: 220.9612278196334 +Case #73: 392.133235 +Case #74: 359.7540098888581 +Case #75: 208.55 +Case #76: 3327.5670754493885 +Case #77: 262.317446172495 +Case #78: 24460.32636857313 +Case #79: 23502.789355998975 +Case #80: 169.78554228915664 +Case #81: 334.9855486489573 +Case #82: 27465.338364641015 +Case #83: 4245.671735698512 +Case #84: 28.85475 +Case #85: 24495.4248361239 +Case #86: 26154.718279515248 +Case #87: 22759.892501319213 +Case #88: 5122.926829268293 +Case #89: 54.54353 +Case #90: 163.7 +Case #91: 0.6733996410533737 +Case #92: 28011.697613744764 +Case #93: 194.160845 +Case #94: 99.706055 +Case #95: 5251.371339607403 +Case #96: 27259.460081103214 +Case #97: 323.758 +Case #98: 5163.771940639179 +Case #99: 6099.0 +Case #100: 23131.68040075327 diff --git a/CodeJam2014/bin/com/google/cookie/CookieClicker.class b/CodeJam2014/bin/com/google/cookie/CookieClicker.class new file mode 100644 index 0000000..33d1f05 Binary files /dev/null and b/CodeJam2014/bin/com/google/cookie/CookieClicker.class differ diff --git a/CodeJam2014/bin/com/google/cookie/MainClass.class b/CodeJam2014/bin/com/google/cookie/MainClass.class new file mode 100644 index 0000000..db1db94 Binary files /dev/null and b/CodeJam2014/bin/com/google/cookie/MainClass.class differ diff --git a/CodeJam2014/bin/com/google/magictrick/MagicTrick.class b/CodeJam2014/bin/com/google/magictrick/MagicTrick.class new file mode 100644 index 0000000..4404586 Binary files /dev/null and b/CodeJam2014/bin/com/google/magictrick/MagicTrick.class differ diff --git a/CodeJam2014/bin/com/google/magictrick/MainClass.class b/CodeJam2014/bin/com/google/magictrick/MainClass.class new file mode 100644 index 0000000..508d57b Binary files /dev/null and b/CodeJam2014/bin/com/google/magictrick/MainClass.class differ diff --git a/CodeJam2014/input.in b/CodeJam2014/input.in new file mode 100644 index 0000000..ac26d35 --- /dev/null +++ b/CodeJam2014/input.in @@ -0,0 +1,101 @@ +100 +9992.42314 1.10977 99952.70807 +408.28814 37.87068 1097.70964 +762.58634 66.66710 384.60668 +9993.73129 1.38221 99956.04764 +999.5792 19.83707 185.0 +9519.00000 73.00000 9948.00000 +6400.0 37.0 56412.0 +7954.0 78.0 27596.0 +9193.0 68.0 57802.0 +9994.82852 1.32300 99948.24968 +5501.0 55.0 58094.0 +953.04836 34.16854 843.24099 +408.79546 48.71694 142.78115 +130.17281 42.45454 207.97948 +1.05122 99.70875 99999.19814 +556.16170 59.67430 1215.61534 +743.13574 13.04044 1158.36990 +1607.00000 2.00000 3214.00000 +9990.40633 1.31119 99968.66557 +7322.00000 22.00000 7500.00000 +914.45310 40.32641 268.17214 +9992.40507 1.02800 99932.80687 +53.52207 87.16861 473.93588 +7175.00000 23.00000 7262.00000 +9994.89156 1.38654 99926.72318 +9993.64836 1.00129 99924.34411 +9998.63460 1.35609 99965.87572 +533.72207 35.35070 289.29450 +9993.02554 1.02354 99998.30544 +9991.34675 1.16014 99980.54840 +9995.39510 1.45998 99990.98488 +1469.0 25.0 71661.0 +113.63282 75.48612 370.62764 +666.0288 35.0 847.47950 +9993.88991 1.48809 99948.51432 +3616.0 60.0 22060.0 +9994.24422 1.16623 99926.53710 +10000.00000 76.16 101.93 +9993.81110 1.20804 99938.88813 +9992.87263 1.18640 99983.54413 +40.15595 65.86707 50.83118 +3824.0 82.0 91833.0 +121.0 20.0807 1199.289 +386.12897 87.42968 46.404 +1.02770 99.47947 99999.66453 +609.61 14.4887 117.02 +5988.00000 2.00000 11976.00000 +9998.39881 1.26614 99943.78904 +9996.46006 1.03337 99941.22136 +1029.636 12.4 1166.4 +249.08 11.3 837.7452 +9995.15197 1.32997 99945.21306 +9186.0 69.0 6366.0 +9996.01212 1.20987 99992.63141 +3229.0 44.0 79561.0 +9998.94009 1.33988 99944.92812 +27.99 8.2031 321.176 +9996.24544 1.22354 99970.43334 +168.84001 93.80439 230.47610 +259.33048 10.76529 644.19751 +2515.00000 2.00000 5030.00000 +9997.70659 1.32517 99994.35482 +9994.16242 1.33835 99933.48322 +66.57339 7.27202 34.08661 +1.05038 99.19907 99999.16605 +456.041 7.09 713.65419 +9990.05997 1.33741 99979.94246 +9996.15449 1.12381 99901.01965 +939.29643 96.8 475.0 +9993.71398 1.23315 99916.82544 +267.772 100.0000 898.50084 +426.042 86.93 706.12446 +898.26241 76.53311 784.26647 +593.43 62.6 100000.0000 +518.0 74.18 417.1 +5604.0 37.0 43378.0 +411.3 9.41749 647.0 +9992.50352 1.29743 99938.86461 +9991.28318 1.39266 99970.93260 +325.380 81.0 588.93001 +627.15228 39.29307 884.06021 +9997.36497 1.05455 99939.75819 +3987.0 6.0 40121.0 +623.05339 1.57101 57.70950 +9996.95968 1.29511 99977.67736 +9997.42260 1.15176 99929.79931 +9996.36466 1.47441 99919.51461 +9992.00000 80.00000 10408.00000 +662.75760 9.91274 109.08706 +1326.9 48.2 327.4 +1.06878 99.88289 99999.90251 +9996.67133 1.01723 99917.01874 +624.45734 51.76222 388.32169 +566.50312 53.56550 199.41211 +5314.0 8.0 80041.0 +9995.39065 1.06895 99965.35468 +745.696 80.27925 647.51600 +9216.0 58.0 71167.0 +6099.00000 2.00000 12198.00000 +9992.42422 1.43245 99954.44207 \ No newline at end of file diff --git a/CodeJam2014/src/com/google/cookie/CookieClicker.java b/CodeJam2014/src/com/google/cookie/CookieClicker.java new file mode 100644 index 0000000..78ad2ff --- /dev/null +++ b/CodeJam2014/src/com/google/cookie/CookieClicker.java @@ -0,0 +1,45 @@ +package com.google.cookie; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.util.Scanner; + +public class CookieClicker { + + public void solve(String input, String output) throws Exception { + + Scanner scan = new Scanner(new File(input)); + BufferedWriter out = new BufferedWriter(new FileWriter(output)); + int test = Integer.parseInt(scan.nextLine()); + for(int i =0;i