Algospot : DRAWRECT

Programming/Judge 2014.12.11 21:17


https://algospot.com/judge/problem/read/DRAWRECT


<결과>



<코드>

#include<iostream>

using namespace std;

int GetDifferent(int a, int b, int c)
{
	return (a == b) ? c : (b == c) ? a : b;
}

int main() {

	int num_cases = 0;
	cin >> num_cases;

	for (int i = 0; i < num_cases; ++i)
	{
		int x[3] = { 0, };
		int y[3] = { 0, };

		for (int j = 0; j < 3; ++j)
		{
			cin >> x[j] >> y[j];
		}

		cout << GetDifferent(x[0], x[1], x[2]) << " " << GetDifferent(y[0], y[1], y[2]) << endl;
	}
}


'Programming > Judge' 카테고리의 다른 글

Algospot : ENCRYPT  (0) 2014.12.15
ACMICPC 1003 : 피보나치 함수  (0) 2014.12.15
ACMICPC 1008 : A/B  (0) 2014.12.15
ACMICPC 1205 : 등수 구하기  (0) 2014.12.13
ACMICPC 1002 : 터렛  (0) 2014.12.12
ACMICPC 1000 : A+B  (0) 2014.12.12
Algospot : LECTURE  (0) 2014.12.12
Algospot : DRAWRECT  (0) 2014.12.11
Algospot : ENDIANS  (0) 2014.12.11
Algospot : MERCY  (0) 2014.12.11
Algospot : Hello World!  (0) 2014.12.11
posted by deviAk