Competitive Programming Solutions


These are my submissions on the DMOJ, the online judge I use the most when practicing competitive programming.

Feel free to make good use of them when stuck on a problem.

#NameLanguageTimeProblem Code
1Fibonacci SequenceC++0.0843 sfibonacci
2CCC '13 S5 - Factor SolitaireC++0.0743 sccc13s5
3DMOPC '13 Contest 1 P4 - AFKC++0.5839 sdmopc13c1p4
4CCC '03 S3 - Floor PlanC++0.0162 sccc03s3
5MWC '15 #2 P2: Towering TowersC++0.4143 smwc15c2p2
6CCC '08 S3 - MazeC++0.0167 sccc08s3
7CCC '01 S3 - Strategic BombingC++0.0460 sccc01s3
8OversleepC++0.0253 shci16oversleep
9CCC '07 S3 - FriendsC++0.0124 sccc07s3
10CCC '07 S4 - WaterparkC++0.0133 sccc07s4
11CCC '00 S4 - GolfC++0.0126 sccc00s4
12Grid 1C++0.2189 sdph
13CCC '05 S4 - Pyramid Message SchemeC++0.0035 sccc05s4
14CCC '15 S3 - GatesC++0.2104 sccc15s3
15CCC '12 S5 - Mouse JourneyC++0.0146 sccc12s5
16Fast Bit CountingC++0.3731 sfastbit
17Too SimpleJava 80.1270 stoosimple
18Python Infinite LoopPython 33.9926 sshortest1
19Bubble SortC++0.1705 ssort1
20CCC '18 J5 - Choose your own pathC++0.2267 sccc18j5
21DMOPC '14 Contest 1 P3 - New StudentsC++0.0948 sdmopc14c1p3
22DMOPC '14 Contest 2 P4 - DeforestationC++0.5676 sdmopc14c2p4
23CCC '20 S2 - Escape RoomC++1.8897 sccc20s2
24DMOPC '19 Contest 7 P1 - HydrocarbonsC++0.1571 sdmopc19c7p1
25Knapsack 1C++1.4699 sdpd
26Knapsack 2C++0.3336 sdpe
27PiggyText0.0031 spiggy
28Frog 1C++0.2184 sdpa
29CCC '14 S3 - The Geneva ConfectionC++0.0588 sccc14s3
30CCC '10 J5 - Knight HopC++0.0143 sccc10j5
31Back From Summer '17 P2: Crayola LightsaberC++0.0171 sbfs17p2
32CCC '13 J2 - Rotating lettersJava 81.2947 sccc13j2
33CCC '11 S2 - Multiple ChoiceJava 81.8592 sccc11s2
34CCC '01 S1 - Keeping ScoreJava 80.6274 sccc01s1
35CCC '14 S1 - Party InvitationJava 80.8260 sccc14s1
36CCC '11 S1 - English or French?Java 82.3998 sccc11s1
37Hailstone NumbersJava 811.1155 shailstone
38CCC '03 S1 - Snakes and LaddersJava 80.4756 sccc03s1
39CCC '13 S2 - Bridge TransportC++0.5330 sccc13s2
40CCC '96 S1 - Deficient, Perfect, and AbundantC++0.0594 sccc96s1
41List Minimum (Hard)C++0.0916 sbf1hard
42CCC '09 S1 - Cool NumbersC++0.1507 sccc09s1
43CCC '08 S1 - It's Cold Here!C++0.0706 sccc08s1
44VM7WC '16 #3 Silver - Can Shahir even get there?!C++0.3709 svmss7wc16c3p2
45ECOO '15 R1 P1 - When You Eat Your SmartiesC++0.0183 secoo15r1p1
46ECOO '13 R1 P1 - Take a NumberC++0.0400 secoo13r1p1
47ECOO '16 R1 P1 - Pass or FailC++0.0273 secoo16r1p1
48CCC '17 S2 - High Tide, Low TideC++0.0546 sccc17s2
49CCC '00 S1 - Slot MachinesC++0.0183 sccc00s1
50CCC '05 J3 - Returning HomeC++0.0240 sccc05j3
51Mock CCC '20 S1 - WarC++0.2414 smccc1s1
52CCC '20 J4 - Cyclic ShiftsC++0.3724 sccc20j4
53DMOPC '19 Contest 1 P1 - Test ScoresC++0.3198 sdmopc19c1p1
54DMOPC '14 Contest 1 P1 - Median MarkC++0.1226 sdmopc14c1p1
55CCC '14 S2 - Assigning PartnersC++0.1311 sccc14s2
56Equation SolverC++0.1205 sgfssoc2j3
57COCI '14 Contest 4 #1 CestaC++0.2075 scoci14c4p1
58Mock CCC '20 Contest 2 S2 - 4D BBST on a DPC++0.5554 smccc2s2
59CCC '01 S2 - SpiralsC++0.0136 sccc01s2
60CCC '16 S2 - Tandem BicycleC++0.0393 sccc16s2
61CCC '07 S2 - BoxesC++0.0094 sccc07s2
62CCC '05 S1 - Snow CallsC++0.0019 sccc05s1
63CCC '05 S2 - Mouse MoveC++0.0100 sccc05s2
64CCC '15 S2 - JerseysC++0.1328 sccc15s2
65DMOPC '17 Contest 4 P1 - Ribbon Colouring FunC++0.3021 sdmopc17c4p1
66List MinimumJava 80.7364 sbf1
67BooleanJava 868.6197 sboolean
68CCC '16 S1 - RagamanC++0.0508 sccc16s1
69A Plus BJava 81.2537 saplusb
70CCC '13 J1 - Next in lineJava 81.4318 sccc13j1
71CCC '14 J1 - Triangle TimesJava 81.1729 sccc14j1
72CCC '07 J1 - Who is in the Middle?Java 80.7814 sccc07j1
73CCC '04 J1 - SquaresJava 80.7848 sccc04j1
74CCC '12 J1 - Speed fines are not fine!Java 81.2851 sccc12j1
75CCC '11 J1 - Which Alien?Java 81.3057 sccc11j1
76CCC '08 J1 - Body Mass IndexJava 80.9116 sccc08j1
77CCC '14 J2 - Vote CountJava 81.3281 sccc14j2
78CCC '15 J1 - Special DayJava 81.2083 sccc15j1
79CCC '17 J1 - Quadrant SelectionJava 82.7023 sccc17j1
80CCC '16 J1 - Tournament SelectionJava 80.9494 sccc16j1
81CCC '12 J2 - Sounds fishy!Java 82.0776 sccc12j2
82CCC '15 J2 - Happy or SadJava 82.8108 sccc15j2
83CCC '06 J1 - Canadian Calorie CountingJava 81.2784 sccc06j1
84CCC '17 J2 - Shifty SumJava 82.0963 sccc17j2
85CCC '10 J1 - What is n, Daddy?Java 81.4547 sccc10j1
86CCC '18 J3 - Are we there yet?Java 80.6274 sccc18j3
87Back to School '16: HarambeJava 81.6817 sbts16p1
88Mock CCC '20 Contest 1 J1 - A Rage Tree ProblemJava 863.6583 smockccc2020c1j1
89Mock CCC '20 Contest 1 J2 - A Simplex ProblemJava 862.2362 smockccc2020c1j2
90CCC '17 S1 - Sum GameJava 83.5916 sccc17s1
91Wesley's Anger Contest 3 Problem 1 - Snow Day PredictorC++0.4841 swac3p1
92List Minimum (Easy)C++0.9450 sbf1easy
93CCC '20 J1 - Dog TreatsC++0.1145 sccc20j1
94CCC '20 J2 - EpidemiologyC++0.1404 sccc20j2
95CCC '20 J3 - ArtC++0.0582 sccc20j3
96CCC '20 S1 - Surmising a Sprinter's SpeedC++0.5707 sccc20s1
97CCC '02 J2 - AmeriCanadianC++0.0122 sccc02j2
98CCC '14 J3 - Double DiceC++0.0440 sccc14j3
99Art Academy 0: PrologueC++0.1094 sart0
100DMOPC '14 Contest 1 P2 - TilesC++0.0998 sdmopc14c1p2
101DMOPC '19 Contest 1 P0 - Range FindingC++0.4164 sdmopc19c1p0
102Mock CCC '19 Contest 1 J1 - Pusheen's Report CardC++3.3019 snccc6j1
103Mock CCC '19 Contest 1 J2 - Pusheen OCRC++4.2961 snccc6j2
104DMOPC '19 Contest 6 P0 - Trivial MathC++0.5876 sdmopc19c6p0
105Mock CCC '20 Contest 2 S1 - Arithmetic HybercubeC++0.1541 smccc2s1
106A Minus BC++0.1796 saminusb
107DMOPC '19 Contest 4 P0 - YikesC++0.2476 sdmopc19c4p0
10816 BIT S/W ONLYC++0.0322 s16bitswonly
109CCC '09 J1 - ISBNC++0.0146 sccc09j1
110CCC '18 J1 - Telemarketer or not?C++0.0726 sccc18j1
111DMOPC '18 Contest 4 P0 - Dr. Henri and Seeing StarsC++0.0698 sdmopc18c4p0
112CCC '12 S1 - Don't pass me the ball!C++0.0211 sccc12s1
113CCC '19 S1 - FlipperC++0.1037 sccc19s1
114CCC '07 S1 - Federal Voting AgeC++0.0080 sccc07s1
115CCC '15 S1 - Zero That OutC++0.0301 sccc15s1
116DMOPC '19 Contest 7 P0 - Contest FeedbackC++0.0716 sdmopc19c7p0
117Another Contest 4 Problem 0 - The April Fools Warmup ProblemC++0.0183 sacc4p0
118Another Contest 4 Problem 6 - One Billion ViewsC++0.0884 sacc4p6
119Hello, World!C++0.0016 shelloworld