Submission #964969

#TimeUsernameProblemLanguageResultExecution timeMemory
964969zxciganExam (eJOI20_exam)C++17
0 / 100
2 ms452 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const int N = 1e6 + 1; const int mod = 1e9 + 7; template <typename T> bool umx(T& a, T b) { return (a < b ? a = b, 1 : 0); } template <typename T> bool umn(T& a, T b) { return (a > b ? a = b, 1 : 0); } void solve () { int n; cin >> n; vector<int> a(n); vector<int> b(n); for (int i = 0; i < n; ++i) cin >> a[i]; for (int i = 0; i < n; ++i) cin >> b[i]; for (int i = 0; i < n; ++i) { if (a[i] == b[i]) { cout << n << endl; return; } } cout << 0 << endl; } signed main() { #ifdef LOCAL freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #else // freopen ("input.txt", "r", stdin); // freopen ("output.txt", "w", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(nullptr); int T = 1; while (T--) solve(); 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...