JXNVCE ALGO-LOG YouJin Jung

BOJ-3009

기본 수학 연산 카테고리에 제일 정답률이 높았던 문제!@@!@!

#include <iostream>

using namespace std;
 
int main() {
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL); cout.tie(NULL);
	  int x[4], y[4];
    for (int i = 0; i < 3; i++) cin >> x[i] >> y[i];
 
    x[3] = x[0];
    y[3] = y[0];

    if (x[3] == x[1]) x[3] = x[2];
    else if (x[3] == x[2]) x[3] = 1;

    if (y[3] == y[1]) y[3] = y[2];
    else if (y[3] == y[2]) y[3] = y[1];

    cout << x[3] << " " << y[3] << endl;
    return 0;
}

image