v3.22.2.2
Share-based compensation - Summary of Stock Option Activity and Related Information (Parenthetical) (Detail) - CAD ($)
$ / shares in Units, $ in Millions
12 Months Ended
Oct. 31, 2022
Oct. 31, 2021
Disclosure of terms and conditions of share-based payment arrangement [abstract]    
Cash received for options exercised $ 51 $ 75
Weighted average share price at the date of exercise $ 134.1 $ 115.11