# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
797710 | IBory | Palindromes (APIO14_palindrome) | C++17 | 321 ms | 31360 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 <bits/stdc++.h>
#define pii pair<ll, ll>
typedef long long ll;
using namespace std;
const ll MAX = 300003, MOD1 = 998244353, MOD2 = 846545669;
char C[MAX];
int P[MAX];
ll D[2][MAX], IP[2][MAX], ans;
map<ll, ll> cnt, Z;
map<ll, vector<ll>> G;
ll Pow(ll N, ll K, const ll MOD) {
ll ret = 1;
while (K) {
if (K & 1) ret = ret * N % MOD;
N = N * N % MOD;
K >>= 1LL;
}
return ret;
}
ll Hash(int L, int R) {
if (L > R) return -1;
R++;
ll a = (D[0][R] - D[0][L] + MOD1) * IP[0][L] % MOD1;
ll b = (D[1][R] - D[1][L] + MOD2) * IP[1][L] % MOD2;
return (a << 31LL) + b;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |