Coding Catalog

Coding Catalog

19 devlogs
62h 54m
•  Ship certified
Created by Olivia Pu

Olivia's Coding Catalog is her competitive programming portfolio that she is developing over the course of the summer.

Timeline

Ship 1

1 payout of shell 431.0 shells

Olivia Pu

about 1 year ago

Olivia Pu • Covers 19 devlogs and 58h 21m
Earned sticker

Alright, these are my final touches and I'm going to ship my website - with some of my solutions and mostly instructions on what Java is (and my dmoj account)

Update attachment
Earned sticker

Today, I had another class for my programming course, but I also worked on the tutorial for my demo (introducing readers to Java and competitive programming, etc...). Furthermore, I programmed a preloader for my website. Since I wanted it to display two phrases: one after the other, I experienced some issues and had to debug my code until I realized that I had not set one phrase's css to display: none! When I changed this, it finally worked:) Hopefully I can finish this project tomorrow!

Update attachment
Earned sticker

This has been long awaited - I have created part of my demo, which will be in the form of a webpage. Although this has been my planned creation for quite a long time, I have been busy with school and extracurriculars and am finally doing this! Currently, I am thinking of adding a side menu next to my minamalist containers (with text) to its right. Here's a sneak peek of my website! I'll be finishing it tomorrow:)

Update attachment
Earned sticker

Today, I completed 2 usaco problems: USACO 2017 February Contest, Bronze Problem 2. Why Did the Cow Cross the Road II and USACO 2019 US Open Contest, Bronze Problem 1. Bucket Brigade. To clarify, I am still exploring Strings and chars. For the first question, I used 3 arrays for storage and 2 loops to check the validity of each alphabetical pair of crossings with O(n2) as the time complexity - achieving success. However, although I finished programming my code for the second question, I believe the USACO grading servers are down at the moment, so I will wait until tomorrow to see my results!

Update attachment
Earned sticker

Today, I finished programming several problems that were 5-pointers, including two DMOJ problems: CCC '04 S1 - Fix (that I was working on yesterday) and CCC '06 S2 - Attack of the CipherTexts. For the first one, I was able to shorten my code by a huge factor and simplify it thanks to Java boolean operators. For the CipherTexts problem, I used a HashMap to store all the corresponding pairs of Characters. For the corner case (in which only one letter is left available for the corresponding pair of another), I used an Arraylist initialized with the alphabet and removed respective values. Although I originally did not succeed, I discovered my mistake, which was that I forgot to include the space in the Arraylist values. Now, I have finished those problems, as shown in the attachment below!

Update attachment
Earned sticker

Today, I completed another String / char problem on DMOJ: CCC '03 S2 - Poetry. Although I previously programmed this using Python, I was able to implement it in Java with a method and various if-and-else statements. However, I originally had a few typos and had to debug my code using self-created test cases in order to successfully solve the problem. Currently, I am working on another DMOJ question: CCC '04 S1 - Fix, which I will devlog about tomorrow!

Update attachment
Earned sticker

This week, I am exploring Strings and chars again! I just completed two DMOJ problems regarding those topics: CCC '10 J3 - Punchy and CCC '01 S1 - Keeping Score; however, they mostly just require casework as simple 5-pointers, so I did not encounter any issues that I needed to debug. Tomorrow, I will continue my programming course! (Attached is a picture of my code for those two questions which, as described, just consists of many if-and-else statements as well as operations)

Update attachment
Earned sticker

Today, I completed the DMOJ problem: CCC '08 S1 - It's Cold Here!. However, I had to debug my code as I originally missed the case in which Waterloo was the solution to the problem. After I changed my code to include the corner case, my programming succeeded.

Update attachment

This month, I have enrolled in a new competitive programming course, and have completed 50+ problems. Obviously, I will not list all 50 of the problems here, although I can tell readers that have the topic of Simple Math, Primes, and Implementation. My most recent problems were the DMOJ problem COCI 19 Contest 3 1 Preokret; and 2 USACO problems: Even More Odd Photos and the Lost Cow. For the first one, I used both a mathematical algorithm and if-and-else brackets; succeeding for the two of the ways. For Even More Odd Photos, I used a mathematical algorithm although it was an implementation problem, which was a satisfying success. Finally, for the Lost Cow, I implemented the situation; however, I realized that one part in the question was a bit unclear and I had to change my code a bit by removing this code:
if (newPosition < 0) {
newPosition = 0;
}
if (newPosition > 1000) {
newPosition = 1000;
}
which originally restricts the farmer's movement, or current position (the newPosition variable) to 0 - 1000 on the x-axis. As a result, my code eventually passed the test cases.
I will devlog after I have completed more programming problems, or have developed my showcase!

Update attachment
oodlia ju oodlia ju about 1 year ago

USACO MENTION

Currently, I'm exploring 3 new topics after Binary Search: Binary Trees, Recursion, and Primes. After quite a long time, I've completed MANY problems - the harder questions of which have involved time debugging. Here are only some of the problem's I've completed (my most recent ones): DMOPC '21 Contest 5 P1 - Permutations & Primes, DMOPC '17 Contest 1 P1 - Fujō Neko, CCC '12 S2 - Aromatic Numbers, and CCC '19 S2 - Pretty Average Primes. Although I've been completing other problems, I'm also trying to debug my code for An Animal Contest 5 P2 - Permutations & Products (shown below) which is an interactive 5-pointer on DMOJ. There's some complication due to use of doubles instead of integers, and the fact that I haven't used longs (in java). After completing more problems, I will post a devlog!

Update attachment

I'm still continuing on my PSA / Binary Search competitive programming problems, and I've completed the USACO 2019 February Contest, Bronze Problem 1. Sleepy Cow Herding (snippet attached of successful test cases). However, I only achieved partial marks for the DMOJ 7 pointers Back To School '18: Letter Frequency and DMOPC '15 Contest 6 P3 - Harvest because of TLE on the last test batch for both of them. On the other hand, I believe that I have figured out a faster algorithm to solve this TLE using arrays for the entire program. If I'm successful, I'll try to mention it in my next devlog! Apart from this, I'm working on two DMOJ 5-pointers: Mock CCC '22 1 S2 - IU and DMOPC '17 Contest 5 P2 - Mimi and Binary currently. I'll try to complete many more problems since Summer of Making is extended!

Update attachment

After going on a trip, I've come back and programmed a couple of DMOJ competitive programming questions (Including CCCHK '15 J3 - Queens can't attack me!, The Cosmic Era P2 - Uneven Sand ~~ this is a binary search problem, DMOPC '20 Contest 2 P2 - Lousy Christmas Presents ~~ 😅 As shown in the image attached, this had a time limit of only 0.4s, but I eventually passed this by using Arrays and BufferedReader in Java, and many other 5 and 7 point problems...). Right now, I am working on the DMOJ problem Back To School '18: Letter Frequency, and I will also complete more USACO problems before my next devlog (Im still working on PSA problems, but I'm now exploring Binary Search)!

Update attachment

These weeks, I have been completing Prefix Sum Array (PSA) / Difference Array (DA) At this point in time, I am attempting to solve the DMOJ seven-pointer: The Cosmic Era P3 - Battle Positions using those strategies (I have solved other problems as well such as the questions: Deforestation and A Familiar Problem from DMOPC).

Update attachment

Currently, I am working on solving DMOJ / USACO questions using Customized Comparisons in Java. At this point in time, I am working on the DMOPC '21 Contest 3 Problem 1 - Sums & Differences.

Update attachment

Since my last Devlog, I completed numerous programming questions and am currently working on my last few Sets, Maps, Array, and ArrayList questions (specifically, I am now working on the USACO 2021 US Open, Bronze Problem 3. Acowdemia III). My next type of problems is Customized Comparisons!

Update attachment

I have completed a couple more competitive programming questions since my last Devlog. However, I am currrently debugging my code for the (10 points) DMOJ question James' Rectangles. Furthermore, I am working on my solution to a 7-pointer: DMOPC '21 Contest 2 P1 - Bosses.

Update attachment

I am still working on Set, Map, and Array / ArrayList problems in java. A very recent problem I completed was a seven-pointer: CCC '11 J4 - Boring Business on DMOJ, and I am now working on programming a faster method for this other seven-pointer problem: DMOPC '21 Contest 2 P2 - Scrambling Swaps in order to fix my TLE on the second batch of cases.

Update attachment

Currently, I am still working on DMOJ and USACO competitive programming problems that are mostly Set and Map questions (e.g. the question TLE '15 P1 - Power Rankings on DMOJ, which I finished just before this Devlog). Now, I am working on two seven-pointers: DMOPC '21 Contest 2 P1 - Bosses and DMOPC '21 Contest 2 P2 - Scrambling Swaps (which don't necessarily need to be solved with Sets or Maps).

Update attachment

Just recently, I coded various programs for DMOJ and USACO problems, specifically using Sets and Maps in java. At this point in time, I am working on the USACO 2020 US Open Contest Bronze question: Problem 2. Social Distancing II.

Update attachment