# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
171163 |
2019-12-27T15:40:26 Z |
itiam |
Kocka (COCI18_kocka) |
C++11 |
|
209 ms |
4440 KB |
#include <iostream>
using namespace std;
int L[100004],R[100004],U[100004],D[100004];
int main(){
int N,x;
string rj="DA";
cin >> N;
for (int i=0;i<N;i++){
cin >> x;
L[i]=x;
}
for (int i=0;i<N;i++){
cin >> x;
R[i]=x;
}
for (int i=0;i<N;i++){
cin >> x;
U[i]=x;
}
for (int i=0;i<N;i++){
cin >> x;
D[i]=x;
}
for (int i=0;i<N;i++){
if ((L[i]==-1 && R[i]!=-1) || (R[i]==-1 && L[i]!=-1) || L[i]+R[i]>=N){
rj="NE";
break;
}
if ((U[i]==-1 && D[i]!=-1) || (D[i]==-1 && U[i]!=-1) || U[i]+D[i]>=N){
rj="NE";
break;
}
}
cout << rj;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
376 KB |
Output is correct |
2 |
Correct |
4 ms |
376 KB |
Output is correct |
3 |
Correct |
4 ms |
504 KB |
Output is correct |
4 |
Correct |
18 ms |
376 KB |
Output is correct |
5 |
Correct |
2 ms |
376 KB |
Output is correct |
6 |
Correct |
4 ms |
376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
408 KB |
Output is correct |
2 |
Correct |
3 ms |
376 KB |
Output is correct |
3 |
Correct |
5 ms |
372 KB |
Output is correct |
4 |
Correct |
5 ms |
376 KB |
Output is correct |
5 |
Correct |
3 ms |
376 KB |
Output is correct |
6 |
Correct |
4 ms |
376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
178 ms |
3804 KB |
Output is correct |
2 |
Correct |
205 ms |
4252 KB |
Output is correct |
3 |
Correct |
209 ms |
4216 KB |
Output is correct |
4 |
Correct |
126 ms |
3132 KB |
Output is correct |
5 |
Correct |
201 ms |
4316 KB |
Output is correct |
6 |
Correct |
209 ms |
4440 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
197 ms |
3952 KB |
Output is correct |
2 |
Correct |
128 ms |
3036 KB |
Output is correct |
3 |
Correct |
202 ms |
4280 KB |
Output is correct |
4 |
Correct |
136 ms |
3128 KB |
Output is correct |
5 |
Correct |
198 ms |
4216 KB |
Output is correct |
6 |
Correct |
185 ms |
3960 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
175 ms |
3816 KB |
Output is correct |
2 |
Correct |
129 ms |
3116 KB |
Output is correct |
3 |
Correct |
200 ms |
4168 KB |
Output is correct |
4 |
Correct |
201 ms |
4392 KB |
Output is correct |
5 |
Correct |
203 ms |
4216 KB |
Output is correct |
6 |
Correct |
134 ms |
3036 KB |
Output is correct |