# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
377438 | dolphingarlic | Selling RNA Strands (JOI16_selling_rna) | C++14 | 509 ms | 396144 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 TrieNode {
TrieNode *c[4];
int tin, tout;
vector<int> terminal;
vector<tuple<int, int, int>> queries;
unordered_map<int, int> bit;
TrieNode() { for (int i = 0; i < 4; i++) c[i] = nullptr; }
};
inline int get_idx(char c) {
if (c == 'A') return 0;
if (c == 'G') return 1;
if (c == 'C') return 2;
return 3;
}
void insert(string &s, TrieNode *node, int i) {
for (char c : s) {
int idx = get_idx(c);
if (!node->c[idx]) node->c[idx] = new TrieNode();
node = node->c[idx];
}
node->terminal.push_back(i);
}
TrieNode *retrieve(string &s, TrieNode *node) {
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... |