### I_am_Drew's blog

By I_am_Drew, history, 22 months ago, translation,

C1-C2 (div2) The shittiest problem of the November 2020 on CF

• +356

 » 22 months ago, # |   +6 agree
•  » » 22 months ago, # ^ |   +6 Such problems may lead a good coder to think (for a few hours) whether he/she really is a good coder.Long implementation problems hurts a lot to brains.
 » 22 months ago, # |   +22 Felt like solving Codechef long challenge problems.
 » 22 months ago, # | ← Rev. 2 →   0 Agree. I think, almost everyone was solving it the whole contest and didn't have time to even think about solution of D and E
 » 22 months ago, # |   -151 please downvote him
•  » » 22 months ago, # ^ |   -67
 » 22 months ago, # |   +85 C1-C2 (div2) The shittiest problem of the November 2020 on CF
•  » » 22 months ago, # ^ |   +60 C1-C2 (div2) The shittiest problem on CF
•  » » » 22 months ago, # ^ |   +57 C1-C2 (div2) The shittiest problem to come out of polygon
•  » » » » 22 months ago, # ^ |   +43 C1-C2 (div2) The shittiest problem
•  » » » » » 22 months ago, # ^ |   +78 C1-C2 (div2)
•  » » » » » » 22 months ago, # ^ |   +70 C1-C2
•  » » » » » » » 22 months ago, # ^ |   +42 C1
•  » » » » » » » » 22 months ago, # ^ |   +40 C
•  » » » » » » » » » 22 months ago, # ^ |   +109
•  » » » » » » » » » 22 months ago, # ^ |   +52 C'est la vie
•  » » » » » » » » » 22 months ago, # ^ |   +13 -(C)
•  » » » » » » » » » 22 months ago, # ^ |   -9 C1 and C2
•  » » » » » » » 22 months ago, # ^ |   0 C(1-2)
•  » » » » » » » » 22 months ago, # ^ |   -13 C(-3)
•  » » » » » » » » » 22 months ago, # ^ |   -8 -3C
•  » » » » » » » » » 22 months ago, # ^ |   0 How?
•  » » » » » » » » » 22 months ago, # ^ |   -8 C(INT_MIN)
•  » » » » » 22 months ago, # ^ |   +20 no there was one long which had more shitter problem than this. It was about calenders and which day of the week the given day was.
•  » » » 22 months ago, # ^ |   +1 C1-C2 (problem) The shittiest div2 on CF
•  » » 22 months ago, # ^ |   -14 C1-C2(Div2) The shittest problem in the history of CF.
 » 22 months ago, # |   +26 Sometimes I feel amazed to see that so many Div1 participants solved C1/C2 in just 10 minutes
•  » » 22 months ago, # ^ |   +52 That's why they are in div1
 » 22 months ago, # |   +44 This problem is strong contender for most bullshit problem of the year. I have a strong feeling antontrygubO_o would have never allowed that.
 » 22 months ago, # |   +17 +1 to you, but I can't fully agree with it. Still think that problem Div1B is shitty enough to compete with Div1A.
•  » » 22 months ago, # ^ |   0 I could not vote for 1B because i wasted complete 2 hrs fixing the bug in 1A and in the end found it was one ! which shouldn't be there. I decided that i will upsolve 1B but that i have changed mood after seeing your comment.
 » 22 months ago, # |   -8 cannot agree more
 » 22 months ago, # |   -19 Was it the shittiest because you couldn't solve it?!
•  » » 22 months ago, # ^ |   +13 Of course not. I solved C1, C2 — not. So, not solving a problem — it's not the parametr of the shittiest problem...
•  » » » 22 months ago, # ^ |   -45 So what's the reason? (Cause I found them interesting)
•  » » » » 22 months ago, # ^ |   +14 How the hell can you find a 200+ lines implementation problem with nothing to learn from it, with 20+ if-else/s and dozens of corner cases interesting. Just because you are from the same country as the authors ? Even you couldn't solve C2. Just wasting 2 hours straight on a case-handling problem in no way interests anyone
•  » » » » » 22 months ago, # ^ |   -31 Hmmm... so how do you explain this? It's less than 35 lines.
•  » » » » » » 22 months ago, # ^ |   +4 Because it's a C1 solution?
•  » » » » » » » 22 months ago, # ^ |   0 Check this out. It's not even 100 lines :|
•  » » » » » » » » 22 months ago, # ^ |   +5 The point isn't if it CAN be implemented in fewer lines, it's if the approach people are generally going to go with is even feasible for the difficulty or not. The target for this question was to add a distinction in skill between say a pupil and a specialist /expert(or something similar), if an overwhelming majority of these people are only able to solve it using 200+ lines of code then the fact that it can be implemented in much less is irrelevant.
•  » » » » » » » » » 22 months ago, # ^ |   +7 No, the point is that your overly whining because you haven't had enough practice in another what I believe is a significant part of cp, being able to implement efficiently and nicely.Here's my code that was how I did it naturally my first time. Not saying it's great, or that the problem was that exciting, but it's not close to 200+ lines, and I knew it was bound for people to be overly rated without being well rounded in all skills cp.
•  » » » » » » » » » 22 months ago, # ^ |   0 Did you even read my comment? I never said anything about it being a good or bad problem (even tho i hated it), it was about how bringing up randomn submissions with fewer lines doesn't change the fact that for most people in the skill group, that was implementation hell, your code has a lot of copy paste in it too, and while I'm sure implement is an important skill, you fail to understand that for the people that the question was for(pupil to expert or similar), it was JUST TOO HARD to implement because of the things mentioned above. I'm sure I and a lot other people are shit at a lot of skills essential for cp but out of all those things that we fail to do in contests this is the one on which (relative)outrage is happening, why? I don't think it's as simple as GIT GUD.
•  » » » » » » » » » 22 months ago, # ^ |   +8 Did you even read my comment?Did you even read my comment? I said it was because people in your skill group aren't being exposed to enough implementation recently, which is supposed to be an easier skill in cp, not too hard, and that is why there is much more outrage. Also this is all I pretty much ever copy paste: Code/* This is code of SuperJ6 for Codeforces. Don't copy my code during f*kin' contests. 2.71828182845904523536 */ #include #include #include using namespace std; #define endl '\n' #define ll long long #define pi pair #define f first #define s second int main(){ ios::sync_with_stdio(0); cin.tie(0); return 0; } Besides the template which is shorter than yours, the cp people I talk to will all say I don't copy paste, I just practice implementing short...
•  » » » » » » » » » 22 months ago, # ^ |   0 amarnathsama What do you even mean? Isn't implementation a necessary skill in CP ?
•  » » » » » » » » » 22 months ago, # ^ |   0 Yes, it is, among others.
•  » » 22 months ago, # ^ |   +7 I don't think that is the reason because i also didn't solve D,E,F.
 » 22 months ago, # |   0 Agreed af!!!!
 » 22 months ago, # | ← Rev. 2 →   +10 my solution of C1 was nearly 800 lines -_- -_-
•  » » 22 months ago, # ^ |   0 WTF?? 126 lines...(https://codeforces.com/contest/1440/submission/98728859)
•  » » 22 months ago, # ^ |   +89 Not sure if you realize that, but that tells worse about you rather than about problem :P
 » 22 months ago, # |   0 I didnt even read D :( , thank you d2-c2
 » 22 months ago, # |   +5 Then there exist people like me who realized C1 was worth less points than B after solving itI guess problem setters prioritize brute force less.
 » 22 months ago, # |   0 and i am still debugging my solution to C2. WA on testcase 2, test 48 (:
•  » » 22 months ago, # ^ |   0 Let me know as well, if you get that testcase 48. I dont know how to check that.
•  » » » 22 months ago, # ^ |   0 1 2 3 111 110
•  » » » 22 months ago, # ^ | ← Rev. 2 →   +3 I guess your solution fails test with just 3*3 square where all symbols are equal to 1
•  » » » » 22 months ago, # ^ |   0 I have the same wa on pretest two and the case is I think a 3*2 or 2*3 grid because my code prints the answer as 7 where the limit is [0,6] for the total moves
•  » » » » 22 months ago, # ^ | ← Rev. 2 →   0 No, its this test case. This returns 7 moves for my code. I solve the left 2x2 grid and then right 2x2 grid 1 2 3 111 110 11 -> 01 -> 10 -> 11 -> 00 11 00 01 10 00 first 2x2 in 4 moves then we have 001 000 So then I solve 01 in 3 moves, total of 7 moves. 00 Am I missing something or is my implementation wrong? All other 2x3 test cases return moves <= 2*3 
•  » » » » » 22 months ago, # ^ | ← Rev. 3 →   0 If you Will fix 2*2 aquare, where number of 1 is less (or equal) then in another, firstly, and another 2*2 square after this, it Will be not more than 6 moves always.It is a trick that helps avoid this case, in generally yours implementation correct
•  » » 22 months ago, # ^ | ← Rev. 2 →   0 mine 48 too..and i know my solution are exceeding n*m in most of odd n * odd m containing all '1' cases
 » 22 months ago, # |   +301 Not agree. I have another sentence that will be downvoted, but is true: "think two times, so you won't have to code three times".
•  » » 22 months ago, # ^ |   +3 preach
•  » » 22 months ago, # ^ |   +81 imagine being lgm and thinking you're gonna get downvoted
•  » » » 22 months ago, # ^ |   +16 Its a relative terminology they often use. Had he commented "Hi" he would get 500 upvotes at least.
•  » » 22 months ago, # ^ | ← Rev. 2 →   +87 Maybe I would agree with you if you had some clever solution that wasn't painful to code.But no, I opened it and it is 174 lines (after I deleted the template!), full of copy-paste and +1 -1 in lines like zrob({i, j}, {i+1, j}, {i+1, j+1});. Anyone trying to code like this that isn't 90% as good at implementation as you would have made at least 20 mistakes.
 » 22 months ago, # |   0 A neater implementation to problem Ca CODE#include #define vi vector #define pb push_back #define ar array using namespace std ; void solve(){ int n,m ;cin >> n >> m ; via(n) ; for(string &x:a) cin >> x ; vi>>ans ; function fix=[&](int i,int j){ vi>o,z ; for(int r=0;r<2;r++) for(int c=0;c<2;c++){ if(a[i+r][j+c]=='1') o.pb({i+r,j+c}) ; else z.pb({i+r,j+c}) ; } if(o.size()==0) return ; a[o[0][0]][o[0][1]]='0' ; if(o.size()==1 || o.size()==2){ a[z[0][0]][z[0][1]]='1' ; a[z[1][0]][z[1][1]]='1' ; ans.pb({o[0],z[0],z[1]}) ; } if(o.size()==3 || o.size()==4){ a[o[1][0]][o[1][1]]='0' ; a[o[2][0]][o[2][1]]='0' ; ans.pb({o[0],o[1],o[2]}) ; } fix(i,j) ; return ; } ; for(int i=0;i> t ; while(t--) solve() ; } 
 » 22 months ago, # |   +17 What's wrong with that one? Seems that it is yet another ad-hoc regular CF problems that we have in all rounds. I wonder then, why authors though that A2 is 500 only. If that were 500-1000, I would say pretty good one, or just kill A1 and do A2 as B 1250 (implementation with lots of potential bugs) and create a good 500 A.On the other hand, B was complete shit though.
 » 22 months ago, # |   +5 Link for posteriority https://codeforces.com/contest/1440/problem/C1
 » 22 months ago, # |   +1 looks like many people felt that way but isn't quick implementation an essential skill to have? or am i missing something here?
 » 22 months ago, # |   +4 But I see its upvoted.So it is false?
 » 22 months ago, # | ← Rev. 3 →   -13 don't know about C2 , but C1 wasn' that bad/long to implement here's heres the codeint n,m; bool legal(int x,int y){ if(x<0 || x>=n || y<0 || y>=m) return false; return true; } void solve() { cin>>n>>m; char a[n][m]; int cnt1=0; loop(i,0,n-1){ loop(j,0,m-1){ cin>>a[i][j]; if(a[i][j]=='1') ++cnt1; } } cout<<3*cnt1<<"\n"; loop(i,0,n-1){ loop(j,0,m-1){ if(a[i][j]=='1') { if(legal(i,j-1) && legal(i-1,j) && legal(i-1,j-1)){ cout<
 » 22 months ago, # |   +4 Be confident guy, delete "the November 2020 on" and it'll be "C1-C2 (div2) The shittiest problem of CF". That makes sense, doesn't it?
 » 22 months ago, # |   +33 A problem such as this is, as any other, a learning opportunity. In this case, an opportunity to learn how to think of the least painful implementation, before starting to code. And, importantly, when to stop thinking and go back to coding.There are different genres of contest problems. For example, if we group by the general question, there are "how to do it at all?", "how to do it efficiently?", and then there is "sure it can be done, but how to code it, reliably, so that it will work in the end?". Personally, I find the latter genre somewhat appealing as well as others, and generally applicable outside of algorithmic problem solving.The butthurt it causes, like this original post, can be seen as an added perk by some authors. Still, a contestant willing and able to learn could turn the pain into a learning experience.
•  » » 22 months ago, # ^ |   +10 Yes, I think the main trouble is about these problems weren't used for ACM-style contest, where they would be very appropriate. Instead of this, the problems were used for CF round and the main portion of negative feedback should be mostly addressed to the CF coordinators, who must have a good understanding of how the tasks are suitable for the CF round. If I saw problems Div1A, Div1B, Div1C in ACM-style contest, I would not say anything wrong about them.
 » 22 months ago, # |   -34 Downvote me!!! ORZ!!!
•  » » 22 months ago, # ^ | ← Rev. 2 →   -16 [Deleted]
»
22 months ago, # |
Rev. 2   0

If guys dont mind, I have some implementations with comments here

Problem C1 - Eliminate each 1x1 cells
Benchmark
Problem C2 - Eliminate odd row, odd column then eliminate 2x2 cells
Benchmark
Problem C2 - Eliminate rows then columns then last 2x2 cells
Benchmark
 » 22 months ago, # |   +16 I mean, I agree it is quite coding-heavy, but I would not agree that problem was super shitty or whatever. Idea behind the problem is not that bad. I would think that if it was on some ICPC contest nobody would bat an eye, but this positioning here was something that caused so much outrage since it is not pleasant for problem you start with (in Div1) and problem that should be fairly simple to Div2 people as well (cause they will drown in badly written code more than Div1 people).
•  » » 18 months ago, # ^ | ← Rev. 2 →   -43 I agree!!
•  » » » 18 months ago, # ^ |   +44 Please, don't write such comments on 4 month old threads, unless you actually have something new and valuable to add. If your comment is "this problem is shit" (in this case, provide arguments) or "I agree" (in this case, just upvote) then there is no need to write it at all. It's just polluting Recent Actions.
 » 18 months ago, # |   -30 You're actually getting up-votes bro...(I think you're right.)