Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdio>
- #include<cstdlib>
- #include<ctime>
- #include<vector>
- #include<string>
- #include<algorithm>
- #include<utility>
- #include<map>
- #include<set>
- #include<queue>
- #include<sstream>
- #include<fstream>
- #include<cmath>
- #include<list>
- #include<deque>
- #include<stack>
- #include<bitset>
- #include<numeric>
- #include<iomanip>
- #include<memory.h>
- #include<cassert>
- using namespace std;
- typedef long long LL;
- const double EPS = 1e-8;
- struct diag
- {
- pair<int, int> a, b;
- pair<double, double> cent;
- LL len;
- diag(pair<int, int> aa, pair<int, int> bb)
- {
- a = aa;
- b = bb;
- cent = make_pair((a.first + b.first) / 2., (a.second + b.second) / 2.);
- len = (a.first - b.first) * (a.first - b.first) + (a.second - b.second) * (a.second - b.second);
- }
- };
- vector<diag> diags;
- vector<pair<int, int> > pnts;
- int main()
- {
- int n;
- cin >> n;
- for(int i = 0; i < n; i++)
- {
- int a, b;
- cin >> a >> b;
- }
- for(int i = 0; i < n; i++)
- for(int j = i + 1; j < n; j++)
- diags.push_back(diag(pnts[i], pnts[j]));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement