mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 18:16:26 +00:00
A - Four Points
https://atcoder.jp/contests/abc246/submissions/30628742
This commit is contained in:
parent
ce652771f3
commit
c00899f864
30
AtCoder/ABC246/A/A.cpp
Normal file
30
AtCoder/ABC246/A/A.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user