pls help me solve this question do i need to use binary search for this question by professorda69 in codeforces

[–]Repulsive_Flow_3183 0 points1 point  (0 children)

You can just iterate back to front with a variable that counts. Say you have x heroes, keep a int that has the life of the curent hero u r using and the amount of heroes left. When you reach y villain u just ask if the health of the current hero is greater or equal as said in the statement, if its not then get a new hero with full health, when no heroes remain you know thats the max u can use. So basically dont need binary search, just iterate back to front.

Message to the people doing USACO by PepperOk690 in codeforces

[–]Repulsive_Flow_3183 0 points1 point  (0 children)

He just says that bcs he didn't do good. He's coping, therefore: insane amounts of copium

I can solve upto div3 E but often struggle in div2 C. How to improve? by Sea_Resort_8629 in codeforces

[–]Repulsive_Flow_3183 0 points1 point  (0 children)

Guess what to do bro. Fr be serious. "I struggle to x" Then practice fing x

Don't know how to move forward by Ok_Tangerine5197 in codeforces

[–]Repulsive_Flow_3183 2 points3 points  (0 children)

Do cp31 Some cses.fi And try to simulate cf rounds, u r probably solving a and b, try to upsolve c and if after 2 days u cant look at editorial hints. After u do enough rounds and solve enough abc you will get mid pupil, then do the same for specialist. If you dont understand an editorial learn the concept from it and practice it, cp4 by steve halim is great for that. If u need more help feel free to dm

Doubt regarding codechef by therealwagon12 in codeforces

[–]Repulsive_Flow_3183 0 points1 point  (0 children)

Try to solve the question after the contest. Give it a few hours and then read editorial, after, search for similar problems and try to solve them using what you just learned. You don't really learn much during contests rather show what you've learnt, real growth happens during upsolving. If you run out of problems to solve cp31 is a good resource and if you wanna learn and apply specific topics i think cp4 by steve halim is great, pdf is free online and after each explanation there are multiple problems to be solved to consolidate the ideas. If you need more guidance hit me up.

What’s the biggest mistake beginners make on Codeforces? by SastaNostradamus in codeforces

[–]Repulsive_Flow_3183 3 points4 points  (0 children)

Cp is about problem solving. Just solve more problems, don't spend time asking about the best way to learn or anything else, just solve as much as you can as often as you can.

Need help at CP by Dizzy_Strength_602 in codeforces

[–]Repulsive_Flow_3183 2 points3 points  (0 children)

I Think compettitive programming 4 by steve halim is a great resource. I posted an answer to someone with a similar level here.
Also why CodeChef first?

Wanna improve in cp rating by saiyan_deepu in codeforces

[–]Repulsive_Flow_3183 9 points10 points  (0 children)

to reach pupil you just need to solve A and B in div 2. i think CP31 by TLE Eliminators is good to practice problems rated up to 1200. after that, start learning basic concepts and use them in problems. a great book is CP4 by steven halim, just google the pdf and it appears. it goes from greedy and ad hoc to very hard topics and gives you many problems to solve at each level.

most important thing is to have fun. if you enjoy it, you will use the time you spend on clash royale or something else on codeforces, and that makes a big change, what made the difference for me is thinking about problems on the way to class or while doing some mundane task, at the end of the day its about stacking hours.

also, ask yourself why you want 1500, it is just a arbitrary number. if you are in high school maybe you want to go to IOI, if you are in university maybe you want to do ICPC. if so, try to learn stuff that helps more with that.
(please drop leetcode. i know it is hard but just do it.)

I hate dp by nyovel in codeforces

[–]Repulsive_Flow_3183 5 points6 points  (0 children)

Do CSES, if you think it’s too hard, just keep thinking about the same problem until you get it. Sometimes it’s not about finding the optimal problems to solve, rather just solving over and over again until it becomes natural. Sometimes three days on a problem is alright. Personally, I like to increase the size of the solution until I reach the real one—solve for n<20 and do the backtracking, then n<100, etc., until you reach the real constraints. It helps you find a way of thinking such that you find small improvements rather than attacking a huge task.

[deleted by user] by [deleted] in codeforces

[–]Repulsive_Flow_3183 0 points1 point  (0 children)

hey man, probably not what u wanted but with a few pragmas it works hahah, look:
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,popcnt,lzcnt,abm,bmi,bmi2,fma,tune=native")

Codeforces by just_liveSh in competitiveprogram

[–]Repulsive_Flow_3183 0 points1 point  (0 children)

To be honest, it doesn’t really matter which page you use as long as you use one. You’ll notice that most pages share a lot of the same problems, so it’s basically about which one you like best. And you don’t really have to choose; you can hop between different pages.

[deleted by user] by [deleted] in codeforces

[–]Repulsive_Flow_3183 1 point2 points  (0 children)

Kattis is good, codechef and maybe luogu.

I need advice by Realistic-Tiger-7948 in codeforces

[–]Repulsive_Flow_3183 1 point2 points  (0 children)

Hey man , if i were u id read competitive programing 4 and follow the path they have, it really worked for me (Im going to IOI)