Submission #339600

#TimeUsernameProblemLanguageResultExecution timeMemory
339600ammar2000Kocka (COCI18_kocka)C++17
70 / 70
118 ms4352 KiB
#include <bits/stdc++.h> using namespace std; int n; int l[100010],r[100010],u[100010],d[100010]; int main() { cin>>n; for (int i=0;i<n;i++) cin>>l[i]; for (int i=0;i<n;i++) cin>>r[i]; for (int i=0;i<n;i++) cin>>u[i]; for (int i=0;i<n;i++) cin>>d[i]; for (int i=0;i<n;i++) { if (l[i]==-1||r[i]==-1) {if (l[i]!=r[i]) { cout <<"NE"; return 0; }} else if (l[i]+r[i]>=n) { cout <<"NE"; return 0; } } for (int i=0;i<n;i++) { if (u[i]==-1||d[i]==-1) {if (u[i]!=d[i]) { cout <<"NE"; return 0; }} else if (u[i]+d[i]>=n) { cout <<"NE"; return 0; } } cout <<"DA"; 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...