About
random person#5620 | anilist | github
sacrificing non existent math skills for cp since September 18 2020 (start of grade 10)
python/c++ (trying to transition)
i use cp editor and its op asf
i just found out about debuggers are they're also op asf
still use replit sometimes (mainly for python) but its nowhere near as good
file submission is TRASH
1 dmoj question a day, keeps my incompetence away (not really)
i encourage you to come join this cult
tfw ur diary is on ur profile page of an online judge
i wonder if i'll run out of space some day
Milestones cuz why not:
10/03/2020 - 69 problems solved
10/20/2020 - 100 problems solved
11/26/2020 - 300 points
12/17/2020 -
12/30/2020 -
01/10/2021 -
01/19/2021 -
Target for CCC 2021: 40/75 (aim high, hit low amirite)
Random
best sub if you are reading this please dont make a point in beating my submission it is my only achievement in life please please please
Problems Solved Log
most problems below 10 points are not documented
for hard questions, I often write extensive explanations in my code if you're interested (i usually don't write them for python submissions though)
currently stuck on:
1/21/2021
surfing
1/20/2021
Inaho
1/19/2021
did some random easy problems to westbrook pad my stats
WC '18 Contest 4 S1 - World of StarCraft (10)
1/18/2021
Tree Tasks (10)
im stupid for needing help fml. ended up calculating eccentricity for all nodes kekw
(spoilers)
writing down this approach cuz its op asf
dfs from any node to the farthest node u
dfs from u to farthest node v. reroot the tree at node u at the same time
diameter is distance between u and v as we all know
now comes big brain strat for finding radius:
we can traverse each node on the diameter by starting at node v and calling parent(v), until we reach u
this works because every node only has one parent. the root is at u so u is definitely an ancestor of v
so just traverse like so and take radius = min(radius, max(<length-bottom-up-so-far>, diameter length - <length-bottom-up-so-far>) for every node on the diameter
1/17/2021
Intervals' nlogn solution is fking hard to understand man...spent like the entire day trying and now i have no time for schoolwork.
if anyone ever comes up with a clear explanation im all ears
edit: understand a lot better now because of random translated japanese blogs lmao
1/16/2021
DMPG '16 S5 - Pizza Bag (12)
Intervals (6/20) i finish this tmr dw :D
1/15/2021
Tower (20)
really interesting
1/14/2021
Subtree (20)
solved with help
1/13/2021
CCO '10 P2 - Tree Pruning (15)
IOI '01 P1 - Mobile Phones (10)
1/12/2021
CCO '14 P3 - Werewolf (17)
tried debugging my transition for hours AND IT WAS THE FKING BASE CASE fml
1/11/2021
VM7WC '16 #4 Gold - Restoring Reputation (10)
DMOPC '15 Contest 5 P5 - World Line Convergence (15)
1/10/2021
A Fundraising Problem (12)
solved with help. underrated
1/9/2021
did some ez problems also known as slacked off
1/8/2021
COCI '20 Contest 2 #2 Odašiljači (7)
underrated
1/7/2021
did some ez questions
1/6/2021
got stuck on a fundraising problem and failed :(
1/5/2021
A Digit Problem (15)
DMOPC '14 Contest 2 P5 - Sawmill Scheme (15)
COCI '07 Contest 3 #5 Cudak (15)
accidentally becoming decent at digit dp somehow
1/4/2021
Art Academy VII: A Mysterious Object (12)
^ underrated
Baltic OI '13 P2 - Palindrome-Free Numbers (15)
not enough time to do compsci dammit
1/3/2021
Christmas Cards (15)
DMOPC '14 Contest 3 P6 - Not Enough Time! (15)
1/2/2021
Art Academy V: Ruin (12)
IOI '09 P4 - Raisins (15)
yo i remember seeing this and being so confused a few months ago but i acc solved this yoooooooo
Binary Indexed Tree Test (10)
wasted hour(s) trying to use segment tree to do binary indexed tree test (???) lovely
CCO '15 P2 - Artskjid (15)
CCO '14 P1 - Troyangles (10)
DWITE '12 R5 #3 - Triangle Count (7)
1/1/2021
CCC '07 S5 - Bowling for Numbers (10)
CCC '08 S5 - Nukit (10)
Simon and Marcy (10)
IOI '00 P1 - Palindrome (10)
10 point dp problems are like the sweet spot for me
12/31/2020
DMOPC '14 Contest 3 P5 - Not Enough Servers! (20)
COCI '08 Contest 2 #5 Setnja (7)
looked solution cuz ive been stuck on it for 6 months now
Back From Summer '19 P2: Straying From God's Light (7)
came up with a solution way more intuitive than editorial :)
PalinDrone (12)
lame
12/30/2020
CCC '14 S3 - The Geneva Confection (7)
Connected Components (10)
Directed Acyclic Graph (10)
Counting Paths (10)
Trees (10)
Travelling Salesmen (10)
Shortest Path (7)
Cable TV (7)
i actually need sleep. slept right through the CF round...im never gonna climb out of gray am i
12/29/2020
Summer Institute '17 Contest 1 P5 - Crazy Math (15)
TLE '15 P4 - Olympiads Homework (12)
Recurrence Solver (15)
Fibonacci Sequence (Harder) (20)
12/28/2020
Flowers (15)
wanted to use a BIT and then decided it wasnt possible (?????) and implemented a segment tree recursively instead (which took me hours kekw)
Grid 2 (17)
12/27/2020
Victor Makes Bank (17)
used editorial, didnt use brain (edit: understand now)
A Coin Problem (12)
12/26/2020
Coin Change (10)
12/25/2020
Walk (15)
very, very cool. i hope for a visualization somewhere. edit: kinda similar to floyd warshall idea so ig it makes sense
12/24/2020
Digit Sum (15)
A Romantic Dinner (15)
12/23/2020
Permutation (15)
also did forming quiz teams from another oj
12/22/2020
Counting Cycles (10)
Hurontario (10)
Roadrollification (10)
12/21/2020
Grouping (15)
looked editorial but shouldve been able to solve D:
12/20/2020
Sushi (12)
A little bit proud that i actually solved this
12/19/2020
did some random ez problems (?)
12/18/2020
Slimes (12)
quite reminiscent of combining riceballs (but much easier than that)
Candies (12)
12/17/2020
Matching (12)
ECOO '16 R3 P3 - CamelCase (10)
COCI '06 Contest 1 #5 Bond (10)
solved with help
12/16/2020
Stones (10)
Coins (10)
Grid 1 (10)
12/15/2020
LCS (7)
Longest Common Subsequence (7)
Deque (10)
A Game (10)
12/14/2020
Poutine (10)
Floyd Warshall go brrrr
Disjoint Set Test (10)
my eyes hurt so bad right now i need to squint why am i typing this i need sleep i wake 9 tmr somehow ok bye
12/13/2020
DMPG '15 B4 - Maximum Product (7)
12/12/2020
Independent Set (12)
Longest Increasing Subsequence (7)
Longest Increasing Subsequence (7)
Mock CCO '18 Contest 3 Problem 4 - Roger Solves A Classic Rage Tree Problem (10)
12/11/2020
COCI '08 Contest 3 #5 BST (20)
COCI '06 Contest 3 #5 Bicikli (15)
12/10/2020
Gates (10)
12/05/2020
Back To School '18: Function Maximization (25)
DMOPC '15 Contest 1 P6 - Lelei and Contest (17)
12/02/2020 (12:48 at night so)
2-Dimensional Range Minimum Query (17)
basically, this is one of the most useless and painful things ive ever done
11/30/2020
Checkerboard Summation (hard) (15)
UTS Open - Pogo (25)
Phenomenal Reviews (13/15) -> (15/15)
11/28/2020
Another Contest 3 Problem 4 - Range Updates and Range Queries (15)
Checkerboard Summation (Easy) (12)
gonna do the hard one tmr. i think perhaps like a 2d BIT or segtree or something
11/27/2020
DMPG '17 G2 - Holy Grail War (20)
FROM NOW ON I WILL ONLY JOURNAL WHEN I SOLVE A QUESTION ON THE DAY...
11/26/2020
Bananas (10)
11/23/2020
Segment Tree Test (15)
11/22/2020 (2 am 11/23)
COCI '07 Contest 3 #6 Redoks (17)
took me a good while (12+ hours prob), gave up debugging and read editorial at the end but i wasnt too far off i think.
11/21/2020
failed
tried COCI '07 Contest 3 #6 Redoks but obviously i tle :D
11/12/2020 - 11/20/2020
failed
my excuse is cimc (which i choked)
11/11/2020
Maze (10)
Can Shahir even get there?! (5)
Degrees of Separation (10)
Word Scrambler (7)
Switch (12)
kinda just chilled out today, did a couple ez graph theory ones and cheated a 12 pt
11/10/2020
failed
wait why is Poutine so hard...editorial is a lie theres no way naive bfs passes
funny part is when i found out it was too slow with python, i spent 1 hour redoing it in c++ and its even slower
bruh
11/9/2020
Swapping Seats (12)
11/1/2020 - 11/8/2020
failed
idk what happened either :D
10/31/2020
A Knightly Pursuit (12)
Knight Hop (7)
10/30/2020
Winning at Sports (12)
i think too ez for 12 pts, esp considering time limit. didnt even need to reuse table for each case
10/29/2020
Searching for Strings (10)
Compsci Club took this one up, otherwise i would never have gotten this by myself. also this Microwaving guy is so insane actually. python best language
anyways got fse/exams coming up gonna slow down with the compsci for a while
10/22/2020 --- 10/28/2020
failed
uh so basically comc happened so i gave up on compsci for a short while. well i guess i'll have to go back to math again soon cuz cimc
10/21/2020
Shop and Ship (15)
forgot to record this one...
10/20/2020
Pinball Ranking (15)
~ 6-7 articles and a couple yt videos later... i am finally enlightened. also now that i look at other solutions, i guess this was a pretty common approach actually. interesting nonetheless
100 problems solved. thank you to everyone who helped me along the way
10/19/2020
failed
i found an extremely simple and interesting solution to Pinball Ranking, but i dont fully understand it yet (after hours of trying xD) so i'll hold off on the submission until i do. the man actually replied to my email tho
10/18/2020
Pinball Ranking (5.25/15) :(
ok i rlly underestimated this. implementing BST not enough i guess. anyone gimme a hint pls?
10/17/2020
Trucking Troubles (12)
Longest Path (10)
10/16/2020
Animal farm (15)
wow that took a lot less time than i thought it would to actually solve the problem
Waterpark (10)
10/15/2020
failed
spent some time trying to understand animal farm. i'll continue this tmr
10/14/2020
Combining Riceballs (15)
FINALLY LETS GOOOOOOO!!!!
20 HOURS OF ENDLESS CONFUSION AND DEBUGGING I FINALLY GOT IT
i finally have one thing in life i can be proud of
10/13/2020
failed
worked on Combining Riceballs from 9 am to 1 am the next day. actually hard.
10/12/2020
DMOPC '20 October Contest {P1, P2, P3, P5 (15/100)}
Factor Solitaire (15)
wrote the dmopc today. so mad i didnt get partials for P4, i really dont know how. got partials for P5 tho, so i think i neither underperformed nor overperformed
factor solitaire is rlly free go do it
10/11/2020
Who is Taller (10)
Chances of Winning (12)
Substrings (15)
10/10/2020
Matrix Operation (10)
Cherrie Tree (12)
jk back to python
10/9/2020
Rank (10)
10/8/2020
Vacation (7)
Knapsack (7)
10/7/2020
List Minimum (4) (already done in python)
Triple Fat Ladies (5)
Rock Paper Scissors Fox (3)
A Minus B (3)
Quadrant Selection (3)
Deforestation (7) (already done in python)
Frog 1 (7)
List Minimum (Hard) (5)
Frog 2 (7)
only challenge was c++ syntax. and yes i might be converting to c++ now. goodbye python
10/6/2020
Convex Hull (15)
i dont think the editorial explained everything clearly. ended up not using a prio queue at all and still worked. oh and i repeated variable names which caused me to WA like 3 times i was actually so confused lmao
10/5/2020
failed
tried several different ways to reduce memory usage on Phenomenal Reviews, but i suspect python recursion stacks are just too huge. will come back after learning cpp
10/4/2020
Phenomenal Reviews (13/15)
i did read the editorial. im taking up too much memory, i think i'll try pruning and doing the first search at the same time tmr. (Edit: cant get under the memory limit. gg)
10/3/2020
Super Plumber (10)
i've been stuck on this one for a while now. very interesting approach, never done dp gt like this one before. learned a lot doing this one, definitely recommend
4 nations 1 secret (10)
was stuck on this one 10 months ago, came back to it randomly. not extremely challenging
69 problems solved btw
10/2/2020
Maximum Sum (7)
found a way to do it without recursion, while taking in input feelsgoodman
10/1/2020
AFK (12)
in reality wasnt that hard (everything is easy once you solve it xD). just note that passing in (x,y,cost) is worse compared to using another array to store cost for large test cases
Math 137 at Squirreloo (7)
one of the hardest easy 7 points ive ever done in terms of optimizing runtime. technically solved 1:09 am 10/2
9/30/2020
failed
made some progress on Super Plumber, got distracted by Maximum Sum. then got distracted by AFK. didnt finish any of them
btw how is maximum sum so hard. well not hard but MLE last case. i only have an input list and a memo array bruhhh
9/29/2020
Sheep and Coyotes (10)
ALWAYS REMEMBER TO USE DECIMAL MODULE WHEN DOING CALCULATIONS!!! PYTHON FLOATS ARE NOT ACCURATE! (thank you very much alexshao)
9/28/2020
Frank and Roads (10)
confusing question statement. in actuality a very trivial bfs implementation question that should really be worth 7 points max
9/27/2020
Neanderthal Numbers (10)
pretty easy took a little bit of thought was all
9/26/2020
Fibonacci Sequence (15)
thank you http://jeffe.cs.illinois.edu/teaching/algorithms/book/03-dynprog.pdf, very cool
Pyramid Message Scheme (10)
technically finished 9/27/2020 after midnight
9/25/2020
Failed
WHY IS SUPER PLUMBER SO HARD BRUH. tried recursion, realized halfway that might not ever go back to bottom left kekw. implemented a naive bfs but obv tle, mle
9/24/2020
Failed (technically i did Golf today at 12 am in the morning)
Tried Super Plumber, can probably do it with bfs but no idea how to tabulate, because each node potentially depends on each other
9/23/2020
Bridge Crossing (10) (Finally! Lesson learned: memoize the remaining part of the branch, and not anything related to before it)
Golf (10) (quite straightforward, took a long time bc was too lazy to trace recursion. TRACE IF STUCK NEXT TIME. also check memo first thing) p.s. technically solved 9/24/2020 around 12 am
9/22/2020
Mouse Journey (10) (this one pretty easy ngl) (tried bridge crossing, came extremely close but cant figure out memoization)
9/21/2020
π-day (10) (my first 10 point dp. made me think a bit. i think i did the reverse of the editorial solution still worked tho)
9/20/2020
Failed (tried "Setnja" and "Straying from God's light", gave up on both)
9/19/2020
Spreadsheet (10) (recursion with cycle detection, stupid bug slowed me down couple hours lmao)
9/18/2020
Crossing Field (10) (pretty straightforward bfs i think)
---------------------------------------------------------------------------------------]]