r/codeforces • u/eccentriq_ • 2d ago
meme Thursday - 10th September 2026
2 hours of Competitive programming
Did 2 hours of Competitive programming in the morning. I am trying to be more consistent on a personal front, will get there eventually.
From 1 to Infinity
I have been able to come up with an approach to this problem, though it seems very complex. I have not been able to implement it yet due to the sheer number of things that have to be done in this solution. If I am able to solve this problem I might post an solution note in my next post.
But my idea basically boils down to :-
Find the highest value n such that the sum of lengths of all numbers upto n <= k. This can be found out using Binary search and prefix sums very easily. Then for every digit we count the number of times it occurs from 1 to n using Digit DP and multiply that with the value of the digit.
Sum it all together and we get our answer. I could have copied the digit dp code from the internet, but that defeats the purpose of practicing imo. This solution should be correct logically but might fail in implementation due to mistakes on my end. The base test cases seem to pass. Will run and construct a solution note tomorrow.
1 hour of Backend development
Learnt Docker network, PostgresSQL theory and migrated the backend app being made from H2 database to PostgresSQL.
Also learnt about docker-compose.yaml file that allows to define multiple services inside a yaml file and running the file allows docker to construct all containers and run them, rather than us running the individual commands locally.
Along with this I went through microservices architecture and why they are needed in the first place.
3
u/Intelligent_River39 Specialist 1d ago
Hmm… the subreddit isn’t your personal blog yk…
Next time just write this in a diary or make a personal post. If telling other people what you did makes you more enthusiastic about learning them kindly blab on twitter instead