Блог пользователя Meron3r

Автор Meron3r, история, 3 недели назад, По-английски

I tested the same solution on a problem that needed summing up long longs.

As you can see, both C++23 and C++17 ran in 154 ms and took up 100 KB. But C++20 is the best option here. That's why I use C++20 and recommend you do so too! If you agree, upvote, and if you don't, downvote.

This is my Code

And this is the problem.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -25
  • Проголосовать: не нравится

Автор Meron3r, история, 2 месяца назад, По-английски

I just started anime, and now I understand why some programmers like anime. Cause it saves you your sanity. Why do you think?

Полный текст и комментарии »

Теги why
  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится

Автор Meron3r, история, 2 месяца назад, По-английски

Nowadays, people are mostly used to dark themes. For example, you were reading some documentation in geeksforgeeks then you open codeforces and you get flash banged so hard.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

Автор Meron3r, история, 3 месяца назад, По-английски
My Start Code

Let's say I write some code in the "solve" function. I check the example tests and if they pass, I submit BUT I comment the #define cin input and the #define cout output so the code can work WITHOUT text files

Полный текст и комментарии »

Теги c++
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Meron3r, история, 3 месяца назад, По-английски

Now a day's there is many cheaters out there. But one question: Why? Contests are about getting better at solving problems by giving you challenging new problems so why would you want to cheat? Just to be smug about it? And if so, why here? In a place where people solve problems. What good will it bring you. UPD: Not Minecraft. mc is gud. UPD: Just dont cheat, like at all

Полный текст и комментарии »

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится

Автор Meron3r, история, 3 месяца назад, По-английски

After Writing a bit of code, the compiler stops working. Sometimes a refresh fixes the problem, but most of the times it does not work. Please MikeMirzayanov Fix this problem with the others (Cloudflare stopping submission, submission queue, etc).

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор Meron3r, история, 4 месяца назад, По-английски

Hello Codeforces!

Has anyone got a long queue of submission? I would be surprised if it didn't happen to you. It has been increasing in numbers! It even happened in contest! (Div. 3). Please MikeMirzayanov fix this issue!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор Meron3r, история, 6 месяцев назад, По-английски

Me and many others have expiriened the problem with "in queue...". we wait there from 1 minute to a whole hour JUST to submit, like seriasly, we need to update the jugding system cause sometimes we have lag there. when it first happened to me 3 months ago, I thought it was because of the internet. BUT NOW everyone has this lag sometimes. I think MikeMirzayanov should look alittle more on this anoying problem.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор Meron3r, история, 6 месяцев назад, По-английски

why?!? u might be asking, well... because if u know advanced math, when u open a math problem u just need to think and KABOOM, u solved it in less than 10 minutes! also because most problem (ABC & ABCD) in div 2 and 3 are math problems. for beginners (like me) u should start by working on algebra, combinatorics, and number theory problems numbered 1-5 on the AIME. it really helped me.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор Meron3r, история, 6 месяцев назад, По-английски

bruh, we need to get better at solving problems, here are some tips to help: when u open a problem, u need to not be lazy if its too hard for u; better just solve it. also u should train ur weaknesses, for example mines is math, so i need to filter problems on math. Remember, in coding u shall not have a weak side. and also dont ONLY do div 3, 4. do div 2 too, because if u solved a few problems u might have seen that some 800-1000 ratings problems are from div 2! also most ABC problems in div 2 are math so u should strenthen it, and not make it weaker like me (;

If u agree please like cause ive got -47 there!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

99 days left...

Maitei Fuerzas de Código rehegua

Hello Codeforces! Can anyone guess the language (Please no google translate)? Comment down bellow! This is day 2 of my blog series

My current plans for the day

I think I should learn a new method.

Spoiler

Also problem 1 in Div.4 is probably is gonna be the new easiest problem on Codeforces. Then goes Watermelon.

(Wonder what problems are gonna be in April Fools)

Div.4

For me, Div.4 was very successful! Surprisingly, I solved the first four easily. But the ratings haven't come yet..

UPD: CREDITS TO Norp!!! MAY EVERYONE HAVE HIGH AND LUCKY RATINGS!!!

Chao to all!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -27
  • Проголосовать: не нравится

Автор Meron3r, 8 месяцев назад, По-английски

100 Days left...

Hello Codeforces!

Before I can talk about this new blog series, we all have to thank MikeMirzayanov for such an AMAZING website for CP.

How this all started

While I was looking at my blogs I saw a blog "Pupil in 80 days", and I thought "Wow! What an amazing idea for a blog series!". And here is me 10 days later making an amplified version.

My current plans for this day

All I am doing today is solving problems (900 — 1100) to prepare for Div.4.

Help

If any of you have some great TWISTS for this challenge, please comment down bellow.

Credits

So this is credits where I will credit any people who gave ideas in comments and etc.

  1. Credits to Norp for the general idea.

If you want to be in the Credits just give an idea. (and I have to accept it);

Chao to all!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -20
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

Every onewho is div4. (like me): Good Luck! Div4. is tomorrow. hope for every one good luck. also, I wonder what problems are gonna are be in april fools contests?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -7
  • Проголосовать: не нравится

Автор Meron3r, 8 месяцев назад, По-английски

I was looking in blogs and I saw this blog... I looked at chat, and there was and ISLAMIC terorist. Why are they even in a CP site anyway??? Why isn't MikeMirzayanov doing anything to it? I herd in the news that Islamic terrorists from tajikistan killed about 131 people in Russia (I was very andgry and sad about this news cause I am a tajik). And it is all cause of money. I think MikeMirzayanov should make a username checker for swear words.

Полный текст и комментарии »

Теги sad
  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

Nowadays, I see bad usernames with bad words (exp: f*ck). I think MikeMirzayanov should change the rules about usernames.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +23
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

I am stuck solving 800 and 900 ratings. What should I do?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

When I was scrolling through YouTube, I saw this video... I just LAUGHED when I watched it full, very funny!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

Why??? You might be asking... well, std::endl is the most common thing that might be giving you TLE. It's because std::endl flushes every time. But on the other hand, '\n' only flushes once every 1000 times because is is just a newline character. But if you are used to writing std::endl or endl, you can just make a define for it. #define endl "\n". If you think I am wrong, just comment, don't dislike.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -18
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски
  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

The reason that C++20 is better than C++17 is that C++20 is twice as fast when you are using long long because C++20 in codeforces is 64-bit (acording to this blog). The faster we get C++20 the better (if you agree vote : i like it) and please anyone dont dislike me

Полный текст и комментарии »

  • Проголосовать: нравится
  • +40
  • Проголосовать: не нравится

Автор Meron3r, история, 8 месяцев назад, По-английски

anyone who knows please comment? also PLEASE RETURN IT MikeMirzayanov (C++20)!!!!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

Автор Meron3r, история, 9 месяцев назад, По-английски
unsigned long long factorial(unsigned int x) {
    
    if (x == 0 || x == 1) return 1;
    
    return x * factorial(x - 1);
    
}

Полный текст и комментарии »

  • Проголосовать: нравится
  • -40
  • Проголосовать: не нравится

Автор Meron3r, история, 9 месяцев назад, По-английски

Macros or also known as #define in c++ are very useful, but it takes a while to think of some great one that will save you a LOT of time, or a little, but it still makes it look better. Like, I was a python programmer and then when I switched to c++, I wasn't used to writing string, so I made a define like this:

#define str string

Here are my personal macros

#define sz size
#define yes cout << "YES"
#define no cout << "NO"
#define str string
#define ll long long
#define ull unsigned ll
#define uint unsigned int
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define vc vector
#define vci vector<int>
#define vcstr vector<str>
#define vcll vector<ll>
#define vcc vector<char>
#define fast ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define fi first
#define se second
#define be begin()
#define en end()

When you start solving a problem, you usually write long pieces of code. #define allows you to shorten and simplifie any ones code. If you want to make a macro for yourself you need to know how to make one first:

// here  we make a define for long long:
#define ll long long

After you do that you can use it anytime you want, for example:

ll a = 98210;

vector<ll> t;

unsigned ll factorial(x) {

if (x == 1 || x == 0) return 1;

else return x * factorial(x - 1);

}

Remember, defines vary from people, you can even get inspired by other peoples #define's too! ask a friend about his defines, they might also be useful for you too!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -21
  • Проголосовать: не нравится

Автор Meron3r, история, 10 месяцев назад, По-английски

Everyone wants to make there code FASTER but there is lots of simple solution. the first and most simple one is this:

std::ios::sync_with_stdio(false);

What this does is that usually cout is synced with stdio. so if we set it to false it will make the code slightly faster

Also you can set cin.tie and cout.tie to NULL like this:

cin.tie(NULL);
cout.tie(NULL);

Which will also make it alittle bit faster.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -11
  • Проголосовать: не нравится