Adsense CPC scenario

Let's imagine you have a general website with articles covering a wide variety of topics and niches. A visitor enters the website using a low cpc keyword "free stuff in Ontario" but ends up navigating to a page with high cpc keywords such as "car accident lawyers" . The visitor then clicks the ad on the page with high CPC, will you get paid for the low cpc entry keyword or high cpc keyword?