### hitch_hiker42's blog

By hitch_hiker42, 6 weeks ago,

There is a class of problems that always bug me:

https://codeforces.com/problemset/problem/1263/A

https://codeforces.com/problemset/problem/1366/A

https://codeforces.com/contest/1539/problem/A

There are things common with these types of problems:

1). they usually require doing greedy casework or edgy math

2). you can sometimes force a binary search solution to pass (though it is tedious)

3). usually given as Div2 A/B (hopefully not in Div1), so you feel a little frustrated after not solving them for around 30 minutes (which sometimes results in a bad contest)

4). most of them are in the difficulty range: 900-1200

5). even after you solve these, there's a little scope for satisfaction

6). I'm a little curious about this one: some of these are written by MikeMirzayanov (probably he can explain better :p)

I hate these problems, probably because I am too lazy to do the casework or I suck at greedy or maybe the sort of math that's involved (eg: ceiling or flooring things, maybe check if the remainder is zero in the end, maybe add 1 or subtract 1?) doesn't suit my taste yet. Do you guys like these sorts of problems? If yes, can you explain what is the motivation behind them, and why you like them? I want to get rid of this feeling and get better at these types of problems.

• +75

 » 6 weeks ago, # |   +123 Don't try to solve every case of the problem. Try to figure out a single formula on pen and paper. It is the same situation when you try to do casework in the problem, which can be solved by a defined existing algorithm. Smart practice will work here.
•  » » 6 weeks ago, # ^ |   0 Usually, I don't naturally see a formula in such problems. My first ideas somehow always involve binary search.. which though feels a little overkill, but sometimes is faster to AC than struggling with coming up with a formula. Also, sometimes there's not a single formula but a few depending upon 2-3 cases. Anyway, I'll try following this during my practice. Thanks.
•  » » 6 weeks ago, # ^ | ← Rev. 3 →   +21 What is smart practice? Edit : I am honestly asking this question, that how to practice smart. (after now reading it,I think my reply might have sounded like arrogant reply) EzioAuditoreDaFirenze
•  » » » 6 weeks ago, # ^ |   +5 Hi. First of all, it's not an arrogant reply. I was sharing my thoughts on the post and I think the author got that right. By smart practice, I mean, solve only those problems during a period in a limited time. That's how you become used to a particular type of problem. Let's stop this discussion here only.
•  » » » » 6 weeks ago, # ^ | ← Rev. 2 →   +32 Ah another miscommunication. I was talking about my reply not your sounding arrogant. Anyways, thanks for replying. Thats helps.
 » 6 weeks ago, # |   -28 But isn't it assumed that a person(let's say 1600+ rated ex: you) knows how to do them easily. How can someone progress in rating without knowing how to solve such problems?
•  » » 6 weeks ago, # ^ | ← Rev. 2 →   +56 Being able to solve a problem and hating it are not mutually exclusive. I too dislike such problems and take slightly more time to solve them than my rating peers.
•  » » 6 weeks ago, # ^ |   +20 Assumed by who? I don't think there is any parallel between progressing in rating and knowing how to solve a specific class of problems. You progress if you can solve a general class of problems, on average. And well, I didn't say I cannot solve them. I just struggle with them sometimes, and that's why I don't like them yet.
 » 6 weeks ago, # | ← Rev. 2 →   0 I do feel exactly as you. Although, I don't think I hate these problems because the first feeling I get by reading these problems is of scariness. In the problem A of yesterday's contest, you can see from my submissions, I submitted a Wrong Answer, just because of missing out on a simple overflow condition and brute-forced through multiple test-cases to finally find the error after 30+ minutes. And this is all after reading the problem, not finding any formula for the first 20 minutes and then eventually moving on to attempt B and C. I really get scared by these problems.Any help would be absolutely delightful!
•  » » 6 weeks ago, # ^ |   0 Big fan!! :)
•  » » » 6 weeks ago, # ^ |   0 Same to you! :P
 » 6 weeks ago, # |   +10 Emm... some details are bored and yukky really, and they are all in the same key.
 » 6 weeks ago, # |   -30 Maybe you should try to solve some high school level math problems first. You probably lack the proper understanding of the basics.
 » 6 weeks ago, # |   +13 1539A was weird, even some GMs had problems with it (galen_colin spent around 20 minutes: https://www.youtube.com/watch?v=mCNkeyNnTDs)
•  » » 6 weeks ago, # ^ |   +68 I also occasionally struggle on problems like this. When I'm solving a div2A I'm looking for the one observation that makes it trivial. But in these math problems, there's not really a clever observation but just work you have to do, and you might make some mistakes in small details.
 » 6 weeks ago, # |   +165 Luckily, they are the first problems, so you can dodge the contest, downvote the announcement and go play Dota 2.
 » 6 weeks ago, # | ← Rev. 2 →   +3 .
 » 6 weeks ago, # |   +66 Even if you hate them you can reach 3000+
•  » » 6 weeks ago, # ^ | ← Rev. 2 →   0 ko_osaga is that possible like without solving div 2A,B can any one can reach 3000+ ? but how ?
•  » » » 6 weeks ago, # ^ | ← Rev. 2 →   +18 Once you reach div1, only div1 rounds are rated for you, and as we all know, div1A = div2C, so if you give div1 rounds, you don't have to solve 2A/B ever! So once one reaches 2100 somehow (div2 rounds are unrated), one can move on to 3000+ without needing to solve 2A/B! XD
•  » » » » 6 weeks ago, # ^ |   0 What range of problems i have to solve to solve div 2 c,d ? like 1300Rating problems ?
•  » » » » » 6 weeks ago, # ^ |   0 like 1700-1900 rating problems
•  » » » 6 weeks ago, # ^ | ← Rev. 2 →   +39 I mean, you don’t have to like them. I get disgusted when I see problems like what OP said. Probably most people will feel the same. Although I don’t know if the linked problems are in such kind..
•  » » » » 6 weeks ago, # ^ |   0 Yes, actually I couldn't recall many such problems when I posted but the linked ones do convey the idea more or less. I agree though that they're more on the lower end of the spectrum. This one though, is at a much higher level in my opinion: Codejam Round 1B: Broken Clock
•  » » » » » 6 weeks ago, # ^ |   +26 Yeah, I didn’t like that problem either. I think it’s hard to be in a position to enjoy such problems. If you focus on things you like, your skill will be generally better so you can be better at such problems too?
 » 6 weeks ago, # |   0 Math problems are fun , they almost all the time work on a single formula or logic ... What makes it difficult is the question prompt
 » 6 weeks ago, # |   +4 I don't knowMaybe we should stand up and fight (Try to understand) the problem instead of scare it.