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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1e5+20,M=(N<<4),OO=1e9;
#define f first
#define s second
#define pb push_back
#define sz size
#define l length
ll n;
string str,A[N],B[N];
bool isNumber(string c){
char cmp=c[0];
return cmp>='0'&&cmp<='9';
}
bool valid(){
for(int i=0;i<n;++i)
if(isNumber(A[i])&&isNumber(B[i]))
if(A[i]!=B[i]) return 0;
return 1;
}
int main(){
cin>>n;
for(int i=0;i<n;++i) cin>>A[i];
for(int i=0;i<n;++i) cin>>B[i];
puts(valid()?"DA":"NE");
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |