# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
155608 | georgerapeanu | Selling RNA Strands (JOI16_selling_rna) | C++11 | 1180 ms | 488024 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 <cstdio>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
const int SIGMA = 26;
const int BASE = 31;
const int MOD1 = 1e9 + 7;
const int MOD2 = 666013;
map<char,int> to_norm;
struct hsh_t{
int h1;
int h2;
int len;
hsh_t(){
h1 = h2 = len = 0;
}
void add_back(int x){
x++;
this->len++;
this->h1 = (1LL * this->h1 * BASE + x) % MOD1;
this->h2 = (1LL * this->h2 * BASE + x) % MOD2;
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... |