// vision.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include #include #include using namespace std; int main() { int N; cin >> N; vector> C(N); for (int i = 0; i < N; i++) { int x, y; cin >> x >> y; C[i] = pair(x, y); } map, int> Cou; vector>> D(N); for (int i = 0; i < N; i++) { D[i] = vector>(N); for (int j = 0; j < N; j++) { D[i][j] = pair(C[j].first - C[i].first, C[j].second - C[i].second); if (i == 0) Cou[D[i][j]] = 1; else { pair rev = pair(-D[i][j].first, -D[i][j].second); if (Cou.find(D[i][j]) != Cou.end() && Cou[D[i][j]] == i) { Cou[D[i][j]]++; } else if (Cou.find(rev) != Cou.end() && Cou[rev] == i) { Cou[rev]++; } } } } int count = 0; for (pair, int> p : Cou) { if (p.second == N && (p.first.first != 0 || p.first.second != 0)) count++; } cout << 2*count << "\n"; return 0; } // Run program: Ctrl + F5 or Debug > Start Without Debugging menu // Debug program: F5 or Debug > Start Debugging menu // Tips for Getting Started: // 1. Use the Solution Explorer window to add/manage files // 2. Use the Team Explorer window to connect to source control // 3. Use the Output window to see build output and other messages // 4. Use the Error List window to view errors // 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project // 6. In the future, to open this project again, go to File > Open > Project and select the .sln file