 What's up guys? My name is Michael and welcome to my YouTube channel today. You know, I didn't have enough time to actually record a full video today. So that's why, and I feel like I need to record a video every single day because otherwise I'm not going to actually do anything. And I feel like I'm not actually in terms, in terms of, you know, going ham and on this channel. So I decided to just make a video on what I thought what I learned on code forces 694 contest. So what did I actually learn? So I actually learned that you should skip problems. Like absolutely should skip problems. Normally, when I do these problems, I would do problem A. And then what I would do is that if I get stuck, I just stay in problem A and then just just give up, you know. So always skip, skip problems, if you don't know, because I was actually able to do problem B or close to do problem B. Yeah, I got a little hassled off with the one of the one of the problem B for strange lists with an ordered map. So that is the thing that caused me to not actually get the answer to this solution. So I'll get into that later. But anyway, problem A, I thought problem A was actually harder than problem B. So some of these problems, don't just think that oh, problem A is always going to be easier than problem B. Sometimes you could get problem B or C and not actually get problem A. Because problem A is just like an observation trick, only math trick that you just didn't know at the start of the problem. So sometimes it's actually best if you skip skip problems that you don't know, because maybe you do solve a B, maybe let's say you skip a and then you actually end up solving B or C, then your rankings way higher, like in terms of trying to increase your ranking, it's way higher than that. So yeah, okay, the second thing I learned is actually an important lesson on for problem B. Okay. So originally, I had this code, which was this part, pre test to write in this code, I use an unordered map. And for some reason, the what I had on the unordered map, the answer for the problem, what I had on the judge was way different than what I had in my computer. So on my computer, I actually got the right answer. But in the judge, it gave me 24, 22, but on my computer, it actually gave me 36 and 44. And the reason why this occurred was because here's some tips, unordered map, this unordered map is not based on what you insert into it. It's actually based on a hash function. And that's different for every single compiler. So if you don't rely on the ordering of an unordered map as a way to insert values into it, that's not actually a good way to do it. Because if you just rely on things, rely on some libraries that you actually don't know. So look into all the libraries before you start doing them, before you start completely doing them because I didn't know what unordered map was doing. I didn't know what, what I just thought it's just an unsorted of a regular map. But it's not. It's actually based on a hash function. An unordered map is not the same thing as, it's not based on the order that you insert into. Okay. So that's what, that's what I got for this thing. And so yeah, this code would have worked if I just used like a vector. So I could have actually solved this problem for problem B way better than, yeah, I could have solved this during the contest. So that would have been the thing. So yeah, also, sometimes when you do problems, you could actually just brute force. So look at the constraints because sometimes you could brute force. Because the constraints aren't that large. So let's say this was actually like a thousand, you can actually just brute force it. Like it wouldn't matter. It wouldn't affect anything. Sometimes just typing faster and brute forcing might actually get you the answer. So yeah, you, you don't have to find the most efficient solution. You just have to be able to solve the problem and get on to the next standing. Okay. All right. Another thing I learned is that if you go on a problem C, actually, wait, no, no, not problem C, my bad. Actually that is, that's actually the gist of it. Um, so another thing I learned was that you could actually just, uh, you should look, read, look at other people's code. So, um, if you go on a B or C, like if you go to the standings, you could actually click on other people's code and you would actually see, uh, what they done. So read up what the other codes, what other people done for their, uh, for like top coders like these, uh, this rainbow two, three, three read up on their code because, um, sometimes you can actually learn something. So you could actually learn something like here. They're using macros so to type faster. So maybe, maybe you, maybe you should use a macros. I don't know. It really up to you. It depends on your coding style. So yeah, that's pretty much all the gist. I have to say, um, maybe I should make more videos on what I learned from the contest to, uh, to, if in order to reinforce my memory, but, um, yeah, I don't know. I couldn't actually record a video today. That's also the why this camera is pretty bad. Uh, the microphone is pretty bad, but yeah, that, that's all I have to say about today's contest. Ray com subscribe. Let me know if I should make more of these types of videos on what I learned during the contest, but yeah, Ray com subscribe. I'll check you guys later. Peace.