#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); long long N,M,Q; cin >> N >> M >> Q; vector A(N),B(N); for(int i=0; i> A.at(i) >> B.at(i); int n2 = 1< buy(n2); vector S(n2),S2(n2); for(int i=0; i Q) continue; answer = max(answer,S2.at(i)); } cout << answer << endl; }