# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
743661 | lukadupli | Dijamant (COI16_dijament) | C++14 | 382 ms | 26428 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |