# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
494403 | jasen_penchev | Brperm (RMI20_brperm) | C++14 | 248 ms | 262148 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 MOD1 = 1000000007;
const int MOD2 = 1000000009;
int n;
int pw[MAXN + 5][2];
struct Hash
{
int len;
int num1, num2;
};
Hash operator + (Hash h1, Hash h2)
{
Hash ret;
ret.len = h1.len + h2.len;
ret.num1 = (1ll * h1.num1 * pw[h2.len][0] + h2.num1) % MOD1;
ret.num2 = (1ll * h1.num2 * pw[h2.len][1] + h2.num2) % MOD2;
return ret;
}
bool operator == (Hash h1, Hash h2)
# | 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... |