답안 #339600

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
339600 2020-12-25T17:03:43 Z ammar2000 Kocka (COCI18_kocka) C++17
70 / 70
118 ms 4352 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 2 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 3840 KB Output is correct
2 Correct 116 ms 4204 KB Output is correct
3 Correct 116 ms 4332 KB Output is correct
4 Correct 82 ms 3052 KB Output is correct
5 Correct 118 ms 4204 KB Output is correct
6 Correct 116 ms 4204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 111 ms 3948 KB Output is correct
2 Correct 84 ms 3052 KB Output is correct
3 Correct 115 ms 4204 KB Output is correct
4 Correct 81 ms 3180 KB Output is correct
5 Correct 116 ms 4204 KB Output is correct
6 Correct 112 ms 4076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 107 ms 3820 KB Output is correct
2 Correct 84 ms 3052 KB Output is correct
3 Correct 117 ms 4204 KB Output is correct
4 Correct 118 ms 4352 KB Output is correct
5 Correct 115 ms 4204 KB Output is correct
6 Correct 86 ms 3052 KB Output is correct