# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
839470 | vjudge1 | Selling RNA Strands (JOI16_selling_rna) | C++17 | 122 ms | 288484 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 pb push_back
#define fi first
#define se second
using namespace std;
typedef long long ll;
const int maxn=1e5+5;
const int maxm=6e6+5;
map<char,int>m;
struct node{
int a[4];
int cnt=0;
node(){for(int i=0;i<4;i++)a[i]=0;}
};
vector<node>trie[2];
int tin[2][maxm];
int tout[2][maxm];
int vt[2][maxm];
void add(string s,int id,int type){
int pos=0;
for(auto &v:s){
int k=m[v];
if(trie[type][pos].a[k]==0){
trie[type][pos].a[k]=trie[type].size();
trie[type].pb(node());
}
pos=trie[type][pos].a[k];
}
vt[type][id]=pos;
}
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... |