# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
762869 | PanosPask | Osmosmjerka (COCI17_osmosmjerka) | C++14 | 4078 ms | 20656 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 s second
#define f first
using namespace std;
typedef long long ll;
typedef __int128_t lll;
struct StringHash {
const ll MOD = (1ll << 61) - 1;
const int P = 31;
vector<ll> hash;
vector<ll> pow;
void init(string& st) {
hash.resize(st.size() + 1);
pow.resize(st.size() + 1);
hash[0] = 0;
pow[0] = 1;
for (int i = 0; i < st.size(); i++) {
hash[i + 1] = ((lll)hash[i] * P + st[i] - 'a' + 1) % MOD;
pow[i + 1] = (lll)pow[i] * P % MOD;
}
}
ll get(int l, int len) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |