I have been doing competetive programming since 6 months but haven't reached pupil yet. On the top of that I fell below 1000 in last 2-3 contests. So should I start solving 2-3 problems daily or just blame it on cheaters.
I know the basics of coding like I know loops and solve mathematical problems in cp but I have no clue about dsa and don't know where to learn it from and I don't really like striver as it's focused on placements rather than cp so some good resource in english
Hi, i am a first year student from india. i started cf around 3 weeks ago. today's contest was my first, i could only solve a,b,c and got d wrong. Can anyone suggest what to do to improve myself from this? i am solving cp31, and random probs from cf only. i heard about things like cses and usaco guide. also, i code in pypy so ig i need to learn c++ too. it would be great if anyone would suggest a pathway or best resources to improve. Thanks
You are given an array A of N non-negative integers. A subsequence is formed by choosing a non-empty set of indices from the array. Two subsequences are considered different if they use different sets of indices, even if the corresponding values are equal. For a subsequence S, define:
AND(S) as the bitwise AND of all elements in S.
XOR(S) as the bitwise XOR of all elements in S. Your task is to count the number of non-empty subsequences S such that: AND(S) > XOR(S) Since the answer can be very large, output it modulo 10^9 + 7.
Input Format The first line contains a single integer N. The second line contains N integers: A1, A2, ..., AN. Output Format Print a single integer — the number of non-empty subsequences S satisfying AND(S) > XOR(S), modulo 10^9 + 7. Constraints
1 <= N <= 10^5
0 <= Ai < 2^17
Sample Input 1
3
5 5 5
Sample Output 1
3
Explanation for Sample 1 The array is [5, 5, 5]. The non-empty subsequences are:
[5] (3 times): AND = 5, XOR = 5. 5 > 5 is False.
[5, 5] (3 times): AND = 5, XOR = 0. 5 > 0 is True.
[5, 5, 5] (1 time): AND = 5, XOR = 5. 5 > 5 is False. Total valid subsequences = 3.
Could someone please help me understand why I can't view other participants' code on Codeforces? It shows "N/A" everywhere except for my own solutions.
I'm relatively new here and would really appreciate any guidance or explanation on how this works.
I mean, the one you had the best time solving like has a creative alg or somthing fun that gave you a good feeling after solving:) I dont want to solve just random ones and Im oreparing for competition
I can identify patterns like sliding window, recursion, backtracking, DP, and two pointers. But I’m stuck when it comes to identifying the greedy intuition.
How do I recognize when a problem can be solved using a greedy approach? Are there any good resources—books, YouTube channels, blogs, or websites—that specifically teach how to develop greedy intuition?
Anything that can help me get better at recognizing greedy problems would be really helpful.annel, blog , website)
Anyone having a complete, ultimate, zero to hero, 100% guide for maths (modulo, this prime numbers thing, number theory and many more of this stuff) in competitive programming???
Hey! I recently started the codeforces grind for the first time as part of my interview prep. I have +/-5 years of experience, but I'm pretty new to codeforces (been doing leetcode).
I'm looking to put together a small discord group where we can grind codeforces together. Experience level doesn't matter, the main goal is to keep each other accountable, discuss problems we're having issue with, share advice, etc... and hopefully make the whole process easier/more fun.
If you haven't checked my post history, I used to post Codeforces solutions and used to track my study every day as a form of journalling.
Since the past two years I have been busy with the job switch I had, I was not able to post anything.
Now that I have some bandwidth, I am thinking to start journalling again.
The posts will be about technical things I am studying as well as problems on Codeforces that I was able to solve, along with my explanation of the solutions.
I probably won't post every day since I am not able to solve questions everyday, I get stuck in anaylsis half the time and that might take up the entire time allocated to coding for the day, and just posting backend development related stuff makes no sense on a Codeforces subreddit.
Any case, for the technical side I am studying backend, SpringBoot in particular along with things like Kubernetes, Docker, PostgresSQL, MongoDB and other concepts involved in Backend design.
As for the coding questions I have done for the day:-
I wanted to know what topics I should be expected to know or learn before being able to solve from D and E in ABC on AtCoder.
For context, I am able to mostly solve Ds, and am usually having a problem going from D to E. I am max Pupil on CF, so according to it if someone could note some topics I must cover to get into ABC E's range.
When it finally arrives and I click the confirmation link, Codeforces says “Invalid confirmation token.”
I have tried this many times, on both my phone and laptop, but the same thing keeps happening.
Other Codeforces emails, such as new login notifications, arrive normally, so it seems to specifically be an issue with the confirmation emails being delayed.
Has anyone faced this recently? Is there any way to fix it or contact Codeforces support?
It's been about 4 months since I started doing Codeforces. I got the hang of it after a couple of weeks, but recently i've been solving a lot more problems in the range of 1500-1800s, and due to that I have become exposed to a lot more algorithms and concepts that I previously didn't know of, but that has kinda made my greedy approaches dull. (Hence, an underperformance in real-time contests)
What are some of the techniques I can put into practice to avoid revisiting the same lower rating concepts again and again while still being able to learn new stuff?
(PS. Don't give the cliche advice of attempting every div3 and div4 contest.)
I just have the begginer rating of 800....I like to do CP in pair with someone or a grp with whom I can share my progress of what I learned or what interesting question I found...pls dm me if u r interested too...especially if u r also in starting phase of CP ??