# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
464781 | jurgis | Exam (eJOI20_exam) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <bits/stdc++.h>
#define f first
#define s second
#define pii pair<int, int>
#define ll long long
using namespace std;
int main()
{
int n; cin>>n; 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 galim = true;
for(int i=0; i<n; i++){if(A[i] != B[0]){galim = false}}
if(galim){
cout<<n;
}
else{cout<<0;}
}