본문 바로가기

Programming/BaekJoon

[C++] 백준 3034번 : 앵그리 창영


https://www.acmicpc.net/problem/3034




#include <iostream>

#include <math.h>

using namespace std;

int main() {

int n, w, h;

cin >> n >> w >> h;

int *ary = new int[n];

for (int i = 0; i < n; i++)

cin >> ary[i];


int max = sqrt(w*w + h * h);

for (int i = 0; i < n; i++) {

if (max >= ary[i])

cout << "DA" << "\n";

else

cout << "NE" << "\n";

}

}