제출 #376782

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3767822021-03-12 03:47:07KoDBoat (APIO16_boat)C++17
100 / 100
1060 ms6788 KiB
#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;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...