# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
743630 | lukadupli | Dijamant (COI16_dijament) | C++14 | 2081 ms | 372 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1005;
int n, cnt = 0;
map<string, int> mapa;
bitset<MAXN> bs[MAXN];
bool add(string& klasa, vector<string>& dads){
if(mapa.find(klasa) != mapa.end()) return 0;
for(string& d : dads) if(mapa.find(d) == mapa.end()) return 0;
bitset<MAXN> b;
for(int i = 0; i < dads.size(); i++){
for(int j = i + 1; j < dads.size(); j++){
int d1 = mapa[dads[i]], d2 = mapa[dads[j]];
if(!bs[d2][d1] && !bs[d1][d2] && (bs[d1] & bs[d2]).count()) return 0;
}
b |= bs[mapa[dads[i]]];
}
mapa[klasa] = ++cnt;
b[cnt] = 1;
swap(bs[cnt], b);
return 1;
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |