Yes if you attend all lectures, and work hard you can probably get a good grade here.
But there will be enough people attending all lectures and working hard, so you need to have some innate talent that differentiates you from alot of people to reach top 5%.
I know people who attended all lectures worked hard and got top 20%
Theres no guarantee you'll make it to the top 1% needed for CSE, even if you work hard and attend all classes. Statistically it will at max guarantee a top 25% CGPA and on average top 8-10%. Above top 4% mark everyone attends all classes and works hard, and top 2% mark everyone is very intelligent along with these traits and top 1% are truly gifted/hardworking/lucky combination.