# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
376463 | KoD | Boat (APIO16_boat) | C++17 | 706 ms | 6704 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>
template <class T>
using Vec = std::vector<T>;
constexpr int MOD = 1000000007;
struct Fp {
int val;
Fp(const int val = 0): val(((val % MOD) + MOD) % MOD) { }
Fp& operator += (const Fp &other) {
if ((val += other.val) >= MOD) val -= MOD;
return *this;
}
Fp operator + (const Fp &other) const {
return Fp(*this) += other;
}
Fp& operator -= (const Fp &other) {
if ((val += MOD - other.val) >= MOD) val -= MOD;
return *this;
}
Fp operator - (const Fp &other) const {
return Fp(*this) -= other;
}
Fp& operator *= (const Fp &other) {
val = (long long) val * other.val % MOD;
return *this;
}
Fp operator * (const Fp &other) const {
return Fp(*this) *= other;
# | 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... |