# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1175450 | InvMOD | Selling RNA Strands (JOI16_selling_rna) | C++20 | 570 ms | 1114112 KiB |
#include<bits/stdc++.h>
using namespace std;
#define sz(v) (int)(v).size()
#define all(v) (v).begin(), (v).end()
const int N = 2e6 + 5, M = 1e5 + 5, C = 26;
struct Trie{
struct Node{
Node* child[C]; int cnt;
Node(): cnt(0) {
for(int i = 0; i < C; i++){
child[i] = nullptr;
}
}
};
typedef Node* pNode;
pNode root;
Trie(){
root = new Node();
}
void addStr(const string &s){
pNode cur = root;
for(const char &i : s){
int c = int(i - 'A');
if(cur->child[c] == nullptr) cur->child[c] = new 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... |