# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1032863 | chautanphat | Selling RNA Strands (JOI16_selling_rna) | C++14 | 462 ms | 601172 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>
using namespace std;
struct Pre
{
struct node
{
int l, r;
node* child[26];
node ()
{
l = 1e9, r = 0;
for (int i = 0; i < 26; i++) child[i] = NULL;
}
} *root;
Pre ()
{
root = new node();
}
void add(string s, int idx)
{
node* cur = root;
for (int i = 0; i < (int)s.size(); i++)
{
int id = s[i]-'A';
if (cur->child[id] == NULL) cur->child[id] = new node();
cur = cur->child[id];
# | 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... |