# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
515907 | amunduzbaev | Selling RNA Strands (JOI16_selling_rna) | C++14 | 212 ms | 206040 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
using namespace std;
#define ar array
const int N = 2e6 + 5;
struct TRIE{
int tree[N][4];
int last, tin[N], tout[N], t;
int get(char c){
if(c == 'A') return 0;
if(c == 'G') return 1;
if(c == 'C') return 2;
return 3;
}
int add(string& s){
int cur = 0;
for(int i=0;i<(int)s.size();i++){
int x = get(s[i]);
if(tree[cur][x]) cur = tree[cur][x];
else tree[cur][x] = ++last, cur = last;
} return cur;
}
void dfs(int u = 0){
tin[u] = ++t;
for(int k=0;k<4;k++){
# | 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... |