Submission #390367

#TimeUsernameProblemLanguageResultExecution timeMemory
390367MilosMilutinovicExam (eJOI20_exam)C++14
0 / 100
2 ms332 KiB
/** * author: milos * created: 16.04.2021 02:05:22 **/ #include <bits/stdc++.h> using namespace std; 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]; } for (int i = 0; i < n; i++) { cin >> b[i]; } bool same = true; for (int i = 0; i < n; i++) { if (b[i] != b[0]) { same = false; } } if (same) { int cnt = 0; bool have = false; for (int i = 0; i < n; i++) { if (a[i] == b[0]) { have = true; } if (a[i] <= b[0]) { cnt++; } } if (have == false) { cnt = 0; } cout << cnt << '\n'; return 0; } 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...