# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
773862 | parsadox2 | Dabbeh (INOI20_dabbeh) | C++14 | 1452 ms | 68040 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define F first
#define S second
#define debug(x) cout << #x << "= " << x << ", "
#define ll long long
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define SZ(x) (int) x.size()
#define wall cout << endl;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn = 3e5 + 10 , Base = 727 , maxl = 20;
int n , L , m , pw[2][maxn] , mod[2] , prehsh[2][maxn] , rr[maxn];
pair<int , int> ar[maxn] , adj[maxl][maxn];
int modit(int ty , int a)
{
if(a >= mod[ty]) return a - mod[ty];
return a;
}
pair<int , int> get(int l , int r)
{
int res[2];
if(l == 0) return make_pair(prehsh[0][r] , prehsh[1][r]);
for(int ty = 0 ; ty < 2 ; ty++)
{
res[ty] = 1LL * prehsh[ty][l - 1] * pw[ty][r - l + 1] % mod[ty];
res[ty] = modit(ty , prehsh[ty][r] + mod[ty] - res[ty]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |