반응형
https://www.acmicpc.net/problem/3009
-문제-
-정답-
#include <iostream>
using namespace std;
int x[1001] = {0, };
int y[1001] = {0, };
int main() {
int a, b;
for(int i = 0; i < 3; i++) {
cin >> a >> b;
x[a]++;
y[b]++;
}
for(int i = 0; i < 1001; i++) {
if(x[i] == 1) {
cout << i << " ";
}
}
for(int i = 0; i < 1001; i++) {
if(y[i] == 1) {
cout << i;
}
}
return 0;
}
반응형