# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
727840 | Kahou | Ruins 3 (JOI20_ruins3) | C++14 | 445 ms | 1876 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.
/* In the name of God, aka Allah */
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define mk make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int mod = 1e9 + 7;
int add(int a, int b) {
a += b;
if (a >= mod) a -= mod;
if (a < 0) a += mod;
return a;
}
int mul(int a, int b) {
return 1ll*a*b%mod;
}
int pw(int a, int b) {
int out = 1;
while (b) {
if (b&1) out = mul(a, out);
a = mul(a, a);
b >>= 1;
}
return out;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |