Submission #145134

#TimeUsernameProblemLanguageResultExecution timeMemory
145134Sarah_MokhtarZamjena (COCI18_zamjena)C++14
14 / 70
15 ms6696 KiB
#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 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...