Can anyone help me with this problem? I tried to think about it for 2 straight days but cannot up with a solution. Also the editorial doesn't make sense.
# | User | Rating |
---|---|---|
1 | tourist | 3771 |
2 | jiangly | 3688 |
3 | Um_nik | 3539 |
4 | slime | 3498 |
5 | djq_cpp | 3486 |
6 | MiracleFaFa | 3466 |
7 | ksun48 | 3452 |
8 | Radewoosh | 3406 |
9 | greenheadstrange | 3393 |
10 | xtqqwq | 3382 |
# | User | Contrib. |
---|---|---|
1 | -is-this-fft- | 183 |
2 | awoo | 181 |
3 | YouKn0wWho | 177 |
4 | Um_nik | 175 |
5 | dario2994 | 172 |
6 | Monogon | 171 |
7 | adamant | 168 |
8 | maroonrk | 167 |
9 | antontrygubO_o | 166 |
10 | errorgorn | 164 |
Name |
---|
I solved this and wrote code with comments explaining it. Link to my AC code here I saw the editorial after solving and I agree it's a bit sparse on the details. Feel free to ask if any doubt.
Sir i still don't get ur solution I had this problem in my mind for 2 days but nothing comes to my mind. BTW sir do u think I can still be red If i am not able to solve this problem for now by next year.
Okay, this is definitely a troll. You don't really care about the solution. Hope this was not a complete waste of time and can help someone else in the future though.
No i actually do care about the solution. I am sorry if it came off as trolling, I am not able to understand how do we brute force for every element in b. I kind of feel guilty that if this comes off as trolling people will refrain from actually helping.
detailed editorial