# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
768337 | DylanSmith | Selling RNA Strands (JOI16_selling_rna) | C++17 | 425 ms | 365524 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) begin(x),end(x)
#define lb(x,y) lower_bound(all(x),y)-begin(x)
mt19937 rng;
typedef struct Node {
int adj[4], par; int freq, pos;
Node(int p = -1) {
freq = 0; pos = -1; par = p;
fill(adj, adj + 4, -1);
}
} node;
int add(vector<node> &tree, string &s) {
int cur = 0;
for (char c : s) {
if (tree[cur].adj[c - 'a'] == -1) {
tree[cur].adj[c - 'a'] = sz(tree);
tree.emplace_back(cur);
}
cur = tree[cur].adj[c - 'a'];
}
# | 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... |