Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bits/stdc++.h>
- //#pragma GCC optimize("O3")
- //#pragma GCC optimize("unroll-loops")
- #define mp make_pair
- #define pb push_back
- #define eb emplace_back
- #define x first
- #define y second
- #define sz(x) (int)x.size()
- #define all(x) begin(x), end(x)
- #define rall(x) rbegin(x), rend(x)
- #define FOR(i,a,b) for (int i = (a); i < (b); i++)
- #define RFOR(i,b,a) for (int i = (b) - 1; i >= (a); i--)
- using namespace std;
- typedef unsigned long long ull;
- typedef long long ll;
- typedef long double ld;
- typedef pair<int, int> pi;
- typedef pair<ll, ll> pl;
- typedef vector<int> veci;
- typedef vector<bool> vecb;
- typedef vector<vector<int>> vvi;
- typedef vector<vector<bool>> vvb;
- const int INF_I = 1e9;
- const ll INF_LL = 1e18;
- const int MOD = 1000000007;
- const double eps = 1e-6;
- int main() {
- ios::sync_with_stdio(false);
- cin.tie(nullptr);
- cout.tie(nullptr);
- vector<pl> a(3);
- for (int i = 0; i < 3; i++)
- cin >> a[i].x >> a[i].y;
- for (int i = 0; i < 3; i++){
- pl v1 = {a[(i+1) % 3].x - a[i].x, a[(i+1) % 3].y - a[i].y};
- pl v2 = {a[(i+2) % 3].x - a[i].x, a[(i+2) % 3].y - a[i].y};
- ll v1Xv2 = v1.x * v2.x + v1.y * v2.y;
- if (v1Xv2 == 0){
- cout << a[(i+1) % 3].x + v2.x << " " << a[(i+1) % 3].y + v2.y << "\n";
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment