Submission #462390

#TimeUsernameProblemLanguageResultExecution timeMemory
462390bigoExam (eJOI20_exam)C++14
0 / 100
7 ms332 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long typedef pair<int, int> pii; int main() { 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]; } vector<pii>vec; for (int i = 0; i < n; i++) { if (a[i] < b[i]) { for (int j = i + 1; j < n; j++) { if (a[j] == b[i]) { vec.push_back({ i,j }); break; } } } else if (a[i] == b[i]) vec.push_back({ i,i }); } cout << vec.size(); }
#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...