# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1094632 | Dan4Life | Type Printer (IOI08_printer) | C++17 | 195 ms | 93108 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;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a),end(a)
const int mxS = 25000*21;
int n, cnt;
vector<char> ans;
int trieNode = 0;
int trie[27][mxS];
int dep[27][mxS];
bitset<mxS> word;
void add(string s){
int v = 0;
for(auto u : s){
int c = u-'a';
if(!trie[c][v])
trie[c][v] = ++trieNode;
dep[c][v]=max(dep[c][v],sz(s));
v = trie[c][v];
}
word[v]=1;
}
void dfs(int s){
if(word[s]) ans.pb('P'),cnt++;
vector<int> ord(26,0); iota(all(ord),0);
sort(all(ord),[&](int a, int b){
return dep[a][s]<dep[b][s];
# | 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... |
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |