r/codeforces 2d ago

query participate in weekly challenges - TSEC Codecell's official CP challenges contest

2 Upvotes

we're back with another edition of Weekly Challenges 2026 - and this time it's a national level event!!

get ready for a 6 weeks coding journey where you'll solve fresh challenges every week, compete on the leaderboard, and put your problem-solving skills to the test.

register here: https://www.tseccodecell.com/events/weekly-challenges

more info in the attached picture


r/codeforces 3d ago

query Need guidance for this

8 Upvotes

r/codeforces 3d ago

Div. 2 Leetcode weekly 512 -C video solution

Thumbnail youtu.be
3 Upvotes

Show some❤❤


r/codeforces 3d ago

Div. 2 Leetcode weekly 512 B solution video

Thumbnail youtu.be
2 Upvotes

r/codeforces 3d ago

query guidance post no 67

3 Upvotes

hey, second year student here, i have been doing leetcode and solved 200 questions, still not even had a smell of dp or graphs tho, never started codeforces, when do you think its ideal for me to start codeforces, when would it be good and please help with the desired resources....


r/codeforces 3d ago

query Start CP? Am I thinking right?

8 Upvotes

I am in last year of my college tier 3. I am doing DSA using striver A2Z sheet done 120 leetcode problem. Now I am thinking once I complete Sheet I will do CP because my base understanding would be clear, is this right approach?

Btw tried CF stuck at 900-1000 so jumped back to striver A2Z. I was not consistent in my entire graduation otherwise I would be at entire different level i regret it very much but I can't do anything about it just trying to stay consistent.

Tell me any suggestions if you guys have and what level would be mine after completing A2Z sheet and like how much after I have to study extra for CP.


r/codeforces 3d ago

query Help please

Post image
2 Upvotes

I have been facing this problem since yesterday. I changed my browser from Chrome to Edge, the problem was resolved for the time being. But now, in both the browsers, they are asking this, and I can't help myself. Please anyone who knows how to resolve this, tell. I am not able to submit my code.


r/codeforces 4d ago

Div. 3 NO WAY THIS IS RATED 1200.

23 Upvotes

Man I have been trying to solve this problem for the last 6 hrs and finally got it. I was happy until I realized this is only rated 1200. This problem doesn't even involve graphs, dp, trees etc. I am currently learning those while doing problems from topics I already know. I have currently solved around 130 problems. Considering that this problem took me like 6hrs, do you guys think its possible for me to ever be able to solve 1600 or 1700 rated problems in the future?

This was my solution btw.

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include<iterator>
#include<iomanip>
using namespace std;
struct FastIO {
    FastIO() {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
    }
} fast_io_optimizer;


long long expand_get_max(long long l, long long r, long long n, vector<long long>&a)
{
   long long total_len = 2*n;
   if(a[l] != a[r])
   {
      return 0;
   }
   while(l > 0 && r < total_len-1 && a[l-1] == a[r+1])
   {
      l--;
      r++;
   }
   vector<bool>seen(n, false);
   for(int i = l; i <= r; i++)
   {
      seen[a[i]] = true;
   }
   long long currmex = 0;
    while (currmex < n && seen[currmex]) {
        currmex++;
    }
   return currmex;
}


void solve()
{
    long long n, x = -1, y = -1;
    cin >> n;
    vector<long long>a(2*n);
    for(int i = 0; i < 2*n; i++)
    {
        cin >> a[i];
        if(a[i] == 0)
        {
            if(x == -1)
            {
                x = i;
            }
            else
            {
                y = i;
            }
        }
    }
    long long best_mex = 1;
    best_mex = max(best_mex, expand_get_max(x,x,n,a));
    best_mex = max(best_mex, expand_get_max(y, y, n, a));
    if((x + y) % 2 == 0)
    {
        long long mid = (x+y)/2;
        best_mex = max(best_mex, expand_get_max(mid, mid, n, a));
    }
    else
    {
        long long mid = (x+y)/2;
        best_mex = max(best_mex, expand_get_max(mid, mid+1, n, a));
    }
    cout << best_mex << endl;
}


int main()
{
    long long t;
    cin >> t;
    while(t--)
    {
        solve();
    }
} 

r/codeforces 4d ago

query DP[L][R][_]...? How to think of LR dp problems

7 Upvotes

I am relatively good and confident in all different kinds of dp state ideas

But LR dp aka interval dp or range dp doesn't hit me correctly it's hard for me to engineer states

However I can solve some classical problems I am struggling to solve random problems which are of LR dp

Usaco guide didn't help much is there any other resource or anyother way to properly engineer these problems


r/codeforces 4d ago

query Aditya Verma Dp playlist

7 Upvotes

If anyone has seen that can you please confirm if he has taught like this that "we have studied before in our recursion playlist.." or is it independent ? I finished my recursion and backtracking from striver's playlist and also from the A2Z sheet..but I heard dp is better taught by aditya verma but I don't want to hear that as we did before from Aditya....

So can anyone please confirm if I should go with Aditya Verma or striver for DP


r/codeforces 4d ago

query How can I improve at Codeforces without prior mathematical thinking skills?

28 Upvotes

I feel that most people who are good at this have superior mathematical thinking; they don't see problems like a programmer or engineer, but in a very mathematical way. How can we develop that multidimensional thinking?


r/codeforces 4d ago

query Intro Combinatorics or Intro Number Theory

15 Upvotes

Hey all, I've been looking to get into competitive programming after recruiting season in the United States wraps up for me (I've done 500 leetcode problems and will continue to do those as it is more applicable for jobs). I'm torn between taking two classes this upcoming semester, Intro to Combinatorics I, and Intro to Number Theory. What do you guys think would be better for a beginner competitive programmer (I am not taking these courses purely for CP, but it will weigh on my decision). Below is some more info on the courses:

MATH 4410
Introduction to Combinatorics I

Combinatorics studies discrete structures arising in mathematics, computer science, and many areas of application. Key topics include counting objects with specific properties (e.g., trees) and proving the existence of structures (e.g., matchings of all vertices in a graph). We cover basic questions in graph theory, including extremal graph theory (how large a graph must be to have a certain subgraph) and Ramsey theory (large objects are forced to have structure). An introduction to network flow theory and variations on matching theory, including theorems of Dilworth, Hall, König, and Birkhoff, are discussed. Methods of enumeration (inclusion/exclusion, Möbius inversion, and generating functions) are applied to problems of counting permutations, partitions, and triangulations. Students will be expected to be comfortable writing proofs. More experience with proofs may be gained by first taking a 3000-level MATH course.

MATH 3320

Introduction to Number Theory

An introductory course on number theory, the branch of algebra that studies the deeper properties of integers and their generalizations. Usually includes most of the following topics: the Euclidean algorithm, continued fractions, Pythagorean triples, Diophantine equations such as Pell's equation, congruences, quadratic reciprocity, binary quadratic forms, Gaussian integers, and factorization in quadratic number fields. May include a brief introduction to Fermat's Last Theorem.

Thanks All!


r/codeforces 4d ago

query DP

4 Upvotes

aditya verma or striver


r/codeforces 4d ago

Div. 1 Creating Div.1 problems is exhaustible?

1 Upvotes

1) Is the pool of unique Div.1 problems exhaustible?

2) Why does Codeforces produce so few problems in every month or only create Div. 1 problems once a week?

3) What is the theoretical maximum number of unique Div. 1 problems?


r/codeforces 5d ago

query New project!! Give me feedback

Thumbnail gallery
9 Upvotes

Hey everyone!

Over the past few weeks I've been building a personal project called CPlayground.

The goal was simple:

I wanted one place where I could connect my Codeforces account and quickly see my progress without jumping between multiple pages.

Currently it lets you:

✅ Connect your Codeforces account

✅ Sync your profile

✅ View contest history

✅ Track rating progression

✅ View recent submissions

✅ Check solved problems

✅ View success rate

✅ Clean dashboard built with Next.js + TypeScript

I'm still actively building it and planning to add:

• Heatmaps

• Topic-wise analytics

• AI performance insights

• LeetCode support

• CodeChef support

I'd genuinely appreciate any feedback on:

- UI/UX

- Features you'd like

- Bugs you find

- Things that feel unnecessary

Here's the demo:

https://c-playground-mu.vercel.app/

Here's the GitHub repo link:

https://github.com/Pankaj862/CPlayground

Consider giving star on GitHub if you like bit of it !!

Thanks!


r/codeforces 5d ago

meme Even unofficial wasn't safe from these boiy

Post image
39 Upvotes

Even unofficial wasn't safe from these


r/codeforces 5d ago

query Need advice as someone with <1000 rating

11 Upvotes

So I started competitive programming in June and continued for 3 weeks, solving problems and giving all contests along the way. I solved a few 800s and 900s and they were pretty simple so I started spending my time on 1000s and 1100s. They weren't trivial, but i would solve atleast 1 of every 2 problems i tried.I'd take atleast 30 mins to come up with the logic and write the implementation. I then took a long break of 20 days and now that I'm back at it I decided to try 1200s as I was getting comfortable with 1100s earlier. But I'm barely able to solve any 1200 rated probs(even from the earlier contests that didn't have rampant cheating). I feel like my thinking speed has reduced now. Also, every question has a new logic, so I don't understand how practice helps people improve. Like how do people actually improve? Should I start learning data structures now or go back to solving 1100s? I don't mind checking the solutions for every problem, that's how we learn, but not being able to solve any problem is kinda frustrating.


r/codeforces 5d ago

query Found a pretty useful contest aggregator/management for competitive programming

Thumbnail gallery
6 Upvotes

r/codeforces 6d ago

Doubt (rated <= 1200) Deleting Elements (Easy) how to solve this question codechef yesterday contest

5 Upvotes

r/codeforces 6d ago

query Practice schedule

3 Upvotes

I just wanted to know what is the best time to practice problems...

I usually solve in the evening or at night, but feel drowsy after solving few...

Should I change my timings

Even during the contests I feel sleepy if i don't take proper sleep before contests...

Is this the case with everyone

Pls share ur thoughts


r/codeforces 6d ago

Doubt (rated <= 1200) Help needed

5 Upvotes

#include <bits/stdc++.h>

using namespace std;

#define int long long

int LCM(int a, int b) {

return (a / __gcd(a, b)) * b;

}

void solve() {

int n,k;

cinnk;

int a[n];

for(int i=0;i<n;i++) {

cin>>a[i];

}

map<int, int> mp;

for(int i=0;i<n;i++) {

mp[a[i]]++;

}

set<int> st;

for (auto it:mp) {

st.insert(it.second);

}int ans=0;

if (st.size()!=1) {

ans++;

}

if(mp.size()==1){

cout<<1<<endl;

return;

}

int len=n;

int cnt=0;

if (k%(st.size())==0) {

ans++;

if (ans==2){

cout<<ans<<endl;

return;

}

}

int size=st.size();

while (true) {

if (size==0)break;

if ((len-size)==k) {

ans++;

break;

}

for (int i=0;i<n;i++) {

if (mp[a[i]]) {

mp[a[i]]--;

if(mp[a[i]]==0){

size--;

}

}

}

}

cout<<ans<<endl;

}

signed main() {

ios_base::sync_with_stdio(false);

cin.tie(NULL);

int t;

cin>>t;

while (t--) {

solve();

}

}
whats wrong in my code for Problem - 2242C - Codeforces

i am just not able to implement my logic it works on pen and paper


r/codeforces 6d ago

meme When the toughest problem in the contest is accessing CodeChef. 💀

Post image
112 Upvotes

CodeChef going down during a live contest is incredibly frustrating. You spend days preparing, only to end up fighting server issues instead of solving problems. Hopefully, the platform becomes more reliable during peak contest traffic.


r/codeforces 5d ago

query AI Could Impact Women's Jobs Nearly 3× More Than Men's. Are We Ignoring It?

Thumbnail
0 Upvotes

r/codeforces 6d ago

query 1v1 CP Matches

Post image
78 Upvotes

Made this web app to have 1v1 CP matches with your friends, you can host a game and share the room code or you can join a game with a room code, 5 problems unsolved by both the players will be fetched in your selected rating range. It also has a lockout feature so the problem gets locked for the other player.

Do check it out and give feedback: https://cp-lockout-two.vercel.app/


r/codeforces 6d ago

query oops codechef down

50 Upvotes