# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1162531 | jerzyk | Dragon 2 (JOI17_dragon2) | C++20 | 3474 ms | 9832 KiB |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define st first
#define nd second
typedef long long ll;
typedef long double ld;
const ll I = 1000'000'000'000'000'000LL;
const int II = 2'000'000'000;
const ll M = 1000'000'007LL;
const int N = 30'007;
vector<int> sp[N];
pair<ll, ll> tab[N], ta[N], tb[N], A, B;
ll d[N];
map<pair<int, int>, int> answer;
bool C(int i, int j)
{
if(!((d[i] < 0) ^ (d[j] < 0)))
if(abs(d[i]) < abs(d[j]))
return 0;
ll x = tab[j].st - tab[i].st, y = tab[j].nd - tab[i].nd;
ll a = x * ta[i].nd - y * (ta[i].st);
ll b = x * tb[i].nd - y * (tb[i].st);
return ((a > 0) ^ (b > 0));
}
inline int Cnt(int a, int b)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |