본문 바로가기

Programming/BaekJoon

[C++] 백준 5063번 : TGN


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




#include <iostream>

using namespace std;

void Ad(int n);

int main() {

int n;

cin >> n;


int *T_c = new int[n];

int r, e, c;

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

cin >> r >> e >> c;

T_c[i] = r - (e - c);

}


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

Ad(T_c[i]);


}


void Ad(int n) {

if (n > 0)

cout << "do not advertise" << "\n";

else if(n==0)

cout << "does not matter" << "\n";

else

cout << "advertise" << "\n";

}