# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
497688 | amoo_safar | Ruins 3 (JOI20_ruins3) | C++17 | 586 ms | 336 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>
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define debug(x) cerr << #x << " : " << x << '\n'
using namespace std;
const int N = 6e2 + 10;
namespace ModularInt {
template<typename T>
T inverse(T a, T pr){
T u = 1, v = 0;
while(a != 0){
T dv = pr / a;
pr -= dv * a; v -= dv * u;
swap(a, pr); swap(u, v);
}
assert(pr == 1); // gcd(a, pr) != 1;
return v;
}
template<typename ModT>
class Mint {
public:
using T = typename decay<decltype(ModT::value)>::type;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |