답안 #228963

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
228963 2020-05-03T07:36:55 Z VEGAnn Sunčanje (COCI18_suncanje) C++14
13 / 130
242 ms 896 KB
#include <bits/stdc++.h>
#define PB push_back
using namespace std;
typedef long long ll;
const int N = 10100;
const int PW = 22;
bool mrk[N];
int X1[N], Y1[N], x2[N], y2[N], n;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

    cin >> n;

    for (int i = 0; i < n; i++){
        int X, Y; cin >> X1[i] >> Y1[i] >> X >> Y;
        x2[i] = X1[i] + X;
        y2[i] = Y1[i] + Y;
    }

    for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++){
        int mn = max(X1[i], X1[j]);
        int mx = min(x2[i], x2[j]);
        if (mn >= mx) continue;

        mn = max(Y1[i], Y1[j]);
        mx = min(y2[i], y2[j]);
        if (mn >= mx) continue;

        mrk[i] = 1;
    }

    for (int i = 0; i < n; i++)
        cout << (mrk[i] ? "NE\n" : "DA\n");

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 36 ms 504 KB Output is correct
2 Correct 57 ms 760 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 242 ms 760 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 11 ms 768 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 12 ms 896 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 12 ms 768 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 12 ms 896 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 14 ms 896 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 12 ms 896 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 11 ms 768 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 12 ms 896 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -