# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
549389 | toloraia | Copy and Paste 3 (JOI22_copypaste3) | C++14 | 3062 ms | 219992 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 ll long long
#define ull unsigned ll
#define f first
#define s second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define epb emplace_back
using namespace std;
const int NMAX = 2501;
const int inf = 1e9 + 1;
const ll linf = 1e18 + 1;
ll mod[] ={1000000007, 1000000009, 998244353};
ll pr[] = {29, 31, 37};
ll po[NMAX][2];
ll h[NMAX][2];
void hashing(string s){
h[0][0] = 0;
h[0][1] = 0;
h[0][2] = 0;
int n = s.size();
for(int i = 1; i <= n; i++){
ll x = s[i - 1] - 'a' + 1;
for(int j = 0; j < 2; j++){
h[i][j] = h[i - 1][j] * pr[j] + x;
h[i][j] %= mod[j];
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |