From c00899f8646adb529b11d1c09402aa219ccb312c Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 2 Apr 2022 20:05:18 +0800 Subject: [PATCH] A - Four Points https://atcoder.jp/contests/abc246/submissions/30628742 --- AtCoder/ABC246/A/A.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 AtCoder/ABC246/A/A.cpp diff --git a/AtCoder/ABC246/A/A.cpp b/AtCoder/ABC246/A/A.cpp new file mode 100644 index 00000000..e62fc027 --- /dev/null +++ b/AtCoder/ABC246/A/A.cpp @@ -0,0 +1,30 @@ +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +int main() { + std::ios::sync_with_stdio(false); + + int x1, x2, x3, y1, y2, y3; + cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; + + if (x1 == x2) { + cout << x3 << ' '; + } else if (x1 == x3) { + cout << x2 << ' '; + } else { // x2 == x3 + cout << x1 << ' '; + } + + if (y1 == y2) { + cout << y3 << endl; + } else if (y1 == y3) { + cout << y2 << endl; + } else { // y2 == y3 + cout << y1 << endl; + } + + return 0; +}