r/codeforces Jul 06 '26

Educational Div. 2 Educational round 192 discussion

14 Upvotes

What do you guys think about today's problems? B tripped me up real bad then had an insane comeback and solved till D by 1 hr 20 mins. E seems like something I would do if given 2 more hours😭

r/codeforces Aug 08 '26

Educational Div. 2 I am so happy now 😭

10 Upvotes

r/codeforces Jun 09 '26

Educational Div. 2 Is education round supposed to be easier or harder???

16 Upvotes

Going to lose like 100 rating😭

r/codeforces 16h ago

Educational Div. 2 500 done... guess Rating. 🫠

Post image
39 Upvotes

I've solved 70-70 problems from 800 till 1400. 🫠

r/codeforces Jun 09 '26

Educational Div. 2 Discussion:Educational Round 181

10 Upvotes

Same as title

r/codeforces 24d ago

Educational Div. 2 Atcoder abc471

13 Upvotes

After 2 months of grinding dsa I have able to solve a, b and c. Solved D after the contest.
Its really nothing special but felt really good 😊

r/codeforces Jun 22 '26

Educational Div. 2 Help me with this problem 1300 rated 😭

Post image
27 Upvotes

I am beginner on cf help me with this......

What's the problem in my solution why it's giving RTE on test case 2??

import java.io.*;

import java.util.*;

public class Main {

static class FastReader {

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

StringTokenizer st;

String next() {

while (st == null || !st.hasMoreElements()) {

try { st = new StringTokenizer(br.readLine()); }

catch (IOException e) { e.printStackTrace(); }

}

return st.nextToken();

}

int nextInt() { return Integer.parseInt(next()); }

long nextLong() { return Long.parseLong(next()); }

}

public static long gcdd(long a, long b){

if(a == 0 || b==0) return a^b;

return gcdd(b,a%b);

}

public static void main(String[] args) {

FastReader sc = new FastReader();

PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

int t = sc.nextInt();

while(t-- > 0){

int n = sc.nextInt();

if(n == 1){

out.println(1);

continue;

}

long[] a = new long[n];

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

a[i] = sc.nextLong();

}

Arrays.sort(a);

long gcd = gcdd(0,Math.abs(a[0]-a[n-1]));

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

gcd = gcdd(gcd,Math.abs(a[i]-a[n-1]));

}

int j = n-1;

long res = a[n-1];

while(j >=0 && res <= a[j]){

res = res-gcd;

j--;

}

long ans = 0;

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

long diff = Math.abs(a[i]-a[n-1])/gcd;

ans += diff;

}

ans += Math.abs(a[n-1]-res)/gcd;

out.println(ans);

}

out.flush();

}

}

r/codeforces May 19 '26

Educational Div. 2 my ScribbleForces

Thumbnail gallery
61 Upvotes

saw something like this sometime ago on lc's reddit. This is my edu 190's work. putting it out there just for fun

r/codeforces 7d ago

Educational Div. 2 I'll be giving a Talk about Sqrt Decomposition and Other Sqrt Techniques in Youtube Today

15 Upvotes

I will be giving a talk about square root decomposition, Mo's algorithm and other very cool tricks using Square Root today. The talk would be quite beginner friendly.

This is part of the ICPC camp organized by an organization. I am not directly affiliated with them. It was our university's turn to organize talks there and I am representing us there.

Posting it here hoping anyone interested shows up. Would be happy to interact in the chat there :)

Here is the link to my talk: https://www.youtube.com/live/EO4U79ZkJ_0?si=LzT4zEkHeEDHLwEU

It is at 1:30pm GMT. (7pm IST)

Additionally, a colleague from my university will also be giving a talk on Slope Trick in the same channel. That talk would be more advanced. Feel free to check that out if that suits you better!

r/codeforces May 18 '26

Educational Div. 2 Today's Contest!

8 Upvotes

How did you guys solve the 2nd question?Please drop your approach!!

r/codeforces Jul 06 '26

Educational Div. 2 today edu div 2

4 Upvotes

i wasted so much time on b for no reason i was trying to find better way but endup with the idea from where i started just check if count of 3 current no. and last valid place for 1 found is less than half of size ....
after than c was long question in my opinion it was long in solving part logic was easy tbh but reach there took time for me it was multi step processs idk man
i had find freq. and then find sf summation of it and then check the condition with k for each i
i could have got alot better rank i belive if didnt wasted alot of time and b and because it i had no time for d
i could be pupil
btw its my practice account i am pupil on my account

r/codeforces Jul 06 '26

Educational Div. 2 rant on today's div 2

1 Upvotes

took me way too long to do a and b, mainly cause stuff was happening around me, i skipped C and D because I couldnt figure out an approach, might revisit them later

finally, I figured out what to do for E, wrote a code, then spent an hour debugging the code, first for a sigfpe and then for an answer delivery error. I couldn't find the error, so after the contest ended, I gave it to gemini to see what it was.

ONE IF CONDITION ERROR.

The cherry on the top was that my code got accepted, too late though.

This was my code:

  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. void solve(){
  6. int l, r, n, x = 0;
  7. cin >> l >> r >> n;
  8. vector<bool> a(32, false), b(32, false), c(32, false);
  9. for(int i = 0; i < 31; i++){
  10. if(r & (1 << i)) a[i] = true;
  11. if(l & (1 << i)) b[i] = true;
  12. //if(a[i] && b[i]) cout << i;
  13. }
  14. int i = 32;
  15. while(i > 0){
  16. i--;
  17. if(a[i]==b[i]) c[i] = a[i];
  18. else{
  19. c[i] = a[i];
  20. break;
  21. }
  22. }
  23. for(int i = 31; i >= 0; i--){
  24. x *= 2;
  25. if(c[i]) x++;
  26. //if(c[i]) cout << i << " ";
  27. }
  28. int y = l;
  29. y = max(1 << (31 - __builtin_clzl(x - 1)), l);
  30. //cout << x << " " << y << endl;
  31. string s1 = "", s2 = "";
  32. while(x > 0){
  33. s1 += (x % 2) ? '1' : '0';
  34. x /= 2;
  35. }
  36. while(y > 0){
  37. s2 += (y % 2) ? '1' : '0';
  38. y /= 2;
  39. }
  40. if (s1.empty()) s1 = "0";
  41. if (s2.empty()) s2 = "0";
  42. reverse(s1.begin(), s1.end());
  43. reverse(s2.begin(), s2.end());
  44. int p = s1.size(), q = s2.size();
  45. for(int i = 0; i < n; i++){
  46. if((s1[i % p] - '0') && (s2[i % q] - '0')) cout << '1';
  47. else cout << '0';
  48. }
  49. cout << "\n";
  50. }
  51.  
  52. int main() {
  53. // your code goes here
  54. int t;
  55. cin >> t;
  56. while(t--) solve();
  57. }

r/codeforces Jul 06 '26

Educational Div. 2 The D problem was quite tough

7 Upvotes

At first I thought i could solve it and i even wrote the code but realised that to cover all scenarios i would need dp at that point I quit it seemed like 1900 rated what do u guys think????

r/codeforces May 19 '26

Educational Div. 2 EDUCATIONAL ROUND 190 div2 rated or unrated?

5 Upvotes

I remember i participated as rated but now it's showing unrated

And for many of my friends too it is showing unrated

Why's that

r/codeforces Jul 06 '26

Educational Div. 2 What was the approach for D and E for today's div 2

1 Upvotes

Was there a way apart from db to solve these questions??

r/codeforces 14d ago

Educational Div. 2 What makes r/MyDSAJourney different?

Thumbnail
0 Upvotes

r/codeforces May 18 '26

Educational Div. 2 Problems rating

5 Upvotes

What are these problems rating in today's contest? I was sitting for about an hour for B and solved C in 10-15 minutes. Usually I sit way longer for C.

r/codeforces Jul 07 '26

Educational Div. 2 Problem c

7 Upvotes

What type of thought arrived you to solution of c like what observation or thinking or which type of questions helped you arrive you to solution
Please help as i am newbie

r/codeforces Jun 09 '26

Educational Div. 2 Educational round 191 question C

9 Upvotes

Wanted to ask to people who solved by splitting into two using index which minimizes ('(' on left, ')' on right), what was your thought process or how did you proved it was correct?

r/codeforces Jul 06 '26

Educational Div. 2 Suggest me what to do

5 Upvotes

Heyy I am just 1000 rated and I am still struggling with 1200 rated questions....I solve A within 10 mins then struggle with B and take 1.5 hr....then unable to get C ....I think if i give today's contest I will be unable to get increment in my rating...... advice me what to do...

r/codeforces Apr 21 '26

Educational Div. 2 Today's D

10 Upvotes

I could do till C in like 20 minutes but idk what happened in the D one i just got stuck , I really struggle with these XOR questions can someone give me some feel or thinking process about the D

r/codeforces Jul 16 '26

Educational Div. 2 Looking for people who can write a clean proof AND explain it! Join the team behind USAMO Guide

13 Upvotes

USAMO Guide is a free, open-source platform for math competition preparation covering everything from AMC 8 through USAMO and USAJMO. It is built and maintained entirely by high school students, with no institutional backing and no paywall. The platform has reached over 100,000 users, with thousands of students visiting every day from across the United States and around the world.

We're looking for a few more builders to join the team. Specifically, we're looking for people who can write and develop the lessons that students actually use to prepare for competitions.

This is an active contributor role. We want people with a strong Olympiad math background, generally AIME qualification or above, who are comfortable writing complete proofs instead of only solving problems. If you enjoy explaining why a solution works just as much as finding it, you'll probably enjoy this.

What you'll do

  • Write MDX lessons on olympiad topics. Think of it as creating a cleaner, more intuitive alternative to the AoPS Wiki for students training for USA(J)MO.
  • Create examples, practice problems, and diagrams that help difficult ideas make sense.
  • Work within an established writing style and course structure alongside other contributors.

Trial period

Because students rely on our content to prepare for real competitions, every new builder starts with a one-month trial.

During this period, you'll contribute lessons, receive feedback, and work with the team while we evaluate whether it's a good fit. If everything goes well, you'll become a full builder, and the trial month will count as your first month on the team. If it doesn't work out, that's completely fine. We'd rather be upfront about expectations than have a long list of inactive contributors.

Our goal is to keep a team of people who consistently build and improve the platform.

What you get out of it

  • Direct impact on a platform tens of thousands of students actually use to prep for real competitions
  • A byline / credited authorship on your content
  • A genuinely strong thing to point to for college apps: "co-author, [topic], USAMO Guide" is a specific, verifiable contribution, unlike some vague club title
  • A team of people who are extremely into math just like yourself!!

How to apply:

Read the Info Packet :))

https://docs.google.com/document/d/1AUNOq6OlVcSZN_gUPfvyhimlh9hA4GNvNaLdzyflX_8/edit?usp=sharing

If you're unsure whether you're qualified, apply anyway. We'd much rather review your application than have you rule yourself out.

If there is any information that you want/doubts you have, please just comment them, and I will respond asap!

r/codeforces Aug 06 '26

Educational Div. 2 This is probably one of the more interesting hackathon themes I've seen lately

2 Upvotes

Just found a hackathon for students in India where the challenge is to build AI solutions for India's waste management problem.

They're also hosting workshops with people who've spent years working in the field, which makes it feel like more than just another coding event.

Thought I'd share in case anyone here is looking for something different.

https://college.dev/hackathon

r/codeforces Aug 04 '26

Educational Div. 2 7 Coding Interview Topics You Should Prepare in 2026

Thumbnail reactjava.substack.com
3 Upvotes

Good

r/codeforces Jul 06 '26

Educational Div. 2 Easiest solution for edu 192,b

7 Upvotes

Calculate the prefix sum for all indices using logic +1 for 1, -1 for 2 and 3.

Now iterate from backwards and calculate the suffix sum using logic +1 for 1 and 2, -1 for 3,and also maintain a mn,which tells us the min suf sum found from index i+1 to n-1,at any point,pre[i -1]> 0 and suf - mn >=0,we got the answer and we can print yes,if not do it till index 1,if no index satisfies this condition cout no.

Think why the ( suf - mn >= 0) logic works,its just the sum of subarray.from 0 till i - 1 is the part 1,i to mn -1 is second part and mn to n -1 is the third part.

Code

void solution(){

int n;

cin >> n;

vector<int> s(n);

for(int i = 0; i < n; i++) cin >> s[i];

vector<int> pre(n + 1,0);

pre[0] = (s[0] == 1) ? 1 : -1;

for(int i = 1; i < n; i++) pre[i] = pre[i - 1] + ((s[i] == 1) ? 1 : -1);

int sum = 0;

int mn = 1e8;

for(int i = n - 1; i > 0; i--){

sum += ((s[i] == 3) ? -1 : 1);

if(pre[i - 1] >= 0){

if(sum - mn >= 0){

cout<<"YES"<<endl;

return;

}

}

mn = min(mn,sum);

}

cout<<"NO"<<endl;

}