# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
80279 | fredbr | Lozinke (COCI17_lozinke) | C++17 | 160 ms | 16320 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;
set<int> atuais;
int idx = 0;
struct Node
{
int cnt = 0, id;
vector<pair<char, Node*>> b;
Node() {
cnt = 0, id = ++idx;
}
};
using tp = pair<char, Node*>;
Node root = Node();
void add(string const& s)
{
Node* at = &root;
for (char a : s) {
auto it = find_if(at->b.begin(), at->b.end(),
[a] (tp const& x) {return a == x.first;});
if (it == at->b.end()) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |