# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
494419 | jasen_penchev | Brperm (RMI20_brperm) | C++14 | 1996 ms | 168664 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 <iostream>
#define endl '\n'
using namespace std;
const int MAXN = 500000;
const int LOG = 20;
const int BASE = 26;
const int MOD = 1000000007;
int n;
int pw[MAXN + 1];
struct Hash
{
int len;
int num;
};
Hash operator + (Hash h1, Hash h2)
{
Hash ret;
ret.len = h1.len + h2.len;
ret.num = (1ll * h1.num * pw[h2.len] + h2.num) % MOD;
return ret;
}
bool operator == (Hash h1, Hash h2)
{
return (h1.len == h2.len and h1.num == h2.num);
# | 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... |