Posts and pages without the custom sidebar

I have custom sidebar plugin installed. Custom sidebar shows up on every page and post. I needed custom sidebar displayed only for 2 or 3 posts. The rest of all the newly created pages and posts, i had to go in and manually add the below step to custom css to remove the sidebar. Is there a way i can set it up so it doesn’t have the custom sidebar. Not sure if the performance will be slow if i keep adding the below for every new page and post

Below is the code i am adding.

.postid-918 #sidebar {display: none;}

.postid-918 .single-column {width: 100%;}