# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
596612 | CaroLinda | Brperm (RMI20_brperm) | C++14 | 305 ms | 115596 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 "brperm.h"
#include <bits/stdc++.h>
#define all(x) (x.begin(),x.end())
#define ll long long
const ll PRIME = 37LL;
const ll MOD = 1e9+7;
const int LOG = 20;
const int MAXN = 5e5+10;
using namespace std;
int dp[LOG][MAXN];
ll invPot[LOG][MAXN], sv[LOG][MAXN], pot2[LOG][LOG];
int token = LOG-1;
int N;
void init(int n, const char s[]) {
N = n;
for(int i = 0; i < n; i++)
dp[0][i] = s[i]-'a'+1;
pot2[0][0] = PRIME;
for(int i = 1; i <= token; i++)
pot2[i][0] = (pot2[i-1][0]*pot2[i-1][0])%MOD;
# | 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... |