# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
967253 | mdobric | Svjetlost (COI18_svjetlost) | C++11 | 1 ms | 348 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, q;
long long a[maxn], b[maxn];
long long max_d = 0, max_poc, max_kraj, max_smjer = 0;
long long calc (int x, int y){
y = (y + n) % n;
return abs(a[x] - a[y]) * abs(a[x] - a[y]) + abs(b[x] - b[y]) * abs(b[x] - b[y]);
}
long long ccw (long long a1, long long b1, long long a2, long long b2, long long a3, long long b3){
return a1 * (b2 - b3) + a2 * (b3 - b1) + a3 * (b1 - b2);
}
int main (void){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> n;
for (int i = 0; i < n; i++){
cin >> a[i] >> b[i];
}
cin >> q;
int kraj = 1;
long long d = calc(0, 1) + calc(1, 2), tx;
max_poc = 0, max_kraj = 1, max_d = d;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |