Submission #895808

#TimeUsernameProblemLanguageResultExecution timeMemory
895808tvladm2009Exam (eJOI20_exam)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> a(n), b(n); for (int i = 0; i < n; ++i) { cin >> a[i] >> b[i]; } int want = b[0]; for (int i = 1; i <= n; ++i) { if (a[i] == want) { int ans = 0; for (int j = 1; j <= n; ++j) { if (a[j] <= want) { ++ans; } } cout << ans << endl; return 0; } } cout << "0\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...