Xbalanque's blog

By Xbalanque, history, 5 hours ago, In English

I was expecting something crazy like your delta = max(delta,0) or delta += 10 as a bonus.

Or something special with problems.

But today's contest was just like any other contest.

WHY WHY WHY

Thanks!

Full text and comments »

  • Vote: I like it
  • -26
  • Vote: I do not like it

By Xbalanque, history, 4 days ago, In English

Im 438 rated now

That's it, I'm not good at all.

I guess god didn't make me great neither i can work hard to become great.

I want to become LGM, i dont want to stay on below 3000 pathetic ratings.

Please help me (LGMs only)

Thanks!

Full text and comments »

  • Vote: I like it
  • -19
  • Vote: I do not like it

By Xbalanque, history, 4 days ago, In English

Hi Codeforces friends,

I am writing this blog after a long time of thinking. First, let me tell you I am not best coder here, but I have good brain and lot of ideas. You see, everyone wants to solve problems faster, but they don't know the real secret. They do DSA (data structure algo), but is that really needed? No. I am going to teach you something BIG today.

Warning

Okay, so here is my big idea. It is something I call the Super Genius Algorithm (SGA). This algorithm is so good, it can solve even hard problems in constant time, which means you don’t need loops, recursion, or anything slow like that. You are probably thinking: "How is that possible?!" Let me explain step by step.

Step 1: Pre-Compute Everything

First, you need to precompute everything. What does that mean? It means, before you solve any problem, you just solve all problems in the world already. Yes, I know what you’re thinking: "But how do I do that if I don’t know the problem?" Don’t worry, I’ll explain.

Let’s say there is a problem where you need to calculate the sum of two numbers. Normally, people would write something like this:

int sum(int a, int b) {
    return a + b;
}

WRONG. This is SLOW because you are adding numbers every time. Instead, you should precompute the sum of every possible pair of numbers and store it in a giant array. Something like:

int sum[1001][1001];
for (int i = 0; i <= 1000; i++) {
    for (int j = 0; j <= 1000; j++) {
        sum[i][j] = i + j;
    }
}

Now when you need the sum, you just do this:

cout << sum[a][b] << endl;

BOOM. O(1) time. No addition needed.

Step 2: Hard Problems? Just Guess the Answer

For harder problems like DP or graphs, you might think precomputing is not possible. But here is where my genius idea comes in: you don’t need to solve the problem to get the answer. You just need to guess it. Let me explain.

Most problems have constraints like "the answer will be between 1 and 1000." So, why not just write this?

int answer = rand() % 1000 + 1;
cout << answer << endl;

If your guess is wrong, then just submit again with a different random number. Eventually, you’ll get it right. This is called Monte Carlo Algorithm, which I read about on Wikipedia. Smart people use this method, so why not us?

Step 3: Write Code Without Coding

Here is another secret nobody will tell you. You don’t actually need to code to solve problems. Just write some random stuff in your submission, like this:

// Sorry, I ran out of time, but here is a cool algorithm I was thinking about.
// I think this should look good:
int main() {
    cout << "Hello, World!" << endl;
}

Sometimes, the problem setters feel sorry for you and give you partial points. I got 12 points this way once in a Div. 3 contest, so trust me, it works.

Final thoughts:

If you follow my Super Genius Algorithm (SGA), I guarantee you will become a red coder in no time. Some people will say this is trolling, but that’s because they are jealous of my genius. Don’t listen to the haters.

Remember, programming is not about writing good code. It’s about writing code that works. And if it doesn’t work, then it’s the problem setter’s fault, not yours.

Good luck, and see you in Div. 1 soon!

P.S. If you don’t understand this blog, just read it again until you do.

Full text and comments »

  • Vote: I like it
  • -43
  • Vote: I do not like it

By Xbalanque, history, 11 days ago, In English

I will get to LGM in 2025, i will work very hard.

2025 will be my year.

If i don't i will quit cp forever.

Thanks!!

Full text and comments »

  • Vote: I like it
  • -33
  • Vote: I do not like it

By Xbalanque, history, 3 weeks ago, In English

The next contests are on 4th, 12th, 17th January and after that no contest afterwards in january.

Why not start 2025 with a bang, why is it so cold ?

Whole month and this less contest ??? please i will die without contests. I cant survive of codechef, sorry.

Full text and comments »

  • Vote: I like it
  • -33
  • Vote: I do not like it

By Xbalanque, history, 4 weeks ago, In English

BledDest

Never host nay round in the future ever for god's sake. Terrible contest

This was the best possible way to make anyone sad on christmas.

Thanks!

Full text and comments »

  • Vote: I like it
  • -52
  • Vote: I do not like it

By Xbalanque, history, 4 weeks ago, In English

I started learning about something called STL (Standard Template Library) in C++. Honestly, I have no idea how it works, but people say it’s important, so I tried learning it

Map : Confusing

I think it’s for storing stuff with keys and values, but honestly, it just made things more confusing. But why do we even need a map? Can’t we just use two arrays—one for keys and one for values? Seems simpler to me. Also, wikipedia said you can check if a key exists with find, but when I tried it, I got all sorts of errors.

Set : What even is this

So then I looked at set. wiki said it’s for storing unique things, but I thought arrays already do that? Anyway, here’s what I wrote:

code

The output was 10 20. Cool, I guess? But I don’t get why it ignored the duplicate. What if I want duplicates? Also, wiki said it’s sorted automatically, but it’s not like I needed it sorted here.

valarray : Why is this a thing ?

While exploring STL, I stumbled upon something called valarray. From what I read, it’s supposed to be useful for mathematical operations on arrays, but I have no idea why anyone would use it.

here is my code

The output was 2 4 6 8, which is kind of neat, I guess? But I don’t see why you’d use this instead of just writing a loop to multiply everything. Also, it has other weird operations like slicing and shifting, which sound cool but are way over my head. Does anyone actually use valarray in real problems? It feels like one of those features that’s there just to look fancy.

What I Learned (or Didn’t)

  1. STL has a lot of stuff, but I’m not sure why it’s better than normal code.
  2. Maps seem unnecessary unless you’re doing something weird.
  3. Sets are okay if you hate duplicates, I guess.
  4. valarray is confusing and maybe for mathematicians?

Help me

can someone explain why STL is such a big deal? I feel like I’m missing something obvious here. Also, if you have any tips, drop them in the comments. I’m clearly struggling, and any help would be awesome.

Thanks!

Full text and comments »

  • Vote: I like it
  • -22
  • Vote: I do not like it

By Xbalanque, history, 4 weeks ago, In English

I solved 2 problems in today's div.3 but both of them got hacked.

Knave hacked my problem A

_WaterDrop_ hacked my problem B

Why people hack my problems always ?

I'm 1400 on leetcode but my rating on codeforces keeps dropping. It will drop further now below 700.

Why ? is the problem me?

How should i improve ?

Thanks! for help

Full text and comments »

  • Vote: I like it
  • -37
  • Vote: I do not like it

By Xbalanque, history, 5 weeks ago, In English

Today's contest i gave, I got WA on every question, in last after 2 hours of trying hard i got problem A solved.

I will still lose rating points.

Why is it like this ? MY leetcode rating is 1400 but codeforces is not even 1000.

How should i practice and how do i get better and whats wrong with me ?

today's contest was too hard ?

Thanks!

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By Xbalanque, history, 6 weeks ago, In English

I have gotten so many hacks ? My rating dropping so fast because of that. I don't know who is hacking my solutions, if you are reading this, stop hacking me, get a life.

Thanks!

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

By Xbalanque, history, 7 weeks ago, In English

I do leetcode daily, but my leetcode rating is 1350. My codeforces rating is 984, it should atleast be 1200+ in the range of pupil. i dont know why what is wrong with me.

please help;

Full text and comments »

  • Vote: I like it
  • -25
  • Vote: I do not like it

By Xbalanque, history, 3 months ago, In English

StellarSpecter has multiple personalities

Proof

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By Xbalanque, history, 3 months ago, In English

Why do we have 2 contests in one day, why can't we have normal time intervals between contests.

Please Mike work on it, it's not that hard to do.

We can easily have one contest each 3-4 days, but currently we have two contests either on same or consecutive days and then no contests for a week.

Please fix it.

Thanks

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By Xbalanque, history, 4 months ago, In English

P.V.Sekhar nishkarsh

do better next time, everything is not about maths always.

Felt like a codechef contest , will have to think twice before giving a contest authored by you guys.

Full text and comments »

  • Vote: I like it
  • -46
  • Vote: I do not like it

By Xbalanque, history, 4 months ago, In English

Go watch

Spoiler

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

By Xbalanque, history, 4 months ago, In English

Because of chat GPT and cheating, do contest authors think that making a contest is useless and not worth anymore ?

There are no contests in the remaining month (except unrated trash kotlin heroes).

I request Mike to make more contests by himself, I can offer my help for free to make 1200 problems.

Do not let cf die.

Full text and comments »

Tags do, no, let, cf, d., i., e., ;-;
  • Vote: I like it
  • -41
  • Vote: I do not like it

By Xbalanque, history, 4 months ago, In English

I request MikeMirzayanov to ban all such users.

I would like to request higher rated users to report the sus submissions.

E.g AryanDLuffy solved E1 with chat GPT, his code says it all.

There are many cheaters in today's contest, I can not report such users but If you can then please do so.

Thanks!

Full text and comments »

  • Vote: I like it
  • +40
  • Vote: I do not like it

By Xbalanque, history, 4 months ago, In English

The next contest is on 14th september and after that no contest till 30 september (only kotlin heroes), I want more contests.

UPDATE: We have another Div2 on 20th !!!

Hoping to see more.

Full text and comments »

  • Vote: I like it
  • -18
  • Vote: I do not like it

By Xbalanque, history, 4 months ago, In English

The next contest is on 14th september and after that no contest till 30 september (only kotlin heroes), I want more contests.

Whole month and no contest ??? please i will die without contests. I cant survive of codechef ewww sorry

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

By Xbalanque, history, 5 months ago, In English

The next contest is on 14th september, I want more Div2s.

14th september is too long, please i will die without contests. I cant survive of codechef ewww sorry

Full text and comments »

  • Vote: I like it
  • +25
  • Vote: I do not like it

By Xbalanque, history, 5 months ago, In English

Why are you implementing new features on this website MikeMirzayanov when it can not even handle 40k people, even leetcode does better than that.

Come one MikeMirzayanov, you can do better than that. This is not something new, please make codeforces worthy and make it able to handle its users properly.

I believe there are thousands of extremely frustrated users like me who are annoyed because of this.

Such a shame and pity.

Full text and comments »

  • Vote: I like it
  • -25
  • Vote: I do not like it

By Xbalanque, history, 5 months ago, In English

2008H - Sakurako's Test

Editorial says Let's fix one x and try to solve this task for it.

okay makes our time complexity q*(something), moving on...

How to find number of i that ai mod x ≤ m for some m

We can use binary search of some sort, making our complexity

q*log(x)*checkerForM, how in the world is this complexity not TLE

Can anyone explain it to me.

Full text and comments »

  • Vote: I like it
  • -20
  • Vote: I do not like it

By Xbalanque, history, 5 months ago, In English

The next contest is on 14th september, I want more Div2s.

Spoiler

14th september is too long, please i will die without contests. I cant survive of codechef ewww sorry

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

By Xbalanque, history, 5 months ago, In English

I am doing ABC in div2 consistently, sometimes i can do till D/E depends on situation.

Can I reach expert if I keep doing this or what change in plan do I need to adapt ?

Any guidance would be helpful.

Full text and comments »

  • Vote: I like it
  • -24
  • Vote: I do not like it

By Xbalanque, history, 5 months ago, In English

I am very good at linking old stuff to a newer problem (thats why I like problem making too). If I have solved say 10 tough problems and you give me a problem thats twice as tough as them but is similar in some aspect to some of them I am most likely able to solve it. But since memory is limited as I practice, I want to keep standard problem ideas in my mind only, around 50 problems for each data structure and 300-400 problems in total. (I will obviously solve more problems but will keep on discarding the problems which I will find similar to my existing knowledge).

PS: I'm someone who doesn't need to solve a ton of problems to get better, I need to solve a particular idea only once and Im pretty sure I would be able to solve a ~40% similar to that kind of problem. So I don't want to spend my time solving more and more problems.

What is the best source for such problems is it CSES problem set, TLE Eliminators, or something else ?

Any help would be appreciated.

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it