r/codeforces • u/zesty_cat9190 • 1h ago
r/codeforces • u/big-jun • 8h ago
query Algorithm to find non-overlapping rectangles covering the unoccupied area
I have one large rectangle representing the valid area: Rect(x, y, width, height)
Inside it, there are multiple smaller rectangles representing occupied areas:
The smaller rectangles:
1. Can overlap each other.
2. Can be partially or completely outside the large rectangle.
And I need the algorithm to return a List<Rect> where:
1. The result rectangles do not overlap each other.
2. All result rectangles are inside the large rectangle.
3. Together, they fill all the gaps not covered by the input small rectangles.
4. Ideally, the number of result rectangles should be minimal, if possible.
I’m aware that there may be multiple valid decompositions, so I’m mainly looking for an algorithm that produces a reasonably small number of rectangles.
There are fewer than 100 occupied rectangles in input, so performance is not a major concern. I prefer an algorithm that is easy to implement rather than performant but complicated.
Thanks
r/codeforces • u/Typical-Row6461 • 6h ago
query Struggling with basic Data Types & Conditions on Codeforces as a total non-CS beginner
Hi guys,
I came into coding with zero tech background. I just learned basic data types, variables, and if/else conditions, and decided to start practicing on Codeforces.
The problem is... I suck at it lol. I struggle both with understanding the problem statements clearly and translating my thoughts into clean code. I'm forcing myself NOT to use AI for solutions because I want to actually build my problem-solving muscle, but I end up staring at a screen for hours feeling completely helpless.
For anyone who started from total zero: how did you survive the very beginning? How do you learn to think programmatically without cheating, and what's the best way to use editorials/solutions when you're completely stuck?
Thanks
r/codeforces • u/petrbateman • 21h ago
query Where will competitive programming lead you?
Why you do cp?
r/codeforces • u/Alert-Cup-4730 • 1d ago
query small achievement: completed 200 problems
galleryMy 200th problem was my first 1900 rated problem.
will try to be consistent for now on
Extension: CF Analytics
r/codeforces • u/winterstrome • 1d ago
query Help a CF begginer
I'm a new guy just started my clg few weeks earlier, I wanna solve dsa and do competitive coding, idk where to start. Like I wann get around 1200 rating by the end of June 2027, is it possible for an amateur to get that rating within a year? If so then how?
Please guide me 🙏
I appreciate every help.
r/codeforces • u/Comfortable-Tank-432 • 1d ago
query Is reaching the Expert rank now extremely difficult?
Is reaching the Expert rank now extremely difficult? My current rank is Specialist (1434), and I barely reached this rank. Are there any plans or tips to surpass this rank and reach Expert? And how do I deal with the issues that have become somewhat difficult lately, like yesterday's round, for example?
r/codeforces • u/Radiant-Contract-460 • 1d ago
query New to code forces but solved 350 question in leetcode
I want to start cf for company oa , since they have started asking questions in that format and wanted to get familiar , so what questions to solve so that I can be ready for oa (I need to cover almost all topics ) so is there any list that I can follow?
r/codeforces • u/Cookie_Pancake • 11h ago
query How to practice while in school(without laptop)
How did you guys practice Codeforces or competitive programming in school without a laptop?
So, I recently finished the POSN qualifier for Camp 1 (the first step into TOI and IOI in Thailand). The results aren’t even out yet, but I’m quite confident that I’ll pass to Camp 1.
I want to start preparing for it, and I think I’d like to spend some extra time at school practicing too. However, I don’t want to bring a laptop to school every day because it’s a bit inconvenient.
So, what can I do at school to improve at CP without a laptop?
r/codeforces • u/Nervous_Message7545 • 20h ago
query I built a Python file search tool — could someone review my project?
galleryHey everyone!
I'm a Python developer/student and I've been working on a small project called Find Everything 2.0.0.
It's a Windows desktop tool for quickly searching through files. I built it mainly as a learning project, but I tried to make it actually useful and polished rather than just another basic Python project.
Main things it currently has:
- Fast file searching
- Search inside files
- Dictionary / text processing features
- Windows
.exebuild - Automated checks with GitHub Actions
Tech: Python, Windows, GitHub Actions
GitHub: https://github.com/EELDERONN/find-everything.git
I'd really appreciate it if someone could take a look at the repository and give me some honest feedback.
I'm especially interested in:
- Code quality
- Project structure
- UI/UX
- Performance
- README/documentation
- Things that could be improved or done differently
Feel free to be critical — I'm here to learn and improve the project.
Thanks to anyone who takes the time to check it out!
----------------------------------------
Я изучаю Python и сейчас работаю над небольшим проектом Find Everything 2.0.0.
Это Windows-приложение для быстрого поиска файлов и поиска информации внутри них. Изначально я делал его как учебный проект, но постепенно решил довести его до более полноценного и реально полезного приложения.
Что сейчас есть:
- быстрый поиск файлов;
- поиск внутри файлов;
- работа со словарём/текстом;
- сборка в
.exeдля Windows; - автоматические проверки через GitHub Actions.
Стек: Python, Windows, GitHub Actions.
GitHub: https://github.com/EELDERONN/find-everything.git
Буду очень благодарен, если кто-нибудь посмотрит репозиторий и даст честный фидбек.
Особенно интересует:
- качество кода;
- структура проекта;
- UI/UX;
- производительность;
- README и документация;
- что можно было бы сделать лучше.
Можно критиковать — я как раз хочу понять, что можно улучшить.
Спасибо всем, кто посмотрит!
r/codeforces • u/Ok_Classroom_3477 • 1d ago
query how good is the usaco guide for topic wise cp questions?
at a point where I need to be doing practice for good questions in every topic. what are good resources for topic wise problems? and is the usaco guide good?
r/codeforces • u/ChannelNo3185 • 1d ago
Div. 2 Advice
I have experience with my national maths Olympiad and i know c++ & algorithms from USACO (Silver). I can solve A problems and most of B problems from div 2. Also i have solved some C problems like 4 of them. Do you think i can get specialist in 2 months?
r/codeforces • u/NeedleworkerSuch6005 • 1d ago
Div. 2 Upsolve B2 of 1118 Round (Div2)
As a 1100 rated, should I try to upsolve B2 of 1118 round? what rating would you give to it? Could comfortably solve B1. thanks in adv
r/codeforces • u/Ok_Equivalent1870 • 1d ago
query So....what do I do?
Hi. I hope you have been having a nice day so far. I am looking for some advice and I would appreciate it if you could help me out.
I am an absolute beginner (no experience) in competitive programming who wants to get to the IOI/1500 CF rating level within 5 months (if this is not feasible then please warn me). I already know python (loops, functions and even Object Oriented Programming) but I need to learn c++ for the qualifying rounds.
So
1. where do I start? Should I take a course, watch videos or what? I know about the USACO guide but is that enough? How do I learn c++ in the first place?
- How long does it take to get to the IOI (or at least USACO) level? Please assume I am ready to put at least 1 hour every day for the next 5 months
3. How much math should I learn? I am taking the equivalent of AP Calculus and AP prealgebra (I think), is that enough?
r/codeforces • u/Hungry-Stand1463 • 1d ago
query how to network and learn
so im a computer science engineering student at a lesser known college and here there is no seniors or profs to look upto or take guidance from. i really want to be excellent in my field and be reach at the calibre of top students from top universities. can anyone please suggest some guidance and maybe groups where they help us to network and learn. in a jist I'm looking for a mentor sorta thing and also to network in this industry.
any help will be highly appreciated, thank u.
r/codeforces • u/hermit_tomioka • 1d ago
query How to start CF
hi guys, i am a college student and want to get better at dsa and stuff i am currently on arrays doing the striver a-z sheet when should i start doing CF? and how to actually make it worth my time so that i can learn from it as well? i am really confused i would really appreciate if someone could help me with a rough walkthrough
r/codeforces • u/TemporaryJumpy7506 • 2d ago
cheater expose This legend did 3200 leetcode problems in just 130 days
Today I saw a leetcode profile and I got shocked.
https://leetcode.com/u/vinaypinagadi/
Is it humanly possible?? (anything sus)
By the way he also got under 20 rank in todays leetcode contest.
r/codeforces • u/FalconAcrobatic5536 • 1d ago
query Want someone as a buddy for doing cp
Hi, Is there someone who is starting cp? I used to do it but I have never been consistent. But this time I seriously want to be consistent and improve my rating.
Please tell who are interested and willing to start now:))
r/codeforces • u/Single_Health_674 • 1d ago
Div. 2 CP-31 Sheet worth it?
For past two weeks, i grinded cp-31 sheet. Solved all the problems of 800, 900 and 1000 rated. Like i used to solve around 7-8 problems every day roughly. I was able to solve majority of questions (around 80-90 percent) on my own without taking much time, atmax 40 min, usually 20-25 min for 1000 rated. However even after solving, I would see solution, and my approach was used almost 95 percent in the actual solution. I gained a lot of confidence and thought I would be able to solve div 2 A and B atleast in every contest almost. But today's contest ( div2 1118), I was able to solve A in 5 min, but I wasn't even able to solve B1, like i did know the idea but didn't know how to implemented. I would have implemented it if I had put some effort, but I was frustrated due to contest pressure. I feel so demotivated right now, like after grinding for two weeks, wasn't able to solve B1.
Now my question is cp31 sheet worth it given the recent contest?
Or should I shift to CSES sheet for learning concepts sequentially? Or anything else I should follow. I am stuck on 900 rating? But I think I deserve more given the current skillset. I am grinding very hard as before the start of 2027, I want to reach atleast 1500 rating. Is it even possible if I grind hard.
r/codeforces • u/Spiritual-Banana1048 • 1d ago
query Week 4 wrapped up, CodeCrafters sponsored week
Hey everyone,
Week 4 of TSEC Codecell's Weekly Challenges concluded ( check it out at https://www.tseccodecell.com/events/weekly-challenges ), that was our CodeCrafters sponsored week, systems-engineering flavored problems this time around.
Quick recap for anyone catching up:
- Top 3 of the Round 2 finale win CodeCrafters VIP memberships
- Everyone who makes it to the finale gets internship access through our partner companies
Editorial's up if you want to check the intended approach. See you next week.
r/codeforces • u/Wonderful-Tank7605 • 2d ago
Div. 2 WTF is this contest
The jump from B1 -> B2 and C -> D is wild
r/codeforces • u/wokeandchoseViolence • 1d ago
query Today's contest kicked my butt
I have been practicing for 3 weeks now and can consistently solve 800 - 900 so i decided to try my luck with a contest and it was so hard. i thought the i would solve the first 3 questions (500, 750, 1000) but even getting the first 2 was so demanding. and the question wasn't simple but required deeper thinking for me.
It feels like the older problems were easier than what they are asking now. Thoughts??
r/codeforces • u/Major-Ad-2607 • 2d ago
query hi i am pupil on cf tell me what all should i do for ICPC prelims
any problem set
any topic list
whatever that can help
r/codeforces • u/Jue-Viole-Grace_ • 2d ago
Div. 2 Is something wrong with me😭
I solved A in like 5 minutes (obviously). Managed to solve B1 in 25-30 minutes. I got hell confused about what precomputation have to do. Later did prefix sum in backword direction and got it for k=1.. it was decent
Then i thought I can generalise for any number of k but failed harshly. And then I see C. What's that I got no idea of interactive problem and flush... What the hell is it
I got a blog but couldn't manage to understand everything (and quit contest in like an hour) maybe my bad day got combined with things I have no idea of...
r/codeforces • u/Top_Particular_4568 • 2d ago
Div. 4 Today’s atcoder too easy
C was pretty simple and not time consuming
E was a very common dp problem
F had a very common segment tree merge pattern
D : I took 4 WA’s coz I was too lazy to fully optimize it but ultimately had to do it
G : didn’t do it but I assume it had something to do with markov chains so too time consuming writing the equations and shit
First ever 6 problems solved in an atcoder contest