Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- const int N = 101;
- int n;
- pair <int, int> a[N];
- signed main() {
- #ifdef HOME
- freopen("input.txt", "r", stdin);
- #else
- ios_base::sync_with_stdio(0); cin.tie(0);
- #endif
- cin >> n;
- for (int i = 0; i < n; ++i) cin >> a[i].first >> a[i].second;
- int p;
- cin >> p;
- for (int i = n - 1; i >= 0; --i) {
- if (a[i].first <= p) {
- cout << n - i << '\n';
- exit(0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement