# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
743661 | lukadupli | Dijamant (COI16_dijament) | C++14 | 382 ms | 26428 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;
const int MAXN = 1005;
int n, cnt = 0, depth[MAXN];
map<string, int> mapa;
set<int> orgs[MAXN];
bool add(string& klasa, vector<string>& dads){
if(mapa.find(klasa) != mapa.end()) return 0;
vector<int> ds;
for(string& d : dads){
if(mapa.find(d) == mapa.end()) return 0;
ds.push_back(mapa[d]);
}
sort(ds.begin(), ds.end(), [](int a, int b){return depth[a] > depth[b]; });
set<int> s;
int maxi = -1;
for(int d : ds){
if(s.find(d) != s.end()) continue;
for(int e : orgs[d]){
if(s.find(e) != s.end()) return 0;
s.insert(e);
}
# | 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... |