# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
795862 | GusterGoose27 | Hexagonal Territory (APIO21_hexagon) | C++17 | 29 ms | 3416 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 "hexagon.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9+7;
class rad {
public:
ll a, b; // a + bsqrt(3)
rad() {}
rad(ll a, ll b) : a(a), b(b) {}
};
typedef pair<rad, rad> prr;
rad operator+(rad a, rad b) {
return rad(a.a+b.a, a.b+b.b);
}
rad operator*(rad a, rad b) {
return rad(a.a*b.a+3*a.b*b.b, a.a*b.b+a.b*b.a);
}
// ll operator/(rad a, rad b) {
// assert(a.a/b.a == a.b/b.b); // probably good enough even though flooring
// return a.a/b.a;
// }
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |